diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni
index ce19e7b7..3b1b50fd 100644
--- a/build/config/android/rules.gni
+++ b/build/config/android/rules.gni
@@ -57,8 +57,12 @@
   _runtime_deps_target_name = "${target_name}__runtime_deps"
   group(_runtime_deps_target_name) {
     data = _sanitizer_runtimes
+    data_deps = []
     if (defined(invoker.deps)) {
-      data_deps = invoker.deps
+      data_deps += invoker.deps
+    }
+    if (is_component_build || is_asan) {
+      data_deps += [ "//build/android:cpplib_stripped" ]
     }
     write_runtime_deps = _runtime_deps_file
   }
diff --git a/chrome/browser/extensions/api/media_galleries/media_galleries_api.cc b/chrome/browser/extensions/api/media_galleries/media_galleries_api.cc
index 7d3f58c..1263722 100644
--- a/chrome/browser/extensions/api/media_galleries/media_galleries_api.cc
+++ b/chrome/browser/extensions/api/media_galleries/media_galleries_api.cc
@@ -674,7 +674,7 @@
       metadata_type == MediaGalleries::GET_METADATA_TYPE_ALL ||
       metadata_type == MediaGalleries::GET_METADATA_TYPE_NONE;
 
-  auto parser = base::MakeRefCounted<chrome::SafeMediaMetadataParser>(
+  auto parser = base::MakeRefCounted<SafeMediaMetadataParser>(
       GetProfile(), blob_uuid, total_blob_length, mime_type,
       get_attached_images);
   parser->Start(
diff --git a/chrome/browser/safe_browsing/download_protection/check_client_download_request.cc b/chrome/browser/safe_browsing/download_protection/check_client_download_request.cc
index 2aa77ef..0393fd9ac 100644
--- a/chrome/browser/safe_browsing/download_protection/check_client_download_request.cc
+++ b/chrome/browser/safe_browsing/download_protection/check_client_download_request.cc
@@ -478,7 +478,7 @@
   zip_analysis_start_time_ = base::TimeTicks::Now();
   // We give the zip analyzer a weak pointer to this object.  Since the
   // analyzer is refcounted, it might outlive the request.
-  analyzer_ = new chrome::SandboxedZipAnalyzer(
+  analyzer_ = new SandboxedZipAnalyzer(
       item_->GetFullPath(),
       base::Bind(&CheckClientDownloadRequest::OnZipAnalysisFinished,
                  weakptr_factory_.GetWeakPtr()),
@@ -572,7 +572,7 @@
   if (too_big_to_unpack) {
     OnFileFeatureExtractionDone();
   } else {
-    dmg_analyzer_ = new chrome::SandboxedDMGAnalyzer(
+    dmg_analyzer_ = new SandboxedDMGAnalyzer(
         item_->GetFullPath(),
         base::Bind(&CheckClientDownloadRequest::OnDmgAnalysisFinished,
                    weakptr_factory_.GetWeakPtr()),
diff --git a/chrome/browser/safe_browsing/download_protection/check_client_download_request.h b/chrome/browser/safe_browsing/download_protection/check_client_download_request.h
index df71dda..c6484113 100644
--- a/chrome/browser/safe_browsing/download_protection/check_client_download_request.h
+++ b/chrome/browser/safe_browsing/download_protection/check_client_download_request.h
@@ -138,10 +138,10 @@
   scoped_refptr<SafeBrowsingDatabaseManager> database_manager_;
   const bool pingback_enabled_;
   std::unique_ptr<net::URLFetcher> fetcher_;
-  scoped_refptr<chrome::SandboxedZipAnalyzer> analyzer_;
+  scoped_refptr<SandboxedZipAnalyzer> analyzer_;
   base::TimeTicks zip_analysis_start_time_;
 #if defined(OS_MACOSX)
-  scoped_refptr<chrome::SandboxedDMGAnalyzer> dmg_analyzer_;
+  scoped_refptr<SandboxedDMGAnalyzer> dmg_analyzer_;
   base::TimeTicks dmg_analysis_start_time_;
 #endif
   bool finished_;
diff --git a/chrome/services/file_util/file_util_service.cc b/chrome/services/file_util/file_util_service.cc
index abda604e..2e5de70 100644
--- a/chrome/services/file_util/file_util_service.cc
+++ b/chrome/services/file_util/file_util_service.cc
@@ -17,8 +17,6 @@
 #include "chrome/services/file_util/zip_file_creator.h"
 #endif
 
-namespace chrome {
-
 namespace {
 
 #if defined(FULL_SAFE_BROWSING)
@@ -36,7 +34,7 @@
     service_manager::ServiceContextRefFactory* ref_factory,
     chrome::mojom::ZipFileCreatorRequest request) {
   mojo::MakeStrongBinding(
-      std::make_unique<ZipFileCreator>(ref_factory->CreateRef()),
+      std::make_unique<chrome::ZipFileCreator>(ref_factory->CreateRef()),
       std::move(request));
 }
 #endif
@@ -71,5 +69,3 @@
     mojo::ScopedMessagePipeHandle interface_pipe) {
   registry_.BindInterface(interface_name, std::move(interface_pipe));
 }
-
-}  //  namespace chrome
diff --git a/chrome/services/file_util/file_util_service.h b/chrome/services/file_util/file_util_service.h
index 8aeb4cb..aa6b80a 100644
--- a/chrome/services/file_util/file_util_service.h
+++ b/chrome/services/file_util/file_util_service.h
@@ -9,8 +9,6 @@
 #include "services/service_manager/public/cpp/service_context.h"
 #include "services/service_manager/public/cpp/service_context_ref.h"
 
-namespace chrome {
-
 class FileUtilService : public service_manager::Service {
  public:
   FileUtilService();
@@ -33,6 +31,4 @@
   DISALLOW_COPY_AND_ASSIGN(FileUtilService);
 };
 
-}  // namespace chrome
-
 #endif  // CHROME_SERVICES_FILE_UTIL_FILE_UTIL_SERVICE_H_
diff --git a/chrome/services/file_util/public/cpp/sandboxed_dmg_analyzer_mac.cc b/chrome/services/file_util/public/cpp/sandboxed_dmg_analyzer_mac.cc
index 53166b8..539dfc5d 100644
--- a/chrome/services/file_util/public/cpp/sandboxed_dmg_analyzer_mac.cc
+++ b/chrome/services/file_util/public/cpp/sandboxed_dmg_analyzer_mac.cc
@@ -13,8 +13,6 @@
 #include "content/public/browser/browser_thread.h"
 #include "services/service_manager/public/cpp/connector.h"
 
-namespace chrome {
-
 SandboxedDMGAnalyzer::SandboxedDMGAnalyzer(
     const base::FilePath& dmg_file,
     const ResultCallback& callback,
@@ -82,5 +80,3 @@
   analyzer_ptr_.reset();
   callback_.Run(results);
 }
-
-}  // namespace chrome
diff --git a/chrome/services/file_util/public/cpp/sandboxed_dmg_analyzer_mac.h b/chrome/services/file_util/public/cpp/sandboxed_dmg_analyzer_mac.h
index cf33752..2b0efb3 100644
--- a/chrome/services/file_util/public/cpp/sandboxed_dmg_analyzer_mac.h
+++ b/chrome/services/file_util/public/cpp/sandboxed_dmg_analyzer_mac.h
@@ -20,8 +20,6 @@
 class Connector;
 }
 
-namespace chrome {
-
 // This class is used to analyze DMG files in a sandboxed utility process
 // for file download protection. This class lives on the UI thread, which
 // is where the result callback will be invoked.
@@ -65,11 +63,9 @@
   service_manager::Connector* connector_;
 
   // Pointer to the SafeArchiveAnalyzer interface. Only used from the UI thread.
-  mojom::SafeArchiveAnalyzerPtr analyzer_ptr_;
+  chrome::mojom::SafeArchiveAnalyzerPtr analyzer_ptr_;
 
   DISALLOW_COPY_AND_ASSIGN(SandboxedDMGAnalyzer);
 };
 
-}  // namespace chrome
-
 #endif  // CHROME_SERVICES_FILE_UTIL_SANDBOXED_DMG_ANALYZER_MAC_H_
diff --git a/chrome/services/file_util/public/cpp/sandboxed_dmg_analyzer_mac_unittest.cc b/chrome/services/file_util/public/cpp/sandboxed_dmg_analyzer_mac_unittest.cc
index eb15b76..98bb9ad 100644
--- a/chrome/services/file_util/public/cpp/sandboxed_dmg_analyzer_mac_unittest.cc
+++ b/chrome/services/file_util/public/cpp/sandboxed_dmg_analyzer_mac_unittest.cc
@@ -22,14 +22,13 @@
 #include "services/service_manager/public/cpp/test/test_connector_factory.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
-namespace chrome {
 namespace {
 
 class SandboxedDMGAnalyzerTest : public testing::Test {
  public:
   SandboxedDMGAnalyzerTest()
       : browser_thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
-        test_connector_factory_(std::make_unique<chrome::FileUtilService>()),
+        test_connector_factory_(std::make_unique<FileUtilService>()),
         connector_(test_connector_factory_.CreateConnector()) {}
 
   void AnalyzeFile(const base::FilePath& path,
@@ -190,4 +189,3 @@
 }
 
 }  // namespace
-}  // namespace chrome
diff --git a/chrome/services/file_util/public/cpp/sandboxed_zip_analyzer.cc b/chrome/services/file_util/public/cpp/sandboxed_zip_analyzer.cc
index ba863a76..82220d8 100644
--- a/chrome/services/file_util/public/cpp/sandboxed_zip_analyzer.cc
+++ b/chrome/services/file_util/public/cpp/sandboxed_zip_analyzer.cc
@@ -15,8 +15,6 @@
 #include "content/public/browser/browser_thread.h"
 #include "services/service_manager/public/cpp/connector.h"
 
-namespace chrome {
-
 SandboxedZipAnalyzer::SandboxedZipAnalyzer(
     const base::FilePath& zip_file,
     const ResultCallback& callback,
@@ -96,5 +94,3 @@
   analyzer_ptr_.reset();
   callback_.Run(results);
 }
-
-}  // namespace chrome
diff --git a/chrome/services/file_util/public/cpp/sandboxed_zip_analyzer.h b/chrome/services/file_util/public/cpp/sandboxed_zip_analyzer.h
index 5cf1edb1..e5c91a9 100644
--- a/chrome/services/file_util/public/cpp/sandboxed_zip_analyzer.h
+++ b/chrome/services/file_util/public/cpp/sandboxed_zip_analyzer.h
@@ -20,8 +20,6 @@
 class Connector;
 }
 
-namespace chrome {
-
 // This class is used to analyze zip files in a sandboxed utility process for
 // file download protection. This class lives on the UI thread, which is where
 // the result callback will be invoked.
@@ -65,11 +63,9 @@
   service_manager::Connector* connector_;
 
   // Pointer to the SafeArchiveAnalyzer interface. Only used from the UI thread.
-  mojom::SafeArchiveAnalyzerPtr analyzer_ptr_;
+  chrome::mojom::SafeArchiveAnalyzerPtr analyzer_ptr_;
 
   DISALLOW_COPY_AND_ASSIGN(SandboxedZipAnalyzer);
 };
 
-}  //  namespace chrome
-
 #endif  // CHROME_SERVICES_FILE_UTIL_PUBLIC_CPP_SANDBOXED_ZIP_ANALYZER_H_
diff --git a/chrome/services/file_util/public/cpp/sandboxed_zip_analyzer_unittest.cc b/chrome/services/file_util/public/cpp/sandboxed_zip_analyzer_unittest.cc
index 1c0dd968..04a657b 100644
--- a/chrome/services/file_util/public/cpp/sandboxed_zip_analyzer_unittest.cc
+++ b/chrome/services/file_util/public/cpp/sandboxed_zip_analyzer_unittest.cc
@@ -32,8 +32,6 @@
 }
 #endif  // OS_MACOSX
 
-namespace chrome {
-
 class SandboxedZipAnalyzerTest : public ::testing::Test {
  protected:
   // Constants for validating the data reported by the analyzer.
@@ -76,7 +74,7 @@
 
   SandboxedZipAnalyzerTest()
       : browser_thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
-        test_connector_factory_(std::make_unique<chrome::FileUtilService>()),
+        test_connector_factory_(std::make_unique<FileUtilService>()),
         connector_(test_connector_factory_.CreateConnector()) {}
 
   void SetUp() override {
@@ -91,9 +89,8 @@
     DCHECK(results);
     base::RunLoop run_loop;
     ResultsGetter results_getter(run_loop.QuitClosure(), results);
-    scoped_refptr<SandboxedZipAnalyzer> analyzer(
-        new chrome::SandboxedZipAnalyzer(
-            file_path, results_getter.GetCallback(), connector_.get()));
+    scoped_refptr<SandboxedZipAnalyzer> analyzer(new SandboxedZipAnalyzer(
+        file_path, results_getter.GetCallback(), connector_.get()));
     analyzer->Start();
     run_loop.Run();
   }
@@ -392,5 +389,3 @@
   ExpectBinary(kSignedMachO, results.archived_binary.Get(1));
 }
 #endif  // OS_MACOSX
-
-}  // namespace chrome
diff --git a/chrome/services/file_util/public/cpp/zip_file_creator_browsertest.cc b/chrome/services/file_util/public/cpp/zip_file_creator_browsertest.cc
index 201a1c0f..46104a84 100644
--- a/chrome/services/file_util/public/cpp/zip_file_creator_browsertest.cc
+++ b/chrome/services/file_util/public/cpp/zip_file_creator_browsertest.cc
@@ -19,8 +19,6 @@
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/zlib/google/zip_reader.h"
 
-namespace chrome {
-
 namespace {
 
 void TestCallback(bool* out_success, const base::Closure& quit, bool success) {
@@ -219,5 +217,3 @@
   }
   EXPECT_TRUE(file_tree_content.empty());
 }
-
-}  // namespace chrome
diff --git a/chrome/services/file_util/safe_archive_analyzer.cc b/chrome/services/file_util/safe_archive_analyzer.cc
index 10e083a..d95028d 100644
--- a/chrome/services/file_util/safe_archive_analyzer.cc
+++ b/chrome/services/file_util/safe_archive_analyzer.cc
@@ -14,8 +14,6 @@
 #include "chrome/utility/safe_browsing/mac/dmg_analyzer.h"
 #endif
 
-namespace chrome {
-
 SafeArchiveAnalyzer::SafeArchiveAnalyzer(
     std::unique_ptr<service_manager::ServiceContextRef> service_ref)
     : service_ref_(std::move(service_ref)) {}
@@ -45,5 +43,3 @@
   NOTREACHED();
 #endif
 }
-
-}  // namespace chrome
diff --git a/chrome/services/file_util/safe_archive_analyzer.h b/chrome/services/file_util/safe_archive_analyzer.h
index 4187226..ddfe2de8 100644
--- a/chrome/services/file_util/safe_archive_analyzer.h
+++ b/chrome/services/file_util/safe_archive_analyzer.h
@@ -12,9 +12,7 @@
 class File;
 }
 
-namespace chrome {
-
-class SafeArchiveAnalyzer : public mojom::SafeArchiveAnalyzer {
+class SafeArchiveAnalyzer : public chrome::mojom::SafeArchiveAnalyzer {
  public:
   explicit SafeArchiveAnalyzer(
       std::unique_ptr<service_manager::ServiceContextRef> service_ref);
@@ -33,6 +31,4 @@
   DISALLOW_COPY_AND_ASSIGN(SafeArchiveAnalyzer);
 };
 
-}  // namespace chrome
-
 #endif  // CHROME_SERVICES_FILE_UTIL_SAFE_ARCHIVE_ANALYZER_H_
diff --git a/chrome/services/media_gallery_util/ipc_data_source.cc b/chrome/services/media_gallery_util/ipc_data_source.cc
index 7f03ba91..c95692e 100644
--- a/chrome/services/media_gallery_util/ipc_data_source.cc
+++ b/chrome/services/media_gallery_util/ipc_data_source.cc
@@ -7,8 +7,6 @@
 #include "base/threading/thread_task_runner_handle.h"
 #include "content/public/utility/utility_thread.h"
 
-namespace chrome {
-
 IPCDataSource::IPCDataSource(
     chrome::mojom::MediaDataSourcePtr media_data_source,
     int64_t total_size)
@@ -85,5 +83,3 @@
   std::copy(data.begin(), data.end(), destination);
   callback.Run(data.size());
 }
-
-}  // namespace chrome
diff --git a/chrome/services/media_gallery_util/ipc_data_source.h b/chrome/services/media_gallery_util/ipc_data_source.h
index 4b5ee8f..dae5472 100644
--- a/chrome/services/media_gallery_util/ipc_data_source.h
+++ b/chrome/services/media_gallery_util/ipc_data_source.h
@@ -18,8 +18,6 @@
 class TaskRunner;
 }
 
-namespace chrome {
-
 // Provides the metadata parser with blob data from the browser process. Class
 // must be created and destroyed on the utility thread. Class may be used as a
 // DataSource on a different thread. The utility thread must not be blocked
@@ -27,7 +25,7 @@
 class IPCDataSource : public media::DataSource {
  public:
   // May only be called on the utility thread.
-  IPCDataSource(mojom::MediaDataSourcePtr media_data_source,
+  IPCDataSource(chrome::mojom::MediaDataSourcePtr media_data_source,
                 int64_t total_size);
   ~IPCDataSource() override;
 
@@ -53,7 +51,7 @@
                 const ReadCB& callback,
                 const std::vector<uint8_t>& data);
 
-  mojom::MediaDataSourcePtr media_data_source_;
+  chrome::mojom::MediaDataSourcePtr media_data_source_;
   const int64_t total_size_;
 
   scoped_refptr<base::TaskRunner> utility_task_runner_;
@@ -64,6 +62,4 @@
   THREAD_CHECKER(data_source_thread_checker_);
 };
 
-}  // namespace chrome
-
 #endif  // CHROME_SERVICES_MEDIA_GALLERY_UTIL_IPC_DATA_SOURCE_H_
diff --git a/chrome/services/media_gallery_util/media_gallery_util_service.cc b/chrome/services/media_gallery_util/media_gallery_util_service.cc
index a5de874..ce3c337 100644
--- a/chrome/services/media_gallery_util/media_gallery_util_service.cc
+++ b/chrome/services/media_gallery_util/media_gallery_util_service.cc
@@ -8,13 +8,11 @@
 #include "chrome/services/media_gallery_util/media_parser.h"
 #include "mojo/public/cpp/bindings/strong_binding.h"
 
-namespace chrome {
-
 namespace {
 
 void OnMediaParserRequest(
     service_manager::ServiceContextRefFactory* ref_factory,
-    mojom::MediaParserRequest request) {
+    chrome::mojom::MediaParserRequest request) {
   mojo::MakeStrongBinding(
       std::make_unique<MediaParser>(ref_factory->CreateRef()),
       std::move(request));
@@ -44,5 +42,3 @@
     mojo::ScopedMessagePipeHandle interface_pipe) {
   registry_.BindInterface(interface_name, std::move(interface_pipe));
 }
-
-}  //  namespace chrome
diff --git a/chrome/services/media_gallery_util/media_gallery_util_service.h b/chrome/services/media_gallery_util/media_gallery_util_service.h
index 94c842e8d..956db7f 100644
--- a/chrome/services/media_gallery_util/media_gallery_util_service.h
+++ b/chrome/services/media_gallery_util/media_gallery_util_service.h
@@ -11,8 +11,6 @@
 #include "services/service_manager/public/cpp/service_context.h"
 #include "services/service_manager/public/cpp/service_context_ref.h"
 
-namespace chrome {
-
 class MediaGalleryUtilService : public service_manager::Service {
  public:
   MediaGalleryUtilService();
@@ -35,6 +33,4 @@
   DISALLOW_COPY_AND_ASSIGN(MediaGalleryUtilService);
 };
 
-}  // namespace chrome
-
 #endif  // CHROME_SERVICES_MEDIA_GALLERY_UTIL_MEDIA_GALLERY_UTIL_SERVICE_H_
diff --git a/chrome/services/media_gallery_util/media_metadata_parser.cc b/chrome/services/media_gallery_util/media_metadata_parser.cc
index 062df3ec..0d3fdd0 100644
--- a/chrome/services/media_gallery_util/media_metadata_parser.cc
+++ b/chrome/services/media_gallery_util/media_metadata_parser.cc
@@ -17,8 +17,6 @@
 
 namespace MediaGalleries = extensions::api::media_galleries;
 
-namespace chrome {
-
 namespace {
 
 #if !defined(MEDIA_DISABLE_FFMPEG)
@@ -153,5 +151,3 @@
       base::BindOnce(&FinishParseAudioVideoMetadata, callback,
                      base::Owned(metadata), base::Owned(images)));
 }
-
-}  // namespace chrome
diff --git a/chrome/services/media_gallery_util/media_metadata_parser.h b/chrome/services/media_gallery_util/media_metadata_parser.h
index 5f9c1f9..32e7aa7 100644
--- a/chrome/services/media_gallery_util/media_metadata_parser.h
+++ b/chrome/services/media_gallery_util/media_metadata_parser.h
@@ -22,8 +22,6 @@
 class DataSource;
 }
 
-namespace chrome {
-
 // This class takes a MIME type and data source and parses its metadata. It
 // handles audio, video, and images. It delegates its operations to FFMPEG.
 // This class lives and operates on the utility thread of the utility process
@@ -62,6 +60,4 @@
   DISALLOW_COPY_AND_ASSIGN(MediaMetadataParser);
 };
 
-}  // namespace chrome
-
 #endif  // CHROME_SERVICES_MEDIA_GALLERY_UTIL_MEDIA_METADATA_PARSER_H_
diff --git a/chrome/services/media_gallery_util/media_parser.cc b/chrome/services/media_gallery_util/media_parser.cc
index fa893a8b..d75865fc 100644
--- a/chrome/services/media_gallery_util/media_parser.cc
+++ b/chrome/services/media_gallery_util/media_parser.cc
@@ -10,8 +10,6 @@
 #include "chrome/services/media_gallery_util/ipc_data_source.h"
 #include "chrome/services/media_gallery_util/media_metadata_parser.h"
 
-namespace chrome {
-
 namespace {
 
 void ParseMediaMetadataDone(
@@ -34,10 +32,10 @@
     const std::string& mime_type,
     int64_t total_size,
     bool get_attached_images,
-    mojom::MediaDataSourcePtr media_data_source,
+    chrome::mojom::MediaDataSourcePtr media_data_source,
     ParseMediaMetadataCallback callback) {
-  auto source = std::make_unique<chrome::IPCDataSource>(
-      std::move(media_data_source), total_size);
+  auto source =
+      std::make_unique<IPCDataSource>(std::move(media_data_source), total_size);
   MediaMetadataParser* parser = new MediaMetadataParser(
       std::move(source), mime_type, get_attached_images);
   parser->Start(base::Bind(&ParseMediaMetadataDone, base::Passed(&callback),
@@ -54,5 +52,3 @@
   std::move(callback).Run(false);
 #endif
 }
-
-}  // namespace chrome
diff --git a/chrome/services/media_gallery_util/media_parser.h b/chrome/services/media_gallery_util/media_parser.h
index 086eccb..63536740 100644
--- a/chrome/services/media_gallery_util/media_parser.h
+++ b/chrome/services/media_gallery_util/media_parser.h
@@ -13,8 +13,6 @@
 #include "chrome/services/media_gallery_util/public/interfaces/media_parser.mojom.h"
 #include "services/service_manager/public/cpp/service_context_ref.h"
 
-namespace chrome {
-
 class MediaParser : public chrome::mojom::MediaParser {
  public:
   explicit MediaParser(
@@ -26,7 +24,7 @@
   void ParseMediaMetadata(const std::string& mime_type,
                           int64_t total_size,
                           bool get_attached_images,
-                          mojom::MediaDataSourcePtr media_data_source,
+                          chrome::mojom::MediaDataSourcePtr media_data_source,
                           ParseMediaMetadataCallback callback) override;
   void CheckMediaFile(base::TimeDelta decode_time,
                       base::File file,
@@ -37,6 +35,4 @@
   DISALLOW_COPY_AND_ASSIGN(MediaParser);
 };
 
-}  // namespace chrome
-
 #endif  // CHROME_SERVICES_MEDIA_GALLERY_UTIL_MEDIA_PARSER_H_
diff --git a/chrome/services/media_gallery_util/public/cpp/safe_media_metadata_parser.cc b/chrome/services/media_gallery_util/public/cpp/safe_media_metadata_parser.cc
index ffed219..c024dea 100644
--- a/chrome/services/media_gallery_util/public/cpp/safe_media_metadata_parser.cc
+++ b/chrome/services/media_gallery_util/public/cpp/safe_media_metadata_parser.cc
@@ -14,13 +14,11 @@
 #include "mojo/public/cpp/bindings/binding.h"
 #include "services/service_manager/public/cpp/connector.h"
 
-namespace chrome {
-
 class SafeMediaMetadataParser::MediaDataSourceImpl
-    : public mojom::MediaDataSource {
+    : public chrome::mojom::MediaDataSource {
  public:
   MediaDataSourceImpl(SafeMediaMetadataParser* owner,
-                      mojom::MediaDataSourcePtr* interface)
+                      chrome::mojom::MediaDataSourcePtr* interface)
       : binding_(this, mojo::MakeRequest(interface)),
         safe_media_metadata_parser_(owner) {
     DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
@@ -36,7 +34,7 @@
                                                   length);
   }
 
-  mojo::Binding<mojom::MediaDataSource> binding_;
+  mojo::Binding<chrome::mojom::MediaDataSource> binding_;
   // |safe_media_metadata_parser_| owns |this|.
   SafeMediaMetadataParser* const safe_media_metadata_parser_;
 
@@ -85,7 +83,7 @@
   media_parser_ptr_.set_connection_error_handler(
       base::Bind(&SafeMediaMetadataParser::ParseMediaMetadataFailed, this));
 
-  mojom::MediaDataSourcePtr source;
+  chrome::mojom::MediaDataSourcePtr source;
   media_data_source_ = base::MakeUnique<MediaDataSourceImpl>(this, &source);
   media_parser_ptr_->ParseMediaMetadata(
       mime_type_, blob_size_, get_attached_images_, std::move(source),
@@ -131,7 +129,7 @@
 }
 
 void SafeMediaMetadataParser::StartBlobRequest(
-    mojom::MediaDataSource::ReadBlobCallback callback,
+    chrome::mojom::MediaDataSource::ReadBlobCallback callback,
     int64_t position,
     int64_t length) {
   DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
@@ -143,7 +141,7 @@
 }
 
 void SafeMediaMetadataParser::StartBlobReaderOnUIThread(
-    mojom::MediaDataSource::ReadBlobCallback callback,
+    chrome::mojom::MediaDataSource::ReadBlobCallback callback,
     int64_t position,
     int64_t length) {
   DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
@@ -157,7 +155,7 @@
 }
 
 void SafeMediaMetadataParser::BlobReaderDoneOnUIThread(
-    mojom::MediaDataSource::ReadBlobCallback callback,
+    chrome::mojom::MediaDataSource::ReadBlobCallback callback,
     std::unique_ptr<std::string> data,
     int64_t /* blob_total_size */) {
   DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
@@ -169,12 +167,10 @@
 }
 
 void SafeMediaMetadataParser::FinishBlobRequest(
-    mojom::MediaDataSource::ReadBlobCallback callback,
+    chrome::mojom::MediaDataSource::ReadBlobCallback callback,
     std::unique_ptr<std::string> data) {
   DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
 
   if (media_parser_ptr_)
     std::move(callback).Run(std::vector<uint8_t>(data->begin(), data->end()));
 }
-
-}  // namespace chrome
diff --git a/chrome/services/media_gallery_util/public/cpp/safe_media_metadata_parser.h b/chrome/services/media_gallery_util/public/cpp/safe_media_metadata_parser.h
index 9cb1e54a..23dddd7 100644
--- a/chrome/services/media_gallery_util/public/cpp/safe_media_metadata_parser.h
+++ b/chrome/services/media_gallery_util/public/cpp/safe_media_metadata_parser.h
@@ -26,8 +26,6 @@
 class Connector;
 }
 
-namespace chrome {
-
 // Parses the media metadata of a Blob safely in a utility process. This class
 // expects the MIME type of the Blob to be already known. It creates a utility
 // process to do further MIME-type-specific metadata extraction from the Blob
@@ -76,19 +74,21 @@
 
   // Sequence of functions that bounces from the IO thread to the UI thread to
   // read the blob data, then sends the data back to the utility process.
-  void StartBlobRequest(mojom::MediaDataSource::ReadBlobCallback callback,
-                        int64_t position,
-                        int64_t length);
+  void StartBlobRequest(
+      chrome::mojom::MediaDataSource::ReadBlobCallback callback,
+      int64_t position,
+      int64_t length);
   void StartBlobReaderOnUIThread(
-      mojom::MediaDataSource::ReadBlobCallback callback,
+      chrome::mojom::MediaDataSource::ReadBlobCallback callback,
       int64_t position,
       int64_t length);
   void BlobReaderDoneOnUIThread(
-      mojom::MediaDataSource::ReadBlobCallback callback,
+      chrome::mojom::MediaDataSource::ReadBlobCallback callback,
       std::unique_ptr<std::string> data,
       int64_t /* blob_total_size */);
-  void FinishBlobRequest(mojom::MediaDataSource::ReadBlobCallback callback,
-                         std::unique_ptr<std::string> data);
+  void FinishBlobRequest(
+      chrome::mojom::MediaDataSource::ReadBlobCallback callback,
+      std::unique_ptr<std::string> data);
 
   // All member variables are only accessed on the IO thread.
   content::BrowserContext* const browser_context_;
@@ -105,6 +105,4 @@
   DISALLOW_COPY_AND_ASSIGN(SafeMediaMetadataParser);
 };
 
-}  // namespace chrome
-
 #endif  // CHROME_SERVICES_MEDIA_GALLERY_UTIL_PUBLIC_CPP_SAFE_MEDIA_METADATA_PARSER_H_
diff --git a/chrome/services/removable_storage_writer/removable_storage_writer.cc b/chrome/services/removable_storage_writer/removable_storage_writer.cc
index 956ed566..2990cf9 100644
--- a/chrome/services/removable_storage_writer/removable_storage_writer.cc
+++ b/chrome/services/removable_storage_writer/removable_storage_writer.cc
@@ -8,8 +8,6 @@
 
 #include "base/files/file_path.h"
 
-namespace chrome {
-
 RemovableStorageWriter::RemovableStorageWriter(
     std::unique_ptr<service_manager::ServiceContextRef> service_ref)
     : service_ref_(std::move(service_ref)) {}
@@ -19,15 +17,13 @@
 void RemovableStorageWriter::Write(
     const base::FilePath& source,
     const base::FilePath& target,
-    mojom::RemovableStorageWriterClientPtr client) {
+    chrome::mojom::RemovableStorageWriterClientPtr client) {
   writer_.Write(source, target, std::move(client));
 }
 
 void RemovableStorageWriter::Verify(
     const base::FilePath& source,
     const base::FilePath& target,
-    mojom::RemovableStorageWriterClientPtr client) {
+    chrome::mojom::RemovableStorageWriterClientPtr client) {
   writer_.Verify(source, target, std::move(client));
 }
-
-}  // namespace chrome
diff --git a/chrome/services/removable_storage_writer/removable_storage_writer.h b/chrome/services/removable_storage_writer/removable_storage_writer.h
index fd5ebc9..4445eae2 100644
--- a/chrome/services/removable_storage_writer/removable_storage_writer.h
+++ b/chrome/services/removable_storage_writer/removable_storage_writer.h
@@ -16,9 +16,7 @@
 class FilePath;
 }
 
-namespace chrome {
-
-class RemovableStorageWriter : public mojom::RemovableStorageWriter {
+class RemovableStorageWriter : public chrome::mojom::RemovableStorageWriter {
  public:
   explicit RemovableStorageWriter(
       std::unique_ptr<service_manager::ServiceContextRef> service_ref);
@@ -28,11 +26,11 @@
   // mojom::RemovableStorageWriter implementation:
   void Write(const base::FilePath& source,
              const base::FilePath& target,
-             mojom::RemovableStorageWriterClientPtr client) override;
+             chrome::mojom::RemovableStorageWriterClientPtr client) override;
 
   void Verify(const base::FilePath& source,
               const base::FilePath& target,
-              mojom::RemovableStorageWriterClientPtr client) override;
+              chrome::mojom::RemovableStorageWriterClientPtr client) override;
 
   const std::unique_ptr<service_manager::ServiceContextRef> service_ref_;
   image_writer::ImageWriterHandler writer_;
@@ -40,6 +38,4 @@
   DISALLOW_COPY_AND_ASSIGN(RemovableStorageWriter);
 };
 
-}  // namespace chrome
-
 #endif  // CHROME_SERVICES_REMOVABLE_STORAGE_WRITER_REMOVABLE_STORAGE_WRITER_H_
diff --git a/chrome/services/removable_storage_writer/removable_storage_writer_service.cc b/chrome/services/removable_storage_writer/removable_storage_writer_service.cc
index c3c4486..6c2f1681 100644
--- a/chrome/services/removable_storage_writer/removable_storage_writer_service.cc
+++ b/chrome/services/removable_storage_writer/removable_storage_writer_service.cc
@@ -14,8 +14,6 @@
 #include "mojo/public/cpp/bindings/strong_binding.h"
 #include "services/service_manager/public/cpp/service_context.h"
 
-namespace chrome {
-
 namespace {
 
 void OnRemovableStorageWriterGetterRequest(
@@ -51,5 +49,3 @@
     mojo::ScopedMessagePipeHandle interface_pipe) {
   registry_.BindInterface(interface_name, std::move(interface_pipe));
 }
-
-}  //  namespace chrome
diff --git a/chrome/services/removable_storage_writer/removable_storage_writer_service.h b/chrome/services/removable_storage_writer/removable_storage_writer_service.h
index ba6ffc6..66092039 100644
--- a/chrome/services/removable_storage_writer/removable_storage_writer_service.h
+++ b/chrome/services/removable_storage_writer/removable_storage_writer_service.h
@@ -9,8 +9,6 @@
 #include "services/service_manager/public/cpp/service.h"
 #include "services/service_manager/public/cpp/service_context_ref.h"
 
-namespace chrome {
-
 class RemovableStorageWriterService : public service_manager::Service {
  public:
   RemovableStorageWriterService();
@@ -33,6 +31,4 @@
   DISALLOW_COPY_AND_ASSIGN(RemovableStorageWriterService);
 };
 
-}  // namespace chrome
-
 #endif  // CHROME_SERVICES_REMOVABLE_STORAGE_WRITER_REMOVABLE_STORAGE_WRITER_SERVICE_H_
diff --git a/chrome/services/util_win/shell_util_win_impl.cc b/chrome/services/util_win/shell_util_win_impl.cc
index 639f10c..5483812 100644
--- a/chrome/services/util_win/shell_util_win_impl.cc
+++ b/chrome/services/util_win/shell_util_win_impl.cc
@@ -23,8 +23,6 @@
 #include "mojo/public/cpp/bindings/strong_binding.h"
 #include "ui/base/win/open_file_name_win.h"
 
-namespace chrome {
-
 namespace {
 
 // This class checks if the current executable is pinned to the taskbar. It also
@@ -284,5 +282,3 @@
 
   std::move(callback).Run(base::FilePath(), 0);
 }
-
-}  // namespace chrome
diff --git a/chrome/services/util_win/shell_util_win_impl.h b/chrome/services/util_win/shell_util_win_impl.h
index 5aebbb0..f4bf357 100644
--- a/chrome/services/util_win/shell_util_win_impl.h
+++ b/chrome/services/util_win/shell_util_win_impl.h
@@ -9,8 +9,6 @@
 #include "chrome/services/util_win/public/interfaces/shell_util_win.mojom.h"
 #include "services/service_manager/public/cpp/service_context_ref.h"
 
-namespace chrome {
-
 class ShellUtilWinImpl : public chrome::mojom::ShellUtilWin {
  public:
   explicit ShellUtilWinImpl(
@@ -44,6 +42,4 @@
   DISALLOW_COPY_AND_ASSIGN(ShellUtilWinImpl);
 };
 
-}  // namespace chrome
-
 #endif  // CHROME_SERVICES_UTIL_WIN_SHELL_UTIL_WIN_IMPL_H_
diff --git a/chrome/services/util_win/util_win_service.cc b/chrome/services/util_win/util_win_service.cc
index e64feed..068f184e 100644
--- a/chrome/services/util_win/util_win_service.cc
+++ b/chrome/services/util_win/util_win_service.cc
@@ -11,8 +11,6 @@
 #include "chrome/services/util_win/shell_util_win_impl.h"
 #include "mojo/public/cpp/bindings/strong_binding.h"
 
-namespace chrome {
-
 namespace {
 
 void OnShellUtilWinRequest(
@@ -47,5 +45,3 @@
     mojo::ScopedMessagePipeHandle interface_pipe) {
   registry_.BindInterface(interface_name, std::move(interface_pipe));
 }
-
-}  //  namespace chrome
diff --git a/chrome/services/util_win/util_win_service.h b/chrome/services/util_win/util_win_service.h
index 3283d8d..186db1c1 100644
--- a/chrome/services/util_win/util_win_service.h
+++ b/chrome/services/util_win/util_win_service.h
@@ -9,8 +9,6 @@
 #include "services/service_manager/public/cpp/service_context.h"
 #include "services/service_manager/public/cpp/service_context_ref.h"
 
-namespace chrome {
-
 class UtilWinService : public service_manager::Service {
  public:
   ~UtilWinService() override;
@@ -34,6 +32,4 @@
   DISALLOW_COPY_AND_ASSIGN(UtilWinService);
 };
 
-}  // namespace chrome
-
 #endif  // CHROME_SERVICES_UTIL_WIN_UTIL_WIN_SERVICE_H_
diff --git a/chrome/services/wifi_util_win/wifi_credentials_getter.cc b/chrome/services/wifi_util_win/wifi_credentials_getter.cc
index c595435..a1bbc3c 100644
--- a/chrome/services/wifi_util_win/wifi_credentials_getter.cc
+++ b/chrome/services/wifi_util_win/wifi_credentials_getter.cc
@@ -6,8 +6,6 @@
 
 #include "components/wifi/wifi_service.h"
 
-namespace chrome {
-
 WiFiCredentialsGetter::WiFiCredentialsGetter(
     std::unique_ptr<service_manager::ServiceContextRef> service_ref)
     : service_ref_(std::move(service_ref)) {}
@@ -36,5 +34,3 @@
 
   std::move(callback).Run(success, key_data);
 }
-
-}  // namespace chrome
diff --git a/chrome/services/wifi_util_win/wifi_credentials_getter.h b/chrome/services/wifi_util_win/wifi_credentials_getter.h
index 50654458..4856748 100644
--- a/chrome/services/wifi_util_win/wifi_credentials_getter.h
+++ b/chrome/services/wifi_util_win/wifi_credentials_getter.h
@@ -10,8 +10,6 @@
 #include "chrome/services/wifi_util_win/public/interfaces/wifi_credentials_getter.mojom.h"
 #include "services/service_manager/public/cpp/service_context_ref.h"
 
-namespace chrome {
-
 class WiFiCredentialsGetter : public chrome::mojom::WiFiCredentialsGetter {
  public:
   explicit WiFiCredentialsGetter(
@@ -28,6 +26,4 @@
   DISALLOW_COPY_AND_ASSIGN(WiFiCredentialsGetter);
 };
 
-}  // namespace chrome
-
 #endif  // CHROME_SERVICES_WIFI_UTIL_WIN_WIFI_CREDENTIALS_GETTER_H_
diff --git a/chrome/services/wifi_util_win/wifi_util_win_service.cc b/chrome/services/wifi_util_win/wifi_util_win_service.cc
index ab63365..a7685133 100644
--- a/chrome/services/wifi_util_win/wifi_util_win_service.cc
+++ b/chrome/services/wifi_util_win/wifi_util_win_service.cc
@@ -10,8 +10,6 @@
 #include "chrome/services/wifi_util_win/wifi_credentials_getter.h"
 #include "mojo/public/cpp/bindings/strong_binding.h"
 
-namespace chrome {
-
 namespace {
 
 void OnWifiCredentialsGetterRequest(
@@ -46,5 +44,3 @@
     mojo::ScopedMessagePipeHandle interface_pipe) {
   registry_.BindInterface(interface_name, std::move(interface_pipe));
 }
-
-}  //  namespace chrome
diff --git a/chrome/services/wifi_util_win/wifi_util_win_service.h b/chrome/services/wifi_util_win/wifi_util_win_service.h
index 0eec36b..144894c 100644
--- a/chrome/services/wifi_util_win/wifi_util_win_service.h
+++ b/chrome/services/wifi_util_win/wifi_util_win_service.h
@@ -9,8 +9,6 @@
 #include "services/service_manager/public/cpp/service_context.h"
 #include "services/service_manager/public/cpp/service_context_ref.h"
 
-namespace chrome {
-
 class WifiUtilWinService : public service_manager::Service {
  public:
   WifiUtilWinService();
@@ -33,6 +31,4 @@
   DISALLOW_COPY_AND_ASSIGN(WifiUtilWinService);
 };
 
-}  // namespace chrome
-
 #endif  // CHROME_SERVICES_WIFI_UTIL_WIN_WIFI_UTIL_WIN_SERVICE_H_
diff --git a/chrome/test/chromedriver/js/execute_async_script.js b/chrome/test/chromedriver/js/execute_async_script.js
index 8cf0a19..b9dc8ab 100644
--- a/chrome/test/chromedriver/js/execute_async_script.js
+++ b/chrome/test/chromedriver/js/execute_async_script.js
@@ -60,6 +60,10 @@
     if (id != info.id)
       return;
     info.id++;
+    // Undefined value is skipped when the object is converted to JSON.
+    // Replace it with null so we don't lose the value.
+    if (value === undefined)
+      value = null;
     info.result = {status: status, value: value};
   }
   function reportValue(value) {
diff --git a/chrome/utility/chrome_content_utility_client.cc b/chrome/utility/chrome_content_utility_client.cc
index f1f5d91..b70e6b4 100644
--- a/chrome/utility/chrome_content_utility_client.cc
+++ b/chrome/utility/chrome_content_utility_client.cc
@@ -125,7 +125,7 @@
     ChromeContentUtilityClient::StaticServiceMap* services) {
   service_manager::EmbeddedServiceInfo service_info;
   service_info.factory =
-      base::Bind(&chrome::RemovableStorageWriterService::CreateService);
+      base::Bind(&RemovableStorageWriterService::CreateService);
   services->emplace(chrome::mojom::kRemovableStorageWriterServiceName,
                     service_info);
 }
@@ -202,8 +202,7 @@
   if (utility_process_running_elevated_) {
 #if defined(OS_WIN) && BUILDFLAG(ENABLE_EXTENSIONS)
     service_manager::EmbeddedServiceInfo service_info;
-    service_info.factory =
-        base::Bind(&chrome::WifiUtilWinService::CreateService);
+    service_info.factory = base::Bind(&WifiUtilWinService::CreateService);
     services->emplace(chrome::mojom::kWifiUtilWinServiceName, service_info);
 
     RegisterRemovableStorageWriterService(services);
@@ -253,7 +252,7 @@
 #if defined(OS_WIN)
   {
     service_manager::EmbeddedServiceInfo service_info;
-    service_info.factory = base::Bind(&chrome::UtilWinService::CreateService);
+    service_info.factory = base::Bind(&UtilWinService::CreateService);
     services->emplace(chrome::mojom::kUtilWinServiceName, service_info);
   }
 #endif
@@ -261,7 +260,7 @@
 #if defined(FULL_SAFE_BROWSING) || defined(OS_CHROMEOS)
   {
     service_manager::EmbeddedServiceInfo service_info;
-    service_info.factory = base::Bind(&chrome::FileUtilService::CreateService);
+    service_info.factory = base::Bind(&FileUtilService::CreateService);
     services->emplace(chrome::mojom::kFileUtilServiceName, service_info);
   }
 #endif
@@ -275,8 +274,7 @@
 #if BUILDFLAG(ENABLE_EXTENSIONS)
   {
     service_manager::EmbeddedServiceInfo service_info;
-    service_info.factory =
-        base::Bind(&chrome::MediaGalleryUtilService::CreateService);
+    service_info.factory = base::Bind(&MediaGalleryUtilService::CreateService);
     services->emplace(chrome::mojom::kMediaGalleryUtilServiceName,
                       service_info);
   }
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index 0156e4d1..451e7d2 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -129,7 +129,6 @@
 #include "skia/ext/event_tracer_impl.h"
 #include "skia/ext/skia_memory_dump_provider.h"
 #include "sql/sql_memory_dump_provider.h"
-#include "third_party/boringssl/src/include/openssl/evp.h"
 #include "ui/base/clipboard/clipboard.h"
 #include "ui/base/ui_base_switches.h"
 #include "ui/base/ui_base_switches_util.h"
diff --git a/content/browser/renderer_host/browser_compositor_view_mac.h b/content/browser/renderer_host/browser_compositor_view_mac.h
index 94b898df..251b94d 100644
--- a/content/browser/renderer_host/browser_compositor_view_mac.h
+++ b/content/browser/renderer_host/browser_compositor_view_mac.h
@@ -115,6 +115,10 @@
   // Returns nullptr if no compositor is attached.
   ui::Compositor* CompositorForTesting() const;
 
+  // Forces a new LocalSurfaceId to be allocated. Called when properties that
+  // need to be synchronized between browser and renderer changes.
+  void AllocateNewLocalSurfaceId();
+
  private:
   // The state of |delegated_frame_host_| and |recyclable_compositor_| to
   // manage being visible, hidden, or occluded.
diff --git a/content/browser/renderer_host/browser_compositor_view_mac.mm b/content/browser/renderer_host/browser_compositor_view_mac.mm
index c21fe756..a77f75e 100644
--- a/content/browser/renderer_host/browser_compositor_view_mac.mm
+++ b/content/browser/renderer_host/browser_compositor_view_mac.mm
@@ -552,4 +552,9 @@
   return nullptr;
 }
 
+void BrowserCompositorMac::AllocateNewLocalSurfaceId() {
+  delegated_frame_host_surface_id_ =
+      parent_local_surface_id_allocator_.GenerateId();
+}
+
 }  // namespace content
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index d7ee1c0..8c7a700e 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -206,6 +206,7 @@
 #include "services/service_manager/runner/common/switches.h"
 #include "services/service_manager/sandbox/switches.h"
 #include "storage/browser/fileapi/sandbox_file_system_backend.h"
+#include "third_party/WebKit/common/page/launching_process_state.h"
 #include "third_party/WebKit/public/public_features.h"
 #include "third_party/skia/include/core/SkBitmap.h"
 #include "ui/base/ui_base_switches.h"
@@ -275,15 +276,6 @@
 const RenderProcessHostFactory* g_render_process_host_factory_ = nullptr;
 const char kSiteProcessMapKeyName[] = "content_site_process_map";
 
-#if defined(OS_ANDROID)
-// This matches Android's ChildProcessConnection state before OnProcessLaunched.
-constexpr bool kLaunchingProcessIsBackgrounded = true;
-constexpr bool kLaunchingProcessIsBoostedForPendingView = true;
-#else
-constexpr bool kLaunchingProcessIsBackgrounded = false;
-constexpr bool kLaunchingProcessIsBoostedForPendingView = false;
-#endif
-
 #if BUILDFLAG(ENABLE_WEBRTC)
 const base::FilePath::CharType kAecDumpFileNameAddition[] =
     FILE_PATH_LITERAL("aec_dump");
@@ -1305,8 +1297,8 @@
       route_provider_binding_(this),
       visible_widgets_(0),
       priority_({
-            kLaunchingProcessIsBackgrounded,
-            kLaunchingProcessIsBoostedForPendingView,
+        blink::kLaunchingProcessIsBackgrounded,
+            blink::kLaunchingProcessIsBoostedForPendingView,
 #if defined(OS_ANDROID)
             ChildProcessImportance::NORMAL,
 #endif
@@ -3807,9 +3799,9 @@
 
 void RenderProcessHostImpl::UpdateProcessPriority() {
   if (!child_process_launcher_.get() || child_process_launcher_->IsStarting()) {
-    priority_.background = kLaunchingProcessIsBackgrounded;
+    priority_.background = blink::kLaunchingProcessIsBackgrounded;
     priority_.boost_for_pending_views =
-        kLaunchingProcessIsBoostedForPendingView;
+        blink::kLaunchingProcessIsBoostedForPendingView;
     return;
   }
 
@@ -3873,7 +3865,7 @@
 
   if (child_process_launcher_) {
     DCHECK(child_process_launcher_->GetProcess().IsValid());
-    DCHECK_EQ(kLaunchingProcessIsBackgrounded, priority_.background);
+    DCHECK_EQ(blink::kLaunchingProcessIsBackgrounded, priority_.background);
 
     // Unpause the channel now that the process is launched. We don't flush it
     // yet to ensure that any initialization messages sent here (e.g., things
@@ -3896,7 +3888,7 @@
 #elif defined(OS_ANDROID)
     // Android child process priority works differently and cannot be queried
     // directly from base::Process.
-    DCHECK_EQ(kLaunchingProcessIsBackgrounded, priority_.background);
+    DCHECK_EQ(blink::kLaunchingProcessIsBackgrounded, priority_.background);
 #else
     priority_.background =
         child_process_launcher_->GetProcess().IsProcessBackgrounded();
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 5f24ca9..509193bb 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -864,18 +864,6 @@
   }
 }
 
-void RenderWidgetHostViewAura::UpdateScreenInfo(gfx::NativeView view) {
-  RenderWidgetHostViewBase::UpdateScreenInfo(view);
-  if (!host_->auto_resize_enabled())
-    return;
-
-  window_->AllocateLocalSurfaceId();
-  host_->DidAllocateLocalSurfaceIdForAutoResize(
-      host_->last_auto_resize_request_number());
-  if (delegated_frame_host_)
-    delegated_frame_host_->WasResized();
-}
-
 gfx::Size RenderWidgetHostViewAura::GetRequestedRendererSize() const {
   return delegated_frame_host_
              ? delegated_frame_host_->GetRequestedRendererSize()
@@ -2478,4 +2466,14 @@
   }
 }
 
+void RenderWidgetHostViewAura::OnSynchronizedDisplayPropertiesChanged() {
+  window_->AllocateLocalSurfaceId();
+  if (delegated_frame_host_)
+    delegated_frame_host_->WasResized();
+  if (host_->auto_resize_enabled()) {
+    host_->DidAllocateLocalSurfaceIdForAutoResize(
+        host_->last_auto_resize_request_number());
+  }
+}
+
 }  // namespace content
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h
index 91fff1b4..c088c8d 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.h
+++ b/content/browser/renderer_host/render_widget_host_view_aura.h
@@ -138,7 +138,6 @@
                          int error_code) override;
   void Destroy() override;
   void SetTooltipText(const base::string16& tooltip_text) override;
-  void UpdateScreenInfo(gfx::NativeView view) override;
   gfx::Size GetRequestedRendererSize() const override;
   bool IsSurfaceAvailableForCopy() const override;
   void CopyFromSurface(const gfx::Rect& src_rect,
@@ -204,6 +203,7 @@
   void ScheduleEmbed(ui::mojom::WindowTreeClientPtr client,
                      base::OnceCallback<void(const base::UnguessableToken&)>
                          callback) override;
+  void OnSynchronizedDisplayPropertiesChanged() override;
 
   // Overridden from ui::TextInputClient:
   void SetCompositionText(const ui::CompositionText& composition) override;
diff --git a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
index 2ec45c37..c0a6799 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
@@ -2322,9 +2322,9 @@
   sink_->ClearMessages();
   aura_test_helper_->test_screen()->SetDeviceScaleFactor(2.0f);
 
-  EXPECT_EQ(2u, sink_->message_count());
+  EXPECT_EQ(1u, sink_->message_count());
   {
-    const IPC::Message* msg = sink_->GetMessageAt(1);
+    const IPC::Message* msg = sink_->GetMessageAt(0);
     EXPECT_EQ(static_cast<uint32_t>(ViewMsg_SetLocalSurfaceIdForAutoResize::ID),
               msg->type());
     ViewMsg_SetLocalSurfaceIdForAutoResize::Param params;
@@ -3081,6 +3081,7 @@
       view_->GetNativeView(), parent_view_->GetNativeView()->GetRootWindow(),
       gfx::Rect());
 
+  view_->window_->layer()->SetShowSolidColorContent();
   EXPECT_FALSE(view_->HasPrimarySurface());
   ASSERT_TRUE(view_->delegated_frame_host_);
 
@@ -3107,7 +3108,6 @@
 
   // Prevent the DelegatedFrameHost from skipping frames.
   view_->DisableResizeLock();
-  EXPECT_FALSE(view_->HasPrimarySurface());
   ASSERT_TRUE(view_->delegated_frame_host_);
 
   view_->SetSize(gfx::Size(300, 300));
@@ -3143,7 +3143,6 @@
 
   // Prevent the DelegatedFrameHost from skipping frames.
   view_->DisableResizeLock();
-  EXPECT_FALSE(view_->HasPrimarySurface());
 
   view_->SetSize(gfx::Size(300, 300));
   ASSERT_TRUE(view_->HasPrimarySurface());
diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc
index 95c399e..287172c8 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.cc
+++ b/content/browser/renderer_host/render_widget_host_view_base.cc
@@ -250,8 +250,10 @@
   if (impl && impl->delegate())
     impl->delegate()->SendScreenRects();
 
-  if (HasDisplayPropertyChanged(view) && impl)
+  if (HasDisplayPropertyChanged(view) && impl) {
+    OnSynchronizedDisplayPropertiesChanged();
     impl->NotifyScreenInfoChanged();
+  }
 }
 
 bool RenderWidgetHostViewBase::HasDisplayPropertyChanged(gfx::NativeView view) {
diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h
index 8e25605..4220d61 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.h
+++ b/content/browser/renderer_host/render_widget_host_view_base.h
@@ -155,7 +155,7 @@
   void DidReceiveRendererFrame();
 
   // Notification that a resize or move session ended on the native widget.
-  virtual void UpdateScreenInfo(gfx::NativeView view);
+  void UpdateScreenInfo(gfx::NativeView view);
 
   // Tells if the display property (work area/scale factor) has
   // changed since the last time.
@@ -555,6 +555,12 @@
                           const base::UnguessableToken& token);
 #endif
 
+  // Called when display properties that need to be synchronized with the
+  // renderer process changes. This method is called before notifying
+  // RenderWidgetHostImpl in order to allow the view to allocate a new
+  // LocalSurfaceId.
+  virtual void OnSynchronizedDisplayPropertiesChanged() {}
+
   gfx::Rect current_display_area_;
 
   uint32_t renderer_frame_number_;
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h
index 56d4f9d..69d15e34 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
+++ b/content/browser/renderer_host/render_widget_host_view_mac.h
@@ -310,7 +310,6 @@
                          int error_code) override;
   void Destroy() override;
   void SetTooltipText(const base::string16& tooltip_text) override;
-  void UpdateScreenInfo(gfx::NativeView view) override;
   bool IsSurfaceAvailableForCopy() const override;
   void CopyFromSurface(const gfx::Rect& src_rect,
                        const gfx::Size& output_size,
@@ -341,6 +340,7 @@
 
   bool HasAcceleratedSurface(const gfx::Size& desired_size) override;
   gfx::Rect GetBoundsInRootWindow() override;
+  void OnSynchronizedDisplayPropertiesChanged() override;
 
   bool LockMouse() override;
   void UnlockMouse() override;
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index 0574d766..54014f4 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -1086,15 +1086,17 @@
   }
 }
 
-void RenderWidgetHostViewMac::UpdateScreenInfo(gfx::NativeView view) {
-  RenderWidgetHostViewBase::UpdateScreenInfo(view);
-
-  if (!render_widget_host_ || !render_widget_host_->auto_resize_enabled())
+void RenderWidgetHostViewMac::OnSynchronizedDisplayPropertiesChanged() {
+  if (!render_widget_host_)
     return;
 
-  render_widget_host_->DidAllocateLocalSurfaceIdForAutoResize(
-      render_widget_host_->last_auto_resize_request_number());
+  browser_compositor_->AllocateNewLocalSurfaceId();
   browser_compositor_->WasResized();
+
+  if (render_widget_host_->auto_resize_enabled()) {
+    render_widget_host_->DidAllocateLocalSurfaceIdForAutoResize(
+        render_widget_host_->last_auto_resize_request_number());
+  }
 }
 
 bool RenderWidgetHostViewMac::SupportsSpeech() const {
diff --git a/content/public/browser/BUILD.gn b/content/public/browser/BUILD.gn
index 7fb60ea..5bb4fc4 100644
--- a/content/public/browser/BUILD.gn
+++ b/content/public/browser/BUILD.gn
@@ -334,7 +334,6 @@
     "//media",
     "//net",
     "//ppapi/c",
-    "//services/device/public/interfaces",
     "//ui/accessibility",
     "//ui/base",
     "//ui/events",
diff --git a/content/public/browser/DEPS b/content/public/browser/DEPS
index 6d9af493..cce73d8 100644
--- a/content/public/browser/DEPS
+++ b/content/public/browser/DEPS
@@ -1,9 +1,7 @@
 include_rules = [
-  "+content/common/input/input_handler.mojom.h",
   "+components/viz/common",
   "+device/geolocation/public/cpp",
   "+device/usb/public/interfaces",
-  "+device/screen_orientation/public/interfaces",
   "+services/device/public/interfaces",
   "+services/service_manager/sandbox",
   "+services/resource_coordinator/public",
diff --git a/content/test/gpu/gpu_tests/pixel_expectations.py b/content/test/gpu/gpu_tests/pixel_expectations.py
index 068d38e..2af9b843 100644
--- a/content/test/gpu/gpu_tests/pixel_expectations.py
+++ b/content/test/gpu/gpu_tests/pixel_expectations.py
@@ -96,6 +96,3 @@
     # Failing on NVIDIA Shield TV; not sure why yet.
     self.Fail('Pixel_WebGL_PremultipliedAlpha_False',
               ['android', 'nvidia'], bug=791733)
-
-    # Flaky on Win7
-    self.Flaky('Pixel_2DCanvasWebGL', ['win'], bug=796289)
diff --git a/gpu/command_buffer/common/gles2_cmd_utils.cc b/gpu/command_buffer/common/gles2_cmd_utils.cc
index fc600e3..8901681 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils.cc
+++ b/gpu/command_buffer/common/gles2_cmd_utils.cc
@@ -1829,37 +1829,6 @@
   return format;
 }
 
-namespace {
-
-// GL context configuration attributes. Those in the 16-bit range are the same
-// as used by EGL. Those outside the 16-bit range are unique to Chromium.
-// Attributes are matched using a closest fit algorithm.
-
-// From <EGL/egl.h>.
-#include <stddef.h>
-#include <stdint.h>
-const int32_t kAlphaSize = 0x3021;        // EGL_ALPHA_SIZE
-const int32_t kBlueSize = 0x3022;         // EGL_BLUE_SIZE
-const int32_t kGreenSize = 0x3023;        // EGL_GREEN_SIZE
-const int32_t kRedSize = 0x3024;          // EGL_RED_SIZE
-const int32_t kDepthSize = 0x3025;        // EGL_DEPTH_SIZE
-const int32_t kStencilSize = 0x3026;      // EGL_STENCIL_SIZE
-const int32_t kSamples = 0x3031;          // EGL_SAMPLES
-const int32_t kSampleBuffers = 0x3032;    // EGL_SAMPLE_BUFFERS
-const int32_t kNone = 0x3038;             // EGL_NONE
-const int32_t kSwapBehavior = 0x3093;     // EGL_SWAP_BEHAVIOR
-const int32_t kBufferPreserved = 0x3094;  // EGL_BUFFER_PRESERVED
-const int32_t kSingleBuffer = 0x3085;     // EGL_SINGLE_BUFFER
-
-// Chromium only.
-const int32_t kBindGeneratesResource = 0x10000;
-const int32_t kFailIfMajorPerfCaveat = 0x10001;
-const int32_t kLoseContextWhenOutOfMemory = 0x10002;
-const int32_t kShouldUseNativeGMBForBackbuffer = 0x10003;
-const int32_t kContextType = 0x10004;
-
-}  // namespace
-
 bool IsWebGLContextType(ContextType context_type) {
   // Switch statement to cause a compile-time error if we miss a case.
   switch (context_type) {
@@ -1910,78 +1879,6 @@
 ContextCreationAttribHelper::ContextCreationAttribHelper(
     const ContextCreationAttribHelper& other) = default;
 
-bool ContextCreationAttribHelper::Parse(const std::vector<int32_t>& attribs) {
-  for (size_t i = 0; i < attribs.size(); i += 2) {
-    const int32_t attrib = attribs[i];
-    if (i + 1 >= attribs.size()) {
-      if (attrib == kNone) {
-        return true;
-      }
-
-      DLOG(ERROR) << "Missing value after context creation attribute: "
-                  << attrib;
-      return false;
-    }
-
-    const int32_t value = attribs[i + 1];
-    switch (attrib) {
-      case kAlphaSize:
-        alpha_size = value;
-        break;
-      case kBlueSize:
-        blue_size = value;
-        break;
-      case kGreenSize:
-        green_size = value;
-        break;
-      case kRedSize:
-        red_size = value;
-        break;
-      case kDepthSize:
-        depth_size = value;
-        break;
-      case kStencilSize:
-        stencil_size = value;
-        break;
-      case kSamples:
-        samples = value;
-        break;
-      case kSampleBuffers:
-        sample_buffers = value;
-        break;
-      case kSwapBehavior:
-        buffer_preserved = value == kBufferPreserved;
-        break;
-      case kBindGeneratesResource:
-        bind_generates_resource = value != 0;
-        break;
-      case kFailIfMajorPerfCaveat:
-        fail_if_major_perf_caveat = value != 0;
-        break;
-      case kLoseContextWhenOutOfMemory:
-        lose_context_when_out_of_memory = value != 0;
-        break;
-      case kShouldUseNativeGMBForBackbuffer:
-        should_use_native_gmb_for_backbuffer = value != 0;
-        break;
-      case kSingleBuffer:
-        single_buffer = value != 0;
-        break;
-      case kContextType:
-        context_type = static_cast<ContextType>(value);
-        break;
-      case kNone:
-        // Terminate list, even if more attributes.
-        return true;
-      default:
-        DLOG(ERROR) << "Invalid context creation attribute: " << attrib;
-        return false;
-    }
-  }
-
-  return true;
-}
-
 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h"
 
 }  // namespace gles2
diff --git a/gpu/command_buffer/common/gles2_cmd_utils.h b/gpu/command_buffer/common/gles2_cmd_utils.h
index 0044d5b..66c2991 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils.h
+++ b/gpu/command_buffer/common/gles2_cmd_utils.h
@@ -323,8 +323,6 @@
   ContextCreationAttribHelper();
   ContextCreationAttribHelper(const ContextCreationAttribHelper& other);
 
-  bool Parse(const std::vector<int32_t>& attribs);
-
   gfx::Size offscreen_framebuffer_size;
   gl::GpuPreference gpu_preference = gl::PreferIntegratedGpu;
   // -1 if invalid or unspecified.
diff --git a/ios/chrome/browser/ui/toolbar/clean/toolbar_view_controller.mm b/ios/chrome/browser/ui/toolbar/clean/toolbar_view_controller.mm
index d968c08..7e91505 100644
--- a/ios/chrome/browser/ui/toolbar/clean/toolbar_view_controller.mm
+++ b/ios/chrome/browser/ui/toolbar/clean/toolbar_view_controller.mm
@@ -950,11 +950,11 @@
 #pragma mark - BubbleViewAnchorPointProvider
 
 - (CGPoint)anchorPointForTabSwitcherButton:(BubbleArrowDirection)direction {
-  CGPoint anchorPoint =
-      bubble_util::AnchorPoint(self.tabSwitchStripButton.frame, direction);
-  return [self.tabSwitchStripButton.superview
+  CGPoint anchorPoint = bubble_util::AnchorPoint(
+      self.tabSwitchStripButton.imageView.frame, direction);
+  return [self.tabSwitchStripButton.imageView.superview
       convertPoint:anchorPoint
-            toView:self.tabSwitchStripButton.window];
+            toView:self.tabSwitchStripButton.imageView.window];
 }
 
 - (CGPoint)anchorPointForToolsMenuButton:(BubbleArrowDirection)direction {
diff --git a/ppapi/proxy/ppb_graphics_3d_proxy.cc b/ppapi/proxy/ppb_graphics_3d_proxy.cc
index b2cd6e5..973e46d 100644
--- a/ppapi/proxy/ppb_graphics_3d_proxy.cc
+++ b/ppapi/proxy/ppb_graphics_3d_proxy.cc
@@ -169,36 +169,61 @@
   }
 
   gpu::gles2::ContextCreationAttribHelper attrib_helper;
-  std::vector<int32_t> attribs;
   if (attrib_list) {
     for (const int32_t* attr = attrib_list; attr[0] != PP_GRAPHICS3DATTRIB_NONE;
          attr += 2) {
-      switch (attr[0]) {
+      int32_t key = attr[0];
+      int32_t value = attr[1];
+      switch (key) {
+        case PP_GRAPHICS3DATTRIB_ALPHA_SIZE:
+          attrib_helper.alpha_size = value;
+          break;
+        case PP_GRAPHICS3DATTRIB_BLUE_SIZE:
+          attrib_helper.blue_size = value;
+          break;
+        case PP_GRAPHICS3DATTRIB_GREEN_SIZE:
+          attrib_helper.green_size = value;
+          break;
+        case PP_GRAPHICS3DATTRIB_RED_SIZE:
+          attrib_helper.red_size = value;
+          break;
+        case PP_GRAPHICS3DATTRIB_DEPTH_SIZE:
+          attrib_helper.depth_size = value;
+          break;
+        case PP_GRAPHICS3DATTRIB_STENCIL_SIZE:
+          attrib_helper.stencil_size = value;
+          break;
+        case PP_GRAPHICS3DATTRIB_SAMPLES:
+          attrib_helper.samples = value;
+          break;
+        case PP_GRAPHICS3DATTRIB_SAMPLE_BUFFERS:
+          attrib_helper.sample_buffers = value;
+          break;
+        case PP_GRAPHICS3DATTRIB_SWAP_BEHAVIOR:
+          attrib_helper.buffer_preserved =
+              value == PP_GRAPHICS3DATTRIB_BUFFER_PRESERVED;
+          break;
         case PP_GRAPHICS3DATTRIB_WIDTH:
-          attrib_helper.offscreen_framebuffer_size.set_width(attr[1]);
+          attrib_helper.offscreen_framebuffer_size.set_width(value);
           break;
         case PP_GRAPHICS3DATTRIB_HEIGHT:
-          attrib_helper.offscreen_framebuffer_size.set_height(attr[1]);
+          attrib_helper.offscreen_framebuffer_size.set_height(value);
           break;
         case PP_GRAPHICS3DATTRIB_GPU_PREFERENCE:
           attrib_helper.gpu_preference =
-              (attr[1] == PP_GRAPHICS3DATTRIB_GPU_PREFERENCE_LOW_POWER)
+              (value == PP_GRAPHICS3DATTRIB_GPU_PREFERENCE_LOW_POWER)
                   ? gl::PreferIntegratedGpu
                   : gl::PreferDiscreteGpu;
           break;
         case PP_GRAPHICS3DATTRIB_SINGLE_BUFFER:
-          attrib_helper.single_buffer = !!attr[1];
+          attrib_helper.single_buffer = !!value;
           break;
         default:
-          attribs.push_back(attr[0]);
-          attribs.push_back(attr[1]);
-          break;
+          DLOG(ERROR) << "Invalid context creation attribute: " << attr[0];
+          return 0;
       }
     }
-    attribs.push_back(PP_GRAPHICS3DATTRIB_NONE);
   }
-  if (!attrib_helper.Parse(attribs))
-    return 0;
 
   HostResource result;
   gpu::Capabilities capabilities;
diff --git a/third_party/WebKit/Source/bindings/core/v8/BUILD.gn b/third_party/WebKit/Source/bindings/core/v8/BUILD.gn
index edd9aada..332cbbf9 100644
--- a/third_party/WebKit/Source/bindings/core/v8/BUILD.gn
+++ b/third_party/WebKit/Source/bindings/core/v8/BUILD.gn
@@ -145,8 +145,7 @@
   ]
 }
 
-if (is_win || use_jumbo_build) {
-  # On Windows Official release builds, we try to preserve symbol space.
+if (use_jumbo_build) {
   bindings_core_generated_interface_files =
       [ "$bindings_core_v8_output_dir/V8GeneratedCoreBindings.cpp" ]
 } else {
@@ -173,7 +172,7 @@
   public_deps = [
     ":bindings_core_impl_generated",
   ]
-  if (is_win || use_jumbo_build) {
+  if (use_jumbo_build) {
     public_deps += [ ":generate_bindings_core_v8_all_interfaces" ]
   } else {
     public_deps += [ ":generate_bindings_core_v8_interfaces" ]
diff --git a/third_party/WebKit/Source/platform/scheduler/renderer/queueing_time_estimator.h b/third_party/WebKit/Source/platform/scheduler/renderer/queueing_time_estimator.h
index 18d0fb9..e76306f 100644
--- a/third_party/WebKit/Source/platform/scheduler/renderer/queueing_time_estimator.h
+++ b/third_party/WebKit/Source/platform/scheduler/renderer/queueing_time_estimator.h
@@ -10,6 +10,7 @@
 #include "platform/PlatformExport.h"
 #include "platform/scheduler/renderer/main_thread_task_queue.h"
 #include "platform/scheduler/renderer/renderer_metrics_helper.h"
+#include "third_party/WebKit/common/page/launching_process_state.h"
 
 #include <array>
 #include <vector>
@@ -125,7 +126,7 @@
     base::TimeTicks step_start_time;
     base::TimeTicks current_task_start_time;
     // |renderer_backgrounded| is the renderer's current status.
-    bool renderer_backgrounded = false;
+    bool renderer_backgrounded = kLaunchingProcessIsBackgrounded;
     bool processing_task = false;
     Calculator calculator_;
 
diff --git a/third_party/WebKit/Source/platform/scheduler/renderer/queueing_time_estimator_unittest.cc b/third_party/WebKit/Source/platform/scheduler/renderer/queueing_time_estimator_unittest.cc
index dd9b0b1..0f2eec3 100644
--- a/third_party/WebKit/Source/platform/scheduler/renderer/queueing_time_estimator_unittest.cc
+++ b/third_party/WebKit/Source/platform/scheduler/renderer/queueing_time_estimator_unittest.cc
@@ -10,6 +10,7 @@
 #include "platform/testing/HistogramTester.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/WebKit/common/page/launching_process_state.h"
 
 #include <map>
 #include <string>
@@ -76,8 +77,14 @@
  public:
   QueueingTimeEstimatorForTest(TestQueueingTimeEstimatorClient* client,
                                base::TimeDelta window_duration,
-                               int steps_per_window)
-      : QueueingTimeEstimator(client, window_duration, steps_per_window) {}
+                               int steps_per_window,
+                               base::TimeTicks time)
+      : QueueingTimeEstimator(client, window_duration, steps_per_window) {
+    // If initial state is not foregrounded, foreground.
+    if (kLaunchingProcessIsBackgrounded) {
+      this->OnRendererStateChanged(false, time);
+    }
+  }
 };
 
 struct BucketExpectation {
@@ -136,8 +143,8 @@
 // multiplied by the expected queueing time within a task (0.5 seconds). Thus we
 // expect a queueing time of 0.3 seconds.
 TEST_F(QueueingTimeEstimatorTest, AllTasksWithinWindow) {
-  QueueingTimeEstimatorForTest estimator(&client,
-                                         base::TimeDelta::FromSeconds(5), 1);
+  QueueingTimeEstimatorForTest estimator(
+      &client, base::TimeDelta::FromSeconds(5), 1, time);
   for (int i = 0; i < 3; ++i) {
     estimator.OnTopLevelTaskStarted(time, nullptr);
     time += base::TimeDelta::FromMilliseconds(1000);
@@ -167,8 +174,8 @@
 // Window 5: Probability of being within task = 3/5. Expected delay within task:
 // avg(3, 0). Total expected queueing time = 0.9s.
 TEST_F(QueueingTimeEstimatorTest, MultiWindowTask) {
-  QueueingTimeEstimatorForTest estimator(&client,
-                                         base::TimeDelta::FromSeconds(5), 1);
+  QueueingTimeEstimatorForTest estimator(
+      &client, base::TimeDelta::FromSeconds(5), 1, time);
   time += base::TimeDelta::FromMilliseconds(5000);
   estimator.OnTopLevelTaskStarted(time, nullptr);
   estimator.OnTopLevelTaskCompleted(time);
@@ -208,8 +215,8 @@
 // In this example, the queueing time comes from the current, incomplete window.
 TEST_F(QueueingTimeEstimatorTest,
        EstimateQueueingTimeDuringSingleLongTaskIncompleteWindow) {
-  QueueingTimeEstimatorForTest estimator(&client,
-                                         base::TimeDelta::FromSeconds(5), 1);
+  QueueingTimeEstimatorForTest estimator(
+      &client, base::TimeDelta::FromSeconds(5), 1, time);
   time += base::TimeDelta::FromMilliseconds(5000);
   estimator.OnTopLevelTaskStarted(time, nullptr);
   estimator.OnTopLevelTaskCompleted(time);
@@ -235,8 +242,8 @@
 // fills the whole window. Expected delay within this task = avg(8, 3) = 5.5.
 TEST_F(QueueingTimeEstimatorTest,
        EstimateQueueingTimeDuringSingleLongTaskExceedingWindow) {
-  QueueingTimeEstimatorForTest estimator(&client,
-                                         base::TimeDelta::FromSeconds(5), 1);
+  QueueingTimeEstimatorForTest estimator(
+      &client, base::TimeDelta::FromSeconds(5), 1, time);
   time += base::TimeDelta::FromMilliseconds(5000);
   estimator.OnTopLevelTaskStarted(time, nullptr);
   estimator.OnTopLevelTaskCompleted(time);
@@ -271,8 +278,8 @@
 // So EQT = max(EQT(win1), EQT(win2)) = 3
 TEST_F(QueueingTimeEstimatorTest,
        SlidingWindowEstimateQueueingTimeFullWindowLargerThanPartial) {
-  QueueingTimeEstimatorForTest estimator(&client,
-                                         base::TimeDelta::FromSeconds(5), 5);
+  QueueingTimeEstimatorForTest estimator(
+      &client, base::TimeDelta::FromSeconds(5), 5, time);
   time += base::TimeDelta::FromMilliseconds(5000);
   estimator.OnTopLevelTaskStarted(time, nullptr);
   estimator.OnTopLevelTaskCompleted(time);
@@ -313,8 +320,8 @@
 // So EQT = max(EQT(win1), EQT(win2)) = 0.025
 TEST_F(QueueingTimeEstimatorTest,
        SlidingWindowEstimateQueueingTimePartialWindowLargerThanFull) {
-  QueueingTimeEstimatorForTest estimator(&client,
-                                         base::TimeDelta::FromSeconds(5), 5);
+  QueueingTimeEstimatorForTest estimator(
+      &client, base::TimeDelta::FromSeconds(5), 5, time);
   time += base::TimeDelta::FromMilliseconds(5000);
   estimator.OnTopLevelTaskStarted(time, nullptr);
   estimator.OnTopLevelTaskCompleted(time);
@@ -336,8 +343,8 @@
 // Tasks containing nested run loops may be extremely long without
 // negatively impacting user experience. Ignore such tasks.
 TEST_F(QueueingTimeEstimatorTest, IgnoresTasksWithNestedMessageLoops) {
-  QueueingTimeEstimatorForTest estimator(&client,
-                                         base::TimeDelta::FromSeconds(5), 1);
+  QueueingTimeEstimatorForTest estimator(
+      &client, base::TimeDelta::FromSeconds(5), 1, time);
   time += base::TimeDelta::FromMilliseconds(5000);
   estimator.OnTopLevelTaskStarted(time, nullptr);
   estimator.OnTopLevelTaskCompleted(time);
@@ -375,8 +382,8 @@
 // went to sleep during a task, resulting in an extremely long task. Ignore
 // these long tasks completely.
 TEST_F(QueueingTimeEstimatorTest, IgnoreExtremelyLongTasks) {
-  QueueingTimeEstimatorForTest estimator(&client,
-                                         base::TimeDelta::FromSeconds(5), 1);
+  QueueingTimeEstimatorForTest estimator(
+      &client, base::TimeDelta::FromSeconds(5), 1, time);
   time += base::TimeDelta::FromMilliseconds(5000);
   // Start with a 1 second task.
   estimator.OnTopLevelTaskStarted(time, nullptr);
@@ -425,8 +432,8 @@
 // If we idle for too long, ignore idling time, even if the renderer is on the
 // foreground. Perhaps the user's machine went to sleep while we were idling.
 TEST_F(QueueingTimeEstimatorTest, IgnoreExtremelyLongIdlePeriods) {
-  QueueingTimeEstimatorForTest estimator(&client,
-                                         base::TimeDelta::FromSeconds(5), 1);
+  QueueingTimeEstimatorForTest estimator(
+      &client, base::TimeDelta::FromSeconds(5), 1, time);
   time += base::TimeDelta::FromMilliseconds(5000);
   // Start with a 1 second task.
   estimator.OnTopLevelTaskStarted(time, nullptr);
@@ -485,8 +492,8 @@
 //       |---win---|
 //         |---win---|
 TEST_F(QueueingTimeEstimatorTest, SlidingWindowOverOneTask) {
-  QueueingTimeEstimatorForTest estimator(&client,
-                                         base::TimeDelta::FromSeconds(5), 5);
+  QueueingTimeEstimatorForTest estimator(
+      &client, base::TimeDelta::FromSeconds(5), 5, time);
   time += base::TimeDelta::FromMilliseconds(1000);
 
   estimator.OnTopLevelTaskStarted(time, nullptr);
@@ -531,8 +538,8 @@
 //       |---win---|
 //         |---win---|
 TEST_F(QueueingTimeEstimatorTest, SlidingWindowOverTwoTasksWithinFirstWindow) {
-  QueueingTimeEstimatorForTest estimator(&client,
-                                         base::TimeDelta::FromSeconds(5), 5);
+  QueueingTimeEstimatorForTest estimator(
+      &client, base::TimeDelta::FromSeconds(5), 5, time);
   time += base::TimeDelta::FromMilliseconds(1000);
 
   estimator.OnTopLevelTaskStarted(time, nullptr);
@@ -585,8 +592,8 @@
 //         |---win---|
 TEST_F(QueueingTimeEstimatorTest,
        SlidingWindowOverTwoTasksSpanningSeveralWindows) {
-  QueueingTimeEstimatorForTest estimator(&client,
-                                         base::TimeDelta::FromSeconds(5), 5);
+  QueueingTimeEstimatorForTest estimator(
+      &client, base::TimeDelta::FromSeconds(5), 5, time);
   time += base::TimeDelta::FromMilliseconds(1000);
   estimator.OnTopLevelTaskStarted(time, nullptr);
   estimator.OnTopLevelTaskCompleted(time);
@@ -634,8 +641,8 @@
 // backgrounded renderer. EQT(win1) = 0. EQT(win3) = (1500+500)/2 = 1000.
 // EQT(win4) = 1/2*500/2 = 250. EQT(win7) = 1/5*200/2 = 20.
 TEST_F(QueueingTimeEstimatorTest, BackgroundedEQTsWithSingleStepPerWindow) {
-  QueueingTimeEstimatorForTest estimator(&client,
-                                         base::TimeDelta::FromSeconds(1), 1);
+  QueueingTimeEstimatorForTest estimator(
+      &client, base::TimeDelta::FromSeconds(1), 1, time);
   time += base::TimeDelta::FromMilliseconds(1000);
   estimator.OnTopLevelTaskStarted(time, nullptr);
   estimator.OnTopLevelTaskCompleted(time);
@@ -707,8 +714,8 @@
 // Win8: [12000-17000]. EQT of [16000-17000]: (1700+700)/2 = 1200. EQT(win8) =
 // (145+900+80+1680+1200)/5 = 801.
 TEST_F(QueueingTimeEstimatorTest, BackgroundedEQTsWithMutipleStepsPerWindow) {
-  QueueingTimeEstimatorForTest estimator(&client,
-                                         base::TimeDelta::FromSeconds(5), 5);
+  QueueingTimeEstimatorForTest estimator(
+      &client, base::TimeDelta::FromSeconds(5), 5, time);
   time += base::TimeDelta::FromMilliseconds(5000);
   estimator.OnTopLevelTaskStarted(time, nullptr);
   estimator.OnTopLevelTaskCompleted(time);
@@ -781,8 +788,8 @@
 // other. Two 300 ms (each contributing 9) and one 200 ms tasks (contributes 4)
 // for the other bucket.
 TEST_F(QueueingTimeEstimatorTest, SplitEQTByTaskQueueType) {
-  QueueingTimeEstimatorForTest estimator(&client,
-                                         base::TimeDelta::FromSeconds(5), 5);
+  QueueingTimeEstimatorForTest estimator(
+      &client, base::TimeDelta::FromSeconds(5), 5, time);
   time += base::TimeDelta::FromMilliseconds(5000);
   // Dummy task to initialize the estimator.
   estimator.OnTopLevelTaskStarted(time, nullptr);
@@ -992,8 +999,8 @@
 // other. Two 300 ms (each contributing 9) and one 800 ms tasks (contributes
 // 64) for the other bucket.
 TEST_F(QueueingTimeEstimatorTest, SplitEQTByFrameStatus) {
-  QueueingTimeEstimatorForTest estimator(&client,
-                                         base::TimeDelta::FromSeconds(5), 5);
+  QueueingTimeEstimatorForTest estimator(
+      &client, base::TimeDelta::FromSeconds(5), 5, time);
   time += base::TimeDelta::FromMilliseconds(5000);
   // Dummy task to initialize the estimator.
   estimator.OnTopLevelTaskStarted(time, nullptr);
diff --git a/third_party/WebKit/Source/platform/scheduler/renderer/renderer_metrics_helper_unittest.cc b/third_party/WebKit/Source/platform/scheduler/renderer/renderer_metrics_helper_unittest.cc
index 5d206dfe..1c90d16 100644
--- a/third_party/WebKit/Source/platform/scheduler/renderer/renderer_metrics_helper_unittest.cc
+++ b/third_party/WebKit/Source/platform/scheduler/renderer/renderer_metrics_helper_unittest.cc
@@ -16,6 +16,7 @@
 #include "platform/scheduler/test/fake_web_view_scheduler.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/WebKit/common/page/launching_process_state.h"
 
 namespace blink {
 namespace scheduler {
@@ -206,6 +207,11 @@
   // QueueType::kDefault is checking sub-millisecond task aggregation,
   // FRAME_* tasks are checking normal task aggregation and other
   // queue types have a single task.
+
+  // Make sure that it starts in a foregrounded state.
+  if (kLaunchingProcessIsBackgrounded)
+    scheduler_->SetRendererBackgrounded(false);
+
   RunTask(QueueType::kDefault, Milliseconds(1),
           base::TimeDelta::FromMicroseconds(700));
   RunTask(QueueType::kDefault, Milliseconds(2),
@@ -319,27 +325,46 @@
 
 TEST_F(RendererMetricsHelperTest, BackgroundedRendererTransition) {
   scheduler_->SetStoppingWhenBackgroundedEnabled(true);
-  scheduler_->SetRendererBackgrounded(true);
   typedef BackgroundedRendererTransition Transition;
 
-  EXPECT_THAT(histogram_tester_->GetAllSamples(
-                  "RendererScheduler.BackgroundedRendererTransition"),
-              UnorderedElementsAre(
-                  Bucket(static_cast<int>(Transition::kBackgrounded), 1)));
-
-  scheduler_->SetRendererBackgrounded(false);
-  EXPECT_THAT(histogram_tester_->GetAllSamples(
-                  "RendererScheduler.BackgroundedRendererTransition"),
-              UnorderedElementsAre(
-                  Bucket(static_cast<int>(Transition::kBackgrounded), 1),
-                  Bucket(static_cast<int>(Transition::kForegrounded), 1)));
+  int backgrounding_transitions = 0;
+  int foregrounding_transitions = 0;
+  if (!kLaunchingProcessIsBackgrounded) {
+    scheduler_->SetRendererBackgrounded(true);
+    backgrounding_transitions++;
+    EXPECT_THAT(
+        histogram_tester_->GetAllSamples(
+            "RendererScheduler.BackgroundedRendererTransition"),
+        UnorderedElementsAre(Bucket(static_cast<int>(Transition::kBackgrounded),
+                                    backgrounding_transitions)));
+    scheduler_->SetRendererBackgrounded(false);
+    foregrounding_transitions++;
+    EXPECT_THAT(
+        histogram_tester_->GetAllSamples(
+            "RendererScheduler.BackgroundedRendererTransition"),
+        UnorderedElementsAre(Bucket(static_cast<int>(Transition::kBackgrounded),
+                                    backgrounding_transitions),
+                             Bucket(static_cast<int>(Transition::kForegrounded),
+                                    foregrounding_transitions)));
+  } else {
+    scheduler_->SetRendererBackgrounded(false);
+    foregrounding_transitions++;
+    EXPECT_THAT(
+        histogram_tester_->GetAllSamples(
+            "RendererScheduler.BackgroundedRendererTransition"),
+        UnorderedElementsAre(Bucket(static_cast<int>(Transition::kForegrounded),
+                                    foregrounding_transitions)));
+  }
 
   scheduler_->SetRendererBackgrounded(true);
-  EXPECT_THAT(histogram_tester_->GetAllSamples(
-                  "RendererScheduler.BackgroundedRendererTransition"),
-              UnorderedElementsAre(
-                  Bucket(static_cast<int>(Transition::kBackgrounded), 2),
-                  Bucket(static_cast<int>(Transition::kForegrounded), 1)));
+  backgrounding_transitions++;
+  EXPECT_THAT(
+      histogram_tester_->GetAllSamples(
+          "RendererScheduler.BackgroundedRendererTransition"),
+      UnorderedElementsAre(Bucket(static_cast<int>(Transition::kBackgrounded),
+                                  backgrounding_transitions),
+                           Bucket(static_cast<int>(Transition::kForegrounded),
+                                  foregrounding_transitions)));
 
   // Waste 5+ minutes so that the delayed stop is triggered
   RunTask(QueueType::kDefault, Milliseconds(1),
@@ -352,18 +377,23 @@
   EXPECT_THAT(histogram_tester_->GetAllSamples(
                   "RendererScheduler.BackgroundedRendererTransition"),
               UnorderedElementsAre(
-                  Bucket(static_cast<int>(Transition::kBackgrounded), 2),
-                  Bucket(static_cast<int>(Transition::kForegrounded), 1),
+                  Bucket(static_cast<int>(Transition::kBackgrounded),
+                         backgrounding_transitions),
+                  Bucket(static_cast<int>(Transition::kForegrounded),
+                         foregrounding_transitions),
                   Bucket(static_cast<int>(Transition::kStoppedAfterDelay), 1)));
 
   scheduler_->SetRendererBackgrounded(false);
+  foregrounding_transitions++;
   ForceUpdatePolicy();
   ForceUpdatePolicy();
   EXPECT_THAT(histogram_tester_->GetAllSamples(
                   "RendererScheduler.BackgroundedRendererTransition"),
               UnorderedElementsAre(
-                  Bucket(static_cast<int>(Transition::kBackgrounded), 2),
-                  Bucket(static_cast<int>(Transition::kForegrounded), 2),
+                  Bucket(static_cast<int>(Transition::kBackgrounded),
+                         backgrounding_transitions),
+                  Bucket(static_cast<int>(Transition::kForegrounded),
+                         foregrounding_transitions),
                   Bucket(static_cast<int>(Transition::kStoppedAfterDelay), 1),
                   Bucket(static_cast<int>(Transition::kResumed), 1)));
 }
diff --git a/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc b/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc
index 6ee65f4..138fcfb 100644
--- a/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc
+++ b/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc
@@ -31,6 +31,7 @@
 #include "platform/scheduler/renderer/webthread_impl_for_renderer_scheduler.h"
 #include "public/platform/Platform.h"
 #include "public/platform/scheduler/renderer_process_type.h"
+#include "third_party/WebKit/common/page/launching_process_state.h"
 
 namespace blink {
 namespace scheduler {
@@ -271,7 +272,7 @@
                       "RendererScheduler.Hidden",
                       renderer_scheduler_impl,
                       HiddenStateToString),
-      renderer_backgrounded(false,
+      renderer_backgrounded(kLaunchingProcessIsBackgrounded,
                             "RendererScheduler.Backgrounded",
                             renderer_scheduler_impl,
                             BackgroundStateToString),
@@ -280,11 +281,10 @@
           "RendererScheduler.StoppingWhenBackgroundedEnabled",
           renderer_scheduler_impl,
           YesNoStateToString),
-      stopped_when_backgrounded(
-          false,
-          "RendererScheduler.StoppedWhenBackgrounded",
-          renderer_scheduler_impl,
-          YesNoStateToString),
+      stopped_when_backgrounded(false,
+                                "RendererScheduler.StoppedWhenBackgrounded",
+                                renderer_scheduler_impl,
+                                YesNoStateToString),
       was_shutdown(false,
                    "RendererScheduler.WasShutdown",
                    renderer_scheduler_impl,
@@ -294,11 +294,10 @@
           "RendererScheduler.LoadingTaskEstimatedCostMs",
           renderer_scheduler_impl,
           TimeDeltaToMilliseconds),
-      timer_task_estimated_cost(
-          base::TimeDelta(),
-          "RendererScheduler.TimerTaskEstimatedCostMs",
-          renderer_scheduler_impl,
-          TimeDeltaToMilliseconds),
+      timer_task_estimated_cost(base::TimeDelta(),
+                                "RendererScheduler.TimerTaskEstimatedCostMs",
+                                renderer_scheduler_impl,
+                                TimeDeltaToMilliseconds),
       loading_tasks_seem_expensive(
           false,
           "RendererScheduler.LoadingTasksSeemExpensive",
@@ -312,11 +311,10 @@
                                "RendererScheduler.TouchstartExpectedSoon",
                                renderer_scheduler_impl,
                                YesNoStateToString),
-      have_seen_a_begin_main_frame(
-          false,
-          "RendererScheduler.HasSeenBeginMainFrame",
-          renderer_scheduler_impl,
-          YesNoStateToString),
+      have_seen_a_begin_main_frame(false,
+                                   "RendererScheduler.HasSeenBeginMainFrame",
+                                   renderer_scheduler_impl,
+                                   YesNoStateToString),
       have_reported_blocking_intervention_in_current_policy(
           false,
           "RendererScheduler.HasReportedBlockingInterventionInCurrentPolicy",
diff --git a/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc b/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc
index 1663d197..f20eb1d4 100644
--- a/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc
+++ b/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc
@@ -26,6 +26,7 @@
 #include "platform/testing/RuntimeEnabledFeaturesTestHelpers.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/WebKit/common/page/launching_process_state.h"
 
 namespace blink {
 namespace scheduler {
@@ -288,6 +289,12 @@
 
   void Initialize(std::unique_ptr<RendererSchedulerImplForTest> scheduler) {
     scheduler_ = std::move(scheduler);
+    if (kLaunchingProcessIsBackgrounded) {
+      scheduler_->SetRendererBackgrounded(false);
+      // Reset the policy count as foregrounding would force an initial update.
+      scheduler_->update_policy_count_ = 0;
+      scheduler_->use_cases_.clear();
+    }
     default_task_runner_ = scheduler_->DefaultTaskQueue();
     compositor_task_runner_ = scheduler_->CompositorTaskQueue();
     loading_task_runner_ = scheduler_->LoadingTaskQueue();
diff --git a/third_party/WebKit/common/BUILD.gn b/third_party/WebKit/common/BUILD.gn
index 2f4271d..78b8849d 100644
--- a/third_party/WebKit/common/BUILD.gn
+++ b/third_party/WebKit/common/BUILD.gn
@@ -53,6 +53,7 @@
     "origin_trials/trial_token.h",
     "origin_trials/trial_token_validator.cc",
     "origin_trials/trial_token_validator.h",
+    "page/launching_process_state.h",
     "quota/quota_status_code.h",
     "sandbox_flags.h",
   ]
diff --git a/third_party/WebKit/common/page/launching_process_state.h b/third_party/WebKit/common/page/launching_process_state.h
new file mode 100644
index 0000000..4aaaa5a
--- /dev/null
+++ b/third_party/WebKit/common/page/launching_process_state.h
@@ -0,0 +1,26 @@
+// Copyright 2017 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.
+
+#ifndef THIRD_PARTY_WEBKIT_COMMON_PAGE_LAUNCHING_PROCESS_STATE_H_
+#define THIRD_PARTY_WEBKIT_COMMON_PAGE_LAUNCHING_PROCESS_STATE_H_
+
+#include "build/build_config.h"
+#include "third_party/WebKit/common/common_export.h"
+
+namespace blink {
+
+// This file is used to maintain a consistent initial set of state between the
+// RendererProcessHostImpl and the RendererSchedulerImpl.
+#if defined(OS_ANDROID)
+// This matches Android's ChildProcessConnection state before OnProcessLaunched.
+constexpr bool kLaunchingProcessIsBackgrounded = true;
+constexpr bool kLaunchingProcessIsBoostedForPendingView = true;
+#else
+constexpr bool kLaunchingProcessIsBackgrounded = false;
+constexpr bool kLaunchingProcessIsBoostedForPendingView = false;
+#endif
+
+}  // namespace blink
+
+#endif  // THIRD_PARTY_WEBKIT_COMMON_PAGE_LAUNCHING_PROCESS_STATE_H_
diff --git a/ui/message_center/notification.cc b/ui/message_center/notification.cc
index af6bd704..bb25a39 100644
--- a/ui/message_center/notification.cc
+++ b/ui/message_center/notification.cc
@@ -285,7 +285,8 @@
       break;
   }
   base::string16 display_source_or_default = display_source;
-  if (display_source_or_default.empty()) {
+  // TODO(tetsui): move this function to Ash. Ash should know its own name.
+  if (display_source_or_default.empty() && MessageCenter::Get()) {
     display_source_or_default = l10n_util::GetStringFUTF16(
         IDS_MESSAGE_CENTER_NOTIFICATION_CHROMEOS_SYSTEM,
         MessageCenter::Get()->GetProductOSName());
diff --git a/ui/message_center/views/notification_view_md.cc b/ui/message_center/views/notification_view_md.cc
index 149080c..b147709b 100644
--- a/ui/message_center/views/notification_view_md.cc
+++ b/ui/message_center/views/notification_view_md.cc
@@ -704,6 +704,12 @@
 
 void NotificationViewMD::CreateOrUpdateContextTitleView(
     const Notification& notification) {
+  header_row_->SetAccentColor(
+      notification.accent_color() == SK_ColorTRANSPARENT
+          ? message_center::kNotificationDefaultAccentColor
+          : notification.accent_color());
+  header_row_->SetTimestamp(notification.timestamp());
+
 #if defined(OS_CHROMEOS)
   // If |origin_url| and |display_source| are both empty, assume it is
   // system notification, and use default |display_source| and
@@ -716,8 +722,6 @@
     header_row_->SetAppName(l10n_util::GetStringFUTF16(
         IDS_MESSAGE_CENTER_NOTIFICATION_CHROMEOS_SYSTEM,
         MessageCenter::Get()->GetProductOSName()));
-    header_row_->SetAccentColor(message_center::kSystemNotificationColorNormal);
-    header_row_->SetTimestamp(notification.timestamp());
     return;
   }
 #endif
@@ -730,11 +734,6 @@
   } else {
     header_row_->SetAppName(notification.display_source());
   }
-  header_row_->SetAccentColor(
-      notification.accent_color() == SK_ColorTRANSPARENT
-          ? message_center::kNotificationDefaultAccentColor
-          : notification.accent_color());
-  header_row_->SetTimestamp(notification.timestamp());
 }
 
 void NotificationViewMD::CreateOrUpdateTitleView(
diff --git a/ui/views/accessibility/ax_aura_obj_cache.cc b/ui/views/accessibility/ax_aura_obj_cache.cc
index 1a0cf7f..22e14648 100644
--- a/ui/views/accessibility/ax_aura_obj_cache.cc
+++ b/ui/views/accessibility/ax_aura_obj_cache.cc
@@ -127,11 +127,7 @@
     delegate_->OnEvent(aura_obj, event_type);
 }
 
-AXAuraObjCache::AXAuraObjCache()
-    : current_id_(1),
-      is_destroying_(false),
-      delegate_(nullptr),
-      root_window_(nullptr) {}
+AXAuraObjCache::AXAuraObjCache() = default;
 
 AXAuraObjCache::~AXAuraObjCache() {
   is_destroying_ = true;
@@ -139,7 +135,10 @@
 }
 
 View* AXAuraObjCache::GetFocusedView() {
-  aura::client::FocusClient* focus_client = GetFocusClient(root_window_);
+  if (root_windows_.empty())
+    return nullptr;
+  aura::client::FocusClient* focus_client =
+      GetFocusClient(*root_windows_.begin());
   if (!focus_client)
     return nullptr;
 
@@ -182,15 +181,15 @@
 }
 
 void AXAuraObjCache::OnRootWindowObjCreated(aura::Window* window) {
-  root_window_ = window;
-  if (GetFocusClient(window))
+  if (root_windows_.empty() && GetFocusClient(window))
     GetFocusClient(window)->AddObserver(this);
+  root_windows_.insert(window);
 }
 
 void AXAuraObjCache::OnRootWindowObjDestroyed(aura::Window* window) {
-  if (GetFocusClient(window))
+  root_windows_.erase(window);
+  if (root_windows_.empty() && GetFocusClient(window))
     GetFocusClient(window)->RemoveObserver(this);
-  root_window_ = nullptr;
 }
 
 template <typename AuraViewWrapper, typename AuraView>
diff --git a/ui/views/accessibility/ax_aura_obj_cache.h b/ui/views/accessibility/ax_aura_obj_cache.h
index bbd65e4..bb40bc59 100644
--- a/ui/views/accessibility/ax_aura_obj_cache.h
+++ b/ui/views/accessibility/ax_aura_obj_cache.h
@@ -9,6 +9,7 @@
 
 #include <map>
 #include <memory>
+#include <set>
 #include <vector>
 
 #include "base/macros.h"
@@ -127,14 +128,14 @@
   std::map<aura::Window*, int32_t> window_to_id_map_;
 
   std::map<int32_t, std::unique_ptr<AXAuraObjWrapper>> cache_;
-  int32_t current_id_;
+  int32_t current_id_ = 1;
 
   // True immediately when entering this object's destructor.
-  bool is_destroying_;
+  bool is_destroying_ = false;
 
-  Delegate* delegate_;
+  Delegate* delegate_ = nullptr;
 
-  aura::Window* root_window_;
+  std::set<aura::Window*> root_windows_;
 
   DISALLOW_COPY_AND_ASSIGN(AXAuraObjCache);
 };