diff --git a/chromeos/CHROMEOS_LKGM b/chromeos/CHROMEOS_LKGM
index ec51f947..1c5cf88 100644
--- a/chromeos/CHROMEOS_LKGM
+++ b/chromeos/CHROMEOS_LKGM
@@ -1 +1 @@
-9119.0.0
\ No newline at end of file
+9122.0.0
\ No newline at end of file
diff --git a/components/reading_list/ios/reading_list_entry.cc b/components/reading_list/ios/reading_list_entry.cc
index b3fc0e0..0d33436 100644
--- a/components/reading_list/ios/reading_list_entry.cc
+++ b/components/reading_list/ios/reading_list_entry.cc
@@ -152,12 +152,20 @@
 }
 
 void ReadingListEntry::SetRead(bool read) {
+  State previous_state = state_;
   state_ = read ? READ : UNREAD;
+  if (state_ == previous_state) {
+    return;
+  }
   if (FirstReadTime() == 0 && read) {
     first_read_time_us_ =
         (base::Time::Now() - base::Time::UnixEpoch()).InMicroseconds();
   }
-  MarkEntryUpdated();
+  if (!(previous_state == UNSEEN && state_ == UNREAD)) {
+    // If changing UNSEEN -> UNREAD, entry is not marked updated to preserve
+    // order in Reading List View.
+    MarkEntryUpdated();
+  }
 }
 
 bool ReadingListEntry::IsRead() const {
diff --git a/components/reading_list/ios/reading_list_model.h b/components/reading_list/ios/reading_list_model.h
index c3eb2f4..359bc2a 100644
--- a/components/reading_list/ios/reading_list_model.h
+++ b/components/reading_list/ios/reading_list_model.h
@@ -62,6 +62,13 @@
   // Returns the total number of unread entries in the model.
   virtual size_t unread_size() const = 0;
 
+  // Returns the total number of unseen entries in the model. Note: These
+  // entries are also unread so unseen_size() <= unread_size().
+  virtual size_t unseen_size() const = 0;
+
+  // Mark all unseen entries as unread.
+  virtual void MarkAllSeen() = 0;
+
   // Returns true if there are entries in the model that were not seen by the
   // user yet. Reset to true when new unread entries are added. Reset to false
   // when ResetUnseenEntries is called.
diff --git a/components/reading_list/ios/reading_list_model_impl.cc b/components/reading_list/ios/reading_list_model_impl.cc
index 38aeb58..e310b6040 100644
--- a/components/reading_list/ios/reading_list_model_impl.cc
+++ b/components/reading_list/ios/reading_list_model_impl.cc
@@ -21,6 +21,7 @@
     PrefService* pref_service)
     : unread_entry_count_(0),
       read_entry_count_(0),
+      unseen_entry_count_(0),
       pref_service_(pref_service),
       has_unseen_(false),
       loaded_(false),
@@ -43,11 +44,7 @@
   DCHECK(CalledOnValidThread());
   entries_ = std::move(entries);
   for (auto& iterator : *entries_) {
-    if (iterator.second.IsRead()) {
-      read_entry_count_++;
-    } else {
-      unread_entry_count_++;
-    }
+    UpdateEntryStateCountersOnEntryInsertion(iterator.second);
   }
   DCHECK(read_entry_count_ + unread_entry_count_ == entries_->size());
   loaded_ = true;
@@ -83,11 +80,18 @@
   return unread_entry_count_;
 }
 
+size_t ReadingListModelImpl::unseen_size() const {
+  DCHECK(CalledOnValidThread());
+  if (!loaded())
+    return 0;
+  return unseen_entry_count_;
+}
+
 bool ReadingListModelImpl::HasUnseenEntries() const {
   DCHECK(CalledOnValidThread());
   if (!loaded())
     return false;
-  return unread_entry_count_ > 0 && has_unseen_;
+  return has_unseen_;
 }
 
 void ReadingListModelImpl::ResetUnseenEntries() {
@@ -98,6 +102,59 @@
     SetPersistentHasUnseen(false);
 }
 
+void ReadingListModelImpl::MarkAllSeen() {
+  DCHECK(CalledOnValidThread());
+  DCHECK(loaded());
+  if (unseen_entry_count_ == 0) {
+    return;
+  }
+  std::unique_ptr<ReadingListModel::ScopedReadingListBatchUpdate>
+      model_batch_updates = BeginBatchUpdates();
+  for (auto& iterator : *entries_) {
+    ReadingListEntry& entry = iterator.second;
+    if (entry.HasBeenSeen()) {
+      continue;
+    }
+    for (auto& observer : observers_) {
+      observer.ReadingListWillUpdateEntry(this, iterator.first);
+    }
+    UpdateEntryStateCountersOnEntryRemoval(entry);
+    entry.SetRead(false);
+    UpdateEntryStateCountersOnEntryInsertion(entry);
+    if (storage_layer_) {
+      storage_layer_->SaveEntry(entry);
+    }
+    for (auto& observer : observers_) {
+      observer.ReadingListDidApplyChanges(this);
+    }
+  }
+  DCHECK(unseen_entry_count_ == 0);
+}
+
+void ReadingListModelImpl::UpdateEntryStateCountersOnEntryRemoval(
+    const ReadingListEntry& entry) {
+  if (!entry.HasBeenSeen()) {
+    unseen_entry_count_--;
+  }
+  if (entry.IsRead()) {
+    read_entry_count_--;
+  } else {
+    unread_entry_count_--;
+  }
+}
+
+void ReadingListModelImpl::UpdateEntryStateCountersOnEntryInsertion(
+    const ReadingListEntry& entry) {
+  if (!entry.HasBeenSeen()) {
+    unseen_entry_count_++;
+  }
+  if (entry.IsRead()) {
+    read_entry_count_++;
+  } else {
+    unread_entry_count_++;
+  }
+}
+
 const std::vector<GURL> ReadingListModelImpl::Keys() const {
   std::vector<GURL> keys;
   for (const auto& iterator : *entries_) {
@@ -132,10 +189,8 @@
   DCHECK(GetMutableEntryFromURL(entry->URL()) == nullptr);
   for (auto& observer : observers_)
     observer.ReadingListWillAddEntry(this, *entry);
-  if (entry->IsRead()) {
-    read_entry_count_++;
-  } else {
-    unread_entry_count_++;
+  UpdateEntryStateCountersOnEntryInsertion(*entry);
+  if (!entry->IsRead()) {
     SetPersistentHasUnseen(true);
   }
   GURL url = entry->URL();
@@ -157,19 +212,11 @@
   for (auto& observer : observers_)
     observer.ReadingListWillMoveEntry(this, url);
 
-  if (existing_entry->IsRead()) {
-    read_entry_count_--;
-  } else {
-    unread_entry_count_--;
-  }
+  UpdateEntryStateCountersOnEntryRemoval(*existing_entry);
   existing_entry->MergeWithEntry(*entry);
-
   existing_entry = GetMutableEntryFromURL(url);
-  if (existing_entry->IsRead()) {
-    read_entry_count_++;
-  } else {
-    unread_entry_count_++;
-  }
+  UpdateEntryStateCountersOnEntryInsertion(*existing_entry);
+
   for (auto& observer : observers_) {
     observer.ReadingListDidMoveEntry(this, url);
     observer.ReadingListDidApplyChanges(this);
@@ -200,11 +247,7 @@
   if (storage_layer_ && !from_sync) {
     storage_layer_->RemoveEntry(*entry);
   }
-  if (entry->IsRead()) {
-    read_entry_count_--;
-  } else {
-    unread_entry_count_--;
-  }
+  UpdateEntryStateCountersOnEntryRemoval(*entry);
   entries_->erase(url);
   for (auto& observer : observers_)
     observer.ReadingListDidApplyChanges(this);
@@ -225,8 +268,9 @@
     observer.ReadingListWillAddEntry(this, entry);
   has_unseen_ = true;
   SetPersistentHasUnseen(true);
+  UpdateEntryStateCountersOnEntryInsertion(entry);
   entries_->insert(std::make_pair(url, std::move(entry)));
-  unread_entry_count_++;
+
   if (storage_layer_) {
     storage_layer_->SaveEntry(*GetEntryByURL(url));
   }
@@ -253,15 +297,10 @@
   for (ReadingListModelObserver& observer : observers_) {
     observer.ReadingListWillMoveEntry(this, url);
   }
-  if (read) {
-    read_entry_count_++;
-    unread_entry_count_--;
-  } else {
-    unread_entry_count_++;
-    read_entry_count_--;
-  }
+  UpdateEntryStateCountersOnEntryRemoval(entry);
   entry.SetRead(read);
   entry.MarkEntryUpdated();
+  UpdateEntryStateCountersOnEntryInsertion(entry);
   if (storage_layer_) {
     storage_layer_->SaveEntry(entry);
   }
diff --git a/components/reading_list/ios/reading_list_model_impl.h b/components/reading_list/ios/reading_list_model_impl.h
index c49d713..2895332 100644
--- a/components/reading_list/ios/reading_list_model_impl.h
+++ b/components/reading_list/ios/reading_list_model_impl.h
@@ -46,7 +46,9 @@
 
   size_t size() const override;
   size_t unread_size() const override;
+  size_t unseen_size() const override;
 
+  void MarkAllSeen() override;
   bool HasUnseenEntries() const override;
   void ResetUnseenEntries() override;
 
@@ -115,6 +117,11 @@
   std::unique_ptr<ReadingListEntries> entries_;
   size_t unread_entry_count_;
   size_t read_entry_count_;
+  size_t unseen_entry_count_;
+
+  // Update the 3 counts above considering addition/removal of |entry|.
+  void UpdateEntryStateCountersOnEntryRemoval(const ReadingListEntry& entry);
+  void UpdateEntryStateCountersOnEntryInsertion(const ReadingListEntry& entry);
 
   std::unique_ptr<ReadingListModelStorage> storage_layer_;
   PrefService* pref_service_;
diff --git a/components/reading_list/ios/reading_list_model_unittest.mm b/components/reading_list/ios/reading_list_model_unittest.mm
index 91953767b..bf7c1b10 100644
--- a/components/reading_list/ios/reading_list_model_unittest.mm
+++ b/components/reading_list/ios/reading_list_model_unittest.mm
@@ -464,7 +464,7 @@
   AssertObserverCount(0, 0, 0, 0, 0, 1, 0, 0, 1);
   EXPECT_EQ(0ul, UnreadSize());
   EXPECT_EQ(1ul, ReadSize());
-  EXPECT_FALSE(model_->HasUnseenEntries());
+  EXPECT_EQ(0ul, model_->unseen_size());
 
   const ReadingListEntry* other_entry =
       model_->GetEntryByURL(GURL("http://example.com"));
diff --git a/content/child/service_worker/service_worker_dispatcher.cc b/content/child/service_worker/service_worker_dispatcher.cc
index d0db7de..7c682b0 100644
--- a/content/child/service_worker/service_worker_dispatcher.cc
+++ b/content/child/service_worker/service_worker_dispatcher.cc
@@ -131,7 +131,7 @@
     error_message += "The provided scriptURL or scope is too long.";
     callbacks->onError(
         WebServiceWorkerError(WebServiceWorkerError::ErrorTypeSecurity,
-                              blink::WebString::fromUTF8(error_message)));
+                              blink::WebString::fromASCII(error_message)));
     return;
   }
 
@@ -179,7 +179,7 @@
     error_message += "The provided documentURL is too long.";
     callbacks->onError(
         WebServiceWorkerError(WebServiceWorkerError::ErrorTypeSecurity,
-                              blink::WebString::fromUTF8(error_message)));
+                              blink::WebString::fromASCII(error_message)));
     return;
   }
 
@@ -617,7 +617,8 @@
   if (!callbacks)
     return;
 
-  callbacks->onError(WebServiceWorkerError(error_type, message));
+  callbacks->onError(
+      WebServiceWorkerError(error_type, blink::WebString::fromUTF16(message)));
   pending_registration_callbacks_.Remove(request_id);
 }
 
@@ -638,7 +639,8 @@
   if (!callbacks)
     return;
 
-  callbacks->onError(WebServiceWorkerError(error_type, message));
+  callbacks->onError(
+      WebServiceWorkerError(error_type, blink::WebString::fromUTF16(message)));
   pending_update_callbacks_.Remove(request_id);
 }
 
@@ -661,7 +663,8 @@
   if (!callbacks)
     return;
 
-  callbacks->onError(WebServiceWorkerError(error_type, message));
+  callbacks->onError(
+      WebServiceWorkerError(error_type, blink::WebString::fromUTF16(message)));
   pending_unregistration_callbacks_.Remove(request_id);
 }
 
@@ -684,7 +687,8 @@
   if (!callbacks)
     return;
 
-  callbacks->onError(WebServiceWorkerError(error_type, message));
+  callbacks->onError(
+      WebServiceWorkerError(error_type, blink::WebString::fromUTF16(message)));
   pending_get_registration_callbacks_.Remove(request_id);
 }
 
@@ -707,7 +711,8 @@
   if (!callbacks)
     return;
 
-  callbacks->onError(WebServiceWorkerError(error_type, message));
+  callbacks->onError(
+      WebServiceWorkerError(error_type, blink::WebString::fromUTF16(message)));
   pending_get_registrations_callbacks_.Remove(request_id);
 }
 
@@ -866,7 +871,8 @@
           base::ThreadTaskRunnerHandle::Get());
 
   found->second->dispatchMessageEvent(
-      WebServiceWorkerImpl::CreateHandle(worker), params.message, ports);
+      WebServiceWorkerImpl::CreateHandle(worker),
+      blink::WebString::fromUTF16(params.message), ports);
 }
 
 void ServiceWorkerDispatcher::AddServiceWorker(
diff --git a/content/child/service_worker/web_service_worker_impl.cc b/content/child/service_worker/web_service_worker_impl.cc
index cdbb0b0..947359eb 100644
--- a/content/child/service_worker/web_service_worker_impl.cc
+++ b/content/child/service_worker/web_service_worker_impl.cc
@@ -117,10 +117,9 @@
       base::Bind(&SendPostMessageToWorkerOnMainThread,
                  base::RetainedRef(thread_safe_sender_),
                  handle_ref_->handle_id(), provider_impl->provider_id(),
-                 // We cast WebString to string16 before crossing
+                 // We convert WebString to string16 before crossing
                  // threads for thread-safety.
-                 static_cast<base::string16>(message),
-                 url::Origin(source_origin),
+                 message.utf16(), url::Origin(source_origin),
                  base::Passed(base::WrapUnique(channels))));
 }
 
diff --git a/content/renderer/service_worker/embedded_worker_dispatcher.cc b/content/renderer/service_worker/embedded_worker_dispatcher.cc
index 95e971b..0499cef 100644
--- a/content/renderer/service_worker/embedded_worker_dispatcher.cc
+++ b/content/renderer/service_worker/embedded_worker_dispatcher.cc
@@ -139,7 +139,8 @@
 
   blink::WebEmbeddedWorkerStartData start_data;
   start_data.scriptURL = params.script_url;
-  start_data.userAgent = base::UTF8ToUTF16(GetContentClient()->GetUserAgent());
+  start_data.userAgent =
+      blink::WebString::fromUTF8(GetContentClient()->GetUserAgent());
   start_data.waitForDebuggerMode =
       params.wait_for_debugger
           ? blink::WebEmbeddedWorkerStartData::WaitForDebugger
diff --git a/content/renderer/service_worker/service_worker_context_client.cc b/content/renderer/service_worker/service_worker_context_client.cc
index d44cf1d..715a35e 100644
--- a/content/renderer/service_worker/service_worker_context_client.cc
+++ b/content/renderer/service_worker/service_worker_context_client.cc
@@ -156,7 +156,7 @@
 
   blink::WebServiceWorkerClientInfo web_client_info;
 
-  web_client_info.uuid = base::UTF8ToUTF16(client_info.client_uuid);
+  web_client_info.uuid = blink::WebString::fromASCII(client_info.client_uuid);
   web_client_info.pageVisibilityState = client_info.page_visibility_state;
   web_client_info.isFocused = client_info.is_focused;
   web_client_info.url = client_info.url;
@@ -248,7 +248,7 @@
         fetch_event_id_,
         base::MakeUnique<blink::WebServiceWorkerError>(
             blink::WebServiceWorkerError::ErrorTypeAbort,
-            blink::WebString::fromUTF8(
+            blink::WebString::fromASCII(
                 "Service Worker navigation preload aborted. Need to guard with "
                 "respondWith or waitUntil.")));
   }
@@ -442,8 +442,8 @@
     std::unique_ptr<blink::WebServiceWorkerClientCallbacks> callbacks) {
   DCHECK(callbacks);
   int request_id = context_->client_callbacks.Add(std::move(callbacks));
-  Send(new ServiceWorkerHostMsg_GetClient(
-      GetRoutingID(), request_id, base::UTF16ToUTF8(base::StringPiece16(id))));
+  Send(new ServiceWorkerHostMsg_GetClient(GetRoutingID(), request_id,
+                                          id.utf8()));
 }
 
 void ServiceWorkerContextClient::getClients(
@@ -631,7 +631,7 @@
     int column_number,
     const blink::WebString& source_url) {
   Send(new EmbeddedWorkerHostMsg_ReportException(
-      embedded_worker_id_, error_message, line_number, column_number,
+      embedded_worker_id_, error_message.utf16(), line_number, column_number,
       blink::WebStringToGURL(source_url)));
 }
 
@@ -644,7 +644,7 @@
   EmbeddedWorkerHostMsg_ReportConsoleMessage_Params params;
   params.source_identifier = source;
   params.message_level = level;
-  params.message = message;
+  params.message = message.utf16();
   params.line_number = line_number;
   params.source_url = blink::WebStringToGURL(source_url);
 
@@ -837,11 +837,10 @@
   // to overtake those messages.
   std::unique_ptr<blink::WebMessagePortChannelArray> channel_array(channels);
   main_thread_task_runner_->PostTask(
-      FROM_HERE, base::Bind(&SendPostMessageToClientOnMainThread,
-                            base::RetainedRef(sender_), GetRoutingID(),
-                            base::UTF16ToUTF8(base::StringPiece16(uuid)),
-                            static_cast<base::string16>(message),
-                            base::Passed(&channel_array)));
+      FROM_HERE,
+      base::Bind(&SendPostMessageToClientOnMainThread,
+                 base::RetainedRef(sender_), GetRoutingID(), uuid.utf8(),
+                 message.utf16(), base::Passed(&channel_array)));
 }
 
 void ServiceWorkerContextClient::focus(
@@ -849,9 +848,8 @@
     std::unique_ptr<blink::WebServiceWorkerClientCallbacks> callback) {
   DCHECK(callback);
   int request_id = context_->client_callbacks.Add(std::move(callback));
-  Send(new ServiceWorkerHostMsg_FocusClient(
-      GetRoutingID(), request_id,
-      base::UTF16ToUTF8(base::StringPiece16(uuid))));
+  Send(new ServiceWorkerHostMsg_FocusClient(GetRoutingID(), request_id,
+                                            uuid.utf8()));
 }
 
 void ServiceWorkerContextClient::navigate(
@@ -860,9 +858,8 @@
     std::unique_ptr<blink::WebServiceWorkerClientCallbacks> callback) {
   DCHECK(callback);
   int request_id = context_->client_callbacks.Add(std::move(callback));
-  Send(new ServiceWorkerHostMsg_NavigateClient(
-      GetRoutingID(), request_id, base::UTF16ToUTF8(base::StringPiece16(uuid)),
-      url));
+  Send(new ServiceWorkerHostMsg_NavigateClient(GetRoutingID(), request_id,
+                                               uuid.utf8(), url));
 }
 
 void ServiceWorkerContextClient::skipWaiting(
@@ -958,7 +955,8 @@
     blink::WebServiceWorkerClientInfo web_client =
         ToWebServiceWorkerClientInfo(event->source.client_info);
     proxy_->dispatchExtendableMessageEvent(
-        request_id, event->message, event->source_origin, ports, web_client);
+        request_id, blink::WebString::fromUTF16(event->message),
+        event->source_origin, ports, web_client);
     return;
   }
 
@@ -972,8 +970,8 @@
   scoped_refptr<WebServiceWorkerImpl> worker =
       dispatcher->GetOrCreateServiceWorker(std::move(handle));
   proxy_->dispatchExtendableMessageEvent(
-      request_id, event->message, event->source_origin, ports,
-      WebServiceWorkerImpl::CreateHandle(worker));
+      request_id, blink::WebString::fromUTF16(event->message),
+      event->source_origin, ports, WebServiceWorkerImpl::CreateHandle(worker));
 }
 
 void ServiceWorkerContextClient::OnInstallEvent(int request_id) {
@@ -1012,7 +1010,7 @@
                          blink::WebString::fromUTF8(it->second));
   }
   if (!request.blob_uuid.empty()) {
-    webRequest.setBlob(blink::WebString::fromUTF8(request.blob_uuid),
+    webRequest.setBlob(blink::WebString::fromASCII(request.blob_uuid),
                        request.blob_size);
   }
   webRequest.setReferrer(
@@ -1047,7 +1045,7 @@
   proxy_->dispatchNotificationClickEvent(
       request_id, blink::WebString::fromUTF8(notification_id),
       ToWebNotificationData(notification_data), action_index,
-      blink::WebString(reply));
+      blink::WebString::fromUTF16(reply));
 }
 
 void ServiceWorkerContextClient::OnNotificationCloseEvent(
@@ -1251,7 +1249,8 @@
     NOTREACHED() << "Got stray response: " << request_id;
     return;
   }
-  callbacks->onError(blink::WebServiceWorkerError(error_type, message));
+  callbacks->onError(blink::WebServiceWorkerError(
+      error_type, blink::WebString::fromUTF16(message)));
   context_->claim_clients_callbacks.Remove(request_id);
 }
 
diff --git a/content/renderer/shared_worker/embedded_shared_worker_content_settings_client_proxy.cc b/content/renderer/shared_worker/embedded_shared_worker_content_settings_client_proxy.cc
index 97b5063..78ec9fc 100644
--- a/content/renderer/shared_worker/embedded_shared_worker_content_settings_client_proxy.cc
+++ b/content/renderer/shared_worker/embedded_shared_worker_content_settings_client_proxy.cc
@@ -44,7 +44,7 @@
     return false;
   bool result = false;
   thread_safe_sender_->Send(new WorkerProcessHostMsg_AllowIndexedDB(
-      routing_id_, origin_url_, name, &result));
+      routing_id_, origin_url_, name.utf16(), &result));
   return result;
 }
 
diff --git a/content/renderer/shared_worker/embedded_shared_worker_stub.cc b/content/renderer/shared_worker/embedded_shared_worker_stub.cc
index 5aef63a..7ceb3dd5 100644
--- a/content/renderer/shared_worker/embedded_shared_worker_stub.cc
+++ b/content/renderer/shared_worker/embedded_shared_worker_stub.cc
@@ -152,8 +152,10 @@
   }
   worker_devtools_agent_.reset(
       new SharedWorkerDevToolsAgent(route_id, impl_));
-  impl_->startWorkerContext(url, name_, content_security_policy,
-                            security_policy_type, creation_address_space);
+  impl_->startWorkerContext(
+      url, blink::WebString::fromUTF16(name_),
+      blink::WebString::fromUTF16(content_security_policy),
+      security_policy_type, creation_address_space);
 }
 
 EmbeddedSharedWorkerStub::~EmbeddedSharedWorkerStub() {
diff --git a/content/renderer/shared_worker_repository.cc b/content/renderer/shared_worker_repository.cc
index 466a79b..96bea06f 100644
--- a/content/renderer/shared_worker_repository.cc
+++ b/content/renderer/shared_worker_repository.cc
@@ -20,7 +20,7 @@
 
 SharedWorkerRepository::~SharedWorkerRepository() {}
 
-blink::WebSharedWorkerConnector*
+std::unique_ptr<blink::WebSharedWorkerConnector>
 SharedWorkerRepository::createSharedWorkerConnector(
     const blink::WebURL& url,
     const blink::WebString& name,
@@ -32,8 +32,8 @@
     blink::WebWorkerCreationError* error) {
   ViewHostMsg_CreateWorker_Params params;
   params.url = url;
-  params.name = name;
-  params.content_security_policy = content_security_policy;
+  params.name = name.utf16();
+  params.content_security_policy = content_security_policy.utf16();
   params.security_policy_type = security_policy_type;
   params.document_id = document_id;
   params.render_frame_route_id = render_frame()->GetRoutingID();
@@ -42,12 +42,11 @@
   ViewHostMsg_CreateWorker_Reply reply;
   Send(new ViewHostMsg_CreateWorker(params, &reply));
   *error = reply.error;
-  if (reply.route_id == MSG_ROUTING_NONE) {
-    return NULL;
-  }
+  if (reply.route_id == MSG_ROUTING_NONE)
+    return nullptr;
   documents_with_workers_.insert(document_id);
-  return new WebSharedWorkerProxy(ChildThreadImpl::current()->GetRouter(),
-                                  reply.route_id);
+  return base::MakeUnique<WebSharedWorkerProxy>(
+      ChildThreadImpl::current()->GetRouter(), reply.route_id);
 }
 
 void SharedWorkerRepository::documentDetached(DocumentID document) {
diff --git a/content/renderer/shared_worker_repository.h b/content/renderer/shared_worker_repository.h
index 8714f3af3..cfc98dd5 100644
--- a/content/renderer/shared_worker_repository.h
+++ b/content/renderer/shared_worker_repository.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_RENDERER_SHARED_WORKER_REPOSITORY_H_
 #define CONTENT_RENDERER_SHARED_WORKER_REPOSITORY_H_
 
+#include <memory>
 #include <set>
 
 #include "base/macros.h"
@@ -25,7 +26,7 @@
   ~SharedWorkerRepository() override;
 
   // WebSharedWorkerRepositoryClient overrides.
-  blink::WebSharedWorkerConnector* createSharedWorkerConnector(
+  std::unique_ptr<blink::WebSharedWorkerConnector> createSharedWorkerConnector(
       const blink::WebURL& url,
       const blink::WebString& name,
       DocumentID document_id,
diff --git a/content/renderer/websharedworker_proxy.cc b/content/renderer/websharedworker_proxy.cc
index 46bbfe1..880a6960 100644
--- a/content/renderer/websharedworker_proxy.cc
+++ b/content/renderer/websharedworker_proxy.cc
@@ -19,17 +19,13 @@
                                            int route_id)
     : route_id_(route_id),
       router_(router),
-      connect_listener_(NULL),
+      connect_listener_(nullptr),
       created_(false) {
   router_->AddRoute(route_id_, this);
 }
 
 WebSharedWorkerProxy::~WebSharedWorkerProxy() {
   Disconnect();
-
-  // Free up any unsent queued messages.
-  for (size_t i = 0; i < queued_messages_.size(); ++i)
-    delete queued_messages_[i];
 }
 
 void WebSharedWorkerProxy::Disconnect() {
@@ -44,31 +40,30 @@
   route_id_ = MSG_ROUTING_NONE;
 }
 
-bool WebSharedWorkerProxy::Send(IPC::Message* message) {
+bool WebSharedWorkerProxy::Send(std::unique_ptr<IPC::Message> message) {
   // It's possible that messages will be sent before the worker is created, in
   // which case route_id_ will be none.  Or the worker object can be interacted
   // with before the browser process told us that it started, in which case we
   // also want to queue the message.
   if (!created_) {
-    queued_messages_.push_back(message);
+    queued_messages_.push_back(std::move(message));
     return true;
   }
 
   // For now we proxy all messages to the worker process through the browser.
   // Revisit if we find this slow.
   // TODO(jabdelmalek): handle sync messages if we need them.
-  IPC::Message* wrapped_msg = new ViewHostMsg_ForwardToWorker(*message);
-  delete message;
-  return router_->Send(wrapped_msg);
+  return router_->Send(new ViewHostMsg_ForwardToWorker(*message));
 }
 
 void WebSharedWorkerProxy::SendQueuedMessages() {
+  DCHECK(created_);
   DCHECK(queued_messages_.size());
-  std::vector<IPC::Message*> queued_messages = queued_messages_;
-  queued_messages_.clear();
+  std::vector<std::unique_ptr<IPC::Message>> queued_messages;
+  queued_messages.swap(queued_messages_);
   for (size_t i = 0; i < queued_messages.size(); ++i) {
     queued_messages[i]->set_routing_id(route_id_);
-    Send(queued_messages[i]);
+    Send(std::move(queued_messages[i]));
   }
 }
 
@@ -78,10 +73,11 @@
         static_cast<WebMessagePortChannelImpl*>(channel);
 
   int message_port_id = webchannel->message_port_id();
-  DCHECK(message_port_id != MSG_ROUTING_NONE);
+  DCHECK_NE(MSG_ROUTING_NONE, message_port_id);
   webchannel->QueueMessages();
 
-  Send(new WorkerMsg_Connect(route_id_, message_port_id, MSG_ROUTING_NONE));
+  Send(base::MakeUnique<WorkerMsg_Connect>(route_id_, message_port_id,
+                                           MSG_ROUTING_NONE));
   connect_listener_ = listener;
 }
 
diff --git a/content/renderer/websharedworker_proxy.h b/content/renderer/websharedworker_proxy.h
index cb6acb9..a1c74a3f 100644
--- a/content/renderer/websharedworker_proxy.h
+++ b/content/renderer/websharedworker_proxy.h
@@ -45,10 +45,7 @@
 
   // Sends a message to the worker thread (forwarded via the RenderViewHost).
   // If WorkerStarted() has not yet been called, message is queued.
-  bool Send(IPC::Message*);
-
-  // Returns true if there are queued messages.
-  bool HasQueuedMessages() { return !queued_messages_.empty(); }
+  bool Send(std::unique_ptr<IPC::Message> message);
 
   // Sends any messages currently in the queue.
   void SendQueuedMessages();
@@ -66,7 +63,7 @@
   IPC::MessageRouter* const router_;
 
   // Stores messages that were sent before the StartWorkerContext message.
-  std::vector<IPC::Message*> queued_messages_;
+  std::vector<std::unique_ptr<IPC::Message>> queued_messages_;
 
   ConnectListener* connect_listener_;
   bool created_;
diff --git a/ios/chrome/browser/reading_list/reading_list_web_state_observer.h b/ios/chrome/browser/reading_list/reading_list_web_state_observer.h
index 1c16afe..9a3a3faf 100644
--- a/ios/chrome/browser/reading_list/reading_list_web_state_observer.h
+++ b/ios/chrome/browser/reading_list/reading_list_web_state_observer.h
@@ -7,6 +7,7 @@
 
 #include "base/macros.h"
 #include "base/timer/timer.h"
+#include "components/reading_list/ios/reading_list_model_observer.h"
 #include "ios/web/public/web_state/web_state_observer.h"
 #include "url/gurl.h"
 
@@ -19,7 +20,8 @@
 // Observes the loading of pages coming from the reading list, determines
 // whether loading an offline version of the page is needed, and actually
 // trigger the loading of the offline page (if possible).
-class ReadingListWebStateObserver : public web::WebStateObserver {
+class ReadingListWebStateObserver : public web::WebStateObserver,
+                                    public ReadingListModelObserver {
  public:
   static ReadingListWebStateObserver* FromWebState(
       web::WebState* web_state,
@@ -27,6 +29,10 @@
 
   ~ReadingListWebStateObserver() override;
 
+  // ReadingListModelObserver implementation.
+  void ReadingListModelLoaded(const ReadingListModel* model) override;
+  void ReadingListModelBeingDeleted(const ReadingListModel* model) override;
+
  private:
   ReadingListWebStateObserver(web::WebState* web_state,
                               ReadingListModel* reading_list_model);
@@ -54,21 +60,23 @@
   // URL.
   bool ShouldObserveItem(web::NavigationItem* item) const;
 
-  // WebContentsObserver implementation.
-  void PageLoaded(
-      web::PageLoadCompletionStatus load_completion_status) override;
-  void WebStateDestroyed() override;
-
   // Starts checking that the current navigation is loading quickly enough [1].
   // If not, starts to load a distilled version of the page (if there is any).
   // [1] A page loading quickly enough is a page that has loaded 25% within
   // 1 second, 50% within 2 seconds and 75% within 3 seconds.
+  void StartCheckingLoading();
+
+  // WebContentsObserver implementation.
+  void PageLoaded(
+      web::PageLoadCompletionStatus load_completion_status) override;
+  void WebStateDestroyed() override;
   void DidStartLoading() override;
 
   ReadingListModel* reading_list_model_;
   std::unique_ptr<base::Timer> timer_;
   GURL pending_url_;
   int try_number_;
+  web::PageLoadCompletionStatus last_load_result_;
 
   DISALLOW_COPY_AND_ASSIGN(ReadingListWebStateObserver);
 };
diff --git a/ios/chrome/browser/reading_list/reading_list_web_state_observer.mm b/ios/chrome/browser/reading_list/reading_list_web_state_observer.mm
index cc079b7..6d2277e 100644
--- a/ios/chrome/browser/reading_list/reading_list_web_state_observer.mm
+++ b/ios/chrome/browser/reading_list/reading_list_web_state_observer.mm
@@ -73,13 +73,19 @@
       ->observer();
 }
 
-ReadingListWebStateObserver::~ReadingListWebStateObserver() {}
+ReadingListWebStateObserver::~ReadingListWebStateObserver() {
+  if (reading_list_model_) {
+    reading_list_model_->RemoveObserver(this);
+  }
+}
 
 ReadingListWebStateObserver::ReadingListWebStateObserver(
     web::WebState* web_state,
     ReadingListModel* reading_list_model)
     : web::WebStateObserver(web_state),
-      reading_list_model_(reading_list_model) {
+      reading_list_model_(reading_list_model),
+      last_load_result_(web::PageLoadCompletionStatus::SUCCESS) {
+  reading_list_model_->AddObserver(this);
   DCHECK(web_state);
   DCHECK(reading_list_model_);
 }
@@ -89,9 +95,8 @@
   if (!item) {
     return false;
   }
-  GURL loading_url = item->GetURL();
-  return !loading_url.SchemeIs(kChromeUIScheme) ||
-         loading_url.host() != kChromeUIOfflineHost;
+
+  return !reading_list::IsOfflineURL(item->GetURL());
 }
 
 bool ReadingListWebStateObserver::IsUrlAvailableOffline(const GURL& url) const {
@@ -99,8 +104,50 @@
   return entry && entry->DistilledState() == ReadingListEntry::PROCESSED;
 }
 
+void ReadingListWebStateObserver::ReadingListModelLoaded(
+    const ReadingListModel* model) {
+  DCHECK(model == reading_list_model_);
+  if (web_state()->IsLoading()) {
+    DidStartLoading();
+    return;
+  }
+  if (last_load_result_ == web::PageLoadCompletionStatus::SUCCESS ||
+      web_state()->IsShowingWebInterstitial()) {
+    return;
+  }
+  // An error page is being displayed.
+  web::NavigationManager* manager = web_state()->GetNavigationManager();
+  web::NavigationItem* item = manager->GetLastCommittedItem();
+  if (!ShouldObserveItem(item)) {
+    return;
+  }
+  const GURL& currentURL = item->GetVirtualURL();
+  if (IsUrlAvailableOffline(currentURL)) {
+    pending_url_ = currentURL;
+    LoadOfflineReadingListEntry(item);
+    StopCheckingProgress();
+  }
+}
+
+void ReadingListWebStateObserver::ReadingListModelBeingDeleted(
+    const ReadingListModel* model) {
+  DCHECK(model == reading_list_model_);
+  StopCheckingProgress();
+  reading_list_model_->RemoveObserver(this);
+  reading_list_model_ = nullptr;
+  web::WebState* local_web_state = web_state();
+  Observe(nullptr);
+  local_web_state->RemoveUserData(kObserverKey);
+}
+
 void ReadingListWebStateObserver::DidStartLoading() {
-  if (!reading_list_model_->loaded() || !web_state() ||
+  StartCheckingLoading();
+}
+
+void ReadingListWebStateObserver::StartCheckingLoading() {
+  DCHECK(reading_list_model_);
+  DCHECK(web_state());
+  if (!reading_list_model_->loaded() ||
       web_state()->IsShowingWebInterstitial()) {
     StopCheckingProgress();
     return;
@@ -141,6 +188,9 @@
 
 void ReadingListWebStateObserver::PageLoaded(
     web::PageLoadCompletionStatus load_completion_status) {
+  DCHECK(reading_list_model_);
+  DCHECK(web_state());
+  last_load_result_ = load_completion_status;
   web::NavigationItem* item =
       web_state()->GetNavigationManager()->GetLastCommittedItem();
   if (!item || !pending_url_.is_valid()) {
@@ -158,6 +208,10 @@
 
 void ReadingListWebStateObserver::WebStateDestroyed() {
   StopCheckingProgress();
+  if (reading_list_model_) {
+    reading_list_model_->RemoveObserver(this);
+    reading_list_model_ = nullptr;
+  }
   web_state()->RemoveUserData(kObserverKey);
 }
 
@@ -205,6 +259,7 @@
 void ReadingListWebStateObserver::LoadOfflineReadingListEntry(
     web::NavigationItem* item) {
   DCHECK(item);
+  DCHECK(reading_list_model_);
   if (!pending_url_.is_valid() || !IsUrlAvailableOffline(pending_url_)) {
     return;
   }
diff --git a/ios/chrome/browser/ui/reading_list/reading_list_menu_notifier.mm b/ios/chrome/browser/ui/reading_list/reading_list_menu_notifier.mm
index 47fb7a6..99d4d77 100644
--- a/ios/chrome/browser/ui/reading_list/reading_list_menu_notifier.mm
+++ b/ios/chrome/browser/ui/reading_list/reading_list_menu_notifier.mm
@@ -86,7 +86,7 @@
 
 - (void)readingListModelCompletedBatchUpdates:(const ReadingListModel*)model {
   [_delegate unreadCountChanged:model->unread_size()];
-  [_delegate unseenStateChanged:model->HasUnseenEntries()];
+  [_delegate unseenStateChanged:[self readingListUnseenItemsExist]];
 }
 
 - (NSInteger)readingListUnreadCount {
@@ -94,7 +94,7 @@
 }
 
 - (BOOL)readingListUnseenItemsExist {
-  return _readingListModel->HasUnseenEntries();
+  return _readingListModel->unseen_size() > 0;
 }
 
 @end
diff --git a/ios/chrome/browser/ui/reading_list/reading_list_view_controller.mm b/ios/chrome/browser/ui/reading_list/reading_list_view_controller.mm
index c8b8bdb..fbcced47 100644
--- a/ios/chrome/browser/ui/reading_list/reading_list_view_controller.mm
+++ b/ios/chrome/browser/ui/reading_list/reading_list_view_controller.mm
@@ -303,7 +303,6 @@
 #pragma mark - ReadingListModelBridgeObserver
 
 - (void)readingListModelLoaded:(const ReadingListModel*)model {
-  _readingListModel->ResetUnseenEntries();
   [self loadModel];
   UMA_HISTOGRAM_COUNTS_1000("ReadingList.Unread.Number", model->unread_size());
   UMA_HISTOGRAM_COUNTS_1000("ReadingList.Read.Number",
@@ -443,6 +442,7 @@
 }
 
 - (void)dismiss {
+  _readingListModel->MarkAllSeen();
   // Reset observer to prevent further model update notifications.
   _modelBridge.reset();
   [_actionSheet stop];
diff --git a/ios/chrome/browser/ui/toolbar/toolbar_model_delegate_ios.mm b/ios/chrome/browser/ui/toolbar/toolbar_model_delegate_ios.mm
index 9094134..e2f6d17b 100644
--- a/ios/chrome/browser/ui/toolbar/toolbar_model_delegate_ios.mm
+++ b/ios/chrome/browser/ui/toolbar/toolbar_model_delegate_ios.mm
@@ -13,6 +13,7 @@
 #include "ios/chrome/browser/browser_state/chrome_browser_state.h"
 #include "ios/chrome/browser/chrome_url_constants.h"
 #include "ios/chrome/browser/pref_names.h"
+#include "ios/chrome/browser/reading_list/offline_url_utils.h"
 #include "ios/chrome/browser/ssl/ios_security_state_tab_helper.h"
 #import "ios/chrome/browser/tabs/tab.h"
 #import "ios/chrome/browser/tabs/tab_model.h"
@@ -52,7 +53,25 @@
   web::NavigationItem* item = GetNavigationItem();
   if (!item)
     return false;
-  *url = ShouldDisplayURL() ? item->GetVirtualURL() : GURL();
+
+  if (!ShouldDisplayURL()) {
+    *url = GURL();
+    return true;
+  }
+
+  // For security reasons, we shouldn't display the https scheme and secure
+  // padlock when there's no active ssl session.
+  // To hide the scheme we set it http when the loaded url is offline.
+  if (reading_list::IsOfflineURL(item->GetURL()) &&
+      item->GetVirtualURL().SchemeIs(url::kHttpsScheme)) {
+    GURL::Replacements replacements;
+    replacements.SetScheme(url::kHttpScheme,
+                           url::Component(0, strlen(url::kHttpScheme)));
+    *url = item->GetVirtualURL().ReplaceComponents(replacements);
+    return true;
+  }
+
+  *url = item->GetVirtualURL();
   return true;
 }
 
diff --git a/third_party/WebKit/LayoutTests/TestExpectations b/third_party/WebKit/LayoutTests/TestExpectations
index b37d1c6..1cf6592 100644
--- a/third_party/WebKit/LayoutTests/TestExpectations
+++ b/third_party/WebKit/LayoutTests/TestExpectations
@@ -1805,7 +1805,8 @@
 crbug.com/626703 imported/csswg-test/css-display-3/display-contents-td-001.html [ Failure ]
 crbug.com/626703 imported/csswg-test/css-display-3/display-contents-tr-001.html [ Failure ]
 crbug.com/626703 imported/csswg-test/css-writing-modes-3/wm-propagation-body-008.xht [ Failure ]
-crbug.com/626703 [ Win10 ] imported/csswg-test/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-baseline-align-self-baseline-vert-001.html [ Failure ]
+crbug.com/626703 imported/csswg-test/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-baseline-align-self-baseline-vert-001.html [ Failure Pass ]
+crbug.com/626703 imported/csswg-test/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-baseline-multi-item-vert-001.html [ Failure Pass ]
 crbug.com/626703 imported/wpt/pointerevents/pointerevent_element_haspointercapture-manual.html [ Timeout Failure ]
 crbug.com/626703 imported/wpt/svg/linking/reftests/href-filter-element.html [ Failure ]
 crbug.com/626703 imported/wpt/web-animations/timing-model/animations/set-the-target-effect-of-an-animation.html [ Failure ]
diff --git a/third_party/WebKit/LayoutTests/fast/dom/idl-callback-function-unittest.html b/third_party/WebKit/LayoutTests/fast/dom/idl-callback-function-unittest.html
index 6626c4b..4fb9849 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/idl-callback-function-unittest.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/idl-callback-function-unittest.html
@@ -42,4 +42,16 @@
     assert_equals('4', results[1]);
     assert_equals('9', results[2]);
 }, 'Callback function which takes a number sequence');
+
+test(function() {
+    assert_throws(new TypeError(), function() {
+        callbackFunctionTest.testCallback(null, 'hello', 'world');
+    });
+    assert_throws(new TypeError(), function() {
+        callbackFunctionTest.testCallback({}, 'hello', 'world');
+    });
+    assert_throws(new TypeError(), function() {
+        callbackFunctionTest.testCallback(1, 'hello', 'world');
+    });
+}, 'Passing non-callable values should throw a TypeError');
 </script>
diff --git a/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl
index 9d3e726..a4fb9761 100644
--- a/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl
+++ b/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl
@@ -177,7 +177,7 @@
 {% endif %}{# argument.is_optional #}
 {% endif %}{# argument.idl_type == 'EventListener' #}
 {% elif argument.is_callback_function %}
-if (!info[{{argument.index}}]->IsFunction(){% if argument.is_nullable %} && !info[{{argument.index}}]->IsNull(){% endif %}) {
+if (!info[{{argument.index}}]->IsObject() || !v8::Local<v8::Object>::Cast(info[{{argument.index}}])->IsCallable()) {
   {{throw_argument_error(method, argument, "The callback provided as parameter %(index)d is not a function.")}}
   return;
 }
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestCallbackFunctions.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestCallbackFunctions.cpp
index 586d88f..37e7fc4c 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestCallbackFunctions.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestCallbackFunctions.cpp
@@ -153,7 +153,7 @@
   }
 
   VoidCallbackFunction* voidCallbackFunctionArg;
-  if (!info[0]->IsFunction()) {
+  if (!info[0]->IsObject() || !v8::Local<v8::Object>::Cast(info[0])->IsCallable()) {
     V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodCallbackFunctionInArg", "TestCallbackFunctions", "The callback provided as parameter 1 is not a function."));
 
     return;
@@ -176,7 +176,7 @@
   }
 
   AnyCallbackFunctionOptionalAnyArg* anyCallbackFunctionOptionalAnyArgArg;
-  if (!info[0]->IsFunction()) {
+  if (!info[0]->IsObject() || !v8::Local<v8::Object>::Cast(info[0])->IsCallable()) {
     V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodCallbackFunctionInArg2", "TestCallbackFunctions", "The callback provided as parameter 1 is not a function."));
 
     return;
@@ -199,7 +199,7 @@
   }
 
   LongCallbackFunction* longCallbackFunctionArg;
-  if (!info[0]->IsFunction()) {
+  if (!info[0]->IsObject() || !v8::Local<v8::Object>::Cast(info[0])->IsCallable()) {
     V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodCallbackFunctionWithReturnValueInArg", "TestCallbackFunctions", "The callback provided as parameter 1 is not a function."));
 
     return;
@@ -227,7 +227,7 @@
     impl->voidMethodOptionalCallbackFunctionInArg();
     return;
   }
-  if (!info[0]->IsFunction()) {
+  if (!info[0]->IsObject() || !v8::Local<v8::Object>::Cast(info[0])->IsCallable()) {
     V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodOptionalCallbackFunctionInArg", "TestCallbackFunctions", "The callback provided as parameter 1 is not a function."));
 
     return;
@@ -250,7 +250,7 @@
   }
 
   VoidCallbackFunction* voidCallbackFunctionArg;
-  if (!info[0]->IsFunction() && !info[0]->IsNull()) {
+  if (!info[0]->IsObject() || !v8::Local<v8::Object>::Cast(info[0])->IsCallable()) {
     V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodNullableCallbackFunctionInArg", "TestCallbackFunctions", "The callback provided as parameter 1 is not a function."));
 
     return;
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp
index 9da29cb..8aca169 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp
@@ -2158,7 +2158,7 @@
   }
 
   ScriptValue partialCallbackTypeArg;
-  if (!info[0]->IsFunction()) {
+  if (!info[0]->IsObject() || !v8::Local<v8::Object>::Cast(info[0])->IsCallable()) {
     V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("partialVoidMethodPartialCallbackTypeArg", "TestInterface", "The callback provided as parameter 1 is not a function."));
 
     return;
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp
index ce7adbc..562573a 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp
@@ -332,7 +332,7 @@
 
   ScriptValue callback;
   ScriptValue thisArg;
-  if (!info[0]->IsFunction()) {
+  if (!info[0]->IsObject() || !v8::Local<v8::Object>::Cast(info[0])->IsCallable()) {
     exceptionState.throwTypeError("The callback provided as parameter 1 is not a function.");
 
     return;
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface3.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface3.cpp
index 1ce1d3f..9298bd7 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface3.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface3.cpp
@@ -161,7 +161,7 @@
 
   ScriptValue callback;
   ScriptValue thisArg;
-  if (!info[0]->IsFunction()) {
+  if (!info[0]->IsObject() || !v8::Local<v8::Object>::Cast(info[0])->IsCallable()) {
     exceptionState.throwTypeError("The callback provided as parameter 1 is not a function.");
 
     return;
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.cpp
index f84cc26..d3c0019 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.cpp
@@ -184,7 +184,7 @@
 
   ScriptValue callback;
   ScriptValue thisArg;
-  if (!info[0]->IsFunction()) {
+  if (!info[0]->IsObject() || !v8::Local<v8::Object>::Cast(info[0])->IsCallable()) {
     exceptionState.throwTypeError("The callback provided as parameter 1 is not a function.");
 
     return;
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp
index 93ea4d4b..84d17c0c 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp
@@ -8598,7 +8598,7 @@
   TestObject* impl = V8TestObject::toImpl(info.Holder());
 
   ScriptValue functionArg;
-  if (!info[0]->IsFunction()) {
+  if (!info[0]->IsObject() || !v8::Local<v8::Object>::Cast(info[0])->IsCallable()) {
     V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("overloadedMethodK", "TestObject", "The callback provided as parameter 1 is not a function."));
 
     return;
@@ -10834,7 +10834,7 @@
 
   ScriptValue callback;
   ScriptValue thisArg;
-  if (!info[0]->IsFunction()) {
+  if (!info[0]->IsObject() || !v8::Local<v8::Object>::Cast(info[0])->IsCallable()) {
     exceptionState.throwTypeError("The callback provided as parameter 1 is not a function.");
 
     return;
diff --git a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp
index 4e1c16e..4e063d2 100644
--- a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp
@@ -581,7 +581,7 @@
   }
 
   VoidCallbackFunctionModules* arg;
-  if (!info[0]->IsFunction()) {
+  if (!info[0]->IsObject() || !v8::Local<v8::Object>::Cast(info[0])->IsCallable()) {
     V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodVoidCallbackFunctionModulesArg", "TestInterface5", "The callback provided as parameter 1 is not a function."));
 
     return;
@@ -663,7 +663,7 @@
 
   ScriptValue callback;
   ScriptValue thisArg;
-  if (!info[0]->IsFunction()) {
+  if (!info[0]->IsObject() || !v8::Local<v8::Object>::Cast(info[0])->IsCallable()) {
     exceptionState.throwTypeError("The callback provided as parameter 1 is not a function.");
 
     return;
diff --git a/third_party/WebKit/Source/modules/fetch/Body.cpp b/third_party/WebKit/Source/modules/fetch/Body.cpp
index eeffbb1..b168fb3 100644
--- a/third_party/WebKit/Source/modules/fetch/Body.cpp
+++ b/third_party/WebKit/Source/modules/fetch/Body.cpp
@@ -224,7 +224,7 @@
   return bodyBuffer()->hasPendingActivity();
 }
 
-Body::Body(ExecutionContext* context) : ContextLifecycleObserver(context) {}
+Body::Body(ExecutionContext* context) : ContextClient(context) {}
 
 ScriptPromise Body::rejectInvalidConsumption(ScriptState* scriptState) {
   if (isBodyLocked() || bodyUsed())
diff --git a/third_party/WebKit/Source/modules/fetch/Body.h b/third_party/WebKit/Source/modules/fetch/Body.h
index 8369aef4..b7f07b0a 100644
--- a/third_party/WebKit/Source/modules/fetch/Body.h
+++ b/third_party/WebKit/Source/modules/fetch/Body.h
@@ -30,7 +30,7 @@
 class MODULES_EXPORT Body : public GarbageCollected<Body>,
                             public ScriptWrappable,
                             public ActiveScriptWrappable<Body>,
-                            public ContextLifecycleObserver {
+                            public ContextClient {
   WTF_MAKE_NONCOPYABLE(Body);
   DEFINE_WRAPPERTYPEINFO();
   USING_GARBAGE_COLLECTED_MIXIN(Body);
@@ -53,7 +53,7 @@
   // ScriptWrappable override.
   bool hasPendingActivity() const override;
 
-  DEFINE_INLINE_VIRTUAL_TRACE() { ContextLifecycleObserver::trace(visitor); }
+  DEFINE_INLINE_VIRTUAL_TRACE() { ContextClient::trace(visitor); }
 
  private:
   virtual String mimeType() const = 0;
diff --git a/third_party/WebKit/Source/web/SharedWorkerRepositoryClientImpl.cpp b/third_party/WebKit/Source/web/SharedWorkerRepositoryClientImpl.cpp
index 7ed68f5..7a1414cd 100644
--- a/third_party/WebKit/Source/web/SharedWorkerRepositoryClientImpl.cpp
+++ b/third_party/WebKit/Source/web/SharedWorkerRepositoryClientImpl.cpp
@@ -52,6 +52,7 @@
 #include "web/WebLocalFrameImpl.h"
 #include "wtf/PtrUtil.h"
 #include <memory>
+#include <utility>
 
 namespace blink {
 
@@ -62,13 +63,9 @@
  public:
   SharedWorkerConnector(
       SharedWorker* worker,
-      const KURL& url,
-      const String& name,
       WebMessagePortChannelUniquePtr channel,
       std::unique_ptr<WebSharedWorkerConnector> webWorkerConnector)
       : m_worker(worker),
-        m_url(url),
-        m_name(name),
         m_webWorkerConnector(std::move(webWorkerConnector)),
         m_channel(std::move(channel)) {}
 
@@ -81,8 +78,6 @@
   void scriptLoadFailed() override;
 
   Persistent<SharedWorker> m_worker;
-  KURL m_url;
-  String m_name;
   std::unique_ptr<WebSharedWorkerConnector> m_webWorkerConnector;
   WebMessagePortChannelUniquePtr m_channel;
 };
@@ -146,14 +141,17 @@
   WebWorkerCreationError creationError;
   bool isSecureContext = worker->getExecutionContext()->isSecureContext();
   std::unique_ptr<WebSharedWorkerConnector> webWorkerConnector =
-      WTF::wrapUnique(m_client->createSharedWorkerConnector(
+      m_client->createSharedWorkerConnector(
           url, name, getId(document), header, headerType,
           worker->getExecutionContext()->securityContext().addressSpace(),
           isSecureContext ? WebSharedWorkerCreationContextTypeSecure
                           : WebSharedWorkerCreationContextTypeNonsecure,
-          &creationError));
-  if (creationError != WebWorkerCreationErrorNone) {
-    if (creationError == WebWorkerCreationErrorURLMismatch) {
+          &creationError);
+
+  switch (creationError) {
+    case WebWorkerCreationErrorNone:
+      break;
+    case WebWorkerCreationErrorURLMismatch:
       // Existing worker does not match this url, so return an error back to the
       // caller.
       exceptionState.throwDOMException(
@@ -161,23 +159,19 @@
                                 "' does not exactly match the provided URL ('" +
                                 url.elidedString() + "').");
       return;
-    } else if (creationError == WebWorkerCreationErrorSecureContextMismatch) {
-      if (isSecureContext) {
-        UseCounter::count(
-            document,
-            UseCounter::NonSecureSharedWorkerAccessedFromSecureContext);
-      } else {
-        UseCounter::count(
-            document,
-            UseCounter::SecureSharedWorkerAccessedFromNonSecureContext);
-      }
-    }
+    case WebWorkerCreationErrorSecureContextMismatch:
+      UseCounter::Feature feature =
+          isSecureContext
+              ? UseCounter::NonSecureSharedWorkerAccessedFromSecureContext
+              : UseCounter::SecureSharedWorkerAccessedFromNonSecureContext;
+      UseCounter::count(document, feature);
+      break;
   }
 
   // The connector object manages its own lifecycle (and the lifecycles of the
   // two worker objects).  It will free itself once connecting is completed.
   SharedWorkerConnector* connector = new SharedWorkerConnector(
-      worker, url, name, std::move(port), std::move(webWorkerConnector));
+      worker, std::move(port), std::move(webWorkerConnector));
   connector->connect();
 }
 
diff --git a/third_party/WebKit/public/web/WebSharedWorkerRepositoryClient.h b/third_party/WebKit/public/web/WebSharedWorkerRepositoryClient.h
index 97a9897b..b398de0 100644
--- a/third_party/WebKit/public/web/WebSharedWorkerRepositoryClient.h
+++ b/third_party/WebKit/public/web/WebSharedWorkerRepositoryClient.h
@@ -35,6 +35,7 @@
 #include "WebSharedWorkerCreationContextType.h"
 #include "WebSharedWorkerCreationErrors.h"
 #include "public/platform/WebAddressSpace.h"
+#include <memory>
 
 namespace blink {
 
@@ -46,10 +47,10 @@
  public:
   // Unique identifier for the parent document of a worker (unique within a
   // given process).
-  typedef unsigned long long DocumentID;
+  using DocumentID = unsigned long long;
 
   // Creates a new shared worker connector. This may return null.
-  virtual WebSharedWorkerConnector* createSharedWorkerConnector(
+  virtual std::unique_ptr<WebSharedWorkerConnector> createSharedWorkerConnector(
       const WebURL& url,
       const WebString& name,
       DocumentID id,
@@ -58,7 +59,7 @@
       WebAddressSpace,
       WebSharedWorkerCreationContextType,
       WebWorkerCreationError* error) {
-    return 0;
+    return nullptr;
   }
 
   // Invoked when a document has been detached. DocumentID can be re-used after
diff --git a/ui/file_manager/audio_player/js/compiled_resources2.gyp b/ui/file_manager/audio_player/js/compiled_resources2.gyp
index 73a45278..933243aa 100644
--- a/ui/file_manager/audio_player/js/compiled_resources2.gyp
+++ b/ui/file_manager/audio_player/js/compiled_resources2.gyp
@@ -19,9 +19,5 @@
       'target_name': 'metadata_worker',
       'includes': ['../../compile_js2.gypi'],
     },
-#    {
-#      'target_name': 'test_util',
-#      'includes': ['../../compile_js2.gypi'],
-#    },
   ],
 }
diff --git a/ui/file_manager/compiled_resources2.gyp b/ui/file_manager/compiled_resources2.gyp
index 463b537..bbb8a9c 100644
--- a/ui/file_manager/compiled_resources2.gyp
+++ b/ui/file_manager/compiled_resources2.gyp
@@ -9,6 +9,7 @@
       'dependencies': [
         'audio_player/js/compiled_resources2.gyp:*',
         'file_manager/background/js/compiled_resources2.gyp:*',
+        'file_manager/common/js/compiled_resources2.gyp:*',
         'file_manager/foreground/js/compiled_resources2.gyp:*',
         'gallery/js/compiled_resources2.gyp:*',
         'video_player/js/compiled_resources2.gyp:*',
diff --git a/ui/file_manager/externs/background_window.js b/ui/file_manager/externs/background_window.js
new file mode 100644
index 0000000..e6e8322
--- /dev/null
+++ b/ui/file_manager/externs/background_window.js
@@ -0,0 +1,28 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+/**
+ * @constructor
+ * @extends {Window}
+ */
+var BackgroundWindow = function() {};
+
+/**
+ * @type {FileBrowserBackground}
+ */
+BackgroundWindow.prototype.background;
+
+/**
+ * @param {Window} window
+ */
+BackgroundWindow.prototype.registerDialog = function(window) {};
+
+/**
+ * @param {Object=} opt_appState App state.
+ * @param {number=} opt_id Window id.
+ * @param {LaunchType=} opt_type Launch type. Default: ALWAYS_CREATE.
+ * @param {function(string)=} opt_callback Completion callback with the App ID.
+ */
+BackgroundWindow.prototype.launchFileManager =
+    function(opt_appState, opt_id, opt_type, opt_callback) {};
\ No newline at end of file
diff --git a/ui/file_manager/externs/compiled_resources2.gyp b/ui/file_manager/externs/compiled_resources2.gyp
index 9de99e4..1ff75bdb 100644
--- a/ui/file_manager/externs/compiled_resources2.gyp
+++ b/ui/file_manager/externs/compiled_resources2.gyp
@@ -8,6 +8,10 @@
       'includes': ['../../../third_party/closure_compiler/include_js.gypi'],
     },
     {
+      'target_name': 'background_window',
+      'includes': ['../../../third_party/closure_compiler/include_js.gypi'],
+    },
+    {
       'target_name': 'chrome_cast',
       'includes': ['../../../third_party/closure_compiler/include_js.gypi'],
     },
@@ -36,6 +40,14 @@
       'includes': ['../../../third_party/closure_compiler/include_js.gypi'],
     },
     {
+      'target_name': 'directory_change_event',
+      'includes': ['../../../third_party/closure_compiler/include_js.gypi'],
+    },
+    {
+      'target_name': 'entries_changed_event',
+      'includes': ['../../../third_party/closure_compiler/include_js.gypi'],
+    },
+    {
       'target_name': 'es6_workaround',
       'includes': ['../../../third_party/closure_compiler/include_js.gypi'],
     },
@@ -44,6 +56,10 @@
       'includes': ['../../../third_party/closure_compiler/include_js.gypi'],
     },
     {
+      'target_name': 'file_operation_progress_event',
+      'includes': ['../../../third_party/closure_compiler/include_js.gypi'],
+    },
+    {
       'target_name': 'files_elements',
       'includes': ['../../../third_party/closure_compiler/include_js.gypi'],
     },
diff --git a/ui/file_manager/externs/directory_change_event.js b/ui/file_manager/externs/directory_change_event.js
new file mode 100644
index 0000000..d4062689
--- /dev/null
+++ b/ui/file_manager/externs/directory_change_event.js
@@ -0,0 +1,19 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+/**
+ * @constructor
+ * @extends {Event}
+ * @struct
+ */
+var DirectoryChangeEvent = function() {};
+
+/** @type {DirectoryEntry} */
+DirectoryChangeEvent.prototype.previousDirEntry;
+
+/** @type {DirectoryEntry|FakeEntry} */
+DirectoryChangeEvent.prototype.newDirEntry;
+
+/** @type {boolean} */
+DirectoryChangeEvent.prototype.volumeChanged;
\ No newline at end of file
diff --git a/ui/file_manager/externs/entries_changed_event.js b/ui/file_manager/externs/entries_changed_event.js
new file mode 100644
index 0000000..b646bfa
--- /dev/null
+++ b/ui/file_manager/externs/entries_changed_event.js
@@ -0,0 +1,15 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+/**
+ * @constructor
+ * @extends {Event}
+ */
+var EntriesChangedEvent = function() {};
+
+/** @type {util.EntryChangedKind} */
+EntriesChangedEvent.prototype.kind;
+
+/** @type {Array<!Entry>} */
+EntriesChangedEvent.prototype.entries;
\ No newline at end of file
diff --git a/ui/file_manager/externs/file_operation_progress_event.js b/ui/file_manager/externs/file_operation_progress_event.js
new file mode 100644
index 0000000..6561d1f
--- /dev/null
+++ b/ui/file_manager/externs/file_operation_progress_event.js
@@ -0,0 +1,15 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+/**
+ * @constructor
+ * @extends {Event}
+ */
+var FileOperationProgressEvent = function() {};
+
+/** @type {fileOperationUtil.EventRouter.EventType} */
+FileOperationProgressEvent.prototype.reason;
+
+/** @type {(fileOperationUtil.Error|undefined)} */
+FileOperationProgressEvent.prototype.error;
\ No newline at end of file
diff --git a/ui/file_manager/file_manager/background/js/compiled_resources.gyp b/ui/file_manager/file_manager/background/js/compiled_resources.gyp
index 2fdda44..98de969 100644
--- a/ui/file_manager/file_manager/background/js/compiled_resources.gyp
+++ b/ui/file_manager/file_manager/background/js/compiled_resources.gyp
@@ -63,13 +63,13 @@
           '../../../externs/css_rule.js',
           '../../../externs/entry_location.js',
           '../../../externs/es6_workaround.js',
+          '../../../externs/file_operation_progress_event.js',
           '../../../externs/launcher_search_provider.js',
           '../../../externs/webview_tag.js',
           '../../../externs/platform.js',
           '../../../externs/volume_info.js',
           '../../../externs/volume_info_list.js',
           '../../../externs/volume_manager.js',
-          '../../common/js/externs.js',
         ],
       },
       'includes': [
diff --git a/ui/file_manager/file_manager/background/js/compiled_resources2.gyp b/ui/file_manager/file_manager/background/js/compiled_resources2.gyp
index 6039415..809df59 100644
--- a/ui/file_manager/file_manager/background/js/compiled_resources2.gyp
+++ b/ui/file_manager/file_manager/background/js/compiled_resources2.gyp
@@ -20,10 +20,6 @@
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'device_handler_unittest',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'drive_sync_handler',
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
@@ -32,26 +28,14 @@
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'duplicate_finder_unittest',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'file_operation_handler',
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'file_operation_handler_unittest',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'file_operation_manager',
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'file_operation_manager_unittest',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'file_operation_util',
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
@@ -60,10 +44,6 @@
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'import_history_unittest',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'launcher_search',
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
@@ -72,18 +52,10 @@
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'media_import_handler_unittest',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'media_scanner',
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'media_scanner_unittest',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'mock_background',
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
@@ -112,10 +84,6 @@
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'task_queue_unittest',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'test_duplicate_finder',
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
@@ -135,9 +103,5 @@
 #      'target_name': 'volume_manager',
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
-#    {
-#      'target_name': 'volume_manager_unittest',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
   ],
 }
diff --git a/ui/file_manager/file_manager/common/js/compiled_resources2.gyp b/ui/file_manager/file_manager/common/js/compiled_resources2.gyp
index 2cf41d8..60b3ad1 100644
--- a/ui/file_manager/file_manager/common/js/compiled_resources2.gyp
+++ b/ui/file_manager/file_manager/common/js/compiled_resources2.gyp
@@ -3,42 +3,26 @@
 # found in the LICENSE file.
 {
   'targets': [
-#    {
-#      'target_name': 'async_util',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
-#    {
-#      'target_name': 'async_util_unittest',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
-#    {
-#      'target_name': 'error_util',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
-#    {
-#      'target_name': 'externs',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
-#    {
-#      'target_name': 'file_type',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
+    {
+      'target_name': 'async_util',
+      'includes': ['../../../compile_js2.gypi'],
+    },
+    {
+      'target_name': 'error_util',
+      'includes': ['../../../compile_js2.gypi'],
+    },
+    {
+      'target_name': 'file_type',
+      'includes': ['../../../compile_js2.gypi'],
+    },
 #    {
 #      'target_name': 'importer_common',
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
-#    {
-#      'target_name': 'importer_common_unittest',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
-#    {
-#      'target_name': 'lru_cache',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
-#    {
-#      'target_name': 'lru_cache_unittest',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
+    {
+      'target_name': 'lru_cache',
+      'includes': ['../../../compile_js2.gypi'],
+    },
 #    {
 #      'target_name': 'metrics',
 #      'includes': ['../../../compile_js2.gypi'],
@@ -52,14 +36,6 @@
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'metrics_unittest',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
-#    {
-#      'target_name': 'mock_entry',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'progress_center_common',
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
@@ -68,14 +44,6 @@
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'test_tracker',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
-#    {
-#      'target_name': 'unittest_util',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'util',
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
diff --git a/ui/file_manager/file_manager/common/js/externs.js b/ui/file_manager/file_manager/common/js/externs.js
deleted file mode 100644
index 681dbc8..0000000
--- a/ui/file_manager/file_manager/common/js/externs.js
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// TODO(yawano): Move all externs under ui/file_manager/externs.
-
-/**
- * @constructor
- * @extends {Window}
- */
-var BackgroundWindow = function() {};
-
-/**
- * @type {FileBrowserBackground}
- */
-BackgroundWindow.prototype.background;
-
-/**
- * @param {Window} window
- */
-BackgroundWindow.prototype.registerDialog = function(window) {};
-
-/**
- * @param {Object=} opt_appState App state.
- * @param {number=} opt_id Window id.
- * @param {LaunchType=} opt_type Launch type. Default: ALWAYS_CREATE.
- * @param {function(string)=} opt_callback Completion callback with the App ID.
- */
-BackgroundWindow.prototype.launchFileManager =
-    function(opt_appState, opt_id, opt_type, opt_callback) {};
-
-
-/**
- * @constructor
- * @extends {Event}
- */
-var FileOperationProgressEvent = function() {};
-
-/** @type {fileOperationUtil.EventRouter.EventType} */
-FileOperationProgressEvent.prototype.reason;
-
-/** @type {(fileOperationUtil.Error|undefined)} */
-FileOperationProgressEvent.prototype.error;
-
-
-/**
- * @constructor
- * @extends {Event}
- */
-var EntriesChangedEvent = function() {};
-
-/** @type {util.EntryChangedKind} */
-EntriesChangedEvent.prototype.kind;
-
-/** @type {Array<!Entry>} */
-EntriesChangedEvent.prototype.entries;
-
-/**
- * @constructor
- * @extends {Event}
- * @struct
- */
-var DirectoryChangeEvent = function() {};
-
-/** @type {DirectoryEntry} */
-DirectoryChangeEvent.prototype.previousDirEntry;
-
-/** @type {DirectoryEntry|FakeEntry} */
-DirectoryChangeEvent.prototype.newDirEntry;
-
-/** @type {boolean} */
-DirectoryChangeEvent.prototype.volumeChanged;
diff --git a/ui/file_manager/file_manager/common/js/lru_cache_unittest.js b/ui/file_manager/file_manager/common/js/lru_cache_unittest.js
index 8365669..e991b40 100644
--- a/ui/file_manager/file_manager/common/js/lru_cache_unittest.js
+++ b/ui/file_manager/file_manager/common/js/lru_cache_unittest.js
@@ -116,6 +116,7 @@
   assertEquals(8, cache.size());
 }
 
+/** @constructor */
 function RandomNumberGenerator(seed) {
   this.x = seed;
 }
diff --git a/ui/file_manager/file_manager/foreground/js/compiled_resources.gyp b/ui/file_manager/file_manager/foreground/js/compiled_resources.gyp
index cad72ef4..ee3a0b4 100644
--- a/ui/file_manager/file_manager/foreground/js/compiled_resources.gyp
+++ b/ui/file_manager/file_manager/foreground/js/compiled_resources.gyp
@@ -167,14 +167,17 @@
           '<(EXTERNS_DIR)/file_manager_private.js',
           '<(EXTERNS_DIR)/metrics_private.js',
           '../../../../../third_party/analytics/externs.js',
+          '../../../externs/background_window.js',
           '../../../externs/background_window_common.js',
           '../../../externs/chrome_echo_private.js',
           '../../../externs/chrome_webstore_widget_private.js',
           '../../../externs/chrome_test.js',
           '../../../externs/connection.js',
           '../../../externs/css_rule.js',
+          '../../../externs/directory_change_event.js',
           '../../../externs/entry_location.js',
           '../../../externs/es6_workaround.js',
+          '../../../externs/file_operation_progress_event.js',
           '../../../externs/html_menu_item_element.js',
           '../../../externs/launcher_search_provider.js',
           '../../../externs/webview_tag.js',
@@ -183,7 +186,6 @@
           '../../../externs/volume_info.js',
           '../../../externs/volume_info_list.js',
           '../../../externs/volume_manager.js',
-          '../../common/js/externs.js',
         ],
       },
       'includes': [
diff --git a/ui/file_manager/file_manager/foreground/js/compiled_resources2.gyp b/ui/file_manager/file_manager/foreground/js/compiled_resources2.gyp
index 7a9c35e..5324e57 100644
--- a/ui/file_manager/file_manager/foreground/js/compiled_resources2.gyp
+++ b/ui/file_manager/file_manager/foreground/js/compiled_resources2.gyp
@@ -12,10 +12,6 @@
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'actions_model_unittest',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'app_state_controller',
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
@@ -56,10 +52,6 @@
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'file_list_model_unittest',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'file_manager',
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
@@ -76,10 +68,6 @@
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'file_tasks_unittest',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'file_transfer_controller',
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
@@ -99,10 +87,6 @@
 #      'target_name': 'import_controller',
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
-#    {
-#      'target_name': 'import_controller_unittest',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
     {
       'target_name': 'launch_param',
       'dependencies': [
@@ -116,10 +100,6 @@
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'list_thumbnail_loader_unittest',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'main',
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
@@ -144,26 +124,6 @@
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'mock_actions_model',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
-#    {
-#      'target_name': 'mock_directory_model',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
-#    {
-#      'target_name': 'mock_folder_shortcut_data_model',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
-#    {
-#      'target_name': 'mock_navigation_list_model',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
-#    {
-#      'target_name': 'mock_thumbnail_loader',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'mouse_inactivity_watcher',
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
@@ -176,26 +136,14 @@
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'navigation_list_model_unittest',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'progress_center_item_group',
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'progress_center_item_group_unittest',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'providers_model',
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'providers_model_unittest',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'quick_view_controller',
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
@@ -228,26 +176,14 @@
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'spinner_controller_unittest',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'task_controller',
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'task_controller_unittest',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'thumbnail_loader',
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'thumbnail_loader_unittest',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'toolbar_controller',
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
diff --git a/ui/file_manager/file_manager/foreground/js/metadata/compiled_resources2.gyp b/ui/file_manager/file_manager/foreground/js/metadata/compiled_resources2.gyp
index 55a28f9..3b23f8366 100644
--- a/ui/file_manager/file_manager/foreground/js/metadata/compiled_resources2.gyp
+++ b/ui/file_manager/file_manager/foreground/js/metadata/compiled_resources2.gyp
@@ -12,10 +12,6 @@
 #      'includes': ['../../../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'content_metadata_provider_unittest',
-#      'includes': ['../../../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'exif_constants',
 #      'includes': ['../../../../compile_js2.gypi'],
 #    },
@@ -24,26 +20,14 @@
 #      'includes': ['../../../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'exif_parser_unittest',
-#      'includes': ['../../../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'external_metadata_provider',
 #      'includes': ['../../../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'external_metadata_provider_unittest',
-#      'includes': ['../../../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'file_system_metadata_provider',
 #      'includes': ['../../../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'file_system_metadata_provider_unittest',
-#      'includes': ['../../../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'function_parallel',
 #      'includes': ['../../../../compile_js2.gypi'],
 #    },
@@ -60,10 +44,6 @@
 #      'includes': ['../../../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'image_orientation_unittest',
-#      'includes': ['../../../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'image_parsers',
 #      'includes': ['../../../../compile_js2.gypi'],
 #    },
@@ -72,18 +52,10 @@
 #      'includes': ['../../../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'metadata_cache_item_unittest',
-#      'includes': ['../../../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'metadata_cache_set',
 #      'includes': ['../../../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'metadata_cache_set_unittest',
-#      'includes': ['../../../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'metadata_dispatcher',
 #      'includes': ['../../../../compile_js2.gypi'],
 #    },
@@ -96,10 +68,6 @@
 #      'includes': ['../../../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'metadata_model_unittest',
-#      'includes': ['../../../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'metadata_parser',
 #      'includes': ['../../../../compile_js2.gypi'],
 #    },
@@ -112,10 +80,6 @@
 #      'includes': ['../../../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'multi_metadata_provider_unittest',
-#      'includes': ['../../../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'new_metadata_provider',
 #      'includes': ['../../../../compile_js2.gypi'],
 #    },
@@ -123,9 +87,5 @@
 #      'target_name': 'thumbnail_model',
 #      'includes': ['../../../../compile_js2.gypi'],
 #    },
-#    {
-#      'target_name': 'thumbnail_model_unittest',
-#      'includes': ['../../../../compile_js2.gypi'],
-#    },
   ],
 }
diff --git a/ui/file_manager/file_manager/foreground/js/ui/compiled_resources2.gyp b/ui/file_manager/file_manager/foreground/js/ui/compiled_resources2.gyp
index daa682e..3d65fab 100644
--- a/ui/file_manager/file_manager/foreground/js/ui/compiled_resources2.gyp
+++ b/ui/file_manager/file_manager/foreground/js/ui/compiled_resources2.gyp
@@ -8,10 +8,6 @@
 #      'includes': ['../../../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'actions_submenu_unittest',
-#      'includes': ['../../../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'banners',
 #      'includes': ['../../../../compile_js2.gypi'],
 #    },
@@ -36,10 +32,6 @@
 #      'includes': ['../../../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'directory_tree_unittest',
-#      'includes': ['../../../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'drag_selector',
 #      'includes': ['../../../../compile_js2.gypi'],
 #    },
@@ -80,10 +72,6 @@
 #      'includes': ['../../../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'file_table_unittest',
-#      'includes': ['../../../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'files_alert_dialog',
 #      'includes': ['../../../../compile_js2.gypi'],
 #    },
diff --git a/ui/file_manager/gallery/js/compiled_resources2.gyp b/ui/file_manager/gallery/js/compiled_resources2.gyp
index f5be3c8..ce84252 100644
--- a/ui/file_manager/gallery/js/compiled_resources2.gyp
+++ b/ui/file_manager/gallery/js/compiled_resources2.gyp
@@ -12,18 +12,10 @@
 #      'includes': ['../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'dimmable_ui_controller_unittest',
-#      'includes': ['../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'entry_list_watcher',
 #      'includes': ['../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'entry_list_watcher_unittest',
-#      'includes': ['../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'error_banner',
 #      'includes': ['../../compile_js2.gypi'],
 #    },
@@ -36,18 +28,10 @@
 #      'includes': ['../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'gallery_data_model_unittest',
-#      'includes': ['../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'gallery_item',
 #      'includes': ['../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'gallery_item_unittest',
-#      'includes': ['../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'gallery_scripts',
 #      'includes': ['../../compile_js2.gypi'],
 #    },
@@ -56,10 +40,6 @@
 #      'includes': ['../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'gallery_util_unittest',
-#      'includes': ['../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'metadata_worker',
 #      'includes': ['../../compile_js2.gypi'],
 #    },
@@ -68,22 +48,10 @@
 #      'includes': ['../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'ribbon_unittest',
-#      'includes': ['../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'slide_mode',
 #      'includes': ['../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'slide_mode_unittest',
-#      'includes': ['../../compile_js2.gypi'],
-#    },
-#    {
-#      'target_name': 'test_util',
-#      'includes': ['../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'thumbnail_mode',
 #      'includes': ['../../compile_js2.gypi'],
 #    },
diff --git a/ui/file_manager/gallery/js/image_editor/compiled_resources2.gyp b/ui/file_manager/gallery/js/image_editor/compiled_resources2.gyp
index eea02b0..255bb3dc 100644
--- a/ui/file_manager/gallery/js/image_editor/compiled_resources2.gyp
+++ b/ui/file_manager/gallery/js/image_editor/compiled_resources2.gyp
@@ -12,10 +12,6 @@
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'exif_encoder_unittest',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'filter',
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
@@ -36,10 +32,6 @@
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'image_encoder_unittest',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'image_transform',
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
@@ -52,10 +44,6 @@
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'image_view_unittest',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'test_util',
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
diff --git a/ui/file_manager/image_loader/compiled_resources2.gyp b/ui/file_manager/image_loader/compiled_resources2.gyp
index 5899e43..33876c5 100644
--- a/ui/file_manager/image_loader/compiled_resources2.gyp
+++ b/ui/file_manager/image_loader/compiled_resources2.gyp
@@ -12,10 +12,6 @@
 #      'includes': ['../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'cache_unittest',
-#      'includes': ['../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'image_loader',
 #      'includes': ['../compile_js2.gypi'],
 #    },
@@ -24,14 +20,6 @@
 #      'includes': ['../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'image_loader_client_unittest',
-#      'includes': ['../compile_js2.gypi'],
-#    },
-#    {
-#      'target_name': 'image_loader_unittest',
-#      'includes': ['../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'piex_loader',
 #      'includes': ['../compile_js2.gypi'],
 #    },
diff --git a/ui/file_manager/video_player/js/compiled_resources2.gyp b/ui/file_manager/video_player/js/compiled_resources2.gyp
index e632a4b7a..e2221379 100644
--- a/ui/file_manager/video_player/js/compiled_resources2.gyp
+++ b/ui/file_manager/video_player/js/compiled_resources2.gyp
@@ -16,10 +16,6 @@
 #      'includes': ['../../compile_js2.gypi'],
 #    },
 #    {
-#      'target_name': 'test_util',
-#      'includes': ['../../compile_js2.gypi'],
-#    },
-#    {
 #      'target_name': 'video_player',
 #      'includes': ['../../compile_js2.gypi'],
 #    },