Transfer serviceworker state during cross site navigations too.

The ServiceWorkerProviderHost is an object that persist across the lifetime of a document. It's created prior to the document and prior to the initiation of the resource load for the documents main resource. Today, when a cross-site xfer occurs the host is deleted and a new host is created that knows nothing of whats going on... so not surprisingly things are broken.

The change is to retain the original ServiceworkerProviderHost and transfer ownership of it to the process in which the document finally lands.

BUG=438005

Review URL: https://codereview.chromium.org/702843004

Cr-Commit-Position: refs/heads/master@{#307579}


CrOS-Libchrome-Original-Commit: bfea6ecef56cba8beb9816e8e9674a9dc456b20e
diff --git a/base/id_map_unittest.cc b/base/id_map_unittest.cc
index c005a69..a9fb2b9 100644
--- a/base/id_map_unittest.cc
+++ b/base/id_map_unittest.cc
@@ -53,6 +53,9 @@
   EXPECT_EQ(&obj1, map.Lookup(1));
   EXPECT_EQ(&obj2, map.Lookup(2));
 
+  EXPECT_EQ(&obj2, map.Replace(2, &obj1));
+  EXPECT_EQ(&obj1, map.Lookup(2));
+
   EXPECT_EQ(0, map.iteration_depth());
 }