diff --git a/BUILD.gn b/BUILD.gn
index 28753d91..770262b 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -320,7 +320,6 @@
       "//chrome/android/webapk/shell_apk:webapk",
       "//chrome/android/webapk/shell_apk/prepare_upload_dir:prepare_webapk_shell_upload_dir",
       "//chrome/test:android_browsertests",
-      "//chrome/test/vr/perf:motopho_latency_test",
       "//components/invalidation/impl:components_invalidation_impl_junit_tests",
       "//components/policy/android:components_policy_junit_tests",
       "//components/signin/core/browser/android:components_signin_junit_tests",
@@ -1034,7 +1033,6 @@
       ":layout_test_data_mojo_bindings_lite",
       "//content/shell:content_shell",
       "//content/test:mojo_web_test_bindings_js_data_deps",
-      "//content/test:mojo_web_test_old_names_bindings_js_data_deps",
       "//content/shell:mojo_bindings_js_data_deps",
       "//device/bluetooth/public/mojom:fake_bluetooth_interfaces_js_data_deps",
       "//device/vr/public/mojom:mojom_js_data_deps",
diff --git a/DEPS b/DEPS
index 2e8c9d0..4867ee769 100644
--- a/DEPS
+++ b/DEPS
@@ -171,11 +171,11 @@
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling Skia
   # and whatever else without interference from each other.
-  'skia_revision': 'fbaef603dece383fcd6abf675d1b421969493886',
+  'skia_revision': 'd0b2029c2d7c5bfb88c1393cd8bff8cea770acb4',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling V8
   # and whatever else without interference from each other.
-  'v8_revision': 'f3b63d6f7d62bd1c23e64f57c4cfedfbb0762f50',
+  'v8_revision': 'ca0cdfbf0ef595e3bab2a4ee95898e4b0120a90e',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling swarming_client
   # and whatever else without interference from each other.
@@ -183,11 +183,11 @@
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling ANGLE
   # and whatever else without interference from each other.
-  'angle_revision': '88a99e4382c1c7413d6b7324a06cdc045adb23c6',
+  'angle_revision': '806747e03674d106e78e05aaee364a4c831f2645',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling SwiftShader
   # and whatever else without interference from each other.
-  'swiftshader_revision': '4100b733bf4c8a3dfe0387744aa7fb59489a499b',
+  'swiftshader_revision': '883e817b14bfc4f644dbcc3fb9d2c5b988bbe71f',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling PDFium
   # and whatever else without interference from each other.
@@ -234,7 +234,7 @@
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling catapult
   # and whatever else without interference from each other.
-  'catapult_revision': '9988f9da4047c7d023580dbad0d7d259c8a97b2f',
+  'catapult_revision': 'bf69ed0d31f460686a104840cc68bb51fae06ff1',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling libFuzzer
   # and whatever else without interference from each other.
@@ -294,11 +294,11 @@
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling feed
   # and whatever else without interference from each other.
-  'spv_tools_revision': '615918c91d1d6ae1620f3ab3c03de1acba3cce0e',
+  'spv_tools_revision': '4517c7b883c56d9d1ef34f67b42fedd3f008f3dd',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling feed
   # and whatever else without interference from each other.
-  'spv_headers_revision': '842ec90674627ed2ffef609e3cd79d1562eded01',
+  'spv_headers_revision': 'af64a9e826bf5bb5fcd2434dd71be1e41e922563',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling feed
   # and whatever else without interference from each other.
@@ -874,7 +874,7 @@
 
   # Build tools for Chrome OS. Note: This depends on third_party/pyelftools.
   'src/third_party/chromite': {
-      'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + '720447713e2441342aa859697b823e3761228c5a',
+      'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + '177c5c4fe3929b78c5d626faa71b296be1b53391',
       'condition': 'checkout_linux',
   },
 
@@ -899,7 +899,7 @@
   },
 
   'src/third_party/depot_tools':
-    Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + 'ea98ebbe654ab38b812c8dfe1f4affc081c1cb73',
+    Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + 'ad557c41da7ce606ef3c26cf9ab465f9e4c81456',
 
   'src/third_party/devtools-node-modules':
     Var('chromium_git') + '/external/github.com/ChromeDevTools/devtools-node-modules' + '@' + Var('devtools_node_modules_revision'),
@@ -984,7 +984,7 @@
   },
 
   'src/third_party/glslang/src':
-    Var('chromium_git') + '/external/github.com/KhronosGroup/glslang.git' + '@' + '341701573a5db1153bb5ea48b88e8fd6c5a590c2',
+    Var('chromium_git') + '/external/github.com/KhronosGroup/glslang.git' + '@' + '7662586844f46f8f454f1db4a26e1d705a302e36',
 
   'src/third_party/google_toolbox_for_mac/src': {
       'url': Var('chromium_git') + '/external/github.com/google/google-toolbox-for-mac.git' + '@' + Var('google_toolbox_for_mac_revision'),
@@ -1509,7 +1509,7 @@
     Var('chromium_git') + '/external/khronosgroup/webgl.git' + '@' + '2701c130839edbeb226735b0775966b6423d9e83',
 
   'src/third_party/webrtc':
-    Var('webrtc_git') + '/src.git' + '@' + '4ff1c872045cce0a794076fb4dbeac4b55ae54c9',
+    Var('webrtc_git') + '/src.git' + '@' + 'bd2007738e5a43eb545f7f1cb279a815b8bb4d97',
 
   # Wuffs' canonical repository is at github.com/google/wuffs, but we use
   # Skia's mirror of Wuffs, the same as in upstream Skia's DEPS file.
@@ -1576,7 +1576,7 @@
     Var('chromium_git') + '/v8/v8.git' + '@' +  Var('v8_revision'),
 
   'src-internal': {
-    'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@e7bf2eba2b5d50e371cf4c44db510baf36d10bc0',
+    'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@e8d14c45f8736adec509fe450de7489a6ffd0a51',
     'condition': 'checkout_src_internal',
   },
 
diff --git a/WATCHLISTS b/WATCHLISTS
index 9691eac..55b607a 100644
--- a/WATCHLISTS
+++ b/WATCHLISTS
@@ -1698,7 +1698,8 @@
     },
     'tab_ui_and_start_surface': {
       'filepath': 'chrome/android/features/tab_ui/' \
-        '|chrome/android/features/start_surface/',
+                  '|chrome/android/features/start_surface/' \
+                  '|chrome/android/.*/src/org/chromium/chrome/browser/tasks/'
     },
     'tbmv2_metrics': {
       'filepath': 'third_party/catapult/tracing/tracing/metrics'
diff --git a/android_webview/BUILD.gn b/android_webview/BUILD.gn
index aadb8f2..f375680 100644
--- a/android_webview/BUILD.gn
+++ b/android_webview/BUILD.gn
@@ -209,11 +209,6 @@
   ]
 }
 
-android_resources("system_webview_resources") {
-  resource_dirs = [ "apk/java/res" ]
-  custom_package = system_webview_package_name
-}
-
 android_resources("resources") {
   resource_dirs = [ "java/res" ]
   custom_package = "org.chromium.android_webview"
@@ -590,12 +585,6 @@
     "java/src/org/chromium/android_webview/permission/AwGeolocationCallback.java",
     "java/src/org/chromium/android_webview/permission/AwPermissionRequest.java",
     "java/src/org/chromium/android_webview/policy/AwPolicyProvider.java",
-    "java/src/org/chromium/android_webview/ui/CrashesListActivity.java",
-    "java/src/org/chromium/android_webview/ui/util/CrashInfoLoader.java",
-    "java/src/org/chromium/android_webview/ui/util/UnuploadedFilesStateLoader.java",
-    "java/src/org/chromium/android_webview/ui/util/UploadedCrashesInfoLoader.java",
-    "java/src/org/chromium/android_webview/ui/util/WebViewCrashInfoCollector.java",
-    "java/src/org/chromium/android_webview/ui/util/WebViewCrashLogParser.java",
   ]
   deps = [
     ":common_aidl_java",
@@ -609,7 +598,6 @@
     ":common_platform_services_java",
     ":common_variations_utils_java",
     ":resources",
-    ":strings_grd",
     ":system_webview_manifest",
     "//base:base_java",
     "//base:jni_java",
diff --git a/android_webview/apk/BUILD.gn b/android_webview/apk/BUILD.gn
index 5a028ae..722fd37 100644
--- a/android_webview/apk/BUILD.gn
+++ b/android_webview/apk/BUILD.gn
@@ -2,6 +2,8 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
+import("//android_webview/system_webview_apk_tmpl.gni")
+import("//android_webview/variables.gni")
 import("//build/config/android/rules.gni")
 
 generate_jni("apk_jni_headers") {
@@ -23,6 +25,7 @@
     "java/src/com/android/webview/chromium/WebViewApkApplication.java",
   ]
   deps = [
+    ":devui_java",
     "//android_webview:android_webview_locale_config_java",
     "//android_webview:common_commandline_java",
     "//base:base_java",
@@ -34,6 +37,26 @@
   annotation_processor_deps = [ "//base/android/jni_generator:jni_processor" ]
 }
 
+android_library("devui_java") {
+  java_files = [
+    "java/src/org/chromium/android_webview/devui/CrashesListActivity.java",
+    "java/src/org/chromium/android_webview/devui/util/CrashInfoLoader.java",
+    "java/src/org/chromium/android_webview/devui/util/UnuploadedFilesStateLoader.java",
+    "java/src/org/chromium/android_webview/devui/util/UploadedCrashesInfoLoader.java",
+    "java/src/org/chromium/android_webview/devui/util/WebViewCrashInfoCollector.java",
+    "java/src/org/chromium/android_webview/devui/util/WebViewCrashLogParser.java",
+  ]
+  deps = [
+    ":devui_resources",
+    "//android_webview:common_crash_java",
+    "//android_webview:system_webview_manifest",
+    "//base:base_java",
+    "//components/minidump_uploader:minidump_uploader_java",
+  ]
+  android_manifest_for_lint = system_webview_android_manifest
+  min_sdk_version = 21
+}
+
 source_set("apk") {
   sources = [
     "webview_apk_application.cc",
@@ -47,3 +70,14 @@
     "//components/about_ui:about_ui_android",
   ]
 }
+
+# WebView icon used by upstream SystemWebView and Trichrome.
+android_resources("icon_resources") {
+  resource_dirs = [ "java/res_icon" ]
+  custom_package = "org.chromium.android_webview.icon"
+}
+
+android_resources("devui_resources") {
+  resource_dirs = [ "java/res_devui" ]
+  custom_package = "org.chromium.android_webview.devui"
+}
diff --git a/android_webview/apk/java/AndroidManifest.xml b/android_webview/apk/java/AndroidManifest.xml
index dd4d63a..ec49190 100644
--- a/android_webview/apk/java/AndroidManifest.xml
+++ b/android_webview/apk/java/AndroidManifest.xml
@@ -39,7 +39,7 @@
                            android:value="true" />
             </activity>
             <!--suppress HardcodedText -->
-            <activity android:name="org.chromium.android_webview.ui.CrashesListActivity"
+            <activity android:name="org.chromium.android_webview.devui.CrashesListActivity"
                       android:label="WebView Crashes"
                       android:process=":webview_apk">  {# Explicit process required for monochrome compatibility. #}
             </activity>
diff --git a/android_webview/java/res/layout/activity_crashes_list.xml b/android_webview/apk/java/res_devui/layout/activity_crashes_list.xml
similarity index 100%
rename from android_webview/java/res/layout/activity_crashes_list.xml
rename to android_webview/apk/java/res_devui/layout/activity_crashes_list.xml
diff --git a/android_webview/java/res/layout/crashes_list_row.xml b/android_webview/apk/java/res_devui/layout/crashes_list_row.xml
similarity index 100%
rename from android_webview/java/res/layout/crashes_list_row.xml
rename to android_webview/apk/java/res_devui/layout/crashes_list_row.xml
diff --git a/android_webview/java/res/menu/crashes_options_menu.xml b/android_webview/apk/java/res_devui/menu/crashes_options_menu.xml
similarity index 100%
rename from android_webview/java/res/menu/crashes_options_menu.xml
rename to android_webview/apk/java/res_devui/menu/crashes_options_menu.xml
diff --git a/android_webview/java/res/values/strings.xml b/android_webview/apk/java/res_devui/values/strings.xml
similarity index 81%
rename from android_webview/java/res/values/strings.xml
rename to android_webview/apk/java/res_devui/values/strings.xml
index 028992c28..cb1e5162 100644
--- a/android_webview/java/res/values/strings.xml
+++ b/android_webview/apk/java/res_devui/values/strings.xml
@@ -11,6 +11,9 @@
     android_webview/java/strings/android_webview_strings.grd
 
     See http://www.chromium.org/developers/design-documents/ui-localization
+
+    Dev UI strings should be inlined as they're not currently translated.
+    See crbug.com/1014805.
 -->
 
 <resources/>
diff --git a/android_webview/apk/java/res/drawable-hdpi/icon_webview.png b/android_webview/apk/java/res_icon/drawable-hdpi/icon_webview.png
similarity index 100%
rename from android_webview/apk/java/res/drawable-hdpi/icon_webview.png
rename to android_webview/apk/java/res_icon/drawable-hdpi/icon_webview.png
Binary files differ
diff --git a/android_webview/apk/java/res/drawable-mdpi/icon_webview.png b/android_webview/apk/java/res_icon/drawable-mdpi/icon_webview.png
similarity index 100%
rename from android_webview/apk/java/res/drawable-mdpi/icon_webview.png
rename to android_webview/apk/java/res_icon/drawable-mdpi/icon_webview.png
Binary files differ
diff --git a/android_webview/apk/java/res/drawable-xhdpi/icon_webview.png b/android_webview/apk/java/res_icon/drawable-xhdpi/icon_webview.png
similarity index 100%
rename from android_webview/apk/java/res/drawable-xhdpi/icon_webview.png
rename to android_webview/apk/java/res_icon/drawable-xhdpi/icon_webview.png
Binary files differ
diff --git a/android_webview/apk/java/res/drawable-xxhdpi/icon_webview.png b/android_webview/apk/java/res_icon/drawable-xxhdpi/icon_webview.png
similarity index 100%
rename from android_webview/apk/java/res/drawable-xxhdpi/icon_webview.png
rename to android_webview/apk/java/res_icon/drawable-xxhdpi/icon_webview.png
Binary files differ
diff --git a/android_webview/java/src/org/chromium/android_webview/ui/CrashesListActivity.java b/android_webview/apk/java/src/org/chromium/android_webview/devui/CrashesListActivity.java
similarity index 97%
rename from android_webview/java/src/org/chromium/android_webview/ui/CrashesListActivity.java
rename to android_webview/apk/java/src/org/chromium/android_webview/devui/CrashesListActivity.java
index 6552d8a6..ee6f293 100644
--- a/android_webview/java/src/org/chromium/android_webview/ui/CrashesListActivity.java
+++ b/android_webview/apk/java/src/org/chromium/android_webview/devui/CrashesListActivity.java
@@ -1,7 +1,8 @@
 // Copyright 2019 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.
-package org.chromium.android_webview.ui;
+
+package org.chromium.android_webview.devui;
 
 import android.app.Activity;
 import android.content.Intent;
@@ -18,10 +19,9 @@
 import android.widget.ListView;
 import android.widget.TextView;
 
-import org.chromium.android_webview.R;
 import org.chromium.android_webview.common.crash.CrashInfo;
 import org.chromium.android_webview.common.crash.CrashInfo.UploadState;
-import org.chromium.android_webview.ui.util.WebViewCrashInfoCollector;
+import org.chromium.android_webview.devui.util.WebViewCrashInfoCollector;
 
 import java.util.Date;
 import java.util.List;
diff --git a/android_webview/apk/java/src/org/chromium/android_webview/devui/DEPS b/android_webview/apk/java/src/org/chromium/android_webview/devui/DEPS
new file mode 100644
index 0000000..20797aa
--- /dev/null
+++ b/android_webview/apk/java/src/org/chromium/android_webview/devui/DEPS
@@ -0,0 +1,3 @@
+include_rules = [
+  "+components/minidump_uploader/android/java",
+]
diff --git a/android_webview/java/src/org/chromium/android_webview/ui/util/CrashInfoLoader.java b/android_webview/apk/java/src/org/chromium/android_webview/devui/util/CrashInfoLoader.java
similarity index 91%
rename from android_webview/java/src/org/chromium/android_webview/ui/util/CrashInfoLoader.java
rename to android_webview/apk/java/src/org/chromium/android_webview/devui/util/CrashInfoLoader.java
index 480fef1..d88e632 100644
--- a/android_webview/java/src/org/chromium/android_webview/ui/util/CrashInfoLoader.java
+++ b/android_webview/apk/java/src/org/chromium/android_webview/devui/util/CrashInfoLoader.java
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-package org.chromium.android_webview.ui.util;
+package org.chromium.android_webview.devui.util;
 
 import org.chromium.android_webview.common.crash.CrashInfo;
 
diff --git a/android_webview/java/src/org/chromium/android_webview/ui/util/UnuploadedFilesStateLoader.java b/android_webview/apk/java/src/org/chromium/android_webview/devui/util/UnuploadedFilesStateLoader.java
similarity index 97%
rename from android_webview/java/src/org/chromium/android_webview/ui/util/UnuploadedFilesStateLoader.java
rename to android_webview/apk/java/src/org/chromium/android_webview/devui/util/UnuploadedFilesStateLoader.java
index 69816a01..a106b0d 100644
--- a/android_webview/java/src/org/chromium/android_webview/ui/util/UnuploadedFilesStateLoader.java
+++ b/android_webview/apk/java/src/org/chromium/android_webview/devui/util/UnuploadedFilesStateLoader.java
@@ -1,7 +1,8 @@
 // Copyright 2019 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.
-package org.chromium.android_webview.ui.util;
+
+package org.chromium.android_webview.devui.util;
 
 import org.chromium.android_webview.common.crash.CrashInfo;
 import org.chromium.android_webview.common.crash.CrashInfo.UploadState;
diff --git a/android_webview/java/src/org/chromium/android_webview/ui/util/UploadedCrashesInfoLoader.java b/android_webview/apk/java/src/org/chromium/android_webview/devui/util/UploadedCrashesInfoLoader.java
similarity index 97%
rename from android_webview/java/src/org/chromium/android_webview/ui/util/UploadedCrashesInfoLoader.java
rename to android_webview/apk/java/src/org/chromium/android_webview/devui/util/UploadedCrashesInfoLoader.java
index e9ac867..c768f23f 100644
--- a/android_webview/java/src/org/chromium/android_webview/ui/util/UploadedCrashesInfoLoader.java
+++ b/android_webview/apk/java/src/org/chromium/android_webview/devui/util/UploadedCrashesInfoLoader.java
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-package org.chromium.android_webview.ui.util;
+package org.chromium.android_webview.devui.util;
 
 import org.chromium.android_webview.common.crash.CrashInfo;
 
diff --git a/android_webview/java/src/org/chromium/android_webview/ui/util/WebViewCrashInfoCollector.java b/android_webview/apk/java/src/org/chromium/android_webview/devui/util/WebViewCrashInfoCollector.java
similarity index 98%
rename from android_webview/java/src/org/chromium/android_webview/ui/util/WebViewCrashInfoCollector.java
rename to android_webview/apk/java/src/org/chromium/android_webview/devui/util/WebViewCrashInfoCollector.java
index f1aecfb5..5a032f3 100644
--- a/android_webview/java/src/org/chromium/android_webview/ui/util/WebViewCrashInfoCollector.java
+++ b/android_webview/apk/java/src/org/chromium/android_webview/devui/util/WebViewCrashInfoCollector.java
@@ -1,7 +1,8 @@
 // Copyright 2019 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.
-package org.chromium.android_webview.ui.util;
+
+package org.chromium.android_webview.devui.util;
 
 import org.chromium.android_webview.common.crash.CrashInfo;
 import org.chromium.android_webview.common.crash.CrashInfo.UploadState;
diff --git a/android_webview/java/src/org/chromium/android_webview/ui/util/WebViewCrashLogParser.java b/android_webview/apk/java/src/org/chromium/android_webview/devui/util/WebViewCrashLogParser.java
similarity index 97%
rename from android_webview/java/src/org/chromium/android_webview/ui/util/WebViewCrashLogParser.java
rename to android_webview/apk/java/src/org/chromium/android_webview/devui/util/WebViewCrashLogParser.java
index 2f0f6714..927fc0d 100644
--- a/android_webview/java/src/org/chromium/android_webview/ui/util/WebViewCrashLogParser.java
+++ b/android_webview/apk/java/src/org/chromium/android_webview/devui/util/WebViewCrashLogParser.java
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-package org.chromium.android_webview.ui.util;
+package org.chromium.android_webview.devui.util;
 
 import org.json.JSONException;
 
diff --git a/android_webview/java/DEPS b/android_webview/java/DEPS
index 920d7d3..bd9a1e2 100644
--- a/android_webview/java/DEPS
+++ b/android_webview/java/DEPS
@@ -2,7 +2,6 @@
   "+components/autofill/android/java",
   "+components/background_task_scheduler/android/java",
   "+components/embedder_support/android/java",
-  "+components/minidump_uploader/android/java",
   "+components/navigation_interception/android/java",
   "+components/policy/android/java",
   "+components/safe_browsing/android/java",
diff --git a/android_webview/java/src/org/chromium/android_webview/VariationsSeedLoader.java b/android_webview/java/src/org/chromium/android_webview/VariationsSeedLoader.java
index 6969427..46a0a3f 100644
--- a/android_webview/java/src/org/chromium/android_webview/VariationsSeedLoader.java
+++ b/android_webview/java/src/org/chromium/android_webview/VariationsSeedLoader.java
@@ -14,12 +14,15 @@
 import android.os.RemoteException;
 import android.os.SystemClock;
 
+import androidx.annotation.IntDef;
+
 import org.chromium.android_webview.common.ServiceNames;
 import org.chromium.android_webview.common.variations.VariationsUtils;
 import org.chromium.android_webview.services.IVariationsSeedServer;
 import org.chromium.base.ContextUtils;
 import org.chromium.base.Log;
 import org.chromium.base.VisibleForTesting;
+import org.chromium.base.metrics.CachedMetrics.CustomCountHistogramSample;
 import org.chromium.base.metrics.CachedMetrics.EnumeratedHistogramSample;
 import org.chromium.base.metrics.CachedMetrics.TimesHistogramSample;
 import org.chromium.components.variations.LoadSeedResult;
@@ -28,6 +31,8 @@
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.IOException;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
 import java.util.Date;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.FutureTask;
@@ -79,18 +84,72 @@
     // https://crbug.com/936172 about the trade-offs of increasing or decreasing this value.
     private static final long SEED_LOAD_TIMEOUT_MILLIS = 20;
 
+    @VisibleForTesting
+    public static final String APP_SEED_FRESHNESS_HISTOGRAM_NAME = "Variations.AppSeedFreshness";
+    @VisibleForTesting
+    public static final String APP_SEED_REQUEST_STATE_HISTOGRAM_NAME =
+            "Variations.AppSeedRequestState";
+    private static final String SEED_LOAD_BLOCKING_TIME_HISTOGRAM_NAME =
+            "Variations.SeedLoadBlockingTime";
+    // This metric is also written by VariationsSeedStore::LoadSeed and is used by other platforms.
+    private static final String SEED_LOAD_RESULT_HISTOGRAM_NAME = "Variations.SeedLoadResult";
+
     private SeedLoadAndUpdateRunnable mRunnable;
 
+    // UMA histogram values for the result of checking if the app needs a new variations seed.
+    // Keep in sync with AppSeedRequestState enum in enums.xml.
+    //
+    // These values are persisted to logs. Entries should not be renumbered and
+    // numeric values should never be reused.
+    @IntDef({AppSeedRequestState.UNKNOWN, AppSeedRequestState.SEED_FRESH,
+            AppSeedRequestState.SEED_REQUESTED, AppSeedRequestState.SEED_REQUEST_THROTTLED})
+    @Retention(RetentionPolicy.SOURCE)
+    @VisibleForTesting
+    public @interface AppSeedRequestState {
+        int UNKNOWN = 0;
+        int SEED_FRESH = 1;
+        int SEED_REQUESTED = 2;
+        int SEED_REQUEST_THROTTLED = 3;
+        int NUM_ENTRIES = 4;
+    }
+
     private static void recordLoadSeedResult(int result) {
         EnumeratedHistogramSample histogram = new EnumeratedHistogramSample(
-                "Variations.SeedLoadResult", LoadSeedResult.ENUM_SIZE);
+                SEED_LOAD_RESULT_HISTOGRAM_NAME, LoadSeedResult.ENUM_SIZE);
         histogram.record(result);
     }
 
-    private static boolean isExpired(long seedFileTime) {
+    private static void recordSeedLoadBlockingTime(long timeMs) {
+        TimesHistogramSample histogram =
+                new TimesHistogramSample(SEED_LOAD_BLOCKING_TIME_HISTOGRAM_NAME);
+        histogram.record(timeMs);
+    }
+
+    private static void recordSeedRequestState(@AppSeedRequestState int state) {
+        EnumeratedHistogramSample histogram = new EnumeratedHistogramSample(
+                APP_SEED_REQUEST_STATE_HISTOGRAM_NAME, AppSeedRequestState.NUM_ENTRIES);
+        histogram.record(state);
+    }
+
+    private static void recordAppSeedFreshness(long freshnessMinutes) {
+        // Bucket parameters should match Variations.SeedFreshness.
+        // See variations::RecordSeedFreshness.
+        CustomCountHistogramSample histogram = new CustomCountHistogramSample(
+                APP_SEED_FRESHNESS_HISTOGRAM_NAME, 1, (int) TimeUnit.DAYS.toMinutes(30), 50);
+        histogram.record((int) freshnessMinutes);
+    }
+
+    private static boolean shouldThrottleRequests(long now) {
+        long lastRequestTime = VariationsUtils.getStampTime();
+        if (lastRequestTime == 0) {
+            return false;
+        }
+        return now < lastRequestTime + MAX_REQUEST_PERIOD_MILLIS;
+    }
+
+    private boolean isSeedExpired(long seedFileTime) {
         long expirationTime = seedFileTime + SEED_EXPIRATION_MILLIS;
-        long now = (new Date()).getTime();
-        return now > expirationTime;
+        return getCurrentTimeMillis() > expirationTime;
     }
 
     // Loads our local copy of the seed, if any, and then renames our local copy and/or requests a
@@ -101,20 +160,20 @@
         //   seed, replacing any existing "old" seed.)
         // - mNeedNewSeed: Should we request a new seed from the service?
         // - mCurrentSeedDate: The "date" field of our local seed, converted to milliseconds since
-        //   epoch, or Long.MIN_VALUE if we have no seed.
+        //   epoch, or Long.MIN_VALUE if we have no seed. This value originates from the server.
+        // - mSeedFileTime: The time, in milliseconds since the UNIX epoch, our local copy of the
+        //   seed was last written to disk as measured by the device's clock.
+        // - mSeedRequestState: The result of checking if a new seed is required.
         private boolean mFoundNewSeed;
         private boolean mNeedNewSeed;
         private long mCurrentSeedDate = Long.MIN_VALUE;
+        private long mSeedFileTime;
+        private int mSeedRequestState = AppSeedRequestState.UNKNOWN;
 
         private FutureTask<SeedInfo> mLoadTask = new FutureTask<>(() -> {
             File newSeedFile = VariationsUtils.getNewSeedFile();
             File oldSeedFile = VariationsUtils.getSeedFile();
 
-            // The time, in milliseconds since epoch, our local copy of the seed was last written.
-            // (Not to be confused with mCurrentSeedDate, the age of the seed as reported by the
-            // server.)
-            long seedFileTime = 0;
-
             // First check for a new seed.
             SeedInfo seed = VariationsUtils.readSeedFile(newSeedFile);
             if (seed != null) {
@@ -122,27 +181,29 @@
                 // the new seed. (Don't do it now, to avoid delaying FutureTask.get().)
                 mFoundNewSeed = true;
 
-                seedFileTime = newSeedFile.lastModified();
+                mSeedFileTime = newSeedFile.lastModified();
             } else {
                 // If there is no new seed, check for an old seed.
                 seed = VariationsUtils.readSeedFile(oldSeedFile);
 
                 if (seed != null) {
-                    seedFileTime = oldSeedFile.lastModified();
+                    mSeedFileTime = oldSeedFile.lastModified();
                 }
             }
 
             // Make a note to request a new seed if necessary. (Don't request it now, to
             // avoid delaying FutureTask.get().)
-            if (seed == null || isExpired(seedFileTime)) {
+            if (seed == null || isSeedExpired(mSeedFileTime)) {
                 mNeedNewSeed = true;
+                mSeedRequestState = AppSeedRequestState.SEED_REQUESTED;
 
                 // Rate-limit the requests.
-                long lastRequestTime = VariationsUtils.getStampTime();
-                if (lastRequestTime != 0) {
-                    long now = (new Date()).getTime();
-                    if (now < lastRequestTime + MAX_REQUEST_PERIOD_MILLIS) mNeedNewSeed = false;
+                if (shouldThrottleRequests(getCurrentTimeMillis())) {
+                    mNeedNewSeed = false;
+                    mSeedRequestState = AppSeedRequestState.SEED_REQUEST_THROTTLED;
                 }
+            } else {
+                mSeedRequestState = AppSeedRequestState.SEED_FRESH;
             }
 
             // Note the date field of whatever seed was loaded, if any.
@@ -178,7 +239,14 @@
 
         public SeedInfo get(long timeout, TimeUnit unit)
                 throws InterruptedException, ExecutionException, TimeoutException {
-            return mLoadTask.get(timeout, unit);
+            SeedInfo info = mLoadTask.get(timeout, unit);
+            recordSeedRequestState(mSeedRequestState);
+            if (mSeedFileTime != 0) {
+                long freshnessMinutes =
+                        TimeUnit.MILLISECONDS.toMinutes(getCurrentTimeMillis() - mSeedFileTime);
+                recordAppSeedFreshness(freshnessMinutes);
+            }
+            return info;
         }
     }
 
@@ -225,12 +293,10 @@
         long start = SystemClock.elapsedRealtime();
         try {
             try {
-                return mRunnable.get(SEED_LOAD_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS);
+                return mRunnable.get(getSeedLoadTimeoutMillis(), TimeUnit.MILLISECONDS);
             } finally {
                 long end = SystemClock.elapsedRealtime();
-                TimesHistogramSample histogram =
-                        new TimesHistogramSample("Variations.SeedLoadBlockingTime");
-                histogram.record(end - start);
+                recordSeedLoadBlockingTime(end - start);
             }
         } catch (TimeoutException e) {
             recordLoadSeedResult(LoadSeedResult.LOAD_TIMED_OUT);
@@ -246,6 +312,16 @@
     @VisibleForTesting // Overridden by tests to wait until all work is done.
     protected void onBackgroundWorkFinished() {}
 
+    @VisibleForTesting
+    protected long getSeedLoadTimeoutMillis() {
+        return SEED_LOAD_TIMEOUT_MILLIS;
+    }
+
+    @VisibleForTesting
+    protected long getCurrentTimeMillis() {
+        return new Date().getTime();
+    }
+
     @VisibleForTesting // and non-static for overriding by tests
     protected Intent getServerIntent() throws NameNotFoundException {
         Intent intent = new Intent();
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/VariationsSeedLoaderTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/VariationsSeedLoaderTest.java
index af2ac96..cc52ee8 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/VariationsSeedLoaderTest.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/VariationsSeedLoaderTest.java
@@ -14,6 +14,7 @@
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
+import org.junit.Rule;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -36,24 +37,46 @@
 @RunWith(AwJUnit4ClassRunner.class)
 @OnlyRunIn(SINGLE_PROCESS)
 public class VariationsSeedLoaderTest {
+    private static final long CURRENT_TIME_MILLIS = 1234567890;
+    private static final long EXPIRED_TIMESTAMP = 0;
     private static final long TIMEOUT_MILLIS = 10000;
 
+    // Needed for tests that test histograms, which rely on native code.
+    @Rule
+    public AwActivityTestRule mActivityTestRule = new AwActivityTestRule();
+
     private static class TestLoaderResult extends CallbackHelper {
-        private boolean mSeedRequested;
+        private volatile boolean mBackgroundWorkFinished;
+        private volatile boolean mForegroundWorkFinished;
+        private volatile boolean mSeedRequested;
 
         public boolean wasSeedRequested() {
             assert getCallCount() > 0;
             return mSeedRequested;
         }
 
-        public void notifyCalled(boolean seedRequested) {
-            mSeedRequested = seedRequested;
-            super.notifyCalled();
+        public void markSeedRequested() {
+            mSeedRequested = true;
+        }
+
+        public void onBackgroundWorkFinished() {
+            mBackgroundWorkFinished = true;
+            maybeNotifyCalled();
+        }
+
+        public void onForegroundWorkFinished() {
+            mForegroundWorkFinished = true;
+            maybeNotifyCalled();
+        }
+
+        private void maybeNotifyCalled() {
+            if (mBackgroundWorkFinished && mForegroundWorkFinished) {
+                notifyCalled();
+            }
         }
     }
 
     private static class TestLoader extends VariationsSeedLoader {
-        private boolean mSeedRequested;
         private TestLoaderResult mResult;
 
         public TestLoader(TestLoaderResult result) {
@@ -70,12 +93,22 @@
         @Override
         protected void requestSeedFromService(long oldSeedDate) {
             super.requestSeedFromService(oldSeedDate);
-            mSeedRequested = true;
+            mResult.markSeedRequested();
         }
 
         @Override
         protected void onBackgroundWorkFinished() {
-            mResult.notifyCalled(mSeedRequested);
+            mResult.onBackgroundWorkFinished();
+        }
+
+        @Override
+        protected long getSeedLoadTimeoutMillis() {
+            return TIMEOUT_MILLIS;
+        }
+
+        @Override
+        protected long getCurrentTimeMillis() {
+            return CURRENT_TIME_MILLIS;
         }
     }
 
@@ -89,15 +122,17 @@
             TestLoader loader = new TestLoader(result);
             loader.startVariationsInit();
             loader.finishVariationsInit();
+            result.onForegroundWorkFinished();
         };
 
         CallbackHelper onRequestReceived = MockVariationsSeedServer.getRequestHelper();
         int requestsReceived = onRequestReceived.getCallCount();
         Assert.assertTrue("Failed to post seed loader Runnable", mMainHandler.post(run));
-        result.waitForCallback("Timed out waiting for loader to finish background work.", 0);
+        result.waitForCallback("Timed out waiting for loader to finish.", 0);
         if (result.wasSeedRequested()) {
-            onRequestReceived.waitForCallback("Seed requested, but timed out waiting for request" +
-                    " to arrive in MockVariationsSeedServer", requestsReceived);
+            onRequestReceived.waitForCallback("Seed requested, but timed out waiting for request"
+                            + " to arrive in MockVariationsSeedServer",
+                    requestsReceived);
             return true;
         }
         return false;
@@ -116,6 +151,22 @@
         VariationsTestUtils.deleteSeeds();
     }
 
+    private void assertNoAppSeedRequestStateValues() {
+        Assert.assertEquals(0,
+                RecordHistogram.getHistogramTotalCountForTesting(
+                        VariationsSeedLoader.APP_SEED_REQUEST_STATE_HISTOGRAM_NAME));
+    }
+
+    private void assertSingleAppSeedRequestStateValue(
+            @VariationsSeedLoader.AppSeedRequestState int state) {
+        Assert.assertEquals(1,
+                RecordHistogram.getHistogramTotalCountForTesting(
+                        VariationsSeedLoader.APP_SEED_REQUEST_STATE_HISTOGRAM_NAME));
+        Assert.assertEquals(1,
+                RecordHistogram.getHistogramValueCountForTesting(
+                        VariationsSeedLoader.APP_SEED_REQUEST_STATE_HISTOGRAM_NAME, state));
+    }
+
     // Test the case that:
     // VariationsUtils.getSeedFile() - doesn't exist
     // VariationsUtils.getNewSeedFile() - doesn't exist
@@ -278,4 +329,76 @@
             VariationsTestUtils.deleteSeeds();
         }
     }
+
+    // Test we record the Variations.AppSeedRequestState metric when the seed is fresh.
+    @Test
+    @MediumTest
+    public void testRecordSeedFresh() throws Exception {
+        RecordHistogram.setDisabledForTests(false);
+        File oldFile = VariationsUtils.getSeedFile();
+        Assert.assertTrue("Expected seed file to not already exist", oldFile.createNewFile());
+        VariationsTestUtils.writeMockSeed(oldFile);
+        oldFile.setLastModified(CURRENT_TIME_MILLIS);
+        assertNoAppSeedRequestStateValues();
+
+        runTestLoaderBlocking();
+
+        assertSingleAppSeedRequestStateValue(VariationsSeedLoader.AppSeedRequestState.SEED_FRESH);
+    }
+
+    // Test we record the Variations.AppSeedRequestState metric when a new seed is requested.
+    @Test
+    @MediumTest
+    public void testRecordSeedRequested() throws Exception {
+        RecordHistogram.setDisabledForTests(false);
+        File oldFile = VariationsUtils.getSeedFile();
+        Assert.assertTrue("Expected seed file to not already exist", oldFile.createNewFile());
+        VariationsTestUtils.writeMockSeed(oldFile);
+        oldFile.setLastModified(EXPIRED_TIMESTAMP);
+        assertNoAppSeedRequestStateValues();
+
+        runTestLoaderBlocking();
+
+        assertSingleAppSeedRequestStateValue(
+                VariationsSeedLoader.AppSeedRequestState.SEED_REQUESTED);
+    }
+
+    // Test we record the Variations.AppSeedRequestState metric when a seed request is throttled.
+    @Test
+    @MediumTest
+    public void testRecordSeedRequestThrottled() throws Exception {
+        RecordHistogram.setDisabledForTests(false);
+        File oldFile = VariationsUtils.getSeedFile();
+        Assert.assertTrue("Expected seed file to not already exist", oldFile.createNewFile());
+        VariationsTestUtils.writeMockSeed(oldFile);
+        oldFile.setLastModified(EXPIRED_TIMESTAMP);
+        // Update the last modified time of the stamp file to simulate having just requested a
+        // new seed from the service.
+        VariationsUtils.updateStampTime();
+        assertNoAppSeedRequestStateValues();
+
+        runTestLoaderBlocking();
+
+        assertSingleAppSeedRequestStateValue(
+                VariationsSeedLoader.AppSeedRequestState.SEED_REQUEST_THROTTLED);
+    }
+
+    // Test we record the Variations.AppSeedFreshness metric with loading a seed.
+    @Test
+    @MediumTest
+    public void testRecordAppSeedFreshness() throws Exception {
+        long seedAgeHours = 2;
+        RecordHistogram.setDisabledForTests(false);
+        File oldFile = VariationsUtils.getSeedFile();
+        Assert.assertTrue("Expected seed file to not already exist", oldFile.createNewFile());
+        VariationsTestUtils.writeMockSeed(oldFile);
+        oldFile.setLastModified(CURRENT_TIME_MILLIS - TimeUnit.HOURS.toMillis(seedAgeHours));
+
+        runTestLoaderBlocking();
+
+        Assert.assertEquals(1,
+                RecordHistogram.getHistogramValueCountForTesting(
+                        VariationsSeedLoader.APP_SEED_FRESHNESS_HISTOGRAM_NAME,
+                        (int) TimeUnit.HOURS.toMinutes(seedAgeHours)));
+    }
 }
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/WebViewWebVrTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/WebViewWebVrTest.java
deleted file mode 100644
index 5a96c2b0..0000000
--- a/android_webview/javatests/src/org/chromium/android_webview/test/WebViewWebVrTest.java
+++ /dev/null
@@ -1,71 +0,0 @@
-// 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.
-
-package org.chromium.android_webview.test;
-
-import android.support.test.filters.MediumTest;
-
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import org.chromium.base.test.util.CommandLineFlags;
-import org.chromium.base.test.util.Feature;
-import org.chromium.content_public.browser.WebContents;
-import org.chromium.content_public.browser.test.util.JavaScriptUtils;
-
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-
-/**
- * Test that enabling and attempting to use WebVR neither causes any crashes
- * nor returns any VRDisplays.
- */
-@RunWith(AwJUnit4ClassRunner.class)
-public class WebViewWebVrTest {
-    @Rule
-    public AwActivityTestRule mActivityTestRule = new AwActivityTestRule();
-
-    private TestAwContentsClient mContentsClient;
-    private AwTestContainerView mTestContainerView;
-    private WebContents mWebContents;
-
-    @Before
-    public void setUp() {
-        mContentsClient = new TestAwContentsClient();
-        mTestContainerView = mActivityTestRule.createAwTestContainerViewOnMainSync(mContentsClient);
-        mWebContents = mTestContainerView.getWebContents();
-        AwActivityTestRule.enableJavaScriptOnUiThread(mTestContainerView.getAwContents());
-    }
-
-    @Test
-    @MediumTest
-    @Feature({"AndroidWebView"})
-    @CommandLineFlags.Add("enable-blink-features=WebVR")
-    public void testWebVrNotFunctional() throws Throwable {
-        mActivityTestRule.loadUrlSync(mTestContainerView.getAwContents(),
-                mContentsClient.getOnPageFinishedHelper(),
-                "file:///android_asset/webvr_not_functional_test.html");
-        // Poll the boolean to know when the promise resolves
-        AwActivityTestRule.pollInstrumentationThread(() -> {
-            String result = "false";
-            try {
-                result = JavaScriptUtils.executeJavaScriptAndWaitForResult(
-                        mWebContents, "promiseResolved", 100, TimeUnit.MILLISECONDS);
-            } catch (TimeoutException e) {
-                // Expected to happen regularly, do nothing
-            }
-            return Boolean.parseBoolean(result);
-        });
-
-        // Assert that the promise resolved instead of rejecting, but returned
-        // 0 VRDisplays
-        Assert.assertTrue(JavaScriptUtils
-                                  .executeJavaScriptAndWaitForResult(
-                                          mWebContents, "numDisplays", 100, TimeUnit.MILLISECONDS)
-                                  .equals("0"));
-    }
-}
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/ui/util/UnuploadedFilesStateLoaderTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/devui/util/UnuploadedFilesStateLoaderTest.java
similarity index 96%
rename from android_webview/javatests/src/org/chromium/android_webview/test/ui/util/UnuploadedFilesStateLoaderTest.java
rename to android_webview/javatests/src/org/chromium/android_webview/test/devui/util/UnuploadedFilesStateLoaderTest.java
index ab22a4a4..5308b4c 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/ui/util/UnuploadedFilesStateLoaderTest.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/devui/util/UnuploadedFilesStateLoaderTest.java
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-package org.chromium.android_webview.test.ui.util;
+package org.chromium.android_webview.test.devui.util;
 
 import static org.chromium.android_webview.test.OnlyRunIn.ProcessMode.SINGLE_PROCESS;
 
@@ -17,9 +17,9 @@
 
 import org.chromium.android_webview.common.crash.CrashInfo;
 import org.chromium.android_webview.common.crash.CrashInfo.UploadState;
+import org.chromium.android_webview.devui.util.UnuploadedFilesStateLoader;
 import org.chromium.android_webview.test.AwJUnit4ClassRunner;
 import org.chromium.android_webview.test.OnlyRunIn;
-import org.chromium.android_webview.ui.util.UnuploadedFilesStateLoader;
 import org.chromium.components.minidump_uploader.CrashFileManager;
 
 import java.io.File;
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/ui/util/UploadedCrashesInfoLoaderTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/devui/util/UploadedCrashesInfoLoaderTest.java
similarity index 97%
rename from android_webview/javatests/src/org/chromium/android_webview/test/ui/util/UploadedCrashesInfoLoaderTest.java
rename to android_webview/javatests/src/org/chromium/android_webview/test/devui/util/UploadedCrashesInfoLoaderTest.java
index 2fe71725..c67344a 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/ui/util/UploadedCrashesInfoLoaderTest.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/devui/util/UploadedCrashesInfoLoaderTest.java
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-package org.chromium.android_webview.test.ui.util;
+package org.chromium.android_webview.test.devui.util;
 
 import static org.chromium.android_webview.test.OnlyRunIn.ProcessMode.SINGLE_PROCESS;
 
@@ -16,9 +16,9 @@
 
 import org.chromium.android_webview.common.crash.CrashInfo;
 import org.chromium.android_webview.common.crash.CrashInfo.UploadState;
+import org.chromium.android_webview.devui.util.UploadedCrashesInfoLoader;
 import org.chromium.android_webview.test.AwJUnit4ClassRunner;
 import org.chromium.android_webview.test.OnlyRunIn;
-import org.chromium.android_webview.ui.util.UploadedCrashesInfoLoader;
 
 import java.io.BufferedWriter;
 import java.io.File;
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/ui/util/WebViewCrashInfoCollectorTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/devui/util/WebViewCrashInfoCollectorTest.java
similarity index 98%
rename from android_webview/javatests/src/org/chromium/android_webview/test/ui/util/WebViewCrashInfoCollectorTest.java
rename to android_webview/javatests/src/org/chromium/android_webview/test/devui/util/WebViewCrashInfoCollectorTest.java
index ffca334..849e3746 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/ui/util/WebViewCrashInfoCollectorTest.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/devui/util/WebViewCrashInfoCollectorTest.java
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-package org.chromium.android_webview.test.ui.util;
+package org.chromium.android_webview.test.devui.util;
 
 import static org.hamcrest.Matchers.contains;
 import static org.hamcrest.Matchers.containsInAnyOrder;
@@ -19,9 +19,9 @@
 
 import org.chromium.android_webview.common.crash.CrashInfo;
 import org.chromium.android_webview.common.crash.CrashInfo.UploadState;
+import org.chromium.android_webview.devui.util.WebViewCrashInfoCollector;
 import org.chromium.android_webview.test.AwJUnit4ClassRunner;
 import org.chromium.android_webview.test.OnlyRunIn;
-import org.chromium.android_webview.ui.util.WebViewCrashInfoCollector;
 
 import java.util.Arrays;
 import java.util.List;
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/ui/util/WebViewCrashLogParserTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/devui/util/WebViewCrashLogParserTest.java
similarity index 95%
rename from android_webview/javatests/src/org/chromium/android_webview/test/ui/util/WebViewCrashLogParserTest.java
rename to android_webview/javatests/src/org/chromium/android_webview/test/devui/util/WebViewCrashLogParserTest.java
index 64ba4f75..000e7cb 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/ui/util/WebViewCrashLogParserTest.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/devui/util/WebViewCrashLogParserTest.java
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-package org.chromium.android_webview.test.ui.util;
+package org.chromium.android_webview.test.devui.util;
 
 import static org.hamcrest.Matchers.containsInAnyOrder;
 import static org.hamcrest.Matchers.empty;
@@ -16,8 +16,8 @@
 import org.junit.runner.RunWith;
 
 import org.chromium.android_webview.common.crash.CrashInfo;
+import org.chromium.android_webview.devui.util.WebViewCrashLogParser;
 import org.chromium.android_webview.test.AwJUnit4ClassRunner;
-import org.chromium.android_webview.ui.util.WebViewCrashLogParser;
 
 import java.io.File;
 import java.io.FileWriter;
diff --git a/android_webview/test/BUILD.gn b/android_webview/test/BUILD.gn
index e810a83..78ffaef 100644
--- a/android_webview/test/BUILD.gn
+++ b/android_webview/test/BUILD.gn
@@ -133,7 +133,6 @@
     "shell/assets/visual_state_on_page_commit_visible_test.html",
     "shell/assets/visual_state_waits_for_js_detached_test.html",
     "shell/assets/visual_state_waits_for_js_test.html",
-    "shell/assets/webvr_not_functional_test.html",
   ]
 
   if (use_v8_context_snapshot) {
@@ -287,17 +286,16 @@
     "../javatests/src/org/chromium/android_webview/test/WebViewAsynchronousFindApisTest.java",
     "../javatests/src/org/chromium/android_webview/test/WebViewFindApisTestRule.java",
     "../javatests/src/org/chromium/android_webview/test/WebViewModalDialogOverrideTest.java",
-    "../javatests/src/org/chromium/android_webview/test/WebViewWebVrTest.java",
     "../javatests/src/org/chromium/android_webview/test/common/variations/VariationsUtilsTest.java",
+    "../javatests/src/org/chromium/android_webview/test/devui/util/UnuploadedFilesStateLoaderTest.java",
+    "../javatests/src/org/chromium/android_webview/test/devui/util/UploadedCrashesInfoLoaderTest.java",
+    "../javatests/src/org/chromium/android_webview/test/devui/util/WebViewCrashInfoCollectorTest.java",
+    "../javatests/src/org/chromium/android_webview/test/devui/util/WebViewCrashLogParserTest.java",
     "../javatests/src/org/chromium/android_webview/test/services/CrashReceiverServiceTest.java",
     "../javatests/src/org/chromium/android_webview/test/services/MinidumpUploaderTest.java",
     "../javatests/src/org/chromium/android_webview/test/services/MockVariationsSeedServer.java",
     "../javatests/src/org/chromium/android_webview/test/services/VariationsSeedServerTest.java",
     "../javatests/src/org/chromium/android_webview/test/services/VisualStateCallbackTest.java",
-    "../javatests/src/org/chromium/android_webview/test/ui/util/UnuploadedFilesStateLoaderTest.java",
-    "../javatests/src/org/chromium/android_webview/test/ui/util/UploadedCrashesInfoLoaderTest.java",
-    "../javatests/src/org/chromium/android_webview/test/ui/util/WebViewCrashInfoCollectorTest.java",
-    "../javatests/src/org/chromium/android_webview/test/ui/util/WebViewCrashLogParserTest.java",
     "../javatests/src/org/chromium/android_webview/test/util/AwQuotaManagerBridgeTestUtil.java",
     "../javatests/src/org/chromium/android_webview/test/util/AwTestTouchUtils.java",
     "../javatests/src/org/chromium/android_webview/test/util/CommonResources.java",
diff --git a/android_webview/test/shell/assets/webvr_not_functional_test.html b/android_webview/test/shell/assets/webvr_not_functional_test.html
deleted file mode 100644
index cfcba213..0000000
--- a/android_webview/test/shell/assets/webvr_not_functional_test.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE html>
-<script>
-var promiseResolved = false;
-var numDisplays = -1;
-navigator.getVRDisplays().then( (displays) => {
-  numDisplays = displays.length;
-}).then( () => {
-  promiseResolved = true;
-});
-</script>
diff --git a/android_webview/variables.gni b/android_webview/variables.gni
index 070e5e9..9ab6001 100644
--- a/android_webview/variables.gni
+++ b/android_webview/variables.gni
@@ -9,7 +9,7 @@
 
 upstream_only_webview_deps = [
   "//android_webview:platform_service_bridge_upstream_implementation_java",
-  "//android_webview:system_webview_resources",
+  "//android_webview/apk:icon_resources",
 ]
 
 webview_locale_config_java_package = "org.chromium.android_webview"
diff --git a/ash/home_screen/drag_window_from_shelf_controller.cc b/ash/home_screen/drag_window_from_shelf_controller.cc
index 6197d6d..5dee697 100644
--- a/ash/home_screen/drag_window_from_shelf_controller.cc
+++ b/ash/home_screen/drag_window_from_shelf_controller.cc
@@ -7,6 +7,7 @@
 #include "ash/display/screen_orientation_controller.h"
 #include "ash/home_screen/home_screen_controller.h"
 #include "ash/home_screen/home_screen_delegate.h"
+#include "ash/public/cpp/shelf_config.h"
 #include "ash/public/cpp/window_properties.h"
 #include "ash/root_window_controller.h"
 #include "ash/scoped_animation_disabler.h"
@@ -199,22 +200,32 @@
 
 DragWindowFromShelfController::DragWindowFromShelfController(
     aura::Window* window)
-    : window_(window) {}
+    : window_(window) {
+  window_->AddObserver(this);
+}
 
 DragWindowFromShelfController::~DragWindowFromShelfController() {
   CancelDrag();
+  if (window_)
+    window_->RemoveObserver(this);
 }
 
 void DragWindowFromShelfController::Drag(const gfx::Point& location_in_screen,
                                          float scroll_x,
                                          float scroll_y) {
+  // |window_| might have been destroyed during dragging.
+  if (!window_)
+    return;
+
   if (!drag_started_) {
-    // Do not start drag until the drag goes above the shelf.
+    // Do not start drag until the drag goes above the hotseat.
     const gfx::Rect work_area =
         screen_util::GetDisplayWorkAreaBoundsInScreenForActiveDeskContainer(
             window_);
-    if (location_in_screen.y() > work_area.bottom())
+    if (location_in_screen.y() >
+        work_area.bottom() - ShelfConfig::Get()->hotseat_size()) {
       return;
+    }
     OnDragStarted(location_in_screen);
   }
 
@@ -325,6 +336,14 @@
               /*snap_position=*/SplitViewController::NONE);
 }
 
+void DragWindowFromShelfController::OnWindowDestroying(aura::Window* window) {
+  DCHECK_EQ(window_, window);
+
+  CancelDrag();
+  window_->RemoveObserver(this);
+  window_ = nullptr;
+}
+
 void DragWindowFromShelfController::OnDragStarted(
     const gfx::Point& location_in_screen) {
   drag_started_ = true;
diff --git a/ash/home_screen/drag_window_from_shelf_controller.h b/ash/home_screen/drag_window_from_shelf_controller.h
index e3424d2..77c86b3 100644
--- a/ash/home_screen/drag_window_from_shelf_controller.h
+++ b/ash/home_screen/drag_window_from_shelf_controller.h
@@ -13,6 +13,7 @@
 #include "base/macros.h"
 #include "base/optional.h"
 #include "base/timer/timer.h"
+#include "ui/aura/window_observer.h"
 #include "ui/gfx/geometry/point.h"
 
 namespace aura {
@@ -21,10 +22,9 @@
 
 namespace ash {
 
-// Only used by HomeLauncherGestureHandler::Mode::kDragWindowToHomeOrOverview
-// mode. It's the window drag controller for a window that's being dragging from
-// swiping up from the shelf.
-class DragWindowFromShelfController {
+// The window drag controller that will be used when a window is dragged up by
+// swiping up from the shelf to homescreen, overview or splitview.
+class DragWindowFromShelfController : public aura::WindowObserver {
  public:
   // The distance for the dragged window to pass over shelf so that it can be
   // dragged into home launcher or overview. If not pass this value, the window
@@ -48,7 +48,7 @@
   static constexpr float kVelocityToOverviewThreshold = 1000.f;
 
   explicit DragWindowFromShelfController(aura::Window* window);
-  ~DragWindowFromShelfController();
+  ~DragWindowFromShelfController() override;
 
   // Called during swiping up on the shelf.
   void Drag(const gfx::Point& location_in_screen,
@@ -58,6 +58,9 @@
                base::Optional<float> velocity_y);
   void CancelDrag();
 
+  // aura::WindowObserver:
+  void OnWindowDestroying(aura::Window* window) override;
+
  private:
   class WindowsHider;
 
@@ -109,7 +112,7 @@
   // screen after drag ends.
   void ScaleDownWindowAfterDrag();
 
-  aura::Window* const window_;
+  aura::Window* window_ = nullptr;
   gfx::Point initial_location_in_screen_;
   gfx::Point previous_location_in_screen_;
   bool drag_started_ = false;
diff --git a/ash/home_screen/home_launcher_gesture_handler.h b/ash/home_screen/home_launcher_gesture_handler.h
index a3f9bf9a..7a376f1c 100644
--- a/ash/home_screen/home_launcher_gesture_handler.h
+++ b/ash/home_screen/home_launcher_gesture_handler.h
@@ -49,6 +49,8 @@
     // window in splitview) around to enter either home launcher screen or to
     // overview screen. If in overview mode, this mode is a no-op. Note: This
     // mode is behind the feature flag kDragFromShelfToHomeOrOverview.
+    // TODO(crbug.com/997885): Remove this mode. The window dragging logic has
+    // been moved into shelf dragging.
     kDragWindowToHomeOrOverview,
     // Sliding down the MRU window to hide launcher.
     kSlideDownToHide,
diff --git a/ash/home_screen/home_launcher_gesture_handler_unittest.cc b/ash/home_screen/home_launcher_gesture_handler_unittest.cc
index ea4c7ce..6ea803a 100644
--- a/ash/home_screen/home_launcher_gesture_handler_unittest.cc
+++ b/ash/home_screen/home_launcher_gesture_handler_unittest.cc
@@ -560,7 +560,7 @@
   auto window = CreateWindowForTesting();
   GetGestureHandler()->OnPressEvent(Mode::kDragWindowToHomeOrOverview,
                                     shelf_bounds.CenterPoint());
-  GetGestureHandler()->OnScrollEvent(gfx::Point(0, 300), 0.f, 1.f);
+  GetGestureHandler()->OnScrollEvent(gfx::Point(0, 200), 0.f, 1.f);
   aura::Window* home_screen_window =
       Shell::Get()->home_screen_controller()->delegate()->GetHomeScreenWindow();
   EXPECT_TRUE(home_screen_window);
@@ -737,7 +737,7 @@
   GetGestureHandler()->OnPressEvent(Mode::kDragWindowToHomeOrOverview,
                                     shelf_bounds.CenterPoint());
   GetGestureHandler()->OnScrollEvent(
-      gfx::Point(200, 300), 0.f,
+      gfx::Point(200, 200), 0.f,
       DragWindowFromShelfController::kShowOverviewThreshold + 1);
   EXPECT_FALSE(window->layer()->GetTargetTransform().IsIdentity());
   OverviewController* overview_controller = Shell::Get()->overview_controller();
@@ -902,7 +902,7 @@
   GetGestureHandler()->OnPressEvent(Mode::kDragWindowToHomeOrOverview,
                                     shelf_bounds.CenterPoint());
   GetGestureHandler()->OnScrollEvent(
-      gfx::Point(shelf_bounds.x(), shelf_bounds.y() - 1), 0.f,
+      gfx::Point(0, 200), 0.f,
       DragWindowFromShelfController::kShowOverviewThreshold + 1);
   OverviewController* overview_controller = Shell::Get()->overview_controller();
   EXPECT_FALSE(overview_controller->InOverviewSession());
diff --git a/ash/shelf/shelf_layout_manager.cc b/ash/shelf/shelf_layout_manager.cc
index 25ae03da..c6b4ac52 100644
--- a/ash/shelf/shelf_layout_manager.cc
+++ b/ash/shelf/shelf_layout_manager.cc
@@ -13,6 +13,8 @@
 #include "ash/app_list/app_list_controller_impl.h"
 #include "ash/app_list/app_list_metrics.h"
 #include "ash/app_list/views/app_list_view.h"
+#include "ash/display/screen_orientation_controller.h"
+#include "ash/home_screen/drag_window_from_shelf_controller.h"
 #include "ash/home_screen/home_launcher_gesture_handler.h"
 #include "ash/home_screen/home_screen_controller.h"
 #include "ash/public/cpp/app_list/app_list_types.h"
@@ -150,6 +152,51 @@
   return visibility_state == SHELF_VISIBLE ? size : 0;
 }
 
+// Returns the window that can be dragged from shelf into home screen or
+// overview at |location_in_screen|. Returns nullptr if there is no such
+// window.
+aura::Window* GetWindowForDragToHomeOrOverview(
+    const gfx::Point& location_in_screen) {
+  if (!IsTabletModeEnabled())
+    return nullptr;
+
+  auto mru_windows =
+      Shell::Get()->mru_window_tracker()->BuildWindowForCycleList(kActiveDesk);
+  if (mru_windows.empty())
+    return nullptr;
+
+  aura::Window* window = nullptr;
+  SplitViewController* split_view_controller =
+      SplitViewController::Get(Shell::GetPrimaryRootWindow());
+  const bool is_in_splitview = split_view_controller->InSplitViewMode();
+  const bool is_in_overview =
+      Shell::Get()->overview_controller()->InOverviewSession();
+  if (!is_in_splitview && !is_in_overview) {
+    // If split view mode is not active, use the first MRU window.
+    window = mru_windows[0];
+  } else if (is_in_splitview) {
+    // If split view mode is active, use the event location to decide which
+    // window should be the dragged window.
+    aura::Window* left_window = split_view_controller->left_window();
+    aura::Window* right_window = split_view_controller->right_window();
+    const int divider_position = split_view_controller->divider_position();
+    const bool is_landscape = IsCurrentScreenOrientationLandscape();
+    const bool is_primary = IsCurrentScreenOrientationPrimary();
+    const gfx::Rect work_area =
+        screen_util::GetDisplayWorkAreaBoundsInScreenForActiveDeskContainer(
+            split_view_controller->GetDefaultSnappedWindow());
+    if (is_landscape) {
+      if (location_in_screen.x() < work_area.x() + divider_position)
+        window = is_primary ? left_window : right_window;
+      else
+        window = is_primary ? right_window : left_window;
+    } else {
+      window = is_primary ? right_window : left_window;
+    }
+  }
+  return window && window->IsVisible() ? window : nullptr;
+}
+
 // Sets the shelf opacity to 0 when the shelf is done hiding to avoid getting
 // rid of blur.
 class HideAnimationObserver : public ui::ImplicitAnimationObserver {
@@ -1878,10 +1925,19 @@
            HomeLauncherGestureHandler::Mode::kSwipeHomeToOverview;
   }
 
-  const bool up_on_extended_hotseat =
-      state_.hotseat_state == HotseatState::kExtended && scroll_y < 0;
-  if (IsHotseatEnabled() && !up_on_extended_hotseat)
-    return false;
+  if (IsHotseatEnabled()) {
+    if (features::IsDragFromShelfToHomeOrOverviewEnabled() &&
+        state_.hotseat_state != HotseatState::kShown) {
+      // If hotseat is hidden or extended (in-app or in-overview), do not let
+      // HomeLauncherGestureHandler to handle the events.
+      return false;
+    }
+
+    const bool up_on_extended_hotseat =
+        state_.hotseat_state == HotseatState::kExtended && scroll_y < 0;
+    if (!up_on_extended_hotseat)
+      return false;
+  }
 
   // Scroll down events should never be handled, unless they are currently being
   // handled
@@ -2087,6 +2143,7 @@
                               : SHELF_AUTO_HIDE_SHOWN;
   MaybeSetupHotseatDrag(event_in_screen);
   MaybeUpdateShelfBackground(AnimationChangeType::ANIMATE);
+  MaybeStartDragWindowFromShelf(event_in_screen);
 
   // For the hotseat, |drag_amount_| is relative to the top of the shelf.
   // To keep the hotseat from jumping to the top of the shelf on drag, set the
@@ -2140,10 +2197,14 @@
           event_in_screen.AsGestureEvent()->details().velocity_y();
     }
     LayoutShelf();
+    MaybeUpdateWindowDrag(event_in_screen, scroll_x, scroll_y);
   }
 }
 
 void ShelfLayoutManager::CompleteDrag(const ui::LocatedEvent& event_in_screen) {
+  // End the possible window drag before checking the shelf visibility.
+  MaybeEndWindowDrag(event_in_screen);
+
   if (!ShouldChangeVisibilityAfterDrag(event_in_screen)) {
     CancelDrag();
     return;
@@ -2211,6 +2272,7 @@
     else
       Shell::Get()->app_list_controller()->DismissAppList();
   } else {
+    MaybeCancelWindowDrag();
     // Set |drag_status_| to kDragCancelInProgress to set the
     // auto hide state to |drag_auto_hide_state_|, which is the
     // visibility state before starting drag.
@@ -2321,4 +2383,57 @@
   previous_workspace_window_state_ = current_workspace_window_state;
 }
 
+void ShelfLayoutManager::MaybeStartDragWindowFromShelf(
+    const ui::LocatedEvent& event_in_screen) {
+  if (!features::IsDragFromShelfToHomeOrOverviewEnabled())
+    return;
+  if (!IsTabletModeEnabled())
+    return;
+  if (drag_status_ != kDragInProgress)
+    return;
+
+  aura::Window* window =
+      GetWindowForDragToHomeOrOverview(event_in_screen.location());
+  if (!window)
+    return;
+
+  window_drag_controller_ =
+      std::make_unique<DragWindowFromShelfController>(window);
+}
+
+void ShelfLayoutManager::MaybeUpdateWindowDrag(
+    const ui::LocatedEvent& event_in_screen,
+    float scroll_x,
+    float scroll_y) {
+  if (!window_drag_controller_)
+    return;
+
+  DCHECK_EQ(drag_status_, kDragInProgress);
+  window_drag_controller_->Drag(event_in_screen.location(), scroll_x, scroll_y);
+}
+
+void ShelfLayoutManager::MaybeEndWindowDrag(
+    const ui::LocatedEvent& event_in_screen) {
+  if (!window_drag_controller_)
+    return;
+
+  DCHECK_EQ(drag_status_, kDragInProgress);
+  base::Optional<float> velocity_y;
+  if (event_in_screen.type() == ui::ET_SCROLL_FLING_START) {
+    velocity_y = base::make_optional(
+        event_in_screen.AsGestureEvent()->details().velocity_y());
+  }
+  window_drag_controller_->EndDrag(event_in_screen.location(), velocity_y);
+  window_drag_controller_.reset();
+}
+
+void ShelfLayoutManager::MaybeCancelWindowDrag() {
+  if (!window_drag_controller_)
+    return;
+
+  DCHECK_EQ(drag_status_, kDragInProgress);
+  window_drag_controller_->CancelDrag();
+  window_drag_controller_.reset();
+}
+
 }  // namespace ash
diff --git a/ash/shelf/shelf_layout_manager.h b/ash/shelf/shelf_layout_manager.h
index 8f058ff..4304a632 100644
--- a/ash/shelf/shelf_layout_manager.h
+++ b/ash/shelf/shelf_layout_manager.h
@@ -47,6 +47,7 @@
 namespace ash {
 
 enum class AnimationChangeType;
+class DragWindowFromShelfController;
 class PanelLayoutManagerTest;
 class Shelf;
 class ShelfLayoutManagerObserver;
@@ -493,6 +494,14 @@
   void SendA11yAlertForFullscreenWorkspaceState(
       WorkspaceWindowState current_workspace_window_state);
 
+  // Maybe start/update/end the window drag when swiping up from the shelf.
+  void MaybeStartDragWindowFromShelf(const ui::LocatedEvent& event_in_screen);
+  void MaybeUpdateWindowDrag(const ui::LocatedEvent& event_in_screen,
+                             float scroll_x,
+                             float scroll_y);
+  void MaybeEndWindowDrag(const ui::LocatedEvent& event_in_screen);
+  void MaybeCancelWindowDrag();
+
   // True when inside UpdateBoundsAndOpacity() method. Used to prevent calling
   // UpdateBoundsAndOpacity() again from SetChildBounds().
   bool updating_bounds_ = false;
@@ -624,6 +633,10 @@
   base::Optional<ScopedSuspendVisibilityUpdate>
       overview_suspend_visibility_update_;
 
+  // The window drag controller that will be used when a window can be dragged
+  // up from shelf to homescreen, overview or splitview.
+  std::unique_ptr<DragWindowFromShelfController> window_drag_controller_;
+
   DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager);
 };
 
diff --git a/base/android/java/src/org/chromium/base/UserDataHost.java b/base/android/java/src/org/chromium/base/UserDataHost.java
index a8eb046..3016ec5 100644
--- a/base/android/java/src/org/chromium/base/UserDataHost.java
+++ b/base/android/java/src/org/chromium/base/UserDataHost.java
@@ -57,9 +57,20 @@
 
     private HashMap<Class<? extends UserData>, UserData> mUserDataMap = new HashMap<>();
 
+    private static void checkArgument(boolean condition) {
+        if (!condition) {
+            throw new IllegalArgumentException(
+                    "Neither key nor object of UserDataHost can be null.");
+        }
+    }
+
     private void checkThreadAndState() {
-        assert mThreadId == Process.myTid() : "UserData must only be used on a single thread.";
-        assert mUserDataMap != null : "Operation is not allowed after destroy()";
+        if (mThreadId != Process.myTid()) {
+            throw new IllegalStateException("UserData must only be used on a single thread.");
+        }
+        if (mUserDataMap == null) {
+            throw new IllegalStateException("Operation is not allowed after destroy().");
+        }
     }
 
     /**
@@ -70,7 +81,7 @@
      */
     public <T extends UserData> T setUserData(Class<T> key, T object) {
         checkThreadAndState();
-        assert key != null && object != null : "Neither key nor object of UserDataHost can be null";
+        checkArgument(key != null && object != null);
 
         mUserDataMap.put(key, object);
         return getUserData(key);
@@ -85,22 +96,24 @@
      */
     public <T extends UserData> T getUserData(Class<T> key) {
         checkThreadAndState();
-        assert key != null : "UserDataHost key cannot be null";
+        checkArgument(key != null);
 
         return key.cast(mUserDataMap.get(key));
     }
 
     /**
-     * Removes the mapping for a key from this map. Assertion will be thrown if
+     * Removes the mapping for a key from this map. Exception will be thrown if
      * the given key has no mapping.
      * @param key Type token for which the specified object is to be removed.
      * @return The previous value associated with {@code key}.
      */
     public <T extends UserData> T removeUserData(Class<T> key) {
         checkThreadAndState();
-        assert key != null : "UserDataHost key cannot be null";
+        checkArgument(key != null);
 
-        assert mUserDataMap.containsKey(key) : "UserData for the key is not present";
+        if (!mUserDataMap.containsKey(key)) {
+            throw new IllegalStateException("UserData for the key is not present.");
+        }
         return key.cast(mUserDataMap.remove(key));
     }
 
diff --git a/base/android/javatests/src/org/chromium/base/UserDataHostTest.java b/base/android/javatests/src/org/chromium/base/UserDataHostTest.java
index a7132fe..9ffa1716 100644
--- a/base/android/javatests/src/org/chromium/base/UserDataHostTest.java
+++ b/base/android/javatests/src/org/chromium/base/UserDataHostTest.java
@@ -11,7 +11,6 @@
 import org.junit.runner.RunWith;
 
 import org.chromium.base.test.BaseJUnit4ClassRunner;
-import org.chromium.base.test.util.DisabledTest;
 
 /**
  * Test class for {@link UserDataHost}.
@@ -46,34 +45,31 @@
         }
     }
 
-    private <T extends UserData> void assertGetUserData(Class<T> key) {
-        boolean exception = false;
+    private <T extends UserData, E extends RuntimeException> void getUserDataException(
+            Class<T> key, Class<E> exceptionType) {
         try {
             mHost.getUserData(key);
-        } catch (AssertionError e) {
-            exception = true;
+        } catch (Exception e) {
+            if (!exceptionType.isInstance(e)) throw e;
         }
-        Assert.assertTrue(exception);
     }
 
-    private <T extends UserData> void assertSetUserData(Class<T> key, T obj) {
-        boolean exception = false;
+    private <T extends UserData, E extends RuntimeException> void setUserDataException(
+            Class<T> key, T obj, Class<E> exceptionType) {
         try {
             mHost.setUserData(key, obj);
-        } catch (AssertionError e) {
-            exception = true;
+        } catch (Exception e) {
+            if (!exceptionType.isInstance(e)) throw e;
         }
-        Assert.assertTrue(exception);
     }
 
-    private <T extends UserData> void assertRemoveUserData(Class<T> key) {
-        boolean exception = false;
+    private <T extends UserData, E extends RuntimeException> void removeUserDataException(
+            Class<T> key, Class<E> exceptionType) {
         try {
             mHost.removeUserData(key);
-        } catch (AssertionError e) {
-            exception = true;
+        } catch (Exception e) {
+            if (!exceptionType.isInstance(e)) throw e;
         }
-        Assert.assertTrue(exception);
     }
 
     /**
@@ -81,14 +77,13 @@
      */
     @Test
     @SmallTest
-    @DisabledTest
     public void testBasicOperations() {
         TestObjectA obj = new TestObjectA();
         mHost.setUserData(TestObjectA.class, obj);
         Assert.assertEquals(obj, mHost.getUserData(TestObjectA.class));
         Assert.assertEquals(obj, mHost.removeUserData(TestObjectA.class));
         Assert.assertNull(mHost.getUserData(TestObjectA.class));
-        assertRemoveUserData(TestObjectA.class);
+        removeUserDataException(TestObjectA.class, IllegalStateException.class);
     }
 
     /**
@@ -96,14 +91,13 @@
      */
     @Test
     @SmallTest
-    @DisabledTest
     public void testNullKeyOrDataAreDisallowed() {
         TestObjectA obj = new TestObjectA();
-        assertSetUserData(null, null);
-        assertSetUserData(TestObjectA.class, null);
-        assertSetUserData(null, obj);
-        assertGetUserData(null);
-        assertRemoveUserData(null);
+        setUserDataException(null, null, IllegalArgumentException.class);
+        setUserDataException(TestObjectA.class, null, IllegalArgumentException.class);
+        setUserDataException(null, obj, IllegalArgumentException.class);
+        getUserDataException(null, IllegalArgumentException.class);
+        removeUserDataException(null, IllegalArgumentException.class);
     }
 
     /**
@@ -122,6 +116,18 @@
     }
 
     /**
+     * Verifies operation on a different thread is not allowed.
+     */
+    @Test
+    @SmallTest
+    public void testSingleThreadPolicy() {
+        TestObjectA obj = new TestObjectA();
+        mHost.setUserData(TestObjectA.class, obj);
+        ThreadUtils.runOnUiThreadBlocking(
+                () -> getUserDataException(TestObjectA.class, IllegalStateException.class));
+    }
+
+    /**
      * Verifies {@link UserHostData#destroy()} detroyes each {@link UserData} object.
      */
     @Test
@@ -144,15 +150,14 @@
      */
     @Test
     @SmallTest
-    @DisabledTest
     public void testOperationsDisallowedAfterDestroy() {
         TestObjectA obj = new TestObjectA();
         mHost.setUserData(TestObjectA.class, obj);
         Assert.assertEquals(obj, mHost.getUserData(TestObjectA.class));
 
         mHost.destroy();
-        assertGetUserData(TestObjectA.class);
-        assertSetUserData(TestObjectA.class, obj);
-        assertRemoveUserData(TestObjectA.class);
+        getUserDataException(TestObjectA.class, IllegalStateException.class);
+        setUserDataException(TestObjectA.class, obj, IllegalStateException.class);
+        removeUserDataException(TestObjectA.class, IllegalStateException.class);
     }
 }
diff --git a/build/android/gyp/jacoco_instr.py b/build/android/gyp/jacoco_instr.py
index 9f4f55f..7a425d0 100755
--- a/build/android/gyp/jacoco_instr.py
+++ b/build/android/gyp/jacoco_instr.py
@@ -143,33 +143,12 @@
   return affected_classes, unaffected_members
 
 
-def _InstrumentWholeJar(instrument_cmd, input_path, output_path, temp_dir):
-  """Instruments input jar to output_path.
-
-  Args:
-    instrument_cmd: JaCoCo instrument command.
-    input_path: The input path to non-instrumented jar.
-    output_path: The output path to instrumented jar.
-    temp_dir: The temporary directory.
-  """
-  instrument_cmd.extend([input_path, '--dest', temp_dir])
-
-  build_utils.CheckOutput(instrument_cmd)
-
-  jars = os.listdir(temp_dir)
-  if len(jars) != 1:
-    raise Exception('Error: multiple output files: %s' % jars)
-
-  # Delete output_path first to avoid modifying input_path in the case where
-  # input_path is a hardlink to output_path. http://crbug.com/571642
-  if os.path.exists(output_path):
-    os.unlink(output_path)
-  shutil.move(os.path.join(temp_dir, jars[0]), output_path)
-
-
-def _InstrumentClassFiles(instrument_cmd, input_path, output_path, temp_dir,
-                          affected_source_files):
-  """Instruments affected class files from input jar.
+def _InstrumentClassFiles(instrument_cmd,
+                          input_path,
+                          output_path,
+                          temp_dir,
+                          affected_source_files=None):
+  """Instruments class files from input jar.
 
   Args:
     instrument_cmd: JaCoCo instrument command.
@@ -177,9 +156,13 @@
     output_path: The output path to instrumented jar.
     temp_dir: The temporary directory.
     affected_source_files: The affected source file paths to input jar.
+      Default is None, which means instrumenting all class files in jar.
   """
-  affected_classes, unaffected_members = _GetAffectedClasses(
-      input_path, affected_source_files)
+  affected_classes = None
+  unaffected_members = None
+  if affected_source_files:
+    affected_classes, unaffected_members = _GetAffectedClasses(
+        input_path, affected_source_files)
 
   # Extract affected class files.
   with zipfile.ZipFile(input_path) as f:
@@ -191,9 +174,10 @@
   instrument_cmd.extend([temp_dir, '--dest', instrumented_dir])
   build_utils.CheckOutput(instrument_cmd)
 
-  # Extract unaffected members to instrumented_dir.
-  with zipfile.ZipFile(input_path) as f:
-    f.extractall(instrumented_dir, unaffected_members)
+  if affected_source_files and unaffected_members:
+    # Extract unaffected members to instrumented_dir.
+    with zipfile.ZipFile(input_path) as f:
+      f.extractall(instrumented_dir, unaffected_members)
 
   # Zip all files to output_path
   build_utils.ZipDir(output_path, instrumented_dir)
@@ -220,8 +204,8 @@
     ]
 
     if not args.files_to_instrument:
-      _InstrumentWholeJar(instrument_cmd, args.input_path, args.output_path,
-                          temp_dir)
+      _InstrumentClassFiles(instrument_cmd, args.input_path, args.output_path,
+                            temp_dir)
     else:
       affected_files = build_utils.ReadSourcesList(args.files_to_instrument)
       source_set = set(source_files)
diff --git a/build/download_libclang.py b/build/download_libclang.py
new file mode 100755
index 0000000..e9f232b
--- /dev/null
+++ b/build/download_libclang.py
@@ -0,0 +1,54 @@
+#!/usr/bin/env python
+# 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.
+
+"""Script to download libclang binaries from google storage."""
+
+import find_depot_tools
+import json
+import os
+import shutil
+import subprocess
+import sys
+import tarfile
+
+SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
+CHROME_SRC = os.path.abspath(os.path.join(SCRIPT_DIR, os.pardir))
+
+
+DEPOT_PATH = find_depot_tools.add_depot_tools_to_path()
+GSUTIL_PATH = os.path.join(DEPOT_PATH, 'gsutil.py')
+
+LLVM_BUILD_PATH = os.path.join(CHROME_SRC, 'third_party', 'llvm-build',
+                               'Release+Asserts')
+CLANG_UPDATE_PY = os.path.join(CHROME_SRC, 'tools', 'clang', 'scripts',
+                               'update.py')
+
+CLANG_BUCKET = 'gs://chromium-browser-clang'
+
+
+def main():
+  clang_revision = subprocess.check_output([sys.executable, CLANG_UPDATE_PY,
+                                            '--print-revision']).rstrip()
+  targz_name = 'libclang-%s.tgz' % clang_revision
+
+  if sys.platform == 'win32' or sys.platform == 'cygwin':
+    cds_full_url = CLANG_BUCKET + '/Win/' + targz_name
+  elif sys.platform == 'darwin':
+    cds_full_url = CLANG_BUCKET + '/Mac/' + targz_name
+  else:
+    assert sys.platform.startswith('linux')
+    cds_full_url = CLANG_BUCKET + '/Linux_x64/' + targz_name
+
+  os.chdir(LLVM_BUILD_PATH)
+
+  subprocess.check_call([sys.executable, GSUTIL_PATH,
+                         'cp', cds_full_url, targz_name])
+  tarfile.open(name=targz_name, mode='r:gz').extractall(path=LLVM_BUILD_PATH)
+
+  os.remove(targz_name)
+  return 0
+
+if __name__ == '__main__':
+  sys.exit(main())
diff --git a/build/fuchsia/linux.sdk.sha1 b/build/fuchsia/linux.sdk.sha1
index 1fef6af..76a7abb4 100644
--- a/build/fuchsia/linux.sdk.sha1
+++ b/build/fuchsia/linux.sdk.sha1
@@ -1 +1 @@
-8898798323855543984
\ No newline at end of file
+8898743676430298864
\ No newline at end of file
diff --git a/build/fuchsia/mac.sdk.sha1 b/build/fuchsia/mac.sdk.sha1
index 1f4f6413..bb615f6 100644
--- a/build/fuchsia/mac.sdk.sha1
+++ b/build/fuchsia/mac.sdk.sha1
@@ -1 +1 @@
-8898803709896757552
\ No newline at end of file
+8898744307297162208
\ No newline at end of file
diff --git a/chrome/VERSION b/chrome/VERSION
index 03d51a6..315e23f 100644
--- a/chrome/VERSION
+++ b/chrome/VERSION
@@ -1,4 +1,4 @@
 MAJOR=80
 MINOR=0
-BUILD=3949
+BUILD=3950
 PATCH=0
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
index 71756f2..946a3a5 100644
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -1036,7 +1036,6 @@
         "javatests/src/org/chromium/chrome/browser/vr/VrBrowserTestFramework.java",
         "javatests/src/org/chromium/chrome/browser/vr/VrBrowserTransitionTest.java",
         "javatests/src/org/chromium/chrome/browser/vr/VrBrowserWebInputEditingTest.java",
-        "javatests/src/org/chromium/chrome/browser/vr/WebVrTestFramework.java",
         "javatests/src/org/chromium/chrome/browser/vr/WebXrVrConsentTest.java",
         "javatests/src/org/chromium/chrome/browser/vr/WebXrVrConsentTestFramework.java",
         "javatests/src/org/chromium/chrome/browser/vr/WebXrVrDeviceTest.java",
diff --git a/chrome/android/java/monochrome_public_bundle__base_bundle_module.AndroidManifest.expected b/chrome/android/java/monochrome_public_bundle__base_bundle_module.AndroidManifest.expected
index 0a3e31e..623df7a 100644
--- a/chrome/android/java/monochrome_public_bundle__base_bundle_module.AndroidManifest.expected
+++ b/chrome/android/java/monochrome_public_bundle__base_bundle_module.AndroidManifest.expected
@@ -1008,7 +1008,7 @@
     <activity
         android:label="WebView
         Crashes"
-        android:name="org.chromium.android_webview.ui.CrashesListActivity"
+        android:name="org.chromium.android_webview.devui.CrashesListActivity"
         android:process=":webview_apk"/>
     <activity
         android:enabled="false"
diff --git a/chrome/android/java/res/drawable-hdpi/omnibox_https_invalid.png b/chrome/android/java/res/drawable-hdpi/omnibox_not_secure_warning.png
similarity index 100%
rename from chrome/android/java/res/drawable-hdpi/omnibox_https_invalid.png
rename to chrome/android/java/res/drawable-hdpi/omnibox_not_secure_warning.png
Binary files differ
diff --git a/chrome/android/java/res/drawable-mdpi/omnibox_https_invalid.png b/chrome/android/java/res/drawable-mdpi/omnibox_not_secure_warning.png
similarity index 100%
rename from chrome/android/java/res/drawable-mdpi/omnibox_https_invalid.png
rename to chrome/android/java/res/drawable-mdpi/omnibox_not_secure_warning.png
Binary files differ
diff --git a/chrome/android/java/res/drawable-xhdpi/omnibox_https_invalid.png b/chrome/android/java/res/drawable-xhdpi/omnibox_not_secure_warning.png
similarity index 100%
rename from chrome/android/java/res/drawable-xhdpi/omnibox_https_invalid.png
rename to chrome/android/java/res/drawable-xhdpi/omnibox_not_secure_warning.png
Binary files differ
diff --git a/chrome/android/java/res/drawable-xxhdpi/omnibox_https_invalid.png b/chrome/android/java/res/drawable-xxhdpi/omnibox_not_secure_warning.png
similarity index 100%
rename from chrome/android/java/res/drawable-xxhdpi/omnibox_https_invalid.png
rename to chrome/android/java/res/drawable-xxhdpi/omnibox_not_secure_warning.png
Binary files differ
diff --git a/chrome/android/java/res/drawable-xxxhdpi/omnibox_https_invalid.png b/chrome/android/java/res/drawable-xxxhdpi/omnibox_not_secure_warning.png
similarity index 100%
rename from chrome/android/java/res/drawable-xxxhdpi/omnibox_https_invalid.png
rename to chrome/android/java/res/drawable-xxxhdpi/omnibox_not_secure_warning.png
Binary files differ
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillNameFixFlowPrompt.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillNameFixFlowPrompt.java
index ec04e9b..373948633 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillNameFixFlowPrompt.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillNameFixFlowPrompt.java
@@ -89,10 +89,13 @@
         }
         mDialogModel = builder.build();
 
-        // Hitting the "submit" button on the software keyboard should submit.
+        // Hitting the "submit" button on the software keyboard should submit, unless the name field
+        // is empty.
         mUserNameInput.setOnEditorActionListener((view, actionId, event) -> {
             if (actionId == EditorInfo.IME_ACTION_DONE) {
-                onClick(mDialogModel, ModalDialogProperties.ButtonType.POSITIVE);
+                if (mUserNameInput.getText().toString().trim().length() != 0) {
+                    onClick(mDialogModel, ModalDialogProperties.ButtonType.POSITIVE);
+                }
                 return true;
             }
             return false;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/ephemeraltab/EphemeralTabCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/ephemeraltab/EphemeralTabCoordinator.java
index 2b34f65..08ff869 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/ephemeraltab/EphemeralTabCoordinator.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/ephemeraltab/EphemeralTabCoordinator.java
@@ -192,7 +192,7 @@
             case ConnectionSecurityLevel.WARNING:
                 return R.drawable.omnibox_info;
             case ConnectionSecurityLevel.DANGEROUS:
-                return R.drawable.omnibox_https_invalid;
+                return R.drawable.omnibox_not_secure_warning;
             case ConnectionSecurityLevel.SECURE_WITH_POLICY_INSTALLED_CERT:
             case ConnectionSecurityLevel.SECURE:
             case ConnectionSecurityLevel.EV_SECURE:
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/native_page/FrozenNativePage.java b/chrome/android/java/src/org/chromium/chrome/browser/native_page/FrozenNativePage.java
index 1d4e911..27e5086 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/native_page/FrozenNativePage.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/native_page/FrozenNativePage.java
@@ -71,6 +71,11 @@
     }
 
     @Override
+    public boolean isFrozen() {
+        return true;
+    }
+
+    @Override
     public void destroy() {
     }
 }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePage.java b/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePage.java
index 155c630..c1b4694 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePage.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePage.java
@@ -46,6 +46,13 @@
     void updateForUrl(String url);
 
     /**
+     * @return {@code true} if the native page is in inactive/frozen state.
+     */
+    default boolean isFrozen() {
+        return false;
+    }
+
+    /**
      * Called after a page has been removed from the view hierarchy and will no longer be used.
      */
     void destroy();
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageAssassin.java b/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageAssassin.java
index ab32e083..eb8177a 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageAssassin.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageAssassin.java
@@ -84,12 +84,6 @@
     }
 
     private void freeze(Tab tab) {
-        if (tab == null) return;
-        NativePage pageToFreeze = tab.getNativePage();
-        if (pageToFreeze == null || pageToFreeze instanceof FrozenNativePage
-                || pageToFreeze.getView().getParent() != null) {
-            return;
-        }
-        tab.freezeNativePage();
+        if (tab != null) tab.freezeNativePage();
     }
-}
\ No newline at end of file
+}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
index b8a350c..982a844 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
@@ -727,7 +727,7 @@
             // If the NativePage was frozen while in the background (see NativePageAssassin),
             // recreate the NativePage now.
             NativePage nativePage = getNativePage();
-            if (nativePage instanceof FrozenNativePage) {
+            if (nativePage != null && nativePage.isFrozen()) {
                 maybeShowNativePage(nativePage.getUrl(), true);
             }
             NativePageAssassin.getInstance().tabShown(this);
@@ -783,18 +783,15 @@
      * @param nativePage The {@link NativePage} to show.
      */
     private void showNativePage(NativePage nativePage) {
+        assert nativePage != null;
         if (mNativePage == nativePage) return;
-        NativePage previousNativePage = mNativePage;
-        if (mNativePage != null && !(mNativePage instanceof FrozenNativePage)) {
-            mNativePage.getView().removeOnAttachStateChangeListener(mAttachStateChangeListener);
-        }
-        mNativePage = nativePage;
-        if (mNativePage != null && !(mNativePage instanceof FrozenNativePage)) {
-            mNativePage.getView().addOnAttachStateChangeListener(mAttachStateChangeListener);
-        }
-        pushNativePageStateToNavigationEntry();
-        notifyContentChanged();
-        destroyNativePageInternal(previousNativePage);
+        hideNativePage(true, () -> {
+            mNativePage = nativePage;
+            if (!mNativePage.isFrozen()) {
+                mNativePage.getView().addOnAttachStateChangeListener(mAttachStateChangeListener);
+            }
+            pushNativePageStateToNavigationEntry();
+        });
     }
 
     /**
@@ -802,8 +799,10 @@
      * to reduce memory pressure.
      */
     public void freezeNativePage() {
-        if (mNativePage == null || mNativePage instanceof FrozenNativePage) return;
-        assert mNativePage.getView().getParent() == null : "Cannot freeze visible native page";
+        if (mNativePage == null || mNativePage.isFrozen()
+                || mNativePage.getView().getParent() == null) {
+            return;
+        }
         mNativePage = FrozenNativePage.freeze(mNativePage);
         updateInteractableState();
     }
@@ -813,14 +812,25 @@
      */
     protected void showRenderedPage() {
         updateTitle();
+        hideNativePage(true, null);
+    }
 
-        if (mNativePage == null) return;
+    /**
+     * Hide and destroy the native page if it was being shown.
+     * @param notify {@code true} to trigger {@link #onContentChanged} event.
+     * @param postHideTask {@link Runnable} task to run before actually destroying the
+     *        native page. This is necessary to keep the tasks to perform in order.
+     */
+    private void hideNativePage(boolean notify, Runnable postHideTask) {
         NativePage previousNativePage = mNativePage;
-        if (!(mNativePage instanceof FrozenNativePage)) {
-            mNativePage.getView().removeOnAttachStateChangeListener(mAttachStateChangeListener);
+        if (mNativePage != null) {
+            if (!mNativePage.isFrozen()) {
+                mNativePage.getView().removeOnAttachStateChangeListener(mAttachStateChangeListener);
+            }
+            mNativePage = null;
         }
-        mNativePage = null;
-        notifyContentChanged();
+        if (postHideTask != null) postHideTask.run();
+        if (notify) notifyContentChanged();
         destroyNativePageInternal(previousNativePage);
     }
 
@@ -894,7 +904,7 @@
      * Set {@link TabDelegateFactory} instance and updates the references.
      * @param factory TabDelegateFactory instance.
      */
-    public void setDelegateFactory(TabDelegateFactory factory) {
+    private void setDelegateFactory(TabDelegateFactory factory) {
         // Update the delegate factory, then recreate and propagate all delegates.
         mDelegateFactory = factory;
 
@@ -908,10 +918,25 @@
     }
 
     /**
-     * Notify observers of the new attachment state to activity.
-     * @param attached {@code true} if the tab gets attached.
+     * Notify observers of the new attachment state to activity. If attached, {@link WindowAndroid}
+     * and {@link TabDelegateFactory} for the new activity are provided. Passing {@code null}
+     * for both indicates that the tab is not attached.
+     * @param window A new {@link WindowAndroid} to attach the tab to.
+     * @param tabDelegateFactory The new delegate factory this tab should be using.
      */
-    public void notifyActivityAttachmentChanged(boolean attached) {
+    public void notifyActivityAttachmentChanged(
+            @Nullable WindowAndroid window, @Nullable TabDelegateFactory tabDelegateFactory) {
+        boolean attached = (window != null && tabDelegateFactory != null);
+        assert attached || (window == null && tabDelegateFactory == null);
+
+        if (attached) {
+            updateWindowAndroid(window);
+            setDelegateFactory(tabDelegateFactory);
+
+            // Reload the NativePage (if any), since the old NativePage has a reference to the old
+            // activity.
+            maybeShowNativePage(getUrl(), true);
+        }
         for (TabObserver observer : mObservers) {
             observer.onActivityAttachmentChanged(this, attached);
         }
@@ -1049,9 +1074,7 @@
             mContentView = cv;
             webContents.initialize(PRODUCT_VERSION, new TabViewAndroidDelegate(this, cv), cv,
                     getWindowAndroid(), WebContents.createDefaultInternalsHolder());
-            NativePage previousNativePage = mNativePage;
-            mNativePage = null;
-            destroyNativePageInternal(previousNativePage);
+            hideNativePage(false, null);
 
             if (oldWebContents != null) {
                 oldWebContents.setImportance(ChildProcessImportance.NORMAL);
@@ -1091,7 +1114,7 @@
      *                    matches the URL.
      * @return True, if a native page was displayed for url.
      */
-    public boolean maybeShowNativePage(String url, boolean forceReload) {
+    boolean maybeShowNativePage(String url, boolean forceReload) {
         // While detached for reparenting we don't have an owning Activity, or TabModelSelector,
         // so we can't create the native page. The native page will be created once reparenting is
         // completed.
@@ -1144,10 +1167,7 @@
         mObservers.clear();
 
         mUserDataHost.destroy();
-
-        NativePage currentNativePage = mNativePage;
-        mNativePage = null;
-        destroyNativePageInternal(currentNativePage);
+        hideNativePage(false, null);
         destroyWebContents(true);
 
         TabImportanceManager.tabDestroyed(this);
@@ -1518,40 +1538,32 @@
 
     /** This is currently called when committing a pre-rendered page. */
     void swapWebContents(WebContents webContents, boolean didStartLoad, boolean didFinishLoad) {
-        int originalWidth = 0;
-        int originalHeight = 0;
-        if (mContentView != null && mWebContents != null) {
-            originalWidth = mContentView.getWidth();
-            originalHeight = mContentView.getHeight();
-            mWebContents.onHide();
-        }
-
-        Rect bounds = new Rect();
-        if (originalWidth == 0 && originalHeight == 0) {
-            bounds = ExternalPrerenderHandler.estimateContentSize(getApplicationContext(), false);
-            originalWidth = bounds.right - bounds.left;
-            originalHeight = bounds.bottom - bounds.top;
-        }
+        boolean hasWebContents = mContentView != null && mWebContents != null;
+        Rect original = hasWebContents
+                ? new Rect(0, 0, mContentView.getWidth(), mContentView.getHeight())
+                : new Rect();
+        if (hasWebContents) mWebContents.onHide();
+        Rect bounds = original.isEmpty()
+                ? ExternalPrerenderHandler.estimateContentSize(getApplicationContext(), false)
+                : null;
+        if (bounds != null) original.set(bounds);
 
         destroyWebContents(false /* do not delete native web contents */);
-        NativePage previousNativePage = mNativePage;
-        mNativePage = null;
+        hideNativePage(false, () -> {
+            // Size of the new content is zero at this point. Set the view size in advance
+            // so that next onShow() call won't send a resize message with zero size
+            // to the renderer process. This prevents the size fluttering that may confuse
+            // Blink and break rendered result (see http://crbug.com/340987).
+            webContents.setSize(original.width(), original.height());
 
-        // Size of the new content is zero at this point. Set the view size in advance
-        // so that next onShow() call won't send a resize message with zero size
-        // to the renderer process. This prevents the size fluttering that may confuse
-        // Blink and break rendered result (see http://crbug.com/340987).
-        webContents.setSize(originalWidth, originalHeight);
-
-        if (!bounds.isEmpty()) {
-            assert mNativeTabAndroid != 0;
-            TabJni.get().onPhysicalBackingSizeChanged(
-                    mNativeTabAndroid, Tab.this, webContents, bounds.right, bounds.bottom);
-        }
-        webContents.onShow();
-        initWebContents(webContents);
-
-        destroyNativePageInternal(previousNativePage);
+            if (bounds != null) {
+                assert mNativeTabAndroid != 0;
+                TabJni.get().onPhysicalBackingSizeChanged(
+                        mNativeTabAndroid, Tab.this, webContents, bounds.right, bounds.bottom);
+            }
+            webContents.onShow();
+            initWebContents(webContents);
+        });
 
         String url = getUrl();
 
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab_activity_glue/ReparentingTask.java b/chrome/android/java/src/org/chromium/chrome/browser/tab_activity_glue/ReparentingTask.java
index 01564d7..e1cf637 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tab_activity_glue/ReparentingTask.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tab_activity_glue/ReparentingTask.java
@@ -118,7 +118,7 @@
 
         // TabModelSelector of this Tab, if present, gets notified to remove the tab from
         // the TabModel it belonged to.
-        tab.notifyActivityAttachmentChanged(false);
+        tab.notifyActivityAttachmentChanged(null, null);
     }
 
     /**
@@ -144,20 +144,12 @@
      * java and native sides.
      *
      * @param window A new {@link WindowAndroid} to attach the tab to.
-     * @param activity  The new activity this tab should be associated with.
      * @param tabDelegateFactory  The new delegate factory this tab should be using.
      */
     private void attach(WindowAndroid window, TabDelegateFactory tabDelegateFactory) {
         assert Tab.isDetached(mTab);
-        mTab.updateWindowAndroid(window);
-        mTab.setDelegateFactory(tabDelegateFactory);
-
-        // Reload the NativePage (if any), since the old NativePage has a reference to the old
-        // activity.
-        mTab.maybeShowNativePage(mTab.getUrl(), true);
-
+        mTab.notifyActivityAttachmentChanged(window, tabDelegateFactory);
         ReparentingTaskJni.get().attachTab(mTab.getWebContents());
-        mTab.notifyActivityAttachmentChanged(true);
     }
 
     @NativeMethods
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tasks/ReturnToChromeExperimentsUtil.java b/chrome/android/java/src/org/chromium/chrome/browser/tasks/ReturnToChromeExperimentsUtil.java
index 085732a..119b01d8 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tasks/ReturnToChromeExperimentsUtil.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tasks/ReturnToChromeExperimentsUtil.java
@@ -37,14 +37,14 @@
      * @return true if past threshold, false if not past threshold or experiment cannot be loaded.
      */
     public static boolean shouldShowTabSwitcher(final long lastBackgroundedTimeMillis) {
-        if (lastBackgroundedTimeMillis == -1) {
-            // No last background timestamp set, use control behavior.
-            return false;
-        }
-
         int tabSwitcherAfterMillis = ChromeFeatureList.getFieldTrialParamByFeatureAsInt(
                 ChromeFeatureList.TAB_SWITCHER_ON_RETURN, TAB_SWITCHER_ON_RETURN_MS, -1);
 
+        if (lastBackgroundedTimeMillis == -1) {
+            // No last background timestamp set, use control behavior unless "immediate" was set.
+            return tabSwitcherAfterMillis == 0;
+        }
+
         if (tabSwitcherAfterMillis < 0) {
             // If no value for experiment, use control behavior.
             return false;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/LocationBarModel.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/LocationBarModel.java
index 0443c72..8b87cfa 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/LocationBarModel.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/LocationBarModel.java
@@ -397,7 +397,7 @@
             case ConnectionSecurityLevel.WARNING:
                 return R.drawable.omnibox_info;
             case ConnectionSecurityLevel.DANGEROUS:
-                return R.drawable.omnibox_https_invalid;
+                return R.drawable.omnibox_not_secure_warning;
             case ConnectionSecurityLevel.SECURE_WITH_POLICY_INSTALLED_CERT:
             case ConnectionSecurityLevel.SECURE:
             case ConnectionSecurityLevel.EV_SECURE:
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/tasks/ReturnToChromeTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/tasks/ReturnToChromeTest.java
index 02bae174..147ab21 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/tasks/ReturnToChromeTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/tasks/ReturnToChromeTest.java
@@ -55,7 +55,7 @@
     public void setUp() {
         FeatureUtilities.setGridTabSwitcherEnabledForTesting(true);
 
-        mActivityTestRule.startMainActivityFromLauncher();
+        mActivityTestRule.startMainActivityOnBlankPage();
         mActivity = mActivityTestRule.getActivity();
 
         setupTabs();
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/vr/VrBrowserControllerInputTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/vr/VrBrowserControllerInputTest.java
index 35c3fc5..4de7224 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/vr/VrBrowserControllerInputTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/vr/VrBrowserControllerInputTest.java
@@ -370,16 +370,15 @@
         mVrTestRule.loadUrl(
                 VrBrowserTestFramework.getFileUrlForHtmlTestFile("test_controller_scrolling"),
                 PAGE_LOAD_TIMEOUT_S);
-        mVrTestRule.loadUrl(VrBrowserTestFramework.getFileUrlForHtmlTestFile("generic_webvr_page"),
-                PAGE_LOAD_TIMEOUT_S);
-        mVrTestRule.loadUrl(
-                VrBrowserTestFramework.getFileUrlForHtmlTestFile("test_navigation_webvr_page"),
-                PAGE_LOAD_TIMEOUT_S);
-        mVrTestRule.loadUrl(
-                VrBrowserTestFramework.getFileUrlForHtmlTestFile("test_webvr_autopresent"),
-                PAGE_LOAD_TIMEOUT_S);
         mVrTestRule.loadUrl(VrBrowserTestFramework.getFileUrlForHtmlTestFile("generic_webxr_page"),
                 PAGE_LOAD_TIMEOUT_S);
+        mVrTestRule.loadUrl(
+                VrBrowserTestFramework.getFileUrlForHtmlTestFile("test_navigation_webxr_page"),
+                PAGE_LOAD_TIMEOUT_S);
+        mVrTestRule.loadUrl(VrBrowserTestFramework.getFileUrlForHtmlTestFile("test_webxr_input"),
+                PAGE_LOAD_TIMEOUT_S);
+        mVrTestRule.loadUrl(VrBrowserTestFramework.getFileUrlForHtmlTestFile("test_webxr_consent"),
+                PAGE_LOAD_TIMEOUT_S);
         mVrTestRule.loadUrl(VrBrowserTestFramework.getFileUrlForHtmlTestFile("test_gamepad_button"),
                 PAGE_LOAD_TIMEOUT_S);
 
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/vr/VrBrowserNativeUiTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/vr/VrBrowserNativeUiTest.java
index 28887c9..fda1d46 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/vr/VrBrowserNativeUiTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/vr/VrBrowserNativeUiTest.java
@@ -45,8 +45,8 @@
  * End-to-end tests for native UI presentation in VR Browser mode.
  */
 @RunWith(ChromeJUnit4ClassRunner.class)
-@CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE,
-        "enable-features=LogJsConsoleMessages", "enable-blink-features=WebVR"})
+@CommandLineFlags.
+Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE, "enable-features=LogJsConsoleMessages"})
 @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM_OR_STANDALONE)
 public class VrBrowserNativeUiTest {
     // We need to make sure the port is constant, otherwise the URL changes between test runs, which
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/vr/VrBrowserNavigationTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/vr/VrBrowserNavigationTest.java
index e36ada25..d20b2ba 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/vr/VrBrowserNavigationTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/vr/VrBrowserNavigationTest.java
@@ -61,8 +61,8 @@
  * "VR Shell".
  */
 @RunWith(ChromeJUnit4ClassRunner.class)
-@CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE,
-        "enable-features=LogJsConsoleMessages", "enable-blink-features=WebVR"})
+@CommandLineFlags.
+Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE, "enable-features=LogJsConsoleMessages"})
 @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM_OR_STANDALONE)
 public class VrBrowserNavigationTest {
     // We explicitly instantiate a rule here instead of using parameterization since this class
@@ -75,25 +75,23 @@
             new RenderTestRule("components/test/data/vr_browser_ui/render_tests");
 
     private WebXrVrTestFramework mWebXrVrTestFramework;
-    private WebVrTestFramework mWebVrTestFramework;
     private VrBrowserTestFramework mVrBrowserTestFramework;
 
     private static final String TEST_PAGE_2D_URL =
             VrBrowserTestFramework.getFileUrlForHtmlTestFile("test_navigation_2d_page");
     private static final String TEST_PAGE_2D_2_URL =
             VrBrowserTestFramework.getFileUrlForHtmlTestFile("test_navigation_2d_page2");
-    private static final String TEST_PAGE_WEBVR_URL =
-            WebVrTestFramework.getFileUrlForHtmlTestFile("test_navigation_webvr_page");
     private static final String TEST_PAGE_WEBXR_URL =
             WebXrVrTestFramework.getFileUrlForHtmlTestFile("test_navigation_webxr_page");
+    private static final String TEST_PAGE_WEBXR_2_URL =
+            WebXrVrTestFramework.getFileUrlForHtmlTestFile("test_navigation_webxr_page2");
 
-    @IntDef({Page.PAGE_2D, Page.PAGE_2D_2, Page.PAGE_WEBVR, Page.PAGE_WEBXR})
+    @IntDef({Page.PAGE_2D, Page.PAGE_2D_2, Page.PAGE_WEBXR})
     @Retention(RetentionPolicy.SOURCE)
     private @interface Page {
         int PAGE_2D = 0;
         int PAGE_2D_2 = 1;
-        int PAGE_WEBVR = 2;
-        int PAGE_WEBXR = 3;
+        int PAGE_WEBXR = 2;
     }
 
     @IntDef({PresentationMode.NON_PRESENTING, PresentationMode.PRESENTING})
@@ -113,7 +111,6 @@
     @Before
     public void setUp() {
         mWebXrVrTestFramework = new WebXrVrTestFramework(mTestRule);
-        mWebVrTestFramework = new WebVrTestFramework(mTestRule);
         mVrBrowserTestFramework = new VrBrowserTestFramework(mTestRule);
         VrBrowserTransitionUtils.forceEnterVrBrowserOrFail(POLL_TIMEOUT_LONG_MS);
     }
@@ -124,8 +121,6 @@
                 return TEST_PAGE_2D_URL;
             case Page.PAGE_2D_2:
                 return TEST_PAGE_2D_2_URL;
-            case Page.PAGE_WEBVR:
-                return TEST_PAGE_WEBVR_URL;
             case Page.PAGE_WEBXR:
                 return TEST_PAGE_WEBXR_URL;
             default:
@@ -134,7 +129,7 @@
     }
 
     /**
-     * Triggers navigation to either a 2D or WebVR page. Similar to
+     * Triggers navigation to either a 2D or WebXR page. Similar to
      * {@link ChromeActivityTestRule#loadUrl loadUrl} but makes sure page initiates the
      * navigation. This is desirable since we are testing navigation transitions end-to-end.
      */
@@ -204,21 +199,10 @@
     }
 
     /**
-     * Tests navigation from a 2D to a WebVR page.
-     */
-    @Test
-    @MediumTest
-    public void test2dToWebVr() throws IllegalArgumentException, TimeoutException {
-        impl2dToWeb(Page.PAGE_WEBVR, mWebVrTestFramework);
-    }
-
-    /**
      * Tests navigation from a 2D to a WebXR page.
      */
     @Test
     @MediumTest
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR"})
             public void test2dToWebXr() throws IllegalArgumentException, TimeoutException {
         impl2dToWeb(Page.PAGE_WEBXR, mWebXrVrTestFramework);
@@ -235,21 +219,10 @@
     }
 
     /**
-     * Tests navigation from a fullscreened 2D to a WebVR page.
-     */
-    @Test
-    @MediumTest
-    public void test2dFullscreenToWebVr() throws IllegalArgumentException, TimeoutException {
-        impl2dFullscreenToWeb(Page.PAGE_WEBVR, mWebVrTestFramework);
-    }
-
-    /**
      * Tests navigation from a fullscreened 2D to a WebXR page.
      */
     @Test
     @MediumTest
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR"})
             public void test2dFullscreenToWebXr()
             throws IllegalArgumentException, TimeoutException {
@@ -268,21 +241,10 @@
     }
 
     /**
-     * Tests navigation from a WebVR to a 2D page.
-     */
-    @Test
-    @MediumTest
-    public void testWebVrTo2d() throws IllegalArgumentException, TimeoutException {
-        webTo2dImpl(Page.PAGE_WEBVR, mWebVrTestFramework);
-    }
-
-    /**
      * Tests navigation from a WebXR to a 2D page.
      */
     @Test
     @MediumTest
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR"})
             public void testWebXrTo2d() throws IllegalArgumentException, TimeoutException {
         webTo2dImpl(Page.PAGE_WEBXR, mWebXrVrTestFramework);
@@ -299,21 +261,10 @@
     }
 
     /**
-     * Tests navigation from a WebVR to a WebVR page.
-     */
-    @Test
-    @MediumTest
-    public void testWebVrToWebVr() throws IllegalArgumentException, TimeoutException {
-        webToWebImpl(Page.PAGE_WEBVR, mWebVrTestFramework);
-    }
-
-    /**
      * Tests navigation from a WebXR to a WebXR page.
      */
     @Test
     @MediumTest
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR"})
             public void testWebXrToWebXr() throws IllegalArgumentException, TimeoutException {
         webToWebImpl(Page.PAGE_WEBXR, mWebXrVrTestFramework);
@@ -330,21 +281,10 @@
     }
 
     /**
-     * Tests navigation from a presenting WebVR to a 2D page.
-     */
-    @Test
-    @MediumTest
-    public void testWebVrPresentingTo2d() throws IllegalArgumentException, TimeoutException {
-        webPresentingTo2dImpl(Page.PAGE_WEBVR, mWebVrTestFramework);
-    }
-
-    /**
      * Tests navigation from a presenting WebXR to a 2D page.
      */
     @Test
     @MediumTest
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR"})
             public void testWebXrPresentingTo2d()
             throws IllegalArgumentException, TimeoutException {
@@ -363,21 +303,10 @@
     }
 
     /**
-     * Tests navigation from a presenting WebVR to a WebVR page.
-     */
-    @Test
-    @MediumTest
-    public void testWebVrPresentingToWebVr() throws IllegalArgumentException, TimeoutException {
-        webPresentingToWebImpl(Page.PAGE_WEBVR, mWebVrTestFramework);
-    }
-
-    /**
      * Tests navigation from a presenting WebXR to a WebXR page.
      */
     @Test
     @MediumTest
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR"})
             public void testWebXrPresentingToWebXr()
             throws IllegalArgumentException, TimeoutException {
@@ -396,21 +325,10 @@
     }
 
     /**
-     * Tests navigation from a fullscreened WebVR to a 2D page.
-     */
-    @Test
-    @MediumTest
-    public void testWebVrFullscreenTo2d() throws IllegalArgumentException, TimeoutException {
-        webFullscreenTo2dImpl(Page.PAGE_WEBVR, mWebVrTestFramework);
-    }
-
-    /**
      * Tests navigation from a fullscreened WebXR to a 2D page.
      */
     @Test
     @MediumTest
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR"})
             public void testWebXrFullscreenTo2d()
             throws IllegalArgumentException, TimeoutException {
@@ -429,21 +347,10 @@
     }
 
     /**
-     * Tests navigation from a fullscreened WebVR to a WebVR page.
-     */
-    @Test
-    @MediumTest
-    public void testWebVrFullscreenToWebVr() throws IllegalArgumentException, TimeoutException {
-        webFullscreenToWebImpl(Page.PAGE_WEBVR, mWebVrTestFramework);
-    }
-
-    /**
      * Tests navigation from a fullscreened WebXR to a WebXR page.
      */
     @Test
     @MediumTest
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR"})
             public void testWebXrFullscreenToWebXr()
             throws IllegalArgumentException, TimeoutException {
@@ -661,15 +568,15 @@
         // Test Incognito's forward/back.
         // TODO(https://crbug.com/868506): Remove the waitForTabPageLoaded calls after the loadUrl
         // calls once the issue with Incognito loadUrl reporting page load too quickly is fixed.
-        mTestRule.loadUrl(TEST_PAGE_WEBVR_URL);
+        mTestRule.loadUrl(TEST_PAGE_WEBXR_2_URL);
         ChromeTabUtils.waitForTabPageLoaded(
-                mTestRule.getActivity().getActivityTab(), TEST_PAGE_WEBVR_URL);
+                mTestRule.getActivity().getActivityTab(), TEST_PAGE_WEBXR_2_URL);
         mTestRule.loadUrl(TEST_PAGE_WEBXR_URL);
         ChromeTabUtils.waitForTabPageLoaded(
                 mTestRule.getActivity().getActivityTab(), TEST_PAGE_WEBXR_URL);
         VrBrowserTransitionUtils.navigateBack();
         ChromeTabUtils.waitForTabPageLoaded(
-                mTestRule.getActivity().getActivityTab(), TEST_PAGE_WEBVR_URL);
+                mTestRule.getActivity().getActivityTab(), TEST_PAGE_WEBXR_2_URL);
         VrBrowserTransitionUtils.navigateForward();
         ChromeTabUtils.waitForTabPageLoaded(
                 mTestRule.getActivity().getActivityTab(), TEST_PAGE_WEBXR_URL);
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/vr/VrBrowserTransitionTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/vr/VrBrowserTransitionTest.java
index 0592584..d2af783 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/vr/VrBrowserTransitionTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/vr/VrBrowserTransitionTest.java
@@ -58,7 +58,7 @@
 import java.util.concurrent.atomic.AtomicBoolean;
 
 /**
- * End-to-end tests for state transitions in VR, e.g. exiting WebVR presentation
+ * End-to-end tests for state transitions in VR, e.g. exiting WebXR presentation
  * into the VR browser.
  */
 @RunWith(ChromeJUnit4ClassRunner.class)
@@ -72,13 +72,11 @@
     public ChromeTabbedActivityVrTestRule mTestRule = new ChromeTabbedActivityVrTestRule();
 
     private WebXrVrTestFramework mWebXrVrTestFramework;
-    private WebVrTestFramework mWebVrTestFramework;
     private VrBrowserTestFramework mVrBrowserTestFramework;
 
     @Before
     public void setUp() {
         mWebXrVrTestFramework = new WebXrVrTestFramework(mTestRule);
-        mWebVrTestFramework = new WebVrTestFramework(mTestRule);
         mVrBrowserTestFramework = new VrBrowserTestFramework(mTestRule);
     }
 
@@ -238,21 +236,7 @@
 
     /**
      * Tests that the reported display dimensions are correct when exiting
-     * from WebVR presentation to the VR browser.
-     */
-    @Test
-    @CommandLineFlags.Add("enable-blink-features=WebVR")
-    @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM_OR_STANDALONE)
-    @MediumTest
-    public void testExitPresentationWebVrToVrShell() throws IllegalArgumentException {
-        exitPresentationToVrShellImpl(
-                WebVrTestFramework.getFileUrlForHtmlTestFile("test_navigation_webvr_page"),
-                mWebVrTestFramework);
-    }
-
-    /**
-     * Tests that the reported display dimensions are correct when exiting
-     * from WebVR presentation to the VR browser.
+     * from WebXR presentation to the VR browser.
      */
     @Test
     @CommandLineFlags.Add("enable-features=WebXR")
@@ -286,21 +270,7 @@
     }
 
     /**
-     * Tests that entering WebVR presentation from the VR browser, exiting presentation, and
-     * re-entering presentation works. This is a regression test for crbug.com/799999.
-     */
-    @Test
-    @CommandLineFlags.Add("enable-blink-features=WebVR")
-    @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM_OR_STANDALONE)
-    @MediumTest
-    public void testWebVrReEntryFromVrBrowser() {
-        reEntryFromVrBrowserImpl(
-                WebVrTestFramework.getFileUrlForHtmlTestFile("test_webvr_reentry_from_vr_browser"),
-                mWebVrTestFramework);
-    }
-
-    /**
-     * Tests that entering WebVR presentation from the VR browser, exiting presentation, and
+     * Tests that entering WebXR presentation from the VR browser, exiting presentation, and
      * re-entering presentation works. This is a regression test for crbug.com/799999.
      */
     @Test
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/vr/VrFeedbackInfoBarTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/vr/VrFeedbackInfoBarTest.java
index 88b5211e..40a3478 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/vr/VrFeedbackInfoBarTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/vr/VrFeedbackInfoBarTest.java
@@ -33,8 +33,8 @@
  * Tests for the infobar that prompts the user to enter feedback on their VR browsing experience.
  */
 @RunWith(ChromeJUnit4ClassRunner.class)
-@CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE,
-        "enable-features=LogJsConsoleMessages", "enable-blink-features=WebVR"})
+@CommandLineFlags.
+Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE, "enable-features=LogJsConsoleMessages"})
 @Restriction({RESTRICTION_TYPE_DEVICE_DAYDREAM, RESTRICTION_TYPE_SVR})
 public class VrFeedbackInfoBarTest {
     // We explicitly instantiate a rule here instead of using parameterization since this class
@@ -43,20 +43,16 @@
     public ChromeTabbedActivityVrTestRule mTestRule = new ChromeTabbedActivityVrTestRule();
 
     private WebXrVrTestFramework mWebXrVrTestFramework;
-    private WebVrTestFramework mWebVrTestFramework;
     private VrBrowserTestFramework mVrBrowserTestFramework;
 
     private static final String TEST_PAGE_2D_URL =
             VrBrowserTestFramework.getFileUrlForHtmlTestFile("test_navigation_2d_page");
-    private static final String TEST_PAGE_WEBVR_URL =
-            WebVrTestFramework.getFileUrlForHtmlTestFile("generic_webvr_page");
     private static final String TEST_PAGE_WEBXR_URL =
             WebXrVrTestFramework.getFileUrlForHtmlTestFile("generic_webxr_page");
 
     @Before
     public void setUp() {
         mWebXrVrTestFramework = new WebXrVrTestFramework(mTestRule);
-        mWebVrTestFramework = new WebVrTestFramework(mTestRule);
         mVrBrowserTestFramework = new VrBrowserTestFramework(mTestRule);
         Assert.assertFalse(
                 "Test started opting out of feedback", VrFeedbackStatus.getFeedbackOptOut());
@@ -134,17 +130,6 @@
      */
     @Test
     @MediumTest
-    public void testFeedbackOnlyOnVrBrowsing() {
-        feedbackOnlyOnVrBrowsingImpl(TEST_PAGE_WEBVR_URL, mWebVrTestFramework);
-    }
-
-    /**
-     * Tests that we only show the feedback prompt when the user has actually used the VR browser.
-     */
-    @Test
-    @MediumTest
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR"})
             public void testFeedbackOnlyOnVrBrowsing_WebXr() {
         feedbackOnlyOnVrBrowsingImpl(TEST_PAGE_WEBXR_URL, mWebXrVrTestFramework);
@@ -165,24 +150,11 @@
     }
 
     /**
-     * Tests that we show the prompt if the VR browser is used after exiting presentation mode.
-     */
-    @Test
-    @MediumTest
-    @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM)
-    public void testExitPresentationInVr() {
-        // Enter VR presentation mode.
-        exitPresentationInVrImpl(TEST_PAGE_WEBVR_URL, mWebVrTestFramework);
-    }
-
-    /**
      * Tests that we show the prompt if the VR browser is used after exiting a WebXR immersive
      * session.
      */
     @Test
     @MediumTest
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR"})
             @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM)
             public void testExitPresentationInVr_WebXr() {
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/vr/WebVrTestFramework.java b/chrome/android/javatests/src/org/chromium/chrome/browser/vr/WebVrTestFramework.java
deleted file mode 100644
index 73aa78ca..0000000
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/vr/WebVrTestFramework.java
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright 2018 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.
-
-package org.chromium.chrome.browser.vr;
-
-import org.junit.Assert;
-
-import org.chromium.chrome.test.ChromeActivityTestRule;
-import org.chromium.content_public.browser.WebContents;
-
-/**
- * Extension of WebXrVrTestFramework containing WebVR-specific functionality.
- */
-public class WebVrTestFramework extends WebXrVrTestFramework {
-    public WebVrTestFramework(ChromeActivityTestRule rule) {
-        super(rule);
-    }
-
-    /**
-     * Checks whether a VRDisplay was actually found. Keeps the "xrDeviceFound" naming instead of
-     * "vrDisplayFound" since WebVR is being deprecated and maintaining consistency with WebXR
-     * naming is more important in the long run.
-     *
-     * @param webContents The WebContents to run the JavaScript through.
-     * @return Whether a VRDisplay was found.
-     */
-    @Override
-    public boolean xrDeviceFound(WebContents webContents) {
-        return !runJavaScriptOrFail("vrDisplay", POLL_TIMEOUT_SHORT_MS, webContents).equals("null");
-    }
-
-    /**
-     * WebVR-specific implementation of enterSessionWithUserGestureOrFail.
-     *
-     * @param webContents The WebContents of the tab to enter WebVR presentation in.
-     */
-    @Override
-    public void enterSessionWithUserGestureOrFail(WebContents webContents) {
-        enterSessionWithUserGesture(webContents);
-        pollJavaScriptBooleanOrFail("vrDisplay.isPresenting", POLL_TIMEOUT_LONG_MS, webContents);
-        Assert.assertTrue("VRDisplay presenting, but VR Shell not in WebVR mode",
-                TestVrShellDelegate.getVrShellForTesting().getWebVrModeEnabled());
-    }
-
-    /**
-     * Exits WebVR presentation.
-     *
-     * @param webContents The WebContents of the tab to exit WebVR presentation in.
-     */
-    @Override
-    public void endSession(WebContents webContents) {
-        runJavaScriptOrFail("vrDisplay.exitPresent()", POLL_TIMEOUT_SHORT_MS, webContents);
-    }
-
-    /**
-     * Checks whether a WebVR session would trigger the consent dialog.
-     *
-     * @param webContents The WebContents to check in.
-     * @return False, as WebVR doesn't use the consent dialog.
-     */
-    @Override
-    public boolean shouldExpectConsentDialog(WebContents webContents) {
-        return false;
-    }
-}
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/vr/WebXrVrDeviceTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/vr/WebXrVrDeviceTest.java
index a6832152..1655a96d 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/vr/WebXrVrDeviceTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/vr/WebXrVrDeviceTest.java
@@ -6,7 +6,6 @@
 
 import static org.chromium.chrome.browser.vr.XrTestFramework.PAGE_LOAD_TIMEOUT_S;
 import static org.chromium.chrome.browser.vr.XrTestFramework.POLL_TIMEOUT_SHORT_MS;
-import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_SVR;
 import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_VIEWER_DAYDREAM;
 
 import android.graphics.PointF;
@@ -31,7 +30,6 @@
 import org.chromium.chrome.browser.vr.rules.XrActivityRestriction;
 import org.chromium.chrome.browser.vr.util.NativeUiUtils;
 import org.chromium.chrome.browser.vr.util.NfcSimUtils;
-import org.chromium.chrome.browser.vr.util.VrShellDelegateUtils;
 import org.chromium.chrome.browser.vr.util.VrTestRuleUtils;
 import org.chromium.chrome.test.ChromeActivityTestRule;
 import org.chromium.chrome.test.ChromeJUnit4RunnerDelegate;
@@ -40,13 +38,13 @@
 import java.util.concurrent.Callable;
 
 /**
- * End-to-end tests for WebVR where the choice of test device has a greater
+ * End-to-end tests for WebXR where the choice of test device has a greater
  * impact than the usual Daydream-ready vs. non-Daydream-ready effect.
  */
 @RunWith(ParameterizedRunner.class)
 @UseRunnerDelegate(ChromeJUnit4RunnerDelegate.class)
-@CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE,
-        "enable-features=LogJsConsoleMessages", "enable-blink-features=WebVR"})
+@CommandLineFlags.
+Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE, "enable-features=LogJsConsoleMessages"})
 public class WebXrVrDeviceTest {
     @ClassParameter
     private static List<ParameterSet> sClassParams =
@@ -56,7 +54,6 @@
 
     private ChromeActivityTestRule mTestRule;
     private WebXrVrTestFramework mWebXrVrTestFramework;
-    private WebVrTestFramework mWebVrTestFramework;
 
     public WebXrVrDeviceTest(Callable<ChromeActivityTestRule> callable) throws Exception {
         mTestRule = callable.call();
@@ -66,49 +63,6 @@
     @Before
     public void setUp() {
         mWebXrVrTestFramework = new WebXrVrTestFramework(mTestRule);
-        mWebVrTestFramework = new WebVrTestFramework(mTestRule);
-    }
-
-    /**
-     * Tests that the reported WebVR capabilities match expectations on the devices the WebVR tests
-     * are run on continuously.
-     */
-    @Test
-    @MediumTest
-    @XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL})
-    @MinAndroidSdkLevel(Build.VERSION_CODES.LOLLIPOP) // WebVR is only supported on L+
-    public void testDeviceCapabilitiesMatchExpectations() {
-        mWebVrTestFramework.loadUrlAndAwaitInitialization(
-                WebVrTestFramework.getFileUrlForHtmlTestFile(
-                        "test_device_capabilities_match_expectations"),
-                PAGE_LOAD_TIMEOUT_S);
-        mWebVrTestFramework.executeStepAndWait(
-                "stepCheckDeviceCapabilities('" + Build.DEVICE + "')");
-        mWebVrTestFramework.endTest();
-    }
-
-    /**
-     * Tests that the magic-window-only GVR-less implementation causes a VRDisplay to be present
-     * when GVR isn't present and has expected capabilities.
-     */
-    @Test
-    @MediumTest
-    @XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL})
-    @Restriction(RESTRICTION_TYPE_SVR)
-    // Sensorless still works on older devices since it doesn't rely on anything in the DFM.
-    public void testGvrlessMagicWindowCapabilities() {
-        // Make Chrome think that VrCore is not installed
-        VrShellDelegateUtils.setVrCoreCompatibility(VrCoreCompatibility.VR_NOT_AVAILABLE);
-
-        mWebVrTestFramework.loadUrlAndAwaitInitialization(
-                WebVrTestFramework.getFileUrlForHtmlTestFile(
-                        "test_device_capabilities_match_expectations"),
-                PAGE_LOAD_TIMEOUT_S);
-        Assert.assertTrue(mWebVrTestFramework.xrDeviceFound());
-        mWebVrTestFramework.executeStepAndWait(
-                "stepCheckDeviceCapabilities('VR Orientation Device')");
-        mWebVrTestFramework.endTest();
-        VrShellDelegateUtils.getDelegateInstance().overrideVrCoreVersionCheckerForTesting(null);
     }
 
     /**
@@ -116,8 +70,6 @@
      */
     @Test
     @MediumTest
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR"})
             @XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL})
             @MinAndroidSdkLevel(Build.VERSION_CODES.LOLLIPOP) // WebXR is only supported on L+
@@ -139,8 +91,6 @@
      */
     @Test
     @MediumTest
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR"})
             @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM)
             @MinAndroidSdkLevel(Build.VERSION_CODES.LOLLIPOP) // WebXR is only supported on L+
@@ -177,12 +127,10 @@
      */
     @Test
     @MediumTest
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
-            @CommandLineFlags.Add({"enable-features=WebXR"})
-            @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM)
-            @MinAndroidSdkLevel(Build.VERSION_CODES.LOLLIPOP) // WebVR is only supported on L+
-            public void testForNullPosesInInlineVrFromNfc() {
+    @CommandLineFlags.Add({"enable-features=WebXR"})
+    @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM)
+    @MinAndroidSdkLevel(Build.VERSION_CODES.LOLLIPOP) // WebXR is only supported on L+
+    public void testForNullPosesInInlineVrFromNfc() {
         mWebXrVrTestFramework.loadUrlAndAwaitInitialization(
                 WebXrVrTestFramework.getFileUrlForHtmlTestFile("test_inline_vr_poses"),
                 PAGE_LOAD_TIMEOUT_S);
@@ -212,12 +160,10 @@
      */
     @Test
     @MediumTest
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
-            @CommandLineFlags.Add({"enable-features=WebXR"})
-            @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM)
-            @MinAndroidSdkLevel(Build.VERSION_CODES.LOLLIPOP) // WebVR is only supported on L+
-            public void testForNullPosesInInlineVrOnNavigation() {
+    @CommandLineFlags.Add({"enable-features=WebXR"})
+    @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM)
+    @MinAndroidSdkLevel(Build.VERSION_CODES.LOLLIPOP) // WebXR is only supported on L+
+    public void testForNullPosesInInlineVrOnNavigation() {
         NfcSimUtils.simNfcScanUntilVrEntry(mTestRule.getActivity());
         mWebXrVrTestFramework.loadUrlAndAwaitInitialization(
                 WebXrVrTestFramework.getFileUrlForHtmlTestFile("test_inline_vr_poses"),
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/vr/WebXrVrInputTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/vr/WebXrVrInputTest.java
index 00b4cd7..755cb591 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/vr/WebXrVrInputTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/vr/WebXrVrInputTest.java
@@ -5,7 +5,6 @@
 package org.chromium.chrome.browser.vr;
 
 import static org.chromium.chrome.browser.vr.XrTestFramework.PAGE_LOAD_TIMEOUT_S;
-import static org.chromium.chrome.browser.vr.XrTestFramework.POLL_CHECK_INTERVAL_SHORT_MS;
 import static org.chromium.chrome.browser.vr.XrTestFramework.POLL_TIMEOUT_LONG_MS;
 import static org.chromium.chrome.browser.vr.XrTestFramework.POLL_TIMEOUT_SHORT_MS;
 import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_SVR;
@@ -34,7 +33,6 @@
 import org.chromium.base.test.params.ParameterizedRunner;
 import org.chromium.base.test.util.CommandLineFlags;
 import org.chromium.base.test.util.DisableIf;
-import org.chromium.base.test.util.DisabledTest;
 import org.chromium.base.test.util.MinAndroidSdkLevel;
 import org.chromium.base.test.util.Restriction;
 import org.chromium.chrome.browser.ChromeSwitches;
@@ -47,8 +45,6 @@
 import org.chromium.chrome.browser.vr.util.VrTransitionUtils;
 import org.chromium.chrome.test.ChromeActivityTestRule;
 import org.chromium.chrome.test.ChromeJUnit4RunnerDelegate;
-import org.chromium.content_public.browser.ViewEventSink;
-import org.chromium.content_public.browser.test.util.CriteriaHelper;
 import org.chromium.content_public.browser.test.util.TestThreadUtils;
 import org.chromium.content_public.browser.test.util.TouchCommon;
 
@@ -60,13 +56,13 @@
 import java.util.concurrent.TimeUnit;
 
 /**
- * End-to-end tests for sending input while using WebVR and WebXR.
+ * End-to-end tests for sending input while using WebXR.
  */
 @RunWith(ParameterizedRunner.class)
 @UseRunnerDelegate(ChromeJUnit4RunnerDelegate.class)
-@CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE,
-        "enable-features=LogJsConsoleMessages", "enable-blink-features=WebVR"})
-@MinAndroidSdkLevel(Build.VERSION_CODES.LOLLIPOP) // WebVR and WebXR are only supported on L+
+@CommandLineFlags.
+Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE, "enable-features=LogJsConsoleMessages"})
+@MinAndroidSdkLevel(Build.VERSION_CODES.LOLLIPOP) //  WebXR is only supported on L+
 public class WebXrVrInputTest {
     @ClassParameter
     private static List<ParameterSet> sClassParams =
@@ -76,7 +72,6 @@
 
     private ChromeActivityTestRule mTestRule;
     private WebXrVrTestFramework mWebXrVrTestFramework;
-    private WebVrTestFramework mWebVrTestFramework;
 
     public WebXrVrInputTest(Callable<ChromeActivityTestRule> callable) throws Exception {
         mTestRule = callable.call();
@@ -86,31 +81,13 @@
     @Before
     public void setUp() {
         mWebXrVrTestFramework = new WebXrVrTestFramework(mTestRule);
-        mWebVrTestFramework = new WebVrTestFramework(mTestRule);
     }
 
     private void assertAppButtonEffect(boolean shouldHaveExited, WebXrVrTestFramework framework) {
-        String boolExpression = (framework instanceof WebVrTestFramework)
-                ? "!vrDisplay.isPresenting"
-                : "sessionInfos[sessionTypes.IMMERSIVE].currentSession == null";
         Assert.assertEquals("App button effect matched expectation", shouldHaveExited,
-                mWebXrVrTestFramework.pollJavaScriptBoolean(boolExpression, POLL_TIMEOUT_SHORT_MS));
-    }
-
-    /**
-     * Tests that screen touches are not registered when in VR. Disabled on standalones because
-     * they don't have touchscreens.
-     */
-    @Test
-    @MediumTest
-    @DisableIf.
-    Build(message = "Flaky on K/L crbug.com/762126", sdk_is_less_than = Build.VERSION_CODES.M)
-    @Restriction(RESTRICTION_TYPE_SVR)
-    @XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL})
-    public void testScreenTapsNotRegistered() throws InterruptedException {
-        screenTapsNotRegisteredImpl(
-                WebVrTestFramework.getFileUrlForHtmlTestFile("test_screen_taps_not_registered"),
-                mWebVrTestFramework);
+                mWebXrVrTestFramework.pollJavaScriptBoolean(
+                        "sessionInfos[sessionTypes.IMMERSIVE].currentSession == null",
+                        POLL_TIMEOUT_SHORT_MS));
     }
 
     /**
@@ -123,8 +100,6 @@
             .Build(message = "Flaky on K/L crbug.com/762126",
                     sdk_is_less_than = Build.VERSION_CODES.M)
             @Restriction(RESTRICTION_TYPE_SVR)
-            @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR,WebXrGamepadModule"})
             @XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL})
             public void
@@ -159,57 +134,11 @@
     }
 
     /**
-     * Tests that Daydream controller clicks are registered as gamepad button pressed.
-     */
-    @Test
-    @LargeTest
-    @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM_OR_STANDALONE)
-    @XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL})
-    public void testControllerClicksRegisteredOnDaydream() {
-        EmulatedVrController controller = new EmulatedVrController(mTestRule.getActivity());
-        mWebVrTestFramework.loadUrlAndAwaitInitialization(
-                WebVrTestFramework.getFileUrlForHtmlTestFile("test_gamepad_button"),
-                PAGE_LOAD_TIMEOUT_S);
-        // Wait to enter VR
-        mWebVrTestFramework.enterSessionWithUserGestureOrFail();
-        // The Gamepad API can flakily fail to detect the gamepad from a single button press, so
-        // spam it with button presses
-        boolean controllerConnected = false;
-        for (int i = 0; i < 10; i++) {
-            controller.performControllerClick();
-            if (mWebVrTestFramework.runJavaScriptOrFail("index != -1", POLL_TIMEOUT_SHORT_MS)
-                            .equals("true")) {
-                controllerConnected = true;
-                break;
-            }
-        }
-        Assert.assertTrue("Gamepad API did not detect controller", controllerConnected);
-        // It's possible for input to get backed up if the emulated controller is being slow, so
-        // ensure that any outstanding output has been received before starting by waiting for
-        // 60 frames (1 second) of not receiving input.
-        mWebVrTestFramework.pollJavaScriptBooleanOrFail("isInputDrained()", POLL_TIMEOUT_LONG_MS);
-        // Have a separate start condition so that the above presses/releases don't get
-        // accidentally detected during the actual test
-        mWebVrTestFramework.runJavaScriptOrFail("canStartTest = true;", POLL_TIMEOUT_SHORT_MS);
-        // Send a controller click and wait for JavaScript to receive it.
-        controller.sendClickButtonToggleEvent();
-        mWebVrTestFramework.waitOnJavaScriptStep();
-        // Re-register the callback since it unregisters itself after finishing the step.
-        mWebVrTestFramework.runJavaScriptOrFail(
-                "onPresentingAnimationFrameCallback = gamepadFrameCallback", POLL_TIMEOUT_SHORT_MS);
-        controller.sendClickButtonToggleEvent();
-        mWebVrTestFramework.waitOnJavaScriptStep();
-        mWebVrTestFramework.endTest();
-    }
-
-    /**
      * Tests that Daydream controller clicks are registered as XR input in an immersive session.
      */
     @Test
     @MediumTest
     @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM_OR_STANDALONE)
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR,WebXrGamepadModule"})
             @XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL})
             public void testControllerClicksRegisteredOnDaydream_WebXr() {
@@ -244,8 +173,6 @@
     @Test
     @MediumTest
     @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM_OR_STANDALONE)
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR,WebXrGamepadModule"})
             @XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL})
             public void testControllerExposedAsGamepadOnDaydream_WebXr() {
@@ -357,46 +284,11 @@
     }
 
     /**
-     * Tests that screen touches are still registered when the viewer is Cardboard.
-     */
-    @Test
-    @MediumTest
-    @Restriction(RESTRICTION_TYPE_VIEWER_NON_DAYDREAM)
-    @XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL})
-    public void testScreenTapsRegisteredOnCardboard() {
-        mWebVrTestFramework.loadUrlAndAwaitInitialization(
-                WebVrTestFramework.getFileUrlForHtmlTestFile("test_gamepad_button"),
-                PAGE_LOAD_TIMEOUT_S);
-        // This boolean is used by testControllerClicksRegisteredOnDaydream to prevent some
-        // flakiness, but is unnecessary here, so set immediately
-        mWebVrTestFramework.runJavaScriptOrFail("canStartTest = true;", POLL_TIMEOUT_SHORT_MS);
-        // Wait to enter VR
-        mWebVrTestFramework.enterSessionWithUserGestureOrFail();
-        int x = mWebVrTestFramework.getCurrentContentView().getWidth() / 2;
-        int y = mWebVrTestFramework.getCurrentContentView().getHeight() / 2;
-        // TODO(mthiesse, https://crbug.com/758374): Injecting touch events into the root GvrLayout
-        // (VrShell) is flaky. Sometimes the events just don't get routed to the presentation
-        // view for no apparent reason. We should figure out why this is and see if it's fixable.
-        final View presentationView =
-                TestVrShellDelegate.getVrShellForTesting().getPresentationViewForTesting();
-        long downTime = sendScreenTouchDown(presentationView, x, y);
-        mWebVrTestFramework.waitOnJavaScriptStep();
-        // Re-register the callback since it unregisters itself after finishing the step.
-        mWebVrTestFramework.runJavaScriptOrFail(
-                "onPresentingAnimationFrameCallback = gamepadFrameCallback", POLL_TIMEOUT_SHORT_MS);
-        sendScreenTouchUp(presentationView, x, y, downTime);
-        mWebVrTestFramework.waitOnJavaScriptStep();
-        mWebVrTestFramework.endTest();
-    }
-
-    /**
      * Tests that screen touches are registered as XR input when the viewer is Cardboard.
      */
     @Test
     @MediumTest
     @Restriction(RESTRICTION_TYPE_VIEWER_NON_DAYDREAM)
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR,WebXrGamepadModule"})
             @XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL})
             public void testScreenTapsRegisteredOnCardboard_WebXr() {
@@ -433,8 +325,6 @@
     @Test
     @MediumTest
     @Restriction(RESTRICTION_TYPE_VIEWER_NON_DAYDREAM)
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR,WebXrGamepadModule"})
             @XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL})
             public void testTransientScreenTapsRegisteredOnCardboard_WebXr() {
@@ -461,27 +351,11 @@
     }
 
     /**
-     * Tests that focus is locked to the presenting display for purposes of VR input.
-     */
-    @Test
-    @MediumTest
-    @DisableIf.
-    Build(message = "K/M https://crbug.com/897259", sdk_is_less_than = Build.VERSION_CODES.N)
-    @XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL})
-    public void testPresentationLocksFocus() {
-        presentationLocksFocusImpl(
-                WebVrTestFramework.getFileUrlForHtmlTestFile("test_presentation_locks_focus"),
-                mWebVrTestFramework);
-    }
-
-    /**
      * Tests that focus is locked to the device with an immersive session for the purposes of
      * VR input.
      */
     @Test
     @MediumTest
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR,WebXrGamepadModule"})
             @XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL})
             public void testPresentationLocksFocus_WebXr() {
@@ -497,35 +371,6 @@
         framework.endTest();
     }
 
-    /**
-     * Verifies that pressing the Daydream controller's 'app' button causes the user to exit
-     * WebVR presentation.
-     */
-    @Test
-    @MediumTest
-    @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM_OR_STANDALONE)
-    public void testAppButtonExitsPresentation() {
-        appButtonExitsPresentationImpl(
-                WebVrTestFramework.getFileUrlForHtmlTestFile("generic_webvr_page"),
-                mWebVrTestFramework);
-    }
-
-    /**
-     * Tests that pressing the Daydream controller's 'app' button causes the user to exit a
-     * WebXR immersive session.
-     */
-    @Test
-    @MediumTest
-    @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM_OR_STANDALONE)
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
-            @CommandLineFlags.Add({"enable-features=WebXR,WebXrGamepadModule"})
-            public void testAppButtonExitsPresentation_WebXr() {
-        appButtonExitsPresentationImpl(
-                WebXrVrTestFramework.getFileUrlForHtmlTestFile("generic_webxr_page"),
-                mWebXrVrTestFramework);
-    }
-
     private void appButtonExitsPresentationImpl(String url, WebXrVrTestFramework framework) {
         framework.loadUrlAndAwaitInitialization(url, PAGE_LOAD_TIMEOUT_S);
         framework.enterSessionWithUserGestureOrFail();
@@ -536,42 +381,12 @@
 
     /**
      * Verifies that pressing the Daydream controller's 'app' button does not cause the user to exit
-     * WebVR presentation when VR browsing is disabled.
-     */
-    @Test
-    @MediumTest
-    @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM)
-    @XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL})
-    public void testAppButtonNoopsWhenBrowsingDisabled() throws ExecutionException {
-        appButtonNoopsTestImpl(WebVrTestFramework.getFileUrlForHtmlTestFile("generic_webvr_page"),
-                mWebVrTestFramework);
-    }
-
-    /**
-     * Verifies that pressing the Daydream controller's 'app' button does not cause the user to exit
-     * WebVR presentation when VR browsing isn't supported by the Activity.
-     */
-    @Test
-    @MediumTest
-    @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM)
-    @XrActivityRestriction({XrActivityRestriction.SupportedActivity.WAA,
-            XrActivityRestriction.SupportedActivity.CCT})
-    public void
-    testAppButtonNoopsWhenBrowsingNotSupported() throws ExecutionException {
-        appButtonNoopsTestImpl(WebVrTestFramework.getFileUrlForHtmlTestFile("generic_webvr_page"),
-                mWebVrTestFramework);
-    }
-
-    /**
-     * Verifies that pressing the Daydream controller's 'app' button does not cause the user to exit
      * a WebXR immersive session when VR browsing is disabled.
      */
     @Test
     @MediumTest
     @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM)
     @XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL})
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR,WebXrGamepadModule"})
             public void testAppButtonNoopsWhenBrowsingDisabled_WebXr() throws ExecutionException {
         appButtonNoopsTestImpl(WebXrVrTestFramework.getFileUrlForHtmlTestFile("generic_webxr_page"),
@@ -587,8 +402,6 @@
     @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM)
     @XrActivityRestriction({XrActivityRestriction.SupportedActivity.WAA,
             XrActivityRestriction.SupportedActivity.CCT})
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR,WebXrGamepadModule"})
             public void
             testAppButtonNoopsWhenBrowsingNotSupported_WebXr() throws ExecutionException {
@@ -620,57 +433,12 @@
     }
 
     /**
-     * Tests that focus loss updates synchronously.
-     */
-    @DisabledTest(message = "crbug.com/859666")
-    @Test
-    @MediumTest
-    @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM_OR_STANDALONE)
-    @XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL})
-    public void testFocusUpdatesSynchronously() {
-        mWebVrTestFramework.loadUrlAndAwaitInitialization(
-                WebVrTestFramework.getFileUrlForHtmlTestFile(
-                        "generic_webvr_page_with_activate_listener"),
-                PAGE_LOAD_TIMEOUT_S);
-
-        CriteriaHelper.pollUiThread(
-                ()
-                        -> {
-                    return VrShellDelegateUtils.getDelegateInstance().isListeningForWebVrActivate();
-                },
-                "DisplayActivate was never registered", POLL_TIMEOUT_LONG_MS,
-                POLL_CHECK_INTERVAL_SHORT_MS);
-        TestThreadUtils.runOnUiThreadBlocking(() -> {
-            ViewEventSink.from(mTestRule.getWebContents()).onPauseForTesting();
-            Assert.assertFalse(
-                    "VR Shell is listening for headset insertion after WebContents paused",
-                    VrShellDelegateUtils.getDelegateInstance().isListeningForWebVrActivate());
-        });
-        mWebVrTestFramework.assertNoJavaScriptErrors();
-    }
-
-    /**
-     * Verifies that pressing the Daydream controller's 'app' button causes the user to exit
-     * WebVR presentation even when the page is not submitting frames.
-     */
-    @Test
-    @MediumTest
-    @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM_OR_STANDALONE)
-    public void testAppButtonAfterPageStopsSubmitting() {
-        appButtonAfterPageStopsSubmittingImpl(
-                WebVrTestFramework.getFileUrlForHtmlTestFile("webvr_page_submits_once"),
-                mWebVrTestFramework);
-    }
-
-    /**
      * Verifies that pressing the Daydream controller's 'app' button causes the user to exit
      * a WebXR presentation even when the page is not submitting frames.
      */
     @Test
     @MediumTest
     @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM_OR_STANDALONE)
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR,WebXrGamepadModule"})
             public void testAppButtonAfterPageStopsSubmitting_WebXr() {
         appButtonAfterPageStopsSubmittingImpl(
@@ -696,8 +464,6 @@
     @Test
     @MediumTest
     @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM_OR_STANDALONE)
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR,WebXrGamepadModule"})
             @XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL})
             public void testWebXrInputSourceHasGamepad() {
@@ -712,8 +478,6 @@
     @Test
     @MediumTest
     @Restriction(RESTRICTION_TYPE_VIEWER_NON_DAYDREAM)
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR,WebXrGamepadModule"})
             @XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL})
             public void testWebXrInputSourceWithoutGamepad_Cardboard() {
@@ -750,7 +514,7 @@
                     "inputSourceHasNoGamepad()", POLL_TIMEOUT_SHORT_MS);
         }
 
-        mWebVrTestFramework.runJavaScriptOrFail("done()", POLL_TIMEOUT_SHORT_MS);
+        mWebXrVrTestFramework.runJavaScriptOrFail("done()", POLL_TIMEOUT_SHORT_MS);
         mWebXrVrTestFramework.endTest();
     }
 
@@ -761,8 +525,6 @@
     @Test
     @LargeTest
     @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM_OR_STANDALONE)
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR,WebXrGamepadModule"})
             @XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL})
             public void testAppButtonLongPressDisplaysPermissions() throws InterruptedException {
@@ -776,8 +538,6 @@
     @Test
     @LargeTest
     @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM_OR_STANDALONE)
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR,WebXrGamepadModule"})
             @XrActivityRestriction({XrActivityRestriction.SupportedActivity.CTA})
             public void testAppButtonLongPressDisplaysPermissionsIncognito()
@@ -850,8 +610,6 @@
     @Test
     @MediumTest
     @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM_OR_STANDALONE)
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR,WebXrGamepadModule"})
             // TODO(https://crbug.com/901494): Make this run everywhere when permissions are
             // unbroken.
@@ -863,8 +621,6 @@
     @Test
     @MediumTest
     @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM_OR_STANDALONE)
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR,WebXrGamepadModule"})
             @XrActivityRestriction({XrActivityRestriction.SupportedActivity.CTA})
             public void testInSessionPermissionRequestsIncognito() {
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/vr/WebXrVrTabTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/vr/WebXrVrTabTest.java
index f78db09e..b227ce8 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/vr/WebXrVrTabTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/vr/WebXrVrTabTest.java
@@ -37,13 +37,13 @@
 import java.util.concurrent.Callable;
 
 /**
- * End-to-end tests for WebVR's behavior when multiple tabs are involved.
+ * End-to-end tests for WebXR's behavior when multiple tabs are involved.
  */
 @RunWith(ParameterizedRunner.class)
 @UseRunnerDelegate(ChromeJUnit4RunnerDelegate.class)
-@CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE,
-        "enable-features=LogJsConsoleMessages", "enable-blink-features=WebVR"})
-@MinAndroidSdkLevel(Build.VERSION_CODES.LOLLIPOP) // WebVR is only supported on K+
+@CommandLineFlags.
+Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE, "enable-features=LogJsConsoleMessages"})
+@MinAndroidSdkLevel(Build.VERSION_CODES.LOLLIPOP) // WebXR is only supported on L+
 public class WebXrVrTabTest {
     @ClassParameter
     private static List<ParameterSet> sClassParams =
@@ -53,7 +53,6 @@
 
     private ChromeActivityTestRule mTestRule;
     private WebXrVrTestFramework mWebXrVrTestFramework;
-    private WebVrTestFramework mWebVrTestFramework;
 
     public WebXrVrTabTest(Callable<ChromeActivityTestRule> callable) throws Exception {
         mTestRule = callable.call();
@@ -63,21 +62,6 @@
     @Before
     public void setUp() {
         mWebXrVrTestFramework = new WebXrVrTestFramework(mTestRule);
-        mWebVrTestFramework = new WebVrTestFramework(mTestRule);
-    }
-
-    /**
-     * Tests that non-focused tabs cannot get pose information. Disabled on standalones because
-     * they will always be in the VR Browser, and thus shouldn't be getting inline poses even
-     * if the tab is focused.
-     */
-    @Test
-    @MediumTest
-    @Restriction(RESTRICTION_TYPE_SVR)
-    public void testPoseDataUnfocusedTab() {
-        testPoseDataUnfocusedTabImpl(
-                WebVrTestFramework.getFileUrlForHtmlTestFile("test_pose_data_unfocused_tab"),
-                mWebVrTestFramework);
     }
 
     /**
@@ -88,8 +72,6 @@
     @Test
     @MediumTest
     @Restriction(RESTRICTION_TYPE_SVR)
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR"})
             public void testPoseDataUnfocusedTab_WebXr() {
         testPoseDataUnfocusedTabImpl(WebXrVrTestFramework.getFileUrlForHtmlTestFile(
@@ -116,8 +98,6 @@
     @Test
     @MediumTest
     @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM_OR_STANDALONE)
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR"})
             public void testPermissionsInOtherTab() throws InterruptedException {
         testPermissionsInOtherTabImpl(false /* incognito */);
@@ -126,8 +106,6 @@
     @Test
     @MediumTest
     @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM_OR_STANDALONE)
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR"})
             public void testPermissionsInOtherTabIncognito() throws InterruptedException {
         testPermissionsInOtherTabImpl(true /* incognito */);
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/vr/WebXrVrTransitionTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/vr/WebXrVrTransitionTest.java
index fb618c5..9b2081db 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/vr/WebXrVrTransitionTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/vr/WebXrVrTransitionTest.java
@@ -11,7 +11,6 @@
 import static org.chromium.chrome.browser.vr.XrTestFramework.POLL_TIMEOUT_SHORT_MS;
 import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_DEVICE_DAYDREAM;
 import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_SVR;
-import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_VIEWER_DAYDREAM;
 import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_VIEWER_DAYDREAM_OR_STANDALONE;
 import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_VR_SETTINGS_SERVICE;
 
@@ -20,9 +19,7 @@
 import android.graphics.BitmapFactory;
 import android.graphics.Color;
 import android.os.Build;
-import android.os.SystemClock;
 import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.LargeTest;
 import android.support.test.filters.MediumTest;
 import android.support.test.uiautomator.UiDevice;
 
@@ -38,7 +35,6 @@
 import org.chromium.base.test.params.ParameterSet;
 import org.chromium.base.test.params.ParameterizedRunner;
 import org.chromium.base.test.util.CommandLineFlags;
-import org.chromium.base.test.util.DisabledTest;
 import org.chromium.base.test.util.MinAndroidSdkLevel;
 import org.chromium.base.test.util.Restriction;
 import org.chromium.base.test.util.UrlUtils;
@@ -48,7 +44,6 @@
 import org.chromium.chrome.browser.vr.rules.VrSettingsFile;
 import org.chromium.chrome.browser.vr.rules.XrActivityRestriction;
 import org.chromium.chrome.browser.vr.util.NativeUiUtils;
-import org.chromium.chrome.browser.vr.util.NfcSimUtils;
 import org.chromium.chrome.browser.vr.util.PermissionUtils;
 import org.chromium.chrome.browser.vr.util.VrSettingsServiceUtils;
 import org.chromium.chrome.browser.vr.util.VrTestRuleUtils;
@@ -65,14 +60,14 @@
 import java.util.concurrent.TimeUnit;
 
 /**
- * End-to-end tests for transitioning between WebVR and WebXR's magic window and
+ * End-to-end tests for transitioning between WebXR's magic window and
  * presentation modes.
  */
 @RunWith(ParameterizedRunner.class)
 @UseRunnerDelegate(ChromeJUnit4RunnerDelegate.class)
-@CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE,
-        "enable-features=LogJsConsoleMessages", "enable-blink-features=WebVR"})
-@MinAndroidSdkLevel(Build.VERSION_CODES.LOLLIPOP) // WebVR and WebXR are only supported on L+
+@CommandLineFlags.
+Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE, "enable-features=LogJsConsoleMessages"})
+@MinAndroidSdkLevel(Build.VERSION_CODES.LOLLIPOP) // WebXR is only supported on L+
 @TargetApi(Build.VERSION_CODES.KITKAT) // Necessary to allow taking screenshots with UiAutomation
 public class WebXrVrTransitionTest {
     @ClassParameter
@@ -83,7 +78,6 @@
 
     private ChromeActivityTestRule mTestRule;
     private WebXrVrTestFramework mWebXrVrTestFramework;
-    private WebVrTestFramework mWebVrTestFramework;
 
     public WebXrVrTransitionTest(Callable<ChromeActivityTestRule> callable) throws Exception {
         mTestRule = callable.call();
@@ -93,19 +87,6 @@
     @Before
     public void setUp() {
         mWebXrVrTestFramework = new WebXrVrTestFramework(mTestRule);
-        mWebVrTestFramework = new WebVrTestFramework(mTestRule);
-    }
-
-    /**
-     * Tests that a successful requestPresent call actually enters VR
-     */
-    @Test
-    @MediumTest
-    @XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL})
-    public void testRequestPresentEntersVr() {
-        testPresentationEntryImpl(
-                WebVrTestFramework.getFileUrlForHtmlTestFile("generic_webvr_page"),
-                mWebVrTestFramework);
     }
 
     /**
@@ -113,8 +94,6 @@
      */
     @Test
     @MediumTest
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR"})
             @XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL})
             public void testRequestSessionEntersVr() {
@@ -162,22 +141,6 @@
     }
 
     /**
-     * Tests that WebVR is not exposed if the flag is not on and the page does
-     * not have an origin trial token.
-     */
-    @Test
-    @MediumTest
-    @CommandLineFlags.Remove({"enable-blink-features=WebVR"})
-    @XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL})
-    public void testWebVrDisabledWithoutFlagSet() {
-        // TODO(bsheedy): Remove this test once WebVR is on by default without
-        // requiring an origin trial.
-        apiDisabledWithoutFlagSetImpl(WebVrTestFramework.getFileUrlForHtmlTestFile(
-                                              "test_webvr_disabled_without_flag_set"),
-                mWebVrTestFramework);
-    }
-
-    /**
      * Tests that WebXR is not exposed if the flag is not on and the page does
      * not have an origin trial token.
      */
@@ -185,7 +148,6 @@
     @MediumTest
     @CommandLineFlags
             .Add({"disable-features=WebXR"})
-            @CommandLineFlags.Remove({"enable-blink-features=WebVR"})
             @XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL})
             public void testWebXrDisabledWithoutFlagSet() {
         apiDisabledWithoutFlagSetImpl(WebXrVrTestFramework.getFileUrlForHtmlTestFile(
@@ -200,46 +162,6 @@
     }
 
     /**
-     * Tests that scanning the Daydream View NFC tag on supported devices fires the
-     * vrdisplayactivate event and the event allows presentation without a user gesture.
-     */
-    @Test
-    @LargeTest
-    @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM)
-    @XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL})
-    public void testNfcFiresVrdisplayactivate() {
-        mWebVrTestFramework.loadUrlAndAwaitInitialization(
-                WebVrTestFramework.getFileUrlForHtmlTestFile("test_nfc_fires_vrdisplayactivate"),
-                PAGE_LOAD_TIMEOUT_S);
-        mWebVrTestFramework.runJavaScriptOrFail("addListener()", POLL_TIMEOUT_LONG_MS);
-        NfcSimUtils.simNfcScanUntilVrEntry(mTestRule.getActivity());
-        mWebVrTestFramework.waitOnJavaScriptStep();
-        mWebVrTestFramework.endTest();
-        // VrCore has a 2000 ms debounce timeout on NFC scans. When run multiple times in different
-        // activities, it is possible for a latter test to be run in the 2 seconds after the
-        // previous test's NFC scan, causing it to fail flakily. So, wait 2 seconds to ensure that
-        // can't happen.
-        SystemClock.sleep(2000);
-    }
-
-    /**
-     * Tests that the requestPresent promise doesn't resolve if the DON flow is
-     * not completed.
-     */
-    @Test
-    @MediumTest
-    @Restriction({RESTRICTION_TYPE_DEVICE_DAYDREAM, RESTRICTION_TYPE_VR_SETTINGS_SERVICE})
-    @VrSettingsFile(VrSettingsServiceUtils.FILE_DDVIEW_DONENABLED)
-    @XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL})
-    @DisabledTest(message = "crbug.com/972153")
-    public void testPresentationPromiseUnresolvedDuringDon() {
-        presentationPromiseUnresolvedDuringDonImpl(
-                WebVrTestFramework.getFileUrlForHtmlTestFile(
-                        "test_presentation_promise_unresolved_during_don"),
-                mWebVrTestFramework);
-    }
-
-    /**
      * Tests that the immersive session promise doesn't resolve if the DON flow is
      * not completed.
      */
@@ -247,8 +169,6 @@
     @MediumTest
     @Restriction({RESTRICTION_TYPE_DEVICE_DAYDREAM, RESTRICTION_TYPE_VR_SETTINGS_SERVICE})
     @VrSettingsFile(VrSettingsServiceUtils.FILE_DDVIEW_DONENABLED)
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR"})
             @XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL})
             public void testPresentationPromiseUnresolvedDuringDon_WebXr() {
@@ -266,30 +186,12 @@
     }
 
     /**
-     * Tests that the requestPresent promise is rejected if the DON flow is canceled.
-     */
-    @Test
-    @MediumTest
-    @Restriction({RESTRICTION_TYPE_DEVICE_DAYDREAM, RESTRICTION_TYPE_VR_SETTINGS_SERVICE})
-    @VrSettingsFile(VrSettingsServiceUtils.FILE_DDVIEW_DONENABLED)
-    @XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL})
-    @DisabledTest(message = "crbug.com/972153")
-    public void testPresentationPromiseRejectedIfDonCanceled() {
-        presentationPromiseRejectedIfDonCanceledImpl(
-                WebVrTestFramework.getFileUrlForHtmlTestFile(
-                        "test_presentation_promise_rejected_if_don_canceled"),
-                mWebVrTestFramework);
-    }
-
-    /**
      * Tests that the immersive session promise is rejected if the DON flow is canceled.
      */
     @Test
     @MediumTest
     @Restriction({RESTRICTION_TYPE_DEVICE_DAYDREAM, RESTRICTION_TYPE_VR_SETTINGS_SERVICE})
     @VrSettingsFile(VrSettingsServiceUtils.FILE_DDVIEW_DONENABLED)
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR"})
             @XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL})
             public void testPresentationPromiseRejectedIfDonCanceled_WebXr() {
@@ -317,24 +219,10 @@
     }
 
     /**
-     * Tests that the omnibox reappears after exiting VR.
-     */
-    @Test
-    @MediumTest
-    @Restriction(RESTRICTION_TYPE_SVR)
-    public void testControlsVisibleAfterExitingVr() throws InterruptedException {
-        controlsVisibleAfterExitingVrImpl(
-                WebVrTestFramework.getFileUrlForHtmlTestFile("generic_webvr_page"),
-                mWebVrTestFramework);
-    }
-
-    /**
      * Tests that the omnibox reappears after exiting an immersive session.
      */
     @Test
     @MediumTest
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR"})
             @Restriction(RESTRICTION_TYPE_SVR)
             public void testControlsVisibleAfterExitingVr_WebXr() throws InterruptedException {
@@ -364,27 +252,11 @@
     }
 
     /**
-     * Tests that window.requestAnimationFrame stops firing while in WebVR presentation, but resumes
-     * afterwards.
-     */
-    @Test
-    @MediumTest
-    @XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL})
-    public void testWindowRafStopsFiringWhilePresenting() throws InterruptedException {
-        windowRafStopsFiringWhilePresentingImpl(
-                WebVrTestFramework.getFileUrlForHtmlTestFile(
-                        "test_window_raf_stops_firing_while_presenting"),
-                mWebVrTestFramework);
-    }
-
-    /**
      * Tests that window.requestAnimationFrame stops firing while in a WebXR immersive session, but
      * resumes afterwards.
      */
     @Test
     @MediumTest
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR"})
             @XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL})
             public void testWindowRafStopsFiringWhilePresenting_WebXr()
@@ -412,25 +284,11 @@
     }
 
     /**
-     * Tests renderer crashes while in WebVR presentation stay in VR.
-     */
-    @Test
-    @MediumTest
-    @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM_OR_STANDALONE)
-    public void testRendererKilledInWebVrStaysInVr() throws IllegalArgumentException {
-        rendererKilledInVrStaysInVrImpl(
-                WebVrTestFramework.getFileUrlForHtmlTestFile("generic_webvr_page"),
-                mWebVrTestFramework);
-    }
-
-    /**
      * Tests renderer crashes while in WebXR presentation stay in VR.
      */
     @Test
     @MediumTest
     @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM_OR_STANDALONE)
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR"})
             public void testRendererKilledInWebXrStaysInVr() throws IllegalArgumentException {
         rendererKilledInVrStaysInVrImpl(
@@ -451,8 +309,6 @@
      */
     @Test
     @MediumTest
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR"})
             @XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL})
             public void testWindowRafFiresDuringNonImmersiveSession() {
@@ -470,8 +326,6 @@
      */
     @Test
     @MediumTest
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR"})
             @XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL})
             @DisableFeatures(ChromeFeatureList.SEND_TAB_TO_SELF)
@@ -495,8 +349,6 @@
     @Test
     @MediumTest
     @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM_OR_STANDALONE)
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR"})
             @XrActivityRestriction({XrActivityRestriction.SupportedActivity.CTA})
             public void testAppButtonExitToast() {
@@ -514,8 +366,6 @@
      */
     @Test
     @MediumTest
-    @CommandLineFlags
-            .Remove({"enable-blink-features=WebVR"})
             @CommandLineFlags.Add({"enable-features=WebXR"})
             @XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL})
             public void testConsentDialogIsDismissedWhenPageNavigatesAwayInMainFrame() {
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/vr/xr_instrumentation_deep_dive.md b/chrome/android/javatests/src/org/chromium/chrome/browser/vr/xr_instrumentation_deep_dive.md
index 7cce3d7..b91622c 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/vr/xr_instrumentation_deep_dive.md
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/vr/xr_instrumentation_deep_dive.md
@@ -27,8 +27,6 @@
   are applicable to the `WebXR Devices API` in its AR usecase.
 * `WebXR for VR`/`WebXrVr` - A subset of `WebXR` and `VR`. Used for things that
   are applicable to the `WebXR Devices API` in its VR usecase.
-* `WebVR`/`WebVr` - A subset of `WebXrVr`. Used for things that are only
-  applicable to the older `WebVR` API.
 
 ## Test Framework Structure
 
@@ -42,7 +40,6 @@
   * `WebXrTestFramework`
     * `WebXrArTestFramework`
     * `WebXrVrTestFramework`
-      * `WebVrTestFramework`
 
 ### Static vs. Non-Static Methods
 
@@ -187,4 +184,4 @@
 [adding_new_tests]: https://chromium.googlesource.com/chromium/src/+/master/chrome/android/javatests/src/org/chromium/chrome/browser/vr/adding_new_tests.md
 [junit4_wiki_parameterization]: https://github.com/junit-team/junit4/wiki/parameterized-tests
 [parameter_set_source]: https://chromium.googlesource.com/chromium/src/+/master/base/test/android/javatests/src/org/chromium/base/test/params/ParameterSet.java
-[junit4_wiki_rules]: https://github.com/junit-team/junit4/wiki/rules
\ No newline at end of file
+[junit4_wiki_rules]: https://github.com/junit-team/junit4/wiki/rules
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/toolbar/ToolbarSecurityIconTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/toolbar/ToolbarSecurityIconTest.java
index 4bb53402..ea367226 100644
--- a/chrome/android/junit/src/org/chromium/chrome/browser/toolbar/ToolbarSecurityIconTest.java
+++ b/chrome/android/junit/src/org/chromium/chrome/browser/toolbar/ToolbarSecurityIconTest.java
@@ -116,10 +116,10 @@
                 mLocationBarModel.getSecurityIconResource(ConnectionSecurityLevel.WARNING,
                         !IS_SMALL_DEVICE, !IS_OFFLINE_PAGE, !IS_PREVIEW));
 
-        assertEquals(R.drawable.omnibox_https_invalid,
+        assertEquals(R.drawable.omnibox_not_secure_warning,
                 mLocationBarModel.getSecurityIconResource(ConnectionSecurityLevel.DANGEROUS,
                         IS_SMALL_DEVICE, !IS_OFFLINE_PAGE, !IS_PREVIEW));
-        assertEquals(R.drawable.omnibox_https_invalid,
+        assertEquals(R.drawable.omnibox_not_secure_warning,
                 mLocationBarModel.getSecurityIconResource(ConnectionSecurityLevel.DANGEROUS,
                         !IS_SMALL_DEVICE, !IS_OFFLINE_PAGE, !IS_PREVIEW));
 
diff --git a/chrome/android/trichrome.gni b/chrome/android/trichrome.gni
index 3f252e4..da3821be4 100644
--- a/chrome/android/trichrome.gni
+++ b/chrome/android/trichrome.gni
@@ -88,9 +88,9 @@
           "//chrome/android:product_version_resources"
     }
 
-    # TODO(torne): using system_webview_resources just to get a temporary icon
+    # TODO(torne): using icon_resources just to get a temporary icon
     deps = [
-      "//android_webview:system_webview_resources",
+      "//android_webview/apk:icon_resources",
     ]
 
     if (trichrome_shared_assets) {
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 71ae526..1bae3db64 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -1891,6 +1891,7 @@
     "//components/sync_device_info",
     "//content/public/browser",
     "//ipc",
+    "//services/data_decoder/public/mojom",
     "//services/image_annotation/public/mojom",
     "//sql",
   ]
@@ -3887,6 +3888,7 @@
       "//chrome/app_shim",
       "//chrome/browser/apps/app_shim",
       "//chrome/browser/ui/cocoa/notifications:common",
+      "//components/metal_util",
       "//services/video_capture/public/mojom:constants",
       "//third_party/crashpad/crashpad/client:client",
       "//third_party/google_toolbox_for_mac",
diff --git a/chrome/browser/DEPS b/chrome/browser/DEPS
index c1ac012..e3d41ee30 100644
--- a/chrome/browser/DEPS
+++ b/chrome/browser/DEPS
@@ -131,6 +131,7 @@
   "+components/location/android",
   "+components/login",
   "+components/media_message_center",
+  "+components/metal_util",
   "+components/metrics",
   "+components/metrics_services_manager",
   "+components/metrics/ui",
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 86dfc3c..d2407c1 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -114,7 +114,6 @@
 #include "components/translate/core/browser/translate_prefs.h"
 #include "components/translate/core/browser/translate_ranker_impl.h"
 #include "components/ui_devtools/switches.h"
-#include "components/unified_consent/feature.h"
 #include "components/version_info/version_info.h"
 #include "components/viz/common/features.h"
 #include "components/viz/common/switches.h"
@@ -3249,10 +3248,6 @@
      flag_descriptions::kVizDisplayCompositorDescription, kOsCrOS,
      FEATURE_VALUE_TYPE(features::kVizDisplayCompositor)},
 
-    {"unified-consent", flag_descriptions::kUnifiedConsentName,
-     flag_descriptions::kUnifiedConsentDescription, kOsAll,
-     FEATURE_VALUE_TYPE(unified_consent::kUnifiedConsent)},
-
     {"simplify-https-indicator", flag_descriptions::kSimplifyHttpsIndicatorName,
      flag_descriptions::kSimplifyHttpsIndicatorDescription, kOsDesktop,
      FEATURE_VALUE_TYPE(omnibox::kSimplifyHttpsIndicator)},
diff --git a/chrome/browser/android/explore_sites/image_helper.cc b/chrome/browser/android/explore_sites/image_helper.cc
index 741ecc4..ab961b6 100644
--- a/chrome/browser/android/explore_sites/image_helper.cc
+++ b/chrome/browser/android/explore_sites/image_helper.cc
@@ -7,10 +7,10 @@
 #include "base/bind.h"
 #include "base/memory/weak_ptr.h"
 #include "base/metrics/histogram_macros.h"
+#include "base/time/time.h"
 #include "chrome/browser/android/explore_sites/explore_sites_types.h"
-#include "content/public/browser/system_connector.h"
+#include "content/public/browser/data_decoder_service.h"
 #include "services/data_decoder/public/cpp/decode_image.h"
-#include "services/service_manager/public/cpp/connector.h"
 #include "third_party/skia/include/core/SkBitmap.h"
 #include "third_party/skia/include/core/SkImageInfo.h"
 #include "third_party/skia/include/core/SkPixmap.h"
@@ -19,9 +19,17 @@
 #include "ui/gfx/geometry/size.h"
 
 namespace explore_sites {
+
 namespace {
+
 // Ratio of icon size to the amount of padding between the icons.
 const int kIconPaddingScale = 8;
+
+// How long to let our Data Decoder service instance hang around unused before
+// terminating it.
+constexpr base::TimeDelta kDataDecoderInstanceTimeout{
+    base::TimeDelta::FromSeconds(5)};
+
 }  // namespace
 
 // Class Job is used to manage multiple calls to the ImageHelper. Each request
@@ -31,26 +39,26 @@
  public:
   // WARNING: When ImageJobFinishedCallback is called, |this| may be deleted.
   // So nothing can be called after this callback.
-  Job(ImageJobType job_type,
+  Job(ImageHelper* image_helper,
+      ImageJobType job_type,
       ImageJobFinishedCallback job_finished_callback,
       BitmapCallback bitmap_callback,
       EncodedImageList images,
-      int pixel_size,
-      std::unique_ptr<service_manager::Connector> connector);
+      int pixel_size);
   ~Job();
 
   // Start begins the work that a Job performs (decoding and composition).
-  void Start();
+  void Start(data_decoder::mojom::DataDecoderService* service_override);
 
-  void DecodeImageBytes(std::unique_ptr<EncodedImageBytes> image_bytes);
+  void DecodeImageBytes(
+      std::unique_ptr<EncodedImageBytes> image_bytes,
+      data_decoder::mojom::DataDecoderService* service_override);
   void OnDecodeSiteImageDone(const SkBitmap& decoded_image);
   void OnDecodeCategoryImageDone(const SkBitmap& decoded_image);
   std::unique_ptr<SkBitmap> CombineImages();
 
  private:
-  // Used to inject connector in tests.
-  void SetupConnector();
-
+  ImageHelper* const image_helper_;
   const ImageJobType job_type_;
   ImageJobFinishedCallback job_finished_callback_;
   BitmapCallback bitmap_callback_;
@@ -59,50 +67,42 @@
   int num_icons_, pixel_size_;
   std::vector<SkBitmap> bitmaps_;
 
-  std::unique_ptr<service_manager::Connector> connector_;
-
   base::WeakPtrFactory<Job> weak_ptr_factory_{this};
 
   DISALLOW_COPY_AND_ASSIGN(Job);
 };
 
-ImageHelper::Job::Job(ImageJobType job_type,
+ImageHelper::Job::Job(ImageHelper* image_helper,
+                      ImageJobType job_type,
                       ImageJobFinishedCallback job_finished_callback,
                       BitmapCallback bitmap_callback,
                       EncodedImageList images,
-                      int pixel_size,
-                      std::unique_ptr<service_manager::Connector> connector)
-    : job_type_(job_type),
+                      int pixel_size)
+    : image_helper_(image_helper),
+      job_type_(job_type),
       job_finished_callback_(std::move(job_finished_callback)),
       bitmap_callback_(std::move(bitmap_callback)),
       images_(std::move(images)),
-      pixel_size_(pixel_size),
-      connector_(std::move(connector)) {
+      pixel_size_(pixel_size) {
   num_icons_ = (images_.size() < kFaviconsPerCategoryImage)
                    ? images_.size()
                    : kFaviconsPerCategoryImage;
 }
 
-ImageHelper::Job::~Job() {}
+ImageHelper::Job::~Job() = default;
 
-void ImageHelper::Job::Start() {
+void ImageHelper::Job::Start(
+    data_decoder::mojom::DataDecoderService* service_override) {
   for (int i = 0; i < num_icons_; i++) {
     // TODO(freedjm): preserve order of images.
     DVLOG(1) << "Decoding image " << i + 1 << " of " << images_.size();
-    DecodeImageBytes(std::move(images_[i]));
+    DecodeImageBytes(std::move(images_[i]), service_override);
   }
 }
 
-void ImageHelper::Job::SetupConnector() {
-  connector_ = content::GetSystemConnector()->Clone();
-}
-
 void ImageHelper::Job::DecodeImageBytes(
-    std::unique_ptr<EncodedImageBytes> image_bytes) {
-  if (!connector_) {
-    SetupConnector();
-  }
-
+    std::unique_ptr<EncodedImageBytes> image_bytes,
+    data_decoder::mojom::DataDecoderService* service_override) {
   data_decoder::mojom::ImageDecoder::DecodeImageCallback callback;
   if (job_type_ == ImageJobType::kSiteIcon) {
     callback = base::BindOnce(&ImageHelper::Job::OnDecodeSiteImageDone,
@@ -112,7 +112,16 @@
                               weak_ptr_factory_.GetWeakPtr());
   }
 
-  data_decoder::DecodeImage(connector_.get(), *image_bytes,
+  mojo::PendingRemote<data_decoder::mojom::ImageDecoder> decoder;
+  if (service_override) {
+    service_override->BindImageDecoder(
+        decoder.InitWithNewPipeAndPassReceiver());
+  } else {
+    image_helper_->GetDataDecoder()->BindImageDecoder(
+        decoder.InitWithNewPipeAndPassReceiver());
+  }
+
+  data_decoder::DecodeImage(std::move(decoder), *image_bytes,
                             data_decoder::mojom::ImageCodec::DEFAULT, false,
                             data_decoder::kDefaultMaxSizeInBytes, gfx::Size(),
                             std::move(callback));
@@ -285,12 +294,12 @@
     BitmapCallback bitmap_callback,
     EncodedImageList images,
     int pixel_size,
-    std::unique_ptr<service_manager::Connector> connector) {
+    data_decoder::mojom::DataDecoderService* service_override) {
   auto job = std::make_unique<Job>(
-      job_type, std::move(job_finished_callback), std::move(bitmap_callback),
-      std::move(images), pixel_size, std::move(connector));
+      this, job_type, std::move(job_finished_callback),
+      std::move(bitmap_callback), std::move(images), pixel_size);
   id_to_job_[last_used_job_id_] = std::move(job);
-  id_to_job_[last_used_job_id_]->Start();
+  id_to_job_[last_used_job_id_]->Start(service_override);
 }
 
 void ImageHelper::OnJobFinished(int job_id) {
@@ -301,7 +310,7 @@
 void ImageHelper::ComposeSiteImage(
     BitmapCallback callback,
     EncodedImageList images,
-    std::unique_ptr<service_manager::Connector> connector) {
+    data_decoder::mojom::DataDecoderService* service_override) {
   DVLOG(1) << "Requested decoding for site image";
   if (images.size() == 0) {
     std::move(callback).Run(nullptr);
@@ -311,14 +320,14 @@
   NewJob(ImageJobType::kSiteIcon,
          base::BindOnce(&ImageHelper::OnJobFinished, weak_factory_.GetWeakPtr(),
                         ++last_used_job_id_),
-         std::move(callback), std::move(images), -1, std::move(connector));
+         std::move(callback), std::move(images), -1, service_override);
 }
 
 void ImageHelper::ComposeCategoryImage(
     BitmapCallback callback,
     int pixel_size,
     EncodedImageList images,
-    std::unique_ptr<service_manager::Connector> connector) {
+    data_decoder::mojom::DataDecoderService* service_override) {
   DVLOG(1) << "Requested decoding " << images.size()
            << " images for category image";
 
@@ -330,7 +339,17 @@
   NewJob(ImageJobType::kCategoryImage,
          base::BindOnce(&ImageHelper::OnJobFinished, weak_factory_.GetWeakPtr(),
                         ++last_used_job_id_),
-         std::move(callback), std::move(images), pixel_size,
-         std::move(connector));
+         std::move(callback), std::move(images), pixel_size, service_override);
 }
+
+data_decoder::mojom::DataDecoderService* ImageHelper::GetDataDecoder() {
+  if (!data_decoder_) {
+    data_decoder_ = content::LaunchDataDecoder();
+    data_decoder_.reset_on_disconnect();
+    data_decoder_.reset_on_idle_timeout(kDataDecoderInstanceTimeout);
+  }
+
+  return data_decoder_.get();
+}
+
 }  // namespace explore_sites
diff --git a/chrome/browser/android/explore_sites/image_helper.h b/chrome/browser/android/explore_sites/image_helper.h
index bcae9ed7..344c1d2 100644
--- a/chrome/browser/android/explore_sites/image_helper.h
+++ b/chrome/browser/android/explore_sites/image_helper.h
@@ -11,7 +11,8 @@
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "chrome/browser/android/explore_sites/explore_sites_types.h"
-#include "services/service_manager/public/cpp/connector.h"
+#include "mojo/public/cpp/bindings/remote.h"
+#include "services/data_decoder/public/mojom/data_decoder_service.mojom.h"
 #include "third_party/skia/include/core/SkBitmap.h"
 
 namespace explore_sites {
@@ -31,7 +32,7 @@
   void ComposeSiteImage(
       BitmapCallback callback,
       EncodedImageList images,
-      std::unique_ptr<service_manager::Connector> connector = nullptr);
+      data_decoder::mojom::DataDecoderService* service_override = nullptr);
 
   // Compose a category icon containing [1 - 4] site icons and return via
   // |callback|.
@@ -39,7 +40,7 @@
       BitmapCallback callback,
       int pixel_size,
       EncodedImageList images,
-      std::unique_ptr<service_manager::Connector> connector = nullptr);
+      data_decoder::mojom::DataDecoderService* service_override = nullptr);
 
  private:
   class Job;
@@ -49,10 +50,13 @@
               BitmapCallback bitmap_callback,
               EncodedImageList images,
               int pixel_size,
-              std::unique_ptr<service_manager::Connector> connector);
+              data_decoder::mojom::DataDecoderService* service_override);
 
   void OnJobFinished(int job_id);
 
+  data_decoder::mojom::DataDecoderService* GetDataDecoder();
+
+  mojo::Remote<data_decoder::mojom::DataDecoderService> data_decoder_;
   std::map<int, std::unique_ptr<Job>> id_to_job_;
   int last_used_job_id_;
 
diff --git a/chrome/browser/android/explore_sites/image_helper_unittest.cc b/chrome/browser/android/explore_sites/image_helper_unittest.cc
index 3097492..dfe8d22 100644
--- a/chrome/browser/android/explore_sites/image_helper_unittest.cc
+++ b/chrome/browser/android/explore_sites/image_helper_unittest.cc
@@ -13,8 +13,6 @@
 #include "base/test/task_environment.h"
 #include "base/test/test_simple_task_runner.h"
 #include "services/data_decoder/public/cpp/test_data_decoder_service.h"
-#include "services/data_decoder/public/mojom/constants.mojom.h"
-#include "services/service_manager/public/cpp/test/test_connector_factory.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/skia/include/core/SkBitmap.h"
 #include "third_party/skia/include/core/SkColor.h"
@@ -51,11 +49,8 @@
 
 class ExploreSitesImageHelperTest : public testing::Test {
  public:
-  ExploreSitesImageHelperTest()
-      : data_decoder_(connector_factory_.RegisterInstance(
-            data_decoder::mojom::kServiceName)) {}
-
-  ~ExploreSitesImageHelperTest() override {}
+  ExploreSitesImageHelperTest() = default;
+  ~ExploreSitesImageHelperTest() override = default;
 
   EncodedImageList GetEncodedImageList(int num_icons);
   BitmapCallback StoreBitmap() {
@@ -68,14 +63,11 @@
 
   std::vector<std::unique_ptr<SkBitmap>> last_bitmap_list;
 
+  data_decoder::DataDecoderService* data_decoder() { return &data_decoder_; }
+
  protected:
   base::test::TaskEnvironment task_environment_;
 
-  std::unique_ptr<service_manager::Connector> GetConnector() {
-    return connector_factory_.CreateConnector();
-  }
-
-  service_manager::TestConnectorFactory connector_factory_;
   data_decoder::DataDecoderService data_decoder_;
   base::HistogramTester histogram_tester_;
 };
@@ -95,7 +87,7 @@
   ImageHelper image_helper;
 
   image_helper.ComposeSiteImage(StoreBitmap(), GetEncodedImageList(1),
-                                GetConnector());
+                                data_decoder());
 
   task_environment_.RunUntilIdle();
 
@@ -110,14 +102,14 @@
 TEST_F(ExploreSitesImageHelperTest, TestImageHelper_SiteIcon_MultipleCalls) {
   ImageHelper image_helper;
   image_helper.ComposeSiteImage(StoreBitmap(), GetEncodedImageList(1),
-                                GetConnector());
+                                data_decoder());
   task_environment_.RunUntilIdle();
 
   ASSERT_NE(nullptr, last_bitmap_list[0]);
   EXPECT_FALSE(last_bitmap_list[0]->isNull());
 
   image_helper.ComposeSiteImage(StoreBitmap(), GetEncodedImageList(1),
-                                GetConnector());
+                                data_decoder());
   task_environment_.RunUntilIdle();
 
   ASSERT_NE(nullptr, last_bitmap_list[1]);
@@ -128,9 +120,9 @@
 TEST_F(ExploreSitesImageHelperTest, TestImageHelper_SiteIcon_ConcurrentCalls) {
   ImageHelper image_helper;
   image_helper.ComposeSiteImage(StoreBitmap(), GetEncodedImageList(1),
-                                GetConnector());
+                                data_decoder());
   image_helper.ComposeSiteImage(StoreBitmap(), GetEncodedImageList(1),
-                                GetConnector());
+                                data_decoder());
   task_environment_.RunUntilIdle();
 
   ASSERT_NE(nullptr, last_bitmap_list[0]);
@@ -143,7 +135,7 @@
 TEST_F(ExploreSitesImageHelperTest, TestImageHelper_CategoryImage_One) {
   ImageHelper image_helper;
   image_helper.ComposeCategoryImage(StoreBitmap(), kIconSize,
-                                    GetEncodedImageList(1), GetConnector());
+                                    GetEncodedImageList(1), data_decoder());
   task_environment_.RunUntilIdle();
 
   ASSERT_NE(nullptr, last_bitmap_list[0]);
@@ -170,7 +162,7 @@
 TEST_F(ExploreSitesImageHelperTest, TestImageHelper_CategoryImage_Two) {
   ImageHelper image_helper;
   image_helper.ComposeCategoryImage(StoreBitmap(), kIconSize,
-                                    GetEncodedImageList(2), GetConnector());
+                                    GetEncodedImageList(2), data_decoder());
   task_environment_.RunUntilIdle();
 
   ASSERT_NE(nullptr, last_bitmap_list[0]);
@@ -196,7 +188,7 @@
 TEST_F(ExploreSitesImageHelperTest, TestImageHelper_CategoryImage_Three) {
   ImageHelper image_helper;
   image_helper.ComposeCategoryImage(StoreBitmap(), kIconSize,
-                                    GetEncodedImageList(3), GetConnector());
+                                    GetEncodedImageList(3), data_decoder());
   task_environment_.RunUntilIdle();
 
   ASSERT_NE(nullptr, last_bitmap_list[0]);
@@ -225,7 +217,7 @@
 TEST_F(ExploreSitesImageHelperTest, TestImageHelper_CategoryImage_Four) {
   ImageHelper image_helper;
   image_helper.ComposeCategoryImage(StoreBitmap(), kIconSize,
-                                    GetEncodedImageList(4), GetConnector());
+                                    GetEncodedImageList(4), data_decoder());
   task_environment_.RunUntilIdle();
 
   ASSERT_NE(nullptr, last_bitmap_list[0]);
@@ -265,7 +257,7 @@
       image_list.push_back(std::make_unique<EncodedImageBytes>(kWebpBytes));
     }
     image_helper.ComposeCategoryImage(StoreBitmap(), kIconSize,
-                                      std::move(image_list), GetConnector());
+                                      std::move(image_list), data_decoder());
 
     task_environment_.RunUntilIdle();
 
@@ -284,7 +276,7 @@
 
   // Record one success UMA from CompseSiteImage.
   image_helper.ComposeSiteImage(StoreBitmap(), GetEncodedImageList(1),
-                                GetConnector());
+                                data_decoder());
   task_environment_.RunUntilIdle();
 
   histograms().ExpectTotalCount("ExploreSites.ImageDecoded", 1);
@@ -294,7 +286,7 @@
   EncodedImageList image_list;
   image_list.push_back(std::make_unique<EncodedImageBytes>(kInvalidWebpBytes));
   image_helper.ComposeSiteImage(StoreBitmap(), std::move(image_list),
-                                GetConnector());
+                                data_decoder());
   task_environment_.RunUntilIdle();
 
   histograms().ExpectTotalCount("ExploreSites.ImageDecoded", 2);
@@ -302,7 +294,7 @@
 
   // Record 2 samples from ComposeCategoryImage.
   image_helper.ComposeCategoryImage(StoreBitmap(), kIconSize,
-                                    GetEncodedImageList(2), GetConnector());
+                                    GetEncodedImageList(2), data_decoder());
   task_environment_.RunUntilIdle();
 
   histograms().ExpectTotalCount("ExploreSites.ImageDecoded", 4);
diff --git a/chrome/browser/apps/platform_apps/api/sync_file_system/extension_sync_event_observer.cc b/chrome/browser/apps/platform_apps/api/sync_file_system/extension_sync_event_observer.cc
index 0a5c1e5..12b0ad2 100644
--- a/chrome/browser/apps/platform_apps/api/sync_file_system/extension_sync_event_observer.cc
+++ b/chrome/browser/apps/platform_apps/api/sync_file_system/extension_sync_event_observer.cc
@@ -20,7 +20,7 @@
 #include "extensions/browser/extensions_browser_client.h"
 #include "extensions/common/extension_set.h"
 #include "storage/browser/file_system/file_system_url.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 
 using ::sync_file_system::SyncEventObserver;
 
diff --git a/chrome/browser/apps/platform_apps/api/sync_file_system/sync_file_system_api.cc b/chrome/browser/apps/platform_apps/api/sync_file_system/sync_file_system_api.cc
index a89578e..d34e042 100644
--- a/chrome/browser/apps/platform_apps/api/sync_file_system/sync_file_system_api.cc
+++ b/chrome/browser/apps/platform_apps/api/sync_file_system/sync_file_system_api.cc
@@ -28,8 +28,8 @@
 #include "storage/browser/file_system/file_system_context.h"
 #include "storage/browser/file_system/file_system_url.h"
 #include "storage/browser/quota/quota_manager.h"
-#include "storage/common/fileapi/file_system_types.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_types.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "url/origin.h"
 
 using content::BrowserContext;
diff --git a/chrome/browser/apps/platform_apps/api/sync_file_system/sync_file_system_api_helpers.cc b/chrome/browser/apps/platform_apps/api/sync_file_system/sync_file_system_api_helpers.cc
index 67aac4a..147612ac 100644
--- a/chrome/browser/apps/platform_apps/api/sync_file_system/sync_file_system_api_helpers.cc
+++ b/chrome/browser/apps/platform_apps/api/sync_file_system/sync_file_system_api_helpers.cc
@@ -7,7 +7,7 @@
 #include "base/logging.h"
 #include "base/values.h"
 #include "storage/browser/file_system/file_system_url.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 
 namespace chrome_apps {
 namespace api {
diff --git a/chrome/browser/browser_process_platform_part_mac.mm b/chrome/browser/browser_process_platform_part_mac.mm
index 1c08654b..9932d9c 100644
--- a/chrome/browser/browser_process_platform_part_mac.mm
+++ b/chrome/browser/browser_process_platform_part_mac.mm
@@ -5,8 +5,49 @@
 #include "chrome/browser/browser_process_platform_part_mac.h"
 
 #include "base/mac/foundation_util.h"
+#include "base/metrics/histogram_macros.h"
+#include "base/time/time.h"
 #import "chrome/browser/app_controller_mac.h"
 #include "chrome/browser/chrome_browser_application_mac.h"
+#include "components/metal_util/test_shader.h"
+
+namespace {
+
+// Allow up to 1 minute for shader compilation. This is much longer than the
+// GPU process limit of 6 seconds.
+constexpr base::TimeDelta kTestShaderCompileTimeout =
+    base::TimeDelta::FromMinutes(1);
+
+void TestShaderCallback(const base::TimeTicks& start_time,
+                        metal::TestShaderResult result) {
+  base::TimeDelta delta;
+  switch (result) {
+    case metal::TestShaderResult::kNotAttempted:
+      // Don't include data if no Metal device was created (e.g, due to hardware
+      // or macOS version reasons).
+      return;
+    case metal::TestShaderResult::kTimedOut:
+      // Use a single histogram for both "how long did compile take" and "did
+      // compile complete in 1 minute" by pushing timeouts into the maximum
+      // bucket of UMA_HISTOGRAM_MEDIUM_TIMES.
+      delta = base::TimeDelta::FromMinutes(3);
+      return;
+    case metal::TestShaderResult::kSucceeded:
+      delta = base::TimeTicks::Now() - start_time;
+      break;
+  }
+  UMA_HISTOGRAM_MEDIUM_TIMES("Browser.Metal.TestShaderCompileTime", delta);
+}
+
+// Launch a test metal shader compile to see how long it takes to complete (if
+// it ever completes).
+// https://crbug.com/974219
+void TestShaderLaunch() {
+  metal::TestShader(base::BindOnce(TestShaderCallback, base::TimeTicks::Now()),
+                    kTestShaderCompileTimeout);
+}
+
+}  // namespace
 
 BrowserProcessPlatformPart::BrowserProcessPlatformPart() {
 }
@@ -46,6 +87,10 @@
   // domain socket will cause the just-created socket to be unlinked.
   DCHECK(!app_shim_listener_.get());
   app_shim_listener_ = new AppShimListener;
+
+  // Launch a test Metal shader compile once the run loop starts.
+  base::ThreadTaskRunnerHandle::Get()->PostTask(
+      FROM_HERE, base::BindOnce(TestShaderLaunch));
 }
 
 AppShimListener* BrowserProcessPlatformPart::app_shim_listener() {
diff --git a/chrome/browser/browsing_data/browsing_data_file_system_helper.cc b/chrome/browser/browsing_data/browsing_data_file_system_helper.cc
index a7bfbc6..05f8893c 100644
--- a/chrome/browser/browsing_data/browsing_data_file_system_helper.cc
+++ b/chrome/browser/browsing_data/browsing_data_file_system_helper.cc
@@ -18,7 +18,7 @@
 #include "extensions/buildflags/buildflags.h"
 #include "storage/browser/file_system/file_system_context.h"
 #include "storage/browser/file_system/file_system_quota_util.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 
 using content::BrowserThread;
 
diff --git a/chrome/browser/browsing_data/browsing_data_file_system_helper.h b/chrome/browser/browsing_data/browsing_data_file_system_helper.h
index 67fbccc8..307b3424 100644
--- a/chrome/browser/browsing_data/browsing_data_file_system_helper.h
+++ b/chrome/browser/browsing_data/browsing_data_file_system_helper.h
@@ -15,7 +15,7 @@
 #include "base/callback.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 #include "url/origin.h"
 
 namespace storage {
diff --git a/chrome/browser/browsing_data/browsing_data_file_system_helper_unittest.cc b/chrome/browser/browsing_data/browsing_data_file_system_helper_unittest.cc
index 4acbc814..50b8c9676 100644
--- a/chrome/browser/browsing_data/browsing_data_file_system_helper_unittest.cc
+++ b/chrome/browser/browsing_data/browsing_data_file_system_helper_unittest.cc
@@ -21,7 +21,7 @@
 #include "content/public/test/test_utils.h"
 #include "storage/browser/file_system/file_system_context.h"
 #include "storage/browser/file_system/file_system_url.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 using content::BrowserContext;
diff --git a/chrome/browser/browsing_data/browsing_data_media_license_helper.cc b/chrome/browser/browsing_data/browsing_data_media_license_helper.cc
index a5d77c3..7377f45 100644
--- a/chrome/browser/browsing_data/browsing_data_media_license_helper.cc
+++ b/chrome/browser/browsing_data/browsing_data_media_license_helper.cc
@@ -18,7 +18,7 @@
 #include "storage/browser/file_system/file_system_context.h"
 #include "storage/browser/file_system/file_system_quota_util.h"
 #include "storage/browser/file_system/plugin_private_file_system_backend.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 
 using content::BrowserThread;
 
diff --git a/chrome/browser/browsing_data/browsing_data_media_license_helper_unittest.cc b/chrome/browser/browsing_data/browsing_data_media_license_helper_unittest.cc
index 13137ad..c37b7da 100644
--- a/chrome/browser/browsing_data/browsing_data_media_license_helper_unittest.cc
+++ b/chrome/browser/browsing_data/browsing_data_media_license_helper_unittest.cc
@@ -27,8 +27,8 @@
 #include "storage/browser/file_system/file_system_url.h"
 #include "storage/browser/file_system/isolated_context.h"
 #include "storage/browser/quota/quota_manager.h"
-#include "storage/common/fileapi/file_system_types.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_types.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 using content::BrowserContext;
diff --git a/chrome/browser/browsing_data/counters/browsing_data_counter_utils_browsertest.cc b/chrome/browser/browsing_data/counters/browsing_data_counter_utils_browsertest.cc
index df320b5..d251f9d 100644
--- a/chrome/browser/browsing_data/counters/browsing_data_counter_utils_browsertest.cc
+++ b/chrome/browser/browsing_data/counters/browsing_data_counter_utils_browsertest.cc
@@ -4,7 +4,6 @@
 
 #include "chrome/browser/browsing_data/counters/browsing_data_counter_utils.h"
 
-#include "build/buildflag.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
 #include "chrome/browser/sync/test/integration/sync_test.h"
@@ -14,10 +13,8 @@
 #include "components/signin/public/base/signin_buildflags.h"
 #include "components/sync/driver/profile_sync_service.h"
 #include "components/sync/test/fake_server/fake_server_network_resources.h"
-#include "components/unified_consent/feature.h"
-#include "components/unified_consent/scoped_unified_consent.h"
 
-#if BUILDFLAG(ENABLE_DICE_SUPPORT) || defined(OS_CHROMEOS)
+#if defined(OS_CHROMEOS)
 #include "chrome/browser/signin/scoped_account_consistency.h"
 #endif
 
@@ -28,45 +25,28 @@
 
 namespace browsing_data_counter_utils {
 
-class BrowsingDataCounterUtilsBrowserTest
-    : public SyncTest,
-      public testing::WithParamInterface<bool> {
+class BrowsingDataCounterUtilsBrowserTest : public SyncTest {
  public:
   BrowsingDataCounterUtilsBrowserTest()
-      : SyncTest(SINGLE_CLIENT),
-#if BUILDFLAG(ENABLE_DICE_SUPPORT)
-        scoped_dice_(GetParam()
-                         ? std::make_unique<ScopedAccountConsistencyDice>()
-                         : nullptr),
-#elif defined(OS_CHROMEOS)
-        scoped_mirror_(std::make_unique<ScopedAccountConsistencyMirror>()),
+      : SyncTest(SINGLE_CLIENT)
+#if defined(OS_CHROMEOS)
+        ,
+        scoped_mirror_(std::make_unique<ScopedAccountConsistencyMirror>())
 #endif
-        scoped_unified_consent_(
-            GetParam()
-                ? unified_consent::UnifiedConsentFeatureState::kEnabled
-                : unified_consent::UnifiedConsentFeatureState::kDisabled) {
+  {
   }
   ~BrowsingDataCounterUtilsBrowserTest() override = default;
 
  private:
-#if BUILDFLAG(ENABLE_DICE_SUPPORT)
-  // ScopedAccountConsistencyDice is required for unified consent to be enabled.
-  const std::unique_ptr<ScopedAccountConsistencyDice> scoped_dice_;
-#elif defined(OS_CHROMEOS)
+#if defined(OS_CHROMEOS)
   // Need to manually turn on mirror for now.
   const std::unique_ptr<ScopedAccountConsistencyMirror> scoped_mirror_;
 #endif
-  const unified_consent::ScopedUnifiedConsent scoped_unified_consent_;
 
   DISALLOW_COPY_AND_ASSIGN(BrowsingDataCounterUtilsBrowserTest);
 };
 
-// Instantiate test for unified consent disabled & enabled.
-INSTANTIATE_TEST_SUITE_P(,
-                         BrowsingDataCounterUtilsBrowserTest,
-                         ::testing::Bool());
-
-IN_PROC_BROWSER_TEST_P(BrowsingDataCounterUtilsBrowserTest,
+IN_PROC_BROWSER_TEST_F(BrowsingDataCounterUtilsBrowserTest,
                        ShouldShowCookieException) {
   Profile* profile = browser()->profile();
 
diff --git a/chrome/browser/chromeos/crostini/crostini_installer.cc b/chrome/browser/chromeos/crostini/crostini_installer.cc
index 5f8e4a27..f9b93ff 100644
--- a/chrome/browser/chromeos/crostini/crostini_installer.cc
+++ b/chrome/browser/chromeos/crostini/crostini_installer.cc
@@ -14,7 +14,6 @@
 #include "base/system/sys_info.h"
 #include "base/task/post_task.h"
 #include "base/time/time.h"
-#include "chrome/browser/chromeos/crostini/crostini_installer_types.mojom.h"
 #include "chrome/browser/chromeos/crostini/crostini_manager_factory.h"
 #include "chrome/browser/chromeos/crostini/crostini_pref_names.h"
 #include "chrome/browser/chromeos/crostini/crostini_terminal.h"
@@ -279,6 +278,8 @@
   RecordSetupResult(SetupResult::kNotStarted);
 }
 
+void CrostiniInstaller::OnStageStarted(InstallerState stage) {}
+
 void CrostiniInstaller::OnComponentLoaded(CrostiniResult result) {
   DCHECK_EQ(installing_state_, InstallerState::kInstallImageLoader);
 
@@ -376,6 +377,14 @@
   UpdateInstallingState(InstallerState::kMountContainer);
 }
 
+void CrostiniInstaller::OnContainerMounted(bool success) {
+  DCHECK_EQ(installing_state_, InstallerState::kMountContainer);
+
+  if (!success) {
+    HandleError(InstallerError::kErrorMountingContainer);
+  }
+}
+
 bool CrostiniInstaller::CanInstall() {
   // Allow to start from State::ERROR. In that case, we're doing a Retry.
   return state_ == State::IDLE || state_ == State::ERROR;
diff --git a/chrome/browser/chromeos/crostini/crostini_installer.h b/chrome/browser/chromeos/crostini/crostini_installer.h
index be8e8f0a..b71aa6b 100644
--- a/chrome/browser/chromeos/crostini/crostini_installer.h
+++ b/chrome/browser/chromeos/crostini/crostini_installer.h
@@ -7,6 +7,7 @@
 
 #include "base/callback_forward.h"
 #include "base/macros.h"
+#include "chrome/browser/chromeos/crostini/crostini_installer_types.mojom.h"
 #include "chrome/browser/chromeos/crostini/crostini_installer_ui_delegate.h"
 #include "chrome/browser/chromeos/crostini/crostini_manager.h"
 #include "components/keyed_service/core/keyed_service.h"
@@ -68,6 +69,7 @@
   void CancelBeforeStart() override;
 
   // CrostiniManager::RestartObserver:
+  void OnStageStarted(crostini::mojom::InstallerState stage) override;
   void OnComponentLoaded(crostini::CrostiniResult result) override;
   void OnConciergeStarted(bool success) override;
   void OnDiskImageCreated(bool success,
@@ -79,6 +81,7 @@
   void OnContainerSetup(bool success) override;
   void OnContainerStarted(crostini::CrostiniResult result) override;
   void OnSshKeysFetched(bool success) override;
+  void OnContainerMounted(bool success) override;
 
   // Return true if internal state allows starting installation.
   bool CanInstall();
diff --git a/chrome/browser/chromeos/crostini/crostini_manager.cc b/chrome/browser/chromeos/crostini/crostini_manager.cc
index 8fe1e8b0..28fa56c 100644
--- a/chrome/browser/chromeos/crostini/crostini_manager.cc
+++ b/chrome/browser/chromeos/crostini/crostini_manager.cc
@@ -130,6 +130,7 @@
   }
 
   void Restart() {
+    StartStage(mojom::InstallerState::kStart);
     is_initial_install_ = crostini_manager_->GetInstallerViewStatus();
     DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
     if (!CrostiniFeatures::Get()->IsUIAllowed(profile_)) {
@@ -152,6 +153,7 @@
       return;
     }
 
+    StartStage(mojom::InstallerState::kInstallImageLoader);
     crostini_manager_->InstallTerminaComponent(base::BindOnce(
         &CrostiniRestarter::LoadComponentFinished, base::WrapRefCounted(this)));
   }
@@ -209,6 +211,12 @@
       mount_manager->RemoveObserver(this);
   }
 
+  void StartStage(mojom::InstallerState stage) {
+    for (auto& observer : observer_list_) {
+      observer.OnStageStarted(stage);
+    }
+  }
+
   void ReportRestarterResult(CrostiniResult result) {
     // Do not record results if this restart was triggered by the installer. The
     // crostini installer has its own histograms that should be kept separate.
@@ -239,6 +247,7 @@
     }
     // Set the pref here, after we first successfully install something
     profile_->GetPrefs()->SetBoolean(crostini::prefs::kCrostiniEnabled, true);
+    StartStage(mojom::InstallerState::kStartConcierge);
     crostini_manager_->StartConcierge(
         base::BindOnce(&CrostiniRestarter::ConciergeStarted, this));
   }
@@ -261,6 +270,7 @@
     int64_t disk_size_available = 0;
     // If we have an already existing disk, CreateDiskImage will just return its
     // path so we can pass it to StartTerminaVm.
+    StartStage(mojom::InstallerState::kCreateDiskImage);
     crostini_manager_->CreateDiskImage(
         base::FilePath(vm_name_),
         vm_tools::concierge::StorageLocation::STORAGE_CRYPTOHOME_ROOT,
@@ -285,6 +295,7 @@
       FinishRestart(CrostiniResult::CREATE_DISK_IMAGE_FAILED);
       return;
     }
+    StartStage(mojom::InstallerState::kStartTerminaVm);
     crostini_manager_->StartTerminaVm(
         vm_name_, result_path,
         base::BindOnce(&CrostiniRestarter::StartTerminaVmFinished, this));
@@ -312,6 +323,7 @@
       crostini_manager_->GetTerminaVmKernelVersion(base::BindOnce(
           &CrostiniRestarter::GetTerminaVmKernelVersionFinished, this));
     }
+    StartStage(mojom::InstallerState::kCreateContainer);
     crostini_manager_->CreateLxdContainer(
         vm_name_, container_name_,
         base::BindOnce(&CrostiniRestarter::CreateLxdContainerFinished, this));
@@ -345,6 +357,7 @@
       FinishRestart(result);
       return;
     }
+    StartStage(mojom::InstallerState::kSetupContainer);
     crostini_manager_->SetUpLxdContainerUser(
         vm_name_, container_name_, DefaultContainerUserNameForProfile(profile_),
         base::BindOnce(&CrostiniRestarter::SetUpLxdContainerUserFinished,
@@ -366,6 +379,7 @@
       return;
     }
 
+    StartStage(mojom::InstallerState::kStartContainer);
     crostini_manager_->StartLxdContainer(
         vm_name_, container_name_,
         base::BindOnce(&CrostiniRestarter::StartLxdContainerFinished, this));
@@ -402,6 +416,7 @@
     if (vm_name_ == kCrostiniDefaultVmName &&
         container_name_ == kCrostiniDefaultContainerName && info &&
         !info->sshfs_mounted) {
+      StartStage(mojom::InstallerState::kFetchSshKeys);
       crostini_manager_->GetContainerSshKeys(
           vm_name_, container_name_,
           base::BindOnce(&CrostiniRestarter::GetContainerSshKeysFinished, this,
@@ -436,6 +451,7 @@
     // Call to sshfs to mount.
     source_path_ = base::StringPrintf(
         "sshfs://%s@%s:", container_username.c_str(), hostname.c_str());
+    StartStage(mojom::InstallerState::kMountContainer);
     dmgr->MountPath(source_path_, "",
                     file_manager::util::GetCrostiniMountPointName(profile_),
                     file_manager::util::GetCrostiniMountOptions(
@@ -456,10 +472,14 @@
         mount_info.source_path != source_path_) {
       return;
     }
+    bool success = error_code == chromeos::MountError::MOUNT_ERROR_NONE;
+    for (auto& observer : observer_list_) {
+      observer.OnContainerMounted(success);
+    }
     // Remove DiskMountManager::OnMountEvent observer.
     chromeos::disks::DiskMountManager::GetInstance()->RemoveObserver(this);
 
-    if (error_code != chromeos::MountError::MOUNT_ERROR_NONE) {
+    if (!success) {
       LOG(ERROR) << "Error mounting crostini container: error_code="
                  << error_code << ", source_path=" << mount_info.source_path
                  << ", mount_path=" << mount_info.mount_path
diff --git a/chrome/browser/chromeos/crostini/crostini_manager.h b/chrome/browser/chromeos/crostini/crostini_manager.h
index d59be539..880d3d18 100644
--- a/chrome/browser/chromeos/crostini/crostini_manager.h
+++ b/chrome/browser/chromeos/crostini/crostini_manager.h
@@ -16,6 +16,7 @@
 #include "base/observer_list.h"
 #include "base/optional.h"
 #include "base/unguessable_token.h"
+#include "chrome/browser/chromeos/crostini/crostini_installer_types.mojom.h"
 #include "chrome/browser/chromeos/crostini/crostini_simple_types.h"
 #include "chrome/browser/chromeos/crostini/crostini_util.h"
 #include "chrome/browser/component_updater/cros_component_installer_chromeos.h"
@@ -135,6 +136,7 @@
   class RestartObserver {
    public:
     virtual ~RestartObserver() {}
+    virtual void OnStageStarted(mojom::InstallerState stage) = 0;
     virtual void OnComponentLoaded(CrostiniResult result) = 0;
     virtual void OnConciergeStarted(bool success) = 0;
     virtual void OnDiskImageCreated(bool success,
@@ -146,6 +148,7 @@
     virtual void OnContainerSetup(bool success) = 0;
     virtual void OnContainerStarted(CrostiniResult result) = 0;
     virtual void OnSshKeysFetched(bool success) = 0;
+    virtual void OnContainerMounted(bool success) = 0;
   };
 
   static CrostiniManager* GetForProfile(Profile* profile);
diff --git a/chrome/browser/chromeos/crostini/crostini_manager_unittest.cc b/chrome/browser/chromeos/crostini/crostini_manager_unittest.cc
index 26fc704..161d8ef 100644
--- a/chrome/browser/chromeos/crostini/crostini_manager_unittest.cc
+++ b/chrome/browser/chromeos/crostini/crostini_manager_unittest.cc
@@ -622,6 +622,8 @@
   }
 
   // CrostiniManager::RestartObserver
+  void OnStageStarted(mojom::InstallerState stage) override {}
+
   void OnComponentLoaded(CrostiniResult result) override {
     if (abort_on_component_loaded_) {
       Abort();
@@ -674,6 +676,12 @@
     }
   }
 
+  void OnContainerMounted(bool success) override {
+    if (abort_on_container_mounted_) {
+      Abort();
+    }
+  }
+
  protected:
   void Abort() {
     crostini_manager()->AbortRestartCrostini(restart_id_,
@@ -710,6 +718,7 @@
   bool abort_on_container_started_ = false;
   bool abort_on_container_setup_ = false;
   bool abort_on_ssh_keys_fetched_ = false;
+  bool abort_on_container_mounted_ = false;
 
   // Used by SshfsMount().
   bool abort_on_mount_event_ = false;
@@ -870,6 +879,32 @@
   EXPECT_EQ(0, restart_crostini_callback_count_);
 }
 
+TEST_F(CrostiniManagerRestartTest, AbortOnContainerMounted) {
+  abort_on_container_mounted_ = true;
+
+  disk_mount_manager_mock_ = new chromeos::disks::MockDiskMountManager;
+  chromeos::disks::DiskMountManager::InitializeForTesting(
+      disk_mount_manager_mock_);
+  EXPECT_CALL(*disk_mount_manager_mock_, MountPath)
+      .WillOnce(Invoke(
+          this, &CrostiniManagerRestartTest_AbortOnContainerMounted_Test::
+                    SshfsMount));
+
+  // Use termina/penguin names to allow fetch ssh keys.
+  restart_id_ = crostini_manager()->RestartCrostini(
+      kCrostiniDefaultVmName, kCrostiniDefaultContainerName,
+      base::BindOnce(&CrostiniManagerRestartTest::RestartCrostiniCallback,
+                     base::Unretained(this), run_loop()->QuitClosure()),
+      this);
+  run_loop()->Run();
+  EXPECT_TRUE(fake_concierge_client_->create_disk_image_called());
+  EXPECT_TRUE(fake_concierge_client_->start_termina_vm_called());
+  EXPECT_TRUE(fake_concierge_client_->get_container_ssh_keys_called());
+  EXPECT_EQ(0, restart_crostini_callback_count_);
+
+  chromeos::disks::DiskMountManager::Shutdown();
+}
+
 TEST_F(CrostiniManagerRestartTest, AbortOnMountEvent) {
   abort_on_mount_event_ = true;
 
diff --git a/chrome/browser/chromeos/drive/fileapi/drivefs_async_file_util.cc b/chrome/browser/chromeos/drive/fileapi/drivefs_async_file_util.cc
index a821e6a..701de35 100644
--- a/chrome/browser/chromeos/drive/fileapi/drivefs_async_file_util.cc
+++ b/chrome/browser/chromeos/drive/fileapi/drivefs_async_file_util.cc
@@ -21,7 +21,7 @@
 #include "storage/browser/file_system/file_system_url.h"
 #include "storage/browser/file_system/local_file_util.h"
 #include "storage/browser/file_system/native_file_util.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 
 namespace drive {
 namespace internal {
diff --git a/chrome/browser/chromeos/extensions/file_manager/event_router.cc b/chrome/browser/chromeos/extensions/file_manager/event_router.cc
index b5e4512..e0cb172 100644
--- a/chrome/browser/chromeos/extensions/file_manager/event_router.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/event_router.cc
@@ -53,8 +53,8 @@
 #include "extensions/browser/extension_host.h"
 #include "extensions/browser/extension_prefs.h"
 #include "storage/browser/file_system/external_mount_points.h"
-#include "storage/common/fileapi/file_system_types.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_types.h"
+#include "storage/common/file_system/file_system_util.h"
 
 using chromeos::disks::Disk;
 using chromeos::disks::DiskMountManager;
diff --git a/chrome/browser/chromeos/extensions/file_manager/file_browser_handler_api.cc b/chrome/browser/chromeos/extensions/file_manager/file_browser_handler_api.cc
index 4686129..6ff5287 100644
--- a/chrome/browser/chromeos/extensions/file_manager/file_browser_handler_api.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/file_browser_handler_api.cc
@@ -51,8 +51,8 @@
 #include "content/public/browser/render_process_host.h"
 #include "storage/browser/file_system/file_system_backend.h"
 #include "storage/browser/file_system/file_system_context.h"
-#include "storage/common/fileapi/file_system_info.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_info.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "ui/shell_dialogs/select_file_dialog.h"
 
 using content::BrowserThread;
diff --git a/chrome/browser/chromeos/extensions/file_manager/file_browser_handler_api_test.cc b/chrome/browser/chromeos/extensions/file_manager/file_browser_handler_api_test.cc
index d9967ed..2d781f8 100644
--- a/chrome/browser/chromeos/extensions/file_manager/file_browser_handler_api_test.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/file_browser_handler_api_test.cc
@@ -30,7 +30,7 @@
 #include "extensions/common/extension.h"
 #include "extensions/test/result_catcher.h"
 #include "storage/browser/file_system/external_mount_points.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 
 namespace utils = extension_function_test_utils;
 
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc b/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc
index b25b3b3..783b5a2 100644
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc
@@ -55,8 +55,8 @@
 #include "mojo/public/cpp/bindings/callback_helpers.h"
 #include "services/network/public/cpp/network_connection_tracker.h"
 #include "services/network/public/cpp/shared_url_loader_factory.h"
-#include "storage/common/fileapi/file_system_info.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_info.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "url/gurl.h"
 
 using content::BrowserThread;
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_file_system.cc b/chrome/browser/chromeos/extensions/file_manager/private_api_file_system.cc
index 02193f2f..ef62f9bc7 100644
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_file_system.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_file_system.cc
@@ -61,9 +61,9 @@
 #include "storage/browser/file_system/file_system_file_util.h"
 #include "storage/browser/file_system/file_system_operation_context.h"
 #include "storage/browser/file_system/file_system_operation_runner.h"
-#include "storage/common/fileapi/file_system_info.h"
-#include "storage/common/fileapi/file_system_types.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_info.h"
+#include "storage/common/file_system/file_system_types.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "third_party/cros_system_api/constants/cryptohome.h"
 
 using chromeos::disks::DiskMountManager;
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc b/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc
index f8806a4..befc973 100644
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc
@@ -74,8 +74,8 @@
 #include "google_apis/drive/auth_service.h"
 #include "net/base/hex_utils.h"
 #include "services/network/public/cpp/shared_url_loader_factory.h"
-#include "storage/common/fileapi/file_system_types.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_types.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "ui/base/webui/web_ui_util.h"
 #include "url/gurl.h"
 
diff --git a/chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc b/chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc
index c11d273..abf16594 100644
--- a/chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc
+++ b/chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc
@@ -42,7 +42,7 @@
 #include "ui/shell_dialogs/select_file_policy.h"
 
 // Tests for access to external file systems (as defined in
-// storage/common/fileapi/file_system_types.h) from extensions with
+// storage/common/file_system/file_system_types.h) from extensions with
 // fileManagerPrivate and fileBrowserHandler extension permissions.
 // The tests cover following external file system types:
 // - local (kFileSystemTypeLocalNative): a local file system on which files are
diff --git a/chrome/browser/chromeos/file_manager/file_browser_handlers.cc b/chrome/browser/chromeos/file_manager/file_browser_handlers.cc
index 2aaba9d..7bc15bb 100644
--- a/chrome/browser/chromeos/file_manager/file_browser_handlers.cc
+++ b/chrome/browser/chromeos/file_manager/file_browser_handlers.cc
@@ -45,8 +45,8 @@
 #include "net/base/escape.h"
 #include "storage/browser/file_system/file_system_context.h"
 #include "storage/browser/file_system/file_system_url.h"
-#include "storage/common/fileapi/file_system_info.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_info.h"
+#include "storage/common/file_system/file_system_util.h"
 
 using content::BrowserThread;
 using content::ChildProcessSecurityPolicy;
diff --git a/chrome/browser/chromeos/file_manager/file_tasks_notifier.cc b/chrome/browser/chromeos/file_manager/file_tasks_notifier.cc
index 21cff24..d7d1d3e 100644
--- a/chrome/browser/chromeos/file_manager/file_tasks_notifier.cc
+++ b/chrome/browser/chromeos/file_manager/file_tasks_notifier.cc
@@ -23,7 +23,7 @@
 #include "storage/browser/file_system/external_mount_points.h"
 #include "storage/browser/file_system/file_system_context.h"
 #include "storage/browser/file_system/file_system_url.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 #include "ui/shell_dialogs/selected_file_info.h"
 
 namespace file_manager {
diff --git a/chrome/browser/chromeos/file_manager/file_tasks_notifier_unittest.cc b/chrome/browser/chromeos/file_manager/file_tasks_notifier_unittest.cc
index 7b2620ff..f331591 100644
--- a/chrome/browser/chromeos/file_manager/file_tasks_notifier_unittest.cc
+++ b/chrome/browser/chromeos/file_manager/file_tasks_notifier_unittest.cc
@@ -24,7 +24,7 @@
 #include "mojo/public/cpp/bindings/remote.h"
 #include "storage/browser/file_system/external_mount_points.h"
 #include "storage/browser/file_system/file_system_url.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "ui/shell_dialogs/selected_file_info.h"
 
diff --git a/chrome/browser/chromeos/file_manager/fileapi_util.cc b/chrome/browser/chromeos/file_manager/fileapi_util.cc
index 41c717e..80734a3d 100644
--- a/chrome/browser/chromeos/file_manager/fileapi_util.cc
+++ b/chrome/browser/chromeos/file_manager/fileapi_util.cc
@@ -30,7 +30,7 @@
 #include "storage/browser/file_system/file_system_context.h"
 #include "storage/browser/file_system/isolated_context.h"
 #include "storage/browser/file_system/open_file_system_mode.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "ui/shell_dialogs/selected_file_info.h"
 #include "url/gurl.h"
 
diff --git a/chrome/browser/chromeos/file_manager/filesystem_api_util.h b/chrome/browser/chromeos/file_manager/filesystem_api_util.h
index b8c1ba9b..e2d4849 100644
--- a/chrome/browser/chromeos/file_manager/filesystem_api_util.h
+++ b/chrome/browser/chromeos/file_manager/filesystem_api_util.h
@@ -14,7 +14,7 @@
 
 #include "base/callback_forward.h"
 #include "base/optional.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 
 class Profile;
 
diff --git a/chrome/browser/chromeos/file_system_provider/service.cc b/chrome/browser/chromeos/file_system_provider/service.cc
index 9dcc28ea..0322f22 100644
--- a/chrome/browser/chromeos/file_system_provider/service.cc
+++ b/chrome/browser/chromeos/file_system_provider/service.cc
@@ -27,7 +27,7 @@
 #include "extensions/common/permissions/api_permission.h"
 #include "extensions/common/permissions/permissions_data.h"
 #include "storage/browser/file_system/external_mount_points.h"
-#include "storage/common/fileapi/file_system_mount_option.h"
+#include "storage/common/file_system/file_system_mount_option.h"
 
 namespace chromeos {
 namespace file_system_provider {
diff --git a/chrome/browser/chromeos/fileapi/external_file_url_util.h b/chrome/browser/chromeos/fileapi/external_file_url_util.h
index dc2ab20..c07d0cec 100644
--- a/chrome/browser/chromeos/fileapi/external_file_url_util.h
+++ b/chrome/browser/chromeos/fileapi/external_file_url_util.h
@@ -6,7 +6,7 @@
 #define CHROME_BROWSER_CHROMEOS_FILEAPI_EXTERNAL_FILE_URL_UTIL_H_
 
 #include "base/callback_forward.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 
 class GURL;
 class Profile;
diff --git a/chrome/browser/chromeos/fileapi/file_system_backend.cc b/chrome/browser/chromeos/fileapi/file_system_backend.cc
index b152e49..b832e278 100644
--- a/chrome/browser/chromeos/fileapi/file_system_backend.cc
+++ b/chrome/browser/chromeos/fileapi/file_system_backend.cc
@@ -30,9 +30,9 @@
 #include "storage/browser/file_system/file_system_operation.h"
 #include "storage/browser/file_system/file_system_operation_context.h"
 #include "storage/browser/file_system/file_system_url.h"
-#include "storage/common/fileapi/file_system_mount_option.h"
-#include "storage/common/fileapi/file_system_types.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_mount_option.h"
+#include "storage/common/file_system/file_system_types.h"
+#include "storage/common/file_system/file_system_util.h"
 
 namespace chromeos {
 namespace {
diff --git a/chrome/browser/chromeos/fileapi/file_system_backend.h b/chrome/browser/chromeos/fileapi/file_system_backend.h
index 86268a1..096586d8 100644
--- a/chrome/browser/chromeos/fileapi/file_system_backend.h
+++ b/chrome/browser/chromeos/fileapi/file_system_backend.h
@@ -17,7 +17,7 @@
 #include "base/memory/ref_counted.h"
 #include "storage/browser/file_system/file_system_backend.h"
 #include "storage/browser/file_system/task_runner_bound_observer_list.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 
 namespace storage {
 class CopyOrMoveFileValidatorFactory;
diff --git a/chrome/browser/chromeos/fileapi/file_system_backend_delegate.h b/chrome/browser/chromeos/fileapi/file_system_backend_delegate.h
index ea9b9a4..3765653 100644
--- a/chrome/browser/chromeos/fileapi/file_system_backend_delegate.h
+++ b/chrome/browser/chromeos/fileapi/file_system_backend_delegate.h
@@ -11,7 +11,7 @@
 
 #include "base/callback_forward.h"
 #include "storage/browser/file_system/file_system_backend.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 
 namespace base {
 class Time;
diff --git a/chrome/browser/chromeos/fileapi/recent_disk_source_unittest.cc b/chrome/browser/chromeos/fileapi/recent_disk_source_unittest.cc
index faaedd2e..4eb3b907 100644
--- a/chrome/browser/chromeos/fileapi/recent_disk_source_unittest.cc
+++ b/chrome/browser/chromeos/fileapi/recent_disk_source_unittest.cc
@@ -25,8 +25,8 @@
 #include "storage/browser/file_system/file_system_context.h"
 #include "storage/browser/file_system/file_system_url.h"
 #include "storage/browser/test/test_file_system_context.h"
-#include "storage/common/fileapi/file_system_mount_option.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_mount_option.h"
+#include "storage/common/file_system/file_system_types.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "url/gurl.h"
 
diff --git a/chrome/browser/chromeos/fileapi/recent_drive_source.cc b/chrome/browser/chromeos/fileapi/recent_drive_source.cc
index d202339..eb95643 100644
--- a/chrome/browser/chromeos/fileapi/recent_drive_source.cc
+++ b/chrome/browser/chromeos/fileapi/recent_drive_source.cc
@@ -21,7 +21,7 @@
 #include "storage/browser/file_system/file_system_operation.h"
 #include "storage/browser/file_system/file_system_operation_runner.h"
 #include "storage/browser/file_system/file_system_url.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 
 using content::BrowserThread;
 
diff --git a/chrome/browser/chromeos/fileapi/recent_model_unittest.cc b/chrome/browser/chromeos/fileapi/recent_model_unittest.cc
index e5393b6..8d5aa86 100644
--- a/chrome/browser/chromeos/fileapi/recent_model_unittest.cc
+++ b/chrome/browser/chromeos/fileapi/recent_model_unittest.cc
@@ -17,7 +17,7 @@
 #include "chrome/test/base/testing_profile.h"
 #include "content/public/test/browser_task_environment.h"
 #include "storage/browser/file_system/file_system_url.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace chromeos {
diff --git a/chrome/browser/chromeos/policy/status_collector/device_status_collector_browsertest.cc b/chrome/browser/chromeos/policy/status_collector/device_status_collector_browsertest.cc
index 46fe70c1..06d504e 100644
--- a/chrome/browser/chromeos/policy/status_collector/device_status_collector_browsertest.cc
+++ b/chrome/browser/chromeos/policy/status_collector/device_status_collector_browsertest.cc
@@ -87,8 +87,8 @@
 #include "mojo/core/embedder/embedder.h"
 #include "storage/browser/file_system/external_mount_points.h"
 #include "storage/browser/file_system/mount_points.h"
-#include "storage/common/fileapi/file_system_mount_option.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_mount_option.h"
+#include "storage/common/file_system/file_system_types.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/cros_system_api/dbus/service_constants.h"
diff --git a/chrome/browser/content_settings/tab_specific_content_settings.cc b/chrome/browser/content_settings/tab_specific_content_settings.cc
index d54ea80..30f24b9b 100644
--- a/chrome/browser/content_settings/tab_specific_content_settings.cc
+++ b/chrome/browser/content_settings/tab_specific_content_settings.cc
@@ -49,7 +49,7 @@
 #include "mojo/public/cpp/bindings/associated_remote.h"
 #include "net/base/registry_controlled_domains/registry_controlled_domain.h"
 #include "net/cookies/canonical_cookie.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
 #include "url/origin.h"
 
diff --git a/chrome/browser/devtools/devtools_file_helper.cc b/chrome/browser/devtools/devtools_file_helper.cc
index 2313135..30c088b 100644
--- a/chrome/browser/devtools/devtools_file_helper.cc
+++ b/chrome/browser/devtools/devtools_file_helper.cc
@@ -37,7 +37,7 @@
 #include "content/public/common/url_constants.h"
 #include "storage/browser/file_system/file_system_url.h"
 #include "storage/browser/file_system/isolated_context.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "ui/base/l10n/l10n_util.h"
 #include "ui/shell_dialogs/select_file_dialog.h"
 
diff --git a/chrome/browser/extensions/api/file_system/chrome_file_system_delegate.cc b/chrome/browser/extensions/api/file_system/chrome_file_system_delegate.cc
index 5c0439ac..76b2c7b 100644
--- a/chrome/browser/extensions/api/file_system/chrome_file_system_delegate.cc
+++ b/chrome/browser/extensions/api/file_system/chrome_file_system_delegate.cc
@@ -38,8 +38,8 @@
 #include "extensions/common/extension.h"
 #include "storage/browser/file_system/external_mount_points.h"
 #include "storage/browser/file_system/isolated_context.h"
-#include "storage/common/fileapi/file_system_types.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_types.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "ui/shell_dialogs/select_file_dialog.h"
 
 #if defined(OS_MACOSX)
diff --git a/chrome/browser/extensions/app_data_migrator.cc b/chrome/browser/extensions/app_data_migrator.cc
index 3b0fd39..5a66cac 100644
--- a/chrome/browser/extensions/app_data_migrator.cc
+++ b/chrome/browser/extensions/app_data_migrator.cc
@@ -16,7 +16,7 @@
 #include "extensions/common/extension.h"
 #include "storage/browser/file_system/file_system_context.h"
 #include "storage/browser/file_system/sandbox_file_system_backend_delegate.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 #include "url/origin.h"
 
 using base::WeakPtr;
diff --git a/chrome/browser/media_galleries/chromeos/mtp_device_task_helper.cc b/chrome/browser/media_galleries/chromeos/mtp_device_task_helper.cc
index 7db730eb..d17fcd5 100644
--- a/chrome/browser/media_galleries/chromeos/mtp_device_task_helper.cc
+++ b/chrome/browser/media_galleries/chromeos/mtp_device_task_helper.cc
@@ -21,7 +21,7 @@
 #include "net/base/io_buffer.h"
 #include "services/device/public/mojom/mtp_manager.mojom.h"
 #include "storage/browser/file_system/async_file_util.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "third_party/cros_system_api/dbus/service_constants.h"
 
 using storage_monitor::StorageMonitor;
diff --git a/chrome/browser/media_galleries/fileapi/media_file_system_backend.cc b/chrome/browser/media_galleries/fileapi/media_file_system_backend.cc
index 6a2be2f4..d8be9220 100644
--- a/chrome/browser/media_galleries/fileapi/media_file_system_backend.cc
+++ b/chrome/browser/media_galleries/fileapi/media_file_system_backend.cc
@@ -43,8 +43,8 @@
 #include "storage/browser/file_system/file_system_operation_context.h"
 #include "storage/browser/file_system/file_system_url.h"
 #include "storage/browser/file_system/native_file_util.h"
-#include "storage/common/fileapi/file_system_types.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_types.h"
+#include "storage/common/file_system/file_system_util.h"
 
 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS)
 #include "chrome/browser/media_galleries/fileapi/device_media_async_file_util.h"
diff --git a/chrome/browser/media_galleries/fileapi/media_file_validator_browsertest.cc b/chrome/browser/media_galleries/fileapi/media_file_validator_browsertest.cc
index d19bfcd5..b6eba71 100644
--- a/chrome/browser/media_galleries/fileapi/media_file_validator_browsertest.cc
+++ b/chrome/browser/media_galleries/fileapi/media_file_validator_browsertest.cc
@@ -29,7 +29,7 @@
 #include "storage/browser/file_system/isolated_context.h"
 #include "storage/browser/test/test_file_system_backend.h"
 #include "storage/browser/test/test_file_system_context.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace {
diff --git a/chrome/browser/media_galleries/media_file_system_registry.cc b/chrome/browser/media_galleries/media_file_system_registry.cc
index 5e88900..d52f7f0 100644
--- a/chrome/browser/media_galleries/media_file_system_registry.cc
+++ b/chrome/browser/media_galleries/media_file_system_registry.cc
@@ -42,8 +42,8 @@
 #include "extensions/common/extension.h"
 #include "extensions/common/extension_set.h"
 #include "storage/browser/file_system/external_mount_points.h"
-#include "storage/common/fileapi/file_system_mount_option.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_mount_option.h"
+#include "storage/common/file_system/file_system_types.h"
 
 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS)
 #include "chrome/browser/media_galleries/fileapi/mtp_device_map_service.h"
diff --git a/chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.cc b/chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.cc
index 5626539..a56886ad 100644
--- a/chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.cc
+++ b/chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.cc
@@ -34,7 +34,7 @@
 #include "components/storage_monitor/storage_monitor.h"
 #include "content/public/browser/browser_task_traits.h"
 #include "content/public/browser/browser_thread.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 
 namespace {
 
diff --git a/chrome/browser/metrics/ukm_browsertest.cc b/chrome/browser/metrics/ukm_browsertest.cc
index 93a16971..9a3ac4c 100644
--- a/chrome/browser/metrics/ukm_browsertest.cc
+++ b/chrome/browser/metrics/ukm_browsertest.cc
@@ -40,8 +40,6 @@
 #include "components/sync/test/fake_server/fake_server_network_resources.h"
 #include "components/ukm/content/source_url_recorder.h"
 #include "components/ukm/ukm_service.h"
-#include "components/unified_consent/feature.h"
-#include "components/unified_consent/scoped_unified_consent.h"
 #include "components/unified_consent/unified_consent_service.h"
 #include "components/variations/service/variations_field_trial_creator.h"
 #include "components/version_info/version_info.h"
@@ -148,17 +146,7 @@
 // Test fixture that provides access to some UKM internals.
 class UkmBrowserTestBase : public SyncTest {
  public:
-  explicit UkmBrowserTestBase(bool is_unified_consent_enabled)
-      : SyncTest(SINGLE_CLIENT),
-#if BUILDFLAG(ENABLE_DICE_SUPPORT)
-        scoped_dice_(is_unified_consent_enabled
-                         ? std::make_unique<ScopedAccountConsistencyDice>()
-                         : nullptr),
-#endif
-        scoped_unified_consent_(
-            is_unified_consent_enabled
-                ? unified_consent::UnifiedConsentFeatureState::kEnabled
-                : unified_consent::UnifiedConsentFeatureState::kDisabled) {
+  UkmBrowserTestBase() : SyncTest(SINGLE_CLIENT) {
     // Explicitly enable UKM and disable the MetricsReporting (which should
     // not affect UKM).
     scoped_feature_list_.InitWithFeatures({ukm::kUkmFeature},
@@ -307,37 +295,20 @@
     return g_browser_process->GetMetricsServicesManager()->GetUkmService();
   }
 
-#if BUILDFLAG(ENABLE_DICE_SUPPORT)
-  // ScopedAccountConsistencyDice is required for unified consent to be enabled.
-  // Note that it uses forced field trials to enable DICE which disable metrics
-  // which are required by UkmConsentParamBrowserTest (see
-  // |IsMetricsReportingEnabledForOfficialBuild|).
-  const std::unique_ptr<ScopedAccountConsistencyDice> scoped_dice_;
-#endif
-  const unified_consent::ScopedUnifiedConsent scoped_unified_consent_;
   base::test::ScopedFeatureList scoped_feature_list_;
 
   DISALLOW_COPY_AND_ASSIGN(UkmBrowserTestBase);
 };
 
-class UkmBrowserTestUnifiedConsentDisabled : public UkmBrowserTestBase {
+class UkmBrowserTest : public UkmBrowserTestBase {
  public:
-  UkmBrowserTestUnifiedConsentDisabled() : UkmBrowserTestBase(false) {}
-
- private:
-  DISALLOW_COPY_AND_ASSIGN(UkmBrowserTestUnifiedConsentDisabled);
-};
-
-class UkmBrowserTest : public UkmBrowserTestBase,
-                       public testing::WithParamInterface<bool> {
- public:
-  UkmBrowserTest() : UkmBrowserTestBase(GetParam()) {}
+  UkmBrowserTest() : UkmBrowserTestBase() {}
 
  private:
   DISALLOW_COPY_AND_ASSIGN(UkmBrowserTest);
 };
 
-class UkmBrowserTestWithSyncTransport : public UkmBrowserTest {
+class UkmBrowserTestWithSyncTransport : public UkmBrowserTestBase {
  public:
   UkmBrowserTestWithSyncTransport() {}
 
@@ -347,14 +318,14 @@
     // try talking to Google servers which of course wouldn't work in tests.
     test_signin_client_factory_ =
         secondary_account_helper::SetUpSigninClient(&test_url_loader_factory_);
-    UkmBrowserTest::SetUpInProcessBrowserTestFixture();
+    UkmBrowserTestBase::SetUpInProcessBrowserTestFixture();
   }
 
   void SetUpOnMainThread() override {
 #if defined(OS_CHROMEOS)
     secondary_account_helper::InitNetwork();
 #endif  // defined(OS_CHROMEOS)
-    UkmBrowserTest::SetUpOnMainThread();
+    UkmBrowserTestBase::SetUpOnMainThread();
   }
 
  private:
@@ -370,8 +341,7 @@
 class UkmConsentParamBrowserTest : public UkmBrowserTestBase,
                                    public testing::WithParamInterface<bool> {
  public:
-  UkmConsentParamBrowserTest()
-      : UkmBrowserTestBase(/*is_unified_consent=*/false) {}
+  UkmConsentParamBrowserTest() : UkmBrowserTestBase() {}
 
   static bool IsMetricsAndCrashReportingEnabled() {
     return ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled();
@@ -427,7 +397,7 @@
 // Keep in sync with UkmTest.testRegularPlusIncognitoCheck in
 // chrome/android/javatests/src/org/chromium/chrome/browser/metrics/
 // UkmTest.java.
-IN_PROC_BROWSER_TEST_P(UkmBrowserTest, RegularPlusIncognitoCheck) {
+IN_PROC_BROWSER_TEST_F(UkmBrowserTest, RegularPlusIncognitoCheck) {
   MetricsConsentOverride metrics_consent(true);
 
   Profile* profile = ProfileManager::GetActiveUserProfile();
@@ -466,7 +436,7 @@
 // Keep in sync with UkmTest.testIncognitoPlusRegularCheck in
 // chrome/android/javatests/src/org/chromium/chrome/browser/metrics/
 // UkmTest.java.
-IN_PROC_BROWSER_TEST_P(UkmBrowserTest, IncognitoPlusRegularCheck) {
+IN_PROC_BROWSER_TEST_F(UkmBrowserTest, IncognitoPlusRegularCheck) {
   MetricsConsentOverride metrics_consent(true);
 
   Profile* profile = ProfileManager::GetActiveUserProfile();
@@ -487,7 +457,7 @@
 }
 
 // Make sure that UKM is disabled while a guest profile's window is open.
-IN_PROC_BROWSER_TEST_P(UkmBrowserTest, RegularPlusGuestCheck) {
+IN_PROC_BROWSER_TEST_F(UkmBrowserTest, RegularPlusGuestCheck) {
   MetricsConsentOverride metrics_consent(true);
 
   Profile* profile = ProfileManager::GetActiveUserProfile();
@@ -515,7 +485,7 @@
 }
 
 // Make sure that UKM is disabled while an non-sync profile's window is open.
-IN_PROC_BROWSER_TEST_P(UkmBrowserTest, OpenNonSyncCheck) {
+IN_PROC_BROWSER_TEST_F(UkmBrowserTest, OpenNonSyncCheck) {
   MetricsConsentOverride metrics_consent(true);
 
   Profile* profile = ProfileManager::GetActiveUserProfile();
@@ -545,7 +515,7 @@
 // Keep in sync with UkmTest.testMetricConsent in
 // chrome/android/javatests/src/org/chromium/chrome/browser/sync/
 // UkmTest.java.
-IN_PROC_BROWSER_TEST_P(UkmBrowserTest, MetricsConsentCheck) {
+IN_PROC_BROWSER_TEST_F(UkmBrowserTest, MetricsConsentCheck) {
   MetricsConsentOverride metrics_consent(true);
 
   Profile* profile = ProfileManager::GetActiveUserProfile();
@@ -575,7 +545,7 @@
   CloseBrowserSynchronously(sync_browser);
 }
 
-IN_PROC_BROWSER_TEST_P(UkmBrowserTest, LogProtoData) {
+IN_PROC_BROWSER_TEST_F(UkmBrowserTest, LogProtoData) {
   MetricsConsentOverride metrics_consent(true);
 
   Profile* profile = ProfileManager::GetActiveUserProfile();
@@ -615,7 +585,7 @@
 
 // Verifies that network provider attaches effective connection type correctly
 // to the UKM report.
-IN_PROC_BROWSER_TEST_P(UkmBrowserTest, NetworkProviderPopulatesSystemProfile) {
+IN_PROC_BROWSER_TEST_F(UkmBrowserTest, NetworkProviderPopulatesSystemProfile) {
   // Override network quality to 2G. This should cause the
   // |max_effective_connection_type| in the system profile to be set to 2G.
   g_browser_process->network_quality_tracker()
@@ -658,7 +628,7 @@
 // Keep in sync with UkmTest.consentAddedButNoSyncCheck in
 // chrome/android/javatests/src/org/chromium/chrome/browser/sync/
 // UkmTest.java.
-IN_PROC_BROWSER_TEST_P(UkmBrowserTest, ConsentAddedButNoSyncCheck) {
+IN_PROC_BROWSER_TEST_F(UkmBrowserTest, ConsentAddedButNoSyncCheck) {
   MetricsConsentOverride metrics_consent(false);
 
   Profile* profile = ProfileManager::GetActiveUserProfile();
@@ -681,7 +651,7 @@
 // Keep in sync with UkmTest.singleDisableHistorySyncCheck in
 // chrome/android/javatests/src/org/chromium/chrome/browser/sync/
 // UkmTest.java.
-IN_PROC_BROWSER_TEST_P(UkmBrowserTest, SingleDisableHistorySyncCheck) {
+IN_PROC_BROWSER_TEST_F(UkmBrowserTest, SingleDisableHistorySyncCheck) {
   MetricsConsentOverride metrics_consent(true);
 
   Profile* profile = ProfileManager::GetActiveUserProfile();
@@ -694,25 +664,16 @@
   EXPECT_NE(0U, original_client_id);
 
   harness->DisableSyncForType(syncer::UserSelectableType::kHistory);
-  if (unified_consent::IsUnifiedConsentFeatureEnabled()) {
-    // Disable history sync does not disable UKM when unified consent is
-    // enabled.
-    EXPECT_TRUE(ukm_enabled());
-  } else {
-    EXPECT_FALSE(ukm_enabled());
-
-    harness->EnableSyncForType(syncer::UserSelectableType::kHistory);
-    EXPECT_TRUE(ukm_enabled());
-    // Client ID should be reset.
-    EXPECT_NE(original_client_id, client_id());
-  }
+  // Disable history sync does not disable UKM when unified consent is
+  // enabled.
+  EXPECT_TRUE(ukm_enabled());
 
   harness->service()->GetUserSettings()->SetSyncRequested(false);
   CloseBrowserSynchronously(sync_browser);
 }
 
 // Make sure that UKM is disabled when any open sync window disables history.
-IN_PROC_BROWSER_TEST_P(UkmBrowserTest, MultiDisableHistorySyncCheck) {
+IN_PROC_BROWSER_TEST_F(UkmBrowserTest, MultiDisableHistorySyncCheck) {
   MetricsConsentOverride metrics_consent(true);
 
   Profile* profile1 = ProfileManager::GetActiveUserProfile();
@@ -732,16 +693,7 @@
   EXPECT_EQ(original_client_id, client_id());
 
   harness2->DisableSyncForType(syncer::UserSelectableType::kHistory);
-  if (unified_consent::IsUnifiedConsentFeatureEnabled()) {
-    // Disable history sync does not disable UKM when unified consent is
-    // enabled.
-    EXPECT_TRUE(ukm_enabled());
-  } else {
-    EXPECT_FALSE(ukm_enabled());
-    EXPECT_NE(original_client_id, client_id());
-    original_client_id = client_id();
-    EXPECT_NE(0U, original_client_id);
-  }
+  EXPECT_TRUE(ukm_enabled());
 
   harness2->EnableSyncForType(syncer::UserSelectableType::kHistory);
   EXPECT_TRUE(ukm_enabled());
@@ -755,7 +707,7 @@
 
 // Make sure that extension URLs are disabled when an open sync window
 // disables it.
-IN_PROC_BROWSER_TEST_P(UkmBrowserTest, SingleDisableExtensionsSyncCheck) {
+IN_PROC_BROWSER_TEST_F(UkmBrowserTest, SingleDisableExtensionsSyncCheck) {
   MetricsConsentOverride metrics_consent(true);
 
   Profile* profile = ProfileManager::GetActiveUserProfile();
@@ -786,7 +738,7 @@
 
 // Make sure that extension URLs are disabled when any open sync window
 // disables it.
-IN_PROC_BROWSER_TEST_P(UkmBrowserTest, MultiDisableExtensionsSyncCheck) {
+IN_PROC_BROWSER_TEST_F(UkmBrowserTest, MultiDisableExtensionsSyncCheck) {
   MetricsConsentOverride metrics_consent(true);
 
   Profile* profile1 = ProfileManager::GetActiveUserProfile();
@@ -821,7 +773,7 @@
   CloseBrowserSynchronously(browser1);
 }
 
-IN_PROC_BROWSER_TEST_P(UkmBrowserTest, LogsTabId) {
+IN_PROC_BROWSER_TEST_F(UkmBrowserTest, LogsTabId) {
   ASSERT_TRUE(embedded_test_server()->Start());
   MetricsConsentOverride metrics_consent(true);
   Profile* profile = ProfileManager::GetActiveUserProfile();
@@ -849,7 +801,7 @@
   EXPECT_EQ(3, third_source->navigation_data().tab_id);
 }
 
-IN_PROC_BROWSER_TEST_P(UkmBrowserTest, LogsPreviousSourceId) {
+IN_PROC_BROWSER_TEST_F(UkmBrowserTest, LogsPreviousSourceId) {
   ASSERT_TRUE(embedded_test_server()->Start());
   MetricsConsentOverride metrics_consent(true);
   Profile* profile = ProfileManager::GetActiveUserProfile();
@@ -890,7 +842,7 @@
             subsequent_source->navigation_data().previous_source_id);
 }
 
-IN_PROC_BROWSER_TEST_P(UkmBrowserTest, LogsOpenerSource) {
+IN_PROC_BROWSER_TEST_F(UkmBrowserTest, LogsOpenerSource) {
   ASSERT_TRUE(embedded_test_server()->Start());
   MetricsConsentOverride metrics_consent(true);
   Profile* profile = ProfileManager::GetActiveUserProfile();
@@ -929,37 +881,6 @@
             subsequent_source->navigation_data().opener_source_id);
 }
 
-// Make sure that UKM is disabled when an secondary passphrase is set.
-// Keep in sync with UkmTest.secondaryPassphraseCheck in
-// chrome/android/javatests/src/org/chromium/chrome/browser/sync/
-// UkmTest.java.
-IN_PROC_BROWSER_TEST_F(UkmBrowserTestUnifiedConsentDisabled,
-                       SecondaryPassphraseCheck) {
-  MetricsConsentOverride metrics_consent(true);
-
-  Profile* profile = ProfileManager::GetActiveUserProfile();
-  std::unique_ptr<ProfileSyncServiceHarness> harness =
-      EnableSyncForProfile(profile);
-
-  Browser* sync_browser = CreateBrowser(profile);
-  EXPECT_TRUE(ukm_enabled());
-  uint64_t original_client_id = client_id();
-  EXPECT_NE(0U, original_client_id);
-
-  // Setting an encryption passphrase is done on the "sync" thread meaning the
-  // method only posts a task and returns. That task, when executed, will
-  // set the passphrase and notify observers (which disables UKM).
-  harness->service()->GetUserSettings()->SetEncryptionPassphrase("foo");
-  UkmEnabledChecker checker(this, harness->service(), false);
-  EXPECT_TRUE(checker.Wait());
-
-  // Client ID should be reset.
-  EXPECT_NE(original_client_id, client_id());
-
-  harness->service()->GetUserSettings()->SetSyncRequested(false);
-  CloseBrowserSynchronously(sync_browser);
-}
-
 // ChromeOS doesn't have the concept of sign-out so this test doesn't make sense
 // there.
 #if !defined(OS_CHROMEOS)
@@ -967,7 +888,7 @@
 // Keep in sync with UkmTest.singleSyncSignoutCheck in
 // chrome/android/javatests/src/org/chromium/chrome/browser/sync/
 // UkmTest.java.
-IN_PROC_BROWSER_TEST_P(UkmBrowserTest, SingleSyncSignoutCheck) {
+IN_PROC_BROWSER_TEST_F(UkmBrowserTest, SingleSyncSignoutCheck) {
   MetricsConsentOverride metrics_consent(true);
 
   Profile* profile = ProfileManager::GetActiveUserProfile();
@@ -992,7 +913,7 @@
 // there.
 #if !defined(OS_CHROMEOS)
 // Make sure that UKM is disabled when any profile signs out of Sync.
-IN_PROC_BROWSER_TEST_P(UkmBrowserTest, MultiSyncSignoutCheck) {
+IN_PROC_BROWSER_TEST_F(UkmBrowserTest, MultiSyncSignoutCheck) {
   MetricsConsentOverride metrics_consent(true);
 
   Profile* profile1 = ProfileManager::GetActiveUserProfile();
@@ -1024,7 +945,7 @@
 
 // Make sure that if history/sync services weren't available when we tried to
 // attach listeners, UKM is not enabled.
-IN_PROC_BROWSER_TEST_P(UkmBrowserTest, ServiceListenerInitFailedCheck) {
+IN_PROC_BROWSER_TEST_F(UkmBrowserTest, ServiceListenerInitFailedCheck) {
   MetricsConsentOverride metrics_consent(true);
   ChromeMetricsServiceClient::SetNotificationListenerSetupFailedForTesting(
       true);
@@ -1040,7 +961,7 @@
 }
 
 // Make sure that UKM is not affected by MetricsReporting Feature (sampling).
-IN_PROC_BROWSER_TEST_P(UkmBrowserTest, MetricsReportingCheck) {
+IN_PROC_BROWSER_TEST_F(UkmBrowserTest, MetricsReportingCheck) {
   // Need to set the Metrics Default to OPT_OUT to trigger MetricsReporting.
   DCHECK(g_browser_process);
   PrefService* local_state = g_browser_process->local_state();
@@ -1068,7 +989,7 @@
 // Keep in sync with UkmTest.testHistoryDeleteCheck in
 // chrome/android/javatests/src/org/chromium/chrome/browser/metrics/
 // UkmTest.java.
-IN_PROC_BROWSER_TEST_P(UkmBrowserTest, HistoryDeleteCheck) {
+IN_PROC_BROWSER_TEST_F(UkmBrowserTest, HistoryDeleteCheck) {
   MetricsConsentOverride metrics_consent(true);
 
   Profile* profile = ProfileManager::GetActiveUserProfile();
@@ -1096,10 +1017,7 @@
   CloseBrowserSynchronously(sync_browser);
 }
 
-// Run UKM browser test suite with Unified Consent enabled and disabled.
-INSTANTIATE_TEST_SUITE_P(, UkmBrowserTest, testing::Bool());
-
-IN_PROC_BROWSER_TEST_P(UkmBrowserTestWithSyncTransport, SyncFeatureCheck) {
+IN_PROC_BROWSER_TEST_F(UkmBrowserTestWithSyncTransport, SyncFeatureCheck) {
   MetricsConsentOverride metrics_consent(true);
 
   // Set up Sync-the-feature.
@@ -1144,11 +1062,9 @@
   ASSERT_TRUE(sync_service->GetUserSettings()->GetSelectedTypes().Has(
       syncer::UserSelectableType::kHistory));
 
-  // If unified consent is disabled, then UKM should now be off, since Sync (the
-  // feature) isn't enabled anymore, even though the machinery is still active.
-  // With unified consent enabled, however, it's still on: The consent is *not*
-  // revoked by (temporarily) turning off Sync.
-  EXPECT_EQ(unified_consent::IsUnifiedConsentFeatureEnabled(), ukm_enabled());
+  // Even if sync is turned off, the UKM consent is not revoked so UKM should
+  // still be enabled.
+  EXPECT_TRUE(ukm_enabled());
 
   // Finally, turn Sync-the-feature on again.
   sync_service->GetUserSettings()->SetSyncRequested(true);
@@ -1164,7 +1080,7 @@
 // On ChromeOS, the test profile starts with a primary account already set, so
 // this test doesn't apply.
 #if !defined(OS_CHROMEOS)
-IN_PROC_BROWSER_TEST_P(UkmBrowserTestWithSyncTransport,
+IN_PROC_BROWSER_TEST_F(UkmBrowserTestWithSyncTransport,
                        NotEnabledForSecondaryAccountSync) {
   MetricsConsentOverride metrics_consent(true);
 
@@ -1199,9 +1115,6 @@
 }
 #endif  // !OS_CHROMEOS
 
-// Run UKM browser test suite with Unified Consent enabled and disabled.
-INSTANTIATE_TEST_SUITE_P(, UkmBrowserTestWithSyncTransport, testing::Bool());
-
 IN_PROC_BROWSER_TEST_P(UkmConsentParamBrowserTest, GroupPolicyConsentCheck) {
   // Note we are not using the synthetic MetricsConsentOverride since we are
   // testing directly from prefs.
@@ -1233,7 +1146,7 @@
 // one reporting cycle after the web contents are destroyed when the tab is
 // closed or when the user navigated away in the same tab.
 // Disabled as per crbug.com/1004296.
-IN_PROC_BROWSER_TEST_P(UkmBrowserTest, DISABLED_EvictObsoleteSources) {
+IN_PROC_BROWSER_TEST_F(UkmBrowserTest, DISABLED_EvictObsoleteSources) {
   MetricsConsentOverride metrics_consent(true);
   Profile* profile = ProfileManager::GetActiveUserProfile();
   std::unique_ptr<ProfileSyncServiceHarness> harness =
diff --git a/chrome/browser/platform_util_unittest.cc b/chrome/browser/platform_util_unittest.cc
index 4c01824..36e97cd 100644
--- a/chrome/browser/platform_util_unittest.cc
+++ b/chrome/browser/platform_util_unittest.cc
@@ -31,7 +31,7 @@
 #include "extensions/common/extension.h"
 #include "storage/browser/file_system/external_mount_points.h"
 #include "storage/browser/test/mock_special_storage_policy.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 #else
 #include "content/public/test/browser_task_environment.h"
 #endif
diff --git a/chrome/browser/sync/sync_ui_util.cc b/chrome/browser/sync/sync_ui_util.cc
index 5014a8de..f001a48 100644
--- a/chrome/browser/sync/sync_ui_util.cc
+++ b/chrome/browser/sync/sync_ui_util.cc
@@ -14,7 +14,6 @@
 #include "components/strings/grit/components_strings.h"
 #include "components/sync/driver/sync_service.h"
 #include "components/sync/driver/sync_user_settings.h"
-#include "components/unified_consent/feature.h"
 #include "google_apis/gaia/google_service_auth_error.h"
 #include "ui/base/l10n/l10n_util.h"
 
@@ -152,11 +151,8 @@
       *status_label = l10n_util::GetStringUTF16(
           IDS_SIGNED_IN_WITH_SYNC_STOPPED_VIA_DASHBOARD);
     }
-    // Note: The pre-UnifiedConsent UI handles this case differently and does
-    // *not* treat it as an error. If we wanted to treat it as an error, we'd
-    // also have to set |link_label| and |action_type|, see crbug.com/977980.
-    return unified_consent::IsUnifiedConsentFeatureEnabled() ? SYNC_ERROR
-                                                             : PRE_SYNCED;
+
+    return SYNC_ERROR;
   }
 
   if (service->GetUserSettings()->IsFirstSetupComplete()) {
diff --git a/chrome/browser/sync/sync_ui_util_unittest.cc b/chrome/browser/sync/sync_ui_util_unittest.cc
index 19cd502..8328d74a 100644
--- a/chrome/browser/sync/sync_ui_util_unittest.cc
+++ b/chrome/browser/sync/sync_ui_util_unittest.cc
@@ -14,7 +14,6 @@
 #include "components/signin/public/identity_manager/identity_test_environment.h"
 #include "components/sync/driver/test_sync_service.h"
 #include "components/sync/engine/sync_engine.h"
-#include "components/unified_consent/feature.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace {
@@ -135,13 +134,7 @@
       service->SetTransportState(syncer::SyncService::TransportState::ACTIVE);
       service->SetPassphraseRequired(false);
       service->SetDetailedSyncStatus(false, syncer::SyncStatus());
-      // This case gets different treatment depending on whether UnifiedConsent
-      // is enabled, see crbug.com/943983 and crbug.com/977980.
-      sync_ui_util::MessageType expected_message_type =
-          unified_consent::IsUnifiedConsentFeatureEnabled()
-              ? sync_ui_util::SYNC_ERROR
-              : sync_ui_util::PRE_SYNCED;
-      return std::make_pair(expected_message_type, sync_ui_util::NO_ACTION);
+      return std::make_pair(sync_ui_util::SYNC_ERROR, sync_ui_util::NO_ACTION);
     }
     case NUMBER_OF_STATUS_CASES:
       NOTREACHED();
diff --git a/chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer.cc b/chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer.cc
index 38bbba9..a6dc5fd2 100644
--- a/chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer.cc
+++ b/chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer.cc
@@ -31,7 +31,7 @@
 #include "components/drive/service/drive_service_interface.h"
 #include "google_apis/drive/drive_api_parser.h"
 #include "net/base/mime_util.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 
 namespace sync_file_system {
 namespace drive_backend {
diff --git a/chrome/browser/sync_file_system/drive_backend/metadata_database.cc b/chrome/browser/sync_file_system/drive_backend/metadata_database.cc
index f0c770a..b4d81395 100644
--- a/chrome/browser/sync_file_system/drive_backend/metadata_database.cc
+++ b/chrome/browser/sync_file_system/drive_backend/metadata_database.cc
@@ -34,7 +34,7 @@
 #include "chrome/browser/sync_file_system/syncable_file_system_util.h"
 #include "components/drive/drive_api_util.h"
 #include "google_apis/drive/drive_api_parser.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "third_party/leveldatabase/env_chromium.h"
 #include "third_party/leveldatabase/leveldb_chrome.h"
 #include "third_party/leveldatabase/src/include/leveldb/db.h"
diff --git a/chrome/browser/sync_file_system/drive_backend/metadata_db_migration_util.cc b/chrome/browser/sync_file_system/drive_backend/metadata_db_migration_util.cc
index 0c6ee5e..9003565 100644
--- a/chrome/browser/sync_file_system/drive_backend/metadata_db_migration_util.cc
+++ b/chrome/browser/sync_file_system/drive_backend/metadata_db_migration_util.cc
@@ -9,8 +9,8 @@
 #include "base/files/file_path.h"
 #include "base/strings/string_util.h"
 #include "chrome/browser/sync_file_system/drive_backend/drive_backend_util.h"
-#include "storage/common/fileapi/file_system_types.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_types.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "third_party/leveldatabase/src/include/leveldb/db.h"
 #include "third_party/leveldatabase/src/include/leveldb/write_batch.h"
 #include "url/gurl.h"
diff --git a/chrome/browser/sync_file_system/drive_backend/metadata_db_migration_util_unittest.cc b/chrome/browser/sync_file_system/drive_backend/metadata_db_migration_util_unittest.cc
index 2a2b793..7dfa182 100644
--- a/chrome/browser/sync_file_system/drive_backend/metadata_db_migration_util_unittest.cc
+++ b/chrome/browser/sync_file_system/drive_backend/metadata_db_migration_util_unittest.cc
@@ -13,7 +13,7 @@
 #include "chrome/browser/sync_file_system/drive_backend/drive_backend_constants.h"
 #include "chrome/browser/sync_file_system/syncable_file_system_util.h"
 #include "storage/browser/file_system/external_mount_points.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/leveldatabase/env_chromium.h"
 #include "third_party/leveldatabase/src/include/leveldb/db.h"
diff --git a/chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer.cc b/chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer.cc
index b110241..81f4834 100644
--- a/chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer.cc
+++ b/chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer.cc
@@ -31,7 +31,7 @@
 #include "components/drive/service/drive_service_interface.h"
 #include "extensions/common/extension.h"
 #include "google_apis/drive/drive_api_parser.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 
 namespace sync_file_system {
 namespace drive_backend {
diff --git a/chrome/browser/sync_file_system/drive_backend/sync_engine.cc b/chrome/browser/sync_file_system/drive_backend/sync_engine.cc
index 66b061a..a23f6ce 100644
--- a/chrome/browser/sync_file_system/drive_backend/sync_engine.cc
+++ b/chrome/browser/sync_file_system/drive_backend/sync_engine.cc
@@ -62,7 +62,7 @@
 #include "services/device/public/mojom/wake_lock_provider.mojom.h"
 #include "services/service_manager/public/cpp/connector.h"
 #include "storage/browser/blob/scoped_file.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 
 namespace sync_file_system {
 
diff --git a/chrome/browser/sync_file_system/drive_backend/sync_task_manager_unittest.cc b/chrome/browser/sync_file_system/drive_backend/sync_task_manager_unittest.cc
index 4b99a3ce..1d5b70f 100644
--- a/chrome/browser/sync_file_system/drive_backend/sync_task_manager_unittest.cc
+++ b/chrome/browser/sync_file_system/drive_backend/sync_task_manager_unittest.cc
@@ -20,7 +20,7 @@
 #include "chrome/browser/sync_file_system/drive_backend/sync_task.h"
 #include "chrome/browser/sync_file_system/drive_backend/sync_task_token.h"
 #include "chrome/browser/sync_file_system/sync_file_system_test_util.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 #define MAKE_PATH(path)                                       \
diff --git a/chrome/browser/sync_file_system/drive_backend/sync_worker.cc b/chrome/browser/sync_file_system/drive_backend/sync_worker.cc
index 49c4e86..8917dc7 100644
--- a/chrome/browser/sync_file_system/drive_backend/sync_worker.cc
+++ b/chrome/browser/sync_file_system/drive_backend/sync_worker.cc
@@ -27,7 +27,7 @@
 #include "chrome/browser/sync_file_system/syncable_file_system_util.h"
 #include "components/drive/service/drive_service_interface.h"
 #include "extensions/browser/extension_registry.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 
 namespace sync_file_system {
 
diff --git a/chrome/browser/sync_file_system/fake_remote_change_processor.cc b/chrome/browser/sync_file_system/fake_remote_change_processor.cc
index 7bf7208..814c6399 100644
--- a/chrome/browser/sync_file_system/fake_remote_change_processor.cc
+++ b/chrome/browser/sync_file_system/fake_remote_change_processor.cc
@@ -15,7 +15,7 @@
 #include "chrome/browser/sync_file_system/sync_file_metadata.h"
 #include "chrome/browser/sync_file_system/syncable_file_system_util.h"
 #include "storage/browser/file_system/file_system_url.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace sync_file_system {
diff --git a/chrome/browser/sync_file_system/local/canned_syncable_file_system.h b/chrome/browser/sync_file_system/local/canned_syncable_file_system.h
index 739fc39..84114b3 100644
--- a/chrome/browser/sync_file_system/local/canned_syncable_file_system.h
+++ b/chrome/browser/sync_file_system/local/canned_syncable_file_system.h
@@ -22,8 +22,8 @@
 #include "storage/browser/file_system/file_system_operation.h"
 #include "storage/browser/file_system/file_system_url.h"
 #include "storage/browser/quota/quota_callbacks.h"
-#include "storage/common/fileapi/file_system_types.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_types.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "third_party/blink/public/mojom/quota/quota_types.mojom.h"
 
 namespace base {
diff --git a/chrome/browser/sync_file_system/local/local_file_change_tracker.cc b/chrome/browser/sync_file_system/local/local_file_change_tracker.cc
index e3eb6db3..6a84a40b 100644
--- a/chrome/browser/sync_file_system/local/local_file_change_tracker.cc
+++ b/chrome/browser/sync_file_system/local/local_file_change_tracker.cc
@@ -20,7 +20,7 @@
 #include "storage/browser/file_system/file_system_context.h"
 #include "storage/browser/file_system/file_system_file_util.h"
 #include "storage/browser/file_system/file_system_operation_context.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "third_party/leveldatabase/env_chromium.h"
 #include "third_party/leveldatabase/src/include/leveldb/db.h"
 #include "third_party/leveldatabase/src/include/leveldb/write_batch.h"
diff --git a/chrome/browser/sync_file_system/local/local_file_sync_context.cc b/chrome/browser/sync_file_system/local/local_file_sync_context.cc
index d4b2371f..a172115 100644
--- a/chrome/browser/sync_file_system/local/local_file_sync_context.cc
+++ b/chrome/browser/sync_file_system/local/local_file_sync_context.cc
@@ -27,7 +27,7 @@
 #include "storage/browser/file_system/file_system_file_util.h"
 #include "storage/browser/file_system/file_system_operation_context.h"
 #include "storage/browser/file_system/file_system_operation_runner.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 
 using storage::FileSystemContext;
 using storage::FileSystemFileUtil;
diff --git a/chrome/browser/sync_file_system/local/local_file_sync_status.cc b/chrome/browser/sync_file_system/local/local_file_sync_status.cc
index 7394157..0b23d0ba 100644
--- a/chrome/browser/sync_file_system/local/local_file_sync_status.cc
+++ b/chrome/browser/sync_file_system/local/local_file_sync_status.cc
@@ -7,7 +7,7 @@
 #include "base/logging.h"
 #include "base/stl_util.h"
 #include "content/public/browser/browser_thread.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 
 using storage::FileSystemURL;
 using storage::FileSystemURLSet;
diff --git a/chrome/browser/sync_file_system/local/root_delete_helper.cc b/chrome/browser/sync_file_system/local/root_delete_helper.cc
index d4f05cc3..5ec9e7e 100644
--- a/chrome/browser/sync_file_system/local/root_delete_helper.cc
+++ b/chrome/browser/sync_file_system/local/root_delete_helper.cc
@@ -14,7 +14,7 @@
 #include "storage/browser/file_system/file_system_context.h"
 #include "storage/browser/file_system/file_system_url.h"
 #include "storage/browser/file_system/sandbox_file_system_backend_delegate.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 
 namespace sync_file_system {
 
diff --git a/chrome/browser/sync_file_system/local/sync_file_system_backend.cc b/chrome/browser/sync_file_system/local/sync_file_system_backend.cc
index 0a4a16c..05f66ce 100644
--- a/chrome/browser/sync_file_system/local/sync_file_system_backend.cc
+++ b/chrome/browser/sync_file_system/local/sync_file_system_backend.cc
@@ -24,7 +24,7 @@
 #include "storage/browser/file_system/file_stream_writer.h"
 #include "storage/browser/file_system/file_system_context.h"
 #include "storage/browser/file_system/file_system_operation.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 
 using content::BrowserThread;
 
diff --git a/chrome/browser/sync_file_system/local/syncable_file_system_unittest.cc b/chrome/browser/sync_file_system/local/syncable_file_system_unittest.cc
index 3a2560a..d837af84 100644
--- a/chrome/browser/sync_file_system/local/syncable_file_system_unittest.cc
+++ b/chrome/browser/sync_file_system/local/syncable_file_system_unittest.cc
@@ -19,7 +19,7 @@
 #include "storage/browser/quota/quota_manager.h"
 #include "storage/browser/test/async_file_test_helper.h"
 #include "storage/browser/test/sandbox_file_system_test_helper.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/leveldatabase/leveldb_chrome.h"
 
diff --git a/chrome/browser/sync_file_system/subtree_set.cc b/chrome/browser/sync_file_system/subtree_set.cc
index 8c60af3..2ff80fd 100644
--- a/chrome/browser/sync_file_system/subtree_set.cc
+++ b/chrome/browser/sync_file_system/subtree_set.cc
@@ -6,7 +6,7 @@
 
 #include "base/logging.h"
 #include "base/stl_util.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 
 namespace sync_file_system {
 
diff --git a/chrome/browser/sync_file_system/syncable_file_system_util.cc b/chrome/browser/sync_file_system/syncable_file_system_util.cc
index 6b17b173..32a7554 100644
--- a/chrome/browser/sync_file_system/syncable_file_system_util.cc
+++ b/chrome/browser/sync_file_system/syncable_file_system_util.cc
@@ -14,7 +14,7 @@
 #include "storage/browser/file_system/external_mount_points.h"
 #include "storage/browser/file_system/file_observers.h"
 #include "storage/browser/file_system/file_system_context.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 
 using storage::ExternalMountPoints;
 using storage::FileSystemContext;
diff --git a/chrome/browser/sync_file_system/syncable_file_system_util_unittest.cc b/chrome/browser/sync_file_system/syncable_file_system_util_unittest.cc
index 328241d5..3e60426 100644
--- a/chrome/browser/sync_file_system/syncable_file_system_util_unittest.cc
+++ b/chrome/browser/sync_file_system/syncable_file_system_util_unittest.cc
@@ -9,7 +9,7 @@
 #include "chrome/browser/sync_file_system/local/canned_syncable_file_system.h"
 #include "chrome/browser/sync_file_system/local/local_file_sync_context.h"
 #include "storage/browser/file_system/external_mount_points.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 using storage::ExternalMountPoints;
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
index e169ed2a..02a4e2ac 100644
--- a/chrome/browser/ui/BUILD.gn
+++ b/chrome/browser/ui/BUILD.gn
@@ -2661,6 +2661,8 @@
       "views/browser_dialogs_views.cc",
       "views/bubble_anchor_util_views.cc",
       "views/bubble_anchor_util_views.h",
+      "views/bubble_menu_item_factory.cc",
+      "views/bubble_menu_item_factory.h",
       "views/bulleted_label_list_view.cc",
       "views/bulleted_label_list_view.h",
       "views/certificate_selector.cc",
@@ -4036,6 +4038,8 @@
       "views/frame/webui_tab_strip_container_view.h",
       "webui/tab_strip/tab_strip_ui.cc",
       "webui/tab_strip/tab_strip_ui.h",
+      "webui/tab_strip/tab_strip_ui_layout.cc",
+      "webui/tab_strip/tab_strip_ui_layout.h",
       "webui/tab_strip/thumbnail_tracker.cc",
       "webui/tab_strip/thumbnail_tracker.h",
     ]
diff --git a/chrome/browser/ui/extensions/hosted_app_browsertest.cc b/chrome/browser/ui/extensions/hosted_app_browsertest.cc
index 10dc2375..124e0b09 100644
--- a/chrome/browser/ui/extensions/hosted_app_browsertest.cc
+++ b/chrome/browser/ui/extensions/hosted_app_browsertest.cc
@@ -1585,18 +1585,6 @@
   EXPECT_FALSE(app_browser_->app_controller()->CreatedForInstalledPwa());
 }
 
-IN_PROC_BROWSER_TEST_P(SharedPWATest, CreatedForInstalledPwaForPwa) {
-  WebApplicationInfo web_app_info;
-  web_app_info.app_url = GURL(kExampleURL);
-  web_app_info.scope = GURL(kExampleURL);
-
-  // TODO (crbug.com/876576): Remove references to extensions in SharedPWATest.
-  const extensions::Extension* app = InstallBookmarkApp(web_app_info);
-  Browser* app_browser = LaunchAppBrowser(app);
-
-  EXPECT_TRUE(app_browser->app_controller()->CreatedForInstalledPwa());
-}
-
 // Check the 'Copy URL' menu button for Hosted App windows.
 IN_PROC_BROWSER_TEST_P(HostedAppPWAOnlyTest, CopyURL) {
   WebApplicationInfo web_app_info;
@@ -2725,35 +2713,6 @@
                             "window.open('', 'bg2').document.body.innerText"));
 }
 
-IN_PROC_BROWSER_TEST_P(SharedPWATest, ThemeColor) {
-  // TODO (crbug.com/876576): Remove references to extensions in SharedPWATest.
-  {
-    WebApplicationInfo web_app_info;
-    web_app_info.app_url = GURL(kExampleURL);
-    web_app_info.scope = GURL(kExampleURL);
-    web_app_info.theme_color = SkColorSetA(SK_ColorBLUE, 0xF0);
-    const extensions::Extension* app = InstallBookmarkApp(web_app_info);
-    Browser* app_browser = LaunchAppBrowser(app);
-
-    EXPECT_EQ(web_app::GetAppIdFromApplicationName(app_browser->app_name()),
-              app->id());
-    EXPECT_EQ(SkColorSetA(*web_app_info.theme_color, SK_AlphaOPAQUE),
-              app_browser->app_controller()->GetThemeColor());
-  }
-  {
-    WebApplicationInfo web_app_info;
-    web_app_info.app_url = GURL("http://example.org/2");
-    web_app_info.scope = GURL("http://example.org/");
-    web_app_info.theme_color = base::Optional<SkColor>();
-    const extensions::Extension* app = InstallBookmarkApp(web_app_info);
-    Browser* app_browser = LaunchAppBrowser(app);
-
-    EXPECT_EQ(web_app::GetAppIdFromApplicationName(app_browser->app_name()),
-              app->id());
-    EXPECT_EQ(base::nullopt, app_browser->app_controller()->GetThemeColor());
-  }
-}
-
 // Check that toolbar is not shown for apps hosted within extensions pages.
 // This simulates a case where the user has manually navigated to a page hosted
 // within an extension, then added it as a bookmark app.
diff --git a/chrome/browser/ui/views/bubble_menu_item_factory.cc b/chrome/browser/ui/views/bubble_menu_item_factory.cc
new file mode 100644
index 0000000..65e0e9fc
--- /dev/null
+++ b/chrome/browser/ui/views/bubble_menu_item_factory.cc
@@ -0,0 +1,54 @@
+// Copyright 2019 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.
+
+#include "chrome/browser/ui/views/bubble_menu_item_factory.h"
+
+#include "chrome/browser/ui/views/hover_button.h"
+#include "chrome/browser/ui/views/hover_button_controller.h"
+#include "ui/views/animation/ink_drop_host_view.h"
+#include "ui/views/border.h"
+#include "ui/views/controls/button/image_button.h"
+#include "ui/views/controls/button/image_button_factory.h"
+#include "ui/views/style/typography.h"
+#include "ui/views/view.h"
+
+namespace {
+constexpr gfx::Insets kDefaultBorderInsets = gfx::Insets(12);
+
+void ConfigureBubbleMenuItem(views::Button* button, int button_id) {
+  // Items within a menu should not show focus rings.
+  button->SetInstallFocusRingOnFocus(false);
+  button->SetInkDropMode(views::InkDropHostView::InkDropMode::ON);
+  button->set_ink_drop_base_color(HoverButton::GetInkDropColor(button));
+  button->SetFocusBehavior(views::View::FocusBehavior::ALWAYS);
+  button->SetID(button_id);
+}
+
+}  // namespace
+
+std::unique_ptr<views::LabelButton> CreateBubbleMenuItem(
+    int button_id,
+    const base::string16& name,
+    views::ButtonListener* listener) {
+  auto button = std::make_unique<views::LabelButton>(
+      listener, name, views::style::CONTEXT_BUTTON);
+
+  ConfigureBubbleMenuItem(button.get(), button_id);
+
+  button->SetButtonController(std::make_unique<HoverButtonController>(
+      button.get(), listener,
+      std::make_unique<views::Button::DefaultButtonControllerDelegate>(
+          button.get())));
+  button->SetBorder(views::CreateEmptyBorder(kDefaultBorderInsets));
+
+  return button;
+}
+
+std::unique_ptr<views::ImageButton> CreateBubbleMenuItem(
+    int button_id,
+    views::ButtonListener* listener) {
+  auto button = views::CreateVectorImageButton(listener);
+  ConfigureBubbleMenuItem(button.get(), button_id);
+  return button;
+}
diff --git a/chrome/browser/ui/views/bubble_menu_item_factory.h b/chrome/browser/ui/views/bubble_menu_item_factory.h
new file mode 100644
index 0000000..45cc9f5
--- /dev/null
+++ b/chrome/browser/ui/views/bubble_menu_item_factory.h
@@ -0,0 +1,30 @@
+// Copyright 2019 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 CHROME_BROWSER_UI_VIEWS_BUBBLE_MENU_ITEM_FACTORY_H_
+#define CHROME_BROWSER_UI_VIEWS_BUBBLE_MENU_ITEM_FACTORY_H_
+
+#include <string>
+
+#include "base/strings/string16.h"
+
+namespace views {
+class ButtonListener;
+class ImageButton;
+class LabelButton;
+}  // namespace views
+
+// Convience method for creating a menu item used inside a bubble that can then
+// be futher configured to hold an image and text.
+std::unique_ptr<views::LabelButton> CreateBubbleMenuItem(
+    int button_id,
+    const base::string16& name,
+    views::ButtonListener* listener);
+
+// Convience method for creating a menu item used inside a bubble with an image.
+std::unique_ptr<views::ImageButton> CreateBubbleMenuItem(
+    int id,
+    views::ButtonListener* listener);
+
+#endif  // CHROME_BROWSER_UI_VIEWS_BUBBLE_MENU_ITEM_FACTORY_H_
diff --git a/chrome/browser/ui/views/extensions/extensions_menu_item_view.cc b/chrome/browser/ui/views/extensions/extensions_menu_item_view.cc
index df72128..5077e9c 100644
--- a/chrome/browser/ui/views/extensions/extensions_menu_item_view.cc
+++ b/chrome/browser/ui/views/extensions/extensions_menu_item_view.cc
@@ -8,6 +8,7 @@
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/toolbar/toolbar_action_view_controller.h"
 #include "chrome/browser/ui/toolbar/toolbar_actions_model.h"
+#include "chrome/browser/ui/views/bubble_menu_item_factory.h"
 #include "chrome/browser/ui/views/extensions/extension_context_menu_controller.h"
 #include "chrome/browser/ui/views/extensions/extensions_menu_button.h"
 #include "chrome/grit/generated_resources.h"
@@ -25,18 +26,6 @@
 namespace {
 constexpr int EXTENSION_CONTEXT_MENU = 13;
 constexpr int EXTENSION_PINNING = 14;
-
-std::unique_ptr<views::ImageButton> CreateButton(
-    int id,
-    views::ButtonListener* listener) {
-  auto button = views::CreateVectorImageButton(listener);
-
-  // Items within a menu should not show focus rings.
-  button->SetInstallFocusRingOnFocus(false);
-  button->SetFocusBehavior(views::View::FocusBehavior::ALWAYS);
-  button->SetID(id);
-  return button;
-}
 }  // namespace
 
 ExtensionsMenuItemView::ExtensionsMenuItemView(
@@ -68,13 +57,14 @@
       ui::NativeTheme::GetInstanceForNativeUi()->GetSystemColor(
           ui::NativeTheme::kColorId_DefaultIconColor);
 
-  auto pin_button = CreateButton(EXTENSION_PINNING, this);
+  auto pin_button = CreateBubbleMenuItem(EXTENSION_PINNING, this);
   pin_button->set_ink_drop_base_color(icon_color);
 
   pin_button_ = pin_button.get();
   AddChildView(std::move(pin_button));
 
-  auto context_menu_button = CreateButton(EXTENSION_CONTEXT_MENU, nullptr);
+  auto context_menu_button =
+      CreateBubbleMenuItem(EXTENSION_CONTEXT_MENU, nullptr);
   views::SetImageFromVectorIcon(context_menu_button.get(), kBrowserToolsIcon,
                                 kSecondaryIconSizeDp, icon_color);
   context_menu_button->SetTooltipText(
diff --git a/chrome/browser/ui/views/extensions/extensions_menu_view.cc b/chrome/browser/ui/views/extensions/extensions_menu_view.cc
index 80cedc8..242b71c 100644
--- a/chrome/browser/ui/views/extensions/extensions_menu_view.cc
+++ b/chrome/browser/ui/views/extensions/extensions_menu_view.cc
@@ -9,19 +9,16 @@
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/chrome_pages.h"
 #include "chrome/browser/ui/toolbar/toolbar_action_view_controller.h"
+#include "chrome/browser/ui/views/bubble_menu_item_factory.h"
 #include "chrome/browser/ui/views/chrome_layout_provider.h"
 #include "chrome/browser/ui/views/chrome_typography.h"
 #include "chrome/browser/ui/views/extensions/extensions_menu_item_view.h"
-#include "chrome/browser/ui/views/hover_button.h"
-#include "chrome/browser/ui/views/hover_button_controller.h"
 #include "chrome/grit/generated_resources.h"
 #include "components/vector_icons/vector_icons.h"
 #include "third_party/skia/include/core/SkPath.h"
 #include "ui/base/l10n/l10n_util.h"
 #include "ui/gfx/paint_vector_icon.h"
 #include "ui/views/animation/ink_drop_host_view.h"
-#include "ui/views/controls/button/image_button.h"
-#include "ui/views/controls/button/image_button_factory.h"
 #include "ui/views/controls/button/label_button.h"
 #include "ui/views/controls/label.h"
 #include "ui/views/controls/scroll_view.h"
@@ -108,29 +105,16 @@
 
   AddChildView(std::make_unique<views::Separator>());
 
-  constexpr gfx::Insets kDefaultBorderInsets = gfx::Insets(12);
-  auto footer = std::make_unique<views::LabelButton>(
-      &button_listener_, l10n_util::GetStringUTF16(IDS_MANAGE_EXTENSION),
-      views::style::CONTEXT_BUTTON);
-  footer->SetButtonController(std::make_unique<HoverButtonController>(
-      footer.get(), &button_listener_,
-      std::make_unique<views::Button::DefaultButtonControllerDelegate>(
-          footer.get())));
+  auto footer = CreateBubbleMenuItem(
+      EXTENSIONS_SETTINGS_ID, l10n_util::GetStringUTF16(IDS_MANAGE_EXTENSION),
+      &button_listener_);
   footer->SetImage(
       views::Button::STATE_NORMAL,
       gfx::CreateVectorIcon(vector_icons::kSettingsIcon, 16,
                             GetNativeTheme()->GetSystemColor(
                                 ui::NativeTheme::kColorId_DefaultIconColor)));
-
-  // Items within a menu should not show focus rings.
-  footer->SetInstallFocusRingOnFocus(false);
-  footer->SetFocusBehavior(views::View::FocusBehavior::ALWAYS);
-  footer->SetBorder(views::CreateEmptyBorder(kDefaultBorderInsets));
-  footer->SetInkDropMode(views::InkDropHostView::InkDropMode::ON);
-  footer->set_ink_drop_base_color(HoverButton::GetInkDropColor(footer.get()));
   footer->SetImageLabelSpacing(ChromeLayoutProvider::Get()->GetDistanceMetric(
       views::DISTANCE_BUTTON_HORIZONTAL_PADDING));
-  footer->SetID(EXTENSIONS_SETTINGS_ID);
   manage_extensions_button_for_testing_ = footer.get();
   AddChildView(std::move(footer));
 }
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index a3e3891..ae509238 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -2524,12 +2524,33 @@
   tab_strip_region_view_->AddChildView(tabstrip_);  // Takes ownership.
   tabstrip_controller->InitFromModel(tabstrip_);
 
+  // Create WebViews early so |webui_tab_strip_| can observe their size.
+  devtools_web_view_ = new views::WebView(browser_->profile());
+  devtools_web_view_->SetID(VIEW_ID_DEV_TOOLS_DOCKED);
+  devtools_web_view_->SetVisible(false);
+
+  contents_web_view_ = new ContentsWebView(browser_->profile());
+  contents_web_view_->SetID(VIEW_ID_TAB_CONTAINER);
+  contents_web_view_->SetEmbedFullscreenWidgetMode(true);
+
+  contents_container_ = new views::View();
+  contents_container_->AddChildView(devtools_web_view_);
+  contents_container_->AddChildView(contents_web_view_);
+  contents_container_->SetLayoutManager(std::make_unique<ContentsLayoutManager>(
+      devtools_web_view_, contents_web_view_));
+
   views::View* webui_tab_strip_view = nullptr;
 #if BUILDFLAG(ENABLE_WEBUI_TAB_STRIP)
   if (base::FeatureList::IsEnabled(features::kWebUITabStrip)) {
+    // We use |contents_container_| here so that enabling or disabling
+    // devtools won't affect the tab sizes. We still use only
+    // |contents_web_view_| for screenshotting and will adjust the
+    // screenshot accordingly. Ideally, the thumbnails should be sized
+    // based on a typical tab size, ignoring devtools or e.g. the
+    // downloads bar.
     webui_tab_strip_ = top_container_->AddChildView(
-        std::make_unique<WebUITabStripContainerView>(browser_.get()));
-
+        std::make_unique<WebUITabStripContainerView>(browser_.get(),
+                                                     contents_container_));
     webui_tab_strip_view = webui_tab_strip_;
   }
 #endif  // BUILDFLAG(ENABLE_WEBUI_TAB_STRIP)
@@ -2546,22 +2567,9 @@
   if (!toolbar_button_provider_)
     SetToolbarButtonProvider(toolbar_);
 
-  contents_web_view_ = new ContentsWebView(browser_->profile());
-  contents_web_view_->SetID(VIEW_ID_TAB_CONTAINER);
-  contents_web_view_->SetEmbedFullscreenWidgetMode(true);
-
   web_contents_close_handler_.reset(
       new WebContentsCloseHandler(contents_web_view_));
 
-  devtools_web_view_ = new views::WebView(browser_->profile());
-  devtools_web_view_->SetID(VIEW_ID_DEV_TOOLS_DOCKED);
-  devtools_web_view_->SetVisible(false);
-
-  contents_container_ = new views::View();
-  contents_container_->AddChildView(devtools_web_view_);
-  contents_container_->AddChildView(contents_web_view_);
-  contents_container_->SetLayoutManager(std::make_unique<ContentsLayoutManager>(
-      devtools_web_view_, contents_web_view_));
   AddChildView(contents_container_);
   set_contents_view(contents_container_);
 
diff --git a/chrome/browser/ui/views/frame/webui_tab_strip_container_view.cc b/chrome/browser/ui/views/frame/webui_tab_strip_container_view.cc
index 26b2bb7..c8827b87 100644
--- a/chrome/browser/ui/views/frame/webui_tab_strip_container_view.cc
+++ b/chrome/browser/ui/views/frame/webui_tab_strip_container_view.cc
@@ -16,8 +16,10 @@
 #include "chrome/browser/ui/browser_commands.h"
 #include "chrome/browser/ui/layout_constants.h"
 #include "chrome/browser/ui/view_ids.h"
+#include "chrome/browser/ui/views/frame/browser_view.h"
 #include "chrome/browser/ui/views/toolbar/toolbar_button.h"
 #include "chrome/browser/ui/webui/tab_strip/tab_strip_ui.h"
+#include "chrome/browser/ui/webui/tab_strip/tab_strip_ui_layout.h"
 #include "chrome/common/webui_url_constants.h"
 #include "chrome/grit/generated_resources.h"
 #include "ui/base/l10n/l10n_util.h"
@@ -30,10 +32,13 @@
 #include "ui/views/layout/flex_layout.h"
 #include "ui/views/view_class_properties.h"
 
-WebUITabStripContainerView::WebUITabStripContainerView(Browser* browser)
+WebUITabStripContainerView::WebUITabStripContainerView(
+    Browser* browser,
+    views::View* tab_contents_container)
     : browser_(browser),
       web_view_(
-          AddChildView(std::make_unique<views::WebView>(browser->profile()))) {
+          AddChildView(std::make_unique<views::WebView>(browser->profile()))),
+      tab_contents_container_(tab_contents_container) {
   SetVisible(false);
   // TODO(crbug.com/1010589) WebContents are initially assumed to be visible by
   // default unless explicitly hidden. The WebContents need to be set to hidden
@@ -49,7 +54,13 @@
   task_manager::WebContentsTags::CreateForTabContents(
       web_view_->web_contents());
 
-  TabStripUI* tab_strip_ui = static_cast<TabStripUI*>(
+  DCHECK(tab_contents_container);
+  view_observer_.Add(tab_contents_container_);
+  desired_height_ = TabStripUILayout::CalculateForWebViewportSize(
+                        tab_contents_container_->size())
+                        .CalculateContainerHeight();
+
+  TabStripUI* const tab_strip_ui = static_cast<TabStripUI*>(
       web_view_->GetWebContents()->GetWebUI()->GetController());
   tab_strip_ui->Initialize(browser_, this);
 }
@@ -100,9 +111,13 @@
       views::MenuAnchorPosition::kTopLeft, ui::MENU_SOURCE_MOUSE);
 }
 
+TabStripUILayout WebUITabStripContainerView::GetLayout() {
+  return TabStripUILayout::CalculateForWebViewportSize(
+      tab_contents_container_->size());
+}
+
 int WebUITabStripContainerView::GetHeightForWidth(int w) const {
-  constexpr int kWebUITabStripHeightDp = 248;
-  return kWebUITabStripHeightDp;
+  return desired_height_;
 }
 
 void WebUITabStripContainerView::ButtonPressed(views::Button* sender,
@@ -117,3 +132,15 @@
     NOTREACHED();
   }
 }
+
+void WebUITabStripContainerView::OnViewBoundsChanged(View* observed_view) {
+  DCHECK_EQ(tab_contents_container_, observed_view);
+  desired_height_ =
+      TabStripUILayout::CalculateForWebViewportSize(observed_view->size())
+          .CalculateContainerHeight();
+  InvalidateLayout();
+
+  TabStripUI* const tab_strip_ui = static_cast<TabStripUI*>(
+      web_view_->GetWebContents()->GetWebUI()->GetController());
+  tab_strip_ui->LayoutChanged();
+}
diff --git a/chrome/browser/ui/views/frame/webui_tab_strip_container_view.h b/chrome/browser/ui/views/frame/webui_tab_strip_container_view.h
index 6c4b6b6..6f82fe3 100644
--- a/chrome/browser/ui/views/frame/webui_tab_strip_container_view.h
+++ b/chrome/browser/ui/views/frame/webui_tab_strip_container_view.h
@@ -7,6 +7,7 @@
 
 #include <memory>
 
+#include "base/scoped_observer.h"
 #include "chrome/browser/ui/views/toolbar/toolbar_button.h"
 #include "chrome/browser/ui/webui/tab_strip/tab_strip_ui.h"
 #include "chrome/common/buildflags.h"
@@ -30,9 +31,11 @@
 
 class WebUITabStripContainerView : public TabStripUI::Embedder,
                                    public views::View,
-                                   public views::ButtonListener {
+                                   public views::ButtonListener,
+                                   public views::ViewObserver {
  public:
-  explicit WebUITabStripContainerView(Browser* browser);
+  WebUITabStripContainerView(Browser* browser,
+                             views::View* tab_contents_container);
   ~WebUITabStripContainerView() override;
 
   views::NativeViewHost* GetNativeViewHost();
@@ -47,6 +50,7 @@
   void ShowContextMenuAtPoint(
       gfx::Point point,
       std::unique_ptr<ui::MenuModel> menu_model) override;
+  TabStripUILayout GetLayout() override;
 
   // views::View:
   int GetHeightForWidth(int w) const override;
@@ -54,11 +58,19 @@
   // views::ButtonListener:
   void ButtonPressed(views::Button* sender, const ui::Event& event) override;
 
+  // views::ViewObserver:
+  void OnViewBoundsChanged(View* observed_view) override;
+
   Browser* const browser_;
   views::WebView* const web_view_;
+  views::View* const tab_contents_container_;
+
+  int desired_height_ = 0;
 
   std::unique_ptr<views::MenuRunner> context_menu_runner_;
   std::unique_ptr<ui::MenuModel> context_menu_model_;
+
+  ScopedObserver<views::View, views::ViewObserver> view_observer_{this};
 };
 
 #endif  // CHROME_BROWSER_UI_VIEWS_FRAME_WEBUI_TAB_STRIP_CONTAINER_VIEW_H_
diff --git a/chrome/browser/ui/views/profiles/profile_menu_view_base.cc b/chrome/browser/ui/views/profiles/profile_menu_view_base.cc
index 533ab80..a31d842 100644
--- a/chrome/browser/ui/views/profiles/profile_menu_view_base.cc
+++ b/chrome/browser/ui/views/profiles/profile_menu_view_base.cc
@@ -251,7 +251,7 @@
 void ProfileMenuViewBase::SetHeading(const base::string16& heading,
                                      const base::string16& tooltip_text,
                                      base::RepeatingClosure action) {
-  constexpr int kInsidePadding = 4;
+  constexpr int kInsidePadding = 8;
   const SkColor kBackgroundColor =
       ui::NativeTheme::GetInstanceForNativeUi()->GetSystemColor(
           ui::NativeTheme::kColorId_HighlightedMenuItemBackgroundColor);
@@ -260,16 +260,15 @@
   heading_container_->SetLayoutManager(std::make_unique<views::FillLayout>());
   heading_container_->SetBackground(
       views::CreateSolidBackground(kBackgroundColor));
-  heading_container_->SetBorder(
-      views::CreateEmptyBorder(gfx::Insets(kInsidePadding)));
 
-  views::Link* link =
-      heading_container_->AddChildView(std::make_unique<views::Link>(heading));
-  link->SetEnabledColor(views::style::GetColor(
+  views::LabelButton* button = heading_container_->AddChildView(
+      std::make_unique<HoverButton>(this, heading));
+  button->SetEnabledTextColors(views::style::GetColor(
       *this, views::style::CONTEXT_LABEL, views::style::STYLE_SECONDARY));
-  link->SetTooltipText(tooltip_text);
-  link->set_listener(this);
-  RegisterClickAction(link, std::move(action));
+  button->SetTooltipText(tooltip_text);
+  button->SetHorizontalAlignment(gfx::ALIGN_CENTER);
+  button->SetBorder(views::CreateEmptyBorder(gfx::Insets(kInsidePadding)));
+  RegisterClickAction(button, std::move(action));
 }
 
 void ProfileMenuViewBase::SetIdentityInfo(const gfx::ImageSkia& image,
@@ -304,8 +303,13 @@
   gfx::ImageSkia sized_badge =
       AddCircularBackground(SizeImage(badge, kBadgeSize), kBadgeBackgroundColor,
                             kBadgeSize + 2 * kBadgePadding);
-  gfx::ImageSkia badged_image =
-      gfx::ImageSkiaOperations::CreateIconWithBadge(sized_image, sized_badge);
+  gfx::ImageSkia sized_badge_with_shadow =
+      gfx::ImageSkiaOperations::CreateImageWithDropShadow(
+          sized_badge,
+          gfx::ShadowValue::MakeMdShadowValues(/*elevation=*/1, SK_ColorBLACK));
+
+  gfx::ImageSkia badged_image = gfx::ImageSkiaOperations::CreateIconWithBadge(
+      sized_image, sized_badge_with_shadow);
   image_view->SetImage(badged_image);
   image_view->SetBorder(views::CreateEmptyBorder(0, 0, kImageBottomMargin, 0));
 
@@ -433,6 +437,19 @@
 
 void ProfileMenuViewBase::SetProfileManagementHeading(
     const base::string16& heading) {
+  constexpr int kSeparatorMargins = 4;
+
+  // Add separator before heading.
+  profile_mgmt_separator_container_->RemoveAllChildViews(
+      /*delete_children=*/true);
+  profile_mgmt_separator_container_->SetLayoutManager(
+      std::make_unique<views::FillLayout>());
+  profile_mgmt_separator_container_->SetBorder(views::CreateEmptyBorder(
+      gfx::Insets(kSeparatorMargins, /*horizontal=*/0)));
+  profile_mgmt_separator_container_->AddChildView(
+      std::make_unique<views::Separator>());
+
+  // Initialize heading layout.
   profile_mgmt_heading_container_->RemoveAllChildViews(
       /*delete_children=*/true);
   profile_mgmt_heading_container_->SetLayoutManager(
@@ -440,6 +457,7 @@
   profile_mgmt_heading_container_->SetBorder(views::CreateEmptyBorder(
       gfx::Insets(kDefaultVerticalMargin, kMenuEdgeMargin)));
 
+  // Add heading.
   views::Label* label = profile_mgmt_heading_container_->AddChildView(
       std::make_unique<views::Label>(heading, views::style::CONTEXT_LABEL,
                                      STYLE_HINT));
@@ -625,20 +643,24 @@
       components->AddChildView(std::make_unique<views::View>());
   features_container_ =
       components->AddChildView(std::make_unique<views::View>());
-  // Second, add the profile management header.
-  components->AddChildView(new views::Separator());
-  auto profile_header = std::make_unique<views::View>();
-  views::BoxLayout* profile_header_layout = profile_header->SetLayoutManager(
-      CreateBoxLayout(views::BoxLayout::Orientation::kHorizontal,
-                      views::BoxLayout::CrossAxisAlignment::kCenter));
+  profile_mgmt_separator_container_ =
+      components->AddChildView(std::make_unique<views::View>());
+  // Second, add the profile management header. This includes the heading and
+  // the shortcut feature(s) next to it.
+  auto profile_mgmt_header = std::make_unique<views::View>();
+  views::BoxLayout* profile_mgmt_header_layout =
+      profile_mgmt_header->SetLayoutManager(
+          CreateBoxLayout(views::BoxLayout::Orientation::kHorizontal,
+                          views::BoxLayout::CrossAxisAlignment::kCenter));
   profile_mgmt_heading_container_ =
-      profile_header->AddChildView(std::make_unique<views::View>());
-  profile_header_layout->SetFlexForView(profile_mgmt_heading_container_, 1);
+      profile_mgmt_header->AddChildView(std::make_unique<views::View>());
+  profile_mgmt_header_layout->SetFlexForView(profile_mgmt_heading_container_,
+                                             1);
   profile_mgmt_shortcut_features_container_ =
-      profile_header->AddChildView(std::make_unique<views::View>());
-  profile_header_layout->SetFlexForView(
+      profile_mgmt_header->AddChildView(std::make_unique<views::View>());
+  profile_mgmt_header_layout->SetFlexForView(
       profile_mgmt_shortcut_features_container_, 0);
-  components->AddChildView(std::move(profile_header));
+  components->AddChildView(std::move(profile_mgmt_header));
   // Third, add the profile management buttons.
   selectable_profiles_container_ =
       components->AddChildView(std::make_unique<views::View>());
diff --git a/chrome/browser/ui/views/profiles/profile_menu_view_base.h b/chrome/browser/ui/views/profiles/profile_menu_view_base.h
index 5143a14..a327af8 100644
--- a/chrome/browser/ui/views/profiles/profile_menu_view_base.h
+++ b/chrome/browser/ui/views/profiles/profile_menu_view_base.h
@@ -263,6 +263,7 @@
   views::View* sync_info_container_ = nullptr;
   views::View* shortcut_features_container_ = nullptr;
   views::View* features_container_ = nullptr;
+  views::View* profile_mgmt_separator_container_ = nullptr;
   views::View* profile_mgmt_heading_container_ = nullptr;
   views::View* selectable_profiles_container_ = nullptr;
   views::View* profile_mgmt_shortcut_features_container_ = nullptr;
diff --git a/chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc b/chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc
index 3a8357c2..587294c2 100644
--- a/chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc
+++ b/chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc
@@ -16,7 +16,6 @@
 #include "chrome/browser/ui/webui/signin/sync_confirmation_ui.h"
 #include "chrome/common/url_constants.h"
 #include "components/constrained_window/constrained_window_views.h"
-#include "components/unified_consent/feature.h"
 #include "components/web_modal/web_contents_modal_dialog_host.h"
 #include "content/public/browser/render_widget_host_view.h"
 #include "content/public/browser/web_contents.h"
@@ -26,7 +25,7 @@
 namespace {
 
 const int kModalDialogWidth = 448;
-const int kModalDialogWidthForUnifiedConsent = 512;
+const int kSyncConfirmationDialogWidth = 512;
 const int kSyncConfirmationDialogHeight = 487;
 const int kSigninErrorDialogHeight = 164;
 
@@ -37,15 +36,6 @@
                                   : kSigninErrorDialogHeight;
 }
 
-int GetSyncConfirmationDialogPreferredWidth(Profile* profile) {
-  // If unified consent is enabled, we show a different sync confirmation dialog
-  // which uses a different width.
-  return unified_consent::IsUnifiedConsentFeatureEnabled() &&
-                 profile->IsSyncAllowed()
-             ? kModalDialogWidthForUnifiedConsent
-             : kModalDialogWidth;
-}
-
 }  // namespace
 
 SigninViewControllerDelegateViews::SigninViewControllerDelegateViews(
@@ -185,7 +175,7 @@
   return CreateDialogWebView(
       browser, chrome::kChromeUISyncConfirmationURL,
       GetSyncConfirmationDialogPreferredHeight(browser->profile()),
-      GetSyncConfirmationDialogPreferredWidth(browser->profile()));
+      kSyncConfirmationDialogWidth);
 }
 
 std::unique_ptr<views::WebView>
diff --git a/chrome/browser/ui/views/tabs/tab_group_editor_bubble_view.cc b/chrome/browser/ui/views/tabs/tab_group_editor_bubble_view.cc
index c57e29f5..7d7f4ec2 100644
--- a/chrome/browser/ui/views/tabs/tab_group_editor_bubble_view.cc
+++ b/chrome/browser/ui/views/tabs/tab_group_editor_bubble_view.cc
@@ -16,10 +16,9 @@
 #include "base/strings/string16.h"
 #include "base/strings/utf_string_conversions.h"
 #include "chrome/browser/ui/tabs/tab_group_visual_data.h"
+#include "chrome/browser/ui/views/bubble_menu_item_factory.h"
 #include "chrome/browser/ui/views/chrome_layout_provider.h"
 #include "chrome/browser/ui/views/chrome_typography.h"
-#include "chrome/browser/ui/views/hover_button.h"
-#include "chrome/browser/ui/views/hover_button_controller.h"
 #include "chrome/browser/ui/views/tabs/color_picker_view.h"
 #include "chrome/browser/ui/views/tabs/tab_controller.h"
 #include "chrome/browser/ui/views/toolbar/toolbar_ink_drop_util.h"
@@ -43,8 +42,6 @@
 constexpr int TAB_GROUP_HEADER_CXMENU_UNGROUP = 14;
 constexpr int TAB_GROUP_HEADER_CXMENU_CLOSE_GROUP = 15;
 
-constexpr gfx::Insets kDefaultBorderInsets = gfx::Insets(12);
-
 // Returns our hard-coded set of colors.
 const std::vector<std::pair<SkColor, base::string16>>& GetColorPickerList() {
   static const base::NoDestructor<
@@ -59,28 +56,6 @@
             {gfx::kGoogleCyan600, base::ASCIIToUTF16("Cyan")}});
   return *list;
 }
-
-std::unique_ptr<views::LabelButton> CreateMenuItem(
-    int button_id,
-    const base::string16& name,
-    views::ButtonListener* listener) {
-  auto button = std::make_unique<views::LabelButton>(
-      listener, name, views::style::CONTEXT_BUTTON);
-  button->SetID(button_id);
-  button->SetButtonController(std::make_unique<HoverButtonController>(
-      button.get(), listener,
-      std::make_unique<views::Button::DefaultButtonControllerDelegate>(
-          button.get())));
-
-  // Items within a menu should not show focus rings.
-  button->SetInstallFocusRingOnFocus(false);
-  button->SetFocusBehavior(views::View::FocusBehavior::ALWAYS);
-
-  button->SetBorder(views::CreateEmptyBorder(kDefaultBorderInsets));
-  button->SetInkDropMode(views::InkDropHostView::InkDropMode::ON);
-  button->set_ink_drop_base_color(HoverButton::GetInkDropColor(button.get()));
-  return button;
-}
 }  // namespace
 
 // static
@@ -147,7 +122,8 @@
   views::View* group_modifier_container =
       AddChildView(std::make_unique<views::View>());
   group_modifier_container->SetBorder(
-      views::CreateEmptyBorder(kDefaultBorderInsets));
+      views::CreateEmptyBorder(gfx::Insets(layout_provider->GetDistanceMetric(
+          views::DISTANCE_RELATED_CONTROL_VERTICAL))));
   group_modifier_container->SetLayoutManager(std::move(container_layout));
 
   // Add the text field for editing the title.
@@ -173,19 +149,19 @@
 
   AddChildView(std::make_unique<views::Separator>());
 
-  std::unique_ptr<views::LabelButton> new_tab_menu_item = CreateMenuItem(
+  std::unique_ptr<views::LabelButton> new_tab_menu_item = CreateBubbleMenuItem(
       TAB_GROUP_HEADER_CXMENU_NEW_TAB_IN_GROUP,
       l10n_util::GetStringUTF16(IDS_TAB_GROUP_HEADER_CXMENU_NEW_TAB_IN_GROUP),
       &menu_button_listener_);
   AddChildView(std::move(new_tab_menu_item));
 
-  std::unique_ptr<views::LabelButton> ungroup_menu_item = CreateMenuItem(
+  std::unique_ptr<views::LabelButton> ungroup_menu_item = CreateBubbleMenuItem(
       TAB_GROUP_HEADER_CXMENU_UNGROUP,
       l10n_util::GetStringUTF16(IDS_TAB_GROUP_HEADER_CXMENU_UNGROUP),
       &menu_button_listener_);
   AddChildView(std::move(ungroup_menu_item));
 
-  std::unique_ptr<views::LabelButton> close_menu_item = CreateMenuItem(
+  std::unique_ptr<views::LabelButton> close_menu_item = CreateBubbleMenuItem(
       TAB_GROUP_HEADER_CXMENU_CLOSE_GROUP,
       l10n_util::GetStringUTF16(IDS_TAB_GROUP_HEADER_CXMENU_CLOSE_GROUP),
       &menu_button_listener_);
diff --git a/chrome/browser/ui/web_applications/web_app_browsertest.cc b/chrome/browser/ui/web_applications/web_app_browsertest.cc
new file mode 100644
index 0000000..70027e71
--- /dev/null
+++ b/chrome/browser/ui/web_applications/web_app_browsertest.cc
@@ -0,0 +1,66 @@
+// Copyright 2019 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.
+
+#include "chrome/browser/ui/browser.h"
+#include "chrome/browser/ui/web_applications/app_browser_controller.h"
+#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h"
+#include "chrome/browser/web_applications/components/web_app_helpers.h"
+#include "chrome/common/web_application_info.h"
+#include "third_party/skia/include/core/SkColor.h"
+
+namespace {
+
+constexpr const char kExampleURL[] = "http://example.org/";
+
+}  // namespace
+
+namespace web_app {
+
+class WebAppBrowserTest : public WebAppControllerBrowserTest {};
+
+IN_PROC_BROWSER_TEST_P(WebAppBrowserTest, CreatedForInstalledPwaForPwa) {
+  auto web_app_info = std::make_unique<WebApplicationInfo>();
+  web_app_info->app_url = GURL(kExampleURL);
+  web_app_info->scope = GURL(kExampleURL);
+  AppId app_id = InstallWebApp(std::move(web_app_info));
+  Browser* app_browser = LaunchWebAppBrowser(app_id);
+
+  EXPECT_TRUE(app_browser->app_controller()->CreatedForInstalledPwa());
+}
+
+IN_PROC_BROWSER_TEST_P(WebAppBrowserTest, ThemeColor) {
+  {
+    const SkColor theme_color = SkColorSetA(SK_ColorBLUE, 0xF0);
+    auto web_app_info = std::make_unique<WebApplicationInfo>();
+    web_app_info->app_url = GURL(kExampleURL);
+    web_app_info->scope = GURL(kExampleURL);
+    web_app_info->theme_color = theme_color;
+    AppId app_id = InstallWebApp(std::move(web_app_info));
+    Browser* app_browser = LaunchWebAppBrowser(app_id);
+
+    EXPECT_EQ(GetAppIdFromApplicationName(app_browser->app_name()), app_id);
+    EXPECT_EQ(SkColorSetA(theme_color, SK_AlphaOPAQUE),
+              app_browser->app_controller()->GetThemeColor());
+  }
+  {
+    auto web_app_info = std::make_unique<WebApplicationInfo>();
+    web_app_info->app_url = GURL("http://example.org/2");
+    web_app_info->scope = GURL("http://example.org/");
+    web_app_info->theme_color = base::Optional<SkColor>();
+    AppId app_id = InstallWebApp(std::move(web_app_info));
+    Browser* app_browser = LaunchWebAppBrowser(app_id);
+
+    EXPECT_EQ(GetAppIdFromApplicationName(app_browser->app_name()), app_id);
+    EXPECT_EQ(base::nullopt, app_browser->app_controller()->GetThemeColor());
+  }
+}
+
+INSTANTIATE_TEST_SUITE_P(
+    /* no prefix */,
+    WebAppBrowserTest,
+    ::testing::Values(ControllerType::kHostedAppController,
+                      ControllerType::kUnifiedControllerWithBookmarkApp,
+                      ControllerType::kUnifiedControllerWithWebApp));
+
+}  // namespace web_app
diff --git a/chrome/browser/ui/webui/chromeos/cellular_setup/cellular_setup_dialog.cc b/chrome/browser/ui/webui/chromeos/cellular_setup/cellular_setup_dialog.cc
index 60d1b64..0468a85 100644
--- a/chrome/browser/ui/webui/chromeos/cellular_setup/cellular_setup_dialog.cc
+++ b/chrome/browser/ui/webui/chromeos/cellular_setup/cellular_setup_dialog.cc
@@ -39,7 +39,7 @@
   ~CellularSetupServiceHolder() override = default;
 
   void BindReceiver(mojo::PendingReceiver<mojom::CellularSetup> receiver) {
-    service_.BindRequest(std::move(receiver));
+    service_.BindReceiver(std::move(receiver));
   }
 
  private:
@@ -132,9 +132,9 @@
 CellularSetupDialogUI::~CellularSetupDialogUI() = default;
 
 void CellularSetupDialogUI::BindCellularSetup(
-    mojom::CellularSetupRequest request) {
+    mojo::PendingReceiver<mojom::CellularSetup> receiver) {
   GetOrCreateServiceHolder(web_ui()->GetWebContents()->GetBrowserContext())
-      ->BindReceiver(std::move(request));
+      ->BindReceiver(std::move(receiver));
 }
 
 }  // namespace cellular_setup
diff --git a/chrome/browser/ui/webui/chromeos/cellular_setup/cellular_setup_dialog.h b/chrome/browser/ui/webui/chromeos/cellular_setup/cellular_setup_dialog.h
index 8f79e4d..53b9ebf 100644
--- a/chrome/browser/ui/webui/chromeos/cellular_setup/cellular_setup_dialog.h
+++ b/chrome/browser/ui/webui/chromeos/cellular_setup/cellular_setup_dialog.h
@@ -8,6 +8,7 @@
 #include "base/macros.h"
 #include "chrome/browser/ui/webui/chromeos/system_web_dialog_delegate.h"
 #include "chromeos/services/cellular_setup/public/mojom/cellular_setup.mojom.h"
+#include "mojo/public/cpp/bindings/pending_receiver.h"
 #include "ui/web_dialogs/web_dialog_ui.h"
 
 namespace chromeos {
@@ -40,7 +41,7 @@
   ~CellularSetupDialogUI() override;
 
  private:
-  void BindCellularSetup(mojom::CellularSetupRequest request);
+  void BindCellularSetup(mojo::PendingReceiver<mojom::CellularSetup> receiver);
 
   DISALLOW_COPY_AND_ASSIGN(CellularSetupDialogUI);
 };
diff --git a/chrome/browser/ui/webui/cookies_tree_model_util.cc b/chrome/browser/ui/webui/cookies_tree_model_util.cc
index 1e98254..0873e01 100644
--- a/chrome/browser/ui/webui/cookies_tree_model_util.cc
+++ b/chrome/browser/ui/webui/cookies_tree_model_util.cc
@@ -24,7 +24,7 @@
 #include "content/public/browser/storage_usage_info.h"
 #include "extensions/buildflags/buildflags.h"
 #include "net/cookies/canonical_cookie.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 #include "ui/base/l10n/l10n_util.h"
 #include "ui/base/text/bytes_formatting.h"
 
diff --git a/chrome/browser/ui/webui/settings/chromeos/os_settings_ui.cc b/chrome/browser/ui/webui/settings/chromeos/os_settings_ui.cc
index ca0d04c..d955fcf 100644
--- a/chrome/browser/ui/webui/settings/chromeos/os_settings_ui.cc
+++ b/chrome/browser/ui/webui/settings/chromeos/os_settings_ui.cc
@@ -49,7 +49,6 @@
 #include "chrome/grit/os_settings_resources_map.h"
 #include "chromeos/services/network_config/public/mojom/cros_network_config.mojom.h"
 #include "components/password_manager/core/common/password_manager_features.h"
-#include "components/unified_consent/feature.h"
 #include "content/public/browser/web_ui_data_source.h"
 #include "mojo/public/cpp/bindings/pending_receiver.h"
 
@@ -103,8 +102,8 @@
   AddSettingsPageUIHandler(
       std::make_unique<chromeos::settings::WallpaperHandler>(web_ui));
 
-  html_source->AddBoolean("unifiedConsentEnabled",
-                          unified_consent::IsUnifiedConsentFeatureEnabled());
+  // TODO(msarda): Remove |unifiedConsentEnabled| from all settings resources.
+  html_source->AddBoolean("unifiedConsentEnabled", true);
 
   html_source->AddBoolean("showAppManagement", base::FeatureList::IsEnabled(
                                                    features::kAppManagement));
diff --git a/chrome/browser/ui/webui/settings/people_handler.cc b/chrome/browser/ui/webui/settings/people_handler.cc
index 3ec355f..419aa946 100644
--- a/chrome/browser/ui/webui/settings/people_handler.cc
+++ b/chrome/browser/ui/webui/settings/people_handler.cc
@@ -46,7 +46,6 @@
 #include "components/sync/base/user_selectable_type.h"
 #include "components/sync/driver/sync_service_utils.h"
 #include "components/sync/driver/sync_user_settings.h"
-#include "components/unified_consent/feature.h"
 #include "components/unified_consent/unified_consent_metrics.h"
 #include "content/public/browser/render_view_host.h"
 #include "content/public/browser/web_contents.h"
@@ -532,10 +531,6 @@
   const bool dice_enabled =
       AccountConsistencyModeManager::IsDiceEnabledForProfile(profile_);
 
-  // Dice and unified consent both disabled: do not show the list of accounts.
-  if (!dice_enabled && !unified_consent::IsUnifiedConsentFeatureEnabled())
-    return accounts;
-
   base::Value::ListStorage& accounts_list = accounts.GetList();
   if (dice_enabled) {
     // If dice is enabled, show all the accounts.
@@ -667,98 +662,26 @@
 
   syncer::SyncService* service = GetSyncService();
 
-  if (unified_consent::IsUnifiedConsentFeatureEnabled()) {
-    if (service && !sync_blocker_)
-      sync_blocker_ = service->GetSetupInProgressHandle();
-
-    // Mark Sync as requested by the user. It might already be requested, but
-    // it's not if this is either the first time the user is setting up Sync, or
-    // Sync was set up but then was reset via the dashboard. This also pokes the
-    // SyncService to start up immediately, i.e. bypass deferred startup.
-    if (service)
-      service->GetUserSettings()->SetSyncRequested(true);
-
-    GetLoginUIService()->SetLoginUI(this);
-
-    // Observe the web contents for a before unload event.
-    Observe(web_ui()->GetWebContents());
-
-    PushSyncPrefs();
-
-    // Focus the web contents in case the location bar was focused before. This
-    // makes sure that page elements for resolving sync errors can be focused.
-    web_ui()->GetWebContents()->Focus();
-
-    // Always let the page open when unified consent is enabled.
-    return;
-  }
-
-  if (!service) {
-    CloseUI();
-    return;
-  }
-
-  // This if-statement is not using IsProfileAuthNeededOrHasErrors(), because
-  // in some error cases (e.g. "confirmSyncSettings") the UI still needs to
-  // show.
-  if (!IdentityManagerFactory::GetForProfile(profile_)->HasPrimaryAccount()) {
-    // For web-based signin, the signin page is not displayed in an overlay
-    // on the settings page. So if we get here, it must be due to the user
-    // cancelling signin (by reloading the sync settings page during initial
-    // signin) or by directly navigating to settings/syncSetup
-    // (http://crbug.com/229836). So just exit and go back to the settings page.
-    DLOG(WARNING) << "Cannot display sync setup UI when not signed in";
-    CloseUI();
-    return;
-  }
-
-  // Notify services that login UI is now active.
-  GetLoginUIService()->SetLoginUI(this);
-
-  if (!sync_blocker_)
+  if (service && !sync_blocker_)
     sync_blocker_ = service->GetSetupInProgressHandle();
 
-  // Early exit if there is already a preferences push pending sync startup.
-  if (sync_startup_tracker_)
-    return;
-
-  if (!service->IsEngineInitialized() ||
-      !service->GetUserSettings()->IsSyncRequested()) {
-    // SetSyncRequested(true) does two things:
-    // 1) As the name says, it marks Sync as requested by the user (it might not
-    //    be requested yet because either this is the first time they're setting
-    //    it up, or Sync was reset via the dashboard).
-    // 2) Pokes the sync service to start *immediately*, i.e. bypass deferred
-    //    startup.
-    // It's possible that both of these are already the case, i.e. the engine is
-    // already in the process of initializing, in which case
-    // SetSyncRequested(true) will effectively do nothing. It's also possible
-    // that the sync service is already running in standalone transport mode and
-    // so the engine is already initialized. In that case, this will trigger the
-    // service to switch to full Sync-the-feature mode.
+  // Mark Sync as requested by the user. It might already be requested, but
+  // it's not if this is either the first time the user is setting up Sync, or
+  // Sync was set up but then was reset via the dashboard. This also pokes the
+  // SyncService to start up immediately, i.e. bypass deferred startup.
+  if (service)
     service->GetUserSettings()->SetSyncRequested(true);
 
-    // See if it's even possible to bring up the sync engine - if not
-    // (unrecoverable error?), don't bother displaying a spinner that will be
-    // immediately closed because this leads to some ugly infinite UI loop (see
-    // http://crbug.com/244769).
-    if (SyncStartupTracker::GetSyncServiceState(service) !=
-        SyncStartupTracker::SYNC_STARTUP_ERROR) {
-      DisplaySpinner();
-    }
+  GetLoginUIService()->SetLoginUI(this);
 
-    // Finally, wait for the Sync engine to get initialized. Note that if it is
-    // already initialized (probably because Sync-the-transport was already
-    // running), then this will call us back immediately.
-    sync_startup_tracker_ = std::make_unique<SyncStartupTracker>(service, this);
+  // Observe the web contents for a before unload event.
+  Observe(web_ui()->GetWebContents());
 
-    return;
-  }
-
-  // User is already logged in. They must have brought up the config wizard
-  // via the "Advanced..." button or through One-Click signin (cases 4-6), or
-  // they are re-enabling sync after having disabled it (case 7).
   PushSyncPrefs();
+
+  // Focus the web contents in case the location bar was focused before. This
+  // makes sure that page elements for resolving sync errors can be focused.
+  web_ui()->GetWebContents()->Focus();
 }
 
 #if defined(OS_CHROMEOS)
diff --git a/chrome/browser/ui/webui/settings/people_handler_unittest.cc b/chrome/browser/ui/webui/settings/people_handler_unittest.cc
index 833ac7b..bd1be0c0 100644
--- a/chrome/browser/ui/webui/settings/people_handler_unittest.cc
+++ b/chrome/browser/ui/webui/settings/people_handler_unittest.cc
@@ -42,7 +42,6 @@
 #include "components/sync/driver/mock_sync_service.h"
 #include "components/sync/driver/sync_user_settings_impl.h"
 #include "components/sync/driver/sync_user_settings_mock.h"
-#include "components/unified_consent/scoped_unified_consent.h"
 #include "content/public/browser/web_contents.h"
 #include "content/public/browser/web_ui.h"
 #include "content/public/browser/web_ui_controller.h"
@@ -216,10 +215,7 @@
 
 class PeopleHandlerTest : public ChromeRenderViewHostTestHarness {
  public:
-  PeopleHandlerTest(
-      unified_consent::UnifiedConsentFeatureState unified_consent_state =
-          unified_consent::UnifiedConsentFeatureState::kEnabled)
-      : scoped_unified_consent_(unified_consent_state) {}
+  PeopleHandlerTest() {}
 
   void SetUp() override {
     ChromeRenderViewHostTestHarness::SetUp();
@@ -370,8 +366,6 @@
 
   MOCK_METHOD0(OnSetupInProgressHandleDestroyed, void());
 
-  unified_consent::ScopedUnifiedConsent scoped_unified_consent_;
-
   syncer::MockSyncService* mock_sync_service_;
   std::unique_ptr<IdentityTestEnvironmentProfileAdaptor>
       identity_test_env_adaptor_;
@@ -387,15 +381,6 @@
   std::string GetTestUser() override { return std::string(); }
 };
 
-class PeopleHandlerTest_UnifiedConsentDisabled : public PeopleHandlerTest {
- public:
-  PeopleHandlerTest_UnifiedConsentDisabled()
-      : PeopleHandlerTest(
-            unified_consent::UnifiedConsentFeatureState::kDisabled) {}
-
-  DISALLOW_COPY_AND_ASSIGN(PeopleHandlerTest_UnifiedConsentDisabled);
-};
-
 #if !defined(OS_CHROMEOS)
 TEST_F(PeopleHandlerFirstSigninTest, DisplayBasicLogin) {
   // Test that the HandleStartSignin call enables JavaScript.
@@ -423,39 +408,8 @@
       LoginUIServiceFactory::GetForProfile(profile())->current_login_ui());
 }
 
-TEST_F(PeopleHandlerTest_UnifiedConsentDisabled,
-       DontShowSyncSetupWhenNotSignedIn) {
-  ON_CALL(*mock_sync_service_, GetDisableReasons())
-      .WillByDefault(Return(syncer::SyncService::DISABLE_REASON_NOT_SIGNED_IN));
-  ON_CALL(*mock_sync_service_->GetMockUserSettings(), IsFirstSetupComplete())
-      .WillByDefault(Return(false));
-  handler_->HandleShowSetupUI(nullptr);
-
-  ExpectPageStatusChanged(PeopleHandler::kDonePageStatus);
-
-  ASSERT_FALSE(handler_->is_configuring_sync());
-  EXPECT_EQ(
-      NULL,
-      LoginUIServiceFactory::GetForProfile(profile())->current_login_ui());
-}
 #endif  // !defined(OS_CHROMEOS)
 
-// Verifies that the sync setup is terminated correctly when the
-// sync is disabled.
-TEST_F(PeopleHandlerTest_UnifiedConsentDisabled,
-       HandleSetupUIWhenSyncDisabled) {
-  ON_CALL(*mock_sync_service_, GetDisableReasons())
-      .WillByDefault(
-          Return(syncer::SyncService::DISABLE_REASON_ENTERPRISE_POLICY));
-  handler_->HandleShowSetupUI(nullptr);
-
-  // Sync setup is closed when sync is disabled.
-  EXPECT_EQ(
-      NULL,
-      LoginUIServiceFactory::GetForProfile(profile())->current_login_ui());
-  ASSERT_FALSE(handler_->is_configuring_sync());
-}
-
 TEST_F(PeopleHandlerTest, DisplayConfigureWithEngineDisabledAndCancel) {
   ON_CALL(*mock_sync_service_, GetDisableReasons())
       .WillByDefault(Return(syncer::SyncService::DISABLE_REASON_NONE));
@@ -487,35 +441,6 @@
       LoginUIServiceFactory::GetForProfile(profile())->current_login_ui());
 }
 
-// Verifies that the handler correctly handles a cancellation when
-// it is displaying the spinner to the user.
-TEST_F(PeopleHandlerTest_UnifiedConsentDisabled,
-       DisplayConfigureWithEngineDisabledAndCancel) {
-  ON_CALL(*mock_sync_service_, GetDisableReasons())
-      .WillByDefault(Return(syncer::SyncService::DISABLE_REASON_NONE));
-  ON_CALL(*mock_sync_service_->GetMockUserSettings(), IsSyncRequested())
-      .WillByDefault(Return(true));
-  ON_CALL(*mock_sync_service_->GetMockUserSettings(), IsFirstSetupComplete())
-      .WillByDefault(Return(false));
-  ON_CALL(*mock_sync_service_, GetTransportState())
-      .WillByDefault(Return(syncer::SyncService::TransportState::INITIALIZING));
-  EXPECT_CALL(*mock_sync_service_->GetMockUserSettings(),
-              SetSyncRequested(true));
-
-  // We're simulating a user setting up sync, which would cause the engine to
-  // kick off initialization, but not download user data types. The sync
-  // engine will try to download control data types (e.g encryption info), but
-  // that won't finish for this test as we're simulating cancelling while the
-  // spinner is showing.
-  handler_->HandleShowSetupUI(nullptr);
-
-  EXPECT_EQ(
-      handler_.get(),
-      LoginUIServiceFactory::GetForProfile(profile())->current_login_ui());
-
-  ExpectSpinnerAndClose();
-}
-
 // Verifies that the handler only sends the sync pref updates once the engine is
 // initialized.
 TEST_F(PeopleHandlerTest,
@@ -556,45 +481,6 @@
   CheckBool(dictionary, "passphraseRequired", false);
 }
 
-// Verifies that the handler correctly transitions from showing the spinner
-// to showing a configuration page when sync setup completes successfully.
-TEST_F(PeopleHandlerTest_UnifiedConsentDisabled,
-       DisplayConfigureWithEngineDisabledAndSyncStartupCompleted) {
-  ON_CALL(*mock_sync_service_->GetMockUserSettings(), IsFirstSetupComplete())
-      .WillByDefault(Return(false));
-  ON_CALL(*mock_sync_service_, GetDisableReasons())
-      .WillByDefault(Return(syncer::SyncService::DISABLE_REASON_NONE));
-  ON_CALL(*mock_sync_service_->GetMockUserSettings(), IsSyncRequested())
-      .WillByDefault(Return(true));
-  // Sync engine is stopped initially, and will start up.
-  ON_CALL(*mock_sync_service_, GetTransportState())
-      .WillByDefault(
-          Return(syncer::SyncService::TransportState::START_DEFERRED));
-  EXPECT_CALL(*mock_sync_service_->GetMockUserSettings(),
-              SetSyncRequested(true));
-  SetDefaultExpectationsForConfigPage();
-
-  handler_->HandleShowSetupUI(nullptr);
-
-  EXPECT_EQ(1U, web_ui_.call_data().size());
-  ExpectPageStatusChanged(PeopleHandler::kSpinnerPageStatus);
-
-  Mock::VerifyAndClearExpectations(mock_sync_service_);
-  // Now, act as if the SyncService has started up.
-  SetDefaultExpectationsForConfigPage();
-  ON_CALL(*mock_sync_service_, GetTransportState())
-      .WillByDefault(Return(syncer::SyncService::TransportState::ACTIVE));
-  handler_->SyncStartupCompleted();
-
-  EXPECT_EQ(2U, web_ui_.call_data().size());
-
-  const base::DictionaryValue* dictionary = ExpectSyncPrefsChanged();
-  CheckBool(dictionary, "syncAllDataTypes", true);
-  CheckBool(dictionary, "encryptAllDataAllowed", true);
-  CheckBool(dictionary, "encryptAllData", false);
-  CheckBool(dictionary, "passphraseRequired", false);
-}
-
 // Verifies the case where the user cancels after the sync engine has
 // initialized.
 TEST_F(PeopleHandlerTest,
@@ -628,33 +514,6 @@
       LoginUIServiceFactory::GetForProfile(profile())->current_login_ui());
 }
 
-TEST_F(PeopleHandlerTest_UnifiedConsentDisabled,
-       DisplayConfigureWithEngineDisabledAndSigninFailed) {
-  ON_CALL(*mock_sync_service_, GetDisableReasons())
-      .WillByDefault(Return(syncer::SyncService::DISABLE_REASON_NONE));
-  ON_CALL(*mock_sync_service_->GetMockUserSettings(), IsSyncRequested())
-      .WillByDefault(Return(true));
-  ON_CALL(*mock_sync_service_->GetMockUserSettings(), IsFirstSetupComplete())
-      .WillByDefault(Return(false));
-  ON_CALL(*mock_sync_service_, GetTransportState())
-      .WillByDefault(Return(syncer::SyncService::TransportState::INITIALIZING));
-  EXPECT_CALL(*mock_sync_service_->GetMockUserSettings(),
-              SetSyncRequested(true));
-
-  handler_->HandleShowSetupUI(nullptr);
-  ExpectPageStatusChanged(PeopleHandler::kSpinnerPageStatus);
-  Mock::VerifyAndClearExpectations(mock_sync_service_);
-  ON_CALL(*mock_sync_service_, GetAuthError())
-      .WillByDefault(Return(GoogleServiceAuthError(
-          GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS)));
-  NotifySyncListeners();
-
-  // On failure, the dialog will be closed.
-  EXPECT_EQ(
-      NULL,
-      LoginUIServiceFactory::GetForProfile(profile())->current_login_ui());
-}
-
 TEST_F(PeopleHandlerTest, RestartSyncAfterDashboardClear) {
   // Clearing sync from the dashboard results in DISABLE_REASON_USER_CHOICE
   // being set.
@@ -684,35 +543,6 @@
   EXPECT_EQ(0U, web_ui_.call_data().size());
 }
 
-TEST_F(PeopleHandlerTest_UnifiedConsentDisabled,
-       RestartSyncAfterDashboardClear) {
-  // Clearing sync from the dashboard results in DISABLE_REASON_USER_CHOICE
-  // being set.
-  ON_CALL(*mock_sync_service_, GetDisableReasons())
-      .WillByDefault(Return(syncer::SyncService::DISABLE_REASON_USER_CHOICE));
-  ON_CALL(*mock_sync_service_, GetTransportState())
-      .WillByDefault(Return(syncer::SyncService::TransportState::DISABLED));
-
-  // Attempting to open the setup UI should restart sync.
-  EXPECT_CALL(*mock_sync_service_->GetMockUserSettings(),
-              SetSyncRequested(true))
-      .WillOnce([&](bool) {
-        // SetSyncRequested(true) clears DISABLE_REASON_USER_CHOICE, and
-        // immediately starts initializing the engine.
-        ON_CALL(*mock_sync_service_, GetDisableReasons())
-            .WillByDefault(Return(syncer::SyncService::DISABLE_REASON_NONE));
-        ON_CALL(*mock_sync_service_->GetMockUserSettings(), IsSyncRequested())
-            .WillByDefault(Return(true));
-        ON_CALL(*mock_sync_service_, GetTransportState())
-            .WillByDefault(
-                Return(syncer::SyncService::TransportState::INITIALIZING));
-      });
-
-  handler_->HandleShowSetupUI(nullptr);
-  // Since the engine is not initialized yet, we should get a spinner.
-  ExpectPageStatusChanged(PeopleHandler::kSpinnerPageStatus);
-}
-
 TEST_F(PeopleHandlerTest,
        RestartSyncAfterDashboardClearWithStandaloneTransport) {
   // Clearing sync from the dashboard results in DISABLE_REASON_USER_CHOICE
@@ -1028,68 +858,6 @@
   ExpectSyncPrefsChanged();
 }
 
-// We do not display signin on chromeos in the case of auth error.
-TEST_F(PeopleHandlerTest_UnifiedConsentDisabled, ShowSigninOnAuthError) {
-  // Initialize the system to a signed in state, but with an auth error.
-  ON_CALL(*mock_sync_service_, GetAuthError())
-      .WillByDefault(Return(GoogleServiceAuthError(
-          GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS)));
-
-  SetupInitializedSyncService();
-
-  auto* identity_manager = identity_test_env()->identity_manager();
-  CoreAccountInfo primary_account_info =
-      identity_manager->GetPrimaryAccountInfo();
-  DCHECK_EQ(primary_account_info.email, kTestUser);
-
-  auto* accounts_mutator = identity_manager->GetAccountsMutator();
-  DCHECK(accounts_mutator);
-
-  accounts_mutator->AddOrUpdateAccount(
-      primary_account_info.gaia, primary_account_info.email, "refresh_token",
-      primary_account_info.is_under_advanced_protection,
-      signin_metrics::SourceForRefreshTokenOperation::kUnknown);
-
-  signin::UpdatePersistentErrorOfRefreshTokenForAccount(
-      identity_manager, primary_account_info.account_id,
-      GoogleServiceAuthError(GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS));
-
-  ON_CALL(*mock_sync_service_, GetDisableReasons())
-      .WillByDefault(Return(syncer::SyncService::DISABLE_REASON_NONE));
-  ON_CALL(*mock_sync_service_->GetMockUserSettings(), IsSyncRequested())
-      .WillByDefault(Return(true));
-  ON_CALL(*mock_sync_service_->GetMockUserSettings(), IsPassphraseRequired())
-      .WillByDefault(Return(false));
-  ON_CALL(*mock_sync_service_->GetMockUserSettings(),
-          IsUsingSecondaryPassphrase())
-      .WillByDefault(Return(false));
-  ON_CALL(*mock_sync_service_, GetTransportState())
-      .WillByDefault(Return(syncer::SyncService::TransportState::INITIALIZING));
-
-#if defined(OS_CHROMEOS)
-  // On ChromeOS, auth errors are ignored - instead we just try to start the
-  // sync engine (which will fail due to the auth error). This should only
-  // happen if the user manually navigates to chrome://settings/syncSetup -
-  // clicking on the button in the UI will sign the user out rather than
-  // displaying a spinner. Should be no visible UI on ChromeOS in this case.
-  EXPECT_EQ(
-      NULL,
-      LoginUIServiceFactory::GetForProfile(profile())->current_login_ui());
-#else
-
-  // On ChromeOS, this should display the spinner while we try to startup the
-  // sync engine, and on desktop this displays the login dialog.
-  handler_->HandleShowSetupUI(nullptr);
-
-  // Sync setup is closed when re-auth is in progress.
-  EXPECT_EQ(
-      NULL,
-      LoginUIServiceFactory::GetForProfile(profile())->current_login_ui());
-
-  ASSERT_FALSE(handler_->is_configuring_sync());
-#endif
-}
-
 TEST_F(PeopleHandlerTest, ShowSetupSyncEverything) {
   ON_CALL(*mock_sync_service_->GetMockUserSettings(), IsPassphraseRequired())
       .WillByDefault(Return(false));
@@ -1393,7 +1161,7 @@
 
 #if BUILDFLAG(ENABLE_DICE_SUPPORT)
 class PeopleHandlerDiceUnifiedConsentTest
-    : public ::testing::TestWithParam<std::tuple<bool, bool>> {};
+    : public ::testing::TestWithParam<bool> {};
 
 TEST_P(PeopleHandlerDiceUnifiedConsentTest, StoredAccountsList) {
   ScopedTestingLocalState local_state(TestingBrowserProcess::GetGlobal());
@@ -1409,13 +1177,7 @@
   content::BrowserTaskEnvironment task_environment;
 
   // Decode test parameters.
-  bool dice_enabled;
-  bool unified_consent_enabled;
-  std::tie(dice_enabled, unified_consent_enabled) = GetParam();
-  unified_consent::ScopedUnifiedConsent unified_consent(
-      unified_consent_enabled
-          ? unified_consent::UnifiedConsentFeatureState::kEnabled
-          : unified_consent::UnifiedConsentFeatureState::kDisabled);
+  bool dice_enabled = GetParam();
   ScopedAccountConsistency dice(
       dice_enabled ? signin::AccountConsistencyMethod::kDice
                    : signin::AccountConsistencyMethod::kDiceMigration);
@@ -1448,19 +1210,16 @@
     ASSERT_TRUE(accounts_list[1].FindKey("email"));
     EXPECT_EQ("a@gmail.com", accounts_list[0].FindKey("email")->GetString());
     EXPECT_EQ("b@gmail.com", accounts_list[1].FindKey("email")->GetString());
-  } else if (unified_consent_enabled) {
+  } else {
     ASSERT_EQ(1u, accounts_list.size());
     ASSERT_TRUE(accounts_list[0].FindKey("email"));
     EXPECT_EQ("a@gmail.com", accounts_list[0].FindKey("email")->GetString());
-  } else {
-    EXPECT_EQ(0u, accounts_list.size());
   }
 }
 
 INSTANTIATE_TEST_SUITE_P(Test,
                          PeopleHandlerDiceUnifiedConsentTest,
-                         ::testing::Combine(::testing::Bool(),
-                                            ::testing::Bool()));
+                         ::testing::Bool());
 #endif  // BUILDFLAG(ENABLE_DICE_SUPPORT)
 
 }  // namespace settings
diff --git a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
index 4bcb7f14..4f2e984 100644
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
@@ -60,7 +60,6 @@
 #include "components/sync/driver/sync_service.h"
 #include "components/sync/driver/sync_service_utils.h"
 #include "components/sync/driver/sync_user_settings.h"
-#include "components/unified_consent/feature.h"
 #include "content/public/browser/web_contents.h"
 #include "content/public/browser/web_ui_data_source.h"
 #include "content/public/common/content_features.h"
@@ -1912,8 +1911,6 @@
 }
 
 void AddPeopleStrings(content::WebUIDataSource* html_source, Profile* profile) {
-  bool is_unified_consent_enabled =
-      unified_consent::IsUnifiedConsentFeatureEnabled();
   LocalizedString localized_strings[] = {
     {"peoplePageTitle", IDS_SETTINGS_PEOPLE},
     {"manageOtherPeople", IDS_SETTINGS_PEOPLE_MANAGE_OTHER_PEOPLE},
@@ -2115,9 +2112,7 @@
     {"editPerson", IDS_SETTINGS_EDIT_PERSON},
     {"profileNameAndPicture", IDS_SETTINGS_PROFILE_NAME_AND_PICTURE},
     {"showShortcutLabel", IDS_SETTINGS_PROFILE_SHORTCUT_TOGGLE_LABEL},
-    {"syncWillStart", is_unified_consent_enabled
-                          ? IDS_SETTINGS_SYNC_WILL_START_UNITY
-                          : IDS_SETTINGS_SYNC_WILL_START},
+    {"syncWillStart", IDS_SETTINGS_SYNC_WILL_START_UNITY},
     {"syncSettingsSavedToast", IDS_SETTINGS_SYNC_SETTINGS_SAVED_TOAST_LABEL},
     {"cancelSync", IDS_SETTINGS_SYNC_SETTINGS_CANCEL_SYNC},
     {"syncSetupCancelDialogTitle", IDS_SETTINGS_SYNC_SETUP_CANCEL_DIALOG_TITLE},
@@ -2164,9 +2159,7 @@
      IDS_SETTINGS_NON_PERSONALIZED_SERVICES_SECTION_LABEL},
     {"syncAndNonPersonalizedServices",
      IDS_SETTINGS_SYNC_SYNC_AND_NON_PERSONALIZED_SERVICES},
-    {"syncPageTitle", is_unified_consent_enabled
-                          ? IDS_SETTINGS_SYNC_SYNC_AND_NON_PERSONALIZED_SERVICES
-                          : IDS_SETTINGS_SYNC_PAGE_TITLE},
+    {"syncPageTitle", IDS_SETTINGS_SYNC_SYNC_AND_NON_PERSONALIZED_SERVICES},
     {"syncAdvancedPageTitle", IDS_SETTINGS_SYNC_ADVANCED_PAGE_TITLE},
     {"syncLoading", IDS_SETTINGS_SYNC_LOADING},
     {"syncTimeout", IDS_SETTINGS_SYNC_TIMEOUT},
@@ -2186,9 +2179,7 @@
     {"driveSuggestPref", IDS_DRIVE_SUGGEST_PREF},
     {"driveSuggestPrefDesc", IDS_DRIVE_SUGGEST_PREF_DESC},
     {"manageSyncedDataTitle",
-     unified_consent::IsUnifiedConsentFeatureEnabled()
-         ? IDS_SETTINGS_MANAGE_SYNCED_DATA_TITLE_UNIFIED_CONSENT
-         : IDS_SETTINGS_MANAGE_SYNCED_DATA_TITLE},
+     IDS_SETTINGS_MANAGE_SYNCED_DATA_TITLE_UNIFIED_CONSENT},
     {"encryptionOptionsTitle", IDS_SETTINGS_ENCRYPTION_OPTIONS},
     {"syncDataEncryptedText", IDS_SETTINGS_SYNC_DATA_ENCRYPTED_TEXT},
     {"encryptWithGoogleCredentialsLabel",
@@ -2274,9 +2265,7 @@
     LocalizedString sync_disconnect_strings[] = {
         {"syncDisconnect", IDS_SETTINGS_PEOPLE_SYNC_TURN_OFF},
         {"syncDisconnectTitle",
-         is_unified_consent_enabled
-             ? IDS_SETTINGS_TURN_OFF_SYNC_AND_SIGN_OUT_DIALOG_TITLE_UNIFIED_CONSENT
-             : IDS_SETTINGS_TURN_OFF_SYNC_AND_SIGN_OUT_DIALOG_TITLE},
+         IDS_SETTINGS_TURN_OFF_SYNC_AND_SIGN_OUT_DIALOG_TITLE_UNIFIED_CONSENT},
         {"syncDisconnectDeleteProfile",
          IDS_SETTINGS_TURN_OFF_SYNC_DIALOG_CHECKBOX},
         {"syncDisconnectConfirm",
@@ -2285,17 +2274,9 @@
     AddLocalizedStringsBulk(html_source, sync_disconnect_strings,
                             base::size(sync_disconnect_strings));
 
-    if (is_unified_consent_enabled) {
-      html_source->AddLocalizedString(
-          "syncDisconnectExplanation",
-          IDS_SETTINGS_SYNC_DISCONNECT_AND_SIGN_OUT_EXPLANATION_UNIFIED_CONSENT);
-    } else {
-      html_source->AddString(
-          "syncDisconnectExplanation",
-          l10n_util::GetStringFUTF8(
-              IDS_SETTINGS_SYNC_DISCONNECT_AND_SIGN_OUT_EXPLANATION,
-              base::ASCIIToUTF16(sync_dashboard_url)));
-    }
+    html_source->AddLocalizedString(
+        "syncDisconnectExplanation",
+        IDS_SETTINGS_SYNC_DISCONNECT_AND_SIGN_OUT_EXPLANATION_UNIFIED_CONSENT);
   }
 #endif
 
@@ -2532,55 +2513,26 @@
   AddLocalizedStringsBulk(html_source, kLocalizedStrings,
                           base::size(kLocalizedStrings));
 
-  // Select strings depending on unified-consent enabledness.
-  bool is_unified_consent_enabled =
-      unified_consent::IsUnifiedConsentFeatureEnabled();
-  if (is_unified_consent_enabled) {
-    static constexpr LocalizedString kConditionalLocalizedStrings[] = {
-        {"searchSuggestPref", IDS_SETTINGS_SUGGEST_PREF_UNIFIED_CONSENT},
-        {"searchSuggestPrefDesc",
-         IDS_SETTINGS_SUGGEST_PREF_DESC_UNIFIED_CONSENT},
-        {"networkPredictionEnabled",
-         IDS_SETTINGS_NETWORK_PREDICTION_ENABLED_LABEL_UNIFIED_CONSENT},
-        {"networkPredictionEnabledDesc",
-         IDS_SETTINGS_NETWORK_PREDICTION_ENABLED_DESC_UNIFIED_CONSENT},
-        {"linkDoctorPref", IDS_SETTINGS_LINKDOCTOR_PREF_UNIFIED_CONSENT},
-        {"linkDoctorPrefDesc",
-         IDS_SETTINGS_LINKDOCTOR_PREF_DESC_UNIFIED_CONSENT},
-        {"spellingPref", IDS_SETTINGS_SPELLING_PREF_UNIFIED_CONSENT},
-        {"spellingDescription",
-         IDS_SETTINGS_SPELLING_DESCRIPTION_UNIFIED_CONSENT},
-        {"enableLogging", IDS_SETTINGS_ENABLE_LOGGING_UNIFIED_CONSENT},
-        {"enableLoggingDesc", IDS_SETTINGS_ENABLE_LOGGING_DESC_UNIFIED_CONSENT},
-    };
-    AddLocalizedStringsBulk(html_source, kConditionalLocalizedStrings,
-                            base::size(kConditionalLocalizedStrings));
-  } else {
-    static constexpr LocalizedString kConditionalLocalizedStrings[] = {
-      {"searchSuggestPref", IDS_SETTINGS_SUGGEST_PREF},
-      {"searchSuggestPrefDesc", IDS_SETTINGS_EMPTY_STRING},
+  static constexpr LocalizedString kConditionalLocalizedStrings[] = {
+      {"searchSuggestPref", IDS_SETTINGS_SUGGEST_PREF_UNIFIED_CONSENT},
+      {"searchSuggestPrefDesc", IDS_SETTINGS_SUGGEST_PREF_DESC_UNIFIED_CONSENT},
       {"networkPredictionEnabled",
-       IDS_SETTINGS_NETWORK_PREDICTION_ENABLED_LABEL},
-      {"networkPredictionEnabledDesc", IDS_SETTINGS_EMPTY_STRING},
-      {"linkDoctorPref", IDS_SETTINGS_LINKDOCTOR_PREF},
-      {"linkDoctorPrefDesc", IDS_SETTINGS_EMPTY_STRING},
-      {"spellingPref", IDS_SETTINGS_SPELLING_PREF},
-      {"spellingDescription", IDS_SETTINGS_SPELLING_DESCRIPTION},
-#if defined(OS_CHROMEOS)
-      {"enableLogging", IDS_SETTINGS_ENABLE_LOGGING_DIAGNOSTIC_AND_USAGE_DATA},
-#else
-      {"enableLogging", IDS_SETTINGS_ENABLE_LOGGING},
-#endif
-      {"enableLoggingDesc", IDS_SETTINGS_EMPTY_STRING},
-    };
-    AddLocalizedStringsBulk(html_source, kConditionalLocalizedStrings,
-                            base::size(kConditionalLocalizedStrings));
-  }
+       IDS_SETTINGS_NETWORK_PREDICTION_ENABLED_LABEL_UNIFIED_CONSENT},
+      {"networkPredictionEnabledDesc",
+       IDS_SETTINGS_NETWORK_PREDICTION_ENABLED_DESC_UNIFIED_CONSENT},
+      {"linkDoctorPref", IDS_SETTINGS_LINKDOCTOR_PREF_UNIFIED_CONSENT},
+      {"linkDoctorPrefDesc", IDS_SETTINGS_LINKDOCTOR_PREF_DESC_UNIFIED_CONSENT},
+      {"spellingPref", IDS_SETTINGS_SPELLING_PREF_UNIFIED_CONSENT},
+      {"spellingDescription",
+       IDS_SETTINGS_SPELLING_DESCRIPTION_UNIFIED_CONSENT},
+      {"enableLogging", IDS_SETTINGS_ENABLE_LOGGING_UNIFIED_CONSENT},
+      {"enableLoggingDesc", IDS_SETTINGS_ENABLE_LOGGING_DESC_UNIFIED_CONSENT},
+  };
+  AddLocalizedStringsBulk(html_source, kConditionalLocalizedStrings,
+                          base::size(kConditionalLocalizedStrings));
 
   html_source->AddString("syncAndGoogleServicesLearnMoreURL",
-                         is_unified_consent_enabled
-                             ? chrome::kSyncAndGoogleServicesLearnMoreURL
-                             : "");
+                         chrome::kSyncAndGoogleServicesLearnMoreURL);
   html_source->AddString(
       "improveBrowsingExperience",
       l10n_util::GetStringFUTF16(
diff --git a/chrome/browser/ui/webui/settings/settings_ui.cc b/chrome/browser/ui/webui/settings/settings_ui.cc
index 374bc98..f2f215c 100644
--- a/chrome/browser/ui/webui/settings/settings_ui.cc
+++ b/chrome/browser/ui/webui/settings/settings_ui.cc
@@ -56,7 +56,6 @@
 #include "components/favicon_base/favicon_url_parser.h"
 #include "components/password_manager/core/common/password_manager_features.h"
 #include "components/pref_registry/pref_registry_syncable.h"
-#include "components/unified_consent/feature.h"
 #include "content/public/browser/url_data_source.h"
 #include "content/public/browser/web_contents.h"
 #include "content/public/browser/web_ui.h"
@@ -263,8 +262,8 @@
       "privacySettingsRedesignEnabled",
       base::FeatureList::IsEnabled(features::kPrivacySettingsRedesign));
 
-  html_source->AddBoolean("unifiedConsentEnabled",
-                          unified_consent::IsUnifiedConsentFeatureEnabled());
+  // TODO(msarda): Remove |unifiedConsentEnabled| from all settings resources.
+  html_source->AddBoolean("unifiedConsentEnabled", true);
 
   html_source->AddBoolean(
       "navigateToGooglePasswordManager",
diff --git a/chrome/browser/ui/webui/signin/dice_turn_sync_on_helper.cc b/chrome/browser/ui/webui/signin/dice_turn_sync_on_helper.cc
index e67e546..a9e0958 100644
--- a/chrome/browser/ui/webui/signin/dice_turn_sync_on_helper.cc
+++ b/chrome/browser/ui/webui/signin/dice_turn_sync_on_helper.cc
@@ -43,7 +43,6 @@
 #include "components/signin/public/identity_manager/primary_account_mutator.h"
 #include "components/sync/driver/sync_service.h"
 #include "components/sync/driver/sync_user_settings.h"
-#include "components/unified_consent/feature.h"
 #include "components/unified_consent/unified_consent_service.h"
 #include "content/public/browser/storage_partition.h"
 
diff --git a/chrome/browser/ui/webui/signin/dice_turn_sync_on_helper_unittest.cc b/chrome/browser/ui/webui/signin/dice_turn_sync_on_helper_unittest.cc
index c1b13af..dceb3df 100644
--- a/chrome/browser/ui/webui/signin/dice_turn_sync_on_helper_unittest.cc
+++ b/chrome/browser/ui/webui/signin/dice_turn_sync_on_helper_unittest.cc
@@ -35,8 +35,6 @@
 #include "components/signin/public/identity_manager/identity_test_environment.h"
 #include "components/sync/driver/mock_sync_service.h"
 #include "components/sync/driver/sync_user_settings_mock.h"
-#include "components/unified_consent/feature.h"
-#include "components/unified_consent/scoped_unified_consent.h"
 #include "components/unified_consent/url_keyed_data_collection_consent_helper.h"
 #include "content/public/test/browser_task_environment.h"
 #include "google_apis/gaia/google_service_auth_error.h"
@@ -440,14 +438,11 @@
 class DiceTurnSyncOnHelperTestWithUnifiedConsent
     : public DiceTurnSyncOnHelperTestBase {
  public:
-  DiceTurnSyncOnHelperTestWithUnifiedConsent()
-      : scoped_unified_consent_(
-            unified_consent::UnifiedConsentFeatureState::kEnabled) {}
+  DiceTurnSyncOnHelperTestWithUnifiedConsent() {}
   ~DiceTurnSyncOnHelperTestWithUnifiedConsent() override {}
 
  private:
   ScopedAccountConsistencyDice scoped_dice_;
-  unified_consent::ScopedUnifiedConsent scoped_unified_consent_;
 };
 
 // TestDiceTurnSyncOnHelperDelegate implementation.
@@ -742,7 +737,6 @@
 // Tests that the user enabled unified consent,
 TEST_F(DiceTurnSyncOnHelperTestWithUnifiedConsent,
        ShowSyncDialogForEndConsumerAccount_UnifiedConsentEnabled) {
-  ASSERT_TRUE(unified_consent::IsUnifiedConsentFeatureEnabled());
   // Set expectations.
   expected_sync_confirmation_shown_ = true;
   sync_confirmation_result_ = LoginUIService::SyncConfirmationUIClosedResult::
diff --git a/chrome/browser/ui/webui/signin/sync_confirmation_handler.cc b/chrome/browser/ui/webui/signin/sync_confirmation_handler.cc
index 841ba4a6..b30665de 100644
--- a/chrome/browser/ui/webui/signin/sync_confirmation_handler.cc
+++ b/chrome/browser/ui/webui/signin/sync_confirmation_handler.cc
@@ -24,7 +24,6 @@
 #include "components/consent_auditor/consent_auditor.h"
 #include "components/signin/public/base/avatar_icon_util.h"
 #include "components/signin/public/identity_manager/account_info.h"
-#include "components/unified_consent/feature.h"
 #include "content/public/browser/web_contents.h"
 #include "content/public/browser/web_ui.h"
 #include "url/gurl.h"
diff --git a/chrome/browser/ui/webui/signin/sync_confirmation_handler_unittest.cc b/chrome/browser/ui/webui/signin/sync_confirmation_handler_unittest.cc
index 635e261..d3eb3e1d 100644
--- a/chrome/browser/ui/webui/signin/sync_confirmation_handler_unittest.cc
+++ b/chrome/browser/ui/webui/signin/sync_confirmation_handler_unittest.cc
@@ -30,7 +30,6 @@
 #include "chrome/test/base/testing_profile.h"
 #include "components/consent_auditor/fake_consent_auditor.h"
 #include "components/signin/public/base/avatar_icon_util.h"
-#include "components/unified_consent/scoped_unified_consent.h"
 #include "content/public/test/browser_task_environment.h"
 #include "content/public/test/test_web_ui.h"
 
diff --git a/chrome/browser/ui/webui/signin/sync_confirmation_ui.cc b/chrome/browser/ui/webui/signin/sync_confirmation_ui.cc
index ba5d2d2..51e035b6 100644
--- a/chrome/browser/ui/webui/signin/sync_confirmation_ui.cc
+++ b/chrome/browser/ui/webui/signin/sync_confirmation_ui.cc
@@ -19,7 +19,6 @@
 #include "components/signin/public/base/avatar_icon_util.h"
 #include "components/signin/public/identity_manager/identity_manager.h"
 #include "components/strings/grit/components_strings.h"
-#include "components/unified_consent/feature.h"
 #include "content/public/browser/web_ui.h"
 #include "content/public/browser/web_ui_data_source.h"
 #include "ui/base/l10n/l10n_util.h"
@@ -28,7 +27,6 @@
 
 SyncConfirmationUI::SyncConfirmationUI(content::WebUI* web_ui)
     : SigninWebDialogUI(web_ui) {
-  DCHECK(unified_consent::IsUnifiedConsentFeatureEnabled());
   Profile* profile = Profile::FromWebUI(web_ui);
   bool is_sync_allowed = profile->IsSyncAllowed();
 
diff --git a/chrome/browser/ui/webui/tab_strip/tab_strip_ui.cc b/chrome/browser/ui/webui/tab_strip/tab_strip_ui.cc
index a0dd65fa..b0a3a1fb 100644
--- a/chrome/browser/ui/webui/tab_strip/tab_strip_ui.cc
+++ b/chrome/browser/ui/webui/tab_strip/tab_strip_ui.cc
@@ -29,6 +29,7 @@
 #include "chrome/browser/ui/tabs/tab_utils.h"
 #include "chrome/browser/ui/ui_features.h"
 #include "chrome/browser/ui/webui/favicon_source.h"
+#include "chrome/browser/ui/webui/tab_strip/tab_strip_ui_layout.h"
 #include "chrome/browser/ui/webui/theme_handler.h"
 #include "chrome/common/webui_url_constants.h"
 #include "chrome/grit/tab_strip_resources.h"
@@ -111,6 +112,8 @@
   const int tab_index_;
 };
 
+}  // namespace
+
 class TabStripUIHandler : public content::WebUIMessageHandler,
                           public TabStripModelObserver {
  public:
@@ -125,6 +128,12 @@
     browser_->tab_strip_model()->AddObserver(this);
   }
 
+  void NotifyLayoutChanged() {
+    if (!IsJavascriptAllowed())
+      return;
+    FireWebUIListener("layout-changed");
+  }
+
   // TabStripModelObserver:
   void OnTabStripModelChanged(
       TabStripModel* tab_strip_model,
@@ -215,6 +224,9 @@
         "showTabContextMenu",
         base::Bind(&TabStripUIHandler::HandleShowTabContextMenu,
                    base::Unretained(this)));
+    web_ui()->RegisterMessageCallback(
+        "getLayout", base::Bind(&TabStripUIHandler::HandleGetLayout,
+                                base::Unretained(this)));
   }
 
  private:
@@ -352,6 +364,14 @@
         std::make_unique<WebUITabContextMenu>(tab_strip_model, tab_index));
   }
 
+  void HandleGetLayout(const base::ListValue* args) {
+    AllowJavascript();
+    const base::Value& callback_id = args->GetList()[0];
+
+    base::Value layout = embedder_->GetLayout().AsDictionary();
+    ResolveJavascriptCallback(callback_id, layout);
+  }
+
   void AddTrackedTab(const base::ListValue* args) {
     AllowJavascript();
 
@@ -399,8 +419,6 @@
   DISALLOW_COPY_AND_ASSIGN(TabStripUIHandler);
 };
 
-}  // namespace
-
 TabStripUI::TabStripUI(content::WebUI* web_ui)
     : content::WebUIController(web_ui) {
   Profile* profile = Profile::FromWebUI(web_ui);
@@ -452,6 +470,11 @@
 void TabStripUI::Initialize(Browser* browser, Embedder* embedder) {
   content::WebUI* const web_ui = TabStripUI::web_ui();
   DCHECK_EQ(Profile::FromWebUI(web_ui), browser->profile());
-  web_ui->AddMessageHandler(
-      std::make_unique<TabStripUIHandler>(browser, embedder));
+  auto handler = std::make_unique<TabStripUIHandler>(browser, embedder);
+  handler_ = handler.get();
+  web_ui->AddMessageHandler(std::move(handler));
+}
+
+void TabStripUI::LayoutChanged() {
+  handler_->NotifyLayoutChanged();
 }
diff --git a/chrome/browser/ui/webui/tab_strip/tab_strip_ui.h b/chrome/browser/ui/webui/tab_strip/tab_strip_ui.h
index 6f126eeb..133165b 100644
--- a/chrome/browser/ui/webui/tab_strip/tab_strip_ui.h
+++ b/chrome/browser/ui/webui/tab_strip/tab_strip_ui.h
@@ -12,10 +12,12 @@
 #include "content/public/browser/web_ui_controller.h"
 
 class Browser;
+class TabStripUIHandler;
+struct TabStripUILayout;
 
 namespace gfx {
 class Point;
-}
+}  // namespace gfx
 
 namespace ui {
 class MenuModel;
@@ -37,19 +39,28 @@
     virtual void ShowContextMenuAtPoint(
         gfx::Point point,
         std::unique_ptr<ui::MenuModel> menu_model) = 0;
+
+    virtual TabStripUILayout GetLayout() = 0;
   };
 
   explicit TabStripUI(content::WebUI* web_ui);
   ~TabStripUI() override;
 
-  // Initialize TabStripUI with its embedder and the Browser it's running in.
-  // Must be called exactly once. The WebUI won't work until this is called.
+  // Initialize TabStripUI with its embedder and the Browser it's
+  // running in. Must be called exactly once. The WebUI won't work until
+  // this is called.
   void Initialize(Browser* browser, Embedder* embedder);
 
+  // The embedder should call this whenever the result of
+  // Embedder::GetLayout() changes.
+  void LayoutChanged();
+
  private:
   void HandleThumbnailUpdate(int extension_tab_id,
                              ThumbnailTracker::CompressedThumbnailData image);
 
+  TabStripUIHandler* handler_ = nullptr;
+
   DISALLOW_COPY_AND_ASSIGN(TabStripUI);
 };
 
diff --git a/chrome/browser/ui/webui/tab_strip/tab_strip_ui_browsertest.cc b/chrome/browser/ui/webui/tab_strip/tab_strip_ui_browsertest.cc
index 5df49d7..77ca927 100644
--- a/chrome/browser/ui/webui/tab_strip/tab_strip_ui_browsertest.cc
+++ b/chrome/browser/ui/webui/tab_strip/tab_strip_ui_browsertest.cc
@@ -14,6 +14,7 @@
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/ui_features.h"
+#include "chrome/browser/ui/webui/tab_strip/tab_strip_ui_layout.h"
 #include "chrome/common/chrome_isolated_world_ids.h"
 #include "chrome/common/webui_url_constants.h"
 #include "chrome/test/base/in_process_browser_test.h"
@@ -37,6 +38,7 @@
               ShowContextMenuAtPoint,
               (gfx::Point point, std::unique_ptr<ui::MenuModel> menu_model),
               (override));
+  MOCK_METHOD(TabStripUILayout, GetLayout, (), (override));
 };
 
 }  // namespace
@@ -57,6 +59,11 @@
   }
 
   void SetUpOnMainThread() override {
+    const TabStripUILayout default_layout =
+        TabStripUILayout::CalculateForWebViewportSize(gfx::Size(200, 200));
+    ON_CALL(mock_embedder_, GetLayout())
+        .WillByDefault(::testing::Return(default_layout));
+
     webui_contents_ = content::WebContents::Create(
         content::WebContents::CreateParams(browser()->profile()));
 
diff --git a/chrome/browser/ui/webui/tab_strip/tab_strip_ui_layout.cc b/chrome/browser/ui/webui/tab_strip/tab_strip_ui_layout.cc
new file mode 100644
index 0000000..c96c7e5
--- /dev/null
+++ b/chrome/browser/ui/webui/tab_strip/tab_strip_ui_layout.cc
@@ -0,0 +1,56 @@
+// Copyright 2019 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.
+
+#include "chrome/browser/ui/webui/tab_strip/tab_strip_ui_layout.h"
+
+#include "base/values.h"
+#include "ui/gfx/geometry/size.h"
+
+// static
+TabStripUILayout TabStripUILayout::CalculateForWebViewportSize(
+    const gfx::Size& viewport_size) {
+  // The smaller of the thumbnail's height or width is fixed to this
+  // value. The other dimension will be at least this long.
+  constexpr int kThumbnailMinDimensionLength = 176;
+
+  TabStripUILayout layout;
+  layout.padding_around_tab_list = 16;
+  layout.tab_title_height = 40;
+
+  if (viewport_size.IsEmpty()) {
+    layout.tab_thumbnail_size =
+        gfx::Size(kThumbnailMinDimensionLength, kThumbnailMinDimensionLength);
+    return layout;
+  }
+
+  // Size the thumbnail to match the web viewport's aspect ratio.
+  if (viewport_size.width() > viewport_size.height()) {
+    layout.tab_thumbnail_size.set_height(kThumbnailMinDimensionLength);
+    layout.tab_thumbnail_size.set_width(kThumbnailMinDimensionLength *
+                                        viewport_size.width() /
+                                        viewport_size.height());
+  } else {
+    layout.tab_thumbnail_size.set_width(kThumbnailMinDimensionLength);
+    layout.tab_thumbnail_size.set_height(kThumbnailMinDimensionLength *
+                                         viewport_size.height() /
+                                         viewport_size.width());
+  }
+
+  return layout;
+}
+
+base::Value TabStripUILayout::AsDictionary() const {
+  base::Value dict(base::Value::Type::DICTIONARY);
+  dict.SetIntKey("--tabstrip-tab-list-padding", padding_around_tab_list);
+  dict.SetIntKey("--tabstrip-tab-title-height", tab_title_height);
+  dict.SetIntKey("--tabstrip-tab-thumbnail-width", tab_thumbnail_size.width());
+  dict.SetIntKey("--tabstrip-tab-thumbnail-height",
+                 tab_thumbnail_size.height());
+  return dict;
+}
+
+int TabStripUILayout::CalculateContainerHeight() const {
+  return 2 * padding_around_tab_list + tab_title_height +
+         tab_thumbnail_size.height();
+}
diff --git a/chrome/browser/ui/webui/tab_strip/tab_strip_ui_layout.h b/chrome/browser/ui/webui/tab_strip/tab_strip_ui_layout.h
new file mode 100644
index 0000000..fe0bdd5a
--- /dev/null
+++ b/chrome/browser/ui/webui/tab_strip/tab_strip_ui_layout.h
@@ -0,0 +1,30 @@
+// Copyright 2019 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 CHROME_BROWSER_UI_WEBUI_TAB_STRIP_TAB_STRIP_UI_LAYOUT_H_
+#define CHROME_BROWSER_UI_WEBUI_TAB_STRIP_TAB_STRIP_UI_LAYOUT_H_
+
+#include "ui/gfx/geometry/size.h"
+
+namespace base {
+class Value;
+}
+
+struct TabStripUILayout {
+  static TabStripUILayout CalculateForWebViewportSize(
+      const gfx::Size& viewport_size);
+
+  // Returns a dictionary of CSS variables.
+  base::Value AsDictionary() const;
+
+  // Returns the tab strip's total height. This should be used to size
+  // its container.
+  int CalculateContainerHeight() const;
+
+  int padding_around_tab_list;
+  int tab_title_height;
+  gfx::Size tab_thumbnail_size;
+};
+
+#endif  // CHROME_BROWSER_UI_WEBUI_TAB_STRIP_TAB_STRIP_UI_LAYOUT_H_
diff --git a/chrome/browser/ui/webui/tab_strip/tab_strip_ui_layout_unittest.cc b/chrome/browser/ui/webui/tab_strip/tab_strip_ui_layout_unittest.cc
new file mode 100644
index 0000000..8ea6002
--- /dev/null
+++ b/chrome/browser/ui/webui/tab_strip/tab_strip_ui_layout_unittest.cc
@@ -0,0 +1,44 @@
+// Copyright 2019 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.
+
+#include "chrome/browser/ui/webui/tab_strip/tab_strip_ui_layout.h"
+
+#include <algorithm>
+
+#include "base/values.h"
+#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/gfx/geometry/size.h"
+
+// The test parameter is the web content's viewport size.
+class TabStripUILayoutAspectRatioTest
+    : public ::testing::TestWithParam<gfx::Size> {};
+
+TEST_P(TabStripUILayoutAspectRatioTest, ThumbnailHasSameAspectRatioAsViewport) {
+  const gfx::Size viewport_size = GetParam();
+  TabStripUILayout layout =
+      TabStripUILayout::CalculateForWebViewportSize(viewport_size);
+
+  EXPECT_EQ(176, std::min(layout.tab_thumbnail_size.width(),
+                          layout.tab_thumbnail_size.height()));
+  EXPECT_FLOAT_EQ(
+      viewport_size.width() / viewport_size.height(),
+      layout.tab_thumbnail_size.width() / layout.tab_thumbnail_size.height());
+}
+
+INSTANTIATE_TEST_SUITE_P(SmallSizes,
+                         TabStripUILayoutAspectRatioTest,
+                         ::testing::Values(gfx::Size(200, 200),
+                                           gfx::Size(200, 300),
+                                           gfx::Size(300, 200)));
+
+INSTANTIATE_TEST_SUITE_P(LargeSizes,
+                         TabStripUILayoutAspectRatioTest,
+                         ::testing::Values(gfx::Size(1920, 1080),
+                                           gfx::Size(1080, 1920)));
+
+TEST(TabStripUILayoutTest, HandlesZeroSize) {
+  TabStripUILayout layout =
+      TabStripUILayout::CalculateForWebViewportSize(gfx::Size(0, 0));
+  EXPECT_FALSE(layout.tab_thumbnail_size.IsEmpty());
+}
diff --git a/chrome/browser/unified_consent/unified_consent_browsertest.cc b/chrome/browser/unified_consent/unified_consent_browsertest.cc
index 2ad7499..613a54b 100644
--- a/chrome/browser/unified_consent/unified_consent_browsertest.cc
+++ b/chrome/browser/unified_consent/unified_consent_browsertest.cc
@@ -16,7 +16,6 @@
 #include "chrome/test/base/scoped_testing_local_state.h"
 #include "chrome/test/base/testing_profile.h"
 #include "components/sync/test/fake_server/fake_server_network_resources.h"
-#include "components/unified_consent/scoped_unified_consent.h"
 #include "components/unified_consent/unified_consent_metrics.h"
 #include "components/unified_consent/unified_consent_service.h"
 
@@ -25,9 +24,7 @@
 
 class UnifiedConsentBrowserTest : public SyncTest {
  public:
-  UnifiedConsentBrowserTest(UnifiedConsentFeatureState feature_state =
-                                UnifiedConsentFeatureState::kEnabled)
-      : SyncTest(TWO_CLIENT), scoped_unified_consent_state_(feature_state) {}
+  UnifiedConsentBrowserTest() : SyncTest(TWO_CLIENT) {}
   ~UnifiedConsentBrowserTest() override = default;
 
   void EnableSync(int client_id) {
@@ -67,20 +64,9 @@
 
   std::unique_ptr<syncer::SyncSetupInProgressHandle> sync_blocker_;
 
-  ScopedUnifiedConsent scoped_unified_consent_state_;
-
   DISALLOW_COPY_AND_ASSIGN(UnifiedConsentBrowserTest);
 };
 
-class UnifiedConsentDisabledBrowserTest : public UnifiedConsentBrowserTest {
- public:
-  UnifiedConsentDisabledBrowserTest()
-      : UnifiedConsentBrowserTest(UnifiedConsentFeatureState::kDisabled) {}
-  ~UnifiedConsentDisabledBrowserTest() override = default;
-
-  DISALLOW_COPY_AND_ASSIGN(UnifiedConsentDisabledBrowserTest);
-};
-
 // Tests that the settings histogram is recorded if unified consent is enabled.
 // The histogram is recorded during profile initialization.
 IN_PROC_BROWSER_TEST_F(UnifiedConsentBrowserTest, SettingsHistogram_None) {
@@ -89,15 +75,6 @@
       metrics::SettingsHistogramValue::kNone, 1);
 }
 
-// Tests that the settings histogram is recorded if unified consent is disabled.
-// The histogram is recorded during profile initialization.
-IN_PROC_BROWSER_TEST_F(UnifiedConsentDisabledBrowserTest,
-                       SettingsHistogram_None) {
-  histogram_tester_.ExpectUniqueSample(
-      "UnifiedConsent.SyncAndGoogleServicesSettings",
-      metrics::SettingsHistogramValue::kNone, 1);
-}
-
 // Tests that all service entries in the settings histogram are recorded after
 // enabling them.
 IN_PROC_BROWSER_TEST_F(
diff --git a/chrome/browser/unified_consent/unified_consent_service_factory.cc b/chrome/browser/unified_consent/unified_consent_service_factory.cc
index ab570e9..9aea657 100644
--- a/chrome/browser/unified_consent/unified_consent_service_factory.cc
+++ b/chrome/browser/unified_consent/unified_consent_service_factory.cc
@@ -15,7 +15,6 @@
 #include "components/safe_browsing/common/safe_browsing_prefs.h"
 #include "components/spellcheck/browser/pref_names.h"
 #include "components/sync_preferences/pref_service_syncable.h"
-#include "components/unified_consent/feature.h"
 #include "components/unified_consent/unified_consent_metrics.h"
 #include "components/unified_consent/unified_consent_service.h"
 
@@ -85,11 +84,6 @@
   if (!sync_service)
     return nullptr;
 
-  if (!unified_consent::IsUnifiedConsentFeatureEnabled()) {
-    UnifiedConsentService::RollbackIfNeeded(pref_service, sync_service);
-    return nullptr;
-  }
-
   return new UnifiedConsentService(
       pref_service, IdentityManagerFactory::GetForProfile(profile),
       sync_service, GetSyncedServicePrefNames());
diff --git a/chrome/browser/vr/BUILD.gn b/chrome/browser/vr/BUILD.gn
index 360d95de..387034a0 100644
--- a/chrome/browser/vr/BUILD.gn
+++ b/chrome/browser/vr/BUILD.gn
@@ -707,8 +707,6 @@
       "test/mock_xr_session_request_consent_manager.cc",
       "test/mock_xr_session_request_consent_manager.h",
       "test/multi_class_browser_test.h",
-      "test/webvr_browser_test.cc",
-      "test/webvr_browser_test.h",
       "test/webxr_browser_test.cc",
       "test/webxr_browser_test.h",
       "test/webxr_vr_browser_test.cc",
diff --git a/chrome/browser/vr/test/webvr_browser_test.cc b/chrome/browser/vr/test/webvr_browser_test.cc
deleted file mode 100644
index 865aa16..0000000
--- a/chrome/browser/vr/test/webvr_browser_test.cc
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2018 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.
-
-#include <cstring>
-
-#include "chrome/browser/vr/test/webvr_browser_test.h"
-#include "content/public/browser/web_contents.h"
-#include "content/public/test/browser_test_utils.h"
-#include "testing/gmock/include/gmock/gmock.h"
-
-using testing::_;
-using testing::Invoke;
-
-namespace vr {
-
-bool WebVrBrowserTestBase::XrDeviceFound(content::WebContents* web_contents) {
-  return RunJavaScriptAndExtractBoolOrFail("vrDisplay != null", web_contents);
-}
-
-void WebVrBrowserTestBase::EnterSessionWithUserGesture(
-    content::WebContents* web_contents) {
-  XRSessionRequestConsentManager::SetInstanceForTesting(&consent_manager_);
-  EXPECT_CALL(consent_manager_, ShowDialogAndGetConsent(_, _, _)).Times(0);
-
-  // ExecuteScript runs with a user gesture, so we can just directly call
-  // requestPresent instead of having to do the hacky workaround the
-  // instrumentation tests use of actually sending a click event to the canvas.
-  RunJavaScriptOrFail("onVrRequestPresent()", web_contents);
-}
-
-void WebVrBrowserTestBase::EnterSessionWithUserGestureOrFail(
-    content::WebContents* web_contents) {
-  EnterSessionWithUserGesture(web_contents);
-  PollJavaScriptBooleanOrFail("vrDisplay.isPresenting", kPollTimeoutLong,
-                              web_contents);
-}
-
-void WebVrBrowserTestBase::EndSession(content::WebContents* web_contents) {
-  XRSessionRequestConsentManager::SetInstanceForTesting(nullptr);
-  RunJavaScriptOrFail("vrDisplay.exitPresent()", web_contents);
-}
-
-void WebVrBrowserTestBase::EndSessionOrFail(
-    content::WebContents* web_contents) {
-  EndSession(web_contents);
-  PollJavaScriptBooleanOrFail("vrDisplay.isPresenting == false",
-                              kPollTimeoutLong, web_contents);
-}
-
-}  // namespace vr
diff --git a/chrome/browser/vr/webxr_vr_input_browser_test.cc b/chrome/browser/vr/webxr_vr_input_browser_test.cc
index a67509b..2e15ab5 100644
--- a/chrome/browser/vr/webxr_vr_input_browser_test.cc
+++ b/chrome/browser/vr/webxr_vr_input_browser_test.cc
@@ -6,14 +6,13 @@
 #include "base/strings/string_number_conversions.h"
 #include "chrome/browser/vr/test/mock_xr_device_hook_base.h"
 #include "chrome/browser/vr/test/multi_class_browser_test.h"
-#include "chrome/browser/vr/test/webvr_browser_test.h"
 #include "chrome/browser/vr/test/webxr_vr_browser_test.h"
 #include "device/vr/public/mojom/browser_test_interfaces.mojom.h"
 #include "third_party/openvr/src/headers/openvr.h"
 
 // Browser test equivalent of
 // chrome/android/javatests/src/.../browser/vr/WebXrVrInputTest.java.
-// End-to-end tests for user input interaction with WebXR/WebVR.
+// End-to-end tests for user input interaction with WebXR.
 
 namespace vr {
 
@@ -55,23 +54,10 @@
   t->EndTest();
 }
 
-IN_PROC_BROWSER_TEST_F(WebVrOpenVrBrowserTest, TestPresentationLocksFocus) {
-  TestPresentationLocksFocusImpl(this, "test_presentation_locks_focus");
-}
 WEBXR_VR_ALL_RUNTIMES_BROWSER_TEST_F(TestPresentationLocksFocus) {
   TestPresentationLocksFocusImpl(t, "webxr_test_presentation_locks_focus");
 }
 
-#if BUILDFLAG(ENABLE_OPENXR)
-IN_PROC_BROWSER_TEST_F(WebVrOpenXrBrowserTest, TestPresentationLocksFocus) {
-  // Create a mock so that the test hook on OpenXRAPIWrapper is set.
-  // This is needed to set the environment variable in LoadOpenXRRuntime
-  // to use the mock runtime instead of the real system runtime.
-  MockXRDeviceHookBase my_mock;
-  TestPresentationLocksFocusImpl(this, "test_presentation_locks_focus");
-}
-#endif  // BUILDFLAG(ENABLE_OPENXR)
-
 class WebXrControllerInputMock : public MockXRDeviceHookBase {
  public:
   void OnFrameSubmitted(
@@ -704,7 +690,7 @@
 
   // Controller should meet the requirements for the 'xr-standard' mapping.
   t->PollJavaScriptBooleanOrFail("isMappingEqualTo('xr-standard')",
-                                 WebVrBrowserTestBase::kPollTimeoutShort);
+                                 WebXrVrBrowserTestBase::kPollTimeoutShort);
 
   // Controller should have all required and optional xr-standard buttons
   t->PollJavaScriptBooleanOrFail("isButtonCountEqualTo(4)",
@@ -712,28 +698,28 @@
 
   // The touchpad axes should be set appropriately.
   t->PollJavaScriptBooleanOrFail("areAxesValuesEqualTo(0, 0.25, -0.25)",
-                                 WebVrBrowserTestBase::kPollTimeoutShort);
+                                 WebXrVrBrowserTestBase::kPollTimeoutShort);
 
   // The thumbstick axes should be set appropriately.
   t->PollJavaScriptBooleanOrFail("areAxesValuesEqualTo(1, 0.67, -0.67)",
-                                 WebVrBrowserTestBase::kPollTimeoutShort);
+                                 WebXrVrBrowserTestBase::kPollTimeoutShort);
 
   // Button 1 is reserved for the Grip, and should be pressed.
   t->PollJavaScriptBooleanOrFail("isButtonPressedEqualTo(1, true)",
-                                 WebVrBrowserTestBase::kPollTimeoutShort);
+                                 WebXrVrBrowserTestBase::kPollTimeoutShort);
 
   // Button 2 is reserved for the trackpad and should be touched but not
   // pressed.
   t->PollJavaScriptBooleanOrFail("isButtonPressedEqualTo(2, false)",
-                                 WebVrBrowserTestBase::kPollTimeoutShort);
+                                 WebXrVrBrowserTestBase::kPollTimeoutShort);
   t->PollJavaScriptBooleanOrFail("isButtonTouchedEqualTo(2, true)",
-                                 WebVrBrowserTestBase::kPollTimeoutShort);
+                                 WebXrVrBrowserTestBase::kPollTimeoutShort);
 
   // Button 3 is reserved for the thumbstick and should be touched and pressed.
   t->PollJavaScriptBooleanOrFail("isButtonPressedEqualTo(3, true)",
-                                 WebVrBrowserTestBase::kPollTimeoutShort);
+                                 WebXrVrBrowserTestBase::kPollTimeoutShort);
   t->PollJavaScriptBooleanOrFail("isButtonTouchedEqualTo(3, true)",
-                                 WebVrBrowserTestBase::kPollTimeoutShort);
+                                 WebXrVrBrowserTestBase::kPollTimeoutShort);
 
   if (t->GetRuntimeType() == XrBrowserTestBase::RuntimeType::RUNTIME_WMR) {
     // WMR will still report having grip, touchpad, and thumbstick because it
@@ -800,7 +786,7 @@
                   -0.25);
   // Controller should meet the requirements for the 'xr-standard' mapping.
   PollJavaScriptBooleanOrFail("isMappingEqualTo('xr-standard')",
-                              WebVrBrowserTestBase::kPollTimeoutShort);
+                              WebXrVrBrowserTestBase::kPollTimeoutShort);
 
   // Controller should have all required and optional xr-standard buttons
   PollJavaScriptBooleanOrFail("isButtonCountEqualTo(4)",
@@ -808,11 +794,11 @@
 
   // The secondary set of axes should be set appropriately.
   PollJavaScriptBooleanOrFail("areAxesValuesEqualTo(1, 0.25, -0.25)",
-                              WebVrBrowserTestBase::kPollTimeoutShort);
+                              WebXrVrBrowserTestBase::kPollTimeoutShort);
 
   // If we have a non-zero axis value, the button should be touched.
   PollJavaScriptBooleanOrFail("isButtonTouchedEqualTo(3, true)",
-                              WebVrBrowserTestBase::kPollTimeoutShort);
+                              WebXrVrBrowserTestBase::kPollTimeoutShort);
 
   RunJavaScriptOrFail("done()");
   EndTest();
@@ -998,67 +984,6 @@
   t->EndTest();
 }
 
-void TestWebVrControllerInputRegistered(WebVrBrowserTestBase* t) {
-  WebXrControllerInputMock my_mock;
-
-  // Connect a controller.
-  auto controller_data = my_mock.CreateValidController(
-      device::ControllerRole::kControllerRoleRight);
-  // openvr_gamepad_helper assumes axis index 1 is the trigger, so we need to
-  // set that here, otherwise it won't check whether it's pressed or not.
-  // Note that we aren't able to use the CreateAndConnectMinimalGamepad helper
-  // here as that adds support for axis_data[0], which causes OpenVR on WebVR
-  // to treat that button as the primary input (per the defacto webvr standard),
-  // and we want it to only see the trigger.
-  controller_data
-      .axis_data[device::XrAxisOffsetFromId(device::XrButtonId::kAxisTrigger)]
-      .axis_type = device::XrAxisType::kTrigger;
-  unsigned int controller_index = my_mock.ConnectController(controller_data);
-
-  // Load the test page and enter presentation.
-  t->LoadUrlAndAwaitInitialization(
-      t->GetFileUrlForHtmlTestFile("test_gamepad_button"));
-  t->EnterSessionWithUserGestureOrFail();
-
-  // We need to have this, otherwise the JavaScript side of the Gamepad API
-  // doesn't seem to pick up the correct button state? I.e. if we don't have
-  // this, openvr_gamepad_helper properly sets the gamepad's button state,
-  // but JavaScript still shows no buttons pressed.
-  // TODO(bsheedy): Figure out why this is the case.
-  my_mock.PressReleasePrimaryTrigger(controller_index);
-
-  // Setting this in the Android version of the test needs to happen after a
-  // flakiness workaround. Coincidentally, it's also helpful for the different
-  // issue solved by the above PressReleasePrimaryTrigger, so make sure to set
-  // it here so that the above press/release isn't caught by the test code.
-  t->RunJavaScriptOrFail("canStartTest = true");
-  // Press and release the trigger, ensuring the Gamepad API detects both.
-  my_mock.TogglePrimaryTrigger(controller_index);
-  t->WaitOnJavaScriptStep();
-  // Re-register the callback since it unregisters itself after finishing the
-  // step.
-  t->RunJavaScriptOrFail(
-      "onPresentingAnimationFrameCallback = gamepadFrameCallback");
-  my_mock.TogglePrimaryTrigger(controller_index);
-  t->WaitOnJavaScriptStep();
-  t->EndTest();
-}
-
-// Test that OpenVR controller input is registered via the Gamepad API.
-// Equivalent to
-// WebXrVrInputTest#testControllerClicksRegisteredOnDaydream
-IN_PROC_BROWSER_TEST_F(WebVrOpenVrBrowserTest,
-                       TestWebVrControllerInputRegistered) {
-  TestWebVrControllerInputRegistered(this);
-}
-
-#if BUILDFLAG(ENABLE_OPENXR)
-IN_PROC_BROWSER_TEST_F(WebVrOpenXrBrowserTest,
-                       TestWebVrControllerInputRegistered) {
-  TestWebVrControllerInputRegistered(this);
-}
-#endif  // BUILDFLAG(ENABLE_OPENXR)
-
 std::string TransformToColMajorString(const gfx::Transform& t) {
   float array[16];
   t.matrix().asColMajorf(array);
diff --git a/chrome/browser/vr/webxr_vr_isolated_device_service_test.cc b/chrome/browser/vr/webxr_vr_isolated_device_service_test.cc
index 8611550a..bbb561a 100644
--- a/chrome/browser/vr/webxr_vr_isolated_device_service_test.cc
+++ b/chrome/browser/vr/webxr_vr_isolated_device_service_test.cc
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "chrome/browser/vr/test/webvr_browser_test.h"
-
 #include "base/bind_helpers.h"
 #include "base/optional.h"
 #include "base/test/bind_test_util.h"
diff --git a/chrome/browser/vr/webxr_vr_pixel_browser_test.cc b/chrome/browser/vr/webxr_vr_pixel_browser_test.cc
index 4ab26731..2b502e9 100644
--- a/chrome/browser/vr/webxr_vr_pixel_browser_test.cc
+++ b/chrome/browser/vr/webxr_vr_pixel_browser_test.cc
@@ -10,7 +10,6 @@
 #include "chrome/browser/vr/test/mock_xr_device_hook_base.h"
 #include "chrome/browser/vr/test/multi_class_browser_test.h"
 #include "chrome/browser/vr/test/ui_utils.h"
-#include "chrome/browser/vr/test/webvr_browser_test.h"
 #include "chrome/browser/vr/test/webxr_vr_browser_test.h"
 
 #include <memory>
@@ -54,7 +53,7 @@
   std::move(callback).Run();
 }
 
-// Pixel test for WebVR/WebXR - start presentation, submit frames, get data back
+// Pixel test for WebXR - start presentation, submit frames, get data back
 // out. Validates that a pixel was rendered with the expected color.
 void TestPresentationPixelsImpl(WebXrVrBrowserTestBase* t,
                                 std::string filename) {
@@ -88,10 +87,6 @@
       << "Alpha channel of submitted color does not match expectation";
 }
 
-IN_PROC_BROWSER_TEST_F(WebVrOpenVrBrowserTest, TestPresentationPixels) {
-  TestPresentationPixelsImpl(this, "test_webvr_pixels");
-}
-
 // TODO(crbug.com/986621) - OpenXR currently hard codes data
 WEBXR_VR_ALL_RUNTIMES_BROWSER_TEST_F(TestPresentationPixels) {
   TestPresentationPixelsImpl(t, "test_webxr_pixels");
diff --git a/chrome/browser/vr/webxr_vr_spatial_tracking_test.cc b/chrome/browser/vr/webxr_vr_spatial_tracking_test.cc
index 15fe0f4..30fd9c2 100644
--- a/chrome/browser/vr/webxr_vr_spatial_tracking_test.cc
+++ b/chrome/browser/vr/webxr_vr_spatial_tracking_test.cc
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "chrome/browser/vr/test/webvr_browser_test.h"
-
 #include "build/build_config.h"
 #include "chrome/browser/vr/test/webxr_vr_browser_test.h"
 #include "content/public/test/browser_test_utils.h"
diff --git a/chrome/browser/vr/webxr_vr_tab_browser_test.cc b/chrome/browser/vr/webxr_vr_tab_browser_test.cc
index b70e8a7..c726366f 100644
--- a/chrome/browser/vr/webxr_vr_tab_browser_test.cc
+++ b/chrome/browser/vr/webxr_vr_tab_browser_test.cc
@@ -4,18 +4,17 @@
 
 #include "chrome/browser/ui/browser_tabstrip.h"
 #include "chrome/browser/vr/test/multi_class_browser_test.h"
-#include "chrome/browser/vr/test/webvr_browser_test.h"
 #include "chrome/browser/vr/test/webxr_vr_browser_test.h"
 #include "url/gurl.h"
 #include "url/url_constants.h"
 
 // Browser test equivalent of
 // chrome/android/javatests/src/.../browser/vr/WebXrVrTabTest.java.
-// End-to-end tests for testing WebXR/WebVR's interaction with multiple tabs.
+// End-to-end tests for testing WebXR's interaction with multiple tabs.
 
 namespace vr {
 
-// Tests that non-focused tabs cannot get pose information from WebVR/WebXR.
+// Tests that non-focused tabs cannot get pose information from WebXR.
 void TestPoseDataUnfocusedTabImpl(WebXrVrBrowserTestBase* t,
                                   std::string filename) {
   t->LoadUrlAndAwaitInitialization(t->GetFileUrlForHtmlTestFile(filename));
@@ -28,9 +27,6 @@
   t->EndTest(first_tab_web_contents);
 }
 
-IN_PROC_BROWSER_TEST_F(WebVrOpenVrBrowserTest, TestPoseDataUnfocusedTab) {
-  TestPoseDataUnfocusedTabImpl(this, "test_pose_data_unfocused_tab");
-}
 WEBXR_VR_ALL_RUNTIMES_BROWSER_TEST_F(TestPoseDataUnfocusedTab) {
   TestPoseDataUnfocusedTabImpl(t, "webxr_test_pose_data_unfocused_tab");
 }
diff --git a/chrome/browser/vr/webxr_vr_transition_browser_test.cc b/chrome/browser/vr/webxr_vr_transition_browser_test.cc
index e05ebafa..15f442471 100644
--- a/chrome/browser/vr/webxr_vr_transition_browser_test.cc
+++ b/chrome/browser/vr/webxr_vr_transition_browser_test.cc
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "chrome/browser/vr/test/webvr_browser_test.h"
-
 #include "build/build_config.h"
 #include "chrome/browser/vr/test/multi_class_browser_test.h"
 #include "chrome/browser/vr/test/webxr_vr_browser_test.h"
@@ -33,7 +31,7 @@
   session_state_stopping_ = false;
 }
 
-// Tests that WebVR/WebXR is not exposed if the flag is not on and the page does
+// Tests that WebXR is not exposed if the flag is not on and the page does
 // not have an origin trial token.
 void TestApiDisabledWithoutFlagSetImpl(WebXrVrBrowserTestBase* t,
                                        std::string filename) {
@@ -42,16 +40,6 @@
   t->EndTest();
 }
 
-// Tests that WebVR does not return any devices if OpenVR support is disabled.
-IN_PROC_BROWSER_TEST_F(WebVrRuntimelessBrowserTest,
-                       TestWebVrNoDevicesWithoutRuntime) {
-  LoadUrlAndAwaitInitialization(
-      GetFileUrlForHtmlTestFile("generic_webvr_page"));
-  EXPECT_FALSE(XrDeviceFound())
-      << "Found a VRDisplay even with OpenVR disabled";
-  AssertNoJavaScriptErrors();
-}
-
 // Tests that WebXR does not return any devices if all runtime support is
 // disabled.
 IN_PROC_BROWSER_TEST_F(WebXrVrRuntimelessBrowserTest,
@@ -65,12 +53,6 @@
 // Windows-specific tests.
 #ifdef OS_WIN
 
-IN_PROC_BROWSER_TEST_F(WebVrOpenVrBrowserTestWebVrDisabled,
-                       TestWebVrDisabledWithoutFlagSet) {
-  TestApiDisabledWithoutFlagSetImpl(this,
-                                    "test_webvr_disabled_without_flag_set");
-}
-
 #if BUILDFLAG(ENABLE_OPENXR)
 IN_PROC_MULTI_CLASS_BROWSER_TEST_F3(WebXrVrOpenVrBrowserTestWebXrDisabled,
                                     WebXrVrWmrBrowserTestWebXrDisabled,
@@ -105,16 +87,13 @@
   t->AssertNoJavaScriptErrors();
 }
 
-IN_PROC_BROWSER_TEST_F(WebVrOpenVrBrowserTest, TestRequestPresentEntersVr) {
-  TestPresentationEntryImpl(this, "generic_webvr_page");
-}
 WEBXR_VR_ALL_RUNTIMES_PLUS_INCOGNITO_BROWSER_TEST_F(
     TestRequestSessionEntersVr) {
   TestPresentationEntryImpl(t, "generic_webxr_page");
 }
 
 // Tests that window.requestAnimationFrame continues to fire while in
-// WebVR/WebXR presentation since the tab is still visible.
+// WebXR presentation since the tab is still visible.
 void TestWindowRafFiresWhilePresentingImpl(WebXrVrBrowserTestBase* t,
                                            std::string filename) {
   t->LoadUrlAndAwaitInitialization(t->GetFileUrlForHtmlTestFile(filename));
@@ -126,11 +105,6 @@
   t->EndTest();
 }
 
-IN_PROC_BROWSER_TEST_F(WebVrOpenVrBrowserTest,
-                       TestWindowRafFiresWhilePresenting) {
-  TestWindowRafFiresWhilePresentingImpl(
-      this, "test_window_raf_fires_while_presenting");
-}
 WEBXR_VR_ALL_RUNTIMES_BROWSER_TEST_F(TestWindowRafFiresWhilePresenting) {
   TestWindowRafFiresWhilePresentingImpl(
       t, "webxr_test_window_raf_fires_while_presenting");
diff --git a/chrome/browser/web_applications/web_app_install_finalizer.cc b/chrome/browser/web_applications/web_app_install_finalizer.cc
index 55b3948..77b3de30 100644
--- a/chrome/browser/web_applications/web_app_install_finalizer.cc
+++ b/chrome/browser/web_applications/web_app_install_finalizer.cc
@@ -123,7 +123,10 @@
   web_app->SetDescription(base::UTF16ToUTF8(web_app_info.description));
   web_app->SetLaunchUrl(web_app_info.app_url);
   web_app->SetScope(web_app_info.scope);
-  web_app->SetThemeColor(web_app_info.theme_color);
+  if (web_app_info.theme_color) {
+    web_app->SetThemeColor(
+        SkColorSetA(*web_app_info.theme_color, SK_AlphaOPAQUE));
+  }
   web_app->SetDisplayMode(web_app_info.open_as_window
                               ? blink::mojom::DisplayMode::kStandalone
                               : blink::mojom::DisplayMode::kBrowser);
diff --git a/chrome/browser/web_applications/web_app_install_task_unittest.cc b/chrome/browser/web_applications/web_app_install_task_unittest.cc
index 85f46a9..99975d4d 100644
--- a/chrome/browser/web_applications/web_app_install_task_unittest.cc
+++ b/chrome/browser/web_applications/web_app_install_task_unittest.cc
@@ -369,6 +369,7 @@
   const std::string description = "Description";
   const GURL scope = GURL("https://example.com/scope");
   const base::Optional<SkColor> theme_color = 0xAABBCCDD;
+  const base::Optional<SkColor> expected_theme_color = 0xFFBBCCDD;  // Opaque.
 
   const AppId app_id = GenerateAppIdFromURL(url);
 
@@ -402,7 +403,7 @@
   EXPECT_EQ(description, web_app->description());
   EXPECT_EQ(url, web_app->launch_url());
   EXPECT_EQ(scope, web_app->scope());
-  EXPECT_EQ(theme_color, web_app->theme_color());
+  EXPECT_EQ(expected_theme_color, web_app->theme_color());
 }
 
 TEST_F(WebAppInstallTaskTest, AlreadyInstalled) {
@@ -502,6 +503,7 @@
   const std::string manifest_name = "Name from Manifest";
   const GURL manifest_scope = GURL("https://example.com/scope");
   const base::Optional<SkColor> manifest_theme_color = 0xAABBCCDD;
+  const base::Optional<SkColor> expected_theme_color = 0xFFBBCCDD;  // Opaque.
 
   {
     auto manifest = std::make_unique<blink::Manifest>();
@@ -541,7 +543,7 @@
   EXPECT_EQ(manifest_start_url, web_app->launch_url());
   EXPECT_EQ(renderer_description, web_app->description());
   EXPECT_EQ(manifest_scope, web_app->scope());
-  EXPECT_EQ(manifest_theme_color, web_app->theme_color());
+  EXPECT_EQ(expected_theme_color, web_app->theme_color());
 }
 
 TEST_F(WebAppInstallTaskTest, GetIcons) {
diff --git a/chrome/renderer/extensions/media_galleries_custom_bindings.cc b/chrome/renderer/extensions/media_galleries_custom_bindings.cc
index 5912488..870b651 100644
--- a/chrome/renderer/extensions/media_galleries_custom_bindings.cc
+++ b/chrome/renderer/extensions/media_galleries_custom_bindings.cc
@@ -8,7 +8,7 @@
 
 #include "base/bind.h"
 #include "extensions/renderer/script_context.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "third_party/blink/public/platform/url_conversion.h"
 #include "third_party/blink/public/web/web_document.h"
 #include "third_party/blink/public/web/web_dom_file_system.h"
diff --git a/chrome/renderer/extensions/sync_file_system_custom_bindings.cc b/chrome/renderer/extensions/sync_file_system_custom_bindings.cc
index 34583e97..9f549b2 100644
--- a/chrome/renderer/extensions/sync_file_system_custom_bindings.cc
+++ b/chrome/renderer/extensions/sync_file_system_custom_bindings.cc
@@ -8,7 +8,7 @@
 
 #include "base/bind.h"
 #include "extensions/renderer/script_context.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "third_party/blink/public/web/web_dom_file_system.h"
 #include "third_party/blink/public/web/web_local_frame.h"
 #include "v8/include/v8.h"
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index 7f09bd9..8ae7c844 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -198,7 +198,6 @@
     "//components/sync:test_support",
     "//components/sync_preferences:test_support",
     "//components/sync_sessions:test_support",
-    "//components/unified_consent:test_support",
     "//components/update_client:test_support",
     "//components/variations:test_support",
     "//components/web_resource:test_support",
@@ -1287,6 +1286,7 @@
       "../browser/ui/views/webview_accessibility_browsertest.cc",
       "../browser/ui/web_applications/app_browser_controller_browsertest.cc",
       "../browser/ui/web_applications/web_app_badging_browsertest.cc",
+      "../browser/ui/web_applications/web_app_browsertest.cc",
       "../browser/ui/web_applications/web_app_engagement_browsertest.cc",
       "../browser/ui/web_applications/web_app_file_handling_browsertest.cc",
       "../browser/ui/web_applications/web_app_ui_manager_impl_browsertest.cc",
@@ -5235,7 +5235,10 @@
   }
 
   if (enable_webui_tab_strip) {
-    sources += [ "../browser/ui/webui/tab_strip/thumbnail_tracker_unittest.cc" ]
+    sources += [
+      "../browser/ui/webui/tab_strip/tab_strip_ui_layout_unittest.cc",
+      "../browser/ui/webui/tab_strip/thumbnail_tracker_unittest.cc",
+    ]
   }
 }
 
diff --git a/chrome/test/android/javatests/src/org/chromium/chrome/test/BottomSheetTestRule.java b/chrome/test/android/javatests/src/org/chromium/chrome/test/BottomSheetTestRule.java
index fe69b10..ec00a75 100644
--- a/chrome/test/android/javatests/src/org/chromium/chrome/test/BottomSheetTestRule.java
+++ b/chrome/test/android/javatests/src/org/chromium/chrome/test/BottomSheetTestRule.java
@@ -113,8 +113,7 @@
         setSheetState(mStartingBottomSheetState, /* animate = */ false);
     }
 
-    public void startMainActivityOnBottomSheet(@BottomSheet.SheetState int startingSheetState)
-            throws InterruptedException {
+    public void startMainActivityOnBottomSheet(@BottomSheet.SheetState int startingSheetState) {
         mStartingBottomSheetState = startingSheetState;
         startMainActivityOnBlankPage();
     }
@@ -124,7 +123,7 @@
     // ActivityTestRule interface. To work round this override the methods that start activities.
     // See https://crbug.com/726444.
     @Override
-    public void startMainActivityOnBlankPage() throws InterruptedException {
+    public void startMainActivityOnBlankPage() {
         super.startMainActivityOnBlankPage();
         afterStartingActivity();
     }
diff --git a/chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeActivityTestRule.java b/chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeActivityTestRule.java
index 9ad177d..5f16d95 100644
--- a/chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeActivityTestRule.java
+++ b/chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeActivityTestRule.java
@@ -400,7 +400,7 @@
      * Starts the Main activity and open a blank page.
      * This is faster and less flakyness-prone than starting on the NTP.
      */
-    public void startMainActivityOnBlankPage() throws InterruptedException {
+    public void startMainActivityOnBlankPage() {
         startMainActivityWithURL("about:blank");
     }
 
diff --git a/chrome/test/data/webui/signin_browsertest.cc b/chrome/test/data/webui/signin_browsertest.cc
index 508906cb..827784f 100644
--- a/chrome/test/data/webui/signin_browsertest.cc
+++ b/chrome/test/data/webui/signin_browsertest.cc
@@ -5,10 +5,9 @@
 #include "chrome/test/data/webui/signin_browsertest.h"
 
 #include "chrome/browser/signin/scoped_account_consistency.h"
-#include "components/unified_consent/scoped_unified_consent.h"
 
 SigninBrowserTest::SigninBrowserTest() {
-  EnableUnity();
+  EnableDice();
 }
 
 SigninBrowserTest::~SigninBrowserTest() {}
@@ -17,10 +16,3 @@
   scoped_account_consistency_ = std::make_unique<ScopedAccountConsistency>(
       signin::AccountConsistencyMethod::kDice);
 }
-
-void SigninBrowserTest::EnableUnity() {
-  EnableDice();
-  scoped_unified_consent_ =
-      std::make_unique<unified_consent::ScopedUnifiedConsent>(
-          unified_consent::UnifiedConsentFeatureState::kEnabled);
-}
diff --git a/chrome/test/data/webui/signin_browsertest.h b/chrome/test/data/webui/signin_browsertest.h
index c2a25a6..11b4f2a 100644
--- a/chrome/test/data/webui/signin_browsertest.h
+++ b/chrome/test/data/webui/signin_browsertest.h
@@ -9,7 +9,6 @@
 #include "base/test/scoped_feature_list.h"
 #include "chrome/browser/signin/scoped_account_consistency.h"
 #include "chrome/test/base/web_ui_browser_test.h"
-#include "components/unified_consent/scoped_unified_consent.h"
 
 class SigninBrowserTest : public WebUIBrowserTest {
  public:
@@ -18,12 +17,9 @@
 
  protected:
   void EnableDice();
-  void EnableUnity();
 
  private:
   std::unique_ptr<ScopedAccountConsistency> scoped_account_consistency_;
-  std::unique_ptr<unified_consent::ScopedUnifiedConsent>
-      scoped_unified_consent_;
 
   DISALLOW_COPY_AND_ASSIGN(SigninBrowserTest);
 };
diff --git a/chrome/test/data/xr/e2e_test_files/html/generic_webvr_page.html b/chrome/test/data/xr/e2e_test_files/html/generic_webvr_page.html
deleted file mode 100644
index d02b348..0000000
--- a/chrome/test/data/xr/e2e_test_files/html/generic_webvr_page.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<!--
-WebVR page without any code specific to one test
--->
-<html>
-  <head>
-    <link rel="stylesheet" type="text/css" href="../resources/webxr_e2e.css">
-  </head>
-  <body>
-    <canvas id="webgl-canvas"></canvas>
-    <script src="../../../../../../third_party/blink/web_tests/resources/testharness.js"></script>
-    <script src="../resources/webxr_e2e.js"></script>
-    <script src="../resources/webvr_boilerplate.js"></script>
-  </body>
-</html>
diff --git a/chrome/test/data/xr/e2e_test_files/html/generic_webvr_page_with_activate_listener.html b/chrome/test/data/xr/e2e_test_files/html/generic_webvr_page_with_activate_listener.html
deleted file mode 100644
index b386f541..0000000
--- a/chrome/test/data/xr/e2e_test_files/html/generic_webvr_page_with_activate_listener.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!doctype html>
-<!--
-Tests that scanning the Daydream View NFC tag on supported devices fires the
-vrdisplayactivate event
--->
-<html>
-  <head>
-    <link rel="stylesheet" type="text/css" href="../resources/webxr_e2e.css">
-  </head>
-  <body>
-    <canvas id="webgl-canvas"></canvas>
-    <script src="../../../../../../third_party/blink/web_tests/resources/testharness.js"></script>
-    <script src="../resources/webxr_e2e.js"></script>
-    <script>
-      window.addEventListener("vrdisplayactivate", () => {}, false);
-    </script>
-  </body>
-</html>
diff --git a/chrome/test/data/xr/e2e_test_files/html/test_device_capabilities_match_expectations.html b/chrome/test/data/xr/e2e_test_files/html/test_device_capabilities_match_expectations.html
deleted file mode 100644
index 3b03c7d..0000000
--- a/chrome/test/data/xr/e2e_test_files/html/test_device_capabilities_match_expectations.html
+++ /dev/null
@@ -1,62 +0,0 @@
-<!doctype html>
-<!--
-Tests that the reported device capabilities match expectations.
--->
-<html>
-  <head>
-    <link rel="stylesheet" type="text/css" href="../resources/webxr_e2e.css">
-  </head>
-  <body>
-    <canvas id="webgl-canvas"></canvas>
-    <script src="../../../../../../third_party/blink/web_tests/resources/testharness.js"></script>
-    <script src="../resources/webxr_e2e.js"></script>
-    <script src="../resources/webvr_boilerplate.js"></script>
-    <script>
-      // All the current test devices have the same expectations, but that will
-      // change with additional device support, especially desktop.
-      var android_expectation = {
-        "isPresenting": false,
-        "capabilities": {
-          "hasPosition": false,
-          "hasExternalDisplay": false,
-          "canPresent": true,
-          "maxLayers": 1,
-        },
-      }
-      var expectations = {
-        "angler": android_expectation,  // Nexus 6P
-        "bullhead": android_expectation,  // Nexus 5X
-        "hammerhead": android_expectation,  // Nexus 5
-        "marlin": android_expectation,  // Pixel XL
-        "vega": android_expectation,  // Lenovo Mirage Solo
-        "sailfish": android_expectation,  // Pixel
-        "taimen": android_expectation,  // Pixel 2 XL
-        "walleye": android_expectation,  // Pixel 2
-        "VR Orientation Device": { // GVR-less Magic Window implementation
-          "isPresenting": false,
-          "capabilities": {
-            "hasPosition": false,
-            "hasExternalDisplay": false,
-            "canPresent": false,
-            "maxLayers": 0,
-          }
-        },
-      }
-      function stepCheckDeviceCapabilities(device) {
-        if (!(device in expectations)) {
-          assert_unreached("Given device " + device + " not in expectations");
-          done();
-          return;
-        }
-        let expectation = expectations[device];
-        assert_equals(vrDisplay["isPresenting"], expectation["isPresenting"]);
-        for (var capability in expectation["capabilities"]) {
-          assert_equals(vrDisplay["capabilities"][capability],
-                        expectation["capabilities"][capability],
-                        capability);
-        }
-        done();
-      }
-    </script>
-  </body>
-</html>
diff --git a/chrome/test/data/xr/e2e_test_files/html/test_gamepad_button.html b/chrome/test/data/xr/e2e_test_files/html/test_gamepad_button.html
deleted file mode 100644
index e1f89fa7..0000000
--- a/chrome/test/data/xr/e2e_test_files/html/test_gamepad_button.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<!doctype html>
-<!--
-Tests that screen taps when using Cardboard are translated into controller
-input, and that Daydream controller input is registered when using Daydream
-View.
--->
-<html>
-  <head>
-    <link rel="stylesheet" type="text/css" href="../resources/webxr_e2e.css">
-  </head>
-  <body>
-    <canvas id="webgl-canvas"></canvas>
-    <script src="../../../../../../third_party/blink/web_tests/resources/testharness.js"></script>
-    <script src="../resources/webxr_e2e.js"></script>
-    <script src="../resources/webvr_boilerplate.js"></script>
-    <script>
-      var pressed = false;
-      var index = -1;
-      var canStartTest = false;
-      var frameCounter = 0;
-      var lastInputChangeFrame = 0;
-      var lastInputValue = false;
-
-      window.addEventListener("gamepadconnected", function(e) {
-        assert_equals(index, -1, "Should only have one connected controller");
-        index = e.gamepad.index;
-      });
-
-      // GVR can very briefly disconnect then reconnect the controller, so
-      // handle that case.
-      window.addEventListener("gamepaddisconnected", function(e) {
-        index = -1;
-      });
-
-      // Returns true if no input has been received for 60 frames.
-      function isInputDrained() {
-        return frameCounter - lastInputChangeFrame > 60;
-      }
-
-      function gamepadFrameCallback() {
-        if (index == -1) return;
-        frameCounter++;
-        var gp = navigator.getGamepads()[index];
-        // This can happen if the controller has been briefly disconnected.
-        if (gp == null) return;
-        if (!canStartTest) {
-          if (gp.buttons[0].pressed != lastInputValue) {
-            lastInputChangeFrame = frameCounter;
-          }
-          lastInputValue = gp.buttons[0].pressed;
-          return;
-        }
-        if (!pressed && gp.buttons[0].pressed == true) {
-          pressed = true;
-          // Unregister the callback so that we don't call
-          // finishJavaScriptStep() multiple times without acking if the test
-          // code doesn't ack within a single frame.
-          onPresentingAnimationFrameCallback = null;
-          finishJavaScriptStep();
-        }
-        if (pressed && gp.buttons[0].pressed == false) {
-          onPresentingAnimationFrameCallback = null;
-          done();
-        }
-      }
-
-      onPresentingAnimationFrameCallback = gamepadFrameCallback;
-    </script>
-  </body>
-</html>
diff --git a/chrome/test/data/xr/e2e_test_files/html/test_navigation_webvr_page.html b/chrome/test/data/xr/e2e_test_files/html/test_navigation_webxr_page2.html
similarity index 73%
rename from chrome/test/data/xr/e2e_test_files/html/test_navigation_webvr_page.html
rename to chrome/test/data/xr/e2e_test_files/html/test_navigation_webxr_page2.html
index bdfda6d..6f5f4c1 100644
--- a/chrome/test/data/xr/e2e_test_files/html/test_navigation_webvr_page.html
+++ b/chrome/test/data/xr/e2e_test_files/html/test_navigation_webxr_page2.html
@@ -1,11 +1,11 @@
 <!doctype html>
-<!-- WebVR page to test transitions. -->
+<!-- WebXR page to test transitions. -->
 <html>
   <body>
     <input type="checkbox" onclick="setFullscreen(this)" id="fullscreen">Fullscreen
     <canvas id="webgl-canvas"></canvas>
     <script src="../resources/webxr_e2e.js"></script>
-    <script src="../resources/webvr_boilerplate.js"></script>
+    <script src="../resources/webxr_boilerplate.js"></script>
     <script src="../resources/navigation_e2e.js"></script>
   </body>
 </html>
diff --git a/chrome/test/data/xr/e2e_test_files/html/test_nfc_fires_vrdisplayactivate.html b/chrome/test/data/xr/e2e_test_files/html/test_nfc_fires_vrdisplayactivate.html
deleted file mode 100644
index cdd0059..0000000
--- a/chrome/test/data/xr/e2e_test_files/html/test_nfc_fires_vrdisplayactivate.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!doctype html>
-<!--
-Tests that scanning the Daydream View NFC tag on supported devices fires the
-vrdisplayactivate event
--->
-<html>
-  <head>
-    <link rel="stylesheet" type="text/css" href="../resources/webxr_e2e.css">
-    <meta name="timeout" content="long">
-  </head>
-  <body>
-    <canvas id="webgl-canvas"></canvas>
-    <script src="../../../../../../third_party/blink/web_tests/resources/testharness.js"></script>
-    <script src="../resources/webxr_e2e.js"></script>
-    <script src="../resources/webvr_boilerplate.js"></script>
-    <script>
-      function addListener() {
-        window.addEventListener("vrdisplayactivate", () => {
-          vrDisplay.requestPresent([{source: webglCanvas}]).then( () => {
-            // Do nothing
-          }, (err) => {
-            assert_unreached(
-                "Was unable to present with vrdisplayactivate: " + err);
-          }).then( () => { done() });
-        }, false);
-      }
-      // NFC scan triggered after page loaded and listener added
-    </script>
-  </body>
-</html>
diff --git a/chrome/test/data/xr/e2e_test_files/html/test_pose_data_unfocused_tab.html b/chrome/test/data/xr/e2e_test_files/html/test_pose_data_unfocused_tab.html
deleted file mode 100644
index 7dce4a61..0000000
--- a/chrome/test/data/xr/e2e_test_files/html/test_pose_data_unfocused_tab.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<!doctype html>
-<!--
-Tests that WebVR doesn't update frame data when the tab is not focused
--->
-<html>
-  <head>
-    <link rel="stylesheet" type="text/css" href="../resources/webxr_e2e.css">
-  </head>
-  <body>
-    <canvas id="webgl-canvas"></canvas>
-    <script src="../../../../../../third_party/blink/web_tests/resources/testharness.js"></script>
-    <script src="../resources/webxr_e2e.js"></script>
-    <script src="../resources/webvr_boilerplate.js"></script>
-    <script>
-      var fd = null;
-      let counter = 0;
-
-      function stepCheckFrameDataWhileFocusedTab() {
-        function onAnimationFrame() {
-          // TODO(bsheedy): This is a workaround for crbug.com/787196. Either
-          // remove the workaround once fixed or remove this todo.
-          // Let several animation frames get triggered so we're sure to have a
-          // pose
-          if (counter <= 2) {
-            counter++;
-            vrDisplay.requestAnimationFrame(onAnimationFrame);
-            return;
-          }
-          fd = new VRFrameData();
-          assert_true(vrDisplay.getFrameData(fd),
-              "getFrameData says it updated the object");
-          assert_true(fd != null,
-              "frame data is no longer null");
-          assert_true(fd.pose != null,
-              "frame data's pose is non-null");
-          finishJavaScriptStep();
-        }
-        // Make sure at least one rAF call has happened so we get valid data
-        vrDisplay.requestAnimationFrame(onAnimationFrame);
-      }
-
-      function stepCheckFrameDataWhileNonFocusedTab() {
-        assert_false(vrDisplay.getFrameData(fd),
-            "getFrameData shouldn't provide new data when tab not focused");
-        done();
-      }
-    </script>
-  </body>
-</html>
diff --git a/chrome/test/data/xr/e2e_test_files/html/test_presentation_locks_focus.html b/chrome/test/data/xr/e2e_test_files/html/test_presentation_locks_focus.html
deleted file mode 100644
index 2b03cbca..0000000
--- a/chrome/test/data/xr/e2e_test_files/html/test_presentation_locks_focus.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!doctype html>
-<!--
-Tests that when a screen taps causes a frame that isn't presenting to gain
-focus, that the presenting frame still receives input.
--->
-<html>
-  <head>
-    <link rel="stylesheet" type="text/css" href="../resources/webxr_e2e.css">
-  </head>
-  <body>
-    <canvas id="webgl-canvas"></canvas>
-    <script src="../../../../../../third_party/blink/web_tests/resources/testharness.js"></script>
-    <script src="../resources/webxr_e2e.js"></script>
-    <script src="../resources/webvr_boilerplate.js"></script>
-    <script>
-      var rafCount = 0;
-
-      function stepSetupFocusLoss() {
-        onPresentingAnimationFrameCallback = null;
-        setTimeout(function() {
-          document.getElementById('externalframe').contentWindow.focus();
-        }, 1000);
-      }
-
-      window.onblur = function() {
-        onPresentingAnimationFrameCallback = function() {
-          if (rafCount == 3) {
-            done();
-          }
-          rafCount++;
-        }
-      }
-    </script>
-    <iframe id="externalframe" width="1" height="1" src="about:blank" />
-  </body>
-</html>
diff --git a/chrome/test/data/xr/e2e_test_files/html/test_presentation_promise_rejected_if_don_canceled.html b/chrome/test/data/xr/e2e_test_files/html/test_presentation_promise_rejected_if_don_canceled.html
deleted file mode 100644
index 47557e1..0000000
--- a/chrome/test/data/xr/e2e_test_files/html/test_presentation_promise_rejected_if_don_canceled.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!doctype html>
-<!--
-Used to test that the promise returned by WebVR's requestPresent rejects if
-the DON flow is canceled.
--->
-<html>
-  <head>
-    <link rel="stylesheet" type="text/css" href="../resources/webxr_e2e.css">
-  </head>
-  <body>
-    <canvas id="webgl-canvas"></canvas>
-    <script src="../../../../../../third_party/blink/web_tests/resources/testharness.js"></script>
-    <script src="../resources/webxr_e2e.js"></script>
-    <script src="../resources/webvr_boilerplate.js"></script>
-    <script>
-      function onVrRequestPresentWithDon() {
-        vrDisplay.requestPresent([{source: webglCanvas}]).then( () => {
-          assert_unreached("requestPresent promise resolved");
-        }, () => {
-          // Do nothing when the promise is rejected
-        }).then( () => {
-          done();
-        });
-      }
-      webglCanvas.onclick = onVrRequestPresentWithDon;
-    </script>
-  </body>
-</html>
diff --git a/chrome/test/data/xr/e2e_test_files/html/test_presentation_promise_unresolved_during_don.html b/chrome/test/data/xr/e2e_test_files/html/test_presentation_promise_unresolved_during_don.html
deleted file mode 100644
index b607d2d..0000000
--- a/chrome/test/data/xr/e2e_test_files/html/test_presentation_promise_unresolved_during_don.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!doctype html>
-<!--
-Used to test that the promise returned by WebVR's requestPresent does not get
-resolved or rejected while the DON flow is active.
--->
-<html>
-  <head>
-    <link rel="stylesheet" type="text/css" href="../resources/webxr_e2e.css">
-  </head>
-  <body>
-    <canvas id="webgl-canvas"></canvas>
-    <script src="../../../../../../third_party/blink/web_tests/resources/testharness.js"></script>
-    <script src="../resources/webxr_e2e.js"></script>
-    <script src="../resources/webvr_boilerplate.js"></script>
-    <script>
-      function onVrRequestPresentWithDon() {
-        vrDisplay.requestPresent([{source: webglCanvas}]).then( () => {
-          assert_unreached("requestPresent promise resolved");
-        }, () => {
-          assert_unreached("requestPresent promise rejected");
-        });
-        window.setTimeout( () => { done(); }, 2000);
-      }
-      webglCanvas.onclick = onVrRequestPresentWithDon;
-    </script>
-  </body>
-</html>
diff --git a/chrome/test/data/xr/e2e_test_files/html/test_requestPresent_enters_vr.html b/chrome/test/data/xr/e2e_test_files/html/test_requestPresent_enters_vr.html
deleted file mode 100644
index d475c489..0000000
--- a/chrome/test/data/xr/e2e_test_files/html/test_requestPresent_enters_vr.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!doctype html>
-<!--
-Tests that requestPresent actually enters VR from Chrome's view
--->
-<html>
-  <head>
-    <link rel="stylesheet" type="text/css" href="../resources/webxr_e2e.css">
-  </head>
-  <body>
-    <canvas id="webgl-canvas"></canvas>
-    <script src="../../../../../../third_party/blink/web_tests/resources/testharness.js"></script>
-    <script src="../resources/webxr_e2e.js"></script>
-    <script src="../resources/webvr_boilerplate.js"></script>
-    <script>
-      window.addEventListener("vrdisplaypresentchange", () => { done(); }, false);
-    </script>
-  </body>
-</html>
diff --git a/chrome/test/data/xr/e2e_test_files/html/test_screen_taps_not_registered.html b/chrome/test/data/xr/e2e_test_files/html/test_screen_taps_not_registered.html
deleted file mode 100644
index 8b6f579..0000000
--- a/chrome/test/data/xr/e2e_test_files/html/test_screen_taps_not_registered.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<!doctype html>
-<!--
-Tests that screen taps aren't registered while in VR
--->
-<html>
-  <head>
-    <link rel="stylesheet" type="text/css" href="../resources/webxr_e2e.css">
-  </head>
-  <body>
-    <canvas id="webgl-canvas"></canvas>
-    <script src="../../../../../../third_party/blink/web_tests/resources/testharness.js"></script>
-    <script src="../resources/webxr_e2e.js"></script>
-    <script src="../resources/webvr_boilerplate.js"></script>
-    <script>
-      var numTaps = 0;
-      webglCanvas.addEventListener("click", () => {numTaps++;}, false);
-
-      function stepVerifyNoInitialTaps() {
-        assert_equals(numTaps, 0, "No initial taps");
-        finishJavaScriptStep();
-      }
-
-      function stepVerifyNoAdditionalTaps() {
-        // We expect 1 tap from entering VR
-        assert_equals(numTaps, 1,
-            "Only one tap registered after two taps given");
-        done();
-      }
-
-    </script>
-  </body>
-</html>
diff --git a/chrome/test/data/xr/e2e_test_files/html/test_webvr_autopresent.html b/chrome/test/data/xr/e2e_test_files/html/test_webvr_autopresent.html
deleted file mode 100644
index ae46ee7..0000000
--- a/chrome/test/data/xr/e2e_test_files/html/test_webvr_autopresent.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!doctype html>
-<!--
-Tests that an intent from a trusted app allows a page to auto present without
-the need for a user gesture.
--->
-<html>
-  <head>
-    <link rel="stylesheet" type="text/css" href="../resources/webxr_e2e.css">
-  </head>
-  <body>
-    <canvas id="webgl-canvas"></canvas>
-    <script src="../../../../../../third_party/blink/web_tests/resources/testharness.js"></script>
-    <script src="../resources/webxr_e2e.js"></script>
-    <script src="../resources/webvr_boilerplate.js"></script>
-    <script>
-      // We need to wait for vrDisplay to be non-null before adding the
-      // listener, so poll it
-      function pollVrDisplay() {
-        if (vrDisplay == null) {
-          window.setTimeout(pollVrDisplay, 100);
-          return
-        }
-        window.addEventListener("vrdisplayactivate", () => {
-          vrDisplay.requestPresent([{source: webglCanvas}]).then( () => {
-            // Do nothing
-          }, () => {
-            assert_unreached("requestPresent promise rejected");
-          }).then( () => {
-            done();
-          });
-        }, false);
-      }
-      window.setTimeout(pollVrDisplay, 100);
-    </script>
-  </body>
-</html>
diff --git a/chrome/test/data/xr/e2e_test_files/html/test_webvr_disabled_without_flag_set.html b/chrome/test/data/xr/e2e_test_files/html/test_webvr_disabled_without_flag_set.html
deleted file mode 100644
index 6abe6231..0000000
--- a/chrome/test/data/xr/e2e_test_files/html/test_webvr_disabled_without_flag_set.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!doctype html>
-<!--
-Tests that the WebVR API is not present if the flag to enable it is not set.
--->
-<html>
-  <head>
-    <link rel="stylesheet" type="text/css" href="../resources/webxr_e2e.css">
-  </head>
-  <body>
-    <canvas id="webgl-canvas"></canvas>
-    <script src="../../../../../../third_party/blink/web_tests/resources/testharness.js"></script>
-    <script src="../resources/webxr_e2e.js"></script>
-  </body>
-  <script>
-    if (navigator.getVRDisplays) {
-      assert_unreached("API is visible");
-    }
-    done();
-  </script>
-</html>
diff --git a/chrome/test/data/xr/e2e_test_files/html/test_webvr_pixels.html b/chrome/test/data/xr/e2e_test_files/html/test_webvr_pixels.html
deleted file mode 100644
index af3b6cf..0000000
--- a/chrome/test/data/xr/e2e_test_files/html/test_webvr_pixels.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!doctype html>
-<!--
-Tests WebVR pixel data is submitted correctly.
--->
-<html>
-  <head>
-    <link rel="stylesheet" type="text/css" href="../resources/webxr_e2e.css">
-  </head>
-  <body>
-    <canvas id="webgl-canvas"></canvas>
-    <script src="../../../../../../third_party/blink/web_tests/resources/testharness.js"></script>
-    <script src="../resources/webxr_e2e.js"></script>
-    <script src="../resources/webvr_boilerplate.js"></script>
-    <script>
-      function finishTest() {
-        done();
-      }
-    </script>
-  </body>
-</html>
diff --git a/chrome/test/data/xr/e2e_test_files/html/test_webvr_reentry_from_vr_browser.html b/chrome/test/data/xr/e2e_test_files/html/test_webvr_reentry_from_vr_browser.html
deleted file mode 100644
index 5599efa..0000000
--- a/chrome/test/data/xr/e2e_test_files/html/test_webvr_reentry_from_vr_browser.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<!doctype html>
-<!--
-Tests that WebVR continues to work (rAFs continue to fire) after re-entering
-presentation from the VR browser.
--->
-<html>
-  <head>
-    <link rel="stylesheet" type="text/css" href="../resources/webxr_e2e.css">
-  </head>
-  <body>
-    <canvas id="webgl-canvas"></canvas>
-    <script src="../../../../../../third_party/blink/web_tests/resources/testharness.js"></script>
-    <script src="../resources/webxr_e2e.js"></script>
-    <script src="../resources/webvr_boilerplate.js"></script>
-    <script>
-      function stepVerifyFirstPresent() {
-        onPresentingAnimationFrameCallback = () => {
-          onPresentingAnimationFrameCallback = null;
-          finishJavaScriptStep();
-        };
-      }
-
-      function stepVerifyMagicWindow() {
-        onMagicWindowAnimationFrameCallback = () => {
-          onMagicWindowAnimationFrameCallback = null;
-          finishJavaScriptStep();
-        };
-      }
-
-      function stepVerifySecondPresent() {
-        onPresentingAnimationFrameCallback = () => {
-          done();
-        };
-      }
-    </script>
-  </body>
-</html>
diff --git a/chrome/test/data/xr/e2e_test_files/html/test_window_raf_fires_while_presenting.html b/chrome/test/data/xr/e2e_test_files/html/test_window_raf_fires_while_presenting.html
deleted file mode 100644
index 03a4748a..0000000
--- a/chrome/test/data/xr/e2e_test_files/html/test_window_raf_fires_while_presenting.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!doctype html>
-<!--
-Tests that window.requestAnimationFrame continues to fire while in WebVR
-presentation on Windows/desktop
--->
-<html>
-  <head>
-    <link rel="stylesheet" type="text/css" href="../resources/webxr_e2e.css">
-  </head>
-  <body>
-    <canvas id="webgl-canvas"></canvas>
-    <script src="../../../../../../third_party/blink/web_tests/resources/testharness.js"></script>
-    <script src="../resources/webxr_e2e.js"></script>
-    <script src="../resources/webvr_boilerplate.js"></script>
-    <script>
-      function stepVerifyBeforePresent() {
-        window.requestAnimationFrame( () => {
-          finishJavaScriptStep();
-        });
-      }
-
-      function stepVerifyDuringPresent() {
-        window.requestAnimationFrame( () => {
-          finishJavaScriptStep();
-        });
-      }
-
-      function stepVerifyAfterPresent() {
-        window.requestAnimationFrame( () => {
-          done();
-        });
-      }
-    </script>
-  </body>
-</html>
diff --git a/chrome/test/data/xr/e2e_test_files/html/test_window_raf_stops_firing_while_presenting.html b/chrome/test/data/xr/e2e_test_files/html/test_window_raf_stops_firing_while_presenting.html
deleted file mode 100644
index 83c07651..0000000
--- a/chrome/test/data/xr/e2e_test_files/html/test_window_raf_stops_firing_while_presenting.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!doctype html>
-<!--
-Tests that window.requestAnimationFrame stops firing while in WebVR presentation
-on Android.
--->
-<html>
-  <head>
-    <link rel="stylesheet" type="text/css" href="../resources/webxr_e2e.css">
-  </head>
-  <body>
-    <canvas id="webgl-canvas"></canvas>
-    <script src="../../../../../../third_party/blink/web_tests/resources/testharness.js"></script>
-    <script src="../resources/webxr_e2e.js"></script>
-    <script src="../resources/webvr_boilerplate.js"></script>
-    <script>
-      var numWindowRafs = 0;
-
-      function stepVerifyBeforePresent() {
-        window.requestAnimationFrame( () => {
-          finishJavaScriptStep();
-        });
-      }
-
-      function stepVerifyDuringPresent() {
-        let handle = window.requestAnimationFrame( () => {
-          numWindowRafs++;
-          // Even though we wait for setVSyncPaused to be called Java-side,
-          // 1-2 frames might still get window rAFs due to the call to the
-          // renderer being asynchronous.
-          assert_less_than(numWindowRafs, 3);
-        });
-        window.setTimeout( () => {
-          window.cancelAnimationFrame(handle);
-          finishJavaScriptStep();
-        }, 500);
-      }
-
-      function stepVerifyAfterPresent() {
-        window.requestAnimationFrame( () => {
-          done();
-        });
-      }
-    </script>
-  </body>
-</html>
diff --git a/chrome/test/data/xr/e2e_test_files/html/webvr_page_submits_once.html b/chrome/test/data/xr/e2e_test_files/html/webvr_page_submits_once.html
deleted file mode 100644
index 3d6bd1f6..0000000
--- a/chrome/test/data/xr/e2e_test_files/html/webvr_page_submits_once.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!doctype html>
-<!--
-WebVR page without any code specific to one test
--->
-<html>
-  <head>
-    <link rel="stylesheet" type="text/css" href="../resources/webxr_e2e.css">
-  </head>
-  <body>
-    <canvas id="webgl-canvas"></canvas>
-    <script src="../resources/webxr_e2e.js"></script>
-    <script src="../resources/webvr_boilerplate.js"></script>
-    <script>
-      var has_submitted = false;
-      onPresentingAnimationFrameCallback = function() {
-        if (has_submitted && shouldSubmitFrame) {
-          shouldSubmitFrame = false;
-          finishJavaScriptStep();
-        }
-        has_submitted = true;
-      };
-    </script>
-  </body>
-</html>
diff --git a/chrome/test/data/xr/e2e_test_files/resources/webvr_boilerplate.js b/chrome/test/data/xr/e2e_test_files/resources/webvr_boilerplate.js
deleted file mode 100644
index 52cd7d7..0000000
--- a/chrome/test/data/xr/e2e_test_files/resources/webvr_boilerplate.js
+++ /dev/null
@@ -1,104 +0,0 @@
-// 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.
-
-// Add additional setup steps to the object from webvr_e2e.js if it exists.
-if (typeof initializationSteps !== "undefined") {
-  initializationSteps["getVRDisplays"] = false;
-} else {
-  // Create here if it doesn't exist so we can access it later without checking
-  // if it's defined.
-  var initializationSteps = {};
-}
-
-var webglCanvas = document.getElementById("webgl-canvas");
-var glAttribs = {
-  alpha: false,
-};
-var gl = webglCanvas.getContext("webgl", glAttribs);
-var vrDisplay = null;
-var frameData = null;
-var onMagicWindowAnimationFrameCallback = null;
-var onPresentingAnimationFrameCallback = null;
-var shouldSubmitFrame = true;
-var hasPresentedFrame = false;
-
-function onResize() {
-  if (vrDisplay && vrDisplay.isPresenting) {
-    var leftEye = vrDisplay.getEyeParameters("left");
-    var rightEye = vrDisplay.getEyeParameters("right");
-
-    webglCanvas.width = Math.max(leftEye.renderWidth, rightEye.renderWidth) * 2;
-    webglCanvas.height = Math.max(leftEye.renderHeight, rightEye.renderHeight);
-  } else {
-    webglCanvas.width = webglCanvas.offsetWidth * window.devicePixelRatio;
-    webglCanvas.height = webglCanvas.offsetHeight * window.devicePixelRatio;
-  }
-}
-
-function onVrPresentChange() {
-  onResize();
-}
-
-function onVrRequestPresent() {
-  vrDisplay.requestPresent([{source: webglCanvas}]);
-}
-
-function onAnimationFrame(t) {
-  if (vrDisplay == null) {
-    window.requestAnimationFrame(onAnimationFrame);
-    gl.viewport(0, 0, webglCanvas.width, webglCanvas.height);
-    return;
-  }
-  vrDisplay.requestAnimationFrame(onAnimationFrame);
-  // If presenting, set canvas to blue. Otherwise, red.
-  if (vrDisplay.isPresenting) {
-    vrDisplay.getFrameData(frameData);
-
-    gl.clearColor(0.0, 0.0, 1.0, 1.0);
-    gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
-
-    gl.viewport(0, 0, webglCanvas.width * 0.5, webglCanvas.height);
-    gl.viewport(webglCanvas.width * 0.5, 0, webglCanvas.width * 0.5,
-                webglCanvas.height);
-
-    if (onPresentingAnimationFrameCallback) {
-      onPresentingAnimationFrameCallback(frameData, gl);
-    }
-
-    if (shouldSubmitFrame) {
-      vrDisplay.submitFrame();
-      hasPresentedFrame = true;
-    }
-  } else {
-    if (onMagicWindowAnimationFrameCallback) {
-      onMagicWindowAnimationFrameCallback();
-    }
-    gl.clearColor(1.0, 0.0, 0.0, 1.0);
-    gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
-
-    gl.viewport(0, 0, webglCanvas.width, webglCanvas.height);
-  }
-}
-
-if (navigator.getVRDisplays) {
-  frameData = new VRFrameData();
-  navigator.getVRDisplays().then( (displays) => {
-    if (displays.length > 0) {
-      vrDisplay = displays[0];
-    }
-  }).then( () => {
-    initializationSteps["getVRDisplays"] = true;
-  });
-} else {
-  initializationSteps["getVRDisplays"] = true;
-}
-
-gl.clearColor(1.0, 0.0, 0.0, 1.0);
-gl.enable(gl.DEPTH_TEST);
-gl.enable(gl.CULL_FACE);
-window.addEventListener("resize", onResize, false);
-window.addEventListener("vrdisplaypresentchange", onVrPresentChange, false);
-window.requestAnimationFrame(onAnimationFrame);
-webglCanvas.onclick = onVrRequestPresent;
-onResize();
diff --git a/chrome/test/data/xr/e2e_test_files/resources/webvr_e2e.css b/chrome/test/data/xr/e2e_test_files/resources/webvr_e2e.css
deleted file mode 100644
index f3989d8..0000000
--- a/chrome/test/data/xr/e2e_test_files/resources/webvr_e2e.css
+++ /dev/null
@@ -1,22 +0,0 @@
-/* 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.
- */
-html, body {
-  margin: 0;
-  padding: 0;
-  width: 100%;
-  height: 100%;
-}
-#webgl-canvas {
-  box-sizing: border-box;
-  height: 100%;
-  left: 0;
-  margin: 0;
-  position: absolute;
-  top: 0;
-  width: 100%;
-}
-#log {
-  display: none;
-}
diff --git a/chrome/test/data/xr/e2e_test_files/resources/webvr_e2e.js b/chrome/test/data/xr/e2e_test_files/resources/webvr_e2e.js
deleted file mode 100644
index 7cfe9e6..0000000
--- a/chrome/test/data/xr/e2e_test_files/resources/webvr_e2e.js
+++ /dev/null
@@ -1,70 +0,0 @@
-// 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.
-
-var testPassed = false;
-var resultString = "";
-var javascriptDone = false;
-var initializationSteps = {load: false};
-var wouldPrompt = null;
-
-function finishJavaScriptStep() {
-  javascriptDone = true;
-}
-
-function checkPermissionRequestWouldTriggerPrompt(permissionName) {
-  wouldPrompt = null;
-  navigator.permissions.query({ name: permissionName }).then( (p) => {
-    wouldPrompt = p.state == 'prompt';
-  }, (err) => {
-    throw 'Permission query rejected: ' + err;
-  });
-}
-
-// Used to check when JavaScript is in an acceptable state to start testing
-// after a page load, as Chrome thinking that the page has finished loading
-// is not always sufficient. By default waits until the load event is fired.
-function isInitializationComplete() {
-  for (var step in initializationSteps) {
-    if (!initializationSteps[step]) {
-      return false;
-    }
-  }
-  return true;
-}
-
-window.addEventListener("load",
-    () => {initializationSteps["load"] = true;}, false);
-
-function checkResultsForFailures(tests, harness_status) {
-  testPassed = true;
-  if (harness_status["status"] != 0) {
-    testPassed = false;
-    resultString += "Harness failed due to " +
-                    (harness_status["status"] == 1 ? "error" : "timeout")
-                    + ". ";
-  }
-  for (var test in tests) {
-    let passed = (tests[test]["status"] == 0);
-    if (!passed) {
-      testPassed = false;
-      resultString += "FAIL ";
-    } else {
-      resultString += "PASS ";
-    }
-    resultString += tests[test]["name"] +
-                    (passed ? "" : (": " + tests[test]["message"])) +
-                    ". ";
-  }
-}
-
-// Only interact with testharness.js if it was actually included on the page
-// before this file
-if (typeof add_completion_callback !== "undefined") {
-  add_completion_callback( (tests, harness_status) => {
-    checkResultsForFailures(tests, harness_status);
-    console.debug("Test result: " + (testPassed ? "Pass" : "Fail"));
-    console.debug("Test result string: " + resultString);
-    finishJavaScriptStep();
-  });
-}
diff --git a/chrome/test/data/xr/e2e_test_files/resources/webxr_boilerplate.js b/chrome/test/data/xr/e2e_test_files/resources/webxr_boilerplate.js
index 905b52f..d3dd1102 100644
--- a/chrome/test/data/xr/e2e_test_files/resources/webxr_boilerplate.js
+++ b/chrome/test/data/xr/e2e_test_files/resources/webxr_boilerplate.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Add additional setup steps to the object from webvr_e2e.js if it exists.
+// Add additional setup steps to the object from webxr_e2e.js if it exists.
 if (typeof initializationSteps !== 'undefined') {
   initializationSteps['magicWindowStarted'] = false;
 } else {
diff --git a/chrome/test/vr/OWNERS b/chrome/test/vr/OWNERS
deleted file mode 100644
index 4673f18..0000000
--- a/chrome/test/vr/OWNERS
+++ /dev/null
@@ -1,8 +0,0 @@
-alcooper@chromium.org
-bialpio@chromium.org
-bsheedy@chromium.org
-cjgrant@chromium.org
-mthiesse@chromium.org
-
-# TEAM: xr-dev@chromium.org
-# COMPONENT: Internals>XR>VR
diff --git a/chrome/test/vr/auto_bisect.py b/chrome/test/vr/auto_bisect.py
deleted file mode 100755
index 49faf89..0000000
--- a/chrome/test/vr/auto_bisect.py
+++ /dev/null
@@ -1,779 +0,0 @@
-#!/usr/bin/python
-# Copyright 2018 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.
-
-"""Script to bisect a VR perf regression.
-
-This is only meant to be used on a developer's workstation, not on bots or any
-other sort of automated infrastructure. This is to help reduce the amount of
-work necessary to bisect VR perf regressions until the perf dashboard supports
-automatic bisects on devices outside of the Telemetry lab.
-
-As a result, this is a bit crude and makes a number of assumptions.
-"""
-
-
-import argparse
-import json
-import os
-import shutil
-import subprocess
-import sys
-import tempfile
-import time
-
-
-SUPPORTED_JSON_RESULT_FORMATS = {
-  'chartjson': 'The standard JSON output format for Telemetry.',
-  'printedjson': ('The JSON output format generated from parsing stdout from '
-                 'a test. This is the format used by tests that use '
-                 '//testing/perf/perf_test.h'),
-}
-# The revision that changed the way perf tests are run on swarming.
-PERF_FORMAT_CHANGE_REVISION = '0d271f583489024e3c163f0538d1ec29097b3615'
-
-
-class TempDir():
-  """Context manager for temp dirs since Python 2 doesn't have one."""
-  def __enter__(self):
-    self._dirpath = tempfile.mkdtemp()
-    return self._dirpath
-
-  def __exit__(self, type, value, traceback):
-    shutil.rmtree(self._dirpath)
-
-
-class SwitchDirsIfNotChromiumBisect():
-  """Context manager for switching between another repo and Chromium src.
-
-  No-op if the --bisect-repo option is not used, otherwise changes directories
-  to the specified repo's directory, then returns to the original directory when
-  the context is left.
-  """
-  def __init__(self, args):
-    self.starting_directory = os.getcwd()
-    self.target_directory = args.bisect_repo
-
-  def __enter__(self):
-    if self.target_directory:
-      os.chdir(self.target_directory)
-
-  def __exit__(self, type, value, traceback):
-    if self.target_directory:
-      os.chdir(self.starting_directory)
-
-
-def VerifyCwd():
-  """Checks that the script is being run from the Chromium root directory.
-
-  Not robust in the slightest, but should catch common issues like running the
-  script from the directory that it's located in.
-  """
-  if os.path.basename(os.getcwd()) != 'src':
-    raise RuntimeError('Script must be run from the Chromium root directory')
-
-
-def ParseArgsAndAssertValid():
-  """Parses all the provided arguments and ensures everything is valid."""
-  parser = argparse.ArgumentParser();
-
-  # Arguments related to the actual bisection
-  parser.add_argument_group('bisect arguments')
-  parser.add_argument('--binary-size-bisect', action='store_true',
-                      default=False,
-                      help='Bisect a binary size regression instead of a '
-                           'regular perf regression.')
-  parser.add_argument('--good-revision', required=True,
-                      help='A known good Git revision')
-  parser.add_argument('--bad-revision', required=True,
-                      help='A known bad Git revision')
-  parser.add_argument('--metric', required=True,
-                      help='The perf metric being bisected')
-  parser.add_argument('--story', required=True,
-                      help='The perf story to check the affected metric in')
-  parser.add_argument('--good-value', type=float,
-                      help='The value of the metric at the good revision. If '
-                           'not defined, an extra test iteration will be run '
-                           'to determine the value')
-  parser.add_argument('--bad-value', type=float,
-                      help='The value of the metric at the bad revision. If '
-                           'not defined, an extra test iteration will be run '
-                           'to determine the value')
-  def comma_separated(arg):
-    split_arg = arg.split(',')
-    if len(split_arg) != 2:
-      raise argparse.ArgumentError(
-          'Expected two comma-separated strings but '
-          'received %d' % len(split_arg))
-    return {split_arg[0]: split_arg[1]}
-  parser.add_argument('--checkout-override', action='append',
-                      type=comma_separated, default=[],
-                      dest='checkout_overrides',
-                      help='A comma-separated path/revision key/value pair. '
-                           'Each git checkout at the specified path will be '
-                           'synced to the specified revision after the normal '
-                           'sync. For example, passing '
-                           'third_party/android_ndk,abcdefg would cause the '
-                           'checkout in //third_party/android_ndk to be synced '
-                           'to revision abcdefg.')
-  parser.add_argument('--bisect-repo',
-                      help='A path to the repo that will be bisected instead '
-                           'the Chromium src repo. Meant to be used for '
-                           'bisecting rolls of DEPS (e.g V8 or Skia) after '
-                           'an initial bisect finds that a roll is the culprit '
-                           'CL. Using this option will disable any syncing of '
-                           'the Chromium src repo, so ensure that you are '
-                           'synced to the correct src revision before running '
-                           'with this option.')
-  parser.add_argument('--reset-before-sync', action='store_true',
-                      default=False,
-                      help='When set, runs "git reset --hard HEAD" before '
-                           'syncing. This has the potential to accidentally '
-                           'delete any uncommitted changes, but can help avoid '
-                           'random bisect failures.')
-  parser.add_argument('--num-attempts-before-marking-good', type=int, default=1,
-                      help='The number of times the test will be run before '
-                           'a revision can be marked as good. If all runs are '
-                           'found to be good, then the revision is good, '
-                           'otherwise bad. Overriding this can help when '
-                           'bisecting flaky metrics that fluctuate between '
-                           'good/bad values, but can significantly increase '
-                           'bisect time.')
-  parser.add_argument('--expected-json-result-format', default='chartjson',
-                      help='The data format the JSON results from the test are '
-                           'expected to be in. Supported values are: ' +
-                           (', '.join(SUPPORTED_JSON_RESULT_FORMATS.keys())))
-  parser.add_argument('--manual-mode', action='store_true', default=False,
-                      help='Does not automatically run gclient sync and waits '
-                           'for user input before starting the build/run '
-                           'process. Useful if a bisect needs to be run within '
-                           'a range where some change breaks gclient sync and '
-                           'a patch needs to be applied at each step before '
-                           'syncing.')
-  parser.add_argument('--apply-stash-before-sync',
-                      help='Applies the given stash entry (e.g. "stash@{0}"), '
-                           'commits it, and syncs to the new revision during '
-                           'each iteration. Primary use case for this is '
-                           'fixing bad DEPS entries in the revision range.')
-  parser.add_argument('--benchmark',
-                      help='The benchmark to run when bisecting a perf test. '
-                           'This will be automatically translated to the '
-                           'correct format and passed to the test, as the '
-                           'format is different depending on when the '
-                           'regression occured.')
-
-  parser.add_argument_group('swarming arguments')
-  parser.add_argument('--swarming-server',
-                      help='The swarming server to trigger the test on')
-  parser.add_argument('--isolate-server',
-                      help='The isolate server to upload the test to')
-  parser.add_argument('--dimension', action='append', type=comma_separated,
-                      default=[], dest='dimensions',
-                      help='A comma-separated swarming dimension key/value '
-                           'pair. At least one must be provided.')
-  parser.add_argument('--isolate-target',
-                      help='The target to isolate. Defaults to the build '
-                           'target')
-
-  parser.add_argument_group('compile arguments')
-  parser.add_argument('-j', '--parallel-jobs', type=int, default=1000,
-                      help='The number of parallel jobs ninja will compile '
-                           'with')
-  parser.add_argument('-l', '--load-limit', type=int, default=70,
-                      help='Don\'t start new ninja jobs if the average CPU '
-                           'is above this')
-  parser.add_argument('--build-output-dir',
-                      default=os.path.join('out', 'Release'),
-                      help='The directory that builds will take place in. '
-                           'Assumes that gn args have already been generated '
-                           'for the provided directory. Must be relative to '
-                           'the Chromium src/ directory, e.g. out/Release. '
-                           'When using --binary-size-bisect, this should be '
-                           'the output directory for the base build.')
-  parser.add_argument('--diff-build-output-dir',
-                      default=os.path.join('out', 'Release_diff'),
-                      help='Only used when --binary-size-bisect is set. The '
-                           'same as --build-output-dir, but for the diff '
-                           'build.')
-  parser.add_argument('--regenerate-args-after-sync', action='store_true',
-                      default=False,
-                      help='Causes the build output directory to be deleted '
-                           'and re-created using the same gn args after each '
-                           'sync. Normally not necessary, but can work around '
-                           'weird issues like the build target not being '
-                           'available unless the directory is re-created.')
-  parser.add_argument('--build-target', required=True,
-                      help='The target to build for testing')
-  parser.add_argument('--apk-name',
-                      help='Only used when --binary-size-bisect is set. The '
-                            'name of the APK that will be diffed.')
-
-  args, unknown_args = parser.parse_known_args()
-
-  if args.binary_size_bisect:
-    if not args.apk_name:
-      raise RuntimeError(
-          '--apk-name must be set when using --binary-size-bisect.')
-
-    if not args.diff_build_output_dir:
-      raise RuntimeError('--diff-build-output-dir must be set when using '
-                         '--binary-size-bisect.')
-
-  else:
-    # Set defaults.
-    if not args.isolate_target:
-      args.isolate_target = args.build_target
-
-    # Make sure we have at least one swarming dimension.
-    if len(args.dimensions) == 0:
-      raise RuntimeError('No swarming dimensions provided')
-
-    if not args.benchmark:
-      raise RuntimeError('No benchmark provided with --benchmark')
-
-    # Make sure we have all the information we need in order to run on Swarming.
-    if not (args.swarming_server and args.isolate_server):
-      raise RuntimeError('--swarming-server and --isolate-server must be set '
-                         'when running a non-binary-size bisection.')
-
-    # Make sure we're set to run at least one attempt per revision
-    if args.num_attempts_before_marking_good < 1:
-      raise RuntimeError(
-          '--num-attempts-before-marking-good set to invalid value %d' %
-          args.num_attempts_before_marking_good)
-
-    # Make sure the provided data format is supported.
-    if args.expected_json_result_format not in SUPPORTED_JSON_RESULT_FORMATS:
-      raise RuntimeError(
-          '--expected-json-result-format set to invalid value %s' %
-          args.expected_json_result_format)
-
-    # Determining initial values is not currently supported if we're bisecting a
-    # roll. Since bisecting a roll is almost always a product of a normal bisect
-    # pointing to a roll anyways, the user should have the good/bad values
-    # already.
-    if args.bisect_repo and (args.good_value is None or args.bad_value is None):
-      raise RuntimeError(
-          '--bisect-repo requires good and bad values to be set.')
-
-  return (args, unknown_args)
-
-
-def VerifyInput(args, unknown_args):
-  """Verifies with the user that the provided args are satisfactory.
-
-  Args:
-    args: The known args parsed by the argument parser
-    unknown_args: The unknown args parsed by the argument parser
-  """
-  print '======'
-  if args.manual_mode:
-    print ('Script is running in manual mode - you must manually run gclient '
-          'sync on each revision')
-  if args.bisect_repo:
-    print ('Script is set to bisect %s instead of Chromium src. gclient sync '
-           'will not be run, so ensure you are synced to the correct revision '
-           'and any patches, etc. you need are applied before running.' %
-           args.bisect_repo)
-  if args.binary_size_bisect:
-    print 'Script is running in binary size bisect mode.'
-  print 'This will start a bisect for a for:'
-  print 'Metric: %s' % args.metric
-  print 'Story: %s' % args.story
-  if args.benchmark:
-    print 'In the benchmark %s' % args.benchmark
-  if args.good_value == None and args.bad_value == None:
-    print 'The good and bad values at %s and %s will be determined' % (
-        args.good_revision, args.bad_revision)
-  elif args.good_value == None:
-    print ('The good value at %s will be determined, and the bad value of %f '
-           'at %s will be used' % (args.good_revision, args.bad_value,
-            args.bad_revision))
-  elif args.bad_value == None:
-    print ('The good value of %f at %s will be used, and the bad value at %s '
-           'will be determined' % (args.good_value, args.good_revision,
-            args.bad_revision))
-  else:
-    print 'Changing from %f at %s to %f at %s' % (args.good_value,
-        args.good_revision, args.bad_value, args.bad_revision)
-  if args.checkout_overrides:
-    for pair in args.checkout_overrides:
-      for key, val in pair.iteritems():
-        print '%s will be synced to revision %s' % (key, val)
-  if args.apply_stash_before_sync:
-    print 'The stash entry %s will be applied before each sync' % (
-        args.apply_stash_before_sync)
-  if args.num_attempts_before_marking_good > 1:
-    print ('Each revision must be found to be good %d times before actually '
-           'being marked as good' % args.num_attempts_before_marking_good)
-  print 'The data format that will be expected is %s: %s' % (
-      args.expected_json_result_format,
-      SUPPORTED_JSON_RESULT_FORMATS[args.expected_json_result_format])
-  print '======'
-  if args.binary_size_bisect:
-    print '%s will be built in both %s and %s' % (args.build_target,
-                                                  args.build_output_dir,
-                                                  args.diff_build_output_dir)
-  else:
-    print 'The test target %s will be built to %s' % (args.build_target,
-                                                      args.build_output_dir)
-  print '%d parallel jobs will be used with a load limit of %d' % (
-      args.parallel_jobs, args.load_limit)
-  if args.regenerate_args_after_sync:
-    print 'The build output directory will be recreated after each sync'
-  print '======'
-  if not args.binary_size_bisect:
-    print 'The target %s will be isolated and uploaded to %s' % (
-        args.isolate_target, args.isolate_server)
-    print 'The test will be triggered on %s with the following dimensions:' % (
-        args.swarming_server)
-    for pair in args.dimensions:
-      for key, val in pair.iteritems():
-        print '%s = %s' % (key, val)
-    print '======'
-  print 'The test will be run with these additional arguments:'
-  for extra_arg in unknown_args:
-    print extra_arg
-  print '======'
-  if args.reset_before_sync:
-    print '**WARNING** This will run git reset --hard HEAD'
-    print 'If you have any uncommitted changes, commit or stash them beforehand'
-  if raw_input('Are these settings correct? y/N').lower() != 'y':
-    print 'Aborting'
-    sys.exit(1)
-
-
-def SetupBisect(args):
-  """Does all the one-time setup for a bisect.
-
-  Args
-    args: The parsed args from argparse
-  Returns:
-    The first revision to sync to
-  """
-  with SwitchDirsIfNotChromiumBisect(args):
-    subprocess.check_output(['git', 'bisect', 'start'])
-    subprocess.check_output(['git', 'bisect', 'good', args.good_revision])
-    output = subprocess.check_output(
-        ['git', 'bisect', 'bad', args.bad_revision])
-    print output
-    # Get the revision, which is between []
-    revision = output.split('[', 1)[1].split(']', 1)[0]
-  return revision
-
-
-def RunTestOnSwarming(args, unknown_args, output_dir, use_new_perf_format):
-  """Isolates the test target and runs it on swarming to get perf results.
-
-  Args:
-    args: The known args parsed by the argument parser
-    unknown_args: The unknown args parsed by the argument parser
-    output_dir: The directory to save swarming results to
-    use_new_perf_format: Whether to use the new perf format that came with
-        revision 0d271f583489024e3c163f0538d1ec29097b3615 or not.
-  """
-  print "=== Isolating and running target %s ===" % args.isolate_target
-  print 'Isolating'
-  subprocess.check_output(['python', os.path.join('tools', 'mb', 'mb.py'),
-                           'isolate',
-                           '//%s' % args.build_output_dir, args.isolate_target])
-  print 'Uploading'
-  output = subprocess.check_output([
-      'python', os.path.join('tools', 'swarming_client', 'isolate.py'),
-      'batcharchive', '--isolate-server', args.isolate_server,
-      os.path.join(args.build_output_dir,
-                   '%s.isolated.gen.json' % args.isolate_target)])
-  isolate_hash = output.split(' ')[0]
-
-  swarming_args = [
-    'python', os.path.join('tools', 'swarming_client', 'swarming.py'), 'run',
-    '--isolated', isolate_hash,
-    '--isolate-server', args.isolate_server,
-    '--swarming', args.swarming_server,
-    '--task-output-dir', output_dir,
-  ]
-  for pair in args.dimensions:
-    for key, val in pair.iteritems():
-      swarming_args.extend(['--dimension', key, val])
-
-  # Temporary workaround for https://crbug.com/812428. We could get the same
-  # effect by isolating/uploading/running using "mb.py run -s", but that has
-  # the issue of apparently not having a way to specify a task output directory.
-  # So instead, manually append the additional arguments that running that way
-  # would do for us to work around the vpython issues until they're fixed.
-  # TODO(https://crbug.com/819719): Remove this when possible.
-  cipd_packages = [
-    '.swarming_module:infra/python/cpython/'
-    '${platform}:version:2.7.15.chromium14',
-
-    '.swarming_module:infra/tools/luci/logdog/butler/'
-    '${platform}:git_revision:e1abc57be62d198b5c2f487bfb2fa2d2eb0e867c',
-
-    '.swarming_module:infra/tools/luci/vpython-native/'
-    '${platform}:git_revision:b6cdec8586c9f8d3d728b1bc0bd4331330ba66fc',
-
-    '.swarming_module:infra/tools/luci/vpython/'
-    '${platform}:git_revision:b6cdec8586c9f8d3d728b1bc0bd4331330ba66fc',
-  ]
-  for package in cipd_packages:
-    swarming_args.extend(['--cipd-package', package])
-  swarming_args.extend([
-    '--named-cache',
-    'swarming_module_cache_vpython', '.swarming_module_cache/vpython',
-
-    '--env-prefix', 'PATH', '.swarming_module',
-    '--env-prefix', 'PATH', '.swarming_module/bin',
-    '--env-prefix', 'VPYTHON_VIRTUALENV_ROOT', '.swarming_module_cache/vpython',
-  ])
-
-  swarming_args.append('--')
-  # Determine how we're supposed to pass the benchmark to run to the test
-  if use_new_perf_format:
-    # Telemetry tests in the new format use --benchmarks, non-Telemetry use
-    # --gtest-benchmark-name. Non-Telemetry tests need to have --non-telemetry
-    # passed to them in order to work, so check for the presence of that flag.
-    is_non_telemetry = False
-    for arg in unknown_args:
-      if '--non-telemetry' in arg:
-        is_non_telemetry = True
-        break
-    if is_non_telemetry:
-      swarming_args.append('--gtest-benchmark-name=%s' % args.benchmark)
-    else:
-      swarming_args.append('--benchmarks=%s' % args.benchmark)
-
-  else:
-    # The old perf format simply passed the benchmark to run as the first
-    # positional argument
-    swarming_args.append(args.benchmark)
-
-  swarming_args.extend(unknown_args)
-  swarming_args.extend([
-      '--isolated-script-test-output',
-      '${ISOLATED_OUTDIR}/output.json',
-      '--isolated-script-test-perf-output',
-      '${ISOLATED_OUTDIR}/perftest-output.json',
-      '--output-format', 'chartjson',
-      '--chromium-output-directory', args.build_output_dir])
-  print 'Running test %s' % (
-      '(new format)' if use_new_perf_format else '(old format)')
-  subprocess.check_output(swarming_args)
-
-
-def RunBinarySizeDiff(args, output_dir):
-  """Locally runs a binary size diff on the two APKs specified by args.
-
-  Args:
-    args: The known args parsed from the argument parser
-    output_dir: The directory to save diff results to
-  """
-  print 'Diffing APKs'
-  subprocess.check_output(
-      ['python', os.path.join('build', 'android', 'diff_resource_sizes.py'),
-       '--base-apk', os.path.join(args.build_output_dir, 'apks', args.apk_name),
-       '--chromium-output-directory-base', args.build_output_dir,
-       '--diff-apk',
-       os.path.join(args.diff_build_output_dir, 'apks', args.apk_name),
-       '--chromium-output-directory-diff', args.diff_build_output_dir,
-       '--include-intermediate-results',
-       '--chartjson',
-       '--output-dir', output_dir])
-
-
-def GetSwarmingResult(args, output_dir, use_new_perf_format):
-  """Extracts the value for the story/metric combo of interest from swarming.
-
-  Args:
-    args: The known args parsed from the argument parser
-    output_dir: The directory where swarming results have been saved to
-    use_new_perf_format: Whether to use the new perf format that came with
-        revision 0d271f583489024e3c163f0538d1ec29097b3615 or not.
-
-  Returns:
-    The value for the story/metric combo that the last swarming run produced
-  """
-  outfile = os.path.join(output_dir, '0', 'perftest-output.json')
-  if use_new_perf_format:
-    outfile = os.path.join(output_dir, '0', args.benchmark, 'perf_results.json')
-  return _GetResultsFromJson(args, outfile)
-
-
-def GetBinarySizeResult(args, output_dir):
-  """Extracts the value for the story/metric combo of interest locally.
-
-  Args:
-    args: The known args parsed from the argument parser
-    output_dir: The directory where local results have been saved to
-
-  Returns:
-    The value for the story/metric combo that the last binary size diff produced
-  """
-  return _GetResultsFromJson(args,
-                             os.path.join(output_dir, 'results-chart.json'))
-
-
-def _GetResultsFromJson(args, filepath):
-  with open(filepath, 'r') as infile:
-    perf_results = json.load(infile)
-    all_results = []
-    if args.expected_json_result_format == 'chartjson':
-      # Perf tests use a 'values' array, while binary size uses a single 'value'
-      # field. So, check for both.
-      story = perf_results.get(unicode('charts'), {}).get(
-          unicode(args.metric), {}).get(unicode(args.story), {})
-      all_results = story.get(unicode('values'), [])
-      if 'value' in story:
-        all_results = [story[unicode('value')]]
-    elif args.expected_json_result_format == 'printedjson':
-      all_results = perf_results.get(args.metric, {}).get('traces', {}).get(
-          args.story, [])
-    if len(all_results) == 0:
-      raise RuntimeError('Got no results for the story/metric combo. '
-                         'Is there a typo in one of them?')
-    result = all_results[0]
-    print 'Got result %s' % str(result)
-  return float(result)
-
-
-def RunBisectStep(args, unknown_args, revision, output_dir):
-  """Runs a bisect step for a revision.
-
-  This will run recursively until the culprit CL is found.
-
-  Args:
-    args: The known args parsed from the argument parser
-    unknown_args: The unknown args parsed from the argument parser
-    revision: The git revision to sync to and test
-    output_dir: The directory to save swarming results to
-  """
-  revision_good = True
-  for attempt in xrange(1, args.num_attempts_before_marking_good + 1):
-    # Only bother syncing and building if this is our first attempt on this
-    # revision.
-    result = GetValueAtRevision(args, unknown_args, revision, output_dir,
-        sync=(attempt == 1))
-    # Regression was an increased value.
-    if args.bad_value > args.good_value:
-      # If we're greater than the provided bad value or between good and bad,
-      # but closer to bad, we're still bad.
-      if (result > args.bad_value or
-          abs(args.bad_value - result) < abs(args.good_value - result)):
-        print '=== Attempt %d found revision that is BAD ===' % attempt
-        revision_good = False
-        break
-      else:
-        print '=== Attempt %d found that revision is GOOD ===' % attempt
-    # Regression was a decreased value.
-    else:
-      # If we're smaller than the provided bad value or between good and bad,
-      # but closer to bad, we're still bad.
-      if (result < args.bad_value or
-          abs(args.bad_value - result) < abs(args.good_value - result)):
-        print '=== Attempt %d found that revision is BAD ===' % attempt
-        revision_good = False
-        break
-      else:
-        print '=== Attempt %d found that revision is GOOD ===' % attempt
-
-  output = ""
-  with SwitchDirsIfNotChromiumBisect(args):
-    if revision_good:
-      print '=== Current revision is GOOD ==='
-      output = subprocess.check_output(['git', 'bisect', 'good', revision])
-    else:
-      print '=== Current revision is BAD ==='
-      output = subprocess.check_output(['git', 'bisect', 'bad', revision])
-
-  print output
-  if output.startswith('Bisecting:'):
-    RunBisectStep(args, unknown_args, output.split('[', 1)[1].split(']', 1)[0],
-        output_dir)
-
-
-def BuildTarget(args):
-  print 'Building'
-  subprocess.check_output(['ninja', '-C', args.build_output_dir,
-                           '-j', str(args.parallel_jobs),
-                           '-l', str(args.load_limit), args.build_target])
-  if args.binary_size_bisect:
-    subprocess.check_output(['ninja', '-C', args.diff_build_output_dir,
-                             '-j', str(args.parallel_jobs),
-                             '-l', str(args.load_limit), args.build_target])
-
-
-def RegenerateGnArgs(args):
-  """Recreates the build output directory using existing GN args."""
-  directories = [args.build_output_dir]
-  if args.binary_size_bisect:
-    directories.append(args.diff_build_output_dir)
-  for d in directories:
-    with open(os.path.join(d, 'args.gn'), 'r') as args_file:
-      gn_args = args_file.read()
-    shutil.rmtree(d)
-    os.mkdir(d)
-    with open(os.path.join(d, 'args.gn'), 'w') as args_file:
-      args_file.write(gn_args)
-    subprocess.check_output(['gn', 'gen', d])
-
-
-def SyncAndBuild(args, unknown_args, revision):
-  """Syncs to the given revision and builds the test target.
-
-  Args:
-    args: The known args parsed by the argument parser
-    unknown_args: The unknown args parsed by the argument parser
-    revision: The revision to sync to and build
-  """
-  if args.manual_mode:
-    print ('=== Waiting on user input to start build/run process for %s ===' %
-        revision)
-    raw_input('Press any key to continue')
-    print '=== Building ==='
-  else:
-    print '=== Syncing to revision %s and building ===' % revision
-    # Sometimes random files show up as unstaged changes (???), so make sure
-    # that isn't the case before we try to run gclient sync
-    if args.reset_before_sync:
-      subprocess.check_output(['git', 'reset', '--hard', 'HEAD'])
-    sync_revision = revision
-    if args.apply_stash_before_sync:
-      print 'Applying stash entry %s' % args.apply_stash_before_sync
-      subprocess.check_output(
-          ['git', 'stash', 'apply', args.apply_stash_before_sync])
-      subprocess.check_output(['git', 'add', '-u'])
-      subprocess.check_output(['git', 'commit', '-m', 'Apply stash.'])
-      sync_revision = 'HEAD'
-    print 'Syncing'
-    output = subprocess.check_output(['gclient', 'sync', '-r',
-        'src@%s' % sync_revision])
-    if ('error: Your local changes to the following files would be overwritten '
-        'by checkout:' in output):
-      raise RuntimeError('Could not run gclient sync due to uncommitted '
-          'changes. If these changes are actually yours, please commit or '
-          'stash them. If they are not, remove them and try again. If the '
-          'issue persists, try running with --reset-before-sync')
-
-  # Ensure that the VR assets are synced to the current revision since it isn't
-  # guaranteed that gclient will handle it properly
-  # TODO(https://crbug.com/823882): Remove this once asset downloading is more
-  # robust in gclient.
-  subprocess.check_output([
-      'python', 'third_party/depot_tools/download_from_google_storage.py',
-      '--bucket', 'chrome-vr-assets',
-      '--recursive',
-      '--directory', 'chrome/browser/resources/vr/assets/google_chrome'])
-
-  # Checkout any specified revisions.
-  cwd = os.getcwd()
-  for override in args.checkout_overrides:
-    for repo, rev in override.iteritems():
-      os.chdir(repo)
-      subprocess.check_output(['git', 'checkout', rev])
-      os.chdir(cwd)
-  if args.regenerate_args_after_sync:
-    RegenerateGnArgs(args)
-  BuildTarget(args)
-
-
-def BisectRegression(args, unknown_args):
-  """Runs all steps necessary to bisect a perf regression.
-
-  Intermediate steps and the culprit CL will be printed to stdout.
-
-  Args:
-    args: The known args parsed by the argument parser
-    unknown_args: The unknown args parsed by the argument parser
-  """
-  with TempDir() as output_dir:
-    # Ensure that we also sync any APKs we use
-    os.environ['DOWNLOAD_VR_TEST_APKS'] = '1'
-    try:
-      if args.good_value == None:
-        # Once we've run "git bisect start" and set the good/bad revisions,
-        # we'll be in a detached head state before we sync. However, the git
-        # bisect has to start after this point, so we can't use that behavior
-        # here. So, manually sync to the revision to get into a detached state.
-        subprocess.check_output(['git', 'checkout', args.good_revision])
-        args.good_value = GetValueAtRevision(args, unknown_args,
-            args.good_revision, output_dir)
-        print '=== Got initial good value of %f ===' % args.good_value
-      if args.bad_value == None:
-        subprocess.check_output(['git', 'checkout', args.bad_revision])
-        args.bad_value = GetValueAtRevision(args, unknown_args,
-            args.bad_revision, output_dir)
-        print '=== Got initial bad value of %f ===' % args.bad_value
-      revision = SetupBisect(args)
-      RunBisectStep(args, unknown_args, revision, output_dir)
-    finally:
-      with SwitchDirsIfNotChromiumBisect(args):
-        subprocess.check_output(['git', 'bisect', 'reset'])
-
-
-def GetValueAtRevision(args, unknown_args, revision, output_dir, sync=True):
-  """Builds and runs the test at a particular revision.
-
-  Args:
-    args: The known args parsed by the argument parser
-    unknown_args: The unknown args parsed by the argument parser
-    revision: The revision to sync to and build
-    output_dir: The directory to store swarming results to
-
-  Returns:
-    The value of the story/metric combo at the given revision
-  """
-  # In the case where we're bisecting a repo other than Chromium src,
-  # "git bisect"'s automatic checkouts will be enough to ensure we're at the
-  # correct revision, so we can just build immediately.
-  if args.bisect_repo:
-    print '=== Building with %s at revision %s ===' % (
-        args.bisect_repo, revision)
-    BuildTarget(args)
-  elif sync:
-    SyncAndBuild(args, unknown_args, revision)
-  if args.binary_size_bisect:
-    RunBinarySizeDiff(args, output_dir)
-    return GetBinarySizeResult(args, output_dir)
-  else:
-    use_new_perf_format = _IsCurrentRevisionAfterFormatChange(revision)
-    RunTestOnSwarming(args, unknown_args, output_dir, use_new_perf_format)
-    return GetSwarmingResult(args, output_dir, use_new_perf_format)
-
-
-def _IsCurrentRevisionAfterFormatChange(revision):
-  """Determines whether we need to use the new or old perf format.
-
-  With commit 0d271f583489024e3c163f0538d1ec29097b3615, the VR perf tests moved
-  to use the newer run_performance_tests.py script. This changed the output
-  file name and the way which benchmark to run is specified, so we need to
-  know where we are in relation to that commit in order to know how to run
-  tests.
-
-  Args:
-    revision: The currently synced revision
-
-  Returns:
-    True if the current revision comes after the commit that changed how perf
-    tests are run, False otherwise
-  """
-  if revision == PERF_FORMAT_CHANGE_REVISION:
-    return True
-  # Check how many revisions after the format change revision we are - if it's
-  # non-zero, we're at some point after the format got changed, otherwise we're
-  # before.
-  num_revisions_after = subprocess.check_output(
-      ['git',
-       'rev-list',
-       '%s..%s' % (PERF_FORMAT_CHANGE_REVISION, revision),
-       '--count'])
-  return int(num_revisions_after) > 0
-
-
-def main():
-  VerifyCwd()
-  args, unknown_args = ParseArgsAndAssertValid()
-  VerifyInput(args, unknown_args)
-  BisectRegression(args, unknown_args)
-
-if __name__ == '__main__':
-  main()
diff --git a/chrome/test/vr/perf/BUILD.gn b/chrome/test/vr/perf/BUILD.gn
deleted file mode 100644
index ab0aa924..0000000
--- a/chrome/test/vr/perf/BUILD.gn
+++ /dev/null
@@ -1,45 +0,0 @@
-# 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.
-
-common_data = [
-  "./__init__.py",
-  "./android_vr_perf_test.py",
-  "./vr_perf_test.py",
-  "./vr_test_arg_parser.py",
-  "//third_party/android_sdk/public/platform-tools/adb",
-  "//third_party/gvr-android-sdk/test-apks/vr_services/vr_services_current.apk",
-]
-
-group("motopho_latency_test") {
-  testonly = true
-  data = common_data + [
-           "./latency/__init__.py",
-           "./latency/android_webvr_latency_test.py",
-           "./latency/latency_test_config.py",
-           "./latency/motopho_thread.py",
-           "./latency/robot_arm.py",
-           "./latency/robot_arm_arduino.py",
-           "./latency/robot_arm_maestro.py",
-           "./latency/run_latency_test.py",
-           "./latency/webvr_latency_test.py",
-           "./latency/third_party/",
-         ]
-  data_deps = [
-    "//chrome/android:chrome_public_apk",
-  ]
-}
-
-group("vrcore_fps_test") {
-  testonly = true
-  data = common_data + [
-           "./vrcore_fps/__init__.py",
-           "./vrcore_fps/run_vrcore_fps_test.py",
-           "./vrcore_fps/vrcore_fps_test.py",
-           "./vrcore_fps/vrcore_fps_test_config.py",
-           "./vrcore_fps/vr_perf_summary.py",
-         ]
-  data_deps = [
-    "//chrome/android:chrome_public_apk",
-  ]
-}
diff --git a/chrome/test/vr/perf/__init__.py b/chrome/test/vr/perf/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/chrome/test/vr/perf/__init__.py
+++ /dev/null
diff --git a/chrome/test/vr/perf/android_vr_perf_test.py b/chrome/test/vr/perf/android_vr_perf_test.py
deleted file mode 100644
index 0afeaa2..0000000
--- a/chrome/test/vr/perf/android_vr_perf_test.py
+++ /dev/null
@@ -1,134 +0,0 @@
-# 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.
-
-import vr_perf_test
-
-import logging
-import os
-import time
-
-DEFAULT_SCREEN_WIDTH = 720
-DEFAULT_SCREEN_HEIGHT = 1280
-NUM_VR_ENTRY_ATTEMPTS = 5
-
-class AndroidVrPerfTest(vr_perf_test.VrPerfTest):
-  """Base class for VrPerfTests running on Android.
-
-  Handles the setup and teardown portions of the test. The _Run function
-  that actually runs the test is to be implemented in a subclass or in
-  a separate class that a subclass also inherits from.
-  """
-  def __init__(self, args):
-    super(AndroidVrPerfTest, self).__init__(args)
-    # Swarming stuff seems to routinely kill off adbd once a minute or so,
-    # which often causes adb's startup message to appear in the output. We need
-    # to remove this before getting the device name.
-    # TODO(bsheedy): Look into preventing adbd from being killed altogether
-    # instead of working around it.
-    self._device_name = self._Adb(['shell', 'getprop',
-                                   'ro.product.name']).strip().split('\n')[-1]
-
-  def _Adb(self, cmd):
-    """Runs the given command via adb.
-
-    Returns:
-      A string containing the stdout and stderr of the adb command.
-    """
-    # TODO(bsheedy): Maybe migrate to use Devil (overkill?).
-    return self._RunCommand([self._args.adb_path] + cmd)
-
-  def _OneTimeSetup(self):
-    self._Adb(['root'])
-
-    # Install the latest VrCore and Chrome APKs.
-    self._Adb(['install', '-r', '-d',
-               '../../third_party/gvr-android-sdk/test-apks/vr_services'
-               '/vr_services_current.apk'])
-    # TODO(bsheedy): Make APK path configurable so usable with other channels.
-    self._Adb(['install', '-r', 'apks/ChromePublic.apk'])
-
-    # Force WebVR support, remove open tabs, and don't have first run
-    # experience.
-    flags = [
-        '--enable-blink-features=WebVR',
-        '--no-restore-state',
-        '--disable-fre'
-    ]
-
-    if self._args.additional_flags:
-      flags.extend(self._args.additional_flags.split(' '))
-    self._SetChromeCommandLineFlags(flags)
-    # Wake up the device and sleep, otherwise WebGL can crash on startup.
-    self._Adb(['shell', 'input', 'keyevent', 'KEYCODE_WAKEUP'])
-    time.sleep(1)
-
-  def _Setup(self, url):
-    # Start Chrome
-    self._Adb(['shell', 'am', 'start',
-               '-a', 'android.intent.action.MAIN',
-               '-n', 'org.chromium.chrome/com.google.android.apps.chrome.Main',
-               url])
-    # TODO(bsheedy): Remove this sleep - poll for magic window GVR
-    # initialization to know when page fully loaded and ready?
-    time.sleep(10)
-
-    # Tap the center of the screen to start presenting.
-    # It's technically possible that the screen tap won't enter VR on the first
-    # time, so try several times by checking for the logcat output from
-    # entering VR.
-    (width, height) = self._GetScreenResolution()
-    entered_vr = False
-    for _ in xrange(NUM_VR_ENTRY_ATTEMPTS):
-      self._Adb(['logcat', '-c'])
-      self._Adb(['shell', 'input', 'touchscreen', 'tap', str(width/2),
-                 str(height/2)])
-      time.sleep(5)
-      output = self._Adb(['logcat', '-d'])
-      if 'Initialized GVR version' in output:
-        entered_vr = True
-        break
-      logging.warning('Failed to enter VR, retrying')
-    if not entered_vr:
-      raise RuntimeError('Failed to enter VR after %d attempts'
-                         % NUM_VR_ENTRY_ATTEMPTS)
-
-  def _Teardown(self):
-    # Exit VR and close Chrome.
-    self._Adb(['shell', 'input', 'keyevent', 'KEYCODE_BACK'])
-    self._Adb(['shell', 'am', 'force-stop', 'org.chromium.chrome'])
-
-  def _OneTimeTeardown(self):
-    # Turn off the screen.
-    self._Adb(['shell', 'input', 'keyevent', 'KEYCODE_POWER'])
-
-  def _SetChromeCommandLineFlags(self, flags):
-    """Sets the Chrome command line flags to the given list."""
-    self._Adb(['shell', "echo 'chrome " + ' '.join(flags) + "' > "
-               + '/data/local/tmp/chrome-command-line'])
-
-  def _GetScreenResolution(self):
-    """Retrieves the device's screen resolution, or a default if not found.
-
-    Returns:
-      A tuple (width, height).
-    """
-    output = self._Adb(['shell', 'dumpsys', 'display'])
-    width = None
-    height = None
-    for line in output.split('\n'):
-      if 'mDisplayWidth' in line:
-        width = int(line.split('=')[1])
-      elif 'mDisplayHeight' in line:
-        height = int(line.split('=')[1])
-      if width and height:
-        break
-    if not width:
-      logging.warning('Could not get actual screen width, defaulting to %d',
-                      DEFAULT_SCREEN_WIDTH)
-      width = DEFAULT_SCREEN_WIDTH
-    if not height:
-      logging.warning('Could not get actual screen height, defaulting to %d',
-                      DEFAULT_SCREEN_HEIGHT)
-      height = DEFAULT_SCREEN_HEIGHT
-    return (width, height)
diff --git a/chrome/test/vr/perf/latency/__init__.py b/chrome/test/vr/perf/latency/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/chrome/test/vr/perf/latency/__init__.py
+++ /dev/null
diff --git a/chrome/test/vr/perf/latency/android_webvr_latency_test.py b/chrome/test/vr/perf/latency/android_webvr_latency_test.py
deleted file mode 100644
index 5ebc1b4..0000000
--- a/chrome/test/vr/perf/latency/android_webvr_latency_test.py
+++ /dev/null
@@ -1,12 +0,0 @@
-# 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.
-
-import android_vr_perf_test
-import webvr_latency_test
-
-class AndroidWebVrLatencyTest(webvr_latency_test.WebVrLatencyTest,
-                              android_vr_perf_test.AndroidVrPerfTest):
-  """Android implementation of the WebVR latency test."""
-  def __init__(self, args):
-    super(AndroidWebVrLatencyTest, self).__init__(args)
diff --git a/chrome/test/vr/perf/latency/latency_test_config.py b/chrome/test/vr/perf/latency/latency_test_config.py
deleted file mode 100644
index 58acb7c..0000000
--- a/chrome/test/vr/perf/latency/latency_test_config.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# 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.
-
-import os
-import sys
-
-# Add //chrome/test/vr/perf to system path.
-sys.path.append(os.path.join(os.path.dirname(__file__),
-                             os.pardir))
diff --git a/chrome/test/vr/perf/latency/motopho_thread.py b/chrome/test/vr/perf/latency/motopho_thread.py
deleted file mode 100644
index d104370..0000000
--- a/chrome/test/vr/perf/latency/motopho_thread.py
+++ /dev/null
@@ -1,120 +0,0 @@
-# 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.
-
-import logging
-import subprocess
-import threading
-
-
-MIN_VALID_LATENCY = 10
-MAX_VALID_LATENCY = 1000
-
-
-class MotophoThread(threading.Thread):
-  """Handles the running of the Motopho script and extracting results."""
-  def __init__(self):
-    threading.Thread.__init__(self)
-    self._latencies = []
-    self._correlations = []
-    self._thread_can_die = False
-    # Threads can't be restarted, so in order to gather multiple samples, we
-    # need to either re-create the thread for every iteration or use a loop
-    # and locks in a single thread -> use the latter solution.
-    self._start_lock = threading.Event()
-    self._finish_lock = threading.Event()
-    self.BlockNextIteration()
-
-  def run(self):
-    while True:
-      self._WaitForIterationStart()
-      if self._thread_can_die:
-        break
-      self._ResetEndLock()
-      motopho_output = ""
-      try:
-        motopho_output = subprocess.check_output(["./motophopro_nograph"],
-                                                 stderr=subprocess.STDOUT)
-      except subprocess.CalledProcessError as e:
-        logging.error('Failed to run Motopho script: %s', e.output)
-        raise e
-
-      if "FAIL" in motopho_output:
-        logging.error('Failed to get latency, logging raw output: %s',
-                      motopho_output)
-        self._failed_iteration = True
-      else:
-        current_num_samples = len(self._latencies)
-        for line in motopho_output.split("\n"):
-          if 'Motion-to-photon latency:' in line:
-            self._latencies.append(float(line.split(" ")[-2]))
-          if 'Max correlation is' in line:
-            self._correlations.append(float(line.split(' ')[-1]))
-          if (len(self._latencies) > current_num_samples and
-              len(self._correlations) > current_num_samples):
-            break;
-      if not self._failed_iteration:
-        # Rarely, the reported latency will be lower than physically possible
-        # (Single digit latency when it should be impossible to get below the
-        # scan out latency of 16.7 ms) or impossibly high (tens of seconds when
-        # the test lasts < 10 seconds). Clearly, these results are invalid, so
-        # repeat as if we failed to get the latency at all.
-        # TODO(bsheedy): Figure out the root cause of this instead of working
-        # around it crbug.com/755596.
-        if self._latencies[-1] < MIN_VALID_LATENCY:
-          logging.error('Measured latency of %f lower than min of %d\n'
-                        'Logging raw output: %s', self._latencies[-1],
-                        MIN_VALID_LATENCY, motopho_output)
-          self._failed_iteration = True
-        elif self._latencies[-1] > MAX_VALID_LATENCY:
-          logging.error('Measured latency of %f higher than max of %d\n'
-                        'Logging raw output: %s', self._latencies[-1],
-                        MAX_VALID_LATENCY, motopho_output)
-          self._failed_iteration = True
-        if self._failed_iteration:
-          del self._latencies[-1]
-          del self._correlations[-1]
-      self._EndIteration()
-
-  def _WaitForIterationStart(self):
-    self._start_lock.wait()
-
-  def StartIteration(self):
-    """Tells the thread to start its next test iteration."""
-    self._start_lock.set()
-
-  def BlockNextIteration(self):
-    """Blocks the thread from starting the next iteration without a signal."""
-    self._start_lock.clear()
-
-  def Terminate(self):
-    """Tells the thread that it should self-terminate."""
-    self._thread_can_die = True
-    self._start_lock.set()
-
-  def _EndIteration(self):
-    self._finish_lock.set()
-
-  def _ResetEndLock(self):
-    self._finish_lock.clear()
-    self._failed_iteration = False
-
-  def WaitForIterationEnd(self, timeout):
-    """Waits until the thread says it's finished or times out.
-
-    Returns:
-      Whether the iteration ended within the given timeout
-    """
-    return self._finish_lock.wait(timeout)
-
-  @property
-  def latencies(self):
-    return self._latencies
-
-  @property
-  def correlations(self):
-    return self._correlations
-
-  @property
-  def failed_iteration(self):
-    return self._failed_iteration
diff --git a/chrome/test/vr/perf/latency/robot_arm.py b/chrome/test/vr/perf/latency/robot_arm.py
deleted file mode 100644
index 3727e92..0000000
--- a/chrome/test/vr/perf/latency/robot_arm.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# Copyright 2018 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.
-
-import serial
-import time
-
-
-class RobotArm():
-  """Abstract class for controlling the robot arm that moves the test device."""
-  def ResetPosition(self):
-    raise NotImplementedError(
-        'ResetPosition must be implemented in a subclass.')
-
-  def StartMotophoMovement(self):
-    raise NotImplementedError(
-        'StartMotophoMovement must be implemented in a subclass.')
-
-  def StopAllMovement(self):
-    raise NotImplementedError(
-        'StopAllMovement must be implemented in a subclass.')
diff --git a/chrome/test/vr/perf/latency/robot_arm_arduino.py b/chrome/test/vr/perf/latency/robot_arm_arduino.py
deleted file mode 100644
index 875dabe..0000000
--- a/chrome/test/vr/perf/latency/robot_arm_arduino.py
+++ /dev/null
@@ -1,55 +0,0 @@
-# Copyright 2018 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.
-
-import robot_arm as ra
-
-import serial
-import time
-
-
-class RobotArmArduino(ra.RobotArm):
-  """Implementation of RobotArm for the older Aruduino-based robot arm.
-
-  This older version relies on a serial connection over USB to communicate
-  with an Arduino that has been flashed with the correct firmware."""
-  def __init__(self, device_name, num_tries=5, baud=115200, timeout=3.0):
-    self._connection = None
-    connected = False
-    for _ in xrange(num_tries):
-      try:
-        self._connection = serial.Serial('/dev/' + device_name,
-                                         baud,
-                                         timeout=timeout)
-      except serial.SerialException as e:
-        pass
-      if self._connection and 'Enter parameters' in self._connection.read(1024):
-        connected = True
-        break
-    if not connected:
-      raise serial.SerialException('Failed to connect to the robot arm.')
-
-  def ResetPosition(self):
-    if not self._connection:
-      return
-    # If the servo stopped very close to the desired position, it can just
-    # vibrate instead of moving, so move away before going to the reset
-    # position.
-    self._connection.write('5 300 0 5\n')
-    time.sleep(0.5)
-    self._connection.write('5 250 0 5\n')
-    time.sleep(0.5)
-
-  def StartMotophoMovement(self):
-    if not self._connection:
-      return
-    self._connection.write('9\n')
-
-  def StopAllMovement(self):
-    if not self._connection:
-      return
-    self._connection.write('0\n')
-    # The manual usage instructions are printed over the serial connection
-    # every time we send a command - long test runs can result in the buffer
-    # filling up and causing the arm to hang, so periodically clear the buffer.
-    self._connection.flushInput()
diff --git a/chrome/test/vr/perf/latency/robot_arm_maestro.py b/chrome/test/vr/perf/latency/robot_arm_maestro.py
deleted file mode 100644
index 31806a11..0000000
--- a/chrome/test/vr/perf/latency/robot_arm_maestro.py
+++ /dev/null
@@ -1,139 +0,0 @@
-# Copyright 2018 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.
-
-import robot_arm as ra
-import third_party.maestro.maestro as maestro
-import serial
-import threading
-import time
-
-SERVO_PORT = 0
-SERVO_ACCELERATION = 12
-SERVO_SPEED = 128
-# Approximately how long it takes for the servo to move from one endpoint to
-# the other given the current acceleration and speed values. A more exact
-# number could be calculated, but an approximate number works fine without any
-# detrimental effect on test results, and is easier.
-MOTOPHO_PERIOD = 0.75
-MOTOPHO_ENDPOINTS = {
-  'start': 4500,
-  'end': 7500,
-}
-
-
-class Command(object):
-  RESET = 1
-  MOTOPHO = 2
-
-class RobotArmMaestro(ra.RobotArm, threading.Thread):
-  """Implementation of RobotArm using the Pololu Maestro series controllers.
-
-  The Pololu Maestro is set up to communicate over a serial connection, similar
-  to the Arduino version of RobotArm. However, the servo control code is in
-  this file instead of being flashed onto the controller like in the case of
-  the Arduino.
-  """
-  def __init__(self, device_name, num_tries=5):
-    if not device_name.startswith('/dev/'):
-      device_name = '/dev/' + device_name
-    self._controller = None
-    connected = False
-    for _ in xrange(num_tries):
-      try:
-        self._controller = maestro.Controller(ttyStr=device_name)
-      except serial.SerialException as e:
-        continue
-      connected = True
-      break
-    if not connected:
-      raise serial.SerialException('Failed to connect to the robot arm.')
-
-    threading.Thread.__init__(self)
-    self._current_cycle = 0
-    self._command = None
-    self._thread_can_die = False
-    self._command_setup_required = False
-
-    # Lock for waiting on a new command to be issued
-    self._new_command_lock = threading.Event()
-    # Lock for waiting on synchronous commands to finish
-    self._command_finish_lock = threading.Event()
-    self._FinishCommand()
-    self.start()
-
-  def ResetPosition(self):
-    self._IssueCommand(Command.RESET)
-    self._WaitForSynchronousCommandFinish()
-
-  def StartMotophoMovement(self):
-    self._IssueCommand(Command.MOTOPHO)
-
-  def StopAllMovement(self):
-    self._FinishCommand()
-
-  def Terminate(self):
-    self._thread_can_die = True
-    self._new_command_lock.set()
-
-  def run(self):
-    while True:
-      self._WaitForNewCommand()
-      if self._thread_can_die:
-        # Stop sending signals so the servo isn't locked in place
-        self._controller.setTarget(SERVO_PORT, 0)
-        self._controller.close()
-        break
-      # Perform any necessary one-time setup for asynchronous commands
-      if self._command_setup_required:
-        self._command_setup_required = False
-        if self._command is Command.MOTOPHO:
-          self._SetupMotopho()
-      # Synchronous
-      if self._command is Command.RESET:
-        self._CommandReset()
-      # Asynchronous
-      elif self._command is Command.MOTOPHO:
-        self._CommandMotopho()
-
-  def _SetupMotopho(self):
-    self._current_cycle = 0
-    # The Maestro controllers support automatic acceleration when starting and
-    # stopping, so tune the acceleration and max speed values to get smooth
-    # movement instead of trying to write custom control logic to do that
-    # ourselves.
-    self._controller.setAccel(SERVO_PORT, SERVO_ACCELERATION)
-    self._controller.setSpeed(SERVO_PORT, SERVO_SPEED)
-
-  def _CommandReset(self):
-    # The Maestro controllers don't seem to have the same issue as Arduinos
-    # where stopping close to the desired position can cause the servo to
-    # vibrate in place instead of actually moving to the desired position. So,
-    # only send one move command instead of moving away and then to the desired
-    # position.
-    self._controller.setTarget(SERVO_PORT, MOTOPHO_ENDPOINTS['start'])
-    time.sleep(MOTOPHO_PERIOD)
-    self._FinishCommand()
-
-  def _CommandMotopho(self):
-    target_position = (MOTOPHO_ENDPOINTS['start'] if self._current_cycle % 2
-                       else MOTOPHO_ENDPOINTS['end'])
-    self._controller.setTarget(SERVO_PORT, target_position)
-    self._current_cycle += 1
-    time.sleep(MOTOPHO_PERIOD)
-
-  def _WaitForNewCommand(self):
-    self._new_command_lock.wait()
-
-  def _WaitForSynchronousCommandFinish(self):
-    self._command_finish_lock.wait()
-
-  def _FinishCommand(self):
-    self._new_command_lock.clear()
-    self._command_finish_lock.set()
-
-  def _IssueCommand(self, command):
-    self._command = command
-    self._command_setup_required = True
-    self._command_finish_lock.clear()
-    self._new_command_lock.set()
diff --git a/chrome/test/vr/perf/latency/run_latency_test.py b/chrome/test/vr/perf/latency/run_latency_test.py
deleted file mode 100644
index 4ec919ed..0000000
--- a/chrome/test/vr/perf/latency/run_latency_test.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# 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.
-
-"""Script for automatically measuring motion-to-photon latency for VR.
-
-Doing so requires two specialized pieces of hardware. The first is a Motopho,
-which when used with a VR flicker app, finds the delay between movement and
-the test device's screen updating in response to the movement. The second is
-a set of servos, which physically moves the test device and Motopho during the
-latency test.
-"""
-# Must be first import in order to add parent directory to system path.
-import latency_test_config
-import android_webvr_latency_test
-import vr_test_arg_parser
-
-import sys
-
-
-def main():
-  parser = vr_test_arg_parser.VrTestArgParser()
-  parser.AddLatencyOptions()
-  args = parser.ParseArgumentsAndSetLogLevel()
-  latency_test = None
-  if args.platform == 'android':
-    latency_test = android_webvr_latency_test.AndroidWebVrLatencyTest(args)
-  elif args.platform == 'win':
-    raise NotImplementedError('WebVR not currently supported on Windows')
-  else:
-    raise RuntimeError('Given platform %s not recognized' % args.platform)
-  latency_test.RunTests()
-
-
-if __name__ == '__main__':
-  sys.exit(main())
diff --git a/chrome/test/vr/perf/latency/third_party/__init__.py b/chrome/test/vr/perf/latency/third_party/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/chrome/test/vr/perf/latency/third_party/__init__.py
+++ /dev/null
diff --git a/chrome/test/vr/perf/latency/third_party/maestro/LICENSE b/chrome/test/vr/perf/latency/third_party/maestro/LICENSE
deleted file mode 100644
index 21e4de7..0000000
--- a/chrome/test/vr/perf/latency/third_party/maestro/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2016 Steven L. Jacobs
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/chrome/test/vr/perf/latency/third_party/maestro/README.chromium b/chrome/test/vr/perf/latency/third_party/maestro/README.chromium
deleted file mode 100644
index c2b1bfb..0000000
--- a/chrome/test/vr/perf/latency/third_party/maestro/README.chromium
+++ /dev/null
@@ -1,22 +0,0 @@
-Name: Maestro
-URL: https://github.com/FRC4564/Maestro
-Version: 0
-Date: June 11, 2017
-Revision: d619b45a4847e47f5ec5758f91ee7b813ef8dd6a
-Security Critical: no
-License: MIT
-License File: NOT_SHIPPED
-
-Description:
-
-A set of Python functions for interacting with the Pololu Maestro series of
-servo controllers, which are used for automated VR motion-to-photon latency
-testing. This is simply a Python implementation of the commands described in the
-official documentation at https://www.pololu.com/docs/0J40/5.e, using PySerial
-for communicating with the controller.
-
-This code is not considered security critical since it is only to be used by
-test binaries! This should never be used by Chrome or any production code.
-
-Local Modifications: Removal of trailing/unnecessary whitespace. Rename of
-"LICENSE.md" to "LICENSE".
\ No newline at end of file
diff --git a/chrome/test/vr/perf/latency/third_party/maestro/README.md b/chrome/test/vr/perf/latency/third_party/maestro/README.md
deleted file mode 100644
index b48bf9f9..0000000
--- a/chrome/test/vr/perf/latency/third_party/maestro/README.md
+++ /dev/null
@@ -1,40 +0,0 @@
-maestro.py
-==========
-
-This Python class supports Pololu's Maestro servo controller over USB serial. Great for use with the Raspberry Pi.
-
-The class includes methods to control servos (position, speed, acceleration), read servo position, and start/stop Maestro scripts.  See Pololu's on-line documentation to learn about the full capabilities of this nifty micro-controller.
-
-Pololu's Maestro Windows installer sets up the Maestro Control Center, used to configure, test and program the controller.  Be sure the Maestro is configured for "USB Dual Port" serial mode, which is [not the default](https://www.pololu.com/docs/0J40/3.c).
-
-You'll need to have the 'pyserial' Python module installed to use maestro.py.
-
-For Linux, download pyserial-2.7.tar.gz from http://sourceforge.net/projects/pyserial/files/pyserial/
-
-    wget http://sourceforge.net/projects/pyserial/files/pyserial/2.7/pyserial-2.7.tar.gz
-
- and then install
-
-    tar –zxf pyserial-2.7.tar.gz
-    cd pyserial-2.7
-    sudo python setup.py install
-
-Alternatively, if you have pip available, pyserial can be installed as follows:
-
-    python -m pip install pyserial
-
-Check out http://pyserial.readthedocs.io/en/latest/pyserial.html#installation for other install options.
-
-Example usage of maestro.py:
-
-    import maestro.py
-    servo = maestro.Controller()
-    servo.setAccel(0,4)      #set servo 0 acceleration to 4
-    servo.setTarget(0,6000)  #set servo to move to center position
-    servo.close
-
-For use on Windows, you'll need to provide the COM port assigned to the Maestro Command Port.  You can indentify the port by starting Device Manager and looking under Ports (COM & LPT).  Here's how to instantiate the controller for Windows.
-
-    import maestro.py
-    m = maestro.Controller('COM3')
-    
diff --git a/chrome/test/vr/perf/latency/third_party/maestro/__init__.py b/chrome/test/vr/perf/latency/third_party/maestro/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/chrome/test/vr/perf/latency/third_party/maestro/__init__.py
+++ /dev/null
diff --git a/chrome/test/vr/perf/latency/third_party/maestro/maestro.py b/chrome/test/vr/perf/latency/third_party/maestro/maestro.py
deleted file mode 100644
index 2f901699..0000000
--- a/chrome/test/vr/perf/latency/third_party/maestro/maestro.py
+++ /dev/null
@@ -1,169 +0,0 @@
-import serial
-from sys import version_info
-
-PY2 = version_info[0] == 2   #Running Python 2.x?
-
-#
-#---------------------------
-# Maestro Servo Controller
-#---------------------------
-#
-# Support for the Pololu Maestro line of servo controllers
-#
-# Steven Jacobs -- Aug 2013
-# https://github.com/FRC4564/Maestro/
-#
-# These functions provide access to many of the Maestro's capabilities using the
-# Pololu serial protocol
-#
-class Controller:
-    # When connected via USB, the Maestro creates two virtual serial ports
-    # /dev/ttyACM0 for commands and /dev/ttyACM1 for communications.
-    # Be sure the Maestro is configured for "USB Dual Port" serial mode.
-    # "USB Chained Mode" may work as well, but hasn't been tested.
-    #
-    # Pololu protocol allows for multiple Maestros to be connected to a single
-    # serial port. Each connected device is then indexed by number.
-    # This device number defaults to 0x0C (or 12 in decimal), which this module
-    # assumes.  If two or more controllers are connected to different serial
-    # ports, or you are using a Windows OS, you can provide the tty port.  For
-    # example, '/dev/ttyACM2' or for Windows, something like 'COM3'.
-    def __init__(self,ttyStr='/dev/ttyACM0',device=0x0c):
-        # Open the command port
-        self.usb = serial.Serial(ttyStr)
-        # Command lead-in and device number are sent for each Pololu serial command.
-        self.PololuCmd = chr(0xaa) + chr(device)
-        # Track target position for each servo. The function isMoving() will
-        # use the Target vs Current servo position to determine if movement is
-        # occuring.  Upto 24 servos on a Maestro, (0-23). Targets start at 0.
-        self.Targets = [0] * 24
-        # Servo minimum and maximum targets can be restricted to protect components.
-        self.Mins = [0] * 24
-        self.Maxs = [0] * 24
-
-    # Cleanup by closing USB serial port
-    def close(self):
-        self.usb.close()
-
-    # Send a Pololu command out the serial port
-    def sendCmd(self, cmd):
-        cmdStr = self.PololuCmd + cmd
-        if PY2:
-            self.usb.write(cmdStr)
-        else:
-            self.usb.write(bytes(cmdStr,'latin-1'))
-
-    # Set channels min and max value range.  Use this as a safety to protect
-    # from accidentally moving outside known safe parameters. A setting of 0
-    # allows unrestricted movement.
-    #
-    # ***Note that the Maestro itself is configured to limit the range of servo travel
-    # which has precedence over these values.  Use the Maestro Control Center to configure
-    # ranges that are saved to the controller.  Use setRange for software controllable ranges.
-    def setRange(self, chan, min, max):
-        self.Mins[chan] = min
-        self.Maxs[chan] = max
-
-    # Return Minimum channel range value
-    def getMin(self, chan):
-        return self.Mins[chan]
-
-    # Return Maximum channel range value
-    def getMax(self, chan):
-        return self.Maxs[chan]
-
-    # Set channel to a specified target value.  Servo will begin moving based
-    # on Speed and Acceleration parameters previously set.
-    # Target values will be constrained within Min and Max range, if set.
-    # For servos, target represents the pulse width in of quarter-microseconds
-    # Servo center is at 1500 microseconds, or 6000 quarter-microseconds
-    # Typcially valid servo range is 3000 to 9000 quarter-microseconds
-    # If channel is configured for digital output, values < 6000 = Low ouput
-    def setTarget(self, chan, target):
-        # if Min is defined and Target is below, force to Min
-        if self.Mins[chan] > 0 and target < self.Mins[chan]:
-            target = self.Mins[chan]
-        # if Max is defined and Target is above, force to Max
-        if self.Maxs[chan] > 0 and target > self.Maxs[chan]:
-            target = self.Maxs[chan]
-
-        lsb = target & 0x7f #7 bits for least significant byte
-        msb = (target >> 7) & 0x7f #shift 7 and take next 7 bits for msb
-        cmd = chr(0x04) + chr(chan) + chr(lsb) + chr(msb)
-        self.sendCmd(cmd)
-        # Record Target value
-        self.Targets[chan] = target
-
-    # Set speed of channel
-    # Speed is measured as 0.25microseconds/10milliseconds
-    # For the standard 1ms pulse width change to move a servo between extremes, a speed
-    # of 1 will take 1 minute, and a speed of 60 would take 1 second.
-    # Speed of 0 is unrestricted.
-    def setSpeed(self, chan, speed):
-        lsb = speed & 0x7f #7 bits for least significant byte
-        msb = (speed >> 7) & 0x7f #shift 7 and take next 7 bits for msb
-        cmd = chr(0x07) + chr(chan) + chr(lsb) + chr(msb)
-        self.sendCmd(cmd)
-
-    # Set acceleration of channel
-    # This provide soft starts and finishes when servo moves to target position.
-    # Valid values are from 0 to 255. 0=unrestricted, 1 is slowest start.
-    # A value of 1 will take the servo about 3s to move between 1ms to 2ms range.
-    def setAccel(self, chan, accel):
-        lsb = accel & 0x7f #7 bits for least significant byte
-        msb = (accel >> 7) & 0x7f #shift 7 and take next 7 bits for msb
-        cmd = chr(0x09) + chr(chan) + chr(lsb) + chr(msb)
-        self.sendCmd(cmd)
-
-    # Get the current position of the device on the specified channel
-    # The result is returned in a measure of quarter-microseconds, which mirrors
-    # the Target parameter of setTarget.
-    # This is not reading the true servo position, but the last target position sent
-    # to the servo. If the Speed is set to below the top speed of the servo, then
-    # the position result will align well with the acutal servo position, assuming
-    # it is not stalled or slowed.
-    def getPosition(self, chan):
-        cmd = chr(0x10) + chr(chan)
-        self.sendCmd(cmd)
-        lsb = ord(self.usb.read())
-        msb = ord(self.usb.read())
-        return (msb << 8) + lsb
-
-    # Test to see if a servo has reached the set target position.  This only provides
-    # useful results if the Speed parameter is set slower than the maximum speed of
-    # the servo.  Servo range must be defined first using setRange. See setRange comment.
-    #
-    # ***Note if target position goes outside of Maestro's allowable range for the
-    # channel, then the target can never be reached, so it will appear to always be
-    # moving to the target.
-    def isMoving(self, chan):
-        if self.Targets[chan] > 0:
-            if self.getPosition(chan) != self.Targets[chan]:
-                return True
-        return False
-
-    # Have all servo outputs reached their targets? This is useful only if Speed and/or
-    # Acceleration have been set on one or more of the channels. Returns True or False.
-    # Not available with Micro Maestro.
-    def getMovingState(self):
-        cmd = chr(0x13)
-        self.sendCmd(cmd)
-        if self.usb.read() == chr(0):
-            return False
-        else:
-            return True
-
-    # Run a Maestro Script subroutine in the currently active script. Scripts can
-    # have multiple subroutines, which get numbered sequentially from 0 on up. Code your
-    # Maestro subroutine to either infinitely loop, or just end (return is not valid).
-    def runScriptSub(self, subNumber):
-        cmd = chr(0x27) + chr(subNumber)
-        # can pass a param with command 0x28
-        # cmd = chr(0x28) + chr(subNumber) + chr(lsb) + chr(msb)
-        self.sendCmd(cmd)
-
-    # Stop the current Maestro Script
-    def stopScript(self):
-        cmd = chr(0x24)
-        self.sendCmd(cmd)
-
diff --git a/chrome/test/vr/perf/latency/third_party/maestro/test.py b/chrome/test/vr/perf/latency/third_party/maestro/test.py
deleted file mode 100644
index 10bf53f4..0000000
--- a/chrome/test/vr/perf/latency/third_party/maestro/test.py
+++ /dev/null
@@ -1,43 +0,0 @@
-import glob
-import re
-
-def GetTtyDevices(tty_pattern, vendor_ids):
-  """Finds all devices connected to tty that match a pattern and device id.
-
-  If a serial device is connected to the computer via USB, this function
-  will check all tty devices that match tty_pattern, and return the ones
-  that have vendor identification number in the list vendor_ids.
-
-  Args:
-    tty_pattern: The search pattern, such as r'ttyACM\d+'.
-    vendor_ids: The list of 16-bit USB vendor ids, such as [0x2a03].
-
-  Returns:
-    A list of strings of tty devices, for example ['ttyACM0'].
-  """
-  product_string = 'PRODUCT='
-  sys_class_dir = '/sys/class/tty/'
-
-  tty_devices = glob.glob(sys_class_dir + '*')
-
-  matcher = re.compile('.*' + tty_pattern)
-  tty_matches = [x for x in tty_devices if matcher.search(x)]
-  tty_matches = [x[len(sys_class_dir):] for x in tty_matches]
-
-  found_devices = []
-  for match in tty_matches:
-    class_filename = sys_class_dir + match + '/device/uevent'
-    with open(class_filename, 'r') as uevent_file:
-      # Look for the desired product id in the uevent text.
-      for line in uevent_file:
-        if product_string in line:
-          ids = line[len(product_string):].split('/')
-          ids = [int(x, 16) for x in ids]
-
-          for desired_id in vendor_ids:
-            if desired_id in ids:
-              found_devices.append(match)
-
-  return found_devices
-
-print GetTtyDevices(r'ttyACM\d+', [0x1ffb])
diff --git a/chrome/test/vr/perf/latency/webvr_latency_test.py b/chrome/test/vr/perf/latency/webvr_latency_test.py
deleted file mode 100644
index d58c67b..0000000
--- a/chrome/test/vr/perf/latency/webvr_latency_test.py
+++ /dev/null
@@ -1,302 +0,0 @@
-# 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.
-
-import motopho_thread as mt
-import robot_arm_arduino as arduino_arm
-import robot_arm_maestro as maestro_arm
-
-import json
-import glob
-import logging
-import numpy
-import os
-import re
-import subprocess
-import sys
-import time
-
-
-MOTOPHO_THREAD_TIMEOUT = 15
-THREAD_TERMINATION_TIMEOUT = 2
-MOTOPHO_THREAD_RETRIES = 4
-DEFAULT_URLS = [
-    # URLs that render 3D scenes in addition to the Motopho patch.
-    # Heavy CPU load, moderate GPU load.
-    'https://webvr.info/samples/test-slow-render.html?'
-    'latencyPatch=1\&canvasClickPresents=1\&'
-    'heavyGpu=1\&workTime=20\&cubeCount=8\&cubeScale=0.4',
-    # No additional CPU load, very light GPU load.
-    'https://webvr.info/samples/test-slow-render.html?'
-    'latencyPatch=1\&canvasClickPresents=1',
-    # Increased render scale
-    'https://webvr.info/samples/test-slow-render.html?'
-    'latencyPatch=1\&canvasClickPresents=1\&'
-    'renderScale=1.5',
-    # Default render scale, increased load
-    'https://webvr.info/samples/test-slow-render.html?'
-    'latencyPatch=1\&canvasClickPresents=1\&'
-    'renderScale=1\&heavyGpu=1\&cubeScale=0.3\&workTime=10',
-]
-VENDOR_IDS = {
-  'arduino': [0x2a03, 0x2341],
-  'maestro': [0x1ffb],
-}
-
-
-def GetTtyDevices(tty_pattern, vendor_ids):
-  """Finds all devices connected to tty that match a pattern and device id.
-
-  If a serial device is connected to the computer via USB, this function
-  will check all tty devices that match tty_pattern, and return the ones
-  that have vendor identification number in the list vendor_ids.
-
-  Args:
-    tty_pattern: The search pattern, such as r'ttyACM\d+'.
-    vendor_ids: The list of 16-bit USB vendor ids, such as [0x2a03].
-
-  Returns:
-    A list of strings of tty devices, for example ['ttyACM0'].
-  """
-  product_string = 'PRODUCT='
-  sys_class_dir = '/sys/class/tty/'
-
-  tty_devices = glob.glob(sys_class_dir + '*')
-
-  matcher = re.compile('.*' + tty_pattern)
-  tty_matches = [x for x in tty_devices if matcher.search(x)]
-  tty_matches = [x[len(sys_class_dir):] for x in tty_matches]
-
-  found_devices = []
-  for match in tty_matches:
-    class_filename = sys_class_dir + match + '/device/uevent'
-    with open(class_filename, 'r') as uevent_file:
-      # Look for the desired product id in the uevent text.
-      for line in uevent_file:
-        if product_string in line:
-          ids = line[len(product_string):].split('/')
-          ids = [int(x, 16) for x in ids]
-
-          for desired_id in vendor_ids:
-            if desired_id in ids:
-              found_devices.append(match)
-
-  return found_devices
-
-
-class WebVrLatencyTest(object):
-  """Base class for all WebVR latency tests.
-
-  This handles the platform-independent _Run and _SaveResultsToFile functions.
-  Platform-specific setup and teardown should be somehow handled by classes
-  that inherit from this one.
-  """
-  def __init__(self, args):
-    super(WebVrLatencyTest, self).__init__(args)
-    self._num_samples = args.num_samples
-    self._test_urls = args.urls or DEFAULT_URLS
-    assert (self._num_samples > 0),'Number of samples must be greater than 0'
-    self._test_results = {}
-    self._test_name = 'vr_perf.motopho_latency'
-
-    self.robot_arm = None
-    # Look for any robot arms attached to the host.
-    # It is reasonable to assume that only one is attached at any given time.
-    for device_type, vendor_ids in VENDOR_IDS.iteritems():
-      devices = GetTtyDevices(r'ttyACM\d+', vendor_ids)
-      if devices:
-        if device_type == 'arduino':
-          if len(devices) != 1:
-            raise RuntimeError(
-                'Found %d arduino devices, expected 1' % len(devices))
-          self.robot_arm = arduino_arm.RobotArmArduino(devices[0])
-          break
-        elif device_type == 'maestro':
-          # The Maestro controllers open up two serial ports. We only use one,
-          # but if we don't detect both, that's an indication that something is
-          # wrong.
-          if len(devices) != 2:
-            raise RuntimeError(
-                'Found %d maestro devices, expected 2' % len(devices))
-          # The first port is used for sending the commands, while the second is
-          # used for communication. We only want the first one, which should
-          # always be the lower number.
-          devices.sort()
-          self.robot_arm = maestro_arm.RobotArmMaestro(devices[0])
-          break
-
-    if not self.robot_arm:
-      raise RuntimeError('Could not find any robot arms attached, aborting.')
-
-  def _Run(self, url):
-    """Run the latency test.
-
-    Handles the actual latency measurement, which is identical across
-    different platforms, as well as result storing.
-    """
-    # Motopho scripts use relative paths, so switch to the Motopho directory.
-    os.chdir(self._args.motopho_path)
-
-    # Set up the thread that runs the Motopho script.
-    motopho_thread = mt.MotophoThread()
-    motopho_thread.start()
-
-    # Run multiple times so we can get an average and standard deviation.
-    num_retries = 0
-    samples_obtained = 0
-    while samples_obtained < self._num_samples:
-      self.robot_arm.ResetPosition()
-      # Start the Motopho script.
-      motopho_thread.StartIteration()
-      # Let the Motopho be stationary so the script can calculate the bias.
-      time.sleep(3)
-      motopho_thread.BlockNextIteration()
-      # Move so we can measure latency.
-      self.robot_arm.StartMotophoMovement()
-      if not motopho_thread.WaitForIterationEnd(MOTOPHO_THREAD_TIMEOUT):
-        # TODO(bsheedy): Look into ways to prevent Motopho from not sending any
-        # data until unplugged and replugged into the machine after a reboot.
-        logging.error('Motopho thread timeout, '
-                      'Motopho may need to be replugged.')
-
-      self.robot_arm.StopAllMovement()
-
-      if motopho_thread.failed_iteration:
-        num_retries += 1
-        if num_retries > MOTOPHO_THREAD_RETRIES:
-          self._ReportSummaryResult(False, url)
-          # Raising an exception with another thread still alive causes the
-          # test to hang until the swarming timeout is hit, so kill the thread
-          # before raising.
-          motopho_thread.Terminate()
-          motopho_thread.join(MOTOPHO_THREAD_TERMINATION_TIMEOUT)
-          raise RuntimeError(
-              'Motopho thread failed more than %d times, aborting' % (
-                  MOTOPHO_THREAD_RETRIES))
-        logging.warning('Motopho thread failed, retrying iteration')
-      else:
-        samples_obtained += 1
-      time.sleep(1)
-    self._ReportSummaryResult(True, url)
-    self._StoreResults(motopho_thread.latencies, motopho_thread.correlations,
-                       url)
-    # Leaving old threads around shouldn't cause issues, but clean up just in
-    # case
-    motopho_thread.Terminate()
-    motopho_thread.join(THREAD_TERMINATION_TIMEOUT)
-    if motopho_thread.isAlive():
-      logging.warning('Motopho thread failed to terminate.')
-
-  def _ReportSummaryResult(self, passed, url):
-    """Stores pass/fail results for the summary output JSON file.
-
-    Args:
-      passed: Boolean, whether the test passed or not
-      url: The URL that was being tested
-    """
-    self._results_summary[url] = {
-        'actual': 'PASS' if passed else 'FAIL',
-        'expected': 'PASS',
-        'is_unexpected': not passed,
-    }
-
-  def _StoreResults(self, latencies, correlations, url):
-    """Temporarily stores the results of a test.
-
-    Stores the given results in memory to be later retrieved and written to
-    a file in _SaveResultsToFile once all tests are done. Also logs the raw
-    data and its average/standard deviation.
-    """
-    avg_latency = sum(latencies) / len(latencies)
-    std_latency = numpy.std(latencies)
-    avg_correlation = sum(correlations) / len(correlations)
-    std_correlation = numpy.std(correlations)
-    logging.info('\nURL: %s\n'
-                 'Raw latencies: %s\nRaw correlations: %s\n'
-                 'Avg latency: %f +/- %f\nAvg correlation: %f +/- %f',
-                 url, str(latencies), str(correlations), avg_latency,
-                 std_latency, avg_correlation, std_correlation)
-
-    self._test_results[url] = {
-        'correlations': correlations,
-        'std_correlation': std_correlation,
-        'latencies': latencies,
-        'std_latency': std_latency,
-    }
-
-  def _SaveResultsToFile(self):
-    outpath = None
-    if (hasattr(self._args, 'isolated_script_test_perf_output') and
-        self._args.isolated_script_test_perf_output):
-      outpath = self._args.isolated_script_test_perf_output
-    elif (hasattr(self._args, 'isolated_script_test_chartjson_output') and
-        self._args.isolated_script_test_chartjson_output):
-      outpath = self._args.isolated_script_test_chartjson_output
-    else:
-      logging.warning('No output file set, not saving results to file')
-      return
-
-    charts = {
-        'correlation': {
-            'summary': {
-                'improvement_direction': 'up',
-                'name': 'correlation',
-                'std': 0.0,
-                'type': 'list_of_scalar_values',
-                'units': '',
-                'values': [],
-            }
-        },
-        'latency': {
-            'summary': {
-                'improvement_direction': 'down',
-                'name': 'latency',
-                'std': 0.0,
-                'type': 'list_of_scalar_values',
-                'units': 'ms',
-                'values': [],
-            }
-        }
-    }
-    for url, results in self._test_results.iteritems():
-      charts['correlation'][url] = {
-          'improvement_direction': 'up',
-          'name': 'correlation',
-          'std': results['std_correlation'],
-          'type': 'list_of_scalar_values',
-          'units': '',
-          'values': results['correlations'],
-      }
-
-      charts['correlation']['summary']['values'].extend(
-          results['correlations'])
-
-      charts['latency'][url] = {
-          'improvement_direction': 'down',
-          'name': 'latency',
-          'std': results['std_latency'],
-          'type': 'list_of_scalar_values',
-          'units': 'ms',
-          'values': results['latencies'],
-      }
-
-      charts['latency']['summary']['values'].extend(results['latencies'])
-
-    results = {
-      'format_version': '1.0',
-      'benchmark_name': self._test_name,
-      'benchmark_description': 'Measures the motion-to-photon latency of WebVR',
-      'charts': charts,
-    }
-
-    with file(outpath, 'w') as outfile:
-      json.dump(results, outfile)
-
-
-  def _OneTimeTeardown(self):
-    super(WebVrLatencyTest, self)._OneTimeTeardown()
-    if isinstance(self.robot_arm, maestro_arm.RobotArmMaestro):
-      self.robot_arm.Terminate()
-      self.robot_arm.join(THREAD_TERMINATION_TIMEOUT)
-      if (self.robot_arm.isAlive()):
-        logging.warning('Robot arm thread failed to terminate')
diff --git a/chrome/test/vr/perf/vr_perf_test.py b/chrome/test/vr/perf/vr_perf_test.py
deleted file mode 100644
index fb15714..0000000
--- a/chrome/test/vr/perf/vr_perf_test.py
+++ /dev/null
@@ -1,118 +0,0 @@
-# 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.
-
-import json
-import logging
-import subprocess
-import time
-
-class VrPerfTest(object):
-  """Base class for all non-Telemetry VR perf tests.
-
-  This class is meant to be subclassed for each platform and test type to
-  be run.
-  """
-  def __init__(self, args):
-    super(VrPerfTest, self).__init__()
-    self._args = args
-    self._test_urls = []
-    self._results_summary = {}
-    self._test_name = ''
-
-  def RunTests(self):
-    """Runs some test on all the URLs provided to the test on creation.
-
-    Repeatedly runs the steps to start Chrome, measure/store metrics, and
-    clean up before storing all results to a single file for dashboard
-    uploading.
-    """
-    try:
-      self._OneTimeSetup()
-      for url in self._test_urls:
-        try:
-          self._Setup(url)
-          self._Run(url)
-        finally:
-          # We always want to perform teardown even if an exception gets raised.
-          self._Teardown()
-      self._SaveResultsToFile()
-      self._SaveOutput()
-    finally:
-      self._OneTimeTeardown()
-
-  def _OneTimeSetup(self):
-    """Performs any platform-specific setup once before any tests."""
-    raise NotImplementedError(
-        'Platform-specific setup must be implemented in subclass')
-
-  def _Setup(self, url):
-    """Performs any platform-specific setup before each test."""
-    raise NotImplementedError(
-        'Platform-specific setup must be implemented in subclass')
-
-  def _Run(self, url):
-    """Performs the actual test."""
-    raise NotImplementedError('Test must be implemented in subclass')
-
-  def _Teardown(self):
-    """Performs any platform-specific teardown after each test."""
-    raise NotImplementedError(
-        'Platform-specific teardown must be implemented in subclass')
-
-  def _OneTimeTeardown(self):
-    """Performs any platform-specific teardown after all tests."""
-    raise NotImplementedError(
-        'Platform-specific teardown must be implemented in subclass')
-
-  def _RunCommand(self, cmd):
-    """Runs the given cmd list and returns its output.
-
-    Prints the command's output and exits if any error occurs.
-
-    Returns:
-      A string containing the stdout and stderr of the command.
-    """
-    try:
-      return subprocess.check_output(cmd, stderr=subprocess.STDOUT)
-    except subprocess.CalledProcessError as e:
-      logging.error('Failed command output: %s', e.output)
-      raise e
-
-  def _SetChromeCommandLineFlags(self, flags):
-    """Sets the commandline flags that Chrome reads on startup."""
-    raise NotImplementedError(
-        'Command-line flag setting must be implemented in subclass')
-
-  def _SaveResultsToFile(self):
-    """Saves test results to a Chrome perf dashboard-compatible JSON file."""
-    raise NotImplementedError(
-        'Result saving must be implemented in subclass')
-
-  def _SaveOutput(self):
-    """Saves the failures and results validity if necessary."""
-    if not (hasattr(self._args, 'isolated_script_test_output') and
-            self._args.isolated_script_test_output):
-      logging.warning('Isolated script output file not specified, not saving')
-      return
-
-    results_summary = {
-        'interrupted': False,
-        'path_delimiter': '/',
-        'seconds_since_epoch': time.time(),
-        'version': 3,
-        'tests': {
-            self._test_name: self._results_summary
-        }
-    }
-
-    failure_counts = {}
-    for _, results in self._results_summary.iteritems():
-      if results['actual'] in failure_counts:
-        failure_counts[results['actual']] += 1
-      else:
-        failure_counts[results['actual']] = 1
-    results_summary['num_failures_by_type'] = failure_counts
-
-    with file(self._args.isolated_script_test_output, 'w') as outfile:
-      json.dump(results_summary, outfile)
diff --git a/chrome/test/vr/perf/vr_test_arg_parser.py b/chrome/test/vr/perf/vr_test_arg_parser.py
deleted file mode 100644
index da233172..0000000
--- a/chrome/test/vr/perf/vr_test_arg_parser.py
+++ /dev/null
@@ -1,103 +0,0 @@
-# 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.
-
-import argparse
-import logging
-import os
-
-
-DEFAULT_ADB_PATH = os.path.realpath('../../third_party/android_sdk/public/'
-                                    'platform-tools/adb')
-DEFAULT_DURATION_SECONDS = 30
-# TODO(bsheedy): See about adding tool via DEPS instead of relying on it
-# existing on the bot already.
-DEFAULT_MOTOPHO_PATH = os.path.join(os.path.expanduser('~'), 'motopho/Motopho')
-DEFAULT_NUM_SAMPLES = 10
-
-
-class VrTestArgParser(argparse.ArgumentParser):
-  def __init__(self):
-    super(VrTestArgParser, self).__init__()
-    self.AddCommonOptions()
-
-  def AddCommonOptions(self):
-    """Adds argument parsing options that are common to all VR perf tests."""
-    self.add_argument('--adb-path',
-                      type=os.path.realpath,
-                      help='The absolute path to adb',
-                      default=DEFAULT_ADB_PATH)
-    self.add_argument('--additional-flags',
-                      default=None,
-                      help='A string containing any additional Chrome command '
-                           'line flags to set for a test run')
-    # Add --isolated-script-test-* args to be compatible being run as an
-    # isolated script on the automated bots
-    # TODO(bsheedy): Implement a cleaner solution than this
-    self.add_argument('--isolated-script-test-chartjson-output',
-                      type=os.path.realpath,
-                      help='Path to a JSON file where the perf dashboard '
-                           'chart data will be output.')
-    self.add_argument('--isolated-script-test-perf-output',
-                      type=os.path.realpath,
-                      help='Path to a JSON file where the perf dashboard '
-                           'chart data will be output.')
-    self.add_argument('--isolated-script-test-output',
-                      type=os.path.realpath,
-                      help='Path to a JSON file where failures and the '
-                           'of the results will be reported.')
-    self.add_argument('--url',
-                      action='append',
-                      default=[],
-                      dest='urls',
-                      help='The URL of a WebVR app to use. Defaults to a set '
-                           'of URLs with various CPU and GPU loads')
-    self.add_argument('-v', '--verbose',
-                      dest='verbose_count', default=0, action='count',
-                      help='Verbose level (multiple times for more)')
-
-  def AddFpsOptions(self):
-    """Adds argument parsing options specific to VrCore FPS tests."""
-    self.add_argument('--duration',
-                      default=DEFAULT_DURATION_SECONDS,
-                      type=int,
-                      help='The duration spent collecting data from each URL')
-
-  def AddLatencyOptions(self):
-    """Adds argument parsing options specific to motopho latency tests."""
-    self.add_argument('--motopho-path',
-                      type=os.path.realpath,
-                      help='The absolute path to the directory with Motopho '
-                           'scripts',
-                      default=DEFAULT_MOTOPHO_PATH)
-    self.add_argument('--platform',
-                      help='The platform the test is being run on, either '
-                           '"android" or "windows"')
-    self.add_argument('--num-samples',
-                      default=DEFAULT_NUM_SAMPLES,
-                      type=int,
-                      help='The number of times to run the test before the '
-                           'results are averaged')
-
-  def ParseArgumentsAndSetLogLevel(self):
-    """Parses the commandline arguments based on the options set.
-
-    Also sets the log level based on the number of -v's input.
-    Returns:
-      The parsed args from an ArgumentParser object
-    """
-    (args, unknown_args) = self.parse_known_args()
-    self.SetLogLevel(args.verbose_count)
-    if unknown_args:
-      self.error('Received unknown arguments: %s' % ' '.join(unknown_args))
-    return args
-
-  def SetLogLevel(self, verbose_count):
-    """Sets the log level based on the command line arguments."""
-    log_level = logging.WARNING
-    if verbose_count == 1:
-      log_level = logging.INFO
-    elif verbose_count >= 2:
-      log_level = logging.DEBUG
-    logger = logging.getLogger()
-    logger.setLevel(log_level)
diff --git a/chrome/test/vr/perf/vrcore_fps/__init__.py b/chrome/test/vr/perf/vrcore_fps/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/chrome/test/vr/perf/vrcore_fps/__init__.py
+++ /dev/null
diff --git a/chrome/test/vr/perf/vrcore_fps/run_vrcore_fps_test.py b/chrome/test/vr/perf/vrcore_fps/run_vrcore_fps_test.py
deleted file mode 100644
index d26d9937..0000000
--- a/chrome/test/vr/perf/vrcore_fps/run_vrcore_fps_test.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# 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.
-
-"""Script for automatically measuring FPS for VR via VrCore perf logging.
-
-Android only.
-VrCore has a developer option to log performance data to logcat. This test
-visits various WebVR URLs and collects the FPS data reported by VrCore.
-"""
-
-# Needs to be imported first in order to add the parent directory to path.
-import vrcore_fps_test_config
-import vrcore_fps_test
-import vr_test_arg_parser
-
-
-def main():
-  parser = vr_test_arg_parser.VrTestArgParser()
-  parser.AddFpsOptions()
-  args = parser.ParseArgumentsAndSetLogLevel()
-  test = vrcore_fps_test.VrCoreFpsTest(args)
-  test.RunTests()
-
-
-if __name__ == '__main__':
-  main()
diff --git a/chrome/test/vr/perf/vrcore_fps/vr_perf_summary.py b/chrome/test/vr/perf/vrcore_fps/vr_perf_summary.py
deleted file mode 100644
index 02880dc3..0000000
--- a/chrome/test/vr/perf/vrcore_fps/vr_perf_summary.py
+++ /dev/null
@@ -1,186 +0,0 @@
-# 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.
-
-"""Parses logcat output for VrCore performance logs and computes stats.
-
-Can be used either as a standalone manual script or as part of the automated
-VR performance tests.
-
-For manual use, simply pipe logcat output into the script.
-"""
-
-import logging
-import math
-import sys
-
-LINE_SESSION_START = 'PerfMon: Start of session'
-LINE_SESSION_END = 'PerfMon: End of session'
-
-LINE_ASYNC_FPS = 'Async reprojection thread FPS: '
-LINE_APP_FPS = 'Application FPS: '
-LINE_BLOCKED_FRAME = 'Application frame submits blocked on GPU in FPS window: '
-LINE_MISSED_VSYNC = 'Async reprojection thread missed vsync (late by '
-
-APP_FPS_KEY ='app_fps_data'
-ASYNC_FPS_KEY = 'async_fps_data'
-ASYNC_MISSED_KEY = 'asymc_missed_data'
-BLOCKED_SUBMISSION_KEY = 'blocked_submission_key'
-
-def CalculateAverage(inputs):
-  return sum(inputs) / len(inputs)
-
-# Implement own standard deviation function instead of using numpy so that
-# script has no dependencies on third-party libraries.
-def CalculateStandardDeviation(inputs):
-  average = sum(inputs) / len(inputs)
-  sum_of_squares = 0
-  for element in inputs:
-    sum_of_squares += math.pow(element - average, 2)
-  sum_of_squares /= len(inputs)
-  return math.sqrt(sum_of_squares)
-
-def GetInputFromStdin():
-  """Turns stdin input into a single string.
-
-  Returns:
-    A single string containing all lines input via Stdin
-  """
-  print 'Waiting for stdin input.'
-  lines = []
-  while True:
-    try:
-      line = sys.stdin.readline()
-    except KeyboardInterrupt:
-      break
-    if not line:
-      break
-    lines.append(line)
-
-  return '\n'.join(lines)
-
-def ParseLinesIntoSessions(lines):
-  """Parses a string for VR performance logs.
-
-  lines: A string containing lines of logcat output.
-
-  Returns:
-    A list of strings, where each element contains all the lines of interest
-    for a single session
-  """
-  logging_sessions = []
-  lines_of_interest = [LINE_ASYNC_FPS, LINE_APP_FPS, LINE_BLOCKED_FRAME,
-                       LINE_MISSED_VSYNC]
-  for line in lines.split('\n'):
-    if LINE_SESSION_START in line:
-      logging_sessions.append("")
-    elif LINE_SESSION_END in line:
-      continue
-    for loi in lines_of_interest:
-      if loi in line:
-        logging_sessions[-1] += (line + "\n")
-        break
-  return logging_sessions
-
-def ComputeSessionStatistics(session):
-  """Extracts raw statistical data from a session string.
-
-  session: A string containing all the performance logging lines from
-    a single VR session
-
-  Returns:
-    A dictionary containing the raw statistics
-  """
-  app_fps_data = []
-  async_fps_data = []
-  async_missed_data = []
-  blocked_submission_data = []
-
-  for line in session.split("\n"):
-    if LINE_ASYNC_FPS in line: # Async thread FPS.
-      async_fps_data.append( float(line.split(LINE_ASYNC_FPS)[1]) )
-    elif LINE_APP_FPS in line: # Application FPS.
-      app_fps_data.append( float(line.split(LINE_APP_FPS)[1]) )
-    elif LINE_BLOCKED_FRAME in line: # Application frame blocked.
-      blocked_submission_data.append(int(line.split(LINE_BLOCKED_FRAME)[1]))
-    elif LINE_MISSED_VSYNC in line: # Async thread missed vsync.
-      # Convert to milliseconds as well.
-      async_missed_data.append( float(
-          line.split(LINE_MISSED_VSYNC)[1].split("us")[0]) / 1000)
-
-  return {
-      APP_FPS_KEY: app_fps_data,
-      ASYNC_FPS_KEY: async_fps_data,
-      ASYNC_MISSED_KEY: async_missed_data,
-      BLOCKED_SUBMISSION_KEY: blocked_submission_data,
-  }
-
-def StringifySessionStatistics(statistics):
-  """Turns a raw statistics dictionary into a formatted string.
-
-  statistics: A raw statistics dictionary
-
-  Returns:
-    A string with min/max/average calculations
-  """
-  app_fps_data = statistics[APP_FPS_KEY]
-  async_fps_data = statistics[ASYNC_FPS_KEY]
-  async_missed_data = statistics[ASYNC_MISSED_KEY]
-  blocked_submission_data = statistics[BLOCKED_SUBMISSION_KEY]
-
-  output = """
-  Min application FPS: %(min_app_fps).4f
-  Max application FPS: %(max_app_fps).4f
-  Average application FPS: %(avg_app_fps).4f +/- %(std_app_fps).4f
-  %(blocked)d total application frame submissions blocked on GPU
-  ---
-  Min application FPS after first second: %(min_app_fps_after).4f
-  Max application FPS after first second: %(max_app_fps_after).4f
-  Average application FPS after first second: %(avg_app_fps_after).4f +/- %(std_app_fps_after).4f
-  ---
-  Min async reprojection thread FPS: %(min_async_fps).4f
-  Max async reprojection thread FPS: %(max_async_fps).4f
-  Average async reprojection thread FPS: %(avg_async_fps).4f +/- %(std_async_fps).4f
-  Async reprojection thread missed %(async_missed)d vsyncs
-  """ % ({
-      'min_app_fps': min(app_fps_data),
-      'max_app_fps': max(app_fps_data),
-      'avg_app_fps': CalculateAverage(app_fps_data),
-      'std_app_fps': CalculateStandardDeviation(app_fps_data),
-      'blocked': sum(blocked_submission_data),
-      'min_app_fps_after': min(app_fps_data[1:]),
-      'max_app_fps_after': max(app_fps_data[1:]),
-      'avg_app_fps_after': CalculateAverage(app_fps_data[1:]),
-      'std_app_fps_after': CalculateStandardDeviation(app_fps_data[1:]),
-      'min_async_fps': min(async_fps_data),
-      'max_async_fps': max(async_fps_data),
-      'avg_async_fps': CalculateAverage(async_fps_data),
-      'std_async_fps': CalculateStandardDeviation(async_fps_data),
-      'async_missed': len(async_missed_data)})
-
-
-  if len(async_missed_data) > 0:
-    output += 'Average vsync miss time: %.4f +/- %.4f ms' % (
-        CalculateAverage(async_missed_data),
-        CalculateStandardDeviation(async_missed_data))
-  return output
-
-
-def ComputeAndPrintStatistics(session):
-  if len(session) == 0:
-    logging.warning('No data collected for session')
-    return
-  logging.warning(StringifySessionStatistics(ComputeSessionStatistics(session)))
-
-
-def main():
-  logging_sessions = ParseLinesIntoSessions(GetInputFromStdin())
-  logging.warning('Found %d sessions', len(logging_sessions))
-  counter = 1
-  for session in logging_sessions:
-    logging.warning('\n#### Session %d ####', counter)
-    ComputeAndPrintStatistics(session)
-    counter += 1
-
-if __name__ == '__main__':
-  main()
diff --git a/chrome/test/vr/perf/vrcore_fps/vrcore_fps_test.py b/chrome/test/vr/perf/vrcore_fps/vrcore_fps_test.py
deleted file mode 100644
index 5433d73..0000000
--- a/chrome/test/vr/perf/vrcore_fps/vrcore_fps_test.py
+++ /dev/null
@@ -1,180 +0,0 @@
-# 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.
-
-"""Visits various WebVR app URLs and records performance metrics from VrCore.
-"""
-
-import android_vr_perf_test
-import vr_perf_summary
-
-import json
-import logging
-import numpy
-import os
-import time
-
-DEFAULT_URLS = [
-  # Standard WebVR sample app with no changes.
-  'https://webvr.info/samples/test-slow-render.html?'
-  'canvasClickPresents=1\&renderScale=1',
-  # Increased render scale.
-  'https://webvr.info/samples/test-slow-render.html?'
-  'canvasClickPresents=1\&renderScale=1.5',
-  # Default render scale, but increased load.
-  'https://webvr.info/samples/test-slow-render.html?'
-  'canvasClickPresents=1\&'
-  'renderScale=1\&heavyGpu=1\&cubeScale=0.2\&workTime=5',
-  # Further increased load.
-  'https://webvr.info/samples/test-slow-render.html?'
-  'canvasClickPresents=1\&'
-  'renderScale=1\&heavyGpu=1\&cubeScale=0.3\&workTime=10',
-]
-
-
-class VrCoreFpsTest(android_vr_perf_test.AndroidVrPerfTest):
-  def __init__(self, args):
-    super(VrCoreFpsTest, self).__init__(args)
-    self._duration = args.duration
-    assert (self._duration > 0),'Duration must be positive'
-    self._test_urls = args.urls or DEFAULT_URLS
-    self._test_results = {}
-
-  def _Run(self, url):
-    # We're already in VR and logcat is cleared during setup, so wait for
-    # the test duration.
-    time.sleep(self._duration)
-
-    # Exit VR so that VrCore stops logging performance data.
-    self._Adb(['shell', 'input', 'keyevent', 'KEYCODE_BACK'])
-    time.sleep(1)
-
-    output = self._Adb(['logcat', '-d'])
-    logging_sessions = vr_perf_summary.ParseLinesIntoSessions(output)
-    if len(logging_sessions) != 1:
-      raise RuntimeError('Expected 1 VR session, found %d' %
-                         len(logging_sessions))
-    session = logging_sessions[0]
-    if len(session) == 0:
-      raise RuntimeError('No data actually collected in logging session')
-    self._StoreResults(url, vr_perf_summary.ComputeSessionStatistics(session))
-
-  def _StoreResults(self, url, results):
-    """Temporarily stores the results of a test.
-
-    Stores the given results in memory to be later retrieved and written to
-    a file in _SaveResultsToFile once all tests are done. Also logs the raw
-    data and calculated statistics.
-    """
-    logging.info('\nURL: %s\n'
-                 'Raw app FPS: %s\n'
-                 'Raw asynchronous reprojection thread FPS: %s\n'
-                 'Raw asynchronous reprojection thread missed frames: %s\n'
-                 'Raw frame submissions blocked on gpu: %s\n'
-                 '%s\n' %
-                 (url, str(results[vr_perf_summary.APP_FPS_KEY]),
-                  str(results[vr_perf_summary.ASYNC_FPS_KEY]),
-                  str(results[vr_perf_summary.ASYNC_MISSED_KEY]),
-                  str(results[vr_perf_summary.BLOCKED_SUBMISSION_KEY]),
-                  vr_perf_summary.StringifySessionStatistics(results)))
-    self._test_results[url] = results
-
-  def _SaveResultsToFile(self):
-    outpath = None
-    if (hasattr(self._args, 'isolated_script_test_perf_output') and
-        self._args.isolated_script_test_perf_output):
-      outpath = self._args.isolated_script_test_perf_output
-    elif (hasattr(self._args, 'isolated_script_test_chartjson_output') and
-        self._args.isolated_script_test_chartjson_output):
-      outpath = self._args.isolated_script_test_chartjson_output
-    else:
-      logging.warning('No output file set, not saving results to file')
-      return
-
-    # TODO(bsheedy): Move this to a common place so other tests can use it.
-    def _GenerateTrace(name, improvement_direction, std=None,
-                       value_type=None, units=None, values=None):
-      return {
-          'improvement_direction': improvement_direction,
-          'name': name,
-          'std': std or 0.0,
-          'type': value_type or 'list_of_scalar_values',
-          'units': units or '',
-          'values': values or [],
-      }
-
-    def _GenerateBaseChart(name, improvement_direction, std=None,
-                           value_type=None, units=None, values=None):
-      return {'summary': _GenerateTrace(name, improvement_direction, std=std,
-                                        value_type=value_type, units=units,
-                                        values=values)}
-
-    registered_charts = {}
-    def _RegisterChart(name, improvement_direction, value_func, std_func,
-                       results_key, units=None):
-      registered_charts[self._device_name + name] = {
-          'improvement_direction': improvement_direction,
-          'value_func': value_func,
-          'std_func': std_func,
-          'results_key': results_key,
-          'units': units or ''
-      }
-
-    # value/summary functions.
-    def f_identity(x): return x
-    def f_min(x): return [min(x)]
-    def f_max(x): return [max(x)]
-    # std functions.
-    def f_zero(x): return 0.0
-    def f_numpy(x): return numpy.std(x)
-
-    _RegisterChart('_avg_app_fps', 'up', f_identity, f_numpy,
-                   vr_perf_summary.APP_FPS_KEY, units='FPS')
-    _RegisterChart('_min_app_fps', 'up', f_min, f_zero,
-                   vr_perf_summary.APP_FPS_KEY, units='FPS')
-    _RegisterChart('_max_app_fps', 'up', f_max, f_zero,
-                   vr_perf_summary.APP_FPS_KEY, units='FPS')
-    _RegisterChart('_avg_async_thread_fps', 'up', f_identity, f_numpy,
-                   vr_perf_summary.ASYNC_FPS_KEY, units='FPS')
-    _RegisterChart('_min_async_thread_fps', 'up', f_min, f_zero,
-                   vr_perf_summary.ASYNC_FPS_KEY, units='FPS')
-    _RegisterChart('_max_async_thread_fps', 'up', f_max, f_zero,
-                   vr_perf_summary.ASYNC_FPS_KEY, units='FPS')
-    # Unlike the rest of the data, missed async reprojection thread vsyncs are
-    # only logged when they happen so it's normal to get an empty list, which
-    # makes numpy and the perf dashboard unhappy.
-    _RegisterChart('_avg_async_thread_vsync_miss_time', 'down',
-                   lambda x: x or [0.0],
-                   lambda x: 0.0 if len(x) == 0 else numpy.std(x),
-                   vr_perf_summary.ASYNC_MISSED_KEY, units='ms')
-    _RegisterChart('_num_async_thread_vsync_misses', 'down', lambda x: [len(x)],
-                   f_zero, vr_perf_summary.ASYNC_MISSED_KEY)
-    _RegisterChart('_num_blocked_frame_submissions', 'down', lambda x: [sum(x)],
-                   f_zero, vr_perf_summary.BLOCKED_SUBMISSION_KEY)
-
-    charts = {}
-    # Set up empty summary charts.
-    for chart, config in registered_charts.iteritems():
-      charts[chart] = _GenerateBaseChart(chart, config['improvement_direction'],
-                                         units=config['units'])
-
-    # Populate a trace for each URL in each chart.
-    for url, results in self._test_results.iteritems():
-      for chart, config in registered_charts.iteritems():
-        result = results[config['results_key']]
-        charts[chart][url] = (
-            _GenerateTrace(chart, config['improvement_direction'],
-                           units=config['units'],
-                           std=config['std_func'](result),
-                           values=config['value_func'](result)))
-        charts[chart]['summary']['values'].extend(config['value_func'](result))
-
-    results = {
-        'format_version': '1.0',
-        'benchmarck_name': 'vrcore_fps',
-        'benchmark_description': 'Measures VR FPS using VrCore perf logging',
-        'charts': charts,
-    }
-
-    with file(outpath, 'w') as outfile:
-      json.dump(results, outfile)
diff --git a/chrome/test/vr/perf/vrcore_fps/vrcore_fps_test_config.py b/chrome/test/vr/perf/vrcore_fps/vrcore_fps_test_config.py
deleted file mode 100644
index 58acb7c..0000000
--- a/chrome/test/vr/perf/vrcore_fps/vrcore_fps_test_config.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# 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.
-
-import os
-import sys
-
-# Add //chrome/test/vr/perf to system path.
-sys.path.append(os.path.join(os.path.dirname(__file__),
-                             os.pardir))
diff --git a/chromecast/browser/BUILD.gn b/chromecast/browser/BUILD.gn
index a058da6..75a93ba 100644
--- a/chromecast/browser/BUILD.gn
+++ b/chromecast/browser/BUILD.gn
@@ -387,6 +387,8 @@
       "exo/cast_wm_helper.h",
       "exo/wayland_server_controller.cc",
       "exo/wayland_server_controller.h",
+      "webview/js_channel_service.cc",
+      "webview/js_channel_service.h",
       "webview/platform_views_rpc_instance.cc",
       "webview/platform_views_rpc_instance.h",
       "webview/web_content_controller.cc",
diff --git a/chromecast/browser/cast_content_browser_client.cc b/chromecast/browser/cast_content_browser_client.cc
index 548ba0c..9071034 100644
--- a/chromecast/browser/cast_content_browser_client.cc
+++ b/chromecast/browser/cast_content_browser_client.cc
@@ -137,7 +137,9 @@
 #endif
 
 #if BUILDFLAG(ENABLE_CAST_WAYLAND_SERVER)
+#include "chromecast/browser/webview/js_channel_service.h"
 #include "chromecast/browser/webview/webview_controller.h"
+#include "chromecast/common/mojom/js_channel.mojom.h"
 #endif  // BUILDFLAG(ENABLE_CAST_WAYLAND_SERVER)
 
 namespace chromecast {
@@ -1020,6 +1022,20 @@
 #endif
 }
 
+void CastContentBrowserClient::BindHostReceiverForRenderer(
+    content::RenderProcessHost* render_process_host,
+    mojo::GenericPendingReceiver receiver) {
+#if BUILDFLAG(ENABLE_CAST_WAYLAND_SERVER)
+  if (auto r = receiver.As<::chromecast::mojom::JsChannelBindingProvider>()) {
+    JsChannelService::Create(render_process_host, std::move(r),
+                             base::ThreadTaskRunnerHandle::Get());
+    return;
+  }
+#endif
+  ContentBrowserClient::BindHostReceiverForRenderer(render_process_host,
+                                                    std::move(receiver));
+}
+
 std::string CastContentBrowserClient::GetUserAgent() {
   return chromecast::shell::GetUserAgent();
 }
diff --git a/chromecast/browser/cast_content_browser_client.h b/chromecast/browser/cast_content_browser_client.h
index 9ad95ee..4a2dc2c5 100644
--- a/chromecast/browser/cast_content_browser_client.h
+++ b/chromecast/browser/cast_content_browser_client.h
@@ -226,6 +226,9 @@
   std::string GetUserAgent() override;
   bool DoesSiteRequireDedicatedProcess(content::BrowserContext* browser_context,
                                        const GURL& effective_site_url) override;
+  void BindHostReceiverForRenderer(
+      content::RenderProcessHost* render_process_host,
+      mojo::GenericPendingReceiver receiver) override;
   CastFeatureListCreator* GetCastFeatureListCreator() {
     return cast_feature_list_creator_;
   }
diff --git a/chromecast/browser/webview/js_channel_service.cc b/chromecast/browser/webview/js_channel_service.cc
new file mode 100644
index 0000000..64cd700
--- /dev/null
+++ b/chromecast/browser/webview/js_channel_service.cc
@@ -0,0 +1,121 @@
+// Copyright 2019 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.
+
+#include "chromecast/browser/webview/js_channel_service.h"
+
+#include <algorithm>
+
+#include "base/lazy_instance.h"
+#include "content/public/browser/render_process_host.h"
+#include "mojo/public/cpp/bindings/self_owned_receiver.h"
+
+namespace chromecast {
+namespace {
+
+class JsChannelImpl : public mojom::JsChannel {
+ public:
+  JsChannelImpl(const std::string& channel, JsChannelCallback callback);
+  ~JsChannelImpl() override;
+
+ private:
+  void PostMessage(const std::string& message) override;
+
+  std::string channel_;
+  JsChannelCallback callback_;
+
+  DISALLOW_COPY_AND_ASSIGN(JsChannelImpl);
+};
+
+struct Instance {
+  int process_id;
+  int routing_id;
+  JsClientInstance* instance;
+};
+
+using EndpointList = std::vector<Instance>;
+static base::LazyInstance<EndpointList>::DestructorAtExit g_instance_list =
+    LAZY_INSTANCE_INITIALIZER;
+
+}  // namespace
+
+JsChannelService::JsChannelService(int process_id) : process_id_(process_id) {}
+
+JsChannelService::~JsChannelService() = default;
+
+// static
+void JsChannelService::Create(
+    content::RenderProcessHost* render_process_host,
+    mojo::PendingReceiver<mojom::JsChannelBindingProvider> receiver,
+    scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
+  mojo::MakeSelfOwnedReceiver(
+      std::make_unique<JsChannelService>(render_process_host->GetID()),
+      std::move(receiver), std::move(task_runner));
+}
+
+void JsChannelService::Register(
+    int routing_id,
+    mojo::PendingRemote<mojom::JsChannelClient> client) {
+  if (JsClientInstance::Find(process_id_, routing_id)) {
+    LOG(ERROR) << "Duplicate process/routing ID pair!";
+  } else {
+    // ClientInstance's lifetime is tied to the JsChannelClient mojo
+    // channel. It will delete itself when that channel closes.
+    new JsClientInstance(process_id_, routing_id, std::move(client));
+  }
+}
+
+JsClientInstance::JsClientInstance(
+    int process_id,
+    int routing_id,
+    mojo::PendingRemote<mojom::JsChannelClient> client)
+    : client_(std::move(client)) {
+  client_.set_disconnect_with_reason_handler(
+      base::BindRepeating([](JsClientInstance* self, uint32_t err,
+                             const std::string& str) { delete self; },
+                          base::Unretained(this)));
+  g_instance_list.Get().push_back({process_id, routing_id, this});
+}
+
+JsClientInstance::~JsClientInstance() {
+  auto& list = g_instance_list.Get();
+  list.erase(std::find_if(list.begin(), list.end(), [this](const auto& e) {
+    return e.instance == this;
+  }));
+}
+
+// static
+JsClientInstance* JsClientInstance::Find(int process_id, int routing_id) {
+  for (auto& e : g_instance_list.Get()) {
+    if (e.process_id == process_id && e.routing_id == routing_id)
+      return e.instance;
+  }
+  return nullptr;
+}
+
+void JsClientInstance::AddChannel(const std::string& channel,
+                                  JsChannelCallback callback) {
+  mojo::PendingRemote<mojom::JsChannel> channel_remote;
+  auto receiver = channel_remote.InitWithNewPipeAndPassReceiver();
+  client_->CreateChannel(channel, std::move(channel_remote));
+
+  mojo::MakeSelfOwnedReceiver(
+      std::make_unique<JsChannelImpl>(channel, std::move(callback)),
+      std::move(receiver));
+}
+
+void JsClientInstance::RemoveChannel(const std::string& channel) {
+  client_->RemoveChannel(channel);
+}
+
+JsChannelImpl::JsChannelImpl(const std::string& channel,
+                             JsChannelCallback callback)
+    : channel_(channel), callback_(std::move(callback)) {}
+
+JsChannelImpl::~JsChannelImpl() = default;
+
+void JsChannelImpl::PostMessage(const std::string& message) {
+  callback_.Run(channel_, message);
+}
+
+}  // namespace chromecast
diff --git a/chromecast/browser/webview/js_channel_service.h b/chromecast/browser/webview/js_channel_service.h
new file mode 100644
index 0000000..d5d69ed
--- /dev/null
+++ b/chromecast/browser/webview/js_channel_service.h
@@ -0,0 +1,69 @@
+// Copyright 2019 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 CHROMECAST_BROWSER_WEBVIEW_JS_CHANNEL_SERVICE_H_
+#define CHROMECAST_BROWSER_WEBVIEW_JS_CHANNEL_SERVICE_H_
+
+#include "base/callback_forward.h"
+#include "base/macros.h"
+#include "chromecast/common/mojom/js_channel.mojom.h"
+#include "mojo/public/cpp/bindings/pending_receiver.h"
+#include "mojo/public/cpp/bindings/receiver.h"
+#include "mojo/public/cpp/bindings/unique_receiver_set.h"
+#include "services/service_manager/public/cpp/binder_registry.h"
+
+namespace content {
+class RenderProcessHost;
+}  // namespace content
+
+namespace chromecast {
+
+using JsChannelCallback =
+    base::RepeatingCallback<void(const std::string&, const std::string&)>;
+
+class JsChannelService : public mojom::JsChannelBindingProvider {
+ public:
+  static void Create(
+      content::RenderProcessHost* render_process_host,
+      mojo::PendingReceiver<mojom::JsChannelBindingProvider> receiver,
+      scoped_refptr<base::SingleThreadTaskRunner> task_runner);
+
+  explicit JsChannelService(int process_id);
+  ~JsChannelService() override;
+
+ private:
+  // mojom::JsChannelBindingProvider implementation:
+  void Register(int routing_id,
+                mojo::PendingRemote<mojom::JsChannelClient> client) override;
+
+  int process_id_;
+
+  DISALLOW_COPY_AND_ASSIGN(JsChannelService);
+};
+
+class JsClientInstance {
+ public:
+  void AddChannel(const std::string& channel, JsChannelCallback callback);
+  void RemoveChannel(const std::string& channel);
+
+  static JsClientInstance* Find(int process_id, int routing_id);
+
+ private:
+  friend class JsChannelService;
+
+  // These are created by JsChannelService.
+  JsClientInstance(int process_id,
+                   int routing_id,
+                   mojo::PendingRemote<mojom::JsChannelClient> client);
+  ~JsClientInstance();
+
+  mojo::Remote<mojom::JsChannelClient> client_;
+  mojo::UniqueReceiverSet<mojom::JsChannel> channels_;
+
+  DISALLOW_COPY_AND_ASSIGN(JsClientInstance);
+};
+
+}  // namespace chromecast
+
+#endif  // CHROMECAST_BROWSER_WEBVIEW_JS_CHANNEL_SERVICE_H_
diff --git a/chromecast/browser/webview/web_content_controller.cc b/chromecast/browser/webview/web_content_controller.cc
index d1c8ca7..6a601e2e 100644
--- a/chromecast/browser/webview/web_content_controller.cc
+++ b/chromecast/browser/webview/web_content_controller.cc
@@ -13,6 +13,7 @@
 #include "content/public/browser/browser_context.h"
 #include "content/public/browser/browsing_data_remover.h"
 #include "content/public/browser/navigation_handle.h"
+#include "content/public/browser/render_process_host.h"
 #include "content/public/browser/render_view_host.h"
 #include "content/public/browser/render_widget_host.h"
 #include "content/public/browser/render_widget_host_view.h"
@@ -24,7 +25,9 @@
 
 namespace chromecast {
 
-WebContentController::WebContentController(Client* client) : client_(client) {}
+WebContentController::WebContentController(Client* client) : client_(client) {
+  js_channels_ = std::make_unique<WebContentJsChannels>(client_);
+}
 
 WebContentController::~WebContentController() {
   if (surface_) {
@@ -251,12 +254,42 @@
 
 void WebContentController::HandleAddJavascriptChannels(
     const webview::AddJavascriptChannelsRequest& request) {
-  // TODO(dnicoara): Handle this.
+  auto* rfh = GetWebContents()->GetMainFrame();
+  if (!rfh) {
+    LOG(WARNING) << "No current RenderFrameHost";
+    return;
+  }
+
+  auto* client =
+      JsClientInstance::Find(rfh->GetProcess()->GetID(), rfh->GetRoutingID());
+  if (!client) {
+    LOG(WARNING) << "Requested to add JS channels but no mojo client found";
+    return;
+  }
+
+  for (auto& channel : request.channels()) {
+    client->AddChannel(channel,
+                       base::BindRepeating(&WebContentJsChannels::SendMessage,
+                                           js_channels_->AsWeakPtr()));
+  }
 }
 
 void WebContentController::HandleRemoveJavascriptChannels(
     const webview::RemoveJavascriptChannelsRequest& request) {
-  // TODO(dnicoara): Handle this.
+  auto* rfh = GetWebContents()->GetMainFrame();
+  if (!rfh)
+    return;
+
+  auto* client =
+      JsClientInstance::Find(rfh->GetProcess()->GetID(), rfh->GetRoutingID());
+  if (!client) {
+    LOG(WARNING) << "Requested to remove JS channels but no mojo client found";
+    return;
+  }
+
+  for (auto& channel : request.channels()) {
+    client->RemoveChannel(channel);
+  }
 }
 
 void WebContentController::HandleGetCurrentUrl(int64_t id) {
@@ -362,4 +395,19 @@
   surface_ = nullptr;
 }
 
+WebContentJsChannels::WebContentJsChannels(WebContentController::Client* client)
+    : client_(client) {}
+
+WebContentJsChannels::~WebContentJsChannels() = default;
+
+void WebContentJsChannels::SendMessage(const std::string& channel,
+                                       const std::string& message) {
+  std::unique_ptr<webview::WebviewResponse> response =
+      std::make_unique<webview::WebviewResponse>();
+  auto* js_message = response->mutable_javascript_channel_message();
+  js_message->set_channel(channel);
+  js_message->set_message(message);
+  client_->EnqueueSend(std::move(response));
+}
+
 }  // namespace chromecast
diff --git a/chromecast/browser/webview/web_content_controller.h b/chromecast/browser/webview/web_content_controller.h
index fcd0678..48e8792 100644
--- a/chromecast/browser/webview/web_content_controller.h
+++ b/chromecast/browser/webview/web_content_controller.h
@@ -8,6 +8,7 @@
 #include <memory>
 #include <string>
 
+#include "chromecast/browser/webview/js_channel_service.h"
 #include "chromecast/browser/webview/proto/webview.pb.h"
 #include "components/exo/surface.h"
 #include "components/exo/surface_observer.h"
@@ -23,6 +24,8 @@
 
 namespace chromecast {
 
+class WebContentJsChannels;
+
 // Processes proto commands to control WebContents
 class WebContentController : public exo::SurfaceObserver {
  public:
@@ -47,6 +50,7 @@
   virtual content::WebContents* GetWebContents() = 0;
   Client* client_;  // Not owned.
   bool has_navigation_delegate_ = false;
+  std::unique_ptr<WebContentJsChannels> js_channels_;
 
  private:
   void ProcessInputEvent(const webview::InputEvent& ev);
@@ -80,6 +84,20 @@
   DISALLOW_COPY_AND_ASSIGN(WebContentController);
 };
 
+class WebContentJsChannels
+    : public base::SupportsWeakPtr<WebContentJsChannels> {
+ public:
+  explicit WebContentJsChannels(WebContentController::Client* client);
+  ~WebContentJsChannels();
+
+  void SendMessage(const std::string& channel, const std::string& message);
+
+ private:
+  WebContentController::Client* client_;
+
+  DISALLOW_COPY_AND_ASSIGN(WebContentJsChannels);
+};
+
 }  // namespace chromecast
 
 #endif  // CHROMECAST_BROWSER_WEBVIEW_WEB_CONTENT_CONTROLLER_H_
diff --git a/chromecast/browser/webview/webview_controller.cc b/chromecast/browser/webview/webview_controller.cc
index 1d96ab1b..95e5159 100644
--- a/chromecast/browser/webview/webview_controller.cc
+++ b/chromecast/browser/webview/webview_controller.cc
@@ -4,7 +4,10 @@
 
 #include "chromecast/browser/webview/webview_controller.h"
 
+#include <set>
+
 #include "base/json/json_writer.h"
+#include "base/memory/weak_ptr.h"
 #include "base/strings/utf_string_conversions.h"
 #include "chromecast/base/version.h"
 #include "chromecast/browser/cast_web_contents_impl.h"
@@ -14,6 +17,7 @@
 #include "content/public/browser/browser_context.h"
 #include "content/public/browser/browsing_data_remover.h"
 #include "content/public/browser/navigation_handle.h"
+#include "content/public/browser/render_frame_host.h"
 #include "content/public/browser/render_view_host.h"
 #include "content/public/browser/render_widget_host.h"
 #include "content/public/browser/render_widget_host_view.h"
@@ -186,6 +190,7 @@
 void WebviewController::Destroy() {
   // This webview is now abandoned and should close.
   client_ = nullptr;
+  js_channels_.reset();
   if (stopped_) {
     // If the page has been stopped this can be deleted immediately.
     delete this;
diff --git a/chromecast/common/mojom/BUILD.gn b/chromecast/common/mojom/BUILD.gn
index abee4b1..caf77ff 100644
--- a/chromecast/common/mojom/BUILD.gn
+++ b/chromecast/common/mojom/BUILD.gn
@@ -9,6 +9,7 @@
     "application_media_capabilities.mojom",
     "constants.mojom",
     "feature_manager.mojom",
+    "js_channel.mojom",
     "media_caps.mojom",
     "media_playback_options.mojom",
     "memory_pressure.mojom",
diff --git a/chromecast/common/mojom/js_channel.mojom b/chromecast/common/mojom/js_channel.mojom
new file mode 100644
index 0000000..9d71a99
--- /dev/null
+++ b/chromecast/common/mojom/js_channel.mojom
@@ -0,0 +1,27 @@
+// Copyright 2019 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.
+
+module chromecast.mojom;
+
+// Send a message on this channel to the browser.
+interface JsChannel {
+  // Message from javascript.
+  PostMessage(string message);
+};
+
+// Implemented on the renderer, this gets notified by the browser to
+// add/remove channels as needed.
+interface JsChannelClient {
+  // Add a new channel binding, connecting window.channel.postMessage to |pipe|.
+  CreateChannel(string channel, pending_remote<JsChannel> pipe);
+  // Remove any existing channel binding.
+  RemoveChannel(string channel);
+};
+
+// Implemented by the browser.
+interface JsChannelBindingProvider {
+  // The RenderFrame reports its routing ID to the browser here and provides the
+  // pipe to manage channels.
+  Register(int32 routing_id, pending_remote<JsChannelClient> client);
+};
diff --git a/chromecast/renderer/BUILD.gn b/chromecast/renderer/BUILD.gn
index d21997c..59a9f184 100644
--- a/chromecast/renderer/BUILD.gn
+++ b/chromecast/renderer/BUILD.gn
@@ -32,6 +32,8 @@
     "cast_media_playback_options.h",
     "cast_url_loader_throttle_provider.cc",
     "cast_url_loader_throttle_provider.h",
+    "js_channel_bindings.cc",
+    "js_channel_bindings.h",
     "native_bindings_helper.cc",
     "native_bindings_helper.h",
     "on_load_script_injector.cc",
diff --git a/chromecast/renderer/cast_content_renderer_client.cc b/chromecast/renderer/cast_content_renderer_client.cc
index 8613eda..9548ec81 100644
--- a/chromecast/renderer/cast_content_renderer_client.cc
+++ b/chromecast/renderer/cast_content_renderer_client.cc
@@ -17,6 +17,7 @@
 #include "chromecast/public/media/media_capabilities_shlib.h"
 #include "chromecast/renderer/cast_media_playback_options.h"
 #include "chromecast/renderer/cast_url_loader_throttle_provider.h"
+#include "chromecast/renderer/js_channel_bindings.h"
 #include "chromecast/renderer/media/key_systems_cast.h"
 #include "chromecast/renderer/media/media_caps_observer_impl.h"
 #include "chromecast/renderer/on_load_script_injector.h"
@@ -194,6 +195,11 @@
 
   dispatcher->OnRenderFrameCreated(render_frame);
 #endif
+
+#if BUILDFLAG(ENABLE_CAST_WAYLAND_SERVER)
+  // JsChannelBindings destroys itself when the RenderFrame is destroyed.
+  JsChannelBindings::Create(render_frame);
+#endif
 }
 
 content::BrowserPluginDelegate*
diff --git a/chromecast/renderer/js_channel_bindings.cc b/chromecast/renderer/js_channel_bindings.cc
new file mode 100644
index 0000000..1f438e6
--- /dev/null
+++ b/chromecast/renderer/js_channel_bindings.cc
@@ -0,0 +1,127 @@
+// Copyright 2019 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.
+
+#include "chromecast/renderer/js_channel_bindings.h"
+
+#include "chromecast/renderer/native_bindings_helper.h"
+#include "content/public/renderer/render_frame.h"
+#include "content/public/renderer/render_thread.h"
+#include "mojo/public/cpp/bindings/self_owned_receiver.h"
+#include "third_party/blink/public/web/blink.h"
+#include "third_party/blink/public/web/web_local_frame.h"
+
+namespace chromecast {
+
+// These are defined to be a set of objects that provide a postMessage(string)
+// method. In turn they forward messages over their mojo channel to the browser.
+JsChannelBindings::JsChannelBindings(
+    content::RenderFrame* render_frame,
+    mojo::PendingReceiver<mojom::JsChannelClient> receiver)
+    : content::RenderFrameObserver(render_frame),
+      receiver_(this, std::move(receiver)) {}
+
+JsChannelBindings::~JsChannelBindings() {
+  while (!channels_.empty())
+    RemoveChannel(channels_.back().first);
+}
+
+void JsChannelBindings::Create(content::RenderFrame* render_frame) {
+  content::RenderThread* render_thread = content::RenderThread::Get();
+
+  // First, get a connection to the main service for our process.
+  mojo::PendingRemote<mojom::JsChannelBindingProvider> pending_remote;
+  render_thread->BindHostReceiver(
+      pending_remote.InitWithNewPipeAndPassReceiver());
+
+  mojo::Remote<mojom::JsChannelBindingProvider> provider(
+      std::move(pending_remote));
+
+  mojo::PendingRemote<mojom::JsChannelClient> client;
+
+  // This deletes itself when the RenderFrame is destroyed.
+  new JsChannelBindings(render_frame, client.InitWithNewPipeAndPassReceiver());
+
+  // Tell the browser that we are ready to receive pipes.
+  provider->Register(render_frame->GetRoutingID(), std::move(client));
+}
+
+void JsChannelBindings::DidClearWindowObject() {
+  for (auto& e : channels_)
+    Install(e.first);
+}
+
+void JsChannelBindings::OnDestruct() {
+  delete this;
+}
+
+void JsChannelBindings::Install(const std::string& channel) {
+  blink::WebLocalFrame* web_frame = render_frame()->GetWebFrame();
+  if (!web_frame)
+    return;
+
+  v8::Isolate* isolate = blink::MainThreadIsolate();
+  if (!isolate)
+    return;
+
+  v8::HandleScope handle_scope(isolate);
+  v8::Local<v8::Context> context = web_frame->MainWorldScriptContext();
+  if (context.IsEmpty())
+    return;
+
+  v8::Context::Scope context_scope(context);
+  auto container = EnsureObjectExists(isolate, context->Global(), channel);
+
+  InstallBinding(isolate, container, "postMessage", &JsChannelBindings::Func,
+                 base::Unretained(this), channel);
+}
+
+void JsChannelBindings::Func(const std::string& channel,
+                             v8::Local<v8::Value> message) {
+  for (auto& e : channels_) {
+    if (e.first == channel) {
+      v8::String::Utf8Value utf8(blink::MainThreadIsolate(), message);
+      e.second->PostMessage(*utf8);
+      break;
+    }
+  }
+}
+
+void JsChannelBindings::CreateChannel(
+    const std::string& channel,
+    mojo::PendingRemote<mojom::JsChannel> pipe) {
+  channels_.push_back(
+      std::make_pair(channel, mojo::Remote<mojom::JsChannel>(std::move(pipe))));
+  Install(channel);
+}
+
+void JsChannelBindings::RemoveChannel(const std::string& channel) {
+  for (auto iter = channels_.begin(); iter != channels_.end(); ++iter) {
+    if (iter->first == channel) {
+      channels_.erase(iter);
+      break;
+    }
+  }
+
+  // Remove V8 object.
+  blink::WebLocalFrame* web_frame = render_frame()->GetWebFrame();
+  if (!web_frame)
+    return;
+
+  v8::Isolate* isolate = blink::MainThreadIsolate();
+  if (!isolate)
+    return;
+
+  v8::HandleScope handle_scope(isolate);
+  v8::Local<v8::Context> context = web_frame->MainWorldScriptContext();
+  if (context.IsEmpty())
+    return;
+
+  v8::Context::Scope context_scope(context);
+  auto result = context->Global()->Set(
+      context, gin::StringToSymbol(isolate, channel), v8::Local<v8::Object>());
+  if (result.IsNothing() || !result.FromJust())
+    VLOG(1) << "Failed to remove binding for method " << channel;
+}
+
+}  // namespace chromecast
diff --git a/chromecast/renderer/js_channel_bindings.h b/chromecast/renderer/js_channel_bindings.h
new file mode 100644
index 0000000..78a4a4b
--- /dev/null
+++ b/chromecast/renderer/js_channel_bindings.h
@@ -0,0 +1,47 @@
+// Copyright 2019 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 CHROMECAST_RENDERER_JS_CHANNEL_BINDINGS_H_
+#define CHROMECAST_RENDERER_JS_CHANNEL_BINDINGS_H_
+
+#include "base/macros.h"
+#include "chromecast/common/mojom/js_channel.mojom.h"
+#include "content/public/renderer/render_frame_observer.h"
+
+namespace chromecast {
+
+class JsChannelBindings : public content::RenderFrameObserver,
+                          public mojom::JsChannelClient {
+ public:
+  static void Create(content::RenderFrame* render_frame);
+
+  explicit JsChannelBindings(
+      content::RenderFrame* render_frame,
+      mojo::PendingReceiver<mojom::JsChannelClient> receiver);
+  ~JsChannelBindings() override;
+
+ private:
+  // content::RenderFrameObserver implementation:
+  void DidClearWindowObject() final;
+  void OnDestruct() final;
+
+  // mojom::JsChannelClient implementation:
+  void CreateChannel(const std::string& channel,
+                     mojo::PendingRemote<mojom::JsChannel> pipe) override;
+  void RemoveChannel(const std::string& channel) override;
+
+  void Install(const std::string& channel);
+
+  void Func(const std::string& channel, v8::Local<v8::Value> message);
+
+  std::vector<std::pair<std::string, mojo::Remote<mojom::JsChannel>>> channels_;
+
+  mojo::Receiver<mojom::JsChannelClient> receiver_;
+
+  DISALLOW_COPY_AND_ASSIGN(JsChannelBindings);
+};
+
+}  // namespace chromecast
+
+#endif  // CHROMECAST_RENDERER_JS_CHANNEL_BINDINGS_H_
diff --git a/chromeos/services/cellular_setup/cellular_setup_base.cc b/chromeos/services/cellular_setup/cellular_setup_base.cc
index 7ec8f9e..85034ef6 100644
--- a/chromeos/services/cellular_setup/cellular_setup_base.cc
+++ b/chromeos/services/cellular_setup/cellular_setup_base.cc
@@ -12,8 +12,9 @@
 
 CellularSetupBase::~CellularSetupBase() = default;
 
-void CellularSetupBase::BindRequest(mojom::CellularSetupRequest request) {
-  bindings_.AddBinding(this, std::move(request));
+void CellularSetupBase::BindReceiver(
+    mojo::PendingReceiver<mojom::CellularSetup> receiver) {
+  receivers_.Add(this, std::move(receiver));
 }
 
 }  // namespace cellular_setup
diff --git a/chromeos/services/cellular_setup/cellular_setup_base.h b/chromeos/services/cellular_setup/cellular_setup_base.h
index bae4ab5..4262329 100644
--- a/chromeos/services/cellular_setup/cellular_setup_base.h
+++ b/chromeos/services/cellular_setup/cellular_setup_base.h
@@ -7,26 +7,27 @@
 
 #include "base/macros.h"
 #include "chromeos/services/cellular_setup/public/mojom/cellular_setup.mojom.h"
-#include "mojo/public/cpp/bindings/binding_set.h"
+#include "mojo/public/cpp/bindings/pending_receiver.h"
+#include "mojo/public/cpp/bindings/receiver_set.h"
 
 namespace chromeos {
 
 namespace cellular_setup {
 
-// mojom::CellularSetup implementation which accepts requests to bind to it.
+// mojom::CellularSetup implementation which accepts receivers to bind to it.
 // This class does not implement any of mojom::CellularSetup's functions, so
 // derived classes should override them.
 class CellularSetupBase : public mojom::CellularSetup {
  public:
   ~CellularSetupBase() override;
 
-  void BindRequest(mojom::CellularSetupRequest request);
+  void BindReceiver(mojo::PendingReceiver<mojom::CellularSetup> receiver);
 
  protected:
   CellularSetupBase();
 
  private:
-  mojo::BindingSet<mojom::CellularSetup> bindings_;
+  mojo::ReceiverSet<mojom::CellularSetup> receivers_;
 
   DISALLOW_COPY_AND_ASSIGN(CellularSetupBase);
 };
diff --git a/chromeos/services/cellular_setup/cellular_setup_impl.cc b/chromeos/services/cellular_setup/cellular_setup_impl.cc
index 86f734c..a3f3559 100644
--- a/chromeos/services/cellular_setup/cellular_setup_impl.cc
+++ b/chromeos/services/cellular_setup/cellular_setup_impl.cc
@@ -21,7 +21,7 @@
 CellularSetupImpl::~CellularSetupImpl() = default;
 
 void CellularSetupImpl::StartActivation(
-    mojom::ActivationDelegatePtr delegate,
+    mojo::PendingRemote<mojom::ActivationDelegate> delegate,
     StartActivationCallback callback) {
   size_t request_id = next_request_id_;
   ++next_request_id_;
@@ -36,7 +36,7 @@
           network_handler->network_connection_handler(),
           network_handler->network_activation_handler());
 
-  std::move(callback).Run(ota_activator->GenerateInterfacePtr());
+  std::move(callback).Run(ota_activator->GenerateRemote());
 
   // Store the OtaActivator instance in a map indexed by request ID; once the
   // attempt has finished, the map entry will be deleted in
diff --git a/chromeos/services/cellular_setup/cellular_setup_impl.h b/chromeos/services/cellular_setup/cellular_setup_impl.h
index e48e9a12..01dda4f6 100644
--- a/chromeos/services/cellular_setup/cellular_setup_impl.h
+++ b/chromeos/services/cellular_setup/cellular_setup_impl.h
@@ -10,6 +10,7 @@
 #include "base/containers/id_map.h"
 #include "base/macros.h"
 #include "chromeos/services/cellular_setup/cellular_setup_base.h"
+#include "mojo/public/cpp/bindings/pending_remote.h"
 
 namespace chromeos {
 
@@ -27,7 +28,7 @@
 
  private:
   // mojom::CellularSetup:
-  void StartActivation(mojom::ActivationDelegatePtr delegate,
+  void StartActivation(mojo::PendingRemote<mojom::ActivationDelegate> delegate,
                        StartActivationCallback callback) override;
 
   void OnActivationAttemptFinished(size_t request_id);
diff --git a/chromeos/services/cellular_setup/cellular_setup_impl_unittest.cc b/chromeos/services/cellular_setup/cellular_setup_impl_unittest.cc
index a394259..ddc0a838 100644
--- a/chromeos/services/cellular_setup/cellular_setup_impl_unittest.cc
+++ b/chromeos/services/cellular_setup/cellular_setup_impl_unittest.cc
@@ -18,6 +18,7 @@
 #include "chromeos/services/cellular_setup/fake_ota_activator.h"
 #include "chromeos/services/cellular_setup/ota_activator_impl.h"
 #include "chromeos/services/cellular_setup/public/cpp/fake_activation_delegate.h"
+#include "mojo/public/cpp/bindings/pending_remote.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace chromeos {
@@ -38,7 +39,7 @@
  private:
   // OtaActivatorImpl::Factory:
   std::unique_ptr<OtaActivator> BuildInstance(
-      mojom::ActivationDelegatePtr activation_delegate,
+      mojo::PendingRemote<mojom::ActivationDelegate> activation_delegate,
       base::OnceClosure on_finished_callback,
       NetworkStateHandler* network_state_handler,
       NetworkConnectionHandler* network_connection_handler,
@@ -92,7 +93,7 @@
 
     base::RunLoop run_loop;
     cellular_setup_->StartActivation(
-        fake_activation_delegate->GenerateInterfacePtr(),
+        fake_activation_delegate->GenerateRemote(),
         base::BindOnce(&CellularSetupImplTest::OnCarrierPortalHandlerReceived,
                        base::Unretained(this), run_loop.QuitClosure()));
     run_loop.Run();
@@ -108,7 +109,7 @@
  private:
   void OnCarrierPortalHandlerReceived(
       base::OnceClosure quit_closure,
-      mojom::CarrierPortalHandlerPtr carrier_portal_handler) {
+      mojo::PendingRemote<mojom::CarrierPortalHandler> carrier_portal_handler) {
     ++num_carrier_portal_handlers_received_;
     std::move(quit_closure).Run();
   }
diff --git a/chromeos/services/cellular_setup/cellular_setup_service_unittest.cc b/chromeos/services/cellular_setup/cellular_setup_service_unittest.cc
index 85a4e7e..aee915c 100644
--- a/chromeos/services/cellular_setup/cellular_setup_service_unittest.cc
+++ b/chromeos/services/cellular_setup/cellular_setup_service_unittest.cc
@@ -15,6 +15,8 @@
 #include "chromeos/services/cellular_setup/public/cpp/fake_carrier_portal_handler.h"
 #include "chromeos/services/cellular_setup/public/cpp/fake_cellular_setup.h"
 #include "chromeos/services/cellular_setup/public/mojom/cellular_setup.mojom.h"
+#include "mojo/public/cpp/bindings/pending_remote.h"
+#include "mojo/public/cpp/bindings/remote.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace chromeos {
@@ -24,7 +26,8 @@
 namespace {
 
 using CarrierPortalHandlerPair =
-    std::pair<mojom::CarrierPortalHandlerPtr, FakeCarrierPortalHandler*>;
+    std::pair<mojo::Remote<mojom::CarrierPortalHandler>,
+              FakeCarrierPortalHandler*>;
 
 const char kTestPaymentUrl[] = "testPaymentUrl";
 const char kTestPaymentPostData[] = "testPaymentPostData";
@@ -43,12 +46,12 @@
   // testing::Test:
   void SetUp() override {
     service_ = std::make_unique<FakeCellularSetup>();
-    service_->BindRequest(mojo::MakeRequest(&cellular_setup_ptr_));
-    cellular_setup_ptr_.FlushForTesting();
+    service_->BindReceiver(cellular_setup_remote_.BindNewPipeAndPassReceiver());
+    cellular_setup_remote_.FlushForTesting();
   }
 
   // Calls StartActivation() and returns the fake CarrierPortalHandler and its
-  // associated InterfacePtr.
+  // associated mojo::Remote<>.
   CarrierPortalHandlerPair CallStartActivation(
       FakeActivationDelegate* fake_activation_delegate) {
     std::vector<std::unique_ptr<FakeCellularSetup::StartActivationInvocation>>&
@@ -58,11 +61,11 @@
     base::RunLoop run_loop;
 
     // Make StartActivation() call and propagate it to the service.
-    cellular_setup_ptr_->StartActivation(
-        fake_activation_delegate->GenerateInterfacePtr(),
+    cellular_setup_remote_->StartActivation(
+        fake_activation_delegate->GenerateRemote(),
         base::BindOnce(&CellularSetupServiceTest::OnStartActivationResult,
                        base::Unretained(this), run_loop.QuitClosure()));
-    cellular_setup_ptr_.FlushForTesting();
+    cellular_setup_remote_.FlushForTesting();
 
     // Verify that the call was made successfully.
     EXPECT_EQ(num_args_before_call + 1u, start_activation_invocations.size());
@@ -73,9 +76,8 @@
     run_loop.RunUntilIdle();
 
     EXPECT_TRUE(last_carrier_portal_observer_);
-    CarrierPortalHandlerPair observer_pair =
-        std::make_pair(std::move(*last_carrier_portal_observer_),
-                       fake_carrier_portal_observer);
+    CarrierPortalHandlerPair observer_pair = std::make_pair(
+        std::move(last_carrier_portal_observer_), fake_carrier_portal_observer);
     last_carrier_portal_observer_.reset();
 
     return observer_pair;
@@ -141,17 +143,17 @@
   }
 
  private:
-  void OnStartActivationResult(
-      base::OnceClosure quit_closure,
-      mojom::CarrierPortalHandlerPtr carrier_portal_observer) {
+  void OnStartActivationResult(base::OnceClosure quit_closure,
+                               mojo::PendingRemote<mojom::CarrierPortalHandler>
+                                   carrier_portal_observer) {
     EXPECT_FALSE(last_carrier_portal_observer_);
-    last_carrier_portal_observer_ = std::move(carrier_portal_observer);
+    last_carrier_portal_observer_.Bind(std::move(carrier_portal_observer));
     std::move(quit_closure).Run();
   }
 
   FakeCellularSetup* fake_cellular_setup() { return service_.get(); }
 
-  mojom::ActivationDelegatePtr& GetLastActivationDelegate() {
+  mojo::Remote<mojom::ActivationDelegate>& GetLastActivationDelegate() {
     return fake_cellular_setup()
         ->start_activation_invocations()
         .back()
@@ -162,9 +164,9 @@
 
   std::unique_ptr<FakeCellularSetup> service_;
 
-  base::Optional<mojom::CarrierPortalHandlerPtr> last_carrier_portal_observer_;
+  mojo::Remote<mojom::CarrierPortalHandler> last_carrier_portal_observer_;
 
-  mojom::CellularSetupPtr cellular_setup_ptr_;
+  mojo::Remote<mojom::CellularSetup> cellular_setup_remote_;
 
   DISALLOW_COPY_AND_ASSIGN(CellularSetupServiceTest);
 };
diff --git a/chromeos/services/cellular_setup/ota_activator.cc b/chromeos/services/cellular_setup/ota_activator.cc
index ffc55f7..2cc58cdb 100644
--- a/chromeos/services/cellular_setup/ota_activator.cc
+++ b/chromeos/services/cellular_setup/ota_activator.cc
@@ -11,17 +11,15 @@
 namespace cellular_setup {
 
 OtaActivator::OtaActivator(base::OnceClosure on_finished_callback)
-    : on_finished_callback_(std::move(on_finished_callback)), binding_(this) {}
+    : on_finished_callback_(std::move(on_finished_callback)) {}
 
 OtaActivator::~OtaActivator() = default;
 
-mojom::CarrierPortalHandlerPtr OtaActivator::GenerateInterfacePtr() {
-  // Only one InterfacePtr should be created per instance.
-  DCHECK(!binding_);
-
-  mojom::CarrierPortalHandlerPtr interface_ptr;
-  binding_.Bind(mojo::MakeRequest(&interface_ptr));
-  return interface_ptr;
+mojo::PendingRemote<mojom::CarrierPortalHandler>
+OtaActivator::GenerateRemote() {
+  // Only one mojo::PendingRemote<> should be created per instance.
+  DCHECK(!receiver_.is_bound());
+  return receiver_.BindNewPipeAndPassRemote();
 }
 
 void OtaActivator::InvokeOnFinishedCallback() {
diff --git a/chromeos/services/cellular_setup/ota_activator.h b/chromeos/services/cellular_setup/ota_activator.h
index 6846a58..ed188142 100644
--- a/chromeos/services/cellular_setup/ota_activator.h
+++ b/chromeos/services/cellular_setup/ota_activator.h
@@ -8,7 +8,8 @@
 #include "base/callback.h"
 #include "base/macros.h"
 #include "chromeos/services/cellular_setup/public/mojom/cellular_setup.mojom.h"
-#include "mojo/public/cpp/bindings/binding.h"
+#include "mojo/public/cpp/bindings/pending_remote.h"
+#include "mojo/public/cpp/bindings/receiver.h"
 
 namespace chromeos {
 
@@ -23,10 +24,10 @@
  public:
   ~OtaActivator() override;
 
-  // Generates an InterfacePtr bound to this instance. Only one InterfacePtr may
-  // be bound to a single OtaActivator instance, so this function can only be
-  // called once.
-  mojom::CarrierPortalHandlerPtr GenerateInterfacePtr();
+  // Generates a mojo::PendingRemote<> bound to this instance. Only one
+  // mojo::PendingRemote<> may be bound to a single OtaActivator instance, so
+  // this function can only be called once.
+  mojo::PendingRemote<mojom::CarrierPortalHandler> GenerateRemote();
 
  protected:
   explicit OtaActivator(base::OnceClosure on_finished_callback);
@@ -34,7 +35,7 @@
   void InvokeOnFinishedCallback();
 
   base::OnceClosure on_finished_callback_;
-  mojo::Binding<mojom::CarrierPortalHandler> binding_;
+  mojo::Receiver<mojom::CarrierPortalHandler> receiver_{this};
 
   DISALLOW_COPY_AND_ASSIGN(OtaActivator);
 };
diff --git a/chromeos/services/cellular_setup/ota_activator_impl.cc b/chromeos/services/cellular_setup/ota_activator_impl.cc
index 68c3b4f..c995ebd 100644
--- a/chromeos/services/cellular_setup/ota_activator_impl.cc
+++ b/chromeos/services/cellular_setup/ota_activator_impl.cc
@@ -47,7 +47,7 @@
 
 // static
 std::unique_ptr<OtaActivator> OtaActivatorImpl::Factory::Create(
-    mojom::ActivationDelegatePtr activation_delegate,
+    mojo::PendingRemote<mojom::ActivationDelegate> activation_delegate,
     base::OnceClosure on_finished_callback,
     NetworkStateHandler* network_state_handler,
     NetworkConnectionHandler* network_connection_handler,
@@ -74,7 +74,7 @@
 OtaActivatorImpl::Factory::~Factory() = default;
 
 OtaActivatorImpl::OtaActivatorImpl(
-    mojom::ActivationDelegatePtr activation_delegate,
+    mojo::PendingRemote<mojom::ActivationDelegate> activation_delegate,
     base::OnceClosure on_finished_callback,
     NetworkStateHandler* network_state_handler,
     NetworkConnectionHandler* network_connection_handler,
@@ -151,7 +151,7 @@
 
   // If |activation_delegate_| becomes disconnected, the activation request is
   // considered canceled.
-  activation_delegate_.set_connection_error_handler(base::BindOnce(
+  activation_delegate_.set_disconnect_handler(base::BindOnce(
       &OtaActivatorImpl::FinishActivationAttempt, base::Unretained(this),
       mojom::ActivationResult::kFailedToActivate));
 
diff --git a/chromeos/services/cellular_setup/ota_activator_impl.h b/chromeos/services/cellular_setup/ota_activator_impl.h
index 4876f7e7..4d6e514d 100644
--- a/chromeos/services/cellular_setup/ota_activator_impl.h
+++ b/chromeos/services/cellular_setup/ota_activator_impl.h
@@ -15,6 +15,8 @@
 #include "chromeos/network/network_state_handler_observer.h"
 #include "chromeos/services/cellular_setup/ota_activator.h"
 #include "chromeos/services/cellular_setup/public/mojom/cellular_setup.mojom.h"
+#include "mojo/public/cpp/bindings/pending_remote.h"
+#include "mojo/public/cpp/bindings/remote.h"
 
 namespace base {
 class DictionaryValue;
@@ -48,7 +50,7 @@
   class Factory {
    public:
     static std::unique_ptr<OtaActivator> Create(
-        mojom::ActivationDelegatePtr activation_delegate,
+        mojo::PendingRemote<mojom::ActivationDelegate> activation_delegate,
         base::OnceClosure on_finished_callback,
         NetworkStateHandler* network_state_handler,
         NetworkConnectionHandler* network_connection_handler,
@@ -58,7 +60,7 @@
     static void SetFactoryForTesting(Factory* test_factory);
     virtual ~Factory();
     virtual std::unique_ptr<OtaActivator> BuildInstance(
-        mojom::ActivationDelegatePtr activation_delegate,
+        mojo::PendingRemote<mojom::ActivationDelegate> activation_delegate,
         base::OnceClosure on_finished_callback,
         NetworkStateHandler* network_state_handler,
         NetworkConnectionHandler* network_connection_handler,
@@ -81,12 +83,13 @@
   };
   friend std::ostream& operator<<(std::ostream& stream, const State& state);
 
-  OtaActivatorImpl(mojom::ActivationDelegatePtr activation_delegate,
-                   base::OnceClosure on_finished_callback,
-                   NetworkStateHandler* network_state_handler,
-                   NetworkConnectionHandler* network_connection_handler,
-                   NetworkActivationHandler* network_activation_handler,
-                   scoped_refptr<base::TaskRunner> task_runner);
+  OtaActivatorImpl(
+      mojo::PendingRemote<mojom::ActivationDelegate> activation_delegate,
+      base::OnceClosure on_finished_callback,
+      NetworkStateHandler* network_state_handler,
+      NetworkConnectionHandler* network_connection_handler,
+      NetworkActivationHandler* network_activation_handler,
+      scoped_refptr<base::TaskRunner> task_runner);
 
   // mojom::CarrierPortalHandler:
   void OnCarrierPortalStatusChange(mojom::CarrierPortalStatus status) override;
@@ -117,7 +120,7 @@
 
   void FlushForTesting();
 
-  mojom::ActivationDelegatePtr activation_delegate_;
+  mojo::Remote<mojom::ActivationDelegate> activation_delegate_;
   NetworkStateHandler* network_state_handler_;
   NetworkConnectionHandler* network_connection_handler_;
   NetworkActivationHandler* network_activation_handler_;
diff --git a/chromeos/services/cellular_setup/ota_activator_impl_unittest.cc b/chromeos/services/cellular_setup/ota_activator_impl_unittest.cc
index 2e237f4..6e684db2 100644
--- a/chromeos/services/cellular_setup/ota_activator_impl_unittest.cc
+++ b/chromeos/services/cellular_setup/ota_activator_impl_unittest.cc
@@ -15,6 +15,7 @@
 #include "chromeos/network/network_state_handler.h"
 #include "chromeos/network/network_state_test_helper.h"
 #include "chromeos/services/cellular_setup/public/cpp/fake_activation_delegate.h"
+#include "mojo/public/cpp/bindings/remote.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/cros_system_api/dbus/service_constants.h"
 #include "third_party/cros_system_api/dbus/shill/dbus-constants.h"
@@ -60,14 +61,14 @@
   void BuildOtaActivator() {
     auto test_task_runner = base::MakeRefCounted<base::TestSimpleTaskRunner>();
     ota_activator_ = OtaActivatorImpl::Factory::Create(
-        fake_activation_delegate_->GenerateInterfacePtr(),
+        fake_activation_delegate_->GenerateRemote(),
         base::BindOnce(&CellularSetupOtaActivatorImplTest::OnFinished,
                        base::Unretained(this)),
         test_helper_.network_state_handler(),
         fake_network_connection_handler_.get(),
         fake_network_activation_handler_.get(), test_task_runner);
     test_task_runner->RunUntilIdle();
-    carrier_portal_handler_ptr_ = ota_activator_->GenerateInterfacePtr();
+    carrier_portal_handler_remote_.Bind(ota_activator_->GenerateRemote());
   }
 
   void AddCellularDevice(bool has_valid_sim) {
@@ -159,9 +160,9 @@
 
   void UpdateCarrierPortalState(
       mojom::CarrierPortalStatus carrier_portal_status) {
-    carrier_portal_handler_ptr_->OnCarrierPortalStatusChange(
+    carrier_portal_handler_remote_->OnCarrierPortalStatusChange(
         carrier_portal_status);
-    carrier_portal_handler_ptr_.FlushForTesting();
+    carrier_portal_handler_remote_.FlushForTesting();
   }
 
   void ConnectCellularNetwork() {
@@ -204,7 +205,9 @@
     EXPECT_TRUE(is_finished_);
   }
 
-  void DisconnectDelegate() { fake_activation_delegate_->DisconnectBindings(); }
+  void DisconnectDelegate() {
+    fake_activation_delegate_->DisconnectReceivers();
+  }
 
   bool is_finished() { return is_finished_; }
 
@@ -224,7 +227,7 @@
       fake_network_activation_handler_;
 
   std::unique_ptr<OtaActivator> ota_activator_;
-  mojom::CarrierPortalHandlerPtr carrier_portal_handler_ptr_;
+  mojo::Remote<mojom::CarrierPortalHandler> carrier_portal_handler_remote_;
 
   bool is_finished_ = false;
 
diff --git a/chromeos/services/cellular_setup/public/cpp/fake_activation_delegate.cc b/chromeos/services/cellular_setup/public/cpp/fake_activation_delegate.cc
index a56c5e1d..49b1ce1 100644
--- a/chromeos/services/cellular_setup/public/cpp/fake_activation_delegate.cc
+++ b/chromeos/services/cellular_setup/public/cpp/fake_activation_delegate.cc
@@ -12,14 +12,15 @@
 
 FakeActivationDelegate::~FakeActivationDelegate() = default;
 
-mojom::ActivationDelegatePtr FakeActivationDelegate::GenerateInterfacePtr() {
-  mojom::ActivationDelegatePtr interface_ptr;
-  bindings_.AddBinding(this, mojo::MakeRequest(&interface_ptr));
-  return interface_ptr;
+mojo::PendingRemote<mojom::ActivationDelegate>
+FakeActivationDelegate::GenerateRemote() {
+  mojo::PendingRemote<mojom::ActivationDelegate> remote;
+  receivers_.Add(this, remote.InitWithNewPipeAndPassReceiver());
+  return remote;
 }
 
-void FakeActivationDelegate::DisconnectBindings() {
-  bindings_.CloseAllBindings();
+void FakeActivationDelegate::DisconnectReceivers() {
+  receivers_.Clear();
 }
 
 void FakeActivationDelegate::OnActivationStarted(
diff --git a/chromeos/services/cellular_setup/public/cpp/fake_activation_delegate.h b/chromeos/services/cellular_setup/public/cpp/fake_activation_delegate.h
index 5ecf7ee..bbb5997c 100644
--- a/chromeos/services/cellular_setup/public/cpp/fake_activation_delegate.h
+++ b/chromeos/services/cellular_setup/public/cpp/fake_activation_delegate.h
@@ -9,7 +9,8 @@
 
 #include "base/macros.h"
 #include "chromeos/services/cellular_setup/public/mojom/cellular_setup.mojom.h"
-#include "mojo/public/cpp/bindings/binding_set.h"
+#include "mojo/public/cpp/bindings/pending_remote.h"
+#include "mojo/public/cpp/bindings/receiver_set.h"
 
 namespace chromeos {
 
@@ -21,8 +22,8 @@
   FakeActivationDelegate();
   ~FakeActivationDelegate() override;
 
-  mojom::ActivationDelegatePtr GenerateInterfacePtr();
-  void DisconnectBindings();
+  mojo::PendingRemote<mojom::ActivationDelegate> GenerateRemote();
+  void DisconnectReceivers();
 
   const std::vector<mojom::CellularMetadataPtr>& cellular_metadata_list()
       const {
@@ -42,7 +43,7 @@
   std::vector<mojom::CellularMetadataPtr> cellular_metadata_list_;
   std::vector<mojom::ActivationResult> activation_results_;
 
-  mojo::BindingSet<mojom::ActivationDelegate> bindings_;
+  mojo::ReceiverSet<mojom::ActivationDelegate> receivers_;
 
   DISALLOW_COPY_AND_ASSIGN(FakeActivationDelegate);
 };
diff --git a/chromeos/services/cellular_setup/public/cpp/fake_carrier_portal_handler.cc b/chromeos/services/cellular_setup/public/cpp/fake_carrier_portal_handler.cc
index a29e143b..3a17483 100644
--- a/chromeos/services/cellular_setup/public/cpp/fake_carrier_portal_handler.cc
+++ b/chromeos/services/cellular_setup/public/cpp/fake_carrier_portal_handler.cc
@@ -12,11 +12,11 @@
 
 FakeCarrierPortalHandler::~FakeCarrierPortalHandler() = default;
 
-mojom::CarrierPortalHandlerPtr
-FakeCarrierPortalHandler::GenerateInterfacePtr() {
-  mojom::CarrierPortalHandlerPtr interface_ptr;
-  bindings_.AddBinding(this, mojo::MakeRequest(&interface_ptr));
-  return interface_ptr;
+mojo::PendingRemote<mojom::CarrierPortalHandler>
+FakeCarrierPortalHandler::GenerateRemote() {
+  mojo::PendingRemote<mojom::CarrierPortalHandler> remote;
+  receivers_.Add(this, remote.InitWithNewPipeAndPassReceiver());
+  return remote;
 }
 
 void FakeCarrierPortalHandler::OnCarrierPortalStatusChange(
diff --git a/chromeos/services/cellular_setup/public/cpp/fake_carrier_portal_handler.h b/chromeos/services/cellular_setup/public/cpp/fake_carrier_portal_handler.h
index 9a3ac878..80877c5 100644
--- a/chromeos/services/cellular_setup/public/cpp/fake_carrier_portal_handler.h
+++ b/chromeos/services/cellular_setup/public/cpp/fake_carrier_portal_handler.h
@@ -9,7 +9,8 @@
 
 #include "base/macros.h"
 #include "chromeos/services/cellular_setup/public/mojom/cellular_setup.mojom.h"
-#include "mojo/public/cpp/bindings/binding_set.h"
+#include "mojo/public/cpp/bindings/pending_remote.h"
+#include "mojo/public/cpp/bindings/receiver_set.h"
 
 namespace chromeos {
 
@@ -21,7 +22,7 @@
   FakeCarrierPortalHandler();
   ~FakeCarrierPortalHandler() override;
 
-  mojom::CarrierPortalHandlerPtr GenerateInterfacePtr();
+  mojo::PendingRemote<mojom::CarrierPortalHandler> GenerateRemote();
 
   const std::vector<mojom::CarrierPortalStatus>& status_updates() const {
     return status_updates_;
@@ -33,7 +34,7 @@
 
  private:
   std::vector<mojom::CarrierPortalStatus> status_updates_;
-  mojo::BindingSet<mojom::CarrierPortalHandler> bindings_;
+  mojo::ReceiverSet<mojom::CarrierPortalHandler> receivers_;
 
   DISALLOW_COPY_AND_ASSIGN(FakeCarrierPortalHandler);
 };
diff --git a/chromeos/services/cellular_setup/public/cpp/fake_cellular_setup.cc b/chromeos/services/cellular_setup/public/cpp/fake_cellular_setup.cc
index d606a40..02a4245 100644
--- a/chromeos/services/cellular_setup/public/cpp/fake_cellular_setup.cc
+++ b/chromeos/services/cellular_setup/public/cpp/fake_cellular_setup.cc
@@ -13,7 +13,7 @@
 namespace cellular_setup {
 
 FakeCellularSetup::StartActivationInvocation::StartActivationInvocation(
-    mojom::ActivationDelegatePtr activation_delegate,
+    mojo::PendingRemote<mojom::ActivationDelegate> activation_delegate,
     StartActivationCallback callback)
     : activation_delegate_(std::move(activation_delegate)),
       callback_(std::move(callback)) {}
@@ -27,8 +27,7 @@
   DCHECK(!fake_carrier_portal_observer_);
 
   fake_carrier_portal_observer_ = std::make_unique<FakeCarrierPortalHandler>();
-  std::move(callback_).Run(
-      fake_carrier_portal_observer_->GenerateInterfacePtr());
+  std::move(callback_).Run(fake_carrier_portal_observer_->GenerateRemote());
 
   return fake_carrier_portal_observer_.get();
 }
@@ -38,7 +37,7 @@
 FakeCellularSetup::~FakeCellularSetup() = default;
 
 void FakeCellularSetup::StartActivation(
-    mojom::ActivationDelegatePtr activation_delegate,
+    mojo::PendingRemote<mojom::ActivationDelegate> activation_delegate,
     StartActivationCallback callback) {
   DCHECK(activation_delegate);
   DCHECK(callback);
diff --git a/chromeos/services/cellular_setup/public/cpp/fake_cellular_setup.h b/chromeos/services/cellular_setup/public/cpp/fake_cellular_setup.h
index 16e3567c..ab208e5 100644
--- a/chromeos/services/cellular_setup/public/cpp/fake_cellular_setup.h
+++ b/chromeos/services/cellular_setup/public/cpp/fake_cellular_setup.h
@@ -11,6 +11,8 @@
 #include "base/macros.h"
 #include "chromeos/services/cellular_setup/cellular_setup_base.h"
 #include "chromeos/services/cellular_setup/public/mojom/cellular_setup.mojom.h"
+#include "mojo/public/cpp/bindings/pending_remote.h"
+#include "mojo/public/cpp/bindings/remote.h"
 
 namespace chromeos {
 
@@ -23,11 +25,12 @@
  public:
   class StartActivationInvocation {
    public:
-    StartActivationInvocation(mojom::ActivationDelegatePtr activation_delegate,
-                              StartActivationCallback callback);
+    StartActivationInvocation(
+        mojo::PendingRemote<mojom::ActivationDelegate> activation_delegate,
+        StartActivationCallback callback);
     ~StartActivationInvocation();
 
-    mojom::ActivationDelegatePtr& activation_delegate() {
+    mojo::Remote<mojom::ActivationDelegate>& activation_delegate() {
       return activation_delegate_;
     }
 
@@ -37,7 +40,7 @@
     FakeCarrierPortalHandler* ExecuteCallback();
 
    private:
-    mojom::ActivationDelegatePtr activation_delegate_;
+    mojo::Remote<mojom::ActivationDelegate> activation_delegate_;
     StartActivationCallback callback_;
 
     // Null until ExecuteCallback() has been invoked.
@@ -56,8 +59,9 @@
 
  private:
   // mojom::CellularSetup:
-  void StartActivation(mojom::ActivationDelegatePtr activation_delegate,
-                       StartActivationCallback callback) override;
+  void StartActivation(
+      mojo::PendingRemote<mojom::ActivationDelegate> activation_delegate,
+      StartActivationCallback callback) override;
 
   std::vector<std::unique_ptr<StartActivationInvocation>>
       start_activation_invocations_;
diff --git a/chromeos/services/cellular_setup/public/mojom/cellular_setup.mojom b/chromeos/services/cellular_setup/public/mojom/cellular_setup.mojom
index 8bf9792..cbfebb6 100644
--- a/chromeos/services/cellular_setup/public/mojom/cellular_setup.mojom
+++ b/chromeos/services/cellular_setup/public/mojom/cellular_setup.mojom
@@ -82,6 +82,6 @@
 interface CellularSetup {
   // Entrypoint to the activation flow. If |delegate| becomes disconnected
   // during the activation process, activation is cancelled.
-  StartActivation(ActivationDelegate delegate)
-      => (CarrierPortalHandler observer);
+  StartActivation(pending_remote<ActivationDelegate> delegate)
+      => (pending_remote<CarrierPortalHandler> observer);
 };
diff --git a/components/metal_util/BUILD.gn b/components/metal_util/BUILD.gn
index 81b093b8..70ea9ef 100644
--- a/components/metal_util/BUILD.gn
+++ b/components/metal_util/BUILD.gn
@@ -13,6 +13,8 @@
     "device.h",
     "device.mm",
     "metal_util_export.h",
+    "test_shader.h",
+    "test_shader.mm",
     "types.h",
   ]
 
@@ -20,5 +22,8 @@
     "//base",
   ]
 
-  libs = [ "Metal.framework" ]
+  libs = [
+    "Cocoa.framework",
+    "Metal.framework",
+  ]
 }
diff --git a/components/metal_util/test_shader.h b/components/metal_util/test_shader.h
new file mode 100644
index 0000000..8a60479
--- /dev/null
+++ b/components/metal_util/test_shader.h
@@ -0,0 +1,37 @@
+// Copyright 2019 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 COMPONENTS_METAL_UTIL_TEST_SHADER_H_
+#define COMPONENTS_METAL_UTIL_TEST_SHADER_H_
+
+#include "base/callback.h"
+#include "base/task_runner.h"
+#include "base/time/time.h"
+#include "components/metal_util/metal_util_export.h"
+
+namespace metal {
+
+enum class METAL_UTIL_EXPORT TestShaderResult {
+  // Not attempted (e.g, because macOS version does not support Metal).
+  kNotAttempted,
+  // Shader compile succeeded.
+  kSucceeded,
+  // Shader compile timed out.
+  kTimedOut,
+};
+
+using TestShaderCallback = base::OnceCallback<void(TestShaderResult result)>;
+
+// Attempt to asynchronously compile a trivial Metal shader. Call |callback|
+// with the result when the shader succeeds or after |timeout| has elapsed.
+// This is used to determine of the Metal shader compiler is resposive. Note
+// that |callback| will be called either on another thread or inside the
+// TestShader function call.
+// https://crbug.com/974219
+void METAL_UTIL_EXPORT TestShader(TestShaderCallback callback,
+                                  const base::TimeDelta& timeout);
+
+}  // namespace metal
+
+#endif  // COMPONENTS_METAL_UTIL_TEST_SHADER_H_
diff --git a/components/metal_util/test_shader.mm b/components/metal_util/test_shader.mm
new file mode 100644
index 0000000..c067bbd8
--- /dev/null
+++ b/components/metal_util/test_shader.mm
@@ -0,0 +1,101 @@
+// Copyright 2019 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.
+
+#include "components/metal_util/test_shader.h"
+
+#import <Metal/Metal.h>
+
+#include "base/bind.h"
+#include "base/debug/dump_without_crashing.h"
+#include "base/mac/scoped_nsobject.h"
+#include "base/memory/ref_counted.h"
+#include "base/synchronization/lock.h"
+#include "base/task/post_task.h"
+#include "components/metal_util/device.h"
+
+namespace metal {
+
+namespace {
+
+const char* kTestShaderSource =
+    ""
+    "#include <metal_stdlib>\n"
+    "#include <simd/simd.h>\n"
+    "typedef struct {\n"
+    "    float4 clipSpacePosition [[position]];\n"
+    "    float4 color;\n"
+    "} RasterizerData;\n"
+    "\n"
+    "vertex RasterizerData vertexShader(\n"
+    "    uint vertexID [[vertex_id]],\n"
+    "    constant vector_float2 *positions[[buffer(0)]],\n"
+    "    constant vector_float4 *colors[[buffer(1)]]) {\n"
+    "  RasterizerData out;\n"
+    "  out.clipSpacePosition = vector_float4(0.0, 0.0, 0.0, 1.0);\n"
+    "  out.clipSpacePosition.xy = positions[vertexID].xy;\n"
+    "  out.color = colors[vertexID];\n"
+    "  return out;\n"
+    "}\n"
+    "\n"
+    "fragment float4 fragmentShader(RasterizerData in [[stage_in]]) {\n"
+    "    return in.color;\n"
+    "}\n"
+    "";
+
+// State shared between the compiler callback and the caller.
+class API_AVAILABLE(macos(10.11)) TestShaderState
+    : public base::RefCountedThreadSafe<TestShaderState> {
+ public:
+  TestShaderState(TestShaderCallback callback)
+      : callback_(std::move(callback)) {}
+  void OnSucceeded() {
+    base::AutoLock lock(lock_);
+    if (callback_)
+      std::move(callback_).Run(TestShaderResult::kSucceeded);
+  }
+  void OnTimedOut() {
+    base::AutoLock lock(lock_);
+    if (callback_) {
+      base::debug::DumpWithoutCrashing();
+      std::move(callback_).Run(TestShaderResult::kTimedOut);
+    }
+  }
+
+ protected:
+  base::Lock lock_;
+  TestShaderCallback callback_;
+  friend class base::RefCountedThreadSafe<TestShaderState>;
+  virtual ~TestShaderState() {}
+};
+
+}  // namespace
+
+void TestShader(TestShaderCallback callback, const base::TimeDelta& timeout) {
+  if (@available(macOS 10.11, *)) {
+    base::scoped_nsprotocol<id<MTLDevice>> device(CreateDefaultDevice());
+    if (device) {
+      auto state = base::MakeRefCounted<TestShaderState>(std::move(callback));
+      base::scoped_nsobject<NSString> source([[NSString alloc]
+          initWithCString:kTestShaderSource
+                 encoding:NSASCIIStringEncoding]);
+      base::scoped_nsobject<MTLCompileOptions> options(
+          [[MTLCompileOptions alloc] init]);
+      MTLNewLibraryCompletionHandler completion_handler =
+          ^(id<MTLLibrary> library, NSError* error) {
+            DCHECK(library);
+            state->OnSucceeded();
+          };
+      [device newLibraryWithSource:source
+                           options:options
+                 completionHandler:completion_handler];
+      base::PostDelayedTask(FROM_HERE, {base::ThreadPool()},
+                            base::BindOnce(&TestShaderState::OnTimedOut, state),
+                            timeout);
+      return;
+    }
+  }
+  std::move(callback).Run(TestShaderResult::kNotAttempted);
+}
+
+}  // namespace metal
diff --git a/components/metal_util/types.h b/components/metal_util/types.h
index fb0f1ff..ed15e8a 100644
--- a/components/metal_util/types.h
+++ b/components/metal_util/types.h
@@ -15,7 +15,10 @@
 // This file defines types that resolve to Metal types in Objective-C sources
 // and can be included in C++ sources.
 #if __OBJC__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunguarded-availability"
 using MTLDevicePtr = id<MTLDevice>;
+#pragma clang diagnostic pop
 #else
 class MTLDeviceProtocol;
 using MTLDevicePtr = MTLDeviceProtocol*;
diff --git a/components/safe_browsing/realtime/url_lookup_service.cc b/components/safe_browsing/realtime/url_lookup_service.cc
index 5021036f..973bc10 100644
--- a/components/safe_browsing/realtime/url_lookup_service.cc
+++ b/components/safe_browsing/realtime/url_lookup_service.cc
@@ -29,6 +29,16 @@
 
 const size_t kURLLookupTimeoutDurationInSeconds = 1 * 60;  // 1 minute.
 
+// Fragements, usernames and passwords are removed, becuase fragments are only
+// used for local navigations and usernames/passwords are too privacy sensitive.
+GURL SanitizeURL(const GURL& url) {
+  GURL::Replacements replacements;
+  replacements.ClearRef();
+  replacements.ClearUsername();
+  replacements.ClearPassword();
+  return url.ReplaceComponents(replacements);
+}
+
 }  // namespace
 
 RealTimeUrlLookupService::RealTimeUrlLookupService(
@@ -43,7 +53,7 @@
   DCHECK(url.is_valid());
 
   RTLookupRequest request;
-  request.set_url(url.spec());
+  request.set_url(SanitizeURL(url).spec());
   request.set_lookup_type(RTLookupRequest::NAVIGATION);
   std::string req_data, req_base64;
   request.SerializeToString(&req_data);
diff --git a/components/ukm/BUILD.gn b/components/ukm/BUILD.gn
index 0ec037f2..f5de865 100644
--- a/components/ukm/BUILD.gn
+++ b/components/ukm/BUILD.gn
@@ -104,7 +104,6 @@
     "//components/prefs:test_support",
     "//components/sync:test_support",
     "//components/sync_preferences:test_support",
-    "//components/unified_consent:test_support",
     "//components/variations",
     "//net:test_support",
     "//services/metrics/public/cpp:ukm_builders",
diff --git a/components/ukm/observers/sync_disable_observer.cc b/components/ukm/observers/sync_disable_observer.cc
index f8e428a..4b0aafa 100644
--- a/components/ukm/observers/sync_disable_observer.cc
+++ b/components/ukm/observers/sync_disable_observer.cc
@@ -11,7 +11,6 @@
 #include "base/metrics/histogram_macros.h"
 #include "base/stl_util.h"
 #include "components/sync/driver/sync_user_settings.h"
-#include "components/unified_consent/feature.h"
 #include "components/unified_consent/url_keyed_data_collection_consent_helper.h"
 #include "google_apis/gaia/google_service_auth_error.h"
 
@@ -114,19 +113,15 @@
 void SyncDisableObserver::ObserveServiceForSyncDisables(
     syncer::SyncService* sync_service,
     PrefService* prefs) {
-  std::unique_ptr<UrlKeyedDataCollectionConsentHelper> consent_helper;
-  if (unified_consent::IsUnifiedConsentFeatureEnabled()) {
-    consent_helper = UrlKeyedDataCollectionConsentHelper::
-        NewAnonymizedDataCollectionConsentHelper(prefs, sync_service);
-  }
+  std::unique_ptr<UrlKeyedDataCollectionConsentHelper> consent_helper =
+      UrlKeyedDataCollectionConsentHelper::
+          NewAnonymizedDataCollectionConsentHelper(prefs, sync_service);
 
   SyncState state = GetSyncState(sync_service, consent_helper.get());
   previous_states_[sync_service] = state;
 
-  if (consent_helper) {
-    consent_helper->AddObserver(this);
-    consent_helpers_[sync_service] = std::move(consent_helper);
-  }
+  consent_helper->AddObserver(this);
+  consent_helpers_[sync_service] = std::move(consent_helper);
   sync_observer_.Add(sync_service);
   UpdateAllProfileEnabled(false);
 }
diff --git a/components/ukm/observers/sync_disable_observer_unittest.cc b/components/ukm/observers/sync_disable_observer_unittest.cc
index 34935a7b..8938702 100644
--- a/components/ukm/observers/sync_disable_observer_unittest.cc
+++ b/components/ukm/observers/sync_disable_observer_unittest.cc
@@ -9,15 +9,10 @@
 #include "components/sync/driver/test_sync_service.h"
 #include "components/sync/engine/cycle/sync_cycle_snapshot.h"
 #include "components/sync_preferences/testing_pref_service_syncable.h"
-#include "components/unified_consent/feature.h"
 #include "components/unified_consent/pref_names.h"
-#include "components/unified_consent/scoped_unified_consent.h"
 #include "components/unified_consent/unified_consent_service.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
-using unified_consent::ScopedUnifiedConsent;
-using unified_consent::UnifiedConsentFeatureState;
-
 namespace ukm {
 
 namespace {
@@ -123,7 +118,6 @@
 
   void SetUrlKeyedAnonymizedDataCollectionEnabled(PrefService* prefs,
                                                   bool enabled) {
-    DCHECK(unified_consent::IsUnifiedConsentFeatureEnabled());
     prefs->SetBoolean(
         unified_consent::prefs::kUrlKeyedAnonymizedDataCollectionEnabled,
         enabled);
@@ -154,21 +148,7 @@
   EXPECT_FALSE(observer.ResetPurged());
 }
 
-TEST_F(SyncDisableObserverTest, OneEnabled_UnifiedConsentDisabled) {
-  ScopedUnifiedConsent scoped_unified_consent(
-      UnifiedConsentFeatureState::kDisabled);
-  TestSyncDisableObserver observer;
-  MockSyncService sync;
-  sync.SetStatus(false, true, true);
-  observer.ObserveServiceForSyncDisables(&sync, nullptr);
-  EXPECT_TRUE(observer.SyncStateAllowsUkm());
-  EXPECT_TRUE(observer.ResetNotified());
-  EXPECT_FALSE(observer.ResetPurged());
-}
-
-TEST_F(SyncDisableObserverTest, OneEnabled_UnifiedConsentEnabled) {
-  ScopedUnifiedConsent scoped_unified_consent(
-      UnifiedConsentFeatureState::kEnabled);
+TEST_F(SyncDisableObserverTest, OneEnabled) {
   sync_preferences::TestingPrefServiceSyncable prefs;
   RegisterUrlKeyedAnonymizedDataCollectionPref(prefs);
   SetUrlKeyedAnonymizedDataCollectionEnabled(&prefs, true);
@@ -185,83 +165,7 @@
   }
 }
 
-TEST_F(SyncDisableObserverTest, Passphrased_UnifiedConsentDisabled) {
-  ScopedUnifiedConsent scoped_unified_consent(
-      UnifiedConsentFeatureState::kDisabled);
-  MockSyncService sync;
-  sync.SetStatus(true, true, true);
-  TestSyncDisableObserver observer;
-  observer.ObserveServiceForSyncDisables(&sync, nullptr);
-  EXPECT_FALSE(observer.SyncStateAllowsUkm());
-  EXPECT_FALSE(observer.ResetNotified());
-  EXPECT_FALSE(observer.ResetPurged());
-}
-
-TEST_F(SyncDisableObserverTest, HistoryDisabled_UnifiedConsentDisabled) {
-  ScopedUnifiedConsent scoped_unified_consent(
-      UnifiedConsentFeatureState::kDisabled);
-  TestSyncDisableObserver observer;
-  MockSyncService sync;
-  sync.SetStatus(false, false, true);
-  observer.ObserveServiceForSyncDisables(&sync, nullptr);
-  EXPECT_FALSE(observer.SyncStateAllowsUkm());
-  EXPECT_FALSE(observer.ResetNotified());
-  EXPECT_FALSE(observer.ResetPurged());
-}
-
-TEST_F(SyncDisableObserverTest, AuthError_UnifiedConsentDisabled) {
-  ScopedUnifiedConsent scoped_unified_consent(
-      UnifiedConsentFeatureState::kDisabled);
-  TestSyncDisableObserver observer;
-  MockSyncService sync;
-  sync.SetStatus(false, true, true);
-  observer.ObserveServiceForSyncDisables(&sync, nullptr);
-  EXPECT_TRUE(observer.SyncStateAllowsUkm());
-  sync.SetAuthError(GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS);
-  EXPECT_FALSE(observer.SyncStateAllowsUkm());
-  sync.SetAuthError(GoogleServiceAuthError::NONE);
-  EXPECT_TRUE(observer.SyncStateAllowsUkm());
-}
-
-TEST_F(SyncDisableObserverTest, MixedProfiles1_UnifiedConsentDisabled) {
-  ScopedUnifiedConsent scoped_unified_consent(
-      UnifiedConsentFeatureState::kDisabled);
-  TestSyncDisableObserver observer;
-  MockSyncService sync1;
-  sync1.SetStatus(false, false, true);
-  observer.ObserveServiceForSyncDisables(&sync1, nullptr);
-  MockSyncService sync2;
-  sync2.SetStatus(false, true, true);
-  observer.ObserveServiceForSyncDisables(&sync2, nullptr);
-  EXPECT_FALSE(observer.SyncStateAllowsUkm());
-  EXPECT_FALSE(observer.ResetNotified());
-  EXPECT_FALSE(observer.ResetPurged());
-}
-
-TEST_F(SyncDisableObserverTest, MixedProfiles2_UnifiedConsentDisabled) {
-  ScopedUnifiedConsent scoped_unified_consent(
-      UnifiedConsentFeatureState::kDisabled);
-  TestSyncDisableObserver observer;
-  MockSyncService sync1;
-  sync1.SetStatus(false, true, true);
-  observer.ObserveServiceForSyncDisables(&sync1, nullptr);
-  EXPECT_TRUE(observer.ResetNotified());
-
-  MockSyncService sync2;
-  sync2.SetStatus(false, false, true);
-  observer.ObserveServiceForSyncDisables(&sync2, nullptr);
-  EXPECT_FALSE(observer.SyncStateAllowsUkm());
-  EXPECT_TRUE(observer.ResetNotified());
-  EXPECT_FALSE(observer.ResetPurged());
-  sync2.Shutdown();
-  EXPECT_TRUE(observer.SyncStateAllowsUkm());
-  EXPECT_TRUE(observer.ResetNotified());
-  EXPECT_FALSE(observer.ResetPurged());
-}
-
-TEST_F(SyncDisableObserverTest, MixedProfiles_UnifiedConsentEnabled) {
-  ScopedUnifiedConsent scoped_unified_consent(
-      UnifiedConsentFeatureState::kEnabled);
+TEST_F(SyncDisableObserverTest, MixedProfiles) {
   sync_preferences::TestingPrefServiceSyncable prefs1;
   RegisterUrlKeyedAnonymizedDataCollectionPref(prefs1);
   sync_preferences::TestingPrefServiceSyncable prefs2;
@@ -279,25 +183,7 @@
   EXPECT_FALSE(observer.ResetPurged());
 }
 
-TEST_F(SyncDisableObserverTest, TwoEnabled_UnifiedConsentDisabled) {
-  ScopedUnifiedConsent scoped_unified_consent(
-      UnifiedConsentFeatureState::kDisabled);
-  TestSyncDisableObserver observer;
-  MockSyncService sync1;
-  sync1.SetStatus(false, true, true);
-  observer.ObserveServiceForSyncDisables(&sync1, nullptr);
-  EXPECT_TRUE(observer.ResetNotified());
-  MockSyncService sync2;
-  sync2.SetStatus(false, true, true);
-  observer.ObserveServiceForSyncDisables(&sync2, nullptr);
-  EXPECT_TRUE(observer.SyncStateAllowsUkm());
-  EXPECT_FALSE(observer.ResetNotified());
-  EXPECT_FALSE(observer.ResetPurged());
-}
-
-TEST_F(SyncDisableObserverTest, TwoEnabled_UnifiedConsentEnabled) {
-  ScopedUnifiedConsent scoped_unified_consent(
-      UnifiedConsentFeatureState::kEnabled);
+TEST_F(SyncDisableObserverTest, TwoEnabled) {
   sync_preferences::TestingPrefServiceSyncable prefs1;
   RegisterUrlKeyedAnonymizedDataCollectionPref(prefs1);
   sync_preferences::TestingPrefServiceSyncable prefs2;
@@ -316,28 +202,7 @@
   EXPECT_FALSE(observer.ResetPurged());
 }
 
-TEST_F(SyncDisableObserverTest, OneAddRemove_UnifiedConsentDisabled) {
-  ScopedUnifiedConsent scoped_unified_consent(
-      UnifiedConsentFeatureState::kDisabled);
-  TestSyncDisableObserver observer;
-  MockSyncService sync;
-  observer.ObserveServiceForSyncDisables(&sync, nullptr);
-  EXPECT_FALSE(observer.SyncStateAllowsUkm());
-  EXPECT_FALSE(observer.ResetNotified());
-  EXPECT_FALSE(observer.ResetPurged());
-  sync.SetStatus(false, true, true);
-  EXPECT_TRUE(observer.SyncStateAllowsUkm());
-  EXPECT_TRUE(observer.ResetNotified());
-  EXPECT_FALSE(observer.ResetPurged());
-  sync.Shutdown();
-  EXPECT_FALSE(observer.SyncStateAllowsUkm());
-  EXPECT_TRUE(observer.ResetNotified());
-  EXPECT_FALSE(observer.ResetPurged());
-}
-
-TEST_F(SyncDisableObserverTest, OneAddRemove_UnifiedConsentEnabled) {
-  ScopedUnifiedConsent scoped_unified_consent(
-      UnifiedConsentFeatureState::kEnabled);
+TEST_F(SyncDisableObserverTest, OneAddRemove) {
   sync_preferences::TestingPrefServiceSyncable prefs;
   RegisterUrlKeyedAnonymizedDataCollectionPref(prefs);
   TestSyncDisableObserver observer;
@@ -356,30 +221,7 @@
   EXPECT_FALSE(observer.ResetPurged());
 }
 
-TEST_F(SyncDisableObserverTest, PurgeOnDisable_UnifiedConsentDisabled) {
-  ScopedUnifiedConsent scoped_unified_consent(
-      UnifiedConsentFeatureState::kDisabled);
-  TestSyncDisableObserver observer;
-  MockSyncService sync;
-  sync.SetStatus(false, true, true);
-  observer.ObserveServiceForSyncDisables(&sync, nullptr);
-  EXPECT_TRUE(observer.SyncStateAllowsUkm());
-  EXPECT_TRUE(observer.ResetNotified());
-  EXPECT_FALSE(observer.ResetPurged());
-  sync.SetStatus(false, false, true);
-  EXPECT_FALSE(observer.SyncStateAllowsUkm());
-  EXPECT_TRUE(observer.ResetNotified());
-  EXPECT_TRUE(observer.ResetPurged());
-  sync.Shutdown();
-  EXPECT_FALSE(observer.SyncStateAllowsUkm());
-  EXPECT_FALSE(observer.ResetNotified());
-  EXPECT_FALSE(observer.ResetPurged());
-}
-
-TEST_F(SyncDisableObserverTest, PurgeOnDisable_UnifiedConsentEnabled) {
-  ScopedUnifiedConsent scoped_unified_consent(
-      UnifiedConsentFeatureState::kEnabled);
-
+TEST_F(SyncDisableObserverTest, PurgeOnDisable) {
   sync_preferences::TestingPrefServiceSyncable prefs;
   RegisterUrlKeyedAnonymizedDataCollectionPref(prefs);
   TestSyncDisableObserver observer;
diff --git a/components/unified_consent/BUILD.gn b/components/unified_consent/BUILD.gn
index eeae8f03..b366cb2 100644
--- a/components/unified_consent/BUILD.gn
+++ b/components/unified_consent/BUILD.gn
@@ -4,8 +4,6 @@
 
 static_library("unified_consent") {
   sources = [
-    "feature.cc",
-    "feature.h",
     "pref_names.cc",
     "pref_names.h",
     "unified_consent_metrics.cc",
@@ -27,33 +25,13 @@
   ]
 }
 
-static_library("test_support") {
-  testonly = true
-  sources = [
-    "scoped_unified_consent.cc",
-    "scoped_unified_consent.h",
-  ]
-
-  deps = [
-    "//base/test:test_support",
-  ]
-
-  public_deps = [
-    ":unified_consent",
-    "//base",
-    "//components/sync",
-  ]
-}
-
 source_set("unit_tests") {
   testonly = true
   sources = [
-    "feature_unittest.cc",
     "unified_consent_service_unittest.cc",
     "url_keyed_data_collection_consent_helper_unittest.cc",
   ]
   deps = [
-    ":test_support",
     ":unified_consent",
     "//base/test:test_support",
     "//components/signin/public/identity_manager:test_support",
diff --git a/components/unified_consent/feature.cc b/components/unified_consent/feature.cc
deleted file mode 100644
index 5767912..0000000
--- a/components/unified_consent/feature.cc
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2018 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.
-
-#include "components/unified_consent/feature.h"
-
-#include "build/build_config.h"
-
-namespace unified_consent {
-
-// base::Feature definition.
-const base::Feature kUnifiedConsent {
-  "UnifiedConsent",
-#if defined(OS_CHROMEOS)
-      base::FEATURE_DISABLED_BY_DEFAULT
-#else
-      base::FEATURE_ENABLED_BY_DEFAULT
-#endif
-};
-
-bool IsUnifiedConsentFeatureEnabled() {
-  return base::FeatureList::IsEnabled(kUnifiedConsent);
-}
-
-}  // namespace unified_consent
diff --git a/components/unified_consent/feature.h b/components/unified_consent/feature.h
deleted file mode 100644
index bd59685..0000000
--- a/components/unified_consent/feature.h
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2018 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 COMPONENTS_UNIFIED_CONSENT_FEATURE_H_
-#define COMPONENTS_UNIFIED_CONSENT_FEATURE_H_
-
-#include "base/feature_list.h"
-
-namespace unified_consent {
-
-// Single consent for Google services in Chrome.
-extern const base::Feature kUnifiedConsent;
-
-// Returns true if the unified consent feature state is enabled.
-bool IsUnifiedConsentFeatureEnabled();
-
-}  // namespace unified_consent
-
-#endif  // COMPONENTS_UNIFIED_CONSENT_FEATURE_H_
diff --git a/components/unified_consent/feature_unittest.cc b/components/unified_consent/feature_unittest.cc
deleted file mode 100644
index b0e550b..0000000
--- a/components/unified_consent/feature_unittest.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-// 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.
-
-#include "components/unified_consent/feature.h"
-
-#include "build/build_config.h"
-#include "components/sync/driver/sync_driver_switches.h"
-#include "components/unified_consent/scoped_unified_consent.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace unified_consent {
-
-TEST(UnifiedConsentFeatureTest, FeatureState) {
-// Linux platforms
-#if defined(OS_ANDROID)
-  // Unified consent is disabled by default.
-  EXPECT_TRUE(IsUnifiedConsentFeatureEnabled());
-#endif
-
-#if defined(OS_CHROMEOS)
-  // Unified consent is disabled by default.
-  EXPECT_FALSE(IsUnifiedConsentFeatureEnabled());
-#endif
-
-#if defined(OS_LINUX) && !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
-  // Unified consent is enabled by default.
-  EXPECT_TRUE(IsUnifiedConsentFeatureEnabled());
-#endif
-
-// Apple platforms
-#if defined(OS_IOS)
-  // Unified consent is enabled by default.
-  EXPECT_TRUE(IsUnifiedConsentFeatureEnabled());
-#endif
-
-#if defined(OS_MACOSX) && !defined(OS_IOS)
-  // Unified consent is enabled by default.
-  EXPECT_TRUE(IsUnifiedConsentFeatureEnabled());
-#endif
-
-// Windows
-#if defined(OS_WIN)
-  // Unified consent is enabled by default.
-  EXPECT_TRUE(IsUnifiedConsentFeatureEnabled());
-#endif
-
-  {
-    ScopedUnifiedConsent scoped_disabled(UnifiedConsentFeatureState::kDisabled);
-    EXPECT_FALSE(IsUnifiedConsentFeatureEnabled());
-  }
-
-  {
-    ScopedUnifiedConsent scoped_enabled(UnifiedConsentFeatureState::kEnabled);
-    EXPECT_TRUE(IsUnifiedConsentFeatureEnabled());
-  }
-}
-
-}  // namespace unified_consent
diff --git a/components/unified_consent/scoped_unified_consent.cc b/components/unified_consent/scoped_unified_consent.cc
deleted file mode 100644
index d1eef04..0000000
--- a/components/unified_consent/scoped_unified_consent.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2018 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.
-
-#include "components/unified_consent/scoped_unified_consent.h"
-
-#include <map>
-#include <string>
-#include <utility>
-
-#include "base/bind.h"
-#include "base/feature_list.h"
-#include "base/logging.h"
-#include "components/unified_consent/feature.h"
-
-namespace unified_consent {
-
-ScopedUnifiedConsent::ScopedUnifiedConsent(UnifiedConsentFeatureState state) {
-  switch (state) {
-    case UnifiedConsentFeatureState::kDisabled:
-      unified_consent_feature_list_.InitAndDisableFeature(kUnifiedConsent);
-      break;
-    case UnifiedConsentFeatureState::kEnabled:
-      unified_consent_feature_list_.InitAndEnableFeature(kUnifiedConsent);
-      break;
-  }
-}
-
-ScopedUnifiedConsent::~ScopedUnifiedConsent() {}
-
-}  // namespace unified_consent
diff --git a/components/unified_consent/scoped_unified_consent.h b/components/unified_consent/scoped_unified_consent.h
deleted file mode 100644
index f4bce38..0000000
--- a/components/unified_consent/scoped_unified_consent.h
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2018 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 COMPONENTS_UNIFIED_CONSENT_SCOPED_UNIFIED_CONSENT_H_
-#define COMPONENTS_UNIFIED_CONSENT_SCOPED_UNIFIED_CONSENT_H_
-
-#include <memory>
-
-#include "base/macros.h"
-#include "base/test/scoped_feature_list.h"
-
-namespace unified_consent {
-
-// State of the "Unified Consent" feature.
-enum class UnifiedConsentFeatureState {
-  // Unified consent is disabled.
-  kDisabled,
-  // Unified consent is enabled.
-  kEnabled,
-};
-
-// Changes the unified consent feature state while it is in scope. Useful for
-// tests.
-// Also enables the feature |switches::kSyncUserConsentSeparateType| as
-// unified consent depends on its.
-class ScopedUnifiedConsent {
- public:
-  explicit ScopedUnifiedConsent(UnifiedConsentFeatureState state);
-  ~ScopedUnifiedConsent();
-
- private:
-  base::test::ScopedFeatureList unified_consent_feature_list_;
-
-  DISALLOW_COPY_AND_ASSIGN(ScopedUnifiedConsent);
-};
-
-}  // namespace unified_consent
-
-#endif  // COMPONENTS_UNIFIED_CONSENT_SCOPED_UNIFIED_CONSENT_H_
diff --git a/components/unified_consent/unified_consent_service.cc b/components/unified_consent/unified_consent_service.cc
index efe2ba43..8302b043 100644
--- a/components/unified_consent/unified_consent_service.cc
+++ b/components/unified_consent/unified_consent_service.cc
@@ -14,7 +14,6 @@
 #include "components/sync/driver/sync_service.h"
 #include "components/sync/driver/sync_user_settings.h"
 #include "components/sync_preferences/pref_service_syncable.h"
-#include "components/unified_consent/feature.h"
 #include "components/unified_consent/pref_names.h"
 
 namespace unified_consent {
@@ -52,23 +51,6 @@
       static_cast<int>(MigrationState::kNotInitialized));
 }
 
-// static
-void UnifiedConsentService::RollbackIfNeeded(
-    PrefService* user_pref_service,
-    syncer::SyncService* sync_service) {
-  DCHECK(user_pref_service);
-
-  if (user_pref_service->GetInteger(prefs::kUnifiedConsentMigrationState) ==
-      static_cast<int>(MigrationState::kNotInitialized)) {
-    // If there was no migration yet, nothing has to be rolled back.
-    return;
-  }
-
-  // Clear all unified consent prefs.
-  user_pref_service->ClearPref(prefs::kUrlKeyedAnonymizedDataCollectionEnabled);
-  user_pref_service->ClearPref(prefs::kUnifiedConsentMigrationState);
-}
-
 void UnifiedConsentService::SetUrlKeyedAnonymizedDataCollectionEnabled(
     bool enabled) {
   if (GetMigrationState() != MigrationState::kCompleted)
diff --git a/components/unified_consent/unified_consent_service.h b/components/unified_consent/unified_consent_service.h
index 76f19e2b..c39c623 100644
--- a/components/unified_consent/unified_consent_service.h
+++ b/components/unified_consent/unified_consent_service.h
@@ -69,11 +69,6 @@
   // Register the prefs used by this UnifiedConsentService.
   static void RegisterPrefs(user_prefs::PrefRegistrySyncable* registry);
 
-  // Rolls back changes made during migration. This method does nothing if the
-  // user hasn't migrated to unified consent yet.
-  static void RollbackIfNeeded(PrefService* user_pref_service,
-                               syncer::SyncService* sync_service);
-
   // Enables or disables URL-keyed anonymized data collection.
   void SetUrlKeyedAnonymizedDataCollectionEnabled(bool enabled);
 
diff --git a/components/unified_consent/unified_consent_service_unittest.cc b/components/unified_consent/unified_consent_service_unittest.cc
index bde2bc72..3be90485 100644
--- a/components/unified_consent/unified_consent_service_unittest.cc
+++ b/components/unified_consent/unified_consent_service_unittest.cc
@@ -17,7 +17,6 @@
 #include "components/sync/driver/test_sync_service.h"
 #include "components/sync_preferences/testing_pref_service_syncable.h"
 #include "components/unified_consent/pref_names.h"
-#include "components/unified_consent/scoped_unified_consent.h"
 #include "components/unified_consent/unified_consent_metrics.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
@@ -58,11 +57,6 @@
   }
 
   void CreateConsentService() {
-    if (!scoped_unified_consent_) {
-      SetUnifiedConsentFeatureState(
-          unified_consent::UnifiedConsentFeatureState::kEnabled);
-    }
-
     consent_service_ = std::make_unique<UnifiedConsentService>(
         &pref_service_, identity_test_environment_.identity_manager(),
         &sync_service_, std::vector<std::string>());
@@ -72,16 +66,6 @@
     base::RunLoop().RunUntilIdle();
   }
 
-  void SetUnifiedConsentFeatureState(
-      unified_consent::UnifiedConsentFeatureState feature_state) {
-    // First reset |scoped_unified_consent_| to nullptr in case it was set
-    // before and then initialize it with the new value. This makes sure that
-    // the old scoped object is deleted before the new one is created.
-    scoped_unified_consent_.reset();
-    scoped_unified_consent_.reset(
-        new unified_consent::ScopedUnifiedConsent(feature_state));
-  }
-
   unified_consent::MigrationState GetMigrationState() {
     int migration_state_int =
         pref_service_.GetInteger(prefs::kUnifiedConsentMigrationState);
@@ -94,7 +78,6 @@
   signin::IdentityTestEnvironment identity_test_environment_;
   TestSyncService sync_service_;
   std::unique_ptr<UnifiedConsentService> consent_service_;
-  std::unique_ptr<ScopedUnifiedConsent> scoped_unified_consent_;
 
   DISALLOW_COPY_AND_ASSIGN(UnifiedConsentServiceTest);
 };
@@ -163,27 +146,4 @@
 }
 #endif  // !defined(OS_CHROMEOS)
 
-TEST_F(UnifiedConsentServiceTest, Rollback_UserOptedIntoUnifiedConsent) {
-  identity_test_environment_.SetPrimaryAccount("testaccount");
-
-  // Migrate and opt into unified consent.
-  CreateConsentService();
-  consent_service_->SetUrlKeyedAnonymizedDataCollectionEnabled(true);
-  // Check expectations after opt-in.
-  EXPECT_TRUE(pref_service_.GetBoolean(
-      prefs::kUrlKeyedAnonymizedDataCollectionEnabled));
-  EXPECT_EQ(unified_consent::MigrationState::kCompleted, GetMigrationState());
-
-  consent_service_->Shutdown();
-  consent_service_.reset();
-  SetUnifiedConsentFeatureState(UnifiedConsentFeatureState::kDisabled);
-
-  // Rollback
-  UnifiedConsentService::RollbackIfNeeded(&pref_service_, &sync_service_);
-
-  // Unified consent prefs should be cleared.
-  EXPECT_EQ(unified_consent::MigrationState::kNotInitialized,
-            GetMigrationState());
-}
-
 }  // namespace unified_consent
diff --git a/components/unified_consent/url_keyed_data_collection_consent_helper.cc b/components/unified_consent/url_keyed_data_collection_consent_helper.cc
index 409b1e0..89bf509 100644
--- a/components/unified_consent/url_keyed_data_collection_consent_helper.cc
+++ b/components/unified_consent/url_keyed_data_collection_consent_helper.cc
@@ -11,7 +11,6 @@
 #include "components/sync/driver/sync_service.h"
 #include "components/sync/driver/sync_service_observer.h"
 #include "components/sync/driver/sync_service_utils.h"
-#include "components/unified_consent/feature.h"
 #include "components/unified_consent/pref_names.h"
 
 #include <map>
@@ -149,14 +148,8 @@
 UrlKeyedDataCollectionConsentHelper::NewAnonymizedDataCollectionConsentHelper(
     PrefService* pref_service,
     syncer::SyncService* sync_service) {
-  if (IsUnifiedConsentFeatureEnabled()) {
-    return std::make_unique<PrefBasedUrlKeyedDataCollectionConsentHelper>(
-        pref_service);
-  }
-
-  return std::make_unique<SyncBasedUrlKeyedDataCollectionConsentHelper>(
-      sync_service, std::set<syncer::ModelType>(
-                        {syncer::ModelType::HISTORY_DELETE_DIRECTIVES}));
+  return std::make_unique<PrefBasedUrlKeyedDataCollectionConsentHelper>(
+      pref_service);
 }
 
 // static
diff --git a/components/unified_consent/url_keyed_data_collection_consent_helper_unittest.cc b/components/unified_consent/url_keyed_data_collection_consent_helper_unittest.cc
index 893ae47a..3d236f0 100644
--- a/components/unified_consent/url_keyed_data_collection_consent_helper_unittest.cc
+++ b/components/unified_consent/url_keyed_data_collection_consent_helper_unittest.cc
@@ -10,7 +10,6 @@
 #include "components/sync/engine/cycle/sync_cycle_snapshot.h"
 #include "components/sync_preferences/testing_pref_service_syncable.h"
 #include "components/unified_consent/pref_names.h"
-#include "components/unified_consent/scoped_unified_consent.h"
 #include "components/unified_consent/unified_consent_service.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
@@ -64,10 +63,7 @@
   TestSyncService sync_service_;
 };
 
-TEST_F(UrlKeyedDataCollectionConsentHelperTest,
-       AnonymizedDataCollection_UnifiedConsentEnabled) {
-  ScopedUnifiedConsent scoped_unified_consent(
-      UnifiedConsentFeatureState::kEnabled);
+TEST_F(UrlKeyedDataCollectionConsentHelperTest, AnonymizedDataCollection) {
   std::unique_ptr<UrlKeyedDataCollectionConsentHelper> helper =
       UrlKeyedDataCollectionConsentHelper::
           NewAnonymizedDataCollectionConsentHelper(&pref_service_,
@@ -91,58 +87,7 @@
   helper->RemoveObserver(this);
 }
 
-TEST_F(UrlKeyedDataCollectionConsentHelperTest,
-       AnonymizedDataCollection_UnifiedConsentDisabled) {
-  ScopedUnifiedConsent scoped_unified_consent(
-      UnifiedConsentFeatureState::kDisabled);
-  std::unique_ptr<UrlKeyedDataCollectionConsentHelper> helper =
-      UrlKeyedDataCollectionConsentHelper::
-          NewAnonymizedDataCollectionConsentHelper(&pref_service_,
-                                                   &sync_service_);
-  helper->AddObserver(this);
-  EXPECT_FALSE(helper->IsEnabled());
-  EXPECT_TRUE(state_changed_notifications_.empty());
-
-  sync_service_.AddActiveDataType(syncer::ModelType::HISTORY_DELETE_DIRECTIVES);
-  sync_service_.FireOnStateChangeOnAllObservers();
-  EXPECT_TRUE(helper->IsEnabled());
-  EXPECT_EQ(1U, state_changed_notifications_.size());
-  helper->RemoveObserver(this);
-}
-
-TEST_F(UrlKeyedDataCollectionConsentHelperTest,
-       AnonymizedDataCollection_UnifiedConsentDisabled_NullSyncService) {
-  ScopedUnifiedConsent scoped_unified_consent(
-      UnifiedConsentFeatureState::kDisabled);
-  std::unique_ptr<UrlKeyedDataCollectionConsentHelper> helper =
-      UrlKeyedDataCollectionConsentHelper::
-          NewAnonymizedDataCollectionConsentHelper(&pref_service_,
-                                                   nullptr /* sync_service */);
-  EXPECT_FALSE(helper->IsEnabled());
-}
-
-TEST_F(UrlKeyedDataCollectionConsentHelperTest,
-       PersonalizedDataCollection_UnifiedConsentEnabled) {
-  ScopedUnifiedConsent scoped_unified_consent(
-      UnifiedConsentFeatureState::kEnabled);
-  std::unique_ptr<UrlKeyedDataCollectionConsentHelper> helper =
-      UrlKeyedDataCollectionConsentHelper::
-          NewPersonalizedDataCollectionConsentHelper(&sync_service_);
-  helper->AddObserver(this);
-  EXPECT_FALSE(helper->IsEnabled());
-  EXPECT_TRUE(state_changed_notifications_.empty());
-
-  sync_service_.AddActiveDataType(syncer::ModelType::HISTORY_DELETE_DIRECTIVES);
-  sync_service_.FireOnStateChangeOnAllObservers();
-  EXPECT_TRUE(helper->IsEnabled());
-  EXPECT_EQ(1U, state_changed_notifications_.size());
-  helper->RemoveObserver(this);
-}
-
-TEST_F(UrlKeyedDataCollectionConsentHelperTest,
-       PersonalizedDataCollection_UnifiedConsentDisabled) {
-  ScopedUnifiedConsent scoped_unified_consent(
-      UnifiedConsentFeatureState::kDisabled);
+TEST_F(UrlKeyedDataCollectionConsentHelperTest, PersonalizedDataCollection) {
   std::unique_ptr<UrlKeyedDataCollectionConsentHelper> helper =
       UrlKeyedDataCollectionConsentHelper::
           NewPersonalizedDataCollectionConsentHelper(&sync_service_);
@@ -159,24 +104,11 @@
 
 TEST_F(UrlKeyedDataCollectionConsentHelperTest,
        PersonalizedDataCollection_NullSyncService) {
-  {
-    ScopedUnifiedConsent scoped_unified_consent(
-        UnifiedConsentFeatureState::kDisabled);
     std::unique_ptr<UrlKeyedDataCollectionConsentHelper> helper =
         UrlKeyedDataCollectionConsentHelper::
             NewPersonalizedDataCollectionConsentHelper(
                 nullptr /* sync_service */);
     EXPECT_FALSE(helper->IsEnabled());
-  }
-  {
-    ScopedUnifiedConsent scoped_unified_consent(
-        UnifiedConsentFeatureState::kEnabled);
-    std::unique_ptr<UrlKeyedDataCollectionConsentHelper> helper =
-        UrlKeyedDataCollectionConsentHelper::
-            NewPersonalizedDataCollectionConsentHelper(
-                nullptr /* sync_service */);
-    EXPECT_FALSE(helper->IsEnabled());
-  }
 }
 
 }  // namespace
diff --git a/components/viz/common/gpu/metal_context_provider.mm b/components/viz/common/gpu/metal_context_provider.mm
index b6c0da5..8502f41 100644
--- a/components/viz/common/gpu/metal_context_provider.mm
+++ b/components/viz/common/gpu/metal_context_provider.mm
@@ -4,83 +4,47 @@
 
 #include "components/viz/common/gpu/metal_context_provider.h"
 
+#import <Metal/Metal.h>
+
+#include "base/bind.h"
 #include "base/mac/scoped_nsobject.h"
 #include "base/memory/ref_counted.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/synchronization/waitable_event.h"
+#include "base/threading/thread_task_runner_handle.h"
 #include "base/time/time.h"
 #include "components/metal_util/device.h"
+#include "components/metal_util/test_shader.h"
 #include "components/viz/common/gpu/metal_api_proxy.h"
 #include "third_party/skia/include/gpu/GrContext.h"
 
-#import <Metal/Metal.h>
-
 namespace viz {
 
 namespace {
 
-const char* kTestShaderSource =
-    ""
-    "#include <metal_stdlib>\n"
-    "#include <simd/simd.h>\n"
-    "typedef struct {\n"
-    "    float4 clipSpacePosition [[position]];\n"
-    "    float4 color;\n"
-    "} RasterizerData;\n"
-    "\n"
-    "vertex RasterizerData vertexShader(\n"
-    "    uint vertexID [[vertex_id]],\n"
-    "    constant vector_float2 *positions[[buffer(0)]],\n"
-    "    constant vector_float4 *colors[[buffer(1)]]) {\n"
-    "  RasterizerData out;\n"
-    "  out.clipSpacePosition = vector_float4(0.0, 0.0, 0.0, 1.0);\n"
-    "  out.clipSpacePosition.xy = positions[vertexID].xy;\n"
-    "  out.color = colors[vertexID];\n"
-    "  return out;\n"
-    "}\n"
-    "\n"
-    "fragment float4 fragmentShader(RasterizerData in [[stage_in]]) {\n"
-    "    return in.color;\n"
-    "}\n"
-    "";
-
 // The timeout for compiling the test shader. Set to be much longer than any
 // shader compile should take, but still less than the watchdog timeout.
 constexpr base::TimeDelta kTestShaderCompileTimeout =
     base::TimeDelta::FromSeconds(6);
 
-// State shared between the compiler callback and the caller.
-class API_AVAILABLE(macos(10.11)) TestShaderState
-    : public base::RefCountedThreadSafe<TestShaderState> {
- public:
-  TestShaderState() {}
-  base::WaitableEvent event;
-
- protected:
-  friend class base::RefCountedThreadSafe<TestShaderState>;
-  virtual ~TestShaderState() {}
-};
-
 // Attempt to asynchronously compile a test shader. If the compile doesn't
 // complete within a timeout, then return false.
-bool CompileTestShader(id<MTLDevice> device) API_AVAILABLE(macos(10.11)) {
-  auto state = base::MakeRefCounted<TestShaderState>();
-
-  base::scoped_nsobject<NSString> source([[NSString alloc]
-      initWithCString:kTestShaderSource
-             encoding:NSASCIIStringEncoding]);
-  base::scoped_nsobject<MTLCompileOptions> options(
-      [[MTLCompileOptions alloc] init]);
-  MTLNewLibraryCompletionHandler completion_handler =
-      ^(id<MTLLibrary> library, NSError* error) {
-        DCHECK(library);
-        state->event.Signal();
-      };
-  [device newLibraryWithSource:source
-                       options:options
-             completionHandler:completion_handler];
-
-  return state->event.TimedWait(kTestShaderCompileTimeout);
+bool CompileTestShader() {
+  // Compile a test shader, to see if the MTLCompilerService is responding
+  // or not. If the compile times out, then don't try to use Metal.
+  // https://crbug.com/974219
+  metal::TestShaderResult result = metal::TestShaderResult::kNotAttempted;
+  base::WaitableEvent event;
+  auto lambda = [](base::WaitableEvent* event,
+                   metal::TestShaderResult* out_result,
+                   metal::TestShaderResult result) {
+    *out_result = result;
+    event->Signal();
+  };
+  metal::TestShader(base::BindOnce(lambda, &event, &result),
+                    kTestShaderCompileTimeout);
+  event.Wait();
+  return result == metal::TestShaderResult::kSucceeded;
 }
 
 struct API_AVAILABLE(macos(10.11)) MetalContextProviderImpl
@@ -126,7 +90,7 @@
     // Compile a test shader, to see if the MTLCompilerService is responding
     // or not. If the compile times out, then don't try to use Metal.
     // https://crbug.com/974219
-    bool did_compile = CompileTestShader(device_to_use);
+    bool did_compile = CompileTestShader();
     UMA_HISTOGRAM_BOOLEAN("Gpu.Metal.TestShaderCompileSucceeded", did_compile);
     if (!did_compile) {
       DLOG(ERROR) << "Compiling test MTLLibrary timed out.";
diff --git a/components/viz/host/client_frame_sink_video_capturer.cc b/components/viz/host/client_frame_sink_video_capturer.cc
index 7e8ed72..e7336d5 100644
--- a/components/viz/host/client_frame_sink_video_capturer.cc
+++ b/components/viz/host/client_frame_sink_video_capturer.cc
@@ -267,12 +267,12 @@
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
   DCHECK(client_capturer_);
 
-  capturer->CreateOverlay(stacking_index_, mojo::MakeRequest(&overlay_));
-  // Note: There's no need to add a connection error handler on the
-  // InterfacePtr. If the connection to the service is lost, the
-  // ClientFrameSinkVideoCapturer will realize this when the
-  // FrameSinkVideoCapturer's binding is lost, and re-establish a connection to
-  // both that and this overlay.
+  capturer->CreateOverlay(stacking_index_,
+                          overlay_.BindNewPipeAndPassReceiver());
+  // Note: There's no need to add a connection error handler on the remote. If
+  // the connection to the service is lost, the ClientFrameSinkVideoCapturer
+  // will realize this when the FrameSinkVideoCapturer's binding is lost, and
+  // re-establish a connection to both that and this overlay.
 
   if (!image_.isNull())
     overlay_->SetImageAndBounds(image_, bounds_);
diff --git a/components/viz/host/client_frame_sink_video_capturer.h b/components/viz/host/client_frame_sink_video_capturer.h
index ec47c88..e318acdc 100644
--- a/components/viz/host/client_frame_sink_video_capturer.h
+++ b/components/viz/host/client_frame_sink_video_capturer.h
@@ -58,7 +58,7 @@
 
     base::WeakPtr<ClientFrameSinkVideoCapturer> client_capturer_;
     const int32_t stacking_index_;
-    mojom::FrameSinkVideoCaptureOverlayPtr overlay_;
+    mojo::Remote<mojom::FrameSinkVideoCaptureOverlay> overlay_;
 
     SkBitmap image_;
     gfx::RectF bounds_;
diff --git a/components/viz/service/frame_sinks/video_capture/video_capture_overlay_unittest.cc b/components/viz/service/frame_sinks/video_capture/video_capture_overlay_unittest.cc
index 82e9b594..d7f7abc1 100644
--- a/components/viz/service/frame_sinks/video_capture/video_capture_overlay_unittest.cc
+++ b/components/viz/service/frame_sinks/video_capture/video_capture_overlay_unittest.cc
@@ -129,16 +129,17 @@
   DISALLOW_COPY_AND_ASSIGN(VideoCaptureOverlayTest);
 };
 
-// Tests that, when the VideoCaptureOverlay binds to a mojo request, it reports
-// when the binding is closed.
+// Tests that, when the VideoCaptureOverlay binds to a mojo pending receiver, it
+// reports when the receiver is closed.
 TEST_F(VideoCaptureOverlayTest, ReportsLostMojoConnection) {
-  mojom::FrameSinkVideoCaptureOverlayPtr overlay_ptr;
-  VideoCaptureOverlay overlay(frame_source(), mojo::MakeRequest(&overlay_ptr));
-  ASSERT_TRUE(overlay_ptr);
+  mojo::Remote<mojom::FrameSinkVideoCaptureOverlay> overlay_remote;
+  VideoCaptureOverlay overlay(frame_source(),
+                              overlay_remote.BindNewPipeAndPassReceiver());
+  ASSERT_TRUE(overlay_remote);
   RunUntilIdle();  // Propagate mojo tasks.
 
   EXPECT_CALL(*frame_source(), OnOverlayConnectionLost(&overlay));
-  overlay_ptr.reset();
+  overlay_remote.reset();
   RunUntilIdle();  // Propagate mojo tasks.
 }
 
diff --git a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm b/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm
index 9743a05..a8e5c888 100644
--- a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm
+++ b/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm
@@ -17,9 +17,11 @@
 #include "content/common/render_widget_host_ns_view.mojom.h"
 #include "content/common/web_contents_ns_view_bridge.mojom.h"
 #include "content/public/browser/native_web_keyboard_event.h"
+#include "mojo/public/cpp/bindings/associated_receiver.h"
 #include "mojo/public/cpp/bindings/associated_remote.h"
+#include "mojo/public/cpp/bindings/pending_associated_receiver.h"
 #include "mojo/public/cpp/bindings/pending_associated_remote.h"
-#include "mojo/public/cpp/bindings/strong_associated_binding.h"
+#include "mojo/public/cpp/bindings/self_owned_associated_receiver.h"
 #include "ui/accelerated_widget_mac/window_resize_helper_mac.h"
 #include "ui/base/cocoa/remote_accessibility_api.h"
 #include "ui/events/cocoa/cocoa_event_utils.h"
@@ -153,17 +155,15 @@
     uint64_t view_id,
     mojo::ScopedInterfaceEndpointHandle host_handle,
     mojo::ScopedInterfaceEndpointHandle view_request_handle) {
-  mojom::WebContentsNSViewHostAssociatedPtr host(
-      mojo::AssociatedInterfacePtrInfo<mojom::WebContentsNSViewHost>(
-          std::move(host_handle), 0));
-  mojom::WebContentsNSViewAssociatedRequest ns_view_request(
+  mojo::PendingAssociatedRemote<mojom::WebContentsNSViewHost> host(
+      std::move(host_handle), 0);
+  mojo::PendingAssociatedReceiver<mojom::WebContentsNSView> ns_view_receiver(
       std::move(view_request_handle));
   // Note that the resulting object will be destroyed when its underlying pipe
   // is closed.
-  mojo::MakeStrongAssociatedBinding(
-      std::make_unique<WebContentsNSViewBridge>(
-          view_id, mojom::WebContentsNSViewHostAssociatedPtr(std::move(host))),
-      std::move(ns_view_request),
+  mojo::MakeSelfOwnedAssociatedReceiver(
+      std::make_unique<WebContentsNSViewBridge>(view_id, std::move(host)),
+      std::move(ns_view_receiver),
       ui::WindowResizeHelperMac::Get()->task_runner());
 }
 
diff --git a/content/app_shim_remote_cocoa/web_contents_ns_view_bridge.h b/content/app_shim_remote_cocoa/web_contents_ns_view_bridge.h
index 7f1d237..560cce0 100644
--- a/content/app_shim_remote_cocoa/web_contents_ns_view_bridge.h
+++ b/content/app_shim_remote_cocoa/web_contents_ns_view_bridge.h
@@ -14,6 +14,8 @@
 #include "components/remote_cocoa/app_shim/ns_view_ids.h"
 #include "content/common/content_export.h"
 #include "content/common/web_contents_ns_view_bridge.mojom.h"
+#include "mojo/public/cpp/bindings/associated_remote.h"
+#include "mojo/public/cpp/bindings/pending_associated_remote.h"
 
 @class WebContentsViewCocoa;
 
@@ -29,8 +31,9 @@
  public:
   // Create a bridge that will access its client in another process via a mojo
   // interface.
-  WebContentsNSViewBridge(uint64_t view_id,
-                          mojom::WebContentsNSViewHostAssociatedPtr client);
+  WebContentsNSViewBridge(
+      uint64_t view_id,
+      mojo::PendingAssociatedRemote<mojom::WebContentsNSViewHost> client);
   // Create a bridge that will access its client directly in-process.
   // TODO(ccameron): Change this to expose only the mojom::WebContentsNSView
   // when all communication is through mojo.
@@ -54,7 +57,7 @@
 
  private:
   base::scoped_nsobject<WebContentsViewCocoa> ns_view_;
-  mojom::WebContentsNSViewHostAssociatedPtr host_;
+  mojo::AssociatedRemote<mojom::WebContentsNSViewHost> host_;
 
   std::unique_ptr<ScopedNSViewIdMapping> view_id_;
 
diff --git a/content/app_shim_remote_cocoa/web_contents_ns_view_bridge.mm b/content/app_shim_remote_cocoa/web_contents_ns_view_bridge.mm
index be4f275..c77eaba 100644
--- a/content/app_shim_remote_cocoa/web_contents_ns_view_bridge.mm
+++ b/content/app_shim_remote_cocoa/web_contents_ns_view_bridge.mm
@@ -13,7 +13,7 @@
 
 WebContentsNSViewBridge::WebContentsNSViewBridge(
     uint64_t view_id,
-    mojom::WebContentsNSViewHostAssociatedPtr client)
+    mojo::PendingAssociatedRemote<mojom::WebContentsNSViewHost> client)
     : host_(std::move(client)) {
   ns_view_.reset(
       [[WebContentsViewCocoa alloc] initWithViewsHostableView:nullptr]);
diff --git a/content/browser/back_forward_cache_browsertest.cc b/content/browser/back_forward_cache_browsertest.cc
index 61e251a8..72b1e1a 100644
--- a/content/browser/back_forward_cache_browsertest.cc
+++ b/content/browser/back_forward_cache_browsertest.cc
@@ -110,10 +110,13 @@
         << location.ToString();
   }
 
-  void ExpectNotRestored(BackForwardCacheMetrics::NotRestoredReason reason,
-                         base::Location location) {
-    base::HistogramBase::Sample sample = base::HistogramBase::Sample(reason);
-    AddSampleToBuckets(&expected_not_restored_, sample);
+  void ExpectNotRestored(
+      std::vector<BackForwardCacheMetrics::NotRestoredReason> reasons,
+      base::Location location) {
+    for (BackForwardCacheMetrics::NotRestoredReason reason : reasons) {
+      base::HistogramBase::Sample sample = base::HistogramBase::Sample(reason);
+      AddSampleToBuckets(&expected_not_restored_, sample);
+    }
 
     EXPECT_EQ(expected_not_restored_,
               histogram_tester_.GetAllSamples(
@@ -584,7 +587,7 @@
   EXPECT_TRUE(WaitForLoadStop(shell()->web_contents()));
   ExpectOutcome(BackForwardCacheMetrics::HistoryNavigationOutcome::kNotRestored,
                 FROM_HERE);
-  ExpectNotRestored(BackForwardCacheMetrics::NotRestoredReason::kCacheLimit,
+  ExpectNotRestored({BackForwardCacheMetrics::NotRestoredReason::kCacheLimit},
                     FROM_HERE);
 }
 
@@ -1111,7 +1114,7 @@
   web_contents()->GetController().GoBack();
   EXPECT_TRUE(WaitForLoadStop(shell()->web_contents()));
   ExpectNotRestored(
-      BackForwardCacheMetrics::NotRestoredReason::kBlocklistedFeatures,
+      {BackForwardCacheMetrics::NotRestoredReason::kBlocklistedFeatures},
       FROM_HERE);
 }
 
@@ -1137,7 +1140,7 @@
   web_contents()->GetController().GoBack();
   EXPECT_TRUE(WaitForLoadStop(shell()->web_contents()));
   ExpectNotRestored(
-      BackForwardCacheMetrics::NotRestoredReason::kBlocklistedFeatures,
+      {BackForwardCacheMetrics::NotRestoredReason::kBlocklistedFeatures},
       FROM_HERE);
 }
 
@@ -1244,7 +1247,7 @@
   web_contents()->GetController().GoBack();
   EXPECT_TRUE(WaitForLoadStop(shell()->web_contents()));
   ExpectNotRestored(
-      BackForwardCacheMetrics::NotRestoredReason::kWasGrantedMediaAccess,
+      {BackForwardCacheMetrics::NotRestoredReason::kWasGrantedMediaAccess},
       FROM_HERE);
 }
 
@@ -1279,7 +1282,7 @@
   web_contents()->GetController().GoBack();
   EXPECT_TRUE(WaitForLoadStop(shell()->web_contents()));
   ExpectNotRestored(
-      BackForwardCacheMetrics::NotRestoredReason::kWasGrantedMediaAccess,
+      {BackForwardCacheMetrics::NotRestoredReason::kWasGrantedMediaAccess},
       FROM_HERE);
 }
 
@@ -1320,7 +1323,7 @@
   // 3) Go back.
   web_contents()->GetController().GoBack();
   EXPECT_FALSE(WaitForLoadStop(shell()->web_contents()));
-  ExpectNotRestored(BackForwardCacheMetrics::NotRestoredReason::kLoading,
+  ExpectNotRestored({BackForwardCacheMetrics::NotRestoredReason::kLoading},
                     FROM_HERE);
 }
 
@@ -1351,7 +1354,7 @@
   navigation_manager_back.WaitForNavigationFinished();
   // The recorded reason is 'blocklisted features: outstanding network request'.
   ExpectNotRestored(
-      BackForwardCacheMetrics::NotRestoredReason::kBlocklistedFeatures,
+      {BackForwardCacheMetrics::NotRestoredReason::kBlocklistedFeatures},
       FROM_HERE);
 }
 
@@ -1388,8 +1391,12 @@
   // 3) Go back.
   web_contents()->GetController().GoBack();
   EXPECT_TRUE(WaitForLoadStop(shell()->web_contents()));
-  ExpectNotRestored(BackForwardCacheMetrics::NotRestoredReason::kLoading,
-                    FROM_HERE);
+  ExpectNotRestored(
+      {
+          BackForwardCacheMetrics::NotRestoredReason::kLoading,
+          BackForwardCacheMetrics::NotRestoredReason::kSubframeIsNavigating,
+      },
+      FROM_HERE);
 }
 
 IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest,
@@ -1426,8 +1433,12 @@
   // 3) Go back.
   web_contents()->GetController().GoBack();
   EXPECT_TRUE(WaitForLoadStop(shell()->web_contents()));
-  ExpectNotRestored(BackForwardCacheMetrics::NotRestoredReason::kLoading,
-                    FROM_HERE);
+  ExpectNotRestored(
+      {
+          BackForwardCacheMetrics::NotRestoredReason::kLoading,
+          BackForwardCacheMetrics::NotRestoredReason::kSubframeIsNavigating,
+      },
+      FROM_HERE);
 }
 
 IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest, DoesNotCacheIfWebGL) {
@@ -1451,7 +1462,7 @@
   web_contents()->GetController().GoBack();
   EXPECT_TRUE(WaitForLoadStop(shell()->web_contents()));
   ExpectNotRestored(
-      BackForwardCacheMetrics::NotRestoredReason::kBlocklistedFeatures,
+      {BackForwardCacheMetrics::NotRestoredReason::kBlocklistedFeatures},
       FROM_HERE);
 }
 
@@ -1476,7 +1487,8 @@
   web_contents()->GetController().GoBack();
   EXPECT_TRUE(WaitForLoadStop(shell()->web_contents()));
   ExpectNotRestored(
-      BackForwardCacheMetrics::NotRestoredReason::kHTTPStatusNotOK, FROM_HERE);
+      {BackForwardCacheMetrics::NotRestoredReason::kHTTPStatusNotOK},
+      FROM_HERE);
 }
 
 IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest,
@@ -1516,7 +1528,8 @@
   web_contents()->GetController().GoBack();
   EXPECT_FALSE(WaitForLoadStop(shell()->web_contents()));
   ExpectNotRestored(
-      BackForwardCacheMetrics::NotRestoredReason::kHTTPStatusNotOK, FROM_HERE);
+      {BackForwardCacheMetrics::NotRestoredReason::kHTTPStatusNotOK},
+      FROM_HERE);
 }
 
 IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest,
@@ -1578,7 +1591,7 @@
   ExpectOutcome(BackForwardCacheMetrics::HistoryNavigationOutcome::kNotRestored,
                 FROM_HERE);
   ExpectNotRestored(
-      BackForwardCacheMetrics::NotRestoredReason::kJavaScriptExecution,
+      {BackForwardCacheMetrics::NotRestoredReason::kJavaScriptExecution},
       FROM_HERE);
 }
 
@@ -1625,7 +1638,7 @@
   ExpectOutcome(BackForwardCacheMetrics::HistoryNavigationOutcome::kNotRestored,
                 FROM_HERE);
   ExpectNotRestored(
-      BackForwardCacheMetrics::NotRestoredReason::kJavaScriptExecution,
+      {BackForwardCacheMetrics::NotRestoredReason::kJavaScriptExecution},
       FROM_HERE);
 }
 
@@ -1668,7 +1681,7 @@
   ExpectOutcome(BackForwardCacheMetrics::HistoryNavigationOutcome::kNotRestored,
                 FROM_HERE);
   ExpectNotRestored(
-      BackForwardCacheMetrics::NotRestoredReason::kJavaScriptExecution,
+      {BackForwardCacheMetrics::NotRestoredReason::kJavaScriptExecution},
       FROM_HERE);
 }
 
@@ -2025,7 +2038,7 @@
   ExpectOutcome(BackForwardCacheMetrics::HistoryNavigationOutcome::kNotRestored,
                 FROM_HERE);
   ExpectNotRestored(
-      BackForwardCacheMetrics::NotRestoredReason::kJavaScriptExecution,
+      {BackForwardCacheMetrics::NotRestoredReason::kJavaScriptExecution},
       FROM_HERE);
 }
 
@@ -2112,7 +2125,7 @@
   ExpectOutcome(BackForwardCacheMetrics::HistoryNavigationOutcome::kNotRestored,
                 FROM_HERE);
   ExpectNotRestored(
-      BackForwardCacheMetrics::NotRestoredReason::kRendererProcessKilled,
+      {BackForwardCacheMetrics::NotRestoredReason::kRendererProcessKilled},
       FROM_HERE);
 }
 
@@ -2346,7 +2359,7 @@
   web_contents()->GetController().GoBack();
   EXPECT_TRUE(WaitForLoadStop(shell()->web_contents()));
   ExpectNotRestored(
-      BackForwardCacheMetrics::NotRestoredReason::kBlocklistedFeatures,
+      {BackForwardCacheMetrics::NotRestoredReason::kBlocklistedFeatures},
       FROM_HERE);
 }
 
@@ -2550,6 +2563,24 @@
   EXPECT_TRUE(WaitForLoadStop(shell()->web_contents()));
   EXPECT_EQ(current_frame_host()->GetLastCommittedURL(), url_a1);
   delete_rfh_a2.WaitUntilDeleted();
+
+  ExpectOutcome(BackForwardCacheMetrics::HistoryNavigationOutcome::kNotRestored,
+                FROM_HERE);
+  // TODO(hajimehoshi): kConflictingBrowsingInstance should be recorded here.
+
+  // 5) Go back to B3.
+  web_contents()->GetController().GoToIndex(2);
+  EXPECT_TRUE(WaitForLoadStop(shell()->web_contents()));
+
+  ExpectOutcome(BackForwardCacheMetrics::HistoryNavigationOutcome::kNotRestored,
+                FROM_HERE);
+  ExpectDisabledWithReason("BackForwardCacheBrowserTest", FROM_HERE);
+  ExpectNotRestored(
+      {
+          BackForwardCacheMetrics::NotRestoredReason::
+              kDisableForRenderFrameHostCalled,
+      },
+      FROM_HERE);
 }
 
 IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest,
@@ -2798,7 +2829,7 @@
   // 7) Go back to A.
   web_contents()->GetController().GoBack();
   EXPECT_TRUE(WaitForLoadStop(shell()->web_contents()));
-  ExpectNotRestored(BackForwardCacheMetrics::NotRestoredReason::kTimeout,
+  ExpectNotRestored({BackForwardCacheMetrics::NotRestoredReason::kTimeout},
                     FROM_HERE);
 }
 
@@ -2826,8 +2857,8 @@
   web_contents()->GetController().GoBack();
   EXPECT_TRUE(WaitForLoadStop(shell()->web_contents()));
   ExpectDisabledWithReason("DisabledByBackForwardCacheBrowserTest", FROM_HERE);
-  ExpectNotRestored(BackForwardCacheMetrics::NotRestoredReason::
-                        kDisableForRenderFrameHostCalled,
+  ExpectNotRestored({BackForwardCacheMetrics::NotRestoredReason::
+                         kDisableForRenderFrameHostCalled},
                     FROM_HERE);
 }
 
@@ -2859,8 +2890,8 @@
   web_contents()->GetController().GoBack();
   EXPECT_TRUE(WaitForLoadStop(shell()->web_contents()));
   ExpectDisabledWithReason("DisabledByBackForwardCacheBrowserTest", FROM_HERE);
-  ExpectNotRestored(BackForwardCacheMetrics::NotRestoredReason::
-                        kDisableForRenderFrameHostCalled,
+  ExpectNotRestored({BackForwardCacheMetrics::NotRestoredReason::
+                         kDisableForRenderFrameHostCalled},
                     FROM_HERE);
 }
 
@@ -2889,8 +2920,8 @@
   // 3) Go back to A.
   web_contents()->GetController().GoBack();
   EXPECT_TRUE(WaitForLoadStop(shell()->web_contents()));
-  ExpectNotRestored(BackForwardCacheMetrics::NotRestoredReason::
-                        kDisableForRenderFrameHostCalled,
+  ExpectNotRestored({BackForwardCacheMetrics::NotRestoredReason::
+                         kDisableForRenderFrameHostCalled},
                     FROM_HERE);
 }
 
@@ -2924,7 +2955,9 @@
   web_contents()->GetController().GoBack();
   EXPECT_TRUE(WaitForLoadStop(shell()->web_contents()));
   ExpectDisabledWithReason("DisabledByBackForwardCacheBrowserTest", FROM_HERE);
-  ExpectNotRestoredIsEmpty(FROM_HERE);
+  ExpectNotRestored({BackForwardCacheMetrics::NotRestoredReason::
+                         kDisableForRenderFrameHostCalled},
+                    FROM_HERE);
 }
 
 // Confirm that same-document navigation and not history-navigation does not
diff --git a/content/browser/bad_message.cc b/content/browser/bad_message.cc
index 7d89732a..3c6dd492 100644
--- a/content/browser/bad_message.cc
+++ b/content/browser/bad_message.cc
@@ -76,12 +76,6 @@
   return crash_key;
 }
 
-base::debug::CrashKeyString* GetKilledProcessOriginLockKey() {
-  static auto* crash_key = base::debug::AllocateCrashKeyString(
-      "killed_process_origin_lock", base::debug::CrashKeySize::Size64);
-  return crash_key;
-}
-
 base::debug::CrashKeyString* GetRequestedSiteURLKey() {
   static auto* crash_key = base::debug::AllocateCrashKeyString(
       "requested_site_url", base::debug::CrashKeySize::Size64);
diff --git a/content/browser/bad_message.h b/content/browser/bad_message.h
index a34f5b1..131b6f6 100644
--- a/content/browser/bad_message.h
+++ b/content/browser/bad_message.h
@@ -274,8 +274,6 @@
 
 // Site isolation. These keys help debug renderer kills such as
 // https://crbug.com/773140.
-// Returns a key named "killed_process_origin_lock".
-base::debug::CrashKeyString* GetKilledProcessOriginLockKey();
 // Retuns a key named "requested_site_url".
 base::debug::CrashKeyString* GetRequestedSiteURLKey();
 
diff --git a/content/browser/blob_storage/blob_url_unittest.cc b/content/browser/blob_storage/blob_url_unittest.cc
index 1a98fa8b..6d68ba36 100644
--- a/content/browser/blob_storage/blob_url_unittest.cc
+++ b/content/browser/blob_storage/blob_url_unittest.cc
@@ -18,6 +18,7 @@
 #include "base/threading/thread_task_runner_handle.h"
 #include "base/time/time.h"
 #include "content/public/test/browser_task_environment.h"
+#include "mojo/public/cpp/bindings/remote.h"
 #include "mojo/public/cpp/system/data_pipe_utils.h"
 #include "net/base/net_errors.h"
 #include "net/base/request_priority.h"
@@ -201,8 +202,9 @@
     url_store.Register(std::move(blob_remote), url, loop.QuitClosure());
     loop.Run();
 
-    network::mojom::URLLoaderFactoryPtr url_loader_factory;
-    url_store.ResolveAsURLLoaderFactory(url, MakeRequest(&url_loader_factory));
+    mojo::Remote<network::mojom::URLLoaderFactory> url_loader_factory;
+    url_store.ResolveAsURLLoaderFactory(
+        url, url_loader_factory.BindNewPipeAndPassReceiver());
 
     network::mojom::URLLoaderPtr url_loader;
     network::TestURLLoaderClient url_loader_client;
diff --git a/content/browser/browser_interface_binders.cc b/content/browser/browser_interface_binders.cc
index ddce3f6..2867d24 100644
--- a/content/browser/browser_interface_binders.cc
+++ b/content/browser/browser_interface_binders.cc
@@ -205,9 +205,8 @@
       &ForwardServiceReceiver<device::mojom::VibrationManager>,
       device::mojom::kServiceName, base::Unretained(host)));
 
-  map->Add<payments::mojom::PaymentManager>(
-      base::BindRepeating(&RenderProcessHost::CreatePaymentManager,
-                          base::Unretained(host->GetProcess())));
+  map->Add<payments::mojom::PaymentManager>(base::BindRepeating(
+      &RenderFrameHostImpl::CreatePaymentManager, base::Unretained(host)));
 
   map->Add<blink::mojom::WebBluetoothService>(base::BindRepeating(
       &RenderFrameHostImpl::CreateWebBluetoothService, base::Unretained(host)));
diff --git a/content/browser/child_process_security_policy_impl.cc b/content/browser/child_process_security_policy_impl.cc
index 1975a79..6e1ebda 100644
--- a/content/browser/child_process_security_policy_impl.cc
+++ b/content/browser/child_process_security_policy_impl.cc
@@ -43,7 +43,7 @@
 #include "storage/browser/file_system/file_system_context.h"
 #include "storage/browser/file_system/file_system_url.h"
 #include "storage/browser/file_system/isolated_context.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "url/gurl.h"
 #include "url/url_canon.h"
 #include "url/url_constants.h"
@@ -130,17 +130,31 @@
   return requested_origin_key;
 }
 
+base::debug::CrashKeyString* GetKilledProcessOriginLockKey() {
+  static auto* crash_key = base::debug::AllocateCrashKeyString(
+      "killed_process_origin_lock", base::debug::CrashKeySize::Size64);
+  return crash_key;
+}
+
+base::debug::CrashKeyString* GetCanAccessDataFailureReasonKey() {
+  static auto* crash_key = base::debug::AllocateCrashKeyString(
+      "can_access_data_failure_reason", base::debug::CrashKeySize::Size64);
+  return crash_key;
+}
+
 void LogCanAccessDataForOriginCrashKeys(
     const std::string& expected_process_lock,
     const std::string& killed_process_origin_lock,
-    const std::string& requested_origin) {
+    const std::string& requested_origin,
+    const std::string& failure_reason) {
   base::debug::SetCrashKeyString(bad_message::GetRequestedSiteURLKey(),
                                  expected_process_lock);
-  base::debug::SetCrashKeyString(bad_message::GetKilledProcessOriginLockKey(),
+  base::debug::SetCrashKeyString(GetKilledProcessOriginLockKey(),
                                  killed_process_origin_lock);
-
-  auto* requested_origin_key = GetRequestedOriginCrashKey();
-  base::debug::SetCrashKeyString(requested_origin_key, requested_origin);
+  base::debug::SetCrashKeyString(GetRequestedOriginCrashKey(),
+                                 requested_origin);
+  base::debug::SetCrashKeyString(GetCanAccessDataFailureReasonKey(),
+                                 failure_reason);
 }
 
 }  // namespace
@@ -347,7 +361,7 @@
     }
   }
 
-  const GURL& origin_lock() { return origin_lock_; }
+  const GURL& origin_lock() const { return origin_lock_; }
 
   BrowsingInstanceId lowest_browsing_instance_id() {
     return lowest_browsing_instance_id_;
@@ -1310,15 +1324,10 @@
       if (security_state && security_state->origin_lock().is_empty())
         return true;
 
-      std::string killed_process_origin_lock;
-      if (!security_state) {
-        killed_process_origin_lock = "(child id not found)";
-      } else {
-        killed_process_origin_lock = security_state->origin_lock().spec();
-      }
-      LogCanAccessDataForOriginCrashKeys("(empty)" /* expected_process_lock */,
-                                         killed_process_origin_lock,
-                                         origin.GetDebugString());
+      LogCanAccessDataForOriginCrashKeys(
+          "(empty)" /* expected_process_lock */,
+          GetKilledProcessOriginLock(security_state), origin.GetDebugString(),
+          "opaque_origin_without_precursor_in_locked_process");
 
       return false;
     } else {
@@ -1351,7 +1360,13 @@
     browser_or_resource_context = security_state->GetBrowserOrResourceContext();
 
   GURL expected_process_lock;
-  if (security_state && browser_or_resource_context) {
+  std::string failure_reason;
+
+  if (!security_state) {
+    failure_reason = "no_security_state";
+  } else if (!browser_or_resource_context) {
+    failure_reason = "no_browser_or_resource_context";
+  } else {
     IsolationContext isolation_context(
         security_state->lowest_browsing_instance_id(),
         browser_or_resource_context);
@@ -1364,6 +1379,7 @@
       // from origins that require exactly the same lock.
       if (actual_process_lock == expected_process_lock)
         return true;
+      failure_reason = "lock_mismatch";
     } else {
       // Citadel-style enforcement - an unlocked process should not be able to
       // access data from origins that require a lock.
@@ -1406,25 +1422,16 @@
           SiteInstanceImpl::ShouldLockToOrigin(isolation_context, site_url);
       if (!should_lock_target)
         return true;
+      failure_reason = " citadel_enforcement";
 #endif
     }
   }
 
   // Returning false here will result in a renderer kill.  Set some crash
   // keys that will help understand the circumstances of that kill.
-  std::string killed_process_origin_lock;
-  if (!security_state) {
-    killed_process_origin_lock = "(child id not found)";
-  } else if (!browser_or_resource_context) {
-    killed_process_origin_lock = "(context is null)";
-  } else if (security_state->origin_lock().is_empty()) {
-    killed_process_origin_lock = "(no lock - citadel-enforcement)";
-  } else {
-    killed_process_origin_lock = security_state->origin_lock().spec();
-  }
   LogCanAccessDataForOriginCrashKeys(expected_process_lock.spec(),
-                                     killed_process_origin_lock,
-                                     url.GetOrigin().spec());
+                                     GetKilledProcessOriginLock(security_state),
+                                     url.GetOrigin().spec(), failure_reason);
   return false;
 }
 
@@ -1825,4 +1832,30 @@
   return patterns;
 }
 
+// static
+std::string ChildProcessSecurityPolicyImpl::GetKilledProcessOriginLock(
+    const SecurityState* security_state) {
+  std::string killed_process_origin_lock;
+  if (!security_state)
+    return "(child id not found)";
+
+  if (!security_state->GetBrowserOrResourceContext())
+    return "(context is null)";
+
+  if (security_state->origin_lock().is_empty())
+    return "(none)";
+
+  return security_state->origin_lock().spec();
+}
+
+void ChildProcessSecurityPolicyImpl::LogKilledProcessOriginLock(int child_id) {
+  base::AutoLock lock(lock_);
+  const auto itr = security_state_.find(child_id);
+  const SecurityState* security_state =
+      itr != security_state_.end() ? itr->second.get() : nullptr;
+
+  base::debug::SetCrashKeyString(GetKilledProcessOriginLockKey(),
+                                 GetKilledProcessOriginLock(security_state));
+}
+
 }  // namespace content
diff --git a/content/browser/child_process_security_policy_impl.h b/content/browser/child_process_security_policy_impl.h
index dedc4f1..73c7d42 100644
--- a/content/browser/child_process_security_policy_impl.h
+++ b/content/browser/child_process_security_policy_impl.h
@@ -25,7 +25,7 @@
 #include "content/browser/isolation_context.h"
 #include "content/public/browser/child_process_security_policy.h"
 #include "content/public/common/resource_type.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 #include "url/origin.h"
 
 class GURL;
@@ -328,6 +328,10 @@
   // implemented for the one caller doing Blob URL revocation.
   bool HasSecurityState(int child_id);
 
+  // Sets "killed_process_origin_lock" crash key with lock info for the
+  // process associated with |child_id|.
+  void LogKilledProcessOriginLock(int child_id);
+
  private:
   friend class ChildProcessSecurityPolicyInProcessBrowserTest;
   friend class ChildProcessSecurityPolicyTest;
@@ -498,6 +502,11 @@
                           IsolatedOriginSource source,
                           BrowserContext* browser_context = nullptr);
 
+  // Creates the value to place in the "killed_process_origin_lock" crash key
+  // based on the contents of |security_state|.
+  static std::string GetKilledProcessOriginLock(
+      const SecurityState* security_state);
+
   // You must acquire this lock before reading or writing any members of this
   // class, except for isolated_origins_ which uses its own lock.  You must not
   // block while holding this lock.
diff --git a/content/browser/child_process_security_policy_unittest.cc b/content/browser/child_process_security_policy_unittest.cc
index a35a277..ea2da10d44 100644
--- a/content/browser/child_process_security_policy_unittest.cc
+++ b/content/browser/child_process_security_policy_unittest.cc
@@ -27,7 +27,7 @@
 #include "storage/browser/file_system/file_permission_policy.h"
 #include "storage/browser/file_system/file_system_url.h"
 #include "storage/browser/file_system/isolated_context.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "url/gurl.h"
diff --git a/content/browser/devtools/devtools_instrumentation.cc b/content/browser/devtools/devtools_instrumentation.cc
index 4ed8ea4..69878fc8 100644
--- a/content/browser/devtools/devtools_instrumentation.cc
+++ b/content/browser/devtools/devtools_instrumentation.cc
@@ -19,6 +19,7 @@
 #include "content/browser/web_package/signed_exchange_envelope.h"
 #include "content/common/navigation_params.mojom.h"
 #include "content/public/browser/file_select_listener.h"
+#include "mojo/public/cpp/bindings/pending_remote.h"
 #include "mojo/public/cpp/bindings/self_owned_receiver.h"
 #include "net/base/load_flags.h"
 #include "net/http/http_request_headers.h"
@@ -380,15 +381,14 @@
     bool is_navigation,
     bool is_download,
     std::unique_ptr<network::mojom::URLLoaderFactory>* factory) {
-  // TODO(crbug.com/955171): Replace this with PendingRemote.
-  network::mojom::URLLoaderFactoryPtrInfo proxied_factory;
+  mojo::PendingRemote<network::mojom::URLLoaderFactory> proxied_factory;
   mojo::PendingReceiver<network::mojom::URLLoaderFactory> receiver =
-      mojo::MakeRequest(&proxied_factory);
+      proxied_factory.InitWithNewPipeAndPassReceiver();
   if (!WillCreateURLLoaderFactory(rfh, is_navigation, is_download, &receiver))
     return false;
   mojo::MakeSelfOwnedReceiver(std::move(*factory), std::move(receiver));
   *factory = std::make_unique<DevToolsURLLoaderFactoryAdapter>(
-      mojo::MakeProxy(std::move(proxied_factory)));
+      std::move(proxied_factory));
   return true;
 }
 
diff --git a/content/browser/devtools/devtools_instrumentation.h b/content/browser/devtools/devtools_instrumentation.h
index 0825bf7..f499e92 100644
--- a/content/browser/devtools/devtools_instrumentation.h
+++ b/content/browser/devtools/devtools_instrumentation.h
@@ -14,6 +14,7 @@
 #include "base/optional.h"
 #include "content/common/navigation_params.mojom.h"
 #include "content/public/browser/certificate_request_result_type.h"
+#include "mojo/public/cpp/bindings/pending_receiver.h"
 #include "services/network/public/mojom/network_service.mojom.h"
 #include "services/network/public/mojom/url_loader_factory.mojom.h"
 #include "third_party/blink/public/mojom/choosers/file_chooser.mojom.h"
diff --git a/content/browser/devtools/devtools_url_loader_interceptor.cc b/content/browser/devtools/devtools_url_loader_interceptor.cc
index 26cd6ad..55c71ff7 100644
--- a/content/browser/devtools/devtools_url_loader_interceptor.cc
+++ b/content/browser/devtools/devtools_url_loader_interceptor.cc
@@ -263,7 +263,7 @@
       bool is_download,
       network::mojom::URLLoaderRequest loader_request,
       network::mojom::URLLoaderClientPtr client,
-      network::mojom::URLLoaderFactoryPtr target_factory,
+      mojo::PendingRemote<network::mojom::URLLoaderFactory> target_factory,
       mojo::PendingRemote<network::mojom::CookieManager> cookie_manager);
 
   void GetResponseBody(std::unique_ptr<GetResponseBodyCallback> callback);
@@ -370,7 +370,7 @@
 
   network::mojom::URLLoaderClientPtr client_;
   network::mojom::URLLoaderPtr loader_;
-  network::mojom::URLLoaderFactoryPtr target_factory_;
+  mojo::Remote<network::mojom::URLLoaderFactory> target_factory_;
   mojo::Remote<network::mojom::CookieManager> cookie_manager_;
 
   enum State {
@@ -413,7 +413,7 @@
     std::unique_ptr<CreateLoaderParameters> create_params,
     network::mojom::URLLoaderRequest loader_request,
     network::mojom::URLLoaderClientPtr client,
-    network::mojom::URLLoaderFactoryPtr target_factory,
+    mojo::PendingRemote<network::mojom::URLLoaderFactory> target_factory,
     mojo::PendingRemote<network::mojom::CookieManager> cookie_manager) {
   DCHECK(!frame_token.is_empty());
 
@@ -447,7 +447,8 @@
       int32_t process_id,
       bool is_download,
       mojo::PendingReceiver<network::mojom::URLLoaderFactory> loader_receiver,
-      network::mojom::URLLoaderFactoryPtrInfo target_factory_info,
+      mojo::PendingRemote<network::mojom::URLLoaderFactory>
+          target_factory_remote,
       mojo::PendingRemote<network::mojom::CookieManager> cookie_manager,
       base::WeakPtr<DevToolsURLLoaderInterceptor> interceptor);
   ~DevToolsURLLoaderFactoryProxy() override;
@@ -472,7 +473,7 @@
   const int32_t process_id_;
   const bool is_download_;
 
-  network::mojom::URLLoaderFactoryPtr target_factory_;
+  mojo::Remote<network::mojom::URLLoaderFactory> target_factory_;
   mojo::Remote<network::mojom::CookieManager> cookie_manager_;
   base::WeakPtr<DevToolsURLLoaderInterceptor> interceptor_;
   mojo::ReceiverSet<network::mojom::URLLoaderFactory> receivers_;
@@ -487,15 +488,15 @@
     int32_t process_id,
     bool is_download,
     mojo::PendingReceiver<network::mojom::URLLoaderFactory> loader_receiver,
-    network::mojom::URLLoaderFactoryPtrInfo target_factory_info,
+    mojo::PendingRemote<network::mojom::URLLoaderFactory> target_factory_remote,
     mojo::PendingRemote<network::mojom::CookieManager> cookie_manager,
     base::WeakPtr<DevToolsURLLoaderInterceptor> interceptor)
     : frame_token_(frame_token),
       process_id_(process_id),
       is_download_(is_download),
+      target_factory_(std::move(target_factory_remote)),
       interceptor_(std::move(interceptor)) {
-  target_factory_.Bind(std::move(target_factory_info));
-  target_factory_.set_connection_error_handler(
+  target_factory_.set_disconnect_handler(
       base::BindOnce(&DevToolsURLLoaderFactoryProxy::OnTargetFactoryError,
                      base::Unretained(this)));
 
@@ -531,8 +532,8 @@
   }
   auto creation_params = std::make_unique<CreateLoaderParameters>(
       routing_id, request_id, options, request, traffic_annotation);
-  network::mojom::URLLoaderFactoryPtr factory_clone;
-  target_factory_->Clone(MakeRequest(&factory_clone));
+  mojo::PendingRemote<network::mojom::URLLoaderFactory> factory_clone;
+  target_factory_->Clone(factory_clone.InitWithNewPipeAndPassReceiver());
   mojo::PendingRemote<network::mojom::CookieManager> cookie_manager_clone;
   cookie_manager_->CloneInterface(
       cookie_manager_clone.InitWithNewPipeAndPassReceiver());
@@ -629,16 +630,15 @@
 
   mojo::PendingReceiver<network::mojom::URLLoaderFactory> original_receiver =
       std::move(*receiver);
-  // TODO(crbug.com/955171): Replace |target_ptr_info| with PendingRemote.
-  network::mojom::URLLoaderFactoryPtrInfo target_ptr_info;
-  *receiver = MakeRequest(&target_ptr_info);
+  mojo::PendingRemote<network::mojom::URLLoaderFactory> target_remote;
+  *receiver = target_remote.InitWithNewPipeAndPassReceiver();
   mojo::PendingRemote<network::mojom::CookieManager> cookie_manager;
   int process_id = is_navigation ? 0 : rph->GetID();
   rph->GetStoragePartition()->GetNetworkContext()->GetCookieManager(
       cookie_manager.InitWithNewPipeAndPassReceiver());
   new DevToolsURLLoaderFactoryProxy(
       frame_token, process_id, is_download, std::move(original_receiver),
-      std::move(target_ptr_info), std::move(cookie_manager),
+      std::move(target_remote), std::move(cookie_manager),
       weak_factory_.GetWeakPtr());
   return true;
 }
@@ -653,7 +653,7 @@
     bool is_download,
     network::mojom::URLLoaderRequest loader_request,
     network::mojom::URLLoaderClientPtr client,
-    network::mojom::URLLoaderFactoryPtr target_factory,
+    mojo::PendingRemote<network::mojom::URLLoaderFactory> target_factory,
     mojo::PendingRemote<network::mojom::CookieManager> cookie_manager)
     : id_prefix_(id),
       global_req_id_(
@@ -1399,7 +1399,7 @@
 }
 
 DevToolsURLLoaderFactoryAdapter::DevToolsURLLoaderFactoryAdapter(
-    network::mojom::URLLoaderFactoryPtr factory)
+    mojo::PendingRemote<network::mojom::URLLoaderFactory> factory)
     : factory_(std::move(factory)) {}
 
 DevToolsURLLoaderFactoryAdapter::~DevToolsURLLoaderFactoryAdapter() = default;
diff --git a/content/browser/devtools/devtools_url_loader_interceptor.h b/content/browser/devtools/devtools_url_loader_interceptor.h
index 6189168..3808653 100644
--- a/content/browser/devtools/devtools_url_loader_interceptor.h
+++ b/content/browser/devtools/devtools_url_loader_interceptor.h
@@ -13,6 +13,8 @@
 #include "content/browser/devtools/protocol/network.h"
 #include "content/public/common/resource_type.h"
 #include "mojo/public/cpp/bindings/pending_receiver.h"
+#include "mojo/public/cpp/bindings/pending_remote.h"
+#include "mojo/public/cpp/bindings/remote.h"
 #include "mojo/public/cpp/system/data_pipe.h"
 #include "net/base/auth.h"
 #include "net/base/net_errors.h"
@@ -203,7 +205,7 @@
       std::unique_ptr<CreateLoaderParameters> create_params,
       network::mojom::URLLoaderRequest loader_request,
       network::mojom::URLLoaderClientPtr client,
-      network::mojom::URLLoaderFactoryPtr target_factory,
+      mojo::PendingRemote<network::mojom::URLLoaderFactory> target_factory,
       mojo::PendingRemote<network::mojom::CookieManager> cookie_manager);
 
   InterceptionStage GetInterceptionStage(const GURL& url,
@@ -247,7 +249,7 @@
  public:
   DevToolsURLLoaderFactoryAdapter() = delete;
   explicit DevToolsURLLoaderFactoryAdapter(
-      network::mojom::URLLoaderFactoryPtr factory);
+      mojo::PendingRemote<network::mojom::URLLoaderFactory> factory);
   ~DevToolsURLLoaderFactoryAdapter() override;
 
  private:
@@ -263,7 +265,7 @@
   void Clone(mojo::PendingReceiver<network::mojom::URLLoaderFactory> receiver)
       override;
 
-  network::mojom::URLLoaderFactoryPtr factory_;
+  mojo::Remote<network::mojom::URLLoaderFactory> factory_;
 };
 
 inline DevToolsURLLoaderInterceptor::InterceptionStage& operator|=(
diff --git a/content/browser/download/download_manager_impl.cc b/content/browser/download/download_manager_impl.cc
index 7ca438f0..5d6968a 100644
--- a/content/browser/download/download_manager_impl.cc
+++ b/content/browser/download/download_manager_impl.cc
@@ -225,9 +225,7 @@
 CreateSharedURLLoaderFactoryInfo(StoragePartitionImpl* storage_partition,
                                  RenderFrameHost* rfh,
                                  bool is_download) {
-  // TODO(crbug.com/955171): Replace |proxy_factory_ptr_info| with
-  // PendingRemote.
-  network::mojom::URLLoaderFactoryPtrInfo proxy_factory_ptr_info;
+  mojo::PendingRemote<network::mojom::URLLoaderFactory> proxy_factory_remote;
   mojo::PendingReceiver<network::mojom::URLLoaderFactory>
       proxy_factory_receiver;
   if (rfh) {
@@ -235,10 +233,11 @@
 
     // Create an intermediate pipe that can be used to proxy the download's
     // URLLoaderFactory.
-    network::mojom::URLLoaderFactoryPtrInfo maybe_proxy_factory_ptr_info;
+    mojo::PendingRemote<network::mojom::URLLoaderFactory>
+        maybe_proxy_factory_remote;
     mojo::PendingReceiver<network::mojom::URLLoaderFactory>
         maybe_proxy_factory_receiver =
-            MakeRequest(&maybe_proxy_factory_ptr_info);
+            maybe_proxy_factory_remote.InitWithNewPipeAndPassReceiver();
 
     // Allow DevTools to potentially inject itself into the proxy pipe.
     should_proxy = devtools_instrumentation::WillCreateURLLoaderFactory(
@@ -256,14 +255,14 @@
     // If anyone above indicated that they care about proxying, pass the
     // intermediate pipe along to the NetworkDownloadURLLoaderFactoryInfo.
     if (should_proxy) {
-      proxy_factory_ptr_info = std::move(maybe_proxy_factory_ptr_info);
+      proxy_factory_remote = std::move(maybe_proxy_factory_remote);
       proxy_factory_receiver = std::move(maybe_proxy_factory_receiver);
     }
   }
 
   return std::make_unique<NetworkDownloadURLLoaderFactoryInfo>(
       storage_partition->url_loader_factory_getter(),
-      std::move(proxy_factory_ptr_info), std::move(proxy_factory_receiver));
+      std::move(proxy_factory_remote), std::move(proxy_factory_receiver));
 }
 
 std::unique_ptr<network::SharedURLLoaderFactoryInfo>
@@ -1223,10 +1222,12 @@
                 // even when there is high priority work to do.
                 base::TaskPriority::USER_VISIBLE));
   } else if (rfh && params->url().SchemeIs(content::kChromeUIScheme)) {
-    network::mojom::URLLoaderFactoryPtrInfo url_loader_factory_ptr_info;
-    mojo::MakeStrongBinding(CreateWebUIURLLoader(rfh, params->url().scheme(),
-                                                 base::flat_set<std::string>()),
-                            MakeRequest(&url_loader_factory_ptr_info));
+    mojo::PendingRemote<network::mojom::URLLoaderFactory>
+        url_loader_factory_remote;
+    mojo::MakeSelfOwnedReceiver(
+        CreateWebUIURLLoader(rfh, params->url().scheme(),
+                             base::flat_set<std::string>()),
+        url_loader_factory_remote.InitWithNewPipeAndPassReceiver());
     url_loader_factory_info =
         CreateSharedURLLoaderFactoryInfoFromURLLoaderFactory(
             CreateWebUIURLLoader(rfh, params->url().scheme(),
diff --git a/content/browser/download/network_download_url_loader_factory_info.cc b/content/browser/download/network_download_url_loader_factory_info.cc
index 9ef25ce4..8638cf4 100644
--- a/content/browser/download/network_download_url_loader_factory_info.cc
+++ b/content/browser/download/network_download_url_loader_factory_info.cc
@@ -13,11 +13,11 @@
 
 NetworkDownloadURLLoaderFactoryInfo::NetworkDownloadURLLoaderFactoryInfo(
     scoped_refptr<URLLoaderFactoryGetter> url_loader_factory_getter,
-    network::mojom::URLLoaderFactoryPtrInfo proxy_factory_ptr_info,
+    mojo::PendingRemote<network::mojom::URLLoaderFactory> proxy_factory_remote,
     mojo::PendingReceiver<network::mojom::URLLoaderFactory>
         proxy_factory_receiver)
     : url_loader_factory_getter_(url_loader_factory_getter),
-      proxy_factory_ptr_info_(std::move(proxy_factory_ptr_info)),
+      proxy_factory_remote_(std::move(proxy_factory_remote)),
       proxy_factory_receiver_(std::move(proxy_factory_receiver)) {}
 
 NetworkDownloadURLLoaderFactoryInfo::~NetworkDownloadURLLoaderFactoryInfo() =
@@ -34,7 +34,7 @@
         std::move(proxy_factory_receiver_));
     lazy_factory_ =
         base::MakeRefCounted<network::WrapperSharedURLLoaderFactory>(
-            std::move(proxy_factory_ptr_info_));
+            std::move(proxy_factory_remote_));
   } else {
     lazy_factory_ = url_loader_factory_getter_->GetNetworkFactory();
   }
diff --git a/content/browser/download/network_download_url_loader_factory_info.h b/content/browser/download/network_download_url_loader_factory_info.h
index 6e54158..2675828 100644
--- a/content/browser/download/network_download_url_loader_factory_info.h
+++ b/content/browser/download/network_download_url_loader_factory_info.h
@@ -6,6 +6,7 @@
 #define CONTENT_BROWSER_DOWNLOAD_NETWORK_DOWNLOAD_URL_LOADER_FACTORY_INFO_H_
 
 #include "mojo/public/cpp/bindings/pending_receiver.h"
+#include "mojo/public/cpp/bindings/pending_remote.h"
 #include "services/network/public/cpp/shared_url_loader_factory.h"
 #include "services/network/public/mojom/url_loader_factory.mojom.h"
 
@@ -20,7 +21,8 @@
  public:
   NetworkDownloadURLLoaderFactoryInfo(
       scoped_refptr<URLLoaderFactoryGetter> url_loader_factory_getter,
-      network::mojom::URLLoaderFactoryPtrInfo proxy_factory_ptr_info,
+      mojo::PendingRemote<network::mojom::URLLoaderFactory>
+          proxy_factory_remote,
       mojo::PendingReceiver<network::mojom::URLLoaderFactory>
           proxy_factory_receiver);
   ~NetworkDownloadURLLoaderFactoryInfo() override;
@@ -32,7 +34,7 @@
  private:
   scoped_refptr<URLLoaderFactoryGetter> url_loader_factory_getter_;
   scoped_refptr<network::SharedURLLoaderFactory> lazy_factory_;
-  network::mojom::URLLoaderFactoryPtrInfo proxy_factory_ptr_info_;
+  mojo::PendingRemote<network::mojom::URLLoaderFactory> proxy_factory_remote_;
   mojo::PendingReceiver<network::mojom::URLLoaderFactory>
       proxy_factory_receiver_;
 
diff --git a/content/browser/fileapi/browser_file_system_helper_unittest.cc b/content/browser/fileapi/browser_file_system_helper_unittest.cc
index 14d98bc2..5ac42c9 100644
--- a/content/browser/fileapi/browser_file_system_helper_unittest.cc
+++ b/content/browser/fileapi/browser_file_system_helper_unittest.cc
@@ -21,7 +21,7 @@
 #include "storage/browser/file_system/file_system_options.h"
 #include "storage/browser/file_system/file_system_url.h"
 #include "storage/browser/file_system/isolated_context.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "url/gurl.h"
 #include "url/origin.h"
diff --git a/content/browser/fileapi/file_system_manager_impl.cc b/content/browser/fileapi/file_system_manager_impl.cc
index 7989f71..ea4e909e 100644
--- a/content/browser/fileapi/file_system_manager_impl.cc
+++ b/content/browser/fileapi/file_system_manager_impl.cc
@@ -33,9 +33,9 @@
 #include "storage/browser/file_system/file_permission_policy.h"
 #include "storage/browser/file_system/file_system_context.h"
 #include "storage/browser/file_system/isolated_context.h"
-#include "storage/common/fileapi/file_system_info.h"
-#include "storage/common/fileapi/file_system_types.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_info.h"
+#include "storage/common/file_system/file_system_types.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "third_party/blink/public/common/features.h"
 #include "url/gurl.h"
 
diff --git a/content/browser/fileapi/file_system_manager_impl.h b/content/browser/fileapi/file_system_manager_impl.h
index 60ad4c0c..e8b9fb660 100644
--- a/content/browser/fileapi/file_system_manager_impl.h
+++ b/content/browser/fileapi/file_system_manager_impl.h
@@ -27,7 +27,7 @@
 #include "mojo/public/cpp/bindings/unique_receiver_set.h"
 #include "storage/browser/file_system/file_system_context.h"
 #include "storage/browser/file_system/file_system_operation_runner.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 #include "third_party/blink/public/mojom/filesystem/file_system.mojom.h"
 
 class GURL;
diff --git a/content/browser/fileapi/file_system_url_loader_factory.cc b/content/browser/fileapi/file_system_url_loader_factory.cc
index 0b52ec4cc..cee91d78 100644
--- a/content/browser/fileapi/file_system_url_loader_factory.cc
+++ b/content/browser/fileapi/file_system_url_loader_factory.cc
@@ -28,6 +28,7 @@
 #include "content/public/common/child_process_host.h"
 #include "mojo/public/cpp/bindings/binding.h"
 #include "mojo/public/cpp/bindings/pending_receiver.h"
+#include "mojo/public/cpp/bindings/pending_remote.h"
 #include "mojo/public/cpp/bindings/receiver_set.h"
 #include "mojo/public/cpp/system/data_pipe_producer.h"
 #include "mojo/public/cpp/system/string_data_source.h"
@@ -44,7 +45,7 @@
 #include "storage/browser/file_system/file_system_context.h"
 #include "storage/browser/file_system/file_system_operation_runner.h"
 #include "storage/browser/file_system/file_system_url.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 
 using filesystem::mojom::DirectoryEntry;
 using storage::FileStreamReader;
@@ -602,12 +603,6 @@
 
   ~FileSystemURLLoaderFactory() override = default;
 
-  network::mojom::URLLoaderFactoryPtr CreateBinding() {
-    network::mojom::URLLoaderFactoryPtr factory;
-    receivers_.Add(this, mojo::MakeRequest(&factory));
-    return factory;
-  }
-
  private:
   void CreateLoaderAndStart(network::mojom::URLLoaderRequest loader,
                             int32_t routing_id,
diff --git a/content/browser/frame_host/back_forward_cache_impl.cc b/content/browser/frame_host/back_forward_cache_impl.cc
index 2e239ca..573204a 100644
--- a/content/browser/frame_host/back_forward_cache_impl.cc
+++ b/content/browser/frame_host/back_forward_cache_impl.cc
@@ -182,93 +182,100 @@
       render_view_hosts(std::move(render_view_hosts)) {}
 BackForwardCacheImpl::Entry::~Entry() {}
 
-std::string BackForwardCacheImpl::CanStoreDocumentResult::ToString() {
+bool BackForwardCacheImpl::CanStoreDocumentResult::CanStore() const {
+  return not_stored_reasons.none();
+}
+
+std::string BackForwardCacheImpl::CanStoreDocumentResult::ToString() const {
   using Reason = BackForwardCacheMetrics::NotRestoredReason;
 
-  if (can_store)
+  if (CanStore())
     return "Yes";
 
-  switch (reason.value()) {
+  std::vector<std::string> reason_strs;
+
+  for (int i = 0; i <= static_cast<int>(Reason::kMaxValue); i++) {
+    if (!not_stored_reasons.test(static_cast<size_t>(i)))
+      continue;
+
+    reason_strs.push_back(NotRestoredReasonToString(static_cast<Reason>(i)));
+  }
+
+  return "No: " + base::JoinString(reason_strs, ", ");
+}
+
+std::string
+BackForwardCacheImpl::CanStoreDocumentResult::NotRestoredReasonToString(
+    BackForwardCacheMetrics::NotRestoredReason reason) const {
+  using Reason = BackForwardCacheMetrics::NotRestoredReason;
+
+  switch (reason) {
     case Reason::kNotMainFrame:
-      return "No: not a main frame";
+      return "not a main frame";
     case Reason::kBackForwardCacheDisabled:
-      return "No: BackForwardCache disabled";
+      return "BackForwardCache disabled";
     case Reason::kRelatedActiveContentsExist:
-      return "No: related active contents exist";
+      return "related active contents exist";
     case Reason::kHTTPStatusNotOK:
-      return "No: HTTP status is not OK";
+      return "HTTP status is not OK";
     case Reason::kSchemeNotHTTPOrHTTPS:
-      return "No: scheme is not HTTP or HTTPS";
+      return "scheme is not HTTP or HTTPS";
     case Reason::kLoading:
-      return "No: frame is not fully loaded";
+      return "frame is not fully loaded";
     case Reason::kWasGrantedMediaAccess:
-      return "No: frame was granted microphone or camera access";
+      return "frame was granted microphone or camera access";
     case Reason::kBlocklistedFeatures:
-      return "No: blocklisted features: " +
-             DescribeFeatures(blocklisted_features);
+      return "blocklisted features: " + DescribeFeatures(blocklisted_features);
     case Reason::kDisableForRenderFrameHostCalled:
-      return "No: BackForwardCache::DisableForRenderFrameHost() was called";
+      return "BackForwardCache::DisableForRenderFrameHost() was called";
     case Reason::kDomainNotAllowed:
-      return "No: This domain is not allowed to be stored in BackForwardCache";
+      return "This domain is not allowed to be stored in BackForwardCache";
     case Reason::kHTTPMethodNotGET:
-      return "No: HTTP method is not GET";
+      return "HTTP method is not GET";
     case Reason::kSubframeIsNavigating:
-      return "No: subframe navigation is in progress";
+      return "subframe navigation is in progress";
     case Reason::kTimeout:
-      return "No: timeout";
+      return "timeout";
     case Reason::kCacheLimit:
-      return "No: cache limit";
+      return "cache limit";
     case Reason::kJavaScriptExecution:
-      return "No: JavaScript execution";
+      return "JavaScript execution";
     case Reason::kRendererProcessKilled:
-      return "No: renderer process is killed";
+      return "renderer process is killed";
     case Reason::kRendererProcessCrashed:
-      return "No: renderer process crashed";
+      return "renderer process crashed";
     case Reason::kDialog:
-      return "No: dialog";
+      return "dialog";
     case Reason::kGrantedMediaStreamAccess:
-      return "No: granted media stream access";
+      return "granted media stream access";
     case Reason::kSchedulerTrackedFeatureUsed:
-      return "No: scheduler tracked feature is used";
+      return "scheduler tracked feature is used";
     case Reason::kConflictingBrowsingInstance:
-      return "No: conflicting BrowsingInstance";
+      return "conflicting BrowsingInstance";
     case Reason::kCacheFlushed:
-      return "No: cache flushed";
+      return "cache flushed";
   }
 }
 
+void BackForwardCacheImpl::CanStoreDocumentResult::No(
+    BackForwardCacheMetrics::NotRestoredReason reason) {
+  not_stored_reasons.set(static_cast<size_t>(reason));
+}
+
+void BackForwardCacheImpl::CanStoreDocumentResult::NoDueToFeatures(
+    uint64_t features) {
+  not_stored_reasons.set(static_cast<size_t>(
+      BackForwardCacheMetrics::NotRestoredReason::kBlocklistedFeatures));
+  blocklisted_features |= features;
+}
+
+BackForwardCacheImpl::CanStoreDocumentResult::CanStoreDocumentResult() =
+    default;
 BackForwardCacheImpl::CanStoreDocumentResult::CanStoreDocumentResult(
     const CanStoreDocumentResult&) = default;
 BackForwardCacheImpl::CanStoreDocumentResult::~CanStoreDocumentResult() =
     default;
 
-BackForwardCacheImpl::CanStoreDocumentResult
-BackForwardCacheImpl::CanStoreDocumentResult::Yes() {
-  return CanStoreDocumentResult(true, base::nullopt, 0);
-}
-
-BackForwardCacheImpl::CanStoreDocumentResult
-BackForwardCacheImpl::CanStoreDocumentResult::No(
-    BackForwardCacheMetrics::NotRestoredReason reason) {
-  return CanStoreDocumentResult(false, reason, 0);
-}
-
-BackForwardCacheImpl::CanStoreDocumentResult
-BackForwardCacheImpl::CanStoreDocumentResult::NoDueToFeatures(
-    uint64_t blocklisted_features) {
-  return CanStoreDocumentResult(
-      false, BackForwardCacheMetrics::NotRestoredReason::kBlocklistedFeatures,
-      blocklisted_features);
-}
-
-BackForwardCacheImpl::CanStoreDocumentResult::CanStoreDocumentResult(
-    bool can_store,
-    base::Optional<BackForwardCacheMetrics::NotRestoredReason> reason,
-    uint64_t blocklisted_features)
-    : can_store(can_store),
-      reason(reason),
-      blocklisted_features(blocklisted_features) {}
-
 BackForwardCacheTestDelegate::BackForwardCacheTestDelegate() {
   DCHECK(!g_bfcache_disabled_test_observer);
   g_bfcache_disabled_test_observer = this;
@@ -302,14 +309,14 @@
 
 BackForwardCacheImpl::CanStoreDocumentResult
 BackForwardCacheImpl::CanStoreDocument(RenderFrameHostImpl* rfh) {
+  CanStoreDocumentResult result;
+
   // Use the BackForwardCache only for the main frame.
-  if (rfh->GetParent()) {
-    return CanStoreDocumentResult::No(
-        BackForwardCacheMetrics::NotRestoredReason::kNotMainFrame);
-  }
+  if (rfh->GetParent())
+    result.No(BackForwardCacheMetrics::NotRestoredReason::kNotMainFrame);
 
   if (!IsBackForwardCacheEnabled() || is_disabled_for_testing_) {
-    return CanStoreDocumentResult::No(
+    result.No(
         BackForwardCacheMetrics::NotRestoredReason::kBackForwardCacheDisabled);
   }
 
@@ -323,61 +330,54 @@
   // This check makes sure the old and new document aren't sharing the same
   // BrowsingInstance.
   if (rfh->GetSiteInstance()->GetRelatedActiveContentsCount() != 0) {
-    return CanStoreDocumentResult::No(
-        BackForwardCacheMetrics::NotRestoredReason::
-            kRelatedActiveContentsExist);
+    result.No(BackForwardCacheMetrics::NotRestoredReason::
+                  kRelatedActiveContentsExist);
   }
 
   // Only store documents that have successful http status code.
   // Note that for error pages, |last_http_status_code| is equal to 0.
-  if (rfh->last_http_status_code() != net::HTTP_OK) {
-    return CanStoreDocumentResult::No(
-        BackForwardCacheMetrics::NotRestoredReason::kHTTPStatusNotOK);
-  }
+  if (rfh->last_http_status_code() != net::HTTP_OK)
+    result.No(BackForwardCacheMetrics::NotRestoredReason::kHTTPStatusNotOK);
 
   // Only store documents that were fetched via HTTP GET method.
-  if (rfh->last_http_method() != net::HttpRequestHeaders::kGetMethod) {
-    return CanStoreDocumentResult::No(
-        BackForwardCacheMetrics::NotRestoredReason::kHTTPMethodNotGET);
-  }
+  if (rfh->last_http_method() != net::HttpRequestHeaders::kGetMethod)
+    result.No(BackForwardCacheMetrics::NotRestoredReason::kHTTPMethodNotGET);
 
   // Do not store main document with non HTTP/HTTPS URL scheme. In particular,
   // this excludes the new tab page.
   if (!rfh->GetLastCommittedURL().SchemeIsHTTPOrHTTPS()) {
-    return CanStoreDocumentResult::No(
+    result.No(
         BackForwardCacheMetrics::NotRestoredReason::kSchemeNotHTTPOrHTTPS);
   }
 
   // Only store documents that have URLs allowed through experiment.
-  if (!IsAllowed(rfh->GetLastCommittedURL())) {
-    return CanStoreDocumentResult::No(
-        BackForwardCacheMetrics::NotRestoredReason::kDomainNotAllowed);
-  }
+  if (!IsAllowed(rfh->GetLastCommittedURL()))
+    result.No(BackForwardCacheMetrics::NotRestoredReason::kDomainNotAllowed);
 
-  return CanStoreRenderFrameHost(rfh);
+  CanStoreRenderFrameHost(&result, rfh);
+
+  return result;
 }
 
 // Recursively checks whether this RenderFrameHost and all child frames
 // can be cached.
-BackForwardCacheImpl::CanStoreDocumentResult
-BackForwardCacheImpl::CanStoreRenderFrameHost(RenderFrameHostImpl* rfh) {
-  if (!rfh->dom_content_loaded()) {
-    return CanStoreDocumentResult::No(
-        BackForwardCacheMetrics::NotRestoredReason::kLoading);
-  }
+void BackForwardCacheImpl::CanStoreRenderFrameHost(
+    CanStoreDocumentResult* result,
+    RenderFrameHostImpl* rfh) {
+  if (!rfh->dom_content_loaded())
+    result->No(BackForwardCacheMetrics::NotRestoredReason::kLoading);
 
   // If the rfh has ever granted media access, prevent it from entering cache.
   // TODO(crbug.com/989379): Consider only blocking when there's an active
   //                         media stream.
   if (rfh->was_granted_media_access()) {
-    return CanStoreDocumentResult::No(
+    result->No(
         BackForwardCacheMetrics::NotRestoredReason::kWasGrantedMediaAccess);
   }
 
   if (rfh->is_back_forward_cache_disabled()) {
-    return CanStoreDocumentResult::No(
-        BackForwardCacheMetrics::NotRestoredReason::
-            kDisableForRenderFrameHostCalled);
+    result->No(BackForwardCacheMetrics::NotRestoredReason::
+                   kDisableForRenderFrameHostCalled);
   }
 
   // Don't cache the page if it uses any disallowed features.
@@ -386,25 +386,19 @@
   // from children.
   if (uint64_t banned_features =
           GetDisallowedFeatures(rfh) & rfh->scheduler_tracked_features()) {
-    return CanStoreDocumentResult::NoDueToFeatures(banned_features);
+    result->NoDueToFeatures(banned_features);
   }
 
   bool has_navigation_request = rfh->frame_tree_node()->navigation_request() ||
                                 rfh->HasPendingCommitNavigation();
   // Do not cache if we have navigations in any of the subframes.
   if (rfh->GetParent() && has_navigation_request) {
-    return CanStoreDocumentResult::No(
+    result->No(
         BackForwardCacheMetrics::NotRestoredReason::kSubframeIsNavigating);
   }
 
-  for (size_t i = 0; i < rfh->child_count(); i++) {
-    CanStoreDocumentResult can_store_child =
-        CanStoreRenderFrameHost(rfh->child_at(i)->current_frame_host());
-    if (!can_store_child.can_store)
-      return can_store_child;
-  }
-
-  return CanStoreDocumentResult::Yes();
+  for (size_t i = 0; i < rfh->child_count(); i++)
+    CanStoreRenderFrameHost(result, rfh->child_at(i)->current_frame_host());
 }
 
 void BackForwardCacheImpl::StoreEntry(
@@ -487,10 +481,11 @@
     SiteInstance* site_instance) {
   for (std::unique_ptr<Entry>& entry : entries_) {
     if (entry->render_frame_host->GetSiteInstance()->IsRelatedSiteInstance(
-            site_instance))
+            site_instance)) {
       entry->render_frame_host->EvictFromBackForwardCacheWithReason(
           BackForwardCacheMetrics::NotRestoredReason::
               kConflictingBrowsingInstance);
+    }
   }
 }
 
diff --git a/content/browser/frame_host/back_forward_cache_impl.h b/content/browser/frame_host/back_forward_cache_impl.h
index 641298fc..d589f6c4 100644
--- a/content/browser/frame_host/back_forward_cache_impl.h
+++ b/content/browser/frame_host/back_forward_cache_impl.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_BROWSER_FRAME_HOST_BACK_FORWARD_CACHE_IMPL_H_
 #define CONTENT_BROWSER_FRAME_HOST_BACK_FORWARD_CACHE_IMPL_H_
 
+#include <bitset>
 #include <list>
 #include <memory>
 #include <unordered_map>
@@ -74,28 +75,30 @@
   ~BackForwardCacheImpl();
 
   struct CanStoreDocumentResult {
+    using NotStoredReasons =
+        std::bitset<static_cast<size_t>(
+                        BackForwardCacheMetrics::NotRestoredReason::kMaxValue) +
+                    1ul>;
+
+    CanStoreDocumentResult();
     CanStoreDocumentResult(const CanStoreDocumentResult&);
     ~CanStoreDocumentResult();
 
-    bool can_store;
-    // TODO(hajimehoshi): Accept multiple reasons.
-    base::Optional<BackForwardCacheMetrics::NotRestoredReason> reason;
-    uint64_t blocklisted_features;
+    NotStoredReasons not_stored_reasons;
+    uint64_t blocklisted_features = 0;
 
-    static CanStoreDocumentResult Yes();
-    static CanStoreDocumentResult No(
-        BackForwardCacheMetrics::NotRestoredReason reason);
-    static CanStoreDocumentResult NoDueToFeatures(uint64_t features);
+    bool CanStore() const;
 
-    std::string ToString();
+    std::string ToString() const;
 
-    operator bool() const { return can_store; }
+    void No(BackForwardCacheMetrics::NotRestoredReason reason);
+    void NoDueToFeatures(uint64_t features);
+
+    operator bool() const { return CanStore(); }
 
    private:
-    CanStoreDocumentResult(
-        bool can_store,
-        base::Optional<BackForwardCacheMetrics::NotRestoredReason> reason,
-        uint64_t blocklisted_features);
+    std::string NotRestoredReasonToString(
+        BackForwardCacheMetrics::NotRestoredReason reason) const;
   };
 
   // Returns whether a RenderFrameHost can be stored into the
@@ -182,8 +185,8 @@
   void DestroyEvictedFrames();
 
   // Helper for recursively checking each child.
-  CanStoreDocumentResult CanStoreRenderFrameHost(
-      RenderFrameHostImpl* render_frame_host);
+  void CanStoreRenderFrameHost(CanStoreDocumentResult* result,
+                               RenderFrameHostImpl* render_frame_host);
 
   // Contains the set of stored Entries.
   // Invariant:
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index f4e5fe27..42091932 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -1251,8 +1251,11 @@
 
 void RenderFrameHostImpl::DisableBackForwardCache() {
   is_back_forward_cache_disabled_ = true;
-  if (is_in_back_forward_cache())
-    EvictFromBackForwardCacheWithReason(base::nullopt);
+  if (is_in_back_forward_cache()) {
+    EvictFromBackForwardCacheWithReason(
+        BackForwardCacheMetrics::NotRestoredReason::
+            kDisableForRenderFrameHostCalled);
+  }
 }
 
 void RenderFrameHostImpl::OnGrantedMediaStreamAccess() {
@@ -1441,10 +1444,11 @@
     const base::flat_set<url::Origin>& isolated_world_origins) {
   blink::URLLoaderFactoryBundleInfo::OriginMap result;
   for (const url::Origin& initiator : isolated_world_origins) {
-    network::mojom::URLLoaderFactoryPtrInfo factory_info;
+    mojo::PendingRemote<network::mojom::URLLoaderFactory> factory_remote;
     CreateNetworkServiceDefaultFactoryAndObserve(
-        initiator, network_isolation_key_, mojo::MakeRequest(&factory_info));
-    result[initiator] = std::move(factory_info);
+        initiator, network_isolation_key_,
+        factory_remote.InitWithNewPipeAndPassReceiver());
+    result[initiator] = std::move(factory_remote);
   }
   return result;
 }
@@ -3233,8 +3237,8 @@
 }
 
 void RenderFrameHostImpl::FlushNetworkAndNavigationInterfacesForTesting() {
-  DCHECK(network_service_connection_error_handler_holder_);
-  network_service_connection_error_handler_holder_.FlushForTesting();
+  DCHECK(network_service_disconnect_handler_holder_);
+  network_service_disconnect_handler_holder_.FlushForTesting();
 
   if (!navigation_control_)
     GetNavigationControl();
@@ -3254,20 +3258,20 @@
   if (!has_committed_any_navigation_)
     return;
   DCHECK(!IsOutOfProcessNetworkService() ||
-         network_service_connection_error_handler_holder_.is_bound());
+         network_service_disconnect_handler_holder_.is_bound());
 
-  network::mojom::URLLoaderFactoryPtrInfo default_factory_info;
+  mojo::PendingRemote<network::mojom::URLLoaderFactory> default_factory_remote;
   bool bypass_redirect_checks = false;
   if (recreate_default_url_loader_factory_after_network_service_crash_) {
     bypass_redirect_checks = CreateNetworkServiceDefaultFactoryAndObserve(
         last_committed_origin_, network_isolation_key_,
-        mojo::MakeRequest(&default_factory_info));
+        default_factory_remote.InitWithNewPipeAndPassReceiver());
   }
 
   std::unique_ptr<blink::URLLoaderFactoryBundleInfo>
       subresource_loader_factories =
           std::make_unique<blink::URLLoaderFactoryBundleInfo>(
-              std::move(default_factory_info),
+              std::move(default_factory_remote),
               blink::URLLoaderFactoryBundleInfo::SchemeMap(),
               CreateURLLoaderFactoriesForIsolatedWorlds(
                   isolated_worlds_requiring_separate_url_loader_factory_),
@@ -3700,7 +3704,7 @@
 }
 
 void RenderFrameHostImpl::EvictFromBackForwardCacheWithReason(
-    base::Optional<BackForwardCacheMetrics::NotRestoredReason> reason) {
+    BackForwardCacheMetrics::NotRestoredReason reason) {
   DCHECK(IsBackForwardCacheEnabled());
 
   if (is_evicted_from_back_forward_cache_)
@@ -3717,8 +3721,8 @@
   // TODO(hajimehoshi): Record the 'race condition' by JavaScript execution when
   // |is_in_back_forward_cache()| is false.
   BackForwardCacheMetrics* metrics = top_document->GetBackForwardCacheMetrics();
-  if (is_in_back_forward_cache() && reason && metrics)
-    metrics->MarkNotRestoredWithReason(reason.value());
+  if (is_in_back_forward_cache() && metrics)
+    metrics->MarkNotRestoredWithReason(reason);
 
   if (!in_back_forward_cache) {
     BackForwardCacheMetrics::RecordEvictedAfterDocumentRestored(
@@ -5687,13 +5691,13 @@
 
   std::unique_ptr<blink::URLLoaderFactoryBundleInfo>
       subresource_loader_factories;
-  // TODO(domfarolino, crbug.com/955171): Replace this with Remote.
-  network::mojom::URLLoaderFactoryPtrInfo default_factory_info;
+  mojo::PendingRemote<network::mojom::URLLoaderFactory> default_factory_remote;
   bool bypass_redirect_checks = CreateNetworkServiceDefaultFactoryAndObserve(
-      origin, network_isolation_key_, mojo::MakeRequest(&default_factory_info));
+      origin, network_isolation_key_,
+      default_factory_remote.InitWithNewPipeAndPassReceiver());
   subresource_loader_factories =
       std::make_unique<blink::URLLoaderFactoryBundleInfo>(
-          std::move(default_factory_info),
+          std::move(default_factory_remote),
           blink::URLLoaderFactoryBundleInfo::SchemeMap(),
           blink::URLLoaderFactoryBundleInfo::OriginMap(),
           bypass_redirect_checks);
@@ -6189,23 +6193,23 @@
   bool bypass_redirect_checks = CreateNetworkServiceDefaultFactoryInternal(
       origin, network_isolation_key, std::move(default_factory_receiver));
 
-  // Add connection error observer when Network Service is running
+  // Add a disconnect handler when Network Service is running
   // out-of-process.
   if (IsOutOfProcessNetworkService() &&
-      (!network_service_connection_error_handler_holder_ ||
-       network_service_connection_error_handler_holder_.encountered_error())) {
+      (!network_service_disconnect_handler_holder_ ||
+       !network_service_disconnect_handler_holder_.is_connected())) {
+    network_service_disconnect_handler_holder_.reset();
     StoragePartition* storage_partition = BrowserContext::GetStoragePartition(
         GetSiteInstance()->GetBrowserContext(), GetSiteInstance());
     network::mojom::URLLoaderFactoryParamsPtr params =
         network::mojom::URLLoaderFactoryParams::New();
     params->process_id = GetProcess()->GetID();
     storage_partition->GetNetworkContext()->CreateURLLoaderFactory(
-        mojo::MakeRequest(&network_service_connection_error_handler_holder_),
+        network_service_disconnect_handler_holder_.BindNewPipeAndPassReceiver(),
         std::move(params));
-    network_service_connection_error_handler_holder_
-        .set_connection_error_handler(base::BindOnce(
-            &RenderFrameHostImpl::UpdateSubresourceLoaderFactories,
-            weak_ptr_factory_.GetWeakPtr()));
+    network_service_disconnect_handler_holder_.set_disconnect_handler(
+        base::BindOnce(&RenderFrameHostImpl::UpdateSubresourceLoaderFactories,
+                       weak_ptr_factory_.GetWeakPtr()));
   }
   return bypass_redirect_checks;
 }
@@ -6392,6 +6396,12 @@
   dst->focused_tree_id = focused_frame->GetAXTreeID();
 }
 
+void RenderFrameHostImpl::CreatePaymentManager(
+    mojo::PendingReceiver<payments::mojom::PaymentManager> receiver) {
+  GetProcess()->CreatePaymentManagerForOrigin(GetLastCommittedOrigin(),
+                                              std::move(receiver));
+}
+
 void RenderFrameHostImpl::CreateWebBluetoothService(
     mojo::PendingReceiver<blink::mojom::WebBluetoothService> receiver) {
   BackForwardCache::DisableForRenderFrameHost(this, "WebBluetooth");
@@ -7872,6 +7882,8 @@
   if (can_store)
     return;
 
+  // TODO(hajimehoshi): The not-restored reasons at
+  // |can_store.not_stored_reasons| should also be passed.
   EvictFromBackForwardCacheWithReason(reason);
 }
 
diff --git a/content/browser/frame_host/render_frame_host_impl.h b/content/browser/frame_host/render_frame_host_impl.h
index 8952a7b..a8c93896 100644
--- a/content/browser/frame_host/render_frame_host_impl.h
+++ b/content/browser/frame_host/render_frame_host_impl.h
@@ -91,6 +91,7 @@
 #include "third_party/blink/public/mojom/frame/navigation_initiator.mojom.h"
 #include "third_party/blink/public/mojom/idle/idle_manager.mojom.h"
 #include "third_party/blink/public/mojom/image_downloader/image_downloader.mojom.h"
+#include "third_party/blink/public/mojom/payments/payment_app.mojom.h"
 #include "third_party/blink/public/mojom/permissions/permission.mojom.h"
 #include "third_party/blink/public/mojom/presentation/presentation.mojom.h"
 #include "third_party/blink/public/mojom/service_worker/service_worker_provider.mojom.h"
@@ -226,7 +227,7 @@
   using CreateNetworkFactoryCallback = base::RepeatingCallback<void(
       mojo::PendingReceiver<network::mojom::URLLoaderFactory> receiver,
       int process_id,
-      network::mojom::URLLoaderFactoryPtrInfo original_factory)>;
+      mojo::PendingRemote<network::mojom::URLLoaderFactory> original_factory)>;
   static void SetNetworkFactoryForTesting(
       const CreateNetworkFactoryCallback& url_loader_factory_callback);
 
@@ -323,7 +324,7 @@
       const AXEventNotificationDetails& details);
 
   void EvictFromBackForwardCacheWithReason(
-      base::Optional<BackForwardCacheMetrics::NotRestoredReason> reason);
+      BackForwardCacheMetrics::NotRestoredReason reason);
 
   // IPC::Sender
   bool Send(IPC::Message* msg) override;
@@ -1130,6 +1131,9 @@
   void CreatePermissionService(
       mojo::PendingReceiver<blink::mojom::PermissionService> receiver);
 
+  void CreatePaymentManager(
+      mojo::PendingReceiver<payments::mojom::PaymentManager> receiver);
+
   void CreateWebBluetoothService(
       mojo::PendingReceiver<blink::mojom::WebBluetoothService> receiver);
   void GetCredentialManager(
@@ -2400,8 +2404,8 @@
   // For observing Network Service connection errors only. Will trigger
   // |OnNetworkServiceConnectionError()| and push updated factories to
   // |RenderFrame|.
-  network::mojom::URLLoaderFactoryPtr
-      network_service_connection_error_handler_holder_;
+  mojo::Remote<network::mojom::URLLoaderFactory>
+      network_service_disconnect_handler_holder_;
 
   // Whether UpdateSubresourceLoaderFactories should recreate the default
   // URLLoaderFactory when handling a NetworkService crash.  In case the frame
diff --git a/content/browser/frame_host/render_frame_host_impl_browsertest.cc b/content/browser/frame_host/render_frame_host_impl_browsertest.cc
index 5264125..2ff305c 100644
--- a/content/browser/frame_host/render_frame_host_impl_browsertest.cc
+++ b/content/browser/frame_host/render_frame_host_impl_browsertest.cc
@@ -47,7 +47,6 @@
 #include "content/test/did_commit_navigation_interceptor.h"
 #include "content/test/frame_host_test_interface.mojom.h"
 #include "content/test/test_content_browser_client.h"
-#include "mojo/public/cpp/bindings/remote.h"
 #include "net/base/features.h"
 #include "net/base/net_errors.h"
 #include "net/cookies/cookie_constants.h"
@@ -264,9 +263,9 @@
 IN_PROC_BROWSER_TEST_F(RenderFrameHostImplBrowserTest,
                        URLLoaderFactoryNotTrusted) {
   EXPECT_TRUE(NavigateToURL(shell(), embedded_test_server()->GetURL("/echo")));
-  network::mojom::URLLoaderFactoryPtr url_loader_factory;
+  mojo::Remote<network::mojom::URLLoaderFactory> url_loader_factory;
   shell()->web_contents()->GetMainFrame()->CreateNetworkServiceDefaultFactory(
-      mojo::MakeRequest(&url_loader_factory));
+      url_loader_factory.BindNewPipeAndPassReceiver());
 
   std::unique_ptr<network::ResourceRequest> request =
       std::make_unique<network::ResourceRequest>();
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
index 9c42df7..fbfd2a5 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -548,8 +548,15 @@
       // TODO(hajimehoshi): For code readability, BackForwardCacheMetrics should
       // take CanStoreDocumentResult directly and rename
       // MarkNotRestoredWithReason to DidNotStoreDocument.
-      old_page_back_forward_cache_metrics->MarkNotRestoredWithReason(
-          can_store.reason.value());
+      for (int i = 0;
+           i <= static_cast<int>(
+                    BackForwardCacheMetrics::NotRestoredReason::kMaxValue);
+           i++) {
+        if (can_store.not_stored_reasons.test(static_cast<size_t>(i))) {
+          old_page_back_forward_cache_metrics->MarkNotRestoredWithReason(
+              static_cast<BackForwardCacheMetrics::NotRestoredReason>(i));
+        }
+      }
     }
   }
 
diff --git a/content/browser/indexed_db/indexed_db_backing_store.cc b/content/browser/indexed_db/indexed_db_backing_store.cc
index 0c126cf..9d109954 100644
--- a/content/browser/indexed_db/indexed_db_backing_store.cc
+++ b/content/browser/indexed_db/indexed_db_backing_store.cc
@@ -54,7 +54,7 @@
 #include "storage/browser/file_system/file_writer_delegate.h"
 #include "storage/browser/file_system/local_file_stream_writer.h"
 #include "storage/common/database/database_identifier.h"
-#include "storage/common/fileapi/file_system_mount_option.h"
+#include "storage/common/file_system/file_system_mount_option.h"
 #include "third_party/blink/public/common/indexeddb/indexeddb_key_range.h"
 #include "third_party/blink/public/common/indexeddb/web_idb_types.h"
 #include "third_party/leveldatabase/env_chromium.h"
diff --git a/content/browser/indexed_db/indexed_db_backing_store.h b/content/browser/indexed_db/indexed_db_backing_store.h
index e4507e06..77319ef8 100644
--- a/content/browser/indexed_db/indexed_db_backing_store.h
+++ b/content/browser/indexed_db/indexed_db_backing_store.h
@@ -30,7 +30,7 @@
 #include "content/browser/indexed_db/scopes/scope_lock.h"
 #include "content/common/content_export.h"
 #include "storage/browser/blob/blob_data_handle.h"
-#include "storage/common/fileapi/file_system_mount_option.h"
+#include "storage/common/file_system/file_system_mount_option.h"
 #include "third_party/blink/public/common/indexeddb/indexeddb_key.h"
 #include "third_party/blink/public/mojom/indexeddb/indexeddb.mojom.h"
 #include "third_party/leveldatabase/src/include/leveldb/status.h"
diff --git a/content/browser/loader/file_url_loader_factory.cc b/content/browser/loader/file_url_loader_factory.cc
index f18034062..0b0f071 100644
--- a/content/browser/loader/file_url_loader_factory.cc
+++ b/content/browser/loader/file_url_loader_factory.cc
@@ -55,7 +55,7 @@
 #include "services/network/public/cpp/resource_response.h"
 #include "services/network/public/mojom/cors.mojom-shared.h"
 #include "services/network/public/mojom/url_loader.mojom.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "url/gurl.h"
 
 #if defined(OS_WIN)
diff --git a/content/browser/loader/navigation_url_loader_impl.cc b/content/browser/loader/navigation_url_loader_impl.cc
index d863ac28..1474b3e0 100644
--- a/content/browser/loader/navigation_url_loader_impl.cc
+++ b/content/browser/loader/navigation_url_loader_impl.cc
@@ -69,6 +69,7 @@
 #include "content/public/common/url_constants.h"
 #include "content/public/common/url_utils.h"
 #include "content/public/common/webplugininfo.h"
+#include "mojo/public/cpp/bindings/remote.h"
 #include "net/base/load_flags.h"
 #include "net/cert/sct_status_flags.h"
 #include "net/cert/signed_certificate_timestamp_and_status.h"
@@ -349,23 +350,24 @@
     return options;
   }
 
-  void Start(std::unique_ptr<network::SharedURLLoaderFactoryInfo>
-                 network_loader_factory_info,
-             ServiceWorkerNavigationHandle*
-                 service_worker_navigation_handle /* for UI thread only */,
-             ServiceWorkerNavigationHandleCore*
-                 service_worker_navigation_handle_core /* for IO thread only */,
-             AppCacheNavigationHandle* appcache_handle,
-             scoped_refptr<PrefetchedSignedExchangeCache>
-                 prefetched_signed_exchange_cache,
-             scoped_refptr<SignedExchangePrefetchMetricRecorder>
-                 signed_exchange_prefetch_metric_recorder,
-             std::unique_ptr<NavigationRequestInfo> request_info,
-             std::unique_ptr<NavigationUIData> navigation_ui_data,
-             network::mojom::URLLoaderFactoryPtrInfo factory_for_webui,
-             bool needs_loader_factory_interceptor,
-             base::Time ui_post_time,
-             std::string accept_langs) {
+  void Start(
+      std::unique_ptr<network::SharedURLLoaderFactoryInfo>
+          network_loader_factory_info,
+      ServiceWorkerNavigationHandle*
+          service_worker_navigation_handle /* for UI thread only */,
+      ServiceWorkerNavigationHandleCore*
+          service_worker_navigation_handle_core /* for IO thread only */,
+      AppCacheNavigationHandle* appcache_handle,
+      scoped_refptr<PrefetchedSignedExchangeCache>
+          prefetched_signed_exchange_cache,
+      scoped_refptr<SignedExchangePrefetchMetricRecorder>
+          signed_exchange_prefetch_metric_recorder,
+      std::unique_ptr<NavigationRequestInfo> request_info,
+      std::unique_ptr<NavigationUIData> navigation_ui_data,
+      mojo::PendingRemote<network::mojom::URLLoaderFactory> factory_for_webui,
+      bool needs_loader_factory_interceptor,
+      base::Time ui_post_time,
+      std::string accept_langs) {
     DCHECK_CURRENTLY_ON(BrowserThread::UI);
     DCHECK(!started_);
     ui_to_io_time_ += (base::Time::Now() - ui_post_time);
@@ -676,12 +678,12 @@
               base::BindOnce(UnknownSchemeCallback, handled));
         }
       } else {
-        network::mojom::URLLoaderFactoryPtr& non_network_factory =
+        mojo::Remote<network::mojom::URLLoaderFactory>& non_network_factory =
             non_network_url_loader_factories_[resource_request_->url.scheme()];
         if (!non_network_factory.is_bound()) {
           owner_->BindNonNetworkURLLoaderFactoryReceiver(
               frame_tree_node_id_, resource_request_->url,
-              mojo::MakeRequest(&non_network_factory));
+              non_network_factory.BindNewPipeAndPassReceiver());
         }
         factory =
             base::MakeRefCounted<network::WeakWrapperSharedURLLoaderFactory>(
@@ -1163,7 +1165,7 @@
 
   // Lazily initialized and used in the case of non-network resource
   // navigations. Keyed by URL scheme.
-  std::map<std::string, network::mojom::URLLoaderFactoryPtr>
+  std::map<std::string, mojo::Remote<network::mojom::URLLoaderFactory>>
       non_network_url_loader_factories_;
 
   // Non-NetworkService:
diff --git a/content/browser/media/cdm_file_impl.cc b/content/browser/media/cdm_file_impl.cc
index 44f5866..ee83286 100644
--- a/content/browser/media/cdm_file_impl.cc
+++ b/content/browser/media/cdm_file_impl.cc
@@ -25,7 +25,7 @@
 #include "storage/browser/file_system/file_system_operation_context.h"
 #include "storage/browser/file_system/file_system_url.h"
 #include "storage/browser/quota/quota_manager.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 
 namespace content {
 
diff --git a/content/browser/media/cdm_storage_impl.cc b/content/browser/media/cdm_storage_impl.cc
index 90c54bc3..962837736 100644
--- a/content/browser/media/cdm_storage_impl.cc
+++ b/content/browser/media/cdm_storage_impl.cc
@@ -21,8 +21,8 @@
 #include "storage/browser/file_system/file_system_context.h"
 #include "storage/browser/file_system/file_system_operation_context.h"
 #include "storage/browser/file_system/isolated_context.h"
-#include "storage/common/fileapi/file_system_types.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_types.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "url/origin.h"
 
 // Currently this uses the PluginPrivateFileSystem as the previous CDMs ran
diff --git a/content/browser/native_file_system/native_file_system_directory_handle_impl.cc b/content/browser/native_file_system/native_file_system_directory_handle_impl.cc
index 21c113d..c5c0472 100644
--- a/content/browser/native_file_system/native_file_system_directory_handle_impl.cc
+++ b/content/browser/native_file_system/native_file_system_directory_handle_impl.cc
@@ -14,7 +14,7 @@
 #include "net/base/escape.h"
 #include "storage/browser/file_system/file_system_context.h"
 #include "storage/browser/file_system/file_system_operation_runner.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "third_party/blink/public/mojom/native_file_system/native_file_system_error.mojom.h"
 #include "third_party/blink/public/mojom/native_file_system/native_file_system_file_handle.mojom.h"
 #include "third_party/blink/public/mojom/native_file_system/native_file_system_transfer_token.mojom.h"
@@ -49,11 +49,6 @@
 
 }  // namespace
 
-struct NativeFileSystemDirectoryHandleImpl::ReadDirectoryState {
-  GetEntriesCallback callback;
-  std::vector<NativeFileSystemEntryPtr> entries;
-};
-
 NativeFileSystemDirectoryHandleImpl::NativeFileSystemDirectoryHandleImpl(
     NativeFileSystemManagerImpl* manager,
     const BindingContext& context,
@@ -174,15 +169,20 @@
 }
 
 void NativeFileSystemDirectoryHandleImpl::GetEntries(
-    GetEntriesCallback callback) {
+    mojo::PendingRemote<blink::mojom::NativeFileSystemDirectoryEntriesListener>
+        pending_listener) {
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
 
+  auto listener = std::make_unique<
+      mojo::Remote<blink::mojom::NativeFileSystemDirectoryEntriesListener>>(
+      std::move(pending_listener));
+  listener->reset_on_disconnect();
+
   DoFileSystemOperation(
       FROM_HERE, &FileSystemOperationRunner::ReadDirectory,
       base::BindRepeating(
           &NativeFileSystemDirectoryHandleImpl::DidReadDirectory,
-          weak_factory_.GetWeakPtr(),
-          base::Owned(new ReadDirectoryState{std::move(callback)})),
+          weak_factory_.GetWeakPtr(), base::Owned(std::move(listener))),
       url());
 }
 
@@ -284,19 +284,24 @@
 }
 
 void NativeFileSystemDirectoryHandleImpl::DidReadDirectory(
-    ReadDirectoryState* state,
+    mojo::Remote<blink::mojom::NativeFileSystemDirectoryEntriesListener>*
+        listener,
     base::File::Error result,
     std::vector<filesystem::mojom::DirectoryEntry> file_list,
-    bool has_more) {
+    bool has_more_entries) {
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
 
+  if (!*listener)
+    return;
+
   if (result != base::File::FILE_OK) {
-    DCHECK(!has_more);
-    std::move(state->callback)
-        .Run(native_file_system_error::FromFileError(result), {});
+    DCHECK(!has_more_entries);
+    (*listener)->DidReadDirectory(
+        native_file_system_error::FromFileError(result), {}, false);
     return;
   }
 
+  std::vector<NativeFileSystemEntryPtr> entries;
   for (const auto& entry : file_list) {
     std::string basename = storage::FilePathToString(entry.name);
 
@@ -308,17 +313,12 @@
     // |basename|.
     CHECK_EQ(get_child_url_result->status, NativeFileSystemStatus::kOk);
 
-    state->entries.push_back(
+    entries.push_back(
         CreateEntry(basename, child_url,
                     entry.type == filesystem::mojom::FsFileType::DIRECTORY));
   }
-
-  // TODO(mek): Change API so we can stream back entries as they come in, rather
-  // than waiting till we have retrieved them all.
-  if (!has_more) {
-    std::move(state->callback)
-        .Run(native_file_system_error::Ok(), std::move(state->entries));
-  }
+  (*listener)->DidReadDirectory(native_file_system_error::Ok(),
+                                std::move(entries), has_more_entries);
 }
 
 void NativeFileSystemDirectoryHandleImpl::RemoveEntryImpl(
diff --git a/content/browser/native_file_system/native_file_system_directory_handle_impl.h b/content/browser/native_file_system/native_file_system_directory_handle_impl.h
index f31691c..f76a1f2b 100644
--- a/content/browser/native_file_system/native_file_system_directory_handle_impl.h
+++ b/content/browser/native_file_system/native_file_system_directory_handle_impl.h
@@ -43,7 +43,9 @@
   void GetDirectory(const std::string& basename,
                     bool create,
                     GetDirectoryCallback callback) override;
-  void GetEntries(GetEntriesCallback callback) override;
+  void GetEntries(mojo::PendingRemote<
+                  blink::mojom::NativeFileSystemDirectoryEntriesListener>
+                      pending_listener) override;
   void RemoveEntry(const std::string& basename,
                    bool recurse,
                    RemoveEntryCallback callback) override;
@@ -52,9 +54,6 @@
       override;
 
  private:
-  // State that is kept for the duration of a GetEntries/ReadDirectory call.
-  struct ReadDirectoryState;
-
   // This method creates the file if it does not currently exists. I.e. it is
   // the implementation for passing create=true to GetFile.
   void GetFileWithWritePermission(const storage::FileSystemURL& child_url,
@@ -70,10 +69,11 @@
                        GetDirectoryCallback callback,
                        base::File::Error result);
   void DidReadDirectory(
-      ReadDirectoryState* state,
+      mojo::Remote<blink::mojom::NativeFileSystemDirectoryEntriesListener>*
+          listener,
       base::File::Error result,
       std::vector<filesystem::mojom::DirectoryEntry> file_list,
-      bool has_more);
+      bool has_more_entries);
 
   void RemoveEntryImpl(const storage::FileSystemURL& url,
                        bool recurse,
diff --git a/content/browser/native_file_system/native_file_system_manager_impl.cc b/content/browser/native_file_system/native_file_system_manager_impl.cc
index 1750a44..0b1bf73 100644
--- a/content/browser/native_file_system/native_file_system_manager_impl.cc
+++ b/content/browser/native_file_system/native_file_system_manager_impl.cc
@@ -26,7 +26,7 @@
 #include "storage/browser/file_system/file_system_operation_runner.h"
 #include "storage/browser/file_system/file_system_url.h"
 #include "storage/browser/file_system/isolated_context.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "third_party/blink/public/common/features.h"
 #include "third_party/blink/public/mojom/native_file_system/native_file_system_error.mojom.h"
 #include "url/origin.h"
diff --git a/content/browser/network_service_browsertest.cc b/content/browser/network_service_browsertest.cc
index f2631ab..12d6c9c 100644
--- a/content/browser/network_service_browsertest.cc
+++ b/content/browser/network_service_browsertest.cc
@@ -256,9 +256,9 @@
       network::mojom::URLLoaderFactoryParams::New();
   params->process_id = network::mojom::kBrowserProcessId;
   params->is_corb_enabled = false;
-  network::mojom::URLLoaderFactoryPtr loader_factory;
-  network_context->CreateURLLoaderFactory(mojo::MakeRequest(&loader_factory),
-                                          std::move(params));
+  mojo::Remote<network::mojom::URLLoaderFactory> loader_factory;
+  network_context->CreateURLLoaderFactory(
+      loader_factory.BindNewPipeAndPassReceiver(), std::move(params));
 
   // Load a URL and check the cache index size.
   LoadURL(embedded_test_server()->GetURL("/cachetime"), loader_factory.get());
diff --git a/content/browser/network_service_instance_impl.h b/content/browser/network_service_instance_impl.h
index ba346286..b3ed41d 100644
--- a/content/browser/network_service_instance_impl.h
+++ b/content/browser/network_service_instance_impl.h
@@ -21,7 +21,7 @@
 // Registers |handler| to run (on UI thread) after mojo::Remote<NetworkService>
 // encounters an error.  Note that there are no ordering guarantees wrt error
 // handlers for other interfaces (e.g. mojo::Remote<NetworkContext> and/or
-// URLLoaderFactoryPtr).
+// mojo::Remote<URLLoaderFactory>).
 //
 // Can only be called on the UI thread.  No-op if NetworkService is disabled.
 CONTENT_EXPORT std::unique_ptr<base::CallbackList<void()>::Subscription>
diff --git a/content/browser/payments/payment_app_content_unittest_base.cc b/content/browser/payments/payment_app_content_unittest_base.cc
index d0df2e5..8ddbdce 100644
--- a/content/browser/payments/payment_app_content_unittest_base.cc
+++ b/content/browser/payments/payment_app_content_unittest_base.cc
@@ -25,6 +25,7 @@
 #include "third_party/blink/public/common/service_worker/service_worker_status_code.h"
 #include "third_party/blink/public/mojom/service_worker/service_worker.mojom.h"
 #include "third_party/blink/public/mojom/service_worker/service_worker_registration.mojom.h"
+#include "url/origin.h"
 
 namespace content {
 
@@ -221,8 +222,8 @@
 
   // Create a new payment manager.
   mojo::Remote<payments::mojom::PaymentManager> manager;
-  payment_app_context()->CreatePaymentManager(
-      manager.BindNewPipeAndPassReceiver());
+  payment_app_context()->CreatePaymentManagerForOrigin(
+      url::Origin::Create(scope_url), manager.BindNewPipeAndPassReceiver());
   payment_managers_.push_back(std::move(manager));
   base::RunLoop().RunUntilIdle();
 
diff --git a/content/browser/payments/payment_app_context_impl.cc b/content/browser/payments/payment_app_context_impl.cc
index c67b2416..59ee6153 100644
--- a/content/browser/payments/payment_app_context_impl.cc
+++ b/content/browser/payments/payment_app_context_impl.cc
@@ -44,14 +44,16 @@
       base::BindOnce(&PaymentAppContextImpl::ShutdownOnCoreThread, this));
 }
 
-void PaymentAppContextImpl::CreatePaymentManager(
+void PaymentAppContextImpl::CreatePaymentManagerForOrigin(
+    const url::Origin& origin,
     mojo::PendingReceiver<payments::mojom::PaymentManager> receiver) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
 
   RunOrPostTaskOnThread(
       FROM_HERE, ServiceWorkerContext::GetCoreThreadId(),
-      base::BindOnce(&PaymentAppContextImpl::CreatePaymentManagerOnCoreThread,
-                     this, std::move(receiver)));
+      base::BindOnce(
+          &PaymentAppContextImpl::CreatePaymentManagerForOriginOnCoreThread,
+          this, origin, std::move(receiver)));
 }
 
 void PaymentAppContextImpl::PaymentManagerHadConnectionError(
@@ -81,11 +83,12 @@
       std::make_unique<PaymentAppDatabase>(service_worker_context);
 }
 
-void PaymentAppContextImpl::CreatePaymentManagerOnCoreThread(
+void PaymentAppContextImpl::CreatePaymentManagerForOriginOnCoreThread(
+    const url::Origin& origin,
     mojo::PendingReceiver<payments::mojom::PaymentManager> receiver) {
   DCHECK_CURRENTLY_ON(ServiceWorkerContext::GetCoreThreadId());
   auto payment_manager =
-      std::make_unique<PaymentManager>(this, std::move(receiver));
+      std::make_unique<PaymentManager>(this, origin, std::move(receiver));
   payment_managers_[payment_manager.get()] = std::move(payment_manager);
 }
 
diff --git a/content/browser/payments/payment_app_context_impl.h b/content/browser/payments/payment_app_context_impl.h
index 239c083..a8940a5 100644
--- a/content/browser/payments/payment_app_context_impl.h
+++ b/content/browser/payments/payment_app_context_impl.h
@@ -40,7 +40,7 @@
 //   1) Constructor
 //   2) Init()
 //   3) Can now call other public methods in this class in any order.
-//     - Can call CreatePaymentManager() on UI thread.
+//     - Can call CreatePaymentManagerForOrigin() on UI thread.
 //     - Can call GetAllPaymentApps() on UI thread.
 //     - Can call PaymentManagerHadConnectionError() on core thread.
 //     - Can call payment_app_database() on the core thread.
@@ -60,9 +60,9 @@
   // Shutdown must be called before deleting this. Call on the UI thread.
   void Shutdown();
 
-  // Create a PaymentManager that is owned by this. Call on the UI
-  // thread.
-  void CreatePaymentManager(
+  // Create a PaymentManager that is owned by this. Call on the UI thread.
+  void CreatePaymentManagerForOrigin(
+      const url::Origin& origin,
       mojo::PendingReceiver<payments::mojom::PaymentManager> receiver);
 
   // Called by PaymentManager objects so that they can
@@ -82,7 +82,8 @@
   void CreatePaymentAppDatabaseOnCoreThread(
       scoped_refptr<ServiceWorkerContextWrapper> service_worker_context);
 
-  void CreatePaymentManagerOnCoreThread(
+  void CreatePaymentManagerForOriginOnCoreThread(
+      const url::Origin& origin,
       mojo::PendingReceiver<payments::mojom::PaymentManager> receiver);
 
   void ShutdownOnCoreThread();
diff --git a/content/browser/payments/payment_manager.cc b/content/browser/payments/payment_manager.cc
index 1739040..b4a4eddb 100644
--- a/content/browser/payments/payment_manager.cc
+++ b/content/browser/payments/payment_manager.cc
@@ -8,6 +8,7 @@
 
 #include "base/bind.h"
 #include "base/optional.h"
+#include "base/strings/string_util.h"
 #include "content/browser/payments/payment_app.pb.h"
 #include "content/browser/payments/payment_app_context_impl.h"
 #include "content/browser/payments/payment_app_database.h"
@@ -15,18 +16,15 @@
 #include "content/browser/service_worker/service_worker_registration.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/service_worker_context.h"
-#include "url/origin.h"
 
 namespace content {
 
-PaymentManager::~PaymentManager() {
-  DCHECK_CURRENTLY_ON(ServiceWorkerContext::GetCoreThreadId());
-}
-
 PaymentManager::PaymentManager(
     PaymentAppContextImpl* payment_app_context,
+    const url::Origin& origin,
     mojo::PendingReceiver<payments::mojom::PaymentManager> receiver)
     : payment_app_context_(payment_app_context),
+      origin_(origin),
       receiver_(this, std::move(receiver)) {
   DCHECK_CURRENTLY_ON(ServiceWorkerContext::GetCoreThreadId());
   DCHECK(payment_app_context);
@@ -35,26 +33,58 @@
       &PaymentManager::OnConnectionError, weak_ptr_factory_.GetWeakPtr()));
 }
 
+PaymentManager::~PaymentManager() {
+  DCHECK_CURRENTLY_ON(ServiceWorkerContext::GetCoreThreadId());
+}
+
 void PaymentManager::Init(const GURL& context_url, const std::string& scope) {
   DCHECK_CURRENTLY_ON(ServiceWorkerContext::GetCoreThreadId());
 
+  enum class ReasonCode : uint32_t {
+    kInvalidContextUrl,
+    kNonUnicodeScopeString,
+    kInvalidScopeUrl,
+    kCrossOriginContextAndScope,
+    kCrossOriginDataAccess,
+    kRenderProcessCannotAccessOrigin,
+  };
+
+  if (!context_url.is_valid()) {
+    receiver_.ResetWithReason(
+        static_cast<uint32_t>(ReasonCode::kInvalidContextUrl),
+        "Invalid context URL.");
+    return;
+  }
+  // GURL constructors CHECKs when the input string is not unicode.
+  if (!base::IsStringUTF8(scope)) {
+    receiver_.ResetWithReason(
+        static_cast<uint32_t>(ReasonCode::kNonUnicodeScopeString),
+        "Scope string is not UTF8.");
+    return;
+  }
+  GURL scope_url(scope);
+  if (!scope_url.is_valid()) {
+    receiver_.ResetWithReason(
+        static_cast<uint32_t>(ReasonCode::kInvalidScopeUrl),
+        "Invalid scope URL.");
+    return;
+  }
+  if (!url::IsSameOriginWith(context_url, scope_url)) {
+    receiver_.ResetWithReason(
+        static_cast<uint32_t>(ReasonCode::kCrossOriginContextAndScope),
+        "Scope URL is not from the same origin of the context URL.");
+    return;
+  }
+  if (!origin_.IsSameOriginWith(url::Origin::Create(context_url))) {
+    receiver_.ResetWithReason(
+        static_cast<uint32_t>(ReasonCode::kCrossOriginDataAccess),
+        "Cross origin data access.");
+    return;
+  }
+
   should_set_payment_app_info_ = true;
   context_url_ = context_url;
-  scope_ = GURL(scope);
-
-  if (!context_url_.is_valid()) {
-    receiver_.ResetWithReason(0U, "Invalid context URL.");
-    return;
-  }
-  if (!scope_.is_valid()) {
-    receiver_.ResetWithReason(1U, "Invalid scope URL.");
-    return;
-  }
-  if (!url::IsSameOriginWith(context_url_, scope_)) {
-    receiver_.ResetWithReason(
-        2U, "Scope URL is not from the same origin of the context URL.");
-    return;
-  }
+  scope_ = scope_url;
 }
 
 void PaymentManager::DeletePaymentInstrument(
diff --git a/content/browser/payments/payment_manager.h b/content/browser/payments/payment_manager.h
index 1c778a36..8c0b89b 100644
--- a/content/browser/payments/payment_manager.h
+++ b/content/browser/payments/payment_manager.h
@@ -14,6 +14,7 @@
 #include "mojo/public/cpp/bindings/receiver.h"
 #include "third_party/blink/public/mojom/payments/payment_app.mojom.h"
 #include "url/gurl.h"
+#include "url/origin.h"
 
 namespace content {
 
@@ -23,6 +24,7 @@
  public:
   PaymentManager(
       PaymentAppContextImpl* payment_app_context,
+      const url::Origin& origin,
       mojo::PendingReceiver<payments::mojom::PaymentManager> receiver);
 
   ~PaymentManager() override;
@@ -60,13 +62,12 @@
       PaymentManager::SetPaymentInstrumentCallback callback,
       payments::mojom::PaymentHandlerStatus status);
 
-  // PaymentAppContextImpl owns PaymentManager
-  PaymentAppContextImpl* payment_app_context_;
-
+  PaymentAppContextImpl* const payment_app_context_;  // Owns PaymentManager.
+  const url::Origin origin_;
+  mojo::Receiver<payments::mojom::PaymentManager> receiver_;
   bool should_set_payment_app_info_;
   GURL context_url_;
   GURL scope_;
-  mojo::Receiver<payments::mojom::PaymentManager> receiver_;
   base::WeakPtrFactory<PaymentManager> weak_ptr_factory_{this};
   DISALLOW_COPY_AND_ASSIGN(PaymentManager);
 };
diff --git a/content/browser/plugin_private_storage_helper.cc b/content/browser/plugin_private_storage_helper.cc
index 8ba8c87..df9f4ef11 100644
--- a/content/browser/plugin_private_storage_helper.cc
+++ b/content/browser/plugin_private_storage_helper.cc
@@ -31,7 +31,7 @@
 #include "storage/browser/file_system/isolated_context.h"
 #include "storage/browser/file_system/obfuscated_file_util.h"
 #include "storage/browser/quota/special_storage_policy.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 
 namespace content {
 
diff --git a/content/browser/renderer_host/pepper/pepper_file_io_host.cc b/content/browser/renderer_host/pepper/pepper_file_io_host.cc
index 716be7d..d2dc4f5c 100644
--- a/content/browser/renderer_host/pepper/pepper_file_io_host.cc
+++ b/content/browser/renderer_host/pepper/pepper_file_io_host.cc
@@ -34,7 +34,7 @@
 #include "storage/browser/file_system/file_system_context.h"
 #include "storage/browser/file_system/file_system_operation_runner.h"
 #include "storage/browser/file_system/task_runner_bound_observer_list.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 
 namespace content {
 
diff --git a/content/browser/renderer_host/pepper/pepper_file_system_browser_host.cc b/content/browser/renderer_host/pepper/pepper_file_system_browser_host.cc
index 236bcd9..0b6a8eaa 100644
--- a/content/browser/renderer_host/pepper/pepper_file_system_browser_host.cc
+++ b/content/browser/renderer_host/pepper/pepper_file_system_browser_host.cc
@@ -27,7 +27,7 @@
 #include "storage/browser/file_system/file_system_operation_runner.h"
 #include "storage/browser/file_system/isolated_context.h"
 #include "storage/browser/quota/quota_manager_proxy.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 
 namespace content {
 
diff --git a/content/browser/renderer_host/pepper/pepper_internal_file_ref_backend.cc b/content/browser/renderer_host/pepper/pepper_internal_file_ref_backend.cc
index 12b1f5e..726408f 100644
--- a/content/browser/renderer_host/pepper/pepper_internal_file_ref_backend.cc
+++ b/content/browser/renderer_host/pepper/pepper_internal_file_ref_backend.cc
@@ -39,7 +39,7 @@
 #include "storage/browser/file_system/file_system_operation.h"
 #include "storage/browser/file_system/file_system_operation_runner.h"
 #include "storage/browser/file_system/file_system_url.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 
 using ppapi::host::PpapiHost;
 using ppapi::host::ResourceHost;
diff --git a/content/browser/renderer_host/pepper/quota_reservation.cc b/content/browser/renderer_host/pepper/quota_reservation.cc
index eb9ae9b4..27ea3bc 100644
--- a/content/browser/renderer_host/pepper/quota_reservation.cc
+++ b/content/browser/renderer_host/pepper/quota_reservation.cc
@@ -14,7 +14,7 @@
 #include "storage/browser/file_system/file_system_operation_runner.h"
 #include "storage/browser/file_system/quota/open_file_handle.h"
 #include "storage/browser/file_system/quota/quota_reservation.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 
 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 99bb296..9ea3899b 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -227,6 +227,7 @@
 #include "ui/display/display_switches.h"
 #include "ui/gl/gl_switches.h"
 #include "ui/native_theme/native_theme_features.h"
+#include "url/origin.h"
 #include "url/url_constants.h"
 
 #if defined(OS_ANDROID)
@@ -1469,7 +1470,6 @@
           nullptr,
           base::OnTaskRunnerDeleter(base::CreateSequencedTaskRunner(
               {ServiceWorkerContext::GetCoreThreadId()}))),
-      renderer_host_binding_(this),
       instance_weak_factory_(base::in_place, this),
       frame_sink_provider_(id_),
       shutdown_exit_code_(-1) {
@@ -1942,11 +1942,12 @@
                                                       std::move(receiver));
 }
 
-void RenderProcessHostImpl::CreatePaymentManager(
+void RenderProcessHostImpl::CreatePaymentManagerForOrigin(
+    const url::Origin& origin,
     mojo::PendingReceiver<payments::mojom::PaymentManager> receiver) {
   static_cast<StoragePartitionImpl*>(GetStoragePartition())
       ->GetPaymentAppContext()
-      ->CreatePaymentManager(std::move(receiver));
+      ->CreatePaymentManagerForOrigin(origin, std::move(receiver));
 }
 
 void RenderProcessHostImpl::CancelProcessShutdownDelayForUnload() {
@@ -2366,7 +2367,7 @@
 
 void RenderProcessHostImpl::CreateRendererHost(
     mojo::PendingAssociatedReceiver<mojom::RendererHost> receiver) {
-  renderer_host_binding_.Bind(std::move(receiver));
+  renderer_host_receiver_.Bind(std::move(receiver));
 }
 
 int RenderProcessHostImpl::GetNextRoutingID() {
@@ -2623,10 +2624,8 @@
 
   if (crash_report_mode == CrashReportMode::GENERATE_CRASH_DUMP) {
     // Set crash keys to understand renderer kills related to site isolation.
-    auto* policy = ChildProcessSecurityPolicyImpl::GetInstance();
-    std::string lock_url = policy->GetOriginLock(GetID()).spec();
-    base::debug::SetCrashKeyString(bad_message::GetKilledProcessOriginLockKey(),
-                                   lock_url.empty() ? "(none)" : lock_url);
+    ChildProcessSecurityPolicyImpl::GetInstance()->LogKilledProcessOriginLock(
+        GetID());
 
     std::string site_isolation_mode;
     if (SiteIsolationPolicy::UseDedicatedProcessesForAllSites())
@@ -4142,13 +4141,10 @@
                                  render_process_host, browser_context,
                                  site_instance->GetIsolationContext(), site_url,
                                  site_instance->lock_url())) {
-    ChildProcessSecurityPolicyImpl* policy =
-        ChildProcessSecurityPolicyImpl::GetInstance();
     base::debug::SetCrashKeyString(bad_message::GetRequestedSiteURLKey(),
                                    site_url.spec());
-    base::debug::SetCrashKeyString(
-        bad_message::GetKilledProcessOriginLockKey(),
-        policy->GetOriginLock(render_process_host->GetID()).spec());
+    ChildProcessSecurityPolicyImpl::GetInstance()->LogKilledProcessOriginLock(
+        render_process_host->GetID());
     CHECK(false) << "Unsuitable process reused for site " << site_url;
   }
 
@@ -4310,9 +4306,7 @@
 }
 
 void RenderProcessHostImpl::ResetIPC() {
-  if (renderer_host_binding_.is_bound())
-    renderer_host_binding_.Unbind();
-
+  renderer_host_receiver_.reset();
   io_thread_host_impl_.reset();
   route_provider_receiver_.reset();
   associated_interface_provider_receivers_.Clear();
diff --git a/content/browser/renderer_host/render_process_host_impl.h b/content/browser/renderer_host/render_process_host_impl.h
index d195a2b..707b891 100644
--- a/content/browser/renderer_host/render_process_host_impl.h
+++ b/content/browser/renderer_host/render_process_host_impl.h
@@ -89,6 +89,10 @@
 class PersistentMemoryAllocator;
 }
 
+namespace url {
+class Origin;
+}
+
 namespace viz {
 class GpuClient;
 }
@@ -554,7 +558,8 @@
   // Binds |receiver| to the PaymentManager instance owned by
   // |storage_partition_impl_|, and is used by workers via
   // BrowserInterfaceBroker.
-  void CreatePaymentManager(
+  void CreatePaymentManagerForOrigin(
+      const url::Origin& origin,
       mojo::PendingReceiver<payments::mojom::PaymentManager> receiver) override;
 
   // Adds a CORB (Cross-Origin Read Blocking) exception for |process_id|.  The
@@ -1015,7 +1020,7 @@
   mojo::Remote<mojom::ChildProcess> child_process_;
   mojo::AssociatedRemote<mojom::RouteProvider> remote_route_provider_;
   mojo::AssociatedRemote<mojom::Renderer> renderer_interface_;
-  mojo::AssociatedBinding<mojom::RendererHost> renderer_host_binding_;
+  mojo::AssociatedReceiver<mojom::RendererHost> renderer_host_receiver_{this};
   mojo::Receiver<memory_instrumentation::mojom::CoordinatorConnector>
       coordinator_connector_receiver_{this};
 
diff --git a/content/browser/security_exploit_browsertest.cc b/content/browser/security_exploit_browsertest.cc
index 0c2496d..11c0049 100644
--- a/content/browser/security_exploit_browsertest.cc
+++ b/content/browser/security_exploit_browsertest.cc
@@ -317,12 +317,13 @@
       int request_id,
       const network::ResourceRequest& resource_request,
       network::mojom::URLLoaderClientPtrInfo client) {
-    network::mojom::URLLoaderFactoryPtr factory;
+    mojo::Remote<network::mojom::URLLoaderFactory> factory;
     frame->GetProcess()->CreateURLLoaderFactory(
         frame->GetLastCommittedOrigin(),
         network::mojom::CrossOriginEmbedderPolicy::kNone,
         nullptr /* preferences */, net::NetworkIsolationKey(),
-        mojo::NullRemote() /* header_client */, mojo::MakeRequest(&factory));
+        mojo::NullRemote() /* header_client */,
+        factory.BindNewPipeAndPassReceiver());
     factory->CreateLoaderAndStart(
         std::move(request), route_id, request_id,
         network::mojom::kURLLoadOptionNone, resource_request,
diff --git a/content/browser/service_worker/embedded_worker_instance.cc b/content/browser/service_worker/embedded_worker_instance.cc
index bf250df..6b2be69 100644
--- a/content/browser/service_worker/embedded_worker_instance.cc
+++ b/content/browser/service_worker/embedded_worker_instance.cc
@@ -1079,14 +1079,15 @@
         nullptr /* preferences */, net::NetworkIsolationKey(origin, origin),
         std::move(default_header_client), std::move(default_factory_receiver));
   } else {
-    network::mojom::URLLoaderFactoryPtr original_factory;
+    mojo::PendingRemote<network::mojom::URLLoaderFactory> original_factory;
     rph->CreateURLLoaderFactory(
         origin, network::mojom::CrossOriginEmbedderPolicy::kNone,
         nullptr /* preferences */, net::NetworkIsolationKey(origin, origin),
-        std::move(default_header_client), mojo::MakeRequest(&original_factory));
+        std::move(default_header_client),
+        original_factory.InitWithNewPipeAndPassReceiver());
     GetNetworkFactoryCallbackForTest().Run(std::move(default_factory_receiver),
                                            rph->GetID(),
-                                           original_factory.PassInterface());
+                                           std::move(original_factory));
   }
 
   factory_bundle->set_bypass_redirect_checks(bypass_redirect_checks);
@@ -1109,11 +1110,11 @@
     // schemes.
     if (!base::Contains(GetServiceWorkerSchemes(), scheme))
       continue;
-    network::mojom::URLLoaderFactoryPtr factory_ptr;
-    mojo::MakeStrongBinding(std::move(factory),
-                            mojo::MakeRequest(&factory_ptr));
+    mojo::PendingRemote<network::mojom::URLLoaderFactory> factory_remote;
+    mojo::MakeSelfOwnedReceiver(
+        std::move(factory), factory_remote.InitWithNewPipeAndPassReceiver());
     factory_bundle->pending_scheme_specific_factories().emplace(
-        scheme, factory_ptr.PassInterface());
+        scheme, std::move(factory_remote));
   }
   return factory_bundle;
 }
diff --git a/content/browser/service_worker/embedded_worker_instance.h b/content/browser/service_worker/embedded_worker_instance.h
index 5c7b458d..a39510e 100644
--- a/content/browser/service_worker/embedded_worker_instance.h
+++ b/content/browser/service_worker/embedded_worker_instance.h
@@ -212,7 +212,7 @@
   using CreateNetworkFactoryCallback = base::RepeatingCallback<void(
       mojo::PendingReceiver<network::mojom::URLLoaderFactory> receiver,
       int process_id,
-      network::mojom::URLLoaderFactoryPtrInfo original_factory)>;
+      mojo::PendingRemote<network::mojom::URLLoaderFactory> original_factory)>;
   // Allows overriding the URLLoaderFactory creation for loading subresources
   // from service workers (i.e., fetch()) and for loading non-installed service
   // worker scripts.
diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc
index eda2dad..ec6541a 100644
--- a/content/browser/service_worker/service_worker_context_wrapper.cc
+++ b/content/browser/service_worker/service_worker_context_wrapper.cc
@@ -39,6 +39,7 @@
 #include "content/public/browser/storage_usage_info.h"
 #include "content/public/common/content_client.h"
 #include "content/public/common/content_features.h"
+#include "mojo/public/cpp/bindings/self_owned_receiver.h"
 #include "net/base/url_util.h"
 #include "storage/browser/quota/quota_manager_proxy.h"
 #include "storage/browser/quota/special_storage_policy.h"
@@ -1798,11 +1799,11 @@
     std::unique_ptr<network::mojom::URLLoaderFactory> factory =
         std::move(pair.second);
 
-    network::mojom::URLLoaderFactoryPtr factory_ptr;
-    mojo::MakeStrongBinding(std::move(factory),
-                            mojo::MakeRequest(&factory_ptr));
+    mojo::PendingRemote<network::mojom::URLLoaderFactory> factory_remote;
+    mojo::MakeSelfOwnedReceiver(
+        std::move(factory), factory_remote.InitWithNewPipeAndPassReceiver());
     factory_bundle->pending_scheme_specific_factories().emplace(
-        scheme, factory_ptr.PassInterface());
+        scheme, std::move(factory_remote));
   }
 
   return factory_bundle;
diff --git a/content/browser/service_worker/service_worker_context_wrapper.h b/content/browser/service_worker/service_worker_context_wrapper.h
index c254bb39..63df2f23a 100644
--- a/content/browser/service_worker/service_worker_context_wrapper.h
+++ b/content/browser/service_worker/service_worker_context_wrapper.h
@@ -25,6 +25,8 @@
 #include "content/public/browser/global_routing_id.h"
 #include "content/public/browser/service_worker_context.h"
 #include "content/public/browser/service_worker_running_info.h"
+#include "mojo/public/cpp/bindings/pending_receiver.h"
+#include "mojo/public/cpp/bindings/pending_remote.h"
 
 namespace base {
 class FilePath;
diff --git a/content/browser/service_worker/service_worker_provider_host.cc b/content/browser/service_worker/service_worker_provider_host.cc
index 669f96e..95c8b01 100644
--- a/content/browser/service_worker/service_worker_provider_host.cc
+++ b/content/browser/service_worker/service_worker_provider_host.cc
@@ -138,6 +138,7 @@
 }
 
 void CreatePaymentManagerImpl(
+    const url::Origin& origin,
     int process_id,
     mojo::PendingReceiver<payments::mojom::PaymentManager> receiver) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
@@ -145,7 +146,7 @@
   if (!process)
     return;
 
-  process->CreatePaymentManager(std::move(receiver));
+  process->CreatePaymentManagerForOrigin(origin, std::move(receiver));
 }
 
 ServiceWorkerMetrics::EventType PurposeToEventType(
@@ -1503,8 +1504,9 @@
   DCHECK(IsProviderForServiceWorker());
   RunOrPostTaskOnThread(
       FROM_HERE, BrowserThread::UI,
-      base::BindOnce(&CreatePaymentManagerImpl, render_process_id_,
-                     std::move(receiver)));
+      base::BindOnce(&CreatePaymentManagerImpl,
+                     running_hosted_version_->script_origin(),
+                     render_process_id_, std::move(receiver)));
 }
 
 void ServiceWorkerProviderHost::SetExecutionReady() {
diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc
index 83cbdbd..9994b1a4 100644
--- a/content/browser/site_instance_impl.cc
+++ b/content/browser/site_instance_impl.cc
@@ -1025,8 +1025,7 @@
       // process.
       base::debug::SetCrashKeyString(bad_message::GetRequestedSiteURLKey(),
                                      site_.spec());
-      base::debug::SetCrashKeyString(
-          bad_message::GetKilledProcessOriginLockKey(), process_lock.spec());
+      policy->LogKilledProcessOriginLock(process_->GetID());
       CHECK(false) << "Trying to lock a process to " << lock_url()
                    << " but the process is already locked to " << process_lock;
     } else {
@@ -1040,8 +1039,7 @@
     if (!process_lock.is_empty()) {
       base::debug::SetCrashKeyString(bad_message::GetRequestedSiteURLKey(),
                                      site_.spec());
-      base::debug::SetCrashKeyString(
-          bad_message::GetKilledProcessOriginLockKey(), process_lock.spec());
+      policy->LogKilledProcessOriginLock(process_->GetID());
       CHECK(false) << "Trying to commit non-isolated site " << site_
                    << " in process locked to " << process_lock;
     }
diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc
index 818a637..5b5696dc 100644
--- a/content/browser/storage_partition_impl.cc
+++ b/content/browser/storage_partition_impl.cc
@@ -2298,7 +2298,7 @@
 
   // Create the URLLoaderFactory as needed, but make sure not to reuse a
   // previously created one if the test override has changed.
-  if (url_loader_factory && !url_loader_factory.encountered_error() &&
+  if (url_loader_factory && url_loader_factory.is_connected() &&
       is_test_url_loader_factory !=
           g_url_loader_factory_callback_for_test.Get().is_null()) {
     return url_loader_factory.get();
@@ -2314,19 +2314,19 @@
   params->disable_web_security =
       base::CommandLine::ForCurrentProcess()->HasSwitch(
           switches::kDisableWebSecurity);
+  url_loader_factory.reset();
   if (g_url_loader_factory_callback_for_test.Get().is_null()) {
-    auto request = mojo::MakeRequest(&url_loader_factory);
-    GetNetworkContext()->CreateURLLoaderFactory(std::move(request),
-                                                std::move(params));
+    GetNetworkContext()->CreateURLLoaderFactory(
+        url_loader_factory.BindNewPipeAndPassReceiver(), std::move(params));
     is_test_url_loader_factory = false;
     return url_loader_factory.get();
   }
 
-  network::mojom::URLLoaderFactoryPtr original_factory;
+  mojo::PendingRemote<network::mojom::URLLoaderFactory> original_factory;
   GetNetworkContext()->CreateURLLoaderFactory(
-      mojo::MakeRequest(&original_factory), std::move(params));
-  url_loader_factory = g_url_loader_factory_callback_for_test.Get().Run(
-      std::move(original_factory));
+      original_factory.InitWithNewPipeAndPassReceiver(), std::move(params));
+  url_loader_factory.Bind(g_url_loader_factory_callback_for_test.Get().Run(
+      std::move(original_factory)));
   is_test_url_loader_factory = true;
   return url_loader_factory.get();
 }
diff --git a/content/browser/storage_partition_impl.h b/content/browser/storage_partition_impl.h
index 1a40b74..a394972 100644
--- a/content/browser/storage_partition_impl.h
+++ b/content/browser/storage_partition_impl.h
@@ -85,8 +85,9 @@
   // This method must be called either on the UI thread or before threads start.
   // This callback is run on the UI thread.
   using CreateNetworkFactoryCallback =
-      base::Callback<network::mojom::URLLoaderFactoryPtr(
-          network::mojom::URLLoaderFactoryPtr original_factory)>;
+      base::Callback<mojo::PendingRemote<network::mojom::URLLoaderFactory>(
+          mojo::PendingRemote<network::mojom::URLLoaderFactory>
+              original_factory)>;
   static void SetGetURLLoaderFactoryForBrowserProcessCallbackForTesting(
       const CreateNetworkFactoryCallback& url_loader_factory_callback);
 
@@ -481,9 +482,10 @@
   // See the method comment for
   // StoragePartition::GetURLLoaderFactoryForBrowserProcess() for
   // more details
-  network::mojom::URLLoaderFactoryPtr url_loader_factory_for_browser_process_;
+  mojo::Remote<network::mojom::URLLoaderFactory>
+      url_loader_factory_for_browser_process_;
   bool is_test_url_loader_factory_for_browser_process_ = false;
-  network::mojom::URLLoaderFactoryPtr
+  mojo::Remote<network::mojom::URLLoaderFactory>
       url_loader_factory_for_browser_process_with_corb_;
   bool is_test_url_loader_factory_for_browser_process_with_corb_ = false;
   mojo::Remote<network::mojom::CookieManager>
diff --git a/content/browser/storage_partition_impl_browsertest.cc b/content/browser/storage_partition_impl_browsertest.cc
index 69cd7efd..f0fad46 100644
--- a/content/browser/storage_partition_impl_browsertest.cc
+++ b/content/browser/storage_partition_impl_browsertest.cc
@@ -91,11 +91,11 @@
       network::mojom::URLLoaderFactoryParams::New();
   params->process_id = network::mojom::kBrowserProcessId;
   params->is_corb_enabled = false;
-  network::mojom::URLLoaderFactoryPtr loader_factory;
+  mojo::Remote<network::mojom::URLLoaderFactory> loader_factory;
   BrowserContext::GetDefaultStoragePartition(
       shell()->web_contents()->GetBrowserContext())
       ->GetNetworkContext()
-      ->CreateURLLoaderFactory(mojo::MakeRequest(&loader_factory),
+      ->CreateURLLoaderFactory(loader_factory.BindNewPipeAndPassReceiver(),
                                std::move(params));
 
   network::ResourceRequest request;
diff --git a/content/browser/storage_partition_impl_unittest.cc b/content/browser/storage_partition_impl_unittest.cc
index e646252..289f536 100644
--- a/content/browser/storage_partition_impl_unittest.cc
+++ b/content/browser/storage_partition_impl_unittest.cc
@@ -51,7 +51,7 @@
 #include "storage/browser/file_system/file_system_context.h"
 #include "storage/browser/file_system/file_system_operation_context.h"
 #include "storage/browser/file_system/isolated_context.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 #endif  // BUILDFLAG(ENABLE_PLUGINS)
 
 using net::CanonicalCookie;
diff --git a/content/browser/url_loader_factory_getter.cc b/content/browser/url_loader_factory_getter.cc
index 0d8f01f..3ba981e7 100644
--- a/content/browser/url_loader_factory_getter.cc
+++ b/content/browser/url_loader_factory_getter.cc
@@ -129,21 +129,19 @@
   DCHECK(partition);
   partition_ = partition;
 
-  // Create a URLLoaderFactoryPtr synchronously and push it to the IO thread. If
-  // the pipe errors out later due to a network service crash, the pipe is
-  // created on the IO thread, and the request send back to the UI thread.
+  // Create a mojo::PendingRemote<URLLoaderFactory> synchronously and push it to
+  // the IO thread. If the pipe errors out later due to a network service crash,
+  // the pipe is created on the IO thread, and the request send back to the UI
+  // thread.
   // TODO(mmenke):  Is one less thread hop on startup worth the extra complexity
   // of two different pipe creation paths?
-  network::mojom::URLLoaderFactoryPtr network_factory;
-  mojo::PendingReceiver<network::mojom::URLLoaderFactory>
-      pending_network_factory_receiver = MakeRequest(&network_factory);
-
+  mojo::PendingRemote<network::mojom::URLLoaderFactory> network_factory;
   HandleNetworkFactoryRequestOnUIThread(
-      std::move(pending_network_factory_receiver), false);
+      network_factory.InitWithNewPipeAndPassReceiver(), false);
 
   base::PostTask(FROM_HERE, {BrowserThread::IO},
                  base::BindOnce(&URLLoaderFactoryGetter::InitializeOnIOThread,
-                                this, network_factory.PassInterface()));
+                                this, std::move(network_factory)));
 }
 
 void URLLoaderFactoryGetter::OnStoragePartitionDestroyed() {
@@ -179,15 +177,16 @@
   // This needs to be done before returning |test_factory_|, as the
   // |test_factory_| may fall back to |network_factory_|. The |is_bound()| check
   // is only needed by unit tests.
-  network::mojom::URLLoaderFactoryPtr* factory =
+  mojo::Remote<network::mojom::URLLoaderFactory>* factory =
       is_corb_enabled ? &network_factory_corb_enabled_ : &network_factory_;
-  if (factory->encountered_error() || !factory->is_bound()) {
-    network::mojom::URLLoaderFactoryPtr network_factory;
+  if (!factory->is_bound() || !factory->is_connected()) {
+    mojo::Remote<network::mojom::URLLoaderFactory> network_factory;
     base::PostTask(
         FROM_HERE, {BrowserThread::UI},
         base::BindOnce(
             &URLLoaderFactoryGetter::HandleNetworkFactoryRequestOnUIThread,
-            this, mojo::MakeRequest(&network_factory), is_corb_enabled));
+            this, network_factory.BindNewPipeAndPassReceiver(),
+            is_corb_enabled));
     ReinitializeOnIOThread(std::move(network_factory), is_corb_enabled);
   }
 
@@ -254,23 +253,24 @@
 URLLoaderFactoryGetter::~URLLoaderFactoryGetter() {}
 
 void URLLoaderFactoryGetter::InitializeOnIOThread(
-    network::mojom::URLLoaderFactoryPtrInfo network_factory) {
-  ReinitializeOnIOThread(
-      network::mojom::URLLoaderFactoryPtr(std::move(network_factory)), false);
+    mojo::PendingRemote<network::mojom::URLLoaderFactory> network_factory) {
+  ReinitializeOnIOThread(mojo::Remote<network::mojom::URLLoaderFactory>(
+                             std::move(network_factory)),
+                         false);
 }
 
 void URLLoaderFactoryGetter::ReinitializeOnIOThread(
-    network::mojom::URLLoaderFactoryPtr network_factory,
+    mojo::Remote<network::mojom::URLLoaderFactory> network_factory,
     bool is_corb_enabled) {
   DCHECK(network_factory.is_bound());
-  // Set a connection error handle so that connection errors on the pipes are
+  // Set a disconnect handler so that connection errors on the pipes are
   // noticed, but the class doesn't actually do anything when the error is
   // observed - instead, a new pipe is created in GetURLLoaderFactory() as
   // needed. This is to avoid incrementing the reference count of |this| in the
   // callback, as that could result in increasing the reference count from 0 to
   // 1 while there's a pending task to delete |this|. See
   // https://crbug.com/870942 for more details.
-  network_factory.set_connection_error_handler(base::DoNothing());
+  network_factory.set_disconnect_handler(base::DoNothing());
   if (is_corb_enabled) {
     network_factory_corb_enabled_ = std::move(network_factory);
   } else {
diff --git a/content/browser/url_loader_factory_getter.h b/content/browser/url_loader_factory_getter.h
index fcf2e707..64b2818 100644
--- a/content/browser/url_loader_factory_getter.h
+++ b/content/browser/url_loader_factory_getter.h
@@ -13,6 +13,8 @@
 #include "content/common/content_export.h"
 #include "content/public/browser/browser_thread.h"
 #include "mojo/public/cpp/bindings/pending_receiver.h"
+#include "mojo/public/cpp/bindings/pending_remote.h"
+#include "mojo/public/cpp/bindings/remote.h"
 #include "services/network/public/mojom/url_loader_factory.mojom.h"
 
 namespace network {
@@ -85,12 +87,12 @@
       network::mojom::URLLoaderFactory* test_factory,
       bool is_corb_enabled = false);
 
-  CONTENT_EXPORT network::mojom::URLLoaderFactoryPtr*
+  CONTENT_EXPORT mojo::Remote<network::mojom::URLLoaderFactory>*
   original_network_factory_for_testing() {
     return &network_factory_;
   }
 
-  CONTENT_EXPORT network::mojom::URLLoaderFactoryPtr*
+  CONTENT_EXPORT mojo::Remote<network::mojom::URLLoaderFactory>*
   original_network_factory__corb_enabled_for_testing() {
     return &network_factory_corb_enabled_;
   }
@@ -116,13 +118,13 @@
 
   CONTENT_EXPORT ~URLLoaderFactoryGetter();
   void InitializeOnIOThread(
-      network::mojom::URLLoaderFactoryPtrInfo network_factory);
+      mojo::PendingRemote<network::mojom::URLLoaderFactory> network_factory);
 
   // Moves |network_factory| to |network_factory_| or
   // |network_factory_corb_enabled_| depending on |is_corb_enabled| and sets up
   // an error handler.
   void ReinitializeOnIOThread(
-      network::mojom::URLLoaderFactoryPtr network_factory,
+      mojo::Remote<network::mojom::URLLoaderFactory> network_factory,
       bool is_corb_enabled);
 
   // Send |network_factory_request| to cached |StoragePartitionImpl|.
@@ -140,8 +142,8 @@
   void FlushNetworkInterfaceForTesting(base::OnceClosure callback);
 
   // Only accessed on IO thread.
-  network::mojom::URLLoaderFactoryPtr network_factory_;
-  network::mojom::URLLoaderFactoryPtr network_factory_corb_enabled_;
+  mojo::Remote<network::mojom::URLLoaderFactory> network_factory_;
+  mojo::Remote<network::mojom::URLLoaderFactory> network_factory_corb_enabled_;
   network::mojom::URLLoaderFactory* test_factory_ = nullptr;
   network::mojom::URLLoaderFactory* test_factory_corb_enabled_ = nullptr;
 
diff --git a/content/browser/web_contents/web_contents_view_mac.h b/content/browser/web_contents/web_contents_view_mac.h
index 6fdec8c0..470a8a6 100644
--- a/content/browser/web_contents/web_contents_view_mac.h
+++ b/content/browser/web_contents/web_contents_view_mac.h
@@ -21,7 +21,8 @@
 #include "content/common/drag_event_source_info.h"
 #include "content/common/web_contents_ns_view_bridge.mojom.h"
 #include "content/public/browser/visibility.h"
-#include "mojo/public/cpp/bindings/associated_binding.h"
+#include "mojo/public/cpp/bindings/associated_receiver.h"
+#include "mojo/public/cpp/bindings/associated_remote.h"
 #import "ui/base/cocoa/views_hostable.h"
 #include "ui/gfx/geometry/size.h"
 
@@ -216,9 +217,10 @@
       in_process_ns_view_bridge_;
 
   // Mojo bindings for an out of process instance of this NSView.
-  remote_cocoa::mojom::WebContentsNSViewAssociatedPtr remote_ns_view_;
-  mojo::AssociatedBinding<remote_cocoa::mojom::WebContentsNSViewHost>
-      remote_ns_view_host_binding_;
+  mojo::AssociatedRemote<remote_cocoa::mojom::WebContentsNSView>
+      remote_ns_view_;
+  mojo::AssociatedReceiver<remote_cocoa::mojom::WebContentsNSViewHost>
+      remote_ns_view_host_receiver_{this};
 
   // Used by CloseTabAfterEventTrackingIfNeeded.
   base::WeakPtrFactory<WebContentsViewMac> deferred_close_weak_ptr_factory_;
diff --git a/content/browser/web_contents/web_contents_view_mac.mm b/content/browser/web_contents/web_contents_view_mac.mm
index 4721a9b3..3955859 100644
--- a/content/browser/web_contents/web_contents_view_mac.mm
+++ b/content/browser/web_contents/web_contents_view_mac.mm
@@ -31,7 +31,8 @@
 #include "content/public/browser/interstitial_page.h"
 #include "content/public/browser/web_contents_delegate.h"
 #include "content/public/browser/web_contents_view_delegate.h"
-#include "mojo/public/cpp/bindings/interface_request.h"
+#include "mojo/public/cpp/bindings/pending_associated_receiver.h"
+#include "mojo/public/cpp/bindings/pending_associated_remote.h"
 #include "ui/base/cocoa/cocoa_base_utils.h"
 #include "ui/gfx/mac/coordinate_conversion.h"
 
@@ -92,7 +93,6 @@
     : web_contents_(web_contents),
       delegate_(delegate),
       ns_view_id_(remote_cocoa::GetNewNSViewId()),
-      remote_ns_view_host_binding_(this),
       deferred_close_weak_ptr_factory_(this) {}
 
 WebContentsViewMac::~WebContentsViewMac() {
@@ -631,20 +631,22 @@
   // Create an NSView in the target process, if one exists.
   auto* remote_cocoa_application = views_host_->GetRemoteCocoaApplication();
   if (remote_cocoa_application) {
-    remote_cocoa::mojom::WebContentsNSViewHostAssociatedPtr host;
-    remote_ns_view_host_binding_.Bind(mojo::MakeRequest(&host));
-    remote_cocoa::mojom::WebContentsNSViewAssociatedRequest ns_view_request =
-        mojo::MakeRequest(&remote_ns_view_);
+    mojo::PendingAssociatedRemote<remote_cocoa::mojom::WebContentsNSViewHost>
+        host;
+    remote_ns_view_host_receiver_.Bind(
+        host.InitWithNewEndpointAndPassReceiver());
+    mojo::PendingAssociatedReceiver<remote_cocoa::mojom::WebContentsNSView>
+        ns_view_receiver = remote_ns_view_.BindNewEndpointAndPassReceiver();
 
-    // Cast from mojom::WebContentsNSViewHostPtr and
-    // mojom::WebContentsNSViewBridgeRequest to the public interfaces
-    // accepted by the application.
+    // Cast from mojo::AssociatedRemote<mojom::WebContentsNSViewHost> and
+    // mojo::PendingAssociatedReceiver<remote_cocoa::mojom::WebContentsNSView>
+    // to the public interfaces accepted by the application.
     // TODO(ccameron): Remove the need for this cast.
     // https://crbug.com/888290
     mojo::AssociatedInterfacePtrInfo<remote_cocoa::mojom::StubInterface>
-        stub_host(host.PassInterface().PassHandle(), 0);
+        stub_host(host.PassHandle(), 0);
     remote_cocoa::mojom::StubInterfaceAssociatedRequest stub_ns_view_request(
-        ns_view_request.PassHandle());
+        ns_view_receiver.PassHandle());
 
     remote_cocoa_application->CreateWebContentsNSView(
         ns_view_id_, std::move(stub_host), std::move(stub_ns_view_request));
@@ -675,7 +677,7 @@
   if (remote_ns_view_) {
     remote_ns_view_->SetVisible(false);
     remote_ns_view_->ResetParentNSView();
-    remote_ns_view_host_binding_.Close();
+    remote_ns_view_host_receiver_.reset();
     remote_ns_view_.reset();
     // Permit the in-process NSView to call back into |this| again.
     [GetInProcessNSView() setHost:this];
diff --git a/content/browser/worker_host/dedicated_worker_host.cc b/content/browser/worker_host/dedicated_worker_host.cc
index 4ab9b63a..00aa819 100644
--- a/content/browser/worker_host/dedicated_worker_host.cc
+++ b/content/browser/worker_host/dedicated_worker_host.cc
@@ -25,7 +25,6 @@
 #include "content/public/common/content_client.h"
 #include "content/public/common/network_service_util.h"
 #include "mojo/public/cpp/bindings/pending_associated_remote.h"
-#include "mojo/public/cpp/bindings/pending_remote.h"
 #include "mojo/public/cpp/bindings/self_owned_receiver.h"
 #include "mojo/public/cpp/bindings/strong_binding.h"
 #include "mojo/public/cpp/system/message_pipe.h"
@@ -441,7 +440,8 @@
   RenderProcessHost* worker_process_host = GetProcessHost();
   if (!worker_process_host)
     return;
-  worker_process_host->CreatePaymentManager(std::move(receiver));
+  worker_process_host->CreatePaymentManagerForOrigin(GetOrigin(),
+                                                     std::move(receiver));
 }
 
 void DedicatedWorkerHost::CreateIDBFactory(
@@ -487,10 +487,12 @@
     StoragePartitionImpl* storage_partition_impl) {
   auto params = network::mojom::URLLoaderFactoryParams::New();
   params->process_id = worker_process_id_;
+  network_service_connection_error_handler_holder_.reset();
   storage_partition_impl->GetNetworkContext()->CreateURLLoaderFactory(
-      mojo::MakeRequest(&network_service_connection_error_handler_holder_),
+      network_service_connection_error_handler_holder_
+          .BindNewPipeAndPassReceiver(),
       std::move(params));
-  network_service_connection_error_handler_holder_.set_connection_error_handler(
+  network_service_connection_error_handler_holder_.set_disconnect_handler(
       base::BindOnce(&DedicatedWorkerHost::UpdateSubresourceLoaderFactories,
                      weak_factory_.GetWeakPtr()));
 }
@@ -499,7 +501,7 @@
   DCHECK(IsOutOfProcessNetworkService());
   DCHECK(subresource_loader_updater_.is_bound());
   DCHECK(network_service_connection_error_handler_holder_);
-  DCHECK(network_service_connection_error_handler_holder_.encountered_error());
+  DCHECK(!network_service_connection_error_handler_holder_.is_connected());
 
   // Get a storage partition.
   auto* worker_process_host = RenderProcessHost::FromID(worker_process_id_);
diff --git a/content/browser/worker_host/dedicated_worker_host.h b/content/browser/worker_host/dedicated_worker_host.h
index d35c23e..5866f30 100644
--- a/content/browser/worker_host/dedicated_worker_host.h
+++ b/content/browser/worker_host/dedicated_worker_host.h
@@ -203,7 +203,7 @@
   bool is_frozen_ = false;
 
   // For observing Network Service connection errors only.
-  network::mojom::URLLoaderFactoryPtr
+  mojo::Remote<network::mojom::URLLoaderFactory>
       network_service_connection_error_handler_holder_;
   mojo::Remote<blink::mojom::SubresourceLoaderUpdater>
       subresource_loader_updater_;
diff --git a/content/browser/worker_host/shared_worker_host.cc b/content/browser/worker_host/shared_worker_host.cc
index 992ac07..8c5c499 100644
--- a/content/browser/worker_host/shared_worker_host.cc
+++ b/content/browser/worker_host/shared_worker_host.cc
@@ -28,7 +28,6 @@
 #include "content/public/browser/service_worker_context.h"
 #include "content/public/common/content_client.h"
 #include "mojo/public/cpp/bindings/pending_associated_remote.h"
-#include "mojo/public/cpp/bindings/pending_remote.h"
 #include "net/base/network_isolation_key.h"
 #include "third_party/blink/public/common/loader/url_loader_factory_bundle.h"
 #include "third_party/blink/public/common/messaging/message_port_channel.h"
@@ -295,14 +294,15 @@
         nullptr /* preferences */, net::NetworkIsolationKey(origin, origin),
         std::move(default_header_client), std::move(default_factory_receiver));
   } else {
-    network::mojom::URLLoaderFactoryPtr original_factory;
+    mojo::PendingRemote<network::mojom::URLLoaderFactory> original_factory;
     worker_process_host->CreateURLLoaderFactory(
         origin, network::mojom::CrossOriginEmbedderPolicy::kNone,
         nullptr /* preferences */, net::NetworkIsolationKey(origin, origin),
-        std::move(default_header_client), mojo::MakeRequest(&original_factory));
+        std::move(default_header_client),
+        original_factory.InitWithNewPipeAndPassReceiver());
     GetCreateNetworkFactoryCallbackForSharedWorker().Run(
         std::move(default_factory_receiver), worker_process_id_,
-        original_factory.PassInterface());
+        std::move(original_factory));
   }
 
   return pending_default_factory;
@@ -362,7 +362,8 @@
   RenderProcessHost* worker_process_host = GetProcessHost();
   if (!worker_process_host)
     return;
-  worker_process_host->CreatePaymentManager(std::move(receiver));
+  worker_process_host->CreatePaymentManagerForOrigin(
+      url::Origin::Create(instance().url()), std::move(receiver));
 }
 
 void SharedWorkerHost::CreateIDBFactory(
diff --git a/content/browser/worker_host/shared_worker_host.h b/content/browser/worker_host/shared_worker_host.h
index 33c73934..6de07da 100644
--- a/content/browser/worker_host/shared_worker_host.h
+++ b/content/browser/worker_host/shared_worker_host.h
@@ -77,7 +77,7 @@
   using CreateNetworkFactoryCallback = base::RepeatingCallback<void(
       mojo::PendingReceiver<network::mojom::URLLoaderFactory> receiver,
       int worker_process_id,
-      network::mojom::URLLoaderFactoryPtrInfo original_factory)>;
+      mojo::PendingRemote<network::mojom::URLLoaderFactory> original_factory)>;
   static void SetNetworkFactoryForSubresourcesForTesting(
       const CreateNetworkFactoryCallback& url_loader_factory_callback);
 
diff --git a/content/browser/worker_host/shared_worker_host_unittest.cc b/content/browser/worker_host/shared_worker_host_unittest.cc
index b078d623..88712ad 100644
--- a/content/browser/worker_host/shared_worker_host_unittest.cc
+++ b/content/browser/worker_host/shared_worker_host_unittest.cc
@@ -26,8 +26,7 @@
 #include "content/test/not_implemented_network_url_loader_factory.h"
 #include "mojo/public/cpp/bindings/pending_associated_receiver.h"
 #include "mojo/public/cpp/bindings/pending_associated_remote.h"
-#include "mojo/public/cpp/bindings/remote.h"
-#include "mojo/public/cpp/bindings/strong_binding.h"
+#include "mojo/public/cpp/bindings/self_owned_receiver.h"
 #include "mojo/public/cpp/test_support/test_utils.h"
 #include "services/network/public/cpp/features.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -90,12 +89,12 @@
 
     base::Optional<SubresourceLoaderParams> subresource_loader_params =
         SubresourceLoaderParams();
-    network::mojom::URLLoaderFactoryPtr loader_factory_ptr;
-    mojo::MakeStrongBinding(
+    mojo::PendingRemote<network::mojom::URLLoaderFactory> loader_factory_remote;
+    mojo::MakeSelfOwnedReceiver(
         std::make_unique<NotImplementedNetworkURLLoaderFactory>(),
-        mojo::MakeRequest(&loader_factory_ptr));
+        loader_factory_remote.InitWithNewPipeAndPassReceiver());
     subresource_loader_params->pending_appcache_loader_factory =
-        loader_factory_ptr.PassInterface();
+        std::move(loader_factory_remote);
 
     // Set up for service worker.
     auto service_worker_handle =
diff --git a/content/browser/worker_host/worker_script_fetch_initiator.cc b/content/browser/worker_host/worker_script_fetch_initiator.cc
index c43f7eb..f21fcc5 100644
--- a/content/browser/worker_host/worker_script_fetch_initiator.cc
+++ b/content/browser/worker_host/worker_script_fetch_initiator.cc
@@ -40,7 +40,8 @@
 #include "content/public/common/content_client.h"
 #include "content/public/common/content_features.h"
 #include "content/public/common/referrer.h"
-#include "mojo/public/cpp/bindings/strong_binding.h"
+#include "mojo/public/cpp/bindings/pending_remote.h"
+#include "mojo/public/cpp/bindings/self_owned_receiver.h"
 #include "net/base/load_flags.h"
 #include "net/base/network_isolation_key.h"
 #include "services/network/loader_util.h"
@@ -220,11 +221,11 @@
     std::unique_ptr<network::mojom::URLLoaderFactory> factory =
         std::move(pair.second);
 
-    network::mojom::URLLoaderFactoryPtr factory_ptr;
-    mojo::MakeStrongBinding(std::move(factory),
-                            mojo::MakeRequest(&factory_ptr));
+    mojo::PendingRemote<network::mojom::URLLoaderFactory> factory_remote;
+    mojo::MakeSelfOwnedReceiver(
+        std::move(factory), factory_remote.InitWithNewPipeAndPassReceiver());
     factory_bundle->pending_scheme_specific_factories().emplace(
-        scheme, factory_ptr.PassInterface());
+        scheme, std::move(factory_remote));
   }
 
   if (file_support) {
@@ -233,11 +234,12 @@
         storage_partition->browser_context()->GetSharedCorsOriginAccessList(),
         // USER_VISIBLE because worker script fetch may affect the UI.
         base::TaskPriority::USER_VISIBLE);
-    network::mojom::URLLoaderFactoryPtr file_factory_ptr;
-    mojo::MakeStrongBinding(std::move(file_factory),
-                            mojo::MakeRequest(&file_factory_ptr));
+    mojo::PendingRemote<network::mojom::URLLoaderFactory> file_factory_remote;
+    mojo::MakeSelfOwnedReceiver(
+        std::move(file_factory),
+        file_factory_remote.InitWithNewPipeAndPassReceiver());
     factory_bundle->pending_scheme_specific_factories().emplace(
-        url::kFileScheme, file_factory_ptr.PassInterface());
+        url::kFileScheme, std::move(file_factory_remote));
   }
 
   return factory_bundle;
diff --git a/content/common/throttling_url_loader.cc b/content/common/throttling_url_loader.cc
index 27beb5375..3580cdb 100644
--- a/content/common/throttling_url_loader.cc
+++ b/content/common/throttling_url_loader.cc
@@ -235,7 +235,7 @@
 
 void ThrottlingURLLoader::FollowRedirectForcingRestart() {
   url_loader_.reset();
-  client_binding_.Close();
+  client_receiver_.reset();
   CHECK(throttle_will_redirect_redirect_url_.is_empty());
 
   for (const std::string& header : removed_headers_)
@@ -254,7 +254,7 @@
   DCHECK_EQ(DEFERRED_NONE, deferred_stage_);
   DCHECK(!loader_completed_);
   url_loader_.reset();
-  client_binding_.Close();
+  client_receiver_.reset();
   start_info_->url_loader_factory = std::move(factory);
   start_info_->options = url_loader_options;
   StartNow();
@@ -315,7 +315,7 @@
 
 network::mojom::URLLoaderClientEndpointsPtr ThrottlingURLLoader::Unbind() {
   return network::mojom::URLLoaderClientEndpoints::New(
-      url_loader_.PassInterface(), client_binding_.Unbind());
+      url_loader_.Unbind(), client_receiver_.Unbind());
 }
 
 ThrottlingURLLoader::ThrottlingURLLoader(
@@ -323,7 +323,6 @@
     network::mojom::URLLoaderClient* client,
     const net::NetworkTrafficAnnotationTag& traffic_annotation)
     : forwarding_client_(client),
-      client_binding_(this),
       traffic_annotation_(traffic_annotation) {
   throttles_.reserve(throttles.size());
   for (auto& throttle : throttles)
@@ -445,22 +444,20 @@
     return;
   }
 
-  network::mojom::URLLoaderClientPtr client;
-  client_binding_.Bind(mojo::MakeRequest(&client), start_info_->task_runner);
-
-  // TODO(https://crbug.com/919736): Remove this call.
-  client_binding_.EnableBatchDispatch();
-
-  client_binding_.set_connection_error_handler(base::BindOnce(
-      &ThrottlingURLLoader::OnClientConnectionError, base::Unretained(this)));
-
   DCHECK(start_info_->url_loader_factory);
   start_info_->url_loader_factory->CreateLoaderAndStart(
-      mojo::MakeRequest(&url_loader_), start_info_->routing_id,
+      url_loader_.BindNewPipeAndPassReceiver(), start_info_->routing_id,
       start_info_->request_id, start_info_->options, start_info_->url_request,
-      std::move(client),
+      network::mojom::URLLoaderClientPtr(
+          client_receiver_.BindNewPipeAndPassRemote(start_info_->task_runner)),
       net::MutableNetworkTrafficAnnotationTag(traffic_annotation_));
 
+  // TODO(https://crbug.com/919736): Remove this call.
+  client_receiver_.internal_state()->EnableBatchDispatch();
+
+  client_receiver_.set_disconnect_handler(base::BindOnce(
+      &ThrottlingURLLoader::OnClientConnectionError, base::Unretained(this)));
+
   if (!pausing_reading_body_from_net_throttles_.empty())
     url_loader_->PauseReadingBodyFromNet();
 
@@ -477,7 +474,7 @@
 void ThrottlingURLLoader::RestartWithFlagsNow() {
   DCHECK(has_pending_restart_);
   url_loader_.reset();
-  client_binding_.Close();
+  client_receiver_.reset();
   start_info_->url_request.load_flags |= pending_restart_flags_;
   has_pending_restart_ = false;
   pending_restart_flags_ = 0;
@@ -541,7 +538,7 @@
 
     if (deferred) {
       deferred_stage_ = DEFERRED_BEFORE_RESPONSE;
-      client_binding_.PauseIncomingMethodCallProcessing();
+      client_receiver_.Pause();
       return;
     }
 
@@ -566,7 +563,7 @@
     if (deferred) {
       deferred_stage_ = DEFERRED_RESPONSE;
       response_info_ = std::make_unique<ResponseInfo>(std::move(response_head));
-      client_binding_.PauseIncomingMethodCallProcessing();
+      client_receiver_.Pause();
       return;
     }
   }
@@ -613,9 +610,10 @@
       deferred_stage_ = DEFERRED_REDIRECT;
       redirect_info_ = std::make_unique<RedirectInfo>(redirect_info,
                                                       std::move(response_head));
-      // |client_binding_| can be unbound if the redirect came from a throttle.
-      if (client_binding_.is_bound())
-        client_binding_.PauseIncomingMethodCallProcessing();
+      // |client_receiver_| can be unbound if the redirect came from a
+      // throttle.
+      if (client_receiver_.is_bound())
+        client_receiver_.Pause();
       return;
     }
   }
@@ -690,7 +688,7 @@
 
     if (deferred) {
       deferred_stage_ = DEFERRED_COMPLETE;
-      client_binding_.PauseIncomingMethodCallProcessing();
+      client_receiver_.Pause();
       return;
     }
 
@@ -739,9 +737,10 @@
       break;
     }
     case DEFERRED_REDIRECT: {
-      // |client_binding_| can be unbound if the redirect came from a throttle.
-      if (client_binding_.is_bound())
-        client_binding_.ResumeIncomingMethodCallProcessing();
+      // |client_receiver_| can be unbound if the redirect came from a
+      // throttle.
+      if (client_receiver_.is_bound())
+        client_receiver_.Resume();
       // TODO(dhausknecht) at this point we do not actually know if we commit to
       // the redirect or if it will be cancelled. FollowRedirect would be a more
       // suitable place to set this URL but there we do not have the data.
@@ -764,7 +763,7 @@
       break;
     }
     case DEFERRED_RESPONSE: {
-      client_binding_.ResumeIncomingMethodCallProcessing();
+      client_receiver_.Resume();
       forwarding_client_->OnReceiveResponse(
           std::move(response_info_->response_head));
       // Note: |this| may be deleted here.
@@ -844,25 +843,26 @@
   response_intercepted_ = true;
 
   if (original_loader)
-    *original_loader = std::move(url_loader_);
-  url_loader_ = std::move(new_loader);
+    *original_loader = network::mojom::URLLoaderPtr(url_loader_.Unbind());
+  url_loader_.Bind(new_loader.PassInterface());
 
   if (original_client_request)
-    *original_client_request = client_binding_.Unbind();
-  client_binding_.Bind(std::move(new_client_request), start_info_->task_runner);
-  client_binding_.set_connection_error_handler(base::BindOnce(
+    *original_client_request = client_receiver_.Unbind();
+  client_receiver_.Bind(std::move(new_client_request),
+                        start_info_->task_runner);
+  client_receiver_.set_disconnect_handler(base::BindOnce(
       &ThrottlingURLLoader::OnClientConnectionError, base::Unretained(this)));
 }
 
 void ThrottlingURLLoader::DisconnectClient(base::StringPiece custom_reason) {
-  client_binding_.Close();
+  client_receiver_.reset();
 
   if (!custom_reason.empty()) {
     url_loader_.ResetWithReason(
         network::mojom::URLLoader::kClientDisconnectReason,
         custom_reason.as_string());
   } else {
-    url_loader_ = nullptr;
+    url_loader_.reset();
   }
 
   loader_completed_ = true;
diff --git a/content/common/throttling_url_loader.h b/content/common/throttling_url_loader.h
index e5e64fbe..0e9d407 100644
--- a/content/common/throttling_url_loader.h
+++ b/content/common/throttling_url_loader.h
@@ -13,7 +13,8 @@
 #include "base/strings/string_piece.h"
 #include "base/threading/thread_task_runner_handle.h"
 #include "content/common/content_export.h"
-#include "mojo/public/cpp/bindings/binding.h"
+#include "mojo/public/cpp/bindings/receiver.h"
+#include "mojo/public/cpp/bindings/remote.h"
 #include "services/network/public/cpp/shared_url_loader_factory.h"
 #include "services/network/public/mojom/url_loader.mojom.h"
 #include "services/network/public/mojom/url_loader_factory.mojom.h"
@@ -192,9 +193,9 @@
   // object). And it is possible that the implementation of |forwarding_client_|
   // destroys this object synchronously when this object is calling into it.
   network::mojom::URLLoaderClient* forwarding_client_;
-  mojo::Binding<network::mojom::URLLoaderClient> client_binding_;
+  mojo::Remote<network::mojom::URLLoader> url_loader_;
 
-  network::mojom::URLLoaderPtr url_loader_;
+  mojo::Receiver<network::mojom::URLLoaderClient> client_receiver_{this};
 
   struct StartInfo {
     StartInfo(
diff --git a/content/common/throttling_url_loader_unittest.cc b/content/common/throttling_url_loader_unittest.cc
index 8a472a2a..badffc0 100644
--- a/content/common/throttling_url_loader_unittest.cc
+++ b/content/common/throttling_url_loader_unittest.cc
@@ -11,6 +11,8 @@
 #include "base/test/bind_test_util.h"
 #include "base/test/task_environment.h"
 #include "mojo/public/cpp/bindings/pending_receiver.h"
+#include "mojo/public/cpp/bindings/receiver.h"
+#include "mojo/public/cpp/bindings/remote.h"
 #include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
 #include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h"
 #include "services/network/public/mojom/url_loader.mojom.h"
@@ -28,19 +30,21 @@
 class TestURLLoaderFactory : public network::mojom::URLLoaderFactory,
                              public network::mojom::URLLoader {
  public:
-  TestURLLoaderFactory() : binding_(this), url_loader_binding_(this) {
-    binding_.Bind(mojo::MakeRequest(&factory_ptr_));
+  TestURLLoaderFactory() {
+    receiver_.Bind(factory_remote_.BindNewPipeAndPassReceiver());
     shared_factory_ =
         base::MakeRefCounted<network::WeakWrapperSharedURLLoaderFactory>(
-            factory_ptr_.get());
+            factory_remote_.get());
   }
 
   ~TestURLLoaderFactory() override { shared_factory_->Detach(); }
 
-  network::mojom::URLLoaderFactoryPtr& factory_ptr() { return factory_ptr_; }
+  mojo::Remote<network::mojom::URLLoaderFactory>& factory_remote() {
+    return factory_remote_;
+  }
   network::mojom::URLLoaderClientPtr& client_ptr() { return client_ptr_; }
-  mojo::Binding<network::mojom::URLLoader>& url_loader_binding() {
-    return url_loader_binding_;
+  mojo::Receiver<network::mojom::URLLoader>& url_loader_receiver() {
+    return url_loader_receiver_;
   }
   scoped_refptr<network::SharedURLLoaderFactory> shared_factory() {
     return shared_factory_;
@@ -104,10 +108,9 @@
                                 traffic_annotation) override {
     create_loader_and_start_called_++;
 
-    if (url_loader_binding_.is_bound())
-      url_loader_binding_.Unbind();
+    url_loader_receiver_.reset();
 
-    url_loader_binding_.Bind(std::move(request));
+    url_loader_receiver_.Bind(std::move(request));
     client_ptr_ = std::move(client);
 
     if (on_create_loader_and_start_callback_)
@@ -144,9 +147,9 @@
   size_t pause_reading_body_from_net_called_ = 0;
   size_t resume_reading_body_from_net_called_ = 0;
 
-  mojo::Binding<network::mojom::URLLoaderFactory> binding_;
-  mojo::Binding<network::mojom::URLLoader> url_loader_binding_;
-  network::mojom::URLLoaderFactoryPtr factory_ptr_;
+  mojo::Receiver<network::mojom::URLLoaderFactory> receiver_{this};
+  mojo::Receiver<network::mojom::URLLoader> url_loader_receiver_{this};
+  mojo::Remote<network::mojom::URLLoaderFactory> factory_remote_;
   network::mojom::URLLoaderClientPtr client_ptr_;
   scoped_refptr<network::WeakWrapperSharedURLLoaderFactory> shared_factory_;
   OnCreateLoaderAndStartCallback on_create_loader_and_start_callback_;
@@ -370,7 +373,7 @@
         factory_.shared_factory(), std::move(throttles_), 0, 0, options,
         &request, &client_, TRAFFIC_ANNOTATION_FOR_TESTS,
         base::ThreadTaskRunnerHandle::Get());
-    factory_.factory_ptr().FlushForTesting();
+    factory_.factory_remote().FlushForTesting();
   }
 
   void ResetThrottleRawPointer() { throttle_ = nullptr; }
@@ -449,7 +452,7 @@
   EXPECT_EQ(0u, client_.on_complete_called());
 
   throttle_->delegate()->Resume();
-  factory_.factory_ptr().FlushForTesting();
+  factory_.factory_remote().FlushForTesting();
 
   EXPECT_EQ(1u, factory_.create_loader_and_start_called());
 
@@ -1011,7 +1014,7 @@
   EXPECT_EQ(0u, client_.on_complete_called());
 
   throttle2->delegate()->Resume();
-  factory_.factory_ptr().FlushForTesting();
+  factory_.factory_remote().FlushForTesting();
 
   EXPECT_EQ(1u, factory_.create_loader_and_start_called());
 
@@ -1083,13 +1086,13 @@
 
   // Should still not have started because there's |throttle2| is still blocking
   // the request.
-  factory_.factory_ptr().FlushForTesting();
+  factory_.factory_remote().FlushForTesting();
   EXPECT_EQ(0u, factory_.create_loader_and_start_called());
 
   throttle2->delegate()->Resume();
 
   // Now it should have started.
-  factory_.factory_ptr().FlushForTesting();
+  factory_.factory_remote().FlushForTesting();
   EXPECT_EQ(1u, factory_.create_loader_and_start_called());
 
   factory_.NotifyClientOnReceiveResponse();
@@ -1137,12 +1140,12 @@
 
   throttle_->delegate()->Resume();
 
-  factory_.factory_ptr().FlushForTesting();
+  factory_.factory_remote().FlushForTesting();
   EXPECT_EQ(1u, factory_.create_loader_and_start_called());
 
   // Make sure all URLLoader calls before this point are delivered to the impl
   // side.
-  factory_.url_loader_binding().FlushForTesting();
+  factory_.url_loader_receiver().FlushForTesting();
 
   // Although there were two calls to delegate->PauseReadingBodyFromNet(), only
   // one URLLoader::PauseReadingBodyFromNet() Mojo call was made.
@@ -1152,18 +1155,18 @@
   // Reading body from network is still paused by |throttle2|. Calling
   // ResumeReadingBodyFromNet() on |throttle_| shouldn't have any effect.
   throttle_->delegate()->ResumeReadingBodyFromNet();
-  factory_.url_loader_binding().FlushForTesting();
+  factory_.url_loader_receiver().FlushForTesting();
   EXPECT_EQ(1u, factory_.pause_reading_body_from_net_called());
   EXPECT_EQ(0u, factory_.resume_reading_body_from_net_called());
 
   // Even if we call ResumeReadingBodyFromNet() on |throttle_| one more time.
   throttle_->delegate()->ResumeReadingBodyFromNet();
-  factory_.url_loader_binding().FlushForTesting();
+  factory_.url_loader_receiver().FlushForTesting();
   EXPECT_EQ(1u, factory_.pause_reading_body_from_net_called());
   EXPECT_EQ(0u, factory_.resume_reading_body_from_net_called());
 
   throttle2->delegate()->ResumeReadingBodyFromNet();
-  factory_.url_loader_binding().FlushForTesting();
+  factory_.url_loader_receiver().FlushForTesting();
   EXPECT_EQ(1u, factory_.pause_reading_body_from_net_called());
   EXPECT_EQ(1u, factory_.resume_reading_body_from_net_called());
 }
diff --git a/content/public/android/BUILD.gn b/content/public/android/BUILD.gn
index 197094e2..8561c1b 100644
--- a/content/public/android/BUILD.gn
+++ b/content/public/android/BUILD.gn
@@ -229,7 +229,6 @@
     "java/src/org/chromium/content/browser/selection/MagnifierWrapper.java",
     "java/src/org/chromium/content/browser/selection/MagnifierWrapperImpl.java",
     "java/src/org/chromium/content/browser/selection/PastePopupMenu.java",
-    "java/src/org/chromium/content/browser/selection/SelectionEventProxyImpl.java",
     "java/src/org/chromium/content/browser/selection/SelectionIndicesConverter.java",
     "java/src/org/chromium/content/browser/selection/SelectionInsertionHandleObserver.java",
     "java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java",
diff --git a/content/public/android/java/src/org/chromium/content/browser/selection/SelectionEventProxyImpl.java b/content/public/android/java/src/org/chromium/content/browser/selection/SelectionEventProxyImpl.java
deleted file mode 100644
index ec113cbe..0000000
--- a/content/public/android/java/src/org/chromium/content/browser/selection/SelectionEventProxyImpl.java
+++ /dev/null
@@ -1,145 +0,0 @@
-// 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.
-
-package org.chromium.content.browser.selection;
-
-import android.annotation.TargetApi;
-import android.os.Build;
-import android.view.textclassifier.TextClassification;
-import android.view.textclassifier.TextSelection;
-
-import androidx.annotation.NonNull;
-
-import org.chromium.base.Log;
-
-import java.lang.reflect.Method;
-
-/**
- * A wrapper class for Android SmartSelectionEventTracker.SelectionEvent.
- * SmartSelectionEventTracker.SelectionEvent is a hidden class, need reflection to access to it.
- */
-@TargetApi(Build.VERSION_CODES.O)
-public class SelectionEventProxyImpl implements SmartSelectionMetricsLogger.SelectionEventProxy {
-    private static final String TAG = "SmartSelectionLogger";
-    private static final boolean DEBUG = false;
-    private static final String SELECTION_EVENT_CLASS =
-            "android.view.textclassifier.logging.SmartSelectionEventTracker$SelectionEvent";
-
-    // Reflection class and methods.
-    private static Class<?> sSelectionEventClass;
-    private static Method sSelectionStartedMethod;
-    private static Method sSelectionModifiedMethod;
-    private static Method sSelectionModifiedClassificationMethod;
-    private static Method sSelectionModifiedSelectionMethod;
-    private static Method sSelectionActionMethod;
-    private static Method sSelectionActionClassificationMethod;
-    private static boolean sReflectionFailed;
-
-    public static SelectionEventProxyImpl create() {
-        if (sReflectionFailed) return null;
-        // TODO(ctzsm): Remove reflection after SDK updates.
-        if (sSelectionEventClass == null) {
-            try {
-                sSelectionEventClass = Class.forName(SELECTION_EVENT_CLASS);
-                sSelectionStartedMethod =
-                        sSelectionEventClass.getMethod("selectionStarted", Integer.TYPE);
-                sSelectionModifiedMethod = sSelectionEventClass.getMethod(
-                        "selectionModified", Integer.TYPE, Integer.TYPE);
-                sSelectionModifiedClassificationMethod = sSelectionEventClass.getMethod(
-                        "selectionModified", Integer.TYPE, Integer.TYPE, TextClassification.class);
-                sSelectionModifiedSelectionMethod = sSelectionEventClass.getMethod(
-                        "selectionModified", Integer.TYPE, Integer.TYPE, TextSelection.class);
-                sSelectionActionMethod = sSelectionEventClass.getMethod(
-                        "selectionAction", Integer.TYPE, Integer.TYPE, Integer.TYPE);
-                sSelectionActionClassificationMethod =
-                        sSelectionEventClass.getMethod("selectionAction", Integer.TYPE,
-                                Integer.TYPE, Integer.TYPE, TextClassification.class);
-            } catch (ClassNotFoundException | NoSuchMethodException e) {
-                if (DEBUG) Log.d(TAG, "Reflection failure", e);
-                sReflectionFailed = true;
-                return null;
-            }
-        }
-        return new SelectionEventProxyImpl();
-    }
-
-    private SelectionEventProxyImpl() {}
-
-    // Reflection wrapper of SelectionEvent#selectionStarted(int)
-    @Override
-    public Object createSelectionStarted(int start) {
-        try {
-            return sSelectionStartedMethod.invoke(null, start);
-        } catch (ReflectiveOperationException e) {
-            // Avoid crashes due to logging.
-            if (DEBUG) Log.d(TAG, "Reflection failure", e);
-        }
-        return null;
-    }
-
-    // Reflection wrapper of SelectionEvent#selectionModified(int, int)
-    @Override
-    public Object createSelectionModified(int start, int end) {
-        try {
-            return sSelectionModifiedMethod.invoke(null, start, end);
-        } catch (ReflectiveOperationException e) {
-            // Avoid crashes due to logging.
-            if (DEBUG) Log.d(TAG, "Reflection failure", e);
-        }
-        return null;
-    }
-
-    // Reflection wrapper of SelectionEvent#selectionModified(int, int, TextClassification)
-    @Override
-    public Object createSelectionModifiedClassification(
-            int start, int end, @NonNull Object classification) {
-        try {
-            return sSelectionModifiedClassificationMethod.invoke(
-                    null, start, end, (TextClassification) classification);
-        } catch (ReflectiveOperationException e) {
-            // Avoid crashes due to logging.
-            if (DEBUG) Log.d(TAG, "Reflection failure", e);
-        }
-        return null;
-    }
-
-    // Reflection wrapper of SelectionEvent#selectionModified(int, int, TextSelection)
-    @Override
-    public Object createSelectionModifiedSelection(int start, int end, @NonNull Object selection) {
-        try {
-            return sSelectionModifiedSelectionMethod.invoke(
-                    null, start, end, (TextSelection) selection);
-        } catch (ReflectiveOperationException e) {
-            // Avoid crashes due to logging.
-            if (DEBUG) Log.d(TAG, "Reflection failure", e);
-        }
-        return null;
-    }
-
-    // Reflection wrapper of SelectionEvent#selectionAction(int, int, int)
-    @Override
-    public Object createSelectionAction(int start, int end, int actionType) {
-        try {
-            return sSelectionActionMethod.invoke(null, start, end, actionType);
-        } catch (ReflectiveOperationException e) {
-            // Avoid crashes due to logging.
-            if (DEBUG) Log.d(TAG, "Reflection failure", e);
-        }
-        return null;
-    }
-
-    // Reflection wrapper of SelectionEvent#selectionAction(int, int, int, TextClassification)
-    @Override
-    public Object createSelectionAction(
-            int start, int end, int actionType, @NonNull Object classification) {
-        try {
-            return sSelectionActionClassificationMethod.invoke(
-                    null, start, end, actionType, (TextClassification) classification);
-        } catch (ReflectiveOperationException e) {
-            // Avoid crashes due to logging.
-            if (DEBUG) Log.d(TAG, "Reflection failure", e);
-        }
-        return null;
-    }
-}
diff --git a/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java b/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java
index 58c3b699..1529368 100644
--- a/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java
+++ b/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java
@@ -31,6 +31,7 @@
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.WindowManager;
+import android.view.textclassifier.SelectionEvent;
 import android.view.textclassifier.TextClassifier;
 
 import androidx.annotation.Nullable;
@@ -374,7 +375,7 @@
                         break;
                     case MenuSourceType.MENU_SOURCE_ADJUST_SELECTION_RESET:
                         mSelectionMetricsLogger.logSelectionAction(mLastSelectedText,
-                                mLastSelectionOffset, SmartSelectionMetricsLogger.ActionType.RESET,
+                                mLastSelectionOffset, SelectionEvent.ACTION_RESET,
                                 /* SelectionClient.Result = */ null);
                         break;
                     case MenuSourceType.MENU_SOURCE_TOUCH_HANDLE:
@@ -971,28 +972,28 @@
 
     private int getActionType(int menuItemId, int menuItemGroupId) {
         if (menuItemGroupId == android.R.id.textAssist) {
-            return SmartSelectionMetricsLogger.ActionType.SMART_SHARE;
+            return SelectionEvent.ACTION_SMART_SHARE;
         }
         if (menuItemId == R.id.select_action_menu_select_all) {
-            return SmartSelectionMetricsLogger.ActionType.SELECT_ALL;
+            return SelectionEvent.ACTION_SELECT_ALL;
         }
         if (menuItemId == R.id.select_action_menu_cut) {
-            return SmartSelectionMetricsLogger.ActionType.CUT;
+            return SelectionEvent.ACTION_CUT;
         }
         if (menuItemId == R.id.select_action_menu_copy) {
-            return SmartSelectionMetricsLogger.ActionType.COPY;
+            return SelectionEvent.ACTION_COPY;
         }
         if (menuItemId == R.id.select_action_menu_paste
                 || menuItemId == R.id.select_action_menu_paste_as_plain_text) {
-            return SmartSelectionMetricsLogger.ActionType.PASTE;
+            return SelectionEvent.ACTION_PASTE;
         }
         if (menuItemId == R.id.select_action_menu_share) {
-            return SmartSelectionMetricsLogger.ActionType.SHARE;
+            return SelectionEvent.ACTION_SHARE;
         }
         if (menuItemId == android.R.id.textAssist) {
-            return SmartSelectionMetricsLogger.ActionType.SMART_SHARE;
+            return SelectionEvent.ACTION_SMART_SHARE;
         }
-        return SmartSelectionMetricsLogger.ActionType.OTHER;
+        return SelectionEvent.ACTION_OTHER;
     }
 
     /**
@@ -1396,7 +1397,7 @@
         if (unSelected) {
             if (mSelectionMetricsLogger != null) {
                 mSelectionMetricsLogger.logSelectionAction(mLastSelectedText, mLastSelectionOffset,
-                        SmartSelectionMetricsLogger.ActionType.ABANDON,
+                        SelectionEvent.ACTION_ABANDON,
                         /* SelectionClient.Result = */ null);
             }
             destroyActionModeAndKeepSelection();
diff --git a/content/public/android/java/src/org/chromium/content/browser/selection/SmartSelectionMetricsLogger.java b/content/public/android/java/src/org/chromium/content/browser/selection/SmartSelectionMetricsLogger.java
index 61ded4bc..30053cc 100644
--- a/content/public/android/java/src/org/chromium/content/browser/selection/SmartSelectionMetricsLogger.java
+++ b/content/public/android/java/src/org/chromium/content/browser/selection/SmartSelectionMetricsLogger.java
@@ -7,19 +7,15 @@
 import android.annotation.TargetApi;
 import android.content.Context;
 import android.os.Build;
-
-import androidx.annotation.IntDef;
+import android.view.textclassifier.SelectionEvent;
+import android.view.textclassifier.TextClassificationContext;
+import android.view.textclassifier.TextClassificationManager;
+import android.view.textclassifier.TextClassifier;
 
 import org.chromium.base.Log;
-import org.chromium.base.VisibleForTesting;
 import org.chromium.content_public.browser.SelectionClient;
 import org.chromium.content_public.browser.SelectionMetricsLogger;
 
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Method;
-
 /**
  * Smart Selection logger, wrapper of Android logger methods.
  * We are logging word indices here. For one example:
@@ -30,165 +26,44 @@
  * that, we single tap on "City", Smart Selection reset get triggered, we need to log [1, 2). Spaces
  * are ignored but we count each punctuation mark as a word.
  */
-@TargetApi(Build.VERSION_CODES.O)
+@TargetApi(Build.VERSION_CODES.P)
 public class SmartSelectionMetricsLogger implements SelectionMetricsLogger {
     private static final String TAG = "SmartSelectionLogger";
     private static final boolean DEBUG = false;
 
-    // Reflection classes, constructor and method.
-    private static final String TRACKER_CLASS =
-            "android.view.textclassifier.logging.SmartSelectionEventTracker";
-    private static Class<?> sTrackerClass;
-    private static Class<?> sSelectionEventClass;
-    private static Constructor sTrackerConstructor;
-    private static Method sLogEventMethod;
-    private static boolean sReflectionFailed;
-
     private Context mContext;
-    private Object mTracker;
 
-    private SelectionEventProxy mSelectionEventProxy;
+    private TextClassifier mSession;
+
     private SelectionIndicesConverter mConverter;
 
-    // ActionType, from SmartSelectionEventTracker.SelectionEvent class.
-    @IntDef({ActionType.OVERTYPE, ActionType.COPY, ActionType.PASTE, ActionType.CUT,
-            ActionType.SHARE, ActionType.SMART_SHARE, ActionType.DRAG, ActionType.ABANDON,
-            ActionType.OTHER, ActionType.SELECT_ALL, ActionType.RESET})
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface ActionType {
-        /** User typed over the selection. */
-        int OVERTYPE = 100;
-        /** User copied the selection. */
-        int COPY = 101;
-        /** User pasted over the selection. */
-        int PASTE = 102;
-        /** User cut the selection. */
-        int CUT = 103;
-        /** User shared the selection. */
-        int SHARE = 104;
-        /** User clicked the textAssist menu item. */
-        int SMART_SHARE = 105;
-        /** User dragged+dropped the selection. */
-        int DRAG = 106;
-        /** User abandoned the selection. */
-        int ABANDON = 107;
-        /** User performed an action on the selection. */
-        int OTHER = 108;
-
-        /* Non-terminal actions. */
-        /** User activated Select All */
-        int SELECT_ALL = 200;
-        /** User reset the smart selection. */
-        int RESET = 201;
-    }
-
-    /**
-     * SmartSelectionEventTracker.SelectionEvent class proxy. Having this interface for testing
-     * purpose.
-     */
-    // TODO(ctzsm): Replace Object with corresponding APIs after Robolectric updated.
-    public static interface SelectionEventProxy {
-        /**
-         * Creates a SelectionEvent for selection started event.
-         * @param start Start word index.
-         */
-        Object createSelectionStarted(int start);
-
-        /**
-         * Creates a SelectionEvent for selection modified event.
-         * @param start Start word index.
-         * @param end End word index.
-         */
-        Object createSelectionModified(int start, int end);
-
-        /**
-         * Creates a SelectionEvent for selection modified event.
-         * @param start Start word index.
-         * @param end End word index.
-         * @param classification {@link android.view.textclassifier.TextClassification object} to
-         *                       log.
-         */
-        Object createSelectionModifiedClassification(int start, int end, Object classification);
-
-        /**
-         * Creates a SelectionEvent for selection modified event.
-         * @param start Start word index.
-         * @param end End word index.
-         * @param selection {@link android.view.textclassifier.TextSelection} object to log.
-         */
-        Object createSelectionModifiedSelection(int start, int end, Object selection);
-
-        /**
-         * Creates a SelectionEvent for taking action on selection.
-         * @param start Start word index.
-         * @param end End word index.
-         * @param actionType The action type defined in SelectionMetricsLogger.ActionType.
-         */
-        Object createSelectionAction(int start, int end, int actionType);
-
-        /**
-         * Creates a SelectionEvent for taking action on selection.
-         * @param start Start word index.
-         * @param end End word index.
-         * @param actionType The action type defined in SelectionMetricsLogger.ActionType.
-         * @param classification {@link android.view.textclassifier.TextClassification object} to
-         *                       log.
-         */
-        Object createSelectionAction(int start, int end, int actionType, Object classification);
-    }
-
     public static SmartSelectionMetricsLogger create(Context context) {
-        if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.O || context == null
-                || sReflectionFailed) {
+        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P || context == null) {
             return null;
         }
-
-        // TODO(ctzsm): Remove reflection after SDK updates.
-        if (sTrackerClass == null) {
-            try {
-                sTrackerClass = Class.forName(TRACKER_CLASS);
-                sSelectionEventClass = Class.forName(TRACKER_CLASS + "$SelectionEvent");
-                sTrackerConstructor = sTrackerClass.getConstructor(Context.class, Integer.TYPE);
-                sLogEventMethod = sTrackerClass.getMethod("logEvent", sSelectionEventClass);
-            } catch (ClassNotFoundException | NoSuchMethodException e) {
-                if (DEBUG) Log.d(TAG, "Reflection failure", e);
-                sReflectionFailed = true;
-                return null;
-            }
-        }
-
-        SelectionEventProxy selectionEventProxy = SelectionEventProxyImpl.create();
-        if (selectionEventProxy == null) return null;
-
-        return new SmartSelectionMetricsLogger(context, selectionEventProxy);
+        return new SmartSelectionMetricsLogger(context);
     }
 
-    private SmartSelectionMetricsLogger(Context context, SelectionEventProxy selectionEventProxy) {
+    private SmartSelectionMetricsLogger(Context context) {
         mContext = context;
-        mSelectionEventProxy = selectionEventProxy;
-    }
-
-    @VisibleForTesting
-    protected SmartSelectionMetricsLogger(SelectionEventProxy selectionEventProxy) {
-        mSelectionEventProxy = selectionEventProxy;
     }
 
     public void logSelectionStarted(String selectionText, int startOffset, boolean editable) {
-        mTracker = createTracker(mContext, editable);
+        mSession = createSession(mContext, editable);
         mConverter = new SelectionIndicesConverter();
         mConverter.updateSelectionState(selectionText, startOffset);
         mConverter.setInitialStartOffset(startOffset);
 
         if (DEBUG) Log.d(TAG, "logSelectionStarted");
-        logEvent(mSelectionEventProxy.createSelectionStarted(0));
+        logEvent(SelectionEvent.createSelectionStartedEvent(SelectionEvent.INVOCATION_MANUAL, 0));
     }
 
     public void logSelectionModified(
             String selectionText, int startOffset, SelectionClient.Result result) {
-        if (mTracker == null) return;
+        if (mSession == null) return;
         if (!mConverter.updateSelectionState(selectionText, startOffset)) {
             // DOM change detected, end logging session.
-            mTracker = null;
+            endTextClassificationSession();
             return;
         }
 
@@ -196,28 +71,30 @@
         int[] indices = new int[2];
         if (!mConverter.getWordDelta(startOffset, endOffset, indices)) {
             // Invalid indices, end logging session.
-            mTracker = null;
+            endTextClassificationSession();
             return;
         }
 
         if (DEBUG) Log.d(TAG, "logSelectionModified [%d, %d)", indices[0], indices[1]);
         if (result != null && result.textSelection != null) {
-            logEvent(mSelectionEventProxy.createSelectionModifiedSelection(
+            logEvent(SelectionEvent.createSelectionModifiedEvent(
                     indices[0], indices[1], result.textSelection));
         } else if (result != null && result.textClassification != null) {
-            logEvent(mSelectionEventProxy.createSelectionModifiedClassification(
+            logEvent(SelectionEvent.createSelectionModifiedEvent(
                     indices[0], indices[1], result.textClassification));
         } else {
-            logEvent(mSelectionEventProxy.createSelectionModified(indices[0], indices[1]));
+            logEvent(SelectionEvent.createSelectionModifiedEvent(indices[0], indices[1]));
         }
     }
 
-    public void logSelectionAction(String selectionText, int startOffset, @ActionType int action,
-            SelectionClient.Result result) {
-        if (mTracker == null) return;
+    public void logSelectionAction(
+            String selectionText, int startOffset, int action, SelectionClient.Result result) {
+        if (mSession == null) {
+            return;
+        }
         if (!mConverter.updateSelectionState(selectionText, startOffset)) {
             // DOM change detected, end logging session.
-            mTracker = null;
+            endTextClassificationSession();
             return;
         }
 
@@ -225,7 +102,7 @@
         int[] indices = new int[2];
         if (!mConverter.getWordDelta(startOffset, endOffset, indices)) {
             // Invalid indices, end logging session.
-            mTracker = null;
+            endTextClassificationSession();
             return;
         }
 
@@ -235,51 +112,38 @@
         }
 
         if (result != null && result.textClassification != null) {
-            logEvent(mSelectionEventProxy.createSelectionAction(
+            logEvent(SelectionEvent.createSelectionActionEvent(
                     indices[0], indices[1], action, result.textClassification));
         } else {
-            logEvent(mSelectionEventProxy.createSelectionAction(indices[0], indices[1], action));
+            logEvent(SelectionEvent.createSelectionActionEvent(indices[0], indices[1], action));
         }
 
-        if (isTerminal(action)) mTracker = null;
-    }
-
-    public Object createTracker(Context context, boolean editable) {
-        try {
-            return sTrackerConstructor.newInstance(
-                    context, editable ? /* EDIT_WEBVIEW */ 4 : /* WEBVIEW */ 2);
-        } catch (ReflectiveOperationException e) {
-            // Avoid crashes due to logging.
-            if (DEBUG) Log.d(TAG, "Reflection failure", e);
-        }
-        return null;
-    }
-
-    // Reflection wrapper of SmartSelectionEventTracker#logEvent(SelectionEvent)
-    public void logEvent(Object selectionEvent) {
-        if (selectionEvent == null) return;
-        try {
-            sLogEventMethod.invoke(mTracker, sSelectionEventClass.cast(selectionEvent));
-        } catch (ClassCastException | ReflectiveOperationException e) {
-            // Avoid crashes due to logging.
-            if (DEBUG) Log.d(TAG, "Reflection failure", e);
+        if (SelectionEvent.isTerminal(action)) {
+            endTextClassificationSession();
         }
     }
 
-    public static boolean isTerminal(@ActionType int actionType) {
-        switch (actionType) {
-            case ActionType.OVERTYPE: // fall through
-            case ActionType.COPY: // fall through
-            case ActionType.PASTE: // fall through
-            case ActionType.CUT: // fall through
-            case ActionType.SHARE: // fall through
-            case ActionType.SMART_SHARE: // fall through
-            case ActionType.DRAG: // fall through
-            case ActionType.ABANDON: // fall through
-            case ActionType.OTHER: // fall through
-                return true;
-            default:
-                return false;
+    public TextClassifier createSession(Context context, boolean editable) {
+        TextClassificationContext textClassificationContext =
+                new TextClassificationContext
+                        .Builder(mContext.getPackageName(),
+                                editable ? TextClassifier.WIDGET_TYPE_EDIT_WEBVIEW
+                                         : TextClassifier.WIDGET_TYPE_WEBVIEW)
+                        .build();
+        TextClassificationManager tcm = (TextClassificationManager) context.getSystemService(
+                Context.TEXT_CLASSIFICATION_SERVICE);
+        return tcm.createTextClassificationSession(textClassificationContext);
+    }
+
+    private void endTextClassificationSession() {
+        if (mSession == null || mSession.isDestroyed()) {
+            return;
         }
+        mSession.destroy();
+        mSession = null;
+    }
+
+    public void logEvent(SelectionEvent selectionEvent) {
+        mSession.onSelectionEvent(selectionEvent);
     }
 }
diff --git a/content/public/android/java/src/org/chromium/content/browser/selection/SmartSelectionProvider.java b/content/public/android/java/src/org/chromium/content/browser/selection/SmartSelectionProvider.java
index 6813a37..2431f37 100644
--- a/content/public/android/java/src/org/chromium/content/browser/selection/SmartSelectionProvider.java
+++ b/content/public/android/java/src/org/chromium/content/browser/selection/SmartSelectionProvider.java
@@ -73,8 +73,16 @@
         }
     }
 
+    @TargetApi(Build.VERSION_CODES.O)
     public void setTextClassifier(TextClassifier textClassifier) {
         mTextClassifier = textClassifier;
+
+        Context context = mWindowAndroid.getContext().get();
+        if (context == null) {
+            return;
+        }
+        ((TextClassificationManager) context.getSystemService(Context.TEXT_CLASSIFICATION_SERVICE))
+                .setTextClassifier(textClassifier);
     }
 
     // TODO(wnwen): Remove this suppression once the constant is added to lint.
diff --git a/content/public/android/junit/src/org/chromium/content/browser/selection/SmartSelectionMetricsLoggerTest.java b/content/public/android/junit/src/org/chromium/content/browser/selection/SmartSelectionMetricsLoggerTest.java
index 9dc3930..32c7c51 100644
--- a/content/public/android/junit/src/org/chromium/content/browser/selection/SmartSelectionMetricsLoggerTest.java
+++ b/content/public/android/junit/src/org/chromium/content/browser/selection/SmartSelectionMetricsLoggerTest.java
@@ -8,16 +8,21 @@
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.ArgumentMatchers.anyInt;
 import static org.mockito.Mockito.inOrder;
 import static org.mockito.Mockito.never;
 
-import android.content.Context;
+import android.view.textclassifier.SelectionEvent;
+import android.view.textclassifier.TextClassificationManager;
+import android.view.textclassifier.TextClassifier;
+
+import androidx.test.core.app.ApplicationProvider;
 
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.mockito.ArgumentCaptor;
 import org.mockito.InOrder;
+import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.MockitoAnnotations;
 import org.robolectric.annotation.Config;
@@ -25,7 +30,6 @@
 
 import org.chromium.base.test.BaseRobolectricTestRunner;
 import org.chromium.base.test.util.Feature;
-import org.chromium.content.browser.selection.SmartSelectionMetricsLogger.ActionType;
 
 import java.text.BreakIterator;
 
@@ -35,6 +39,9 @@
 @RunWith(BaseRobolectricTestRunner.class)
 @Config(manifest = Config.NONE)
 public class SmartSelectionMetricsLoggerTest {
+    @Mock
+    private TextClassifier mTextClassifier;
+
     // Char index (in 10s)         0         1         2         3         4
     // Word index (thou)          -7-6   -5-4   -3-2        -1   0    1    2
     private static String sText = "O Romeo, Romeo! Wherefore art thou Romeo?\n"
@@ -47,26 +54,16 @@
             //       3         4         5
             // 4   567  8  9      0  1 2      34
             + "And I’ll no longer be a Capulet.\n";
-    private static class TestSmartSelectionMetricsLogger extends SmartSelectionMetricsLogger {
-        public TestSmartSelectionMetricsLogger(SelectionEventProxy selectionEventProxy) {
-            super(selectionEventProxy);
-        }
-
-        @Override
-        public void logEvent(Object selectionEvent) {
-            // no-op
-        }
-
-        @Override
-        public Object createTracker(Context context, boolean editable) {
-            return new Object();
-        }
-    }
 
     @Before
     public void setUp() {
         MockitoAnnotations.initMocks(this);
         ShadowLog.stream = System.out;
+
+        TextClassificationManager tcm =
+                ApplicationProvider.getApplicationContext().getSystemService(
+                        TextClassificationManager.class);
+        tcm.setTextClassifier(mTextClassifier);
     }
 
     @Test
@@ -306,146 +303,221 @@
     @Test
     @Feature({"TextInput", "SmartSelection"})
     public void testNormalLoggingFlow() {
-        SmartSelectionMetricsLogger.SelectionEventProxy selectionEventProxy =
-                Mockito.mock(SmartSelectionMetricsLogger.SelectionEventProxy.class);
-        TestSmartSelectionMetricsLogger logger =
-                new TestSmartSelectionMetricsLogger(selectionEventProxy);
-        InOrder order = inOrder(selectionEventProxy);
+        SmartSelectionMetricsLogger logger =
+                SmartSelectionMetricsLogger.create(ApplicationProvider.getApplicationContext());
+        ArgumentCaptor<SelectionEvent> captor = ArgumentCaptor.forClass(SelectionEvent.class);
+        InOrder inOrder = inOrder(mTextClassifier);
 
         // Start to select, selected "thou" in row#1.
         logger.logSelectionStarted("thou", 30, /* editable = */ false);
-        order.verify(selectionEventProxy).createSelectionStarted(0);
+        inOrder.verify(mTextClassifier).onSelectionEvent(captor.capture());
+        SelectionEvent selectionEvent = captor.getValue();
+        assertSelectionStartedEvent(selectionEvent);
 
         // Smart Selection, expand to "Wherefore art thou Romeo?".
         logger.logSelectionModified("Wherefore art thou Romeo?", 16, null);
-        order.verify(selectionEventProxy).createSelectionModified(-2, 3);
+        inOrder.verify(mTextClassifier).onSelectionEvent(captor.capture());
+        selectionEvent = captor.getValue();
+        assertEvent(selectionEvent, SelectionEvent.EVENT_SELECTION_MODIFIED, /*expectedStart=*/-2,
+                /*expectedEnd=*/3);
 
         // Smart Selection reset, to the last Romeo in row#1.
-        logger.logSelectionAction("Romeo", 35, ActionType.RESET, null);
-        order.verify(selectionEventProxy).createSelectionAction(1, 2, ActionType.RESET);
+        logger.logSelectionAction("Romeo", 35, SelectionEvent.ACTION_RESET, null);
+        inOrder.verify(mTextClassifier).onSelectionEvent(captor.capture());
+        selectionEvent = captor.getValue();
+        assertEquals(SelectionEvent.ACTION_RESET, selectionEvent.getEventType());
+        assertEvent(selectionEvent, SelectionEvent.ACTION_RESET, /*expectedStart=*/1,
+                /*expectedEnd=*/2);
 
         // User clear selection.
-        logger.logSelectionAction("Romeo", 35, ActionType.ABANDON, null);
-        order.verify(selectionEventProxy).createSelectionAction(1, 2, ActionType.ABANDON);
+        logger.logSelectionAction("Romeo", 35, SelectionEvent.ACTION_ABANDON, null);
+        inOrder.verify(mTextClassifier).onSelectionEvent(captor.capture());
+        selectionEvent = captor.getValue();
+        assertEvent(selectionEvent, SelectionEvent.ACTION_ABANDON, /*expectedStart=*/1,
+                /*expectedEnd=*/2);
 
         // User start a new selection without abandon.
         logger.logSelectionStarted("thou", 30, /* editable = */ false);
-        order.verify(selectionEventProxy).createSelectionStarted(0);
+        inOrder.verify(mTextClassifier).onSelectionEvent(captor.capture());
+        selectionEvent = captor.getValue();
+        assertSelectionStartedEvent(selectionEvent);
 
         // Smart Selection, expand to "Wherefore art thou Romeo?".
         logger.logSelectionModified("Wherefore art thou Romeo?", 16, null);
-        order.verify(selectionEventProxy).createSelectionModified(-2, 3);
+        inOrder.verify(mTextClassifier).onSelectionEvent(captor.capture());
+        selectionEvent = captor.getValue();
+        assertEvent(selectionEvent, SelectionEvent.EVENT_SELECTION_MODIFIED, /*expectedStart=*/-2,
+                /*expectedEnd=*/3);
 
         // COPY, PASTE, CUT, SHARE, SMART_SHARE are basically the same.
-        logger.logSelectionAction("Wherefore art thou Romeo?", 16, ActionType.COPY, null);
-        order.verify(selectionEventProxy).createSelectionAction(-2, 3, ActionType.COPY);
+        logger.logSelectionAction(
+                "Wherefore art thou Romeo?", 16, SelectionEvent.ACTION_COPY, null);
+        inOrder.verify(mTextClassifier).onSelectionEvent(captor.capture());
+        selectionEvent = captor.getValue();
+        assertEvent(selectionEvent, SelectionEvent.ACTION_COPY, /*expectedStart=*/-2,
+                /*expectedEnd=*/3);
 
         // SELECT_ALL
         logger.logSelectionStarted("thou", 30, /* editable = */ true);
-        order.verify(selectionEventProxy).createSelectionStarted(0);
+        inOrder.verify(mTextClassifier).onSelectionEvent(captor.capture());
+        selectionEvent = captor.getValue();
+        assertSelectionStartedEvent(selectionEvent);
 
-        logger.logSelectionAction(sText, 0, ActionType.SELECT_ALL, null);
-        order.verify(selectionEventProxy).createSelectionAction(-7, 34, ActionType.SELECT_ALL);
+        logger.logSelectionAction(sText, 0, SelectionEvent.ACTION_SELECT_ALL, null);
+        inOrder.verify(mTextClassifier).onSelectionEvent(captor.capture());
+        selectionEvent = captor.getValue();
+        assertEvent(selectionEvent, SelectionEvent.ACTION_SELECT_ALL, /*expectedStart=*/-7,
+                /*expectedEnd=*/34);
     }
 
     @Test
     @Feature({"TextInput", "SmartSelection"})
     public void testMultipleDrag() {
-        SmartSelectionMetricsLogger.SelectionEventProxy selectionEventProxy =
-                Mockito.mock(SmartSelectionMetricsLogger.SelectionEventProxy.class);
-        TestSmartSelectionMetricsLogger logger =
-                new TestSmartSelectionMetricsLogger(selectionEventProxy);
-        InOrder order = inOrder(selectionEventProxy);
+        SmartSelectionMetricsLogger logger =
+                SmartSelectionMetricsLogger.create(ApplicationProvider.getApplicationContext());
+        ArgumentCaptor<SelectionEvent> captor = ArgumentCaptor.forClass(SelectionEvent.class);
+        InOrder inOrder = inOrder(mTextClassifier);
+
         // Start new selection. First "Deny" in row#2.
         logger.logSelectionStarted("Deny", 42, /* editable = */ false);
-        order.verify(selectionEventProxy).createSelectionStarted(0);
+        inOrder.verify(mTextClassifier).onSelectionEvent(captor.capture());
+        SelectionEvent selectionEvent = captor.getValue();
+        assertSelectionStartedEvent(selectionEvent);
 
         // Drag right handle to "father".
         logger.logSelectionModified("Deny thy father", 42, null);
-        order.verify(selectionEventProxy).createSelectionModified(0, 3);
+        inOrder.verify(mTextClassifier).onSelectionEvent(captor.capture());
+        selectionEvent = captor.getValue();
+        assertEvent(selectionEvent, SelectionEvent.EVENT_SELECTION_MODIFIED, /*expectedStart=*/0,
+                /*expectedEnd=*/3);
 
         // Drag left handle to " and refuse"
         logger.logSelectionModified(" and refuse", 57, null);
-        order.verify(selectionEventProxy).createSelectionModified(3, 5);
+        inOrder.verify(mTextClassifier).onSelectionEvent(captor.capture());
+        selectionEvent = captor.getValue();
+        assertEvent(selectionEvent, SelectionEvent.EVENT_SELECTION_MODIFIED, /*expectedStart=*/3,
+                /*expectedEnd=*/5);
 
         // Drag right handle to " Romeo?\nDeny thy father".
         logger.logSelectionModified(" Romeo?\nDeny thy father", 34, null);
-        order.verify(selectionEventProxy).createSelectionModified(-2, 3);
+        inOrder.verify(mTextClassifier).onSelectionEvent(captor.capture());
+        selectionEvent = captor.getValue();
+        assertEvent(selectionEvent, SelectionEvent.EVENT_SELECTION_MODIFIED, /*expectedStart=*/-2,
+                /*expectedEnd=*/3);
 
         // Dismiss the selection.
-        logger.logSelectionAction(" Romeo?\nDeny thy father", 34, ActionType.ABANDON, null);
-        order.verify(selectionEventProxy).createSelectionAction(-2, 3, ActionType.ABANDON);
+        logger.logSelectionAction(
+                " Romeo?\nDeny thy father", 34, SelectionEvent.ACTION_ABANDON, null);
+        inOrder.verify(mTextClassifier).onSelectionEvent(captor.capture());
+        selectionEvent = captor.getValue();
+        assertEvent(selectionEvent, SelectionEvent.ACTION_ABANDON, /*expectedStart=*/-2,
+                /*expectedEnd=*/3);
 
         // Start a new selection.
         logger.logSelectionStarted("Deny", 42, /* editable = */ false);
-        order.verify(selectionEventProxy).createSelectionStarted(0);
+        inOrder.verify(mTextClassifier).onSelectionEvent(captor.capture());
+        selectionEvent = captor.getValue();
+        assertSelectionStartedEvent(selectionEvent);
     }
 
     @Test
     @Feature({"TextInput", "SmartSelection"})
     public void testTextShift() {
-        SmartSelectionMetricsLogger.SelectionEventProxy selectionEventProxy =
-                Mockito.mock(SmartSelectionMetricsLogger.SelectionEventProxy.class);
-        TestSmartSelectionMetricsLogger logger =
-                new TestSmartSelectionMetricsLogger(selectionEventProxy);
-        InOrder order = inOrder(selectionEventProxy);
+        SmartSelectionMetricsLogger logger =
+                SmartSelectionMetricsLogger.create(ApplicationProvider.getApplicationContext());
+        ArgumentCaptor<SelectionEvent> captor = ArgumentCaptor.forClass(SelectionEvent.class);
+        InOrder inOrder = inOrder(mTextClassifier);
 
         // Start to select, selected "thou" in row#1.
         logger.logSelectionStarted("thou", 30, /* editable = */ false);
-        order.verify(selectionEventProxy).createSelectionStarted(0);
+        inOrder.verify(mTextClassifier).onSelectionEvent(captor.capture());
+        SelectionEvent selectionEvent = captor.getValue();
+        assertSelectionStartedEvent(selectionEvent);
 
         // Smart Selection, expand to "Wherefore art thou Romeo?".
         logger.logSelectionModified("Wherefore art thou Romeo?", 30, null);
-        order.verify(selectionEventProxy, never()).createSelectionModified(anyInt(), anyInt());
+        inOrder.verify(mTextClassifier, never())
+                .onSelectionEvent(Mockito.any(SelectionEvent.class));
 
         // Start to select, selected "thou" in row#1.
         logger.logSelectionStarted("thou", 30, /* editable = */ false);
-        order.verify(selectionEventProxy).createSelectionStarted(0);
+        inOrder.verify(mTextClassifier).onSelectionEvent(captor.capture());
+        selectionEvent = captor.getValue();
+        assertSelectionStartedEvent(selectionEvent);
 
         // Drag. Non-intersect case.
         logger.logSelectionModified("Wherefore art thou", 10, null);
-        order.verify(selectionEventProxy, never()).createSelectionModified(anyInt(), anyInt());
+        inOrder.verify(mTextClassifier, never())
+                .onSelectionEvent(Mockito.any(SelectionEvent.class));
 
         // Start to select, selected "thou" in row#1.
         logger.logSelectionStarted("thou", 30, /* editable = */ false);
-        order.verify(selectionEventProxy).createSelectionStarted(0);
+        inOrder.verify(mTextClassifier).onSelectionEvent(captor.capture());
+        selectionEvent = captor.getValue();
+        assertSelectionStartedEvent(selectionEvent);
 
         // Drag. Adjacent case, form "Wherefore art thouthou". Wrong case.
         logger.logSelectionModified("Wherefore art thou", 12, null);
-        order.verify(selectionEventProxy).createSelectionModified(-3, 0);
+        inOrder.verify(mTextClassifier).onSelectionEvent(captor.capture());
+        selectionEvent = captor.getValue();
+        assertEvent(selectionEvent, SelectionEvent.EVENT_SELECTION_MODIFIED, /*expectedStart=*/-3,
+                /*expectedEnd=*/0);
     }
 
     @Test
     @Feature({"TextInput", "SmartSelection"})
     public void testSelectionChanged() {
-        SmartSelectionMetricsLogger.SelectionEventProxy selectionEventProxy =
-                Mockito.mock(SmartSelectionMetricsLogger.SelectionEventProxy.class);
-        TestSmartSelectionMetricsLogger logger =
-                new TestSmartSelectionMetricsLogger(selectionEventProxy);
-        InOrder order = inOrder(selectionEventProxy);
+        SmartSelectionMetricsLogger logger =
+                SmartSelectionMetricsLogger.create(ApplicationProvider.getApplicationContext());
+        ArgumentCaptor<SelectionEvent> captor = ArgumentCaptor.forClass(SelectionEvent.class);
+        InOrder inOrder = inOrder(mTextClassifier);
 
         // Start to select, selected "thou" in row#1.
         logger.logSelectionStarted("thou", 30, /* editable = */ false);
-        order.verify(selectionEventProxy).createSelectionStarted(0);
+        inOrder.verify(mTextClassifier).onSelectionEvent(captor.capture());
+        SelectionEvent selectionEvent = captor.getValue();
+        assertSelectionStartedEvent(selectionEvent);
 
         // Change "thou" to "math".
         logger.logSelectionModified("Wherefore art math", 16, null);
-        order.verify(selectionEventProxy, never()).createSelectionModified(anyInt(), anyInt());
+        inOrder.verify(mTextClassifier, never())
+                .onSelectionEvent(Mockito.any(SelectionEvent.class));
 
         // Start to select, selected "thou" in row#1.
         logger.logSelectionStarted("thou", 30, /* editable = */ false);
-        order.verify(selectionEventProxy).createSelectionStarted(0);
+        inOrder.verify(mTextClassifier).onSelectionEvent(captor.capture());
+        selectionEvent = captor.getValue();
+        assertSelectionStartedEvent(selectionEvent);
 
         // Drag while deleting "art ". Wrong case.
         logger.logSelectionModified("Wherefore thou", 16, null);
-        order.verify(selectionEventProxy).createSelectionModified(-2, 0);
+        inOrder.verify(mTextClassifier).onSelectionEvent(captor.capture());
+        selectionEvent = captor.getValue();
+        assertEvent(selectionEvent, SelectionEvent.EVENT_SELECTION_MODIFIED, /*expectedStart=*/-2,
+                /*expectedEnd=*/0);
 
         // Start to select, selected "thou" in row#1.
         logger.logSelectionStarted("thou", 30, /* editable = */ false);
-        order.verify(selectionEventProxy).createSelectionStarted(0);
+        inOrder.verify(mTextClassifier).onSelectionEvent(captor.capture());
+        selectionEvent = captor.getValue();
+        assertSelectionStartedEvent(selectionEvent);
 
         // Drag while deleting "Wherefore art ".
         logger.logSelectionModified("thou", 16, null);
-        order.verify(selectionEventProxy, never()).createSelectionModified(anyInt(), anyInt());
+        inOrder.verify(mTextClassifier, never())
+                .onSelectionEvent(Mockito.any(SelectionEvent.class));
+    }
+
+    private static void assertSelectionStartedEvent(SelectionEvent event) {
+        assertEquals(SelectionEvent.EVENT_SELECTION_STARTED, event.getEventType());
+        assertEquals(0, event.getStart());
+        assertEquals(1, event.getEnd());
+    }
+
+    private static void assertEvent(
+            SelectionEvent event, int eventType, int expectedStart, int expectedEnd) {
+        assertEquals(eventType, event.getEventType());
+        assertEquals(expectedStart, event.getStart());
+        assertEquals(expectedEnd, event.getEnd());
     }
 }
diff --git a/content/public/browser/render_process_host.h b/content/public/browser/render_process_host.h
index 6eb36c59..cf93c79 100644
--- a/content/public/browser/render_process_host.h
+++ b/content/public/browser/render_process_host.h
@@ -538,7 +538,8 @@
   // Binds |receiver| to an instance of PaymentManager. This is for internal
   // use only, and is only exposed here to support MockRenderProcessHost usage
   // in tests.
-  virtual void CreatePaymentManager(
+  virtual void CreatePaymentManagerForOrigin(
+      const url::Origin& origin,
       mojo::PendingReceiver<payments::mojom::PaymentManager> receiver) = 0;
 
   // Returns the current number of active views in this process.  Excludes
diff --git a/content/public/test/browser_test_utils.cc b/content/public/test/browser_test_utils.cc
index 1ce760d5..0dfaf8e 100644
--- a/content/public/test/browser_test_utils.cc
+++ b/content/public/test/browser_test_utils.cc
@@ -3192,7 +3192,7 @@
                      int process_id,
                      int render_frame_id,
                      int load_flags) {
-  network::mojom::URLLoaderFactoryPtr url_loader_factory;
+  mojo::Remote<network::mojom::URLLoaderFactory> url_loader_factory;
   network::mojom::URLLoaderFactoryParamsPtr url_loader_factory_params =
       network::mojom::URLLoaderFactoryParams::New();
   url_loader_factory_params->process_id = process_id;
@@ -3200,12 +3200,13 @@
   url::Origin origin = url::Origin::Create(url);
   url_loader_factory_params->network_isolation_key =
       net::NetworkIsolationKey(origin, origin);
-  network_context->CreateURLLoaderFactory(MakeRequest(&url_loader_factory),
-                                          std::move(url_loader_factory_params));
-  // |url_loader_factory| will receive error notification asynchronously if
-  // |network_context| has already encountered error. However it's still false
+  network_context->CreateURLLoaderFactory(
+      url_loader_factory.BindNewPipeAndPassReceiver(),
+      std::move(url_loader_factory_params));
+  // |url_loader_factory| will receive disconnect notification asynchronously if
+  // |network_context| is already disconnected. However it's still false
   // at this point.
-  EXPECT_FALSE(url_loader_factory.encountered_error());
+  EXPECT_TRUE(url_loader_factory.is_connected());
 
   auto request = std::make_unique<network::ResourceRequest>();
   request->url = url;
diff --git a/content/public/test/browser_test_utils.h b/content/public/test/browser_test_utils.h
index f3aa02f..457989c 100644
--- a/content/public/test/browser_test_utils.h
+++ b/content/public/test/browser_test_utils.h
@@ -39,7 +39,7 @@
 #include "ipc/message_filter.h"
 #include "net/base/load_flags.h"
 #include "services/network/public/mojom/network_service.mojom.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/blink/public/platform/web_input_event.h"
 #include "third_party/blink/public/platform/web_mouse_event.h"
diff --git a/content/public/test/mock_render_process_host.h b/content/public/test/mock_render_process_host.h
index b7068ddc..911a50b 100644
--- a/content/public/test/mock_render_process_host.h
+++ b/content/public/test/mock_render_process_host.h
@@ -27,6 +27,7 @@
 #include "media/media_buildflags.h"
 #include "mojo/public/cpp/bindings/associated_remote.h"
 #include "mojo/public/cpp/bindings/pending_receiver.h"
+#include "mojo/public/cpp/bindings/pending_remote.h"
 #include "net/base/network_isolation_key.h"
 #include "services/service_manager/public/cpp/identity.h"
 #include "services/service_manager/public/cpp/interface_provider.h"
@@ -73,7 +74,7 @@
   using CreateNetworkFactoryCallback = base::RepeatingCallback<void(
       mojo::PendingReceiver<network::mojom::URLLoaderFactory> receiver,
       int process_id,
-      network::mojom::URLLoaderFactoryPtrInfo original_factory)>;
+      mojo::PendingRemote<network::mojom::URLLoaderFactory> original_factory)>;
   static void SetNetworkFactory(
       const CreateNetworkFactoryCallback& url_loader_factory_callback);
 
@@ -194,7 +195,8 @@
       const url::Origin& origin,
       mojo::PendingReceiver<blink::mojom::PermissionService> receiver)
       override {}
-  void CreatePaymentManager(
+  void CreatePaymentManagerForOrigin(
+      const url::Origin& origin,
       mojo::PendingReceiver<payments::mojom::PaymentManager> receiver)
       override {}
   void CleanupCorbExceptionForPluginUponDestruction() override;
diff --git a/content/public/test/url_loader_interceptor.cc b/content/public/test/url_loader_interceptor.cc
index 20b958a..b03920ad 100644
--- a/content/public/test/url_loader_interceptor.cc
+++ b/content/public/test/url_loader_interceptor.cc
@@ -27,6 +27,7 @@
 #include "content/public/browser/browser_thread.h"
 #include "content/public/test/mock_render_process_host.h"
 #include "mojo/public/cpp/bindings/receiver_set.h"
+#include "mojo/public/cpp/bindings/remote.h"
 #include "net/http/http_util.h"
 #include "net/test/embedded_test_server/request_handler_util.h"
 #include "services/network/public/cpp/features.h"
@@ -92,7 +93,7 @@
   void CreateURLLoaderFactoryForSubresources(
       mojo::PendingReceiver<network::mojom::URLLoaderFactory> receiver,
       int process_id,
-      network::mojom::URLLoaderFactoryPtrInfo original_factory);
+      mojo::PendingRemote<network::mojom::URLLoaderFactory> original_factory);
 
   bool Intercept(RequestParams* params) {
     // The lock ensures that |URLLoaderInterceptor| can't be deleted while it
@@ -139,8 +140,8 @@
     DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
 
     auto proxied_receiver = std::move(*receiver);
-    network::mojom::URLLoaderFactoryPtr target_factory;
-    *receiver = mojo::MakeRequest(&target_factory);
+    mojo::PendingRemote<network::mojom::URLLoaderFactory> target_factory;
+    *receiver = target_factory.InitWithNewPipeAndPassReceiver();
 
     navigation_wrappers_.emplace(
         std::make_unique<URLLoaderFactoryNavigationWrapper>(
@@ -352,7 +353,7 @@
  public:
   URLLoaderFactoryNavigationWrapper(
       mojo::PendingReceiver<network::mojom::URLLoaderFactory> receiver,
-      network::mojom::URLLoaderFactoryPtr target_factory,
+      mojo::PendingRemote<network::mojom::URLLoaderFactory> target_factory,
       URLLoaderInterceptor::IOState* parent)
       : target_factory_(std::move(target_factory)) {
     interceptor_ = std::make_unique<Interceptor>(
@@ -365,7 +366,7 @@
 
  private:
   std::unique_ptr<Interceptor> interceptor_;
-  network::mojom::URLLoaderFactoryPtr target_factory_;
+  mojo::Remote<network::mojom::URLLoaderFactory> target_factory_;
 };
 
 // This class intercepts calls to
@@ -375,7 +376,7 @@
   BrowserProcessWrapper(
       mojo::PendingReceiver<network::mojom::URLLoaderFactory> factory_receiver,
       URLLoaderInterceptor::IOState* parent,
-      network::mojom::URLLoaderFactoryPtr original_factory)
+      mojo::PendingRemote<network::mojom::URLLoaderFactory> original_factory)
       : interceptor_(
             parent,
             base::BindRepeating([]() { return 0; }),
@@ -393,7 +394,7 @@
   }
 
   Interceptor interceptor_;
-  network::mojom::URLLoaderFactoryPtr original_factory_;
+  mojo::Remote<network::mojom::URLLoaderFactory> original_factory_;
 
   DISALLOW_COPY_AND_ASSIGN(BrowserProcessWrapper);
 };
@@ -406,7 +407,7 @@
       mojo::PendingReceiver<network::mojom::URLLoaderFactory> factory_receiver,
       int process_id,
       URLLoaderInterceptor::IOState* parent,
-      network::mojom::URLLoaderFactoryPtrInfo original_factory)
+      mojo::PendingRemote<network::mojom::URLLoaderFactory> original_factory)
       : interceptor_(
             parent,
             base::BindRepeating([](int process_id) { return process_id; },
@@ -428,7 +429,7 @@
   }
 
   Interceptor interceptor_;
-  network::mojom::URLLoaderFactoryPtr original_factory_;
+  mojo::Remote<network::mojom::URLLoaderFactory> original_factory_;
 
   DISALLOW_COPY_AND_ASSIGN(SubresourceWrapper);
 };
@@ -611,7 +612,7 @@
 void URLLoaderInterceptor::CreateURLLoaderFactoryForSubresources(
     mojo::PendingReceiver<network::mojom::URLLoaderFactory> receiver,
     int process_id,
-    network::mojom::URLLoaderFactoryPtrInfo original_factory) {
+    mojo::PendingRemote<network::mojom::URLLoaderFactory> original_factory) {
   if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
     base::PostTask(
         FROM_HERE, {BrowserThread::IO},
@@ -625,13 +626,13 @@
       std::move(receiver), process_id, std::move(original_factory));
 }
 
-network::mojom::URLLoaderFactoryPtr
+mojo::PendingRemote<network::mojom::URLLoaderFactory>
 URLLoaderInterceptor::GetURLLoaderFactoryForBrowserProcess(
-    network::mojom::URLLoaderFactoryPtr original_factory) {
+    mojo::PendingRemote<network::mojom::URLLoaderFactory> original_factory) {
   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
-  network::mojom::URLLoaderFactoryPtr loader_factory;
+  mojo::PendingRemote<network::mojom::URLLoaderFactory> loader_factory;
   browser_process_interceptors_.emplace(std::make_unique<BrowserProcessWrapper>(
-      mojo::MakeRequest(&loader_factory), io_thread_.get(),
+      loader_factory.InitWithNewPipeAndPassReceiver(), io_thread_.get(),
       std::move(original_factory)));
   return loader_factory;
 }
@@ -641,8 +642,8 @@
   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
 
   auto proxied_receiver = std::move(*receiver);
-  network::mojom::URLLoaderFactoryPtr target_factory;
-  *receiver = mojo::MakeRequest(&target_factory);
+  mojo::PendingRemote<network::mojom::URLLoaderFactory> target_factory;
+  *receiver = target_factory.InitWithNewPipeAndPassReceiver();
 
   navigation_wrappers_.emplace(
       std::make_unique<URLLoaderFactoryNavigationWrapper>(
@@ -703,7 +704,7 @@
 void URLLoaderInterceptor::IOState::CreateURLLoaderFactoryForSubresources(
     mojo::PendingReceiver<network::mojom::URLLoaderFactory> receiver,
     int process_id,
-    network::mojom::URLLoaderFactoryPtrInfo original_factory) {
+    mojo::PendingRemote<network::mojom::URLLoaderFactory> original_factory) {
   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
   subresource_wrappers_.emplace(std::make_unique<SubresourceWrapper>(
       std::move(receiver), process_id, this, std::move(original_factory)));
diff --git a/content/public/test/url_loader_interceptor.h b/content/public/test/url_loader_interceptor.h
index ce534d2f..f295692 100644
--- a/content/public/test/url_loader_interceptor.h
+++ b/content/public/test/url_loader_interceptor.h
@@ -13,6 +13,7 @@
 #include "base/macros.h"
 #include "base/memory/scoped_refptr.h"
 #include "mojo/public/cpp/bindings/pending_receiver.h"
+#include "mojo/public/cpp/bindings/pending_remote.h"
 #include "net/base/net_errors.h"
 #include "net/traffic_annotation/network_traffic_annotation.h"
 #include "services/network/public/mojom/url_loader.mojom.h"
@@ -150,13 +151,14 @@
   void CreateURLLoaderFactoryForSubresources(
       mojo::PendingReceiver<network::mojom::URLLoaderFactory> receiver,
       int process_id,
-      network::mojom::URLLoaderFactoryPtrInfo original_factory);
+      mojo::PendingRemote<network::mojom::URLLoaderFactory> original_factory);
 
   // Callback on UI thread whenever a
   // StoragePartition::GetURLLoaderFactoryForBrowserProcess is called on an
   // object that doesn't have a test factory set up.
-  network::mojom::URLLoaderFactoryPtr GetURLLoaderFactoryForBrowserProcess(
-      network::mojom::URLLoaderFactoryPtr original_factory);
+  mojo::PendingRemote<network::mojom::URLLoaderFactory>
+  GetURLLoaderFactoryForBrowserProcess(
+      mojo::PendingRemote<network::mojom::URLLoaderFactory> original_factory);
 
   // Callback on IO thread whenever a NavigationURLLoaderImpl is loading a frame
   // request through ResourceDispatcherHost (i.e. when the network service is
diff --git a/content/renderer/loader/child_url_loader_factory_bundle.cc b/content/renderer/loader/child_url_loader_factory_bundle.cc
index 69bf7a5..17e7e28 100644
--- a/content/renderer/loader/child_url_loader_factory_bundle.cc
+++ b/content/renderer/loader/child_url_loader_factory_bundle.cc
@@ -133,7 +133,8 @@
         pending_appcache_factory,
     SchemeMap pending_scheme_specific_factories,
     OriginMap pending_isolated_world_factories,
-    network::mojom::URLLoaderFactoryPtrInfo direct_network_factory_info,
+    mojo::PendingRemote<network::mojom::URLLoaderFactory>
+        direct_network_factory_remote,
     mojo::PendingRemote<network::mojom::URLLoaderFactory>
         pending_prefetch_loader_factory,
     bool bypass_redirect_checks)
@@ -141,7 +142,7 @@
                                  std::move(pending_scheme_specific_factories),
                                  std::move(pending_isolated_world_factories),
                                  bypass_redirect_checks),
-      direct_network_factory_info_(std::move(direct_network_factory_info)),
+      direct_network_factory_remote_(std::move(direct_network_factory_remote)),
       pending_prefetch_loader_factory_(
           std::move(pending_prefetch_loader_factory)) {
   pending_appcache_factory_ = std::move(pending_appcache_factory);
@@ -158,7 +159,8 @@
       std::move(pending_scheme_specific_factories_);
   other->pending_isolated_world_factories_ =
       std::move(pending_isolated_world_factories_);
-  other->direct_network_factory_info_ = std::move(direct_network_factory_info_);
+  other->direct_network_factory_remote_ =
+      std::move(direct_network_factory_remote_);
   other->pending_prefetch_loader_factory_ =
       std::move(pending_prefetch_loader_factory_);
   other->bypass_redirect_checks_ = bypass_redirect_checks_;
@@ -250,9 +252,9 @@
 
 void ChildURLLoaderFactoryBundle::Update(
     std::unique_ptr<ChildURLLoaderFactoryBundleInfo> info) {
-  if (info->direct_network_factory_info()) {
+  if (info->direct_network_factory_remote()) {
     direct_network_factory_.Bind(
-        std::move(info->direct_network_factory_info()));
+        std::move(info->direct_network_factory_remote()));
   }
   if (info->pending_prefetch_loader_factory()) {
     prefetch_loader_factory_.Bind(
@@ -282,7 +284,8 @@
     return;
 
   if (!direct_network_factory_) {
-    direct_network_factory_ = std::move(direct_network_factory_getter_).Run();
+    direct_network_factory_.Bind(
+        std::move(direct_network_factory_getter_).Run());
   } else {
     direct_network_factory_getter_.Reset();
   }
@@ -306,10 +309,11 @@
         appcache_factory_pending_remote.InitWithNewPipeAndPassReceiver());
   }
 
-  network::mojom::URLLoaderFactoryPtrInfo direct_network_factory_info;
+  mojo::PendingRemote<network::mojom::URLLoaderFactory>
+      direct_network_factory_remote;
   if (direct_network_factory_) {
     direct_network_factory_->Clone(
-        mojo::MakeRequest(&direct_network_factory_info));
+        direct_network_factory_remote.InitWithNewPipeAndPassReceiver());
   }
 
   mojo::PendingRemote<network::mojom::URLLoaderFactory>
@@ -327,7 +331,7 @@
       std::move(appcache_factory_pending_remote),
       CloneRemoteMapToPendingRemoteMap(scheme_specific_factories_),
       CloneRemoteMapToPendingRemoteMap(isolated_world_factories_),
-      std::move(direct_network_factory_info),
+      std::move(direct_network_factory_remote),
       std::move(pending_prefetch_loader_factory), bypass_redirect_checks_);
 }
 
@@ -344,9 +348,10 @@
   if (appcache_factory_)
     pending_appcache_factory = appcache_factory_.Unbind();
 
-  network::mojom::URLLoaderFactoryPtrInfo direct_network_factory_info;
+  mojo::PendingRemote<network::mojom::URLLoaderFactory>
+      direct_network_factory_remote;
   if (direct_network_factory_) {
-    direct_network_factory_info = direct_network_factory_.PassInterface();
+    direct_network_factory_remote = direct_network_factory_.Unbind();
   }
 
   mojo::PendingRemote<network::mojom::URLLoaderFactory>
@@ -359,7 +364,7 @@
       std::move(pending_default_factory), std::move(pending_appcache_factory),
       BoundRemoteMapToPendingRemoteMap(std::move(scheme_specific_factories_)),
       BoundRemoteMapToPendingRemoteMap(std::move(isolated_world_factories_)),
-      std::move(direct_network_factory_info),
+      std::move(direct_network_factory_remote),
       std::move(pending_prefetch_loader_factory), bypass_redirect_checks_);
 }
 
diff --git a/content/renderer/loader/child_url_loader_factory_bundle.h b/content/renderer/loader/child_url_loader_factory_bundle.h
index 9c0716e..c984ac0 100644
--- a/content/renderer/loader/child_url_loader_factory_bundle.h
+++ b/content/renderer/loader/child_url_loader_factory_bundle.h
@@ -13,6 +13,7 @@
 #include "base/optional.h"
 #include "content/common/content_export.h"
 #include "content/public/common/transferrable_url_loader.mojom.h"
+#include "mojo/public/cpp/bindings/pending_remote.h"
 #include "mojo/public/cpp/bindings/remote.h"
 #include "services/network/public/mojom/url_loader_factory.mojom.h"
 #include "third_party/blink/public/common/loader/url_loader_factory_bundle.h"
@@ -42,14 +43,16 @@
           pending_default_network_factory,
       SchemeMap pending_scheme_specific_factories,
       OriginMap pending_isolated_world_factories,
-      network::mojom::URLLoaderFactoryPtrInfo direct_network_factory_info,
+      mojo::PendingRemote<network::mojom::URLLoaderFactory>
+          direct_network_factory_remote,
       mojo::PendingRemote<network::mojom::URLLoaderFactory>
           pending_prefetch_loader_factory,
       bool bypass_redirect_checks);
   ~ChildURLLoaderFactoryBundleInfo() override;
 
-  network::mojom::URLLoaderFactoryPtrInfo& direct_network_factory_info() {
-    return direct_network_factory_info_;
+  mojo::PendingRemote<network::mojom::URLLoaderFactory>&
+  direct_network_factory_remote() {
+    return direct_network_factory_remote_;
   }
   mojo::PendingRemote<network::mojom::URLLoaderFactory>&
   pending_prefetch_loader_factory() {
@@ -60,7 +63,8 @@
   // URLLoaderFactoryBundleInfo overrides.
   scoped_refptr<network::SharedURLLoaderFactory> CreateFactory() override;
 
-  network::mojom::URLLoaderFactoryPtrInfo direct_network_factory_info_;
+  mojo::PendingRemote<network::mojom::URLLoaderFactory>
+      direct_network_factory_remote_;
   mojo::PendingRemote<network::mojom::URLLoaderFactory>
       pending_prefetch_loader_factory_;
 
@@ -74,8 +78,8 @@
 class CONTENT_EXPORT ChildURLLoaderFactoryBundle
     : public blink::URLLoaderFactoryBundle {
  public:
-  using FactoryGetterCallback =
-      base::OnceCallback<network::mojom::URLLoaderFactoryPtr()>;
+  using FactoryGetterCallback = base::OnceCallback<
+      mojo::PendingRemote<network::mojom::URLLoaderFactory>()>;
 
   ChildURLLoaderFactoryBundle();
 
@@ -128,7 +132,7 @@
       bool include_appcache);
 
   FactoryGetterCallback direct_network_factory_getter_;
-  network::mojom::URLLoaderFactoryPtr direct_network_factory_;
+  mojo::Remote<network::mojom::URLLoaderFactory> direct_network_factory_;
   mojo::Remote<network::mojom::URLLoaderFactory> prefetch_loader_factory_;
 
   std::map<GURL, mojom::TransferrableURLLoaderPtr> subresource_overrides_;
diff --git a/content/renderer/loader/tracked_child_url_loader_factory_bundle.cc b/content/renderer/loader/tracked_child_url_loader_factory_bundle.cc
index 479467d..080d904 100644
--- a/content/renderer/loader/tracked_child_url_loader_factory_bundle.cc
+++ b/content/renderer/loader/tracked_child_url_loader_factory_bundle.cc
@@ -21,7 +21,8 @@
         pending_appcache_factory,
     SchemeMap pending_scheme_specific_factories,
     OriginMap pending_isolated_world_factories,
-    network::mojom::URLLoaderFactoryPtrInfo direct_network_factory_info,
+    mojo::PendingRemote<network::mojom::URLLoaderFactory>
+        direct_network_factory_remote,
     mojo::PendingRemote<network::mojom::URLLoaderFactory>
         pending_prefetch_loader_factory,
     std::unique_ptr<HostPtrAndTaskRunner> main_thread_host_bundle,
@@ -31,7 +32,7 @@
           std::move(pending_appcache_factory),
           std::move(pending_scheme_specific_factories),
           std::move(pending_isolated_world_factories),
-          std::move(direct_network_factory_info),
+          std::move(direct_network_factory_remote),
           std::move(pending_prefetch_loader_factory),
           bypass_redirect_checks),
       main_thread_host_bundle_(std::move(main_thread_host_bundle)) {}
@@ -48,7 +49,8 @@
       std::move(pending_scheme_specific_factories_);
   other->pending_isolated_world_factories_ =
       std::move(pending_isolated_world_factories_);
-  other->direct_network_factory_info_ = std::move(direct_network_factory_info_);
+  other->direct_network_factory_remote_ =
+      std::move(direct_network_factory_remote_);
   other->pending_prefetch_loader_factory_ =
       std::move(pending_prefetch_loader_factory_);
   other->main_thread_host_bundle_ = std::move(main_thread_host_bundle_);
@@ -89,7 +91,7 @@
       std::move(pending_factories->pending_appcache_factory()),
       std::move(pending_factories->pending_scheme_specific_factories()),
       std::move(pending_factories->pending_isolated_world_factories()),
-      std::move(pending_factories->direct_network_factory_info()),
+      std::move(pending_factories->direct_network_factory_remote()),
       std::move(pending_factories->pending_prefetch_loader_factory()),
       std::move(main_thread_host_bundle_clone),
       pending_factories->bypass_redirect_checks());
@@ -155,7 +157,7 @@
       std::move(pending_factories->pending_appcache_factory()),
       std::move(pending_factories->pending_scheme_specific_factories()),
       std::move(pending_factories->pending_isolated_world_factories()),
-      std::move(pending_factories->direct_network_factory_info()),
+      std::move(pending_factories->direct_network_factory_remote()),
       std::move(pending_factories->pending_prefetch_loader_factory()),
       std::move(main_thread_host_bundle_clone),
       pending_factories->bypass_redirect_checks());
@@ -178,7 +180,7 @@
       std::move(pending_factories->pending_appcache_factory()),
       std::move(pending_factories->pending_scheme_specific_factories()),
       std::move(pending_factories->pending_isolated_world_factories()),
-      std::move(pending_factories->direct_network_factory_info()),
+      std::move(pending_factories->direct_network_factory_remote()),
       std::move(pending_factories->pending_prefetch_loader_factory()),
       std::move(main_thread_host_bundle_clone),
       pending_factories->bypass_redirect_checks());
diff --git a/content/renderer/loader/tracked_child_url_loader_factory_bundle.h b/content/renderer/loader/tracked_child_url_loader_factory_bundle.h
index 994f137..7982af2 100644
--- a/content/renderer/loader/tracked_child_url_loader_factory_bundle.h
+++ b/content/renderer/loader/tracked_child_url_loader_factory_bundle.h
@@ -12,6 +12,7 @@
 #include "base/sequenced_task_runner.h"
 #include "content/common/content_export.h"
 #include "content/renderer/loader/child_url_loader_factory_bundle.h"
+#include "mojo/public/cpp/bindings/pending_remote.h"
 
 namespace content {
 
@@ -36,7 +37,8 @@
           pending_appcache_factory,
       SchemeMap pending_scheme_specific_factories,
       OriginMap pending_isolated_world_factories,
-      network::mojom::URLLoaderFactoryPtrInfo direct_network_factory_info,
+      mojo::PendingRemote<network::mojom::URLLoaderFactory>
+          direct_network_factory_remote,
       mojo::PendingRemote<network::mojom::URLLoaderFactory>
           pending_prefetch_loader_factory,
       std::unique_ptr<HostPtrAndTaskRunner> main_thread_host_bundle,
diff --git a/content/renderer/loader/web_worker_fetch_context_impl.cc b/content/renderer/loader/web_worker_fetch_context_impl.cc
index ab6286e6..4eb762e 100644
--- a/content/renderer/loader/web_worker_fetch_context_impl.cc
+++ b/content/renderer/loader/web_worker_fetch_context_impl.cc
@@ -412,7 +412,7 @@
   return std::make_unique<WebURLLoaderFactoryImpl>(
       resource_dispatcher_->GetWeakPtr(),
       base::MakeRefCounted<network::WrapperSharedURLLoaderFactory>(
-          network::mojom::URLLoaderFactoryPtrInfo(
+          mojo::PendingRemote<network::mojom::URLLoaderFactory>(
               std::move(url_loader_factory_handle),
               network::mojom::URLLoaderFactory::Version_)));
 }
diff --git a/content/renderer/pepper/pepper_file_system_host.cc b/content/renderer/pepper/pepper_file_system_host.cc
index 4a85e16..20d65bd 100644
--- a/content/renderer/pepper/pepper_file_system_host.cc
+++ b/content/renderer/pepper/pepper_file_system_host.cc
@@ -19,7 +19,7 @@
 #include "ppapi/proxy/ppapi_messages.h"
 #include "ppapi/shared_impl/file_system_util.h"
 #include "ppapi/shared_impl/file_type_conversion.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "third_party/blink/public/mojom/filesystem/file_system.mojom.h"
 #include "third_party/blink/public/web/web_document.h"
 #include "third_party/blink/public/web/web_local_frame.h"
diff --git a/content/renderer/pepper/resource_converter.cc b/content/renderer/pepper/resource_converter.cc
index cb4e045..2566cf3 100644
--- a/content/renderer/pepper/resource_converter.cc
+++ b/content/renderer/pepper/resource_converter.cc
@@ -18,7 +18,7 @@
 #include "ppapi/proxy/ppapi_messages.h"
 #include "ppapi/shared_impl/resource_var.h"
 #include "ppapi/shared_impl/scoped_pp_var.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "third_party/blink/public/platform/web_file_system_type.h"
 #include "third_party/blink/public/platform/web_media_stream_source.h"
 #include "third_party/blink/public/platform/web_media_stream_track.h"
diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h
index 2709a42435..44e7325 100644
--- a/content/renderer/render_thread_impl.h
+++ b/content/renderer/render_thread_impl.h
@@ -43,6 +43,7 @@
 #include "ipc/ipc_sync_channel.h"
 #include "media/media_buildflags.h"
 #include "mojo/public/cpp/bindings/associated_receiver.h"
+#include "mojo/public/cpp/bindings/associated_remote.h"
 #include "mojo/public/cpp/bindings/pending_associated_receiver.h"
 #include "mojo/public/cpp/bindings/pending_receiver.h"
 #include "mojo/public/cpp/bindings/pending_remote.h"
@@ -672,7 +673,7 @@
       std::map<int, scoped_refptr<PendingFrameCreate>>;
   PendingFrameCreateMap pending_frame_creates_;
 
-  mojom::RendererHostAssociatedPtr renderer_host_;
+  mojo::AssociatedRemote<mojom::RendererHost> renderer_host_;
 
   blink::AssociatedInterfaceRegistry associated_interfaces_;
 
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
index a2e3c78..27ff9ff 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -250,7 +250,7 @@
   return std::make_unique<WebURLLoaderFactoryImpl>(
       RenderThreadImpl::current()->resource_dispatcher()->GetWeakPtr(),
       base::MakeRefCounted<network::WrapperSharedURLLoaderFactory>(
-          network::mojom::URLLoaderFactoryPtrInfo(
+          mojo::PendingRemote<network::mojom::URLLoaderFactory>(
               std::move(url_loader_factory_handle),
               network::mojom::URLLoaderFactory::Version_)));
 }
@@ -270,13 +270,14 @@
                      base::Unretained(this)));
 }
 
-network::mojom::URLLoaderFactoryPtr
+mojo::PendingRemote<network::mojom::URLLoaderFactory>
 RendererBlinkPlatformImpl::CreateNetworkURLLoaderFactory() {
   RenderThreadImpl* render_thread = RenderThreadImpl::current();
   DCHECK(render_thread);
-  network::mojom::URLLoaderFactoryPtr factory_ptr;
-  ChildThread::Get()->BindHostReceiver(mojo::MakeRequest(&factory_ptr));
-  return factory_ptr;
+  mojo::PendingRemote<network::mojom::URLLoaderFactory> factory_remote;
+  ChildThread::Get()->BindHostReceiver(
+      factory_remote.InitWithNewPipeAndPassReceiver());
+  return factory_remote;
 }
 
 void RendererBlinkPlatformImpl::SetDisplayThreadPriority(
@@ -561,23 +562,6 @@
   return rtc_dependency_factory->GetWebRtcWorkerThread();
 }
 
-std::unique_ptr<cricket::PortAllocator>
-RendererBlinkPlatformImpl::CreateWebRtcPortAllocator(
-    blink::WebLocalFrame* frame) {
-  auto* rtc_dependency_factory =
-      blink::PeerConnectionDependencyFactory::GetInstance();
-  rtc_dependency_factory->EnsureInitialized();
-  return rtc_dependency_factory->CreatePortAllocator(frame);
-}
-
-std::unique_ptr<webrtc::AsyncResolverFactory>
-RendererBlinkPlatformImpl::CreateWebRtcAsyncResolverFactory() {
-  auto* rtc_dependency_factory =
-      blink::PeerConnectionDependencyFactory::GetInstance();
-  rtc_dependency_factory->EnsureInitialized();
-  return rtc_dependency_factory->CreateAsyncResolverFactory();
-}
-
 //------------------------------------------------------------------------------
 
 base::Optional<double>
diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h
index 68be1b7..291f7a0 100644
--- a/content/renderer/renderer_blink_platform_impl.h
+++ b/content/renderer/renderer_blink_platform_impl.h
@@ -131,10 +131,6 @@
       blink::WebRTCPeerConnectionHandlerClient* client,
       scoped_refptr<base::SingleThreadTaskRunner> task_runner) override;
   scoped_refptr<base::SingleThreadTaskRunner> GetWebRtcWorkerThread() override;
-  std::unique_ptr<cricket::PortAllocator> CreateWebRtcPortAllocator(
-      blink::WebLocalFrame* frame) override;
-  std::unique_ptr<webrtc::AsyncResolverFactory>
-  CreateWebRtcAsyncResolverFactory() override;
   base::Optional<double> GetWebRtcMaxCaptureFrameRate() override;
   scoped_refptr<media::AudioRendererSink> NewAudioRendererSink(
       blink::WebAudioDeviceSourceType source_type,
@@ -215,7 +211,8 @@
   scoped_refptr<ChildURLLoaderFactoryBundle>
   CreateDefaultURLLoaderFactoryBundle();
 
-  network::mojom::URLLoaderFactoryPtr CreateNetworkURLLoaderFactory();
+  mojo::PendingRemote<network::mojom::URLLoaderFactory>
+  CreateNetworkURLLoaderFactory();
 
   // Tells this platform that the renderer is locked to a site (i.e., a scheme
   // plus eTLD+1, such as https://google.com), or to a more specific origin.
diff --git a/content/renderer/service_worker/service_worker_context_client.cc b/content/renderer/service_worker/service_worker_context_client.cc
index 8ae5770..4dd7088 100644
--- a/content/renderer/service_worker/service_worker_context_client.cc
+++ b/content/renderer/service_worker/service_worker_context_client.cc
@@ -142,15 +142,14 @@
     // service.
     // Note that the default factory is the network service factory. It's set
     // on the start worker sequence.
-    network_service_connection_error_handler_holder_.Bind(
+    network_service_disconnect_handler_holder_.Bind(
         std::move(subresource_loaders->pending_default_factory()));
-    network_service_connection_error_handler_holder_->Clone(
+    network_service_disconnect_handler_holder_->Clone(
         subresource_loaders->pending_default_factory()
             .InitWithNewPipeAndPassReceiver());
-    network_service_connection_error_handler_holder_
-        .set_connection_error_handler(base::BindOnce(
-            &ServiceWorkerContextClient::StopWorkerOnInitiatorThread,
-            base::Unretained(this)));
+    network_service_disconnect_handler_holder_.set_disconnect_handler(
+        base::BindOnce(&ServiceWorkerContextClient::StopWorkerOnInitiatorThread,
+                       base::Unretained(this)));
   }
 
   loader_factories_ = base::MakeRefCounted<ChildURLLoaderFactoryBundle>(
diff --git a/content/renderer/service_worker/service_worker_context_client.h b/content/renderer/service_worker/service_worker_context_client.h
index 589539d..52fcf550 100644
--- a/content/renderer/service_worker/service_worker_context_client.h
+++ b/content/renderer/service_worker/service_worker_context_client.h
@@ -22,6 +22,7 @@
 #include "ipc/ipc_listener.h"
 #include "mojo/public/cpp/bindings/pending_associated_remote.h"
 #include "mojo/public/cpp/bindings/pending_receiver.h"
+#include "mojo/public/cpp/bindings/remote.h"
 #include "mojo/public/cpp/bindings/shared_associated_remote.h"
 #include "third_party/blink/public/common/service_worker/service_worker_status_code.h"
 #include "third_party/blink/public/mojom/background_fetch/background_fetch.mojom.h"
@@ -271,9 +272,8 @@
 
   // Out-of-process NetworkService:
   // Detects disconnection from the network service.
-  // TODO(crbug.com/955171): Replace this with Remote.
-  network::mojom::URLLoaderFactoryPtr
-      network_service_connection_error_handler_holder_;
+  mojo::Remote<network::mojom::URLLoaderFactory>
+      network_service_disconnect_handler_holder_;
 
   std::unique_ptr<blink::WebEmbeddedWorker> worker_;
 
diff --git a/content/renderer/service_worker/service_worker_fetch_context_impl.cc b/content/renderer/service_worker/service_worker_fetch_context_impl.cc
index 6620f70..5913d771 100644
--- a/content/renderer/service_worker/service_worker_fetch_context_impl.cc
+++ b/content/renderer/service_worker/service_worker_fetch_context_impl.cc
@@ -15,6 +15,7 @@
 #include "content/renderer/loader/web_url_loader_impl.h"
 #include "content/renderer/loader/web_url_request_util.h"
 #include "ipc/ipc_message.h"
+#include "mojo/public/cpp/bindings/pending_remote.h"
 #include "services/network/public/cpp/wrapper_shared_url_loader_factory.h"
 
 namespace content {
@@ -94,7 +95,7 @@
   return std::make_unique<WebURLLoaderFactoryImpl>(
       resource_dispatcher_->GetWeakPtr(),
       base::MakeRefCounted<network::WrapperSharedURLLoaderFactory>(
-          network::mojom::URLLoaderFactoryPtrInfo(
+          mojo::PendingRemote<network::mojom::URLLoaderFactory>(
               std::move(url_loader_factory_handle),
               network::mojom::URLLoaderFactory::Version_)));
 }
diff --git a/content/renderer/service_worker/service_worker_provider_context.cc b/content/renderer/service_worker/service_worker_provider_context.cc
index a4bbcd64..ca4c727 100644
--- a/content/renderer/service_worker/service_worker_provider_context.cc
+++ b/content/renderer/service_worker/service_worker_provider_context.cc
@@ -127,12 +127,13 @@
          base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN});
     task_runner->PostTask(
         FROM_HERE,
-        base::BindOnce(
-            &CreateSubresourceLoaderFactoryForProviderContext,
-            std::move(remote_container_host), std::move(remote_controller_),
-            client_id_, fallback_loader_factory_->Clone(),
-            controller_connector_.BindNewPipeAndPassReceiver(),
-            mojo::MakeRequest(&subresource_loader_factory_), task_runner));
+        base::BindOnce(&CreateSubresourceLoaderFactoryForProviderContext,
+                       std::move(remote_container_host),
+                       std::move(remote_controller_), client_id_,
+                       fallback_loader_factory_->Clone(),
+                       controller_connector_.BindNewPipeAndPassReceiver(),
+                       subresource_loader_factory_.BindNewPipeAndPassReceiver(),
+                       task_runner));
 
     DCHECK(!weak_wrapped_subresource_loader_factory_);
     weak_wrapped_subresource_loader_factory_ =
diff --git a/content/renderer/service_worker/service_worker_provider_context.h b/content/renderer/service_worker/service_worker_provider_context.h
index 40ac803..d80d27d 100644
--- a/content/renderer/service_worker/service_worker_provider_context.h
+++ b/content/renderer/service_worker/service_worker_provider_context.h
@@ -249,7 +249,7 @@
 
   // Used to intercept requests from the controllee and dispatch them
   // as events to the controller ServiceWorker.
-  network::mojom::URLLoaderFactoryPtr subresource_loader_factory_;
+  mojo::Remote<network::mojom::URLLoaderFactory> subresource_loader_factory_;
 
   // Used when we create |subresource_loader_factory_|.
   scoped_refptr<network::SharedURLLoaderFactory> fallback_loader_factory_;
diff --git a/content/renderer/service_worker/service_worker_subresource_loader_unittest.cc b/content/renderer/service_worker/service_worker_subresource_loader_unittest.cc
index 2f124552..eb3a5e2 100644
--- a/content/renderer/service_worker/service_worker_subresource_loader_unittest.cc
+++ b/content/renderer/service_worker/service_worker_subresource_loader_unittest.cc
@@ -21,10 +21,7 @@
 #include "content/public/test/browser_task_environment.h"
 #include "content/renderer/service_worker/controller_service_worker_connector.h"
 #include "content/test/fake_network_url_loader_factory.h"
-#include "mojo/public/cpp/bindings/pending_receiver.h"
 #include "mojo/public/cpp/bindings/pending_remote.h"
-#include "mojo/public/cpp/bindings/receiver_set.h"
-#include "mojo/public/cpp/bindings/remote.h"
 #include "mojo/public/cpp/bindings/self_owned_receiver.h"
 #include "mojo/public/cpp/system/data_pipe_utils.h"
 #include "net/http/http_util.h"
@@ -474,7 +471,8 @@
             std::move(fake_loader_factory));
   }
 
-  network::mojom::URLLoaderFactoryPtr CreateSubresourceLoaderFactory() {
+  mojo::Remote<network::mojom::URLLoaderFactory>
+  CreateSubresourceLoaderFactory() {
     if (!connector_) {
       mojo::PendingRemote<blink::mojom::ServiceWorkerContainerHost>
           remote_container_host;
@@ -484,10 +482,11 @@
           std::move(remote_container_host),
           mojo::NullRemote() /*remote_controller*/, "" /*client_id*/);
     }
-    network::mojom::URLLoaderFactoryPtr service_worker_url_loader_factory;
+    mojo::Remote<network::mojom::URLLoaderFactory>
+        service_worker_url_loader_factory;
     ServiceWorkerSubresourceLoaderFactory::Create(
         connector_, loader_factory_,
-        mojo::MakeRequest(&service_worker_url_loader_factory),
+        service_worker_url_loader_factory.BindNewPipeAndPassReceiver(),
         blink::scheduler::GetSequencedTaskRunnerForTesting());
     return service_worker_url_loader_factory;
   }
@@ -498,7 +497,7 @@
   // completion. Calling fake_controller_->RunUntilFetchEvent() also advances
   // the load to until |fake_controller_| receives the fetch event.
   void StartRequest(
-      const network::mojom::URLLoaderFactoryPtr& loader_factory,
+      const mojo::Remote<network::mojom::URLLoaderFactory>& loader_factory,
       const network::ResourceRequest& request,
       network::mojom::URLLoaderPtr* out_loader,
       std::unique_ptr<network::TestURLLoaderClient>* out_loader_client) {
@@ -545,7 +544,7 @@
   void RunFallbackWithRequestBodyTest(
       scoped_refptr<network::ResourceRequestBody> request_body,
       const std::string& expected_body) {
-    network::mojom::URLLoaderFactoryPtr factory =
+    mojo::Remote<network::mojom::URLLoaderFactory> factory =
         CreateSubresourceLoaderFactory();
 
     // Create a request with the body.
@@ -580,7 +579,7 @@
   // client after completion.
   std::unique_ptr<network::TestURLLoaderClient> DoRangeRequest(
       const std::string& range_header) {
-    network::mojom::URLLoaderFactoryPtr factory =
+    mojo::Remote<network::mojom::URLLoaderFactory> factory =
         CreateSubresourceLoaderFactory();
     network::ResourceRequest request =
         CreateRequest(GURL("https://www.example.com/big-file"));
@@ -613,7 +612,7 @@
 TEST_F(ServiceWorkerSubresourceLoaderTest, Basic) {
   base::HistogramTester histogram_tester;
 
-  network::mojom::URLLoaderFactoryPtr factory =
+  mojo::Remote<network::mojom::URLLoaderFactory> factory =
       CreateSubresourceLoaderFactory();
   network::ResourceRequest request =
       CreateRequest(GURL("https://www.example.com/foo.png"));
@@ -652,7 +651,7 @@
   fake_controller_.AbortEventWithNoResponse();
   base::HistogramTester histogram_tester;
 
-  network::mojom::URLLoaderFactoryPtr factory =
+  mojo::Remote<network::mojom::URLLoaderFactory> factory =
       CreateSubresourceLoaderFactory();
 
   // Perform the request.
@@ -677,7 +676,7 @@
 }
 
 TEST_F(ServiceWorkerSubresourceLoaderTest, DropController) {
-  network::mojom::URLLoaderFactoryPtr factory =
+  mojo::Remote<network::mojom::URLLoaderFactory> factory =
       CreateSubresourceLoaderFactory();
   {
     network::ResourceRequest request =
@@ -731,7 +730,7 @@
 }
 
 TEST_F(ServiceWorkerSubresourceLoaderTest, NoController) {
-  network::mojom::URLLoaderFactoryPtr factory =
+  mojo::Remote<network::mojom::URLLoaderFactory> factory =
       CreateSubresourceLoaderFactory();
   {
     network::ResourceRequest request =
@@ -778,7 +777,7 @@
 }
 
 TEST_F(ServiceWorkerSubresourceLoaderTest, DropController_RestartFetchEvent) {
-  network::mojom::URLLoaderFactoryPtr factory =
+  mojo::Remote<network::mojom::URLLoaderFactory> factory =
       CreateSubresourceLoaderFactory();
 
   {
@@ -845,7 +844,7 @@
   // Simulate the container host fails to start a service worker.
   fake_container_host_.set_fake_controller(nullptr);
 
-  network::mojom::URLLoaderFactoryPtr factory =
+  mojo::Remote<network::mojom::URLLoaderFactory> factory =
       CreateSubresourceLoaderFactory();
   network::ResourceRequest request =
       CreateRequest(GURL("https://www.example.com/foo.png"));
@@ -887,7 +886,7 @@
   fake_controller_.SetResponseSource(
       network::mojom::FetchResponseSource::kNetwork);
 
-  network::mojom::URLLoaderFactoryPtr factory =
+  mojo::Remote<network::mojom::URLLoaderFactory> factory =
       CreateSubresourceLoaderFactory();
 
   // Perform the request.
@@ -946,7 +945,7 @@
       stream_callback.BindNewPipeAndPassReceiver(),
       std::move(data_pipe.consumer_handle));
 
-  network::mojom::URLLoaderFactoryPtr factory =
+  mojo::Remote<network::mojom::URLLoaderFactory> factory =
       CreateSubresourceLoaderFactory();
 
   // Perform the request.
@@ -1002,7 +1001,7 @@
   fake_controller_.SetResponseSource(
       network::mojom::FetchResponseSource::kCacheStorage);
 
-  network::mojom::URLLoaderFactoryPtr factory =
+  mojo::Remote<network::mojom::URLLoaderFactory> factory =
       CreateSubresourceLoaderFactory();
 
   // Perform the request.
@@ -1059,7 +1058,7 @@
   const std::string kResponseBody = "/* Here is sample text for the Blob. */";
   fake_controller_.RespondWithBlob(base::nullopt, kResponseBody);
 
-  network::mojom::URLLoaderFactoryPtr factory =
+  mojo::Remote<network::mojom::URLLoaderFactory> factory =
       CreateSubresourceLoaderFactory();
 
   // Perform the request.
@@ -1106,7 +1105,7 @@
   fake_controller_.SetResponseSource(
       network::mojom::FetchResponseSource::kCacheStorage);
 
-  network::mojom::URLLoaderFactoryPtr factory =
+  mojo::Remote<network::mojom::URLLoaderFactory> factory =
       CreateSubresourceLoaderFactory();
 
   // Perform the request.
@@ -1147,7 +1146,7 @@
   base::HistogramTester histogram_tester;
   fake_controller_.RespondWithFallback();
 
-  network::mojom::URLLoaderFactoryPtr factory =
+  mojo::Remote<network::mojom::URLLoaderFactory> factory =
       CreateSubresourceLoaderFactory();
 
   // Perform the request.
@@ -1178,7 +1177,7 @@
   base::HistogramTester histogram_tester;
   fake_controller_.RespondWithError();
 
-  network::mojom::URLLoaderFactoryPtr factory =
+  mojo::Remote<network::mojom::URLLoaderFactory> factory =
       CreateSubresourceLoaderFactory();
 
   // Perform the request.
@@ -1205,7 +1204,7 @@
   base::HistogramTester histogram_tester;
   fake_controller_.RespondWithRedirect("https://www.example.com/bar.png");
 
-  network::mojom::URLLoaderFactoryPtr factory =
+  mojo::Remote<network::mojom::URLLoaderFactory> factory =
       CreateSubresourceLoaderFactory();
 
   // Perform the request.
@@ -1287,7 +1286,7 @@
       std::string("https://www.example.com/redirect_") +
       base::NumberToString(count);
   fake_controller_.RespondWithRedirect(redirect_location);
-  network::mojom::URLLoaderFactoryPtr factory =
+  mojo::Remote<network::mojom::URLLoaderFactory> factory =
       CreateSubresourceLoaderFactory();
 
   // Perform the request.
@@ -1340,7 +1339,7 @@
 
   fake_controller_.RespondWithFallback();
 
-  network::mojom::URLLoaderFactoryPtr factory =
+  mojo::Remote<network::mojom::URLLoaderFactory> factory =
       CreateSubresourceLoaderFactory();
 
   struct TestCase {
diff --git a/content/renderer/worker/embedded_shared_worker_stub.cc b/content/renderer/worker/embedded_shared_worker_stub.cc
index 8a6374b5..0482242 100644
--- a/content/renderer/worker/embedded_shared_worker_stub.cc
+++ b/content/renderer/worker/embedded_shared_worker_stub.cc
@@ -85,14 +85,14 @@
   // stuck with a worker with a broken loader. Self-destruction is effectively
   // the same as the worker's process crashing.
   if (IsOutOfProcessNetworkService()) {
-    default_factory_connection_error_handler_holder_.Bind(std::move(
+    default_factory_disconnect_handler_holder_.Bind(std::move(
         subresource_loader_factory_bundle_info->pending_default_factory()));
-    default_factory_connection_error_handler_holder_->Clone(
+    default_factory_disconnect_handler_holder_->Clone(
         subresource_loader_factory_bundle_info->pending_default_factory()
             .InitWithNewPipeAndPassReceiver());
-    default_factory_connection_error_handler_holder_
-        .set_connection_error_handler(base::BindOnce(
-            &EmbeddedSharedWorkerStub::Terminate, base::Unretained(this)));
+    default_factory_disconnect_handler_holder_.set_disconnect_handler(
+        base::BindOnce(&EmbeddedSharedWorkerStub::Terminate,
+                       base::Unretained(this)));
   }
 
   // Initialize the subresource loader factory bundle passed by the browser
diff --git a/content/renderer/worker/embedded_shared_worker_stub.h b/content/renderer/worker/embedded_shared_worker_stub.h
index aa76dd96..ec58b38 100644
--- a/content/renderer/worker/embedded_shared_worker_stub.h
+++ b/content/renderer/worker/embedded_shared_worker_stub.h
@@ -131,9 +131,8 @@
   // Out-of-process NetworkService:
   // Detects disconnection from the default factory of the loader factory bundle
   // used by this worker (typically the network service).
-  // TODO(crbug.com/955171): Replace this with Remote.
-  network::mojom::URLLoaderFactoryPtr
-      default_factory_connection_error_handler_holder_;
+  mojo::Remote<network::mojom::URLLoaderFactory>
+      default_factory_disconnect_handler_holder_;
 
   DISALLOW_COPY_AND_ASSIGN(EmbeddedSharedWorkerStub);
 };
diff --git a/content/shell/BUILD.gn b/content/shell/BUILD.gn
index 86fa9c0..24adbd8 100644
--- a/content/shell/BUILD.gn
+++ b/content/shell/BUILD.gn
@@ -303,7 +303,6 @@
     "//content/shell/test_runner:test_runner",
     "//content/test:content_test_mojo_bindings",
     "//content/test:mojo_web_test_bindings",
-    "//content/test:mojo_web_test_old_names_bindings",
     "//content/test:test_support",
     "//content/test:web_test_support",
     "//device/bluetooth",
diff --git a/content/shell/browser/web_test/fake_bluetooth_chooser_factory.cc b/content/shell/browser/web_test/fake_bluetooth_chooser_factory.cc
index 58bf6b0e..2d2579a 100644
--- a/content/shell/browser/web_test/fake_bluetooth_chooser_factory.cc
+++ b/content/shell/browser/web_test/fake_bluetooth_chooser_factory.cc
@@ -12,7 +12,7 @@
 
 void FakeBluetoothChooserFactory::CreateFakeBluetoothChooser(
     mojo::PendingReceiver<mojom::FakeBluetoothChooser> receiver,
-    mojom::FakeBluetoothChooserClientAssociatedPtrInfo client) {
+    mojo::PendingAssociatedRemote<mojom::FakeBluetoothChooserClient> client) {
   DCHECK(!next_fake_bluetooth_chooser_);
   next_fake_bluetooth_chooser_ = std::make_unique<FakeBluetoothChooser>(
       std::move(receiver), std::move(client));
diff --git a/content/shell/browser/web_test/fake_bluetooth_chooser_factory.h b/content/shell/browser/web_test/fake_bluetooth_chooser_factory.h
index e1137000..fcee0f0 100644
--- a/content/shell/browser/web_test/fake_bluetooth_chooser_factory.h
+++ b/content/shell/browser/web_test/fake_bluetooth_chooser_factory.h
@@ -8,6 +8,7 @@
 #include <memory>
 
 #include "content/shell/common/web_test/fake_bluetooth_chooser.mojom.h"
+#include "mojo/public/cpp/bindings/pending_associated_remote.h"
 #include "mojo/public/cpp/bindings/pending_receiver.h"
 #include "mojo/public/cpp/bindings/receiver.h"
 
@@ -43,7 +44,8 @@
   // |next_fake_bluetooth_chooser_| is not null.
   void CreateFakeBluetoothChooser(
       mojo::PendingReceiver<mojom::FakeBluetoothChooser> receiver,
-      mojom::FakeBluetoothChooserClientAssociatedPtrInfo client) override;
+      mojo::PendingAssociatedRemote<mojom::FakeBluetoothChooserClient> client)
+      override;
 
   // Transfers ownership of |next_fake_bluetooth_chooser_| to the caller.
   std::unique_ptr<FakeBluetoothChooser> GetNextFakeBluetoothChooser();
diff --git a/content/shell/common/web_test/fake_bluetooth_chooser.mojom b/content/shell/common/web_test/fake_bluetooth_chooser.mojom
index b8f66e0..4c1650e 100644
--- a/content/shell/common/web_test/fake_bluetooth_chooser.mojom
+++ b/content/shell/common/web_test/fake_bluetooth_chooser.mojom
@@ -52,13 +52,10 @@
 
 // FakeBluetoothChooserFactory ensures that FakeBluetoothChoosers are created
 // with an associated FakeBluetoothChooserClient.
-// TODO(crbug.com/955171): Use |pending_associated_remote| instead of
-// |associated| after supporting mojom_js_generator.py completely for
-// associated interfaces.
 interface FakeBluetoothChooserFactory {
   CreateFakeBluetoothChooser(
       pending_receiver<FakeBluetoothChooser> fake_chooser,
-      associated FakeBluetoothChooserClient client);
+      pending_associated_remote<FakeBluetoothChooserClient> client);
 };
 
 // FakeBluetoothChooserEvent describes the type of chooser event that has been
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn
index 1624e1c..ac546bc 100644
--- a/content/test/BUILD.gn
+++ b/content/test/BUILD.gn
@@ -667,9 +667,10 @@
   ]
 }
 
-mojom("mojo_web_test_helper_test") {
+mojom("mojo_web_test_bindings") {
   testonly = true
   sources = [
+    "data/lite_js_test.mojom",
     "data/mojo_web_test_helper_test.mojom",
   ]
 
@@ -679,40 +680,6 @@
   scramble_message_ids = false
 }
 
-mojom("mojo_web_test_bindings") {
-  testonly = true
-  sources = [
-    "data/lite_js_test.mojom",
-  ]
-
-  public_deps = [
-    ":mojo_web_test_helper_test",
-  ]
-
-  # This mojom interface is exposed publicly to web tests which use
-  # prepackaged redistributable JS bindings. It is therefore not desirable to
-  # scramble these messages.
-  scramble_message_ids = false
-}
-
-mojom("mojo_web_test_old_names_bindings") {
-  testonly = true
-  sources = [
-    "data/lite_js_old_names_test.mojom",
-  ]
-
-  public_deps = [
-    ":mojo_web_test_helper_test",
-  ]
-
-  # This mojom interface is exposed publicly to web tests which use
-  # prepackaged redistributable JS bindings. It is therefore not desirable to
-  # scramble these messages.
-  scramble_message_ids = false
-
-  use_old_js_lite_bindings_names = true
-}
-
 mojom("test_interfaces") {
   testonly = true
   sources = [
diff --git a/content/test/data/lite_js_old_names_test.mojom b/content/test/data/lite_js_old_names_test.mojom
deleted file mode 100644
index b1df7ae..0000000
--- a/content/test/data/lite_js_old_names_test.mojom
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2018 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.
-
-module lite_js_old_names_test.mojom;
-
-// Copy of lite_js_test.mojom that can be used in a separate target with a
-// different value for "use_old_js_lite_bindings_names".
-
-struct TestStruct {
-  int32 x;
-  const bool isValid = false;
-};
-
-union TestUnion {
-  int32 x;
-  TestStruct s;
-};
-
-// An interface whose definition covers various types of message signatures in
-// order to exercise the lite JS mojom bindings.
-interface TestMessageTarget {
-  // Zero arguments, no reply.
-  Poke();
-
-  // Zero-argument request, zero-argument reply.
-  Ping() => ();
-
-  // Request and reply both with arguments.
-  Repeat(string? message, array<int32>? numbers)
-      => (string? message, array<int32>? numbers);
-
-  Flatten(array<TestStruct> values) => (array<int32> values);
-  FlattenUnions(array<TestUnion> unions) => (array<int32> x, array<int32> s);
-
-  RequestSubinterface(Subinterface& request, SubinterfaceClient client);
-};
-
-interface Subinterface {
-  Push(int32 value);
-  Flush();
-};
-
-interface SubinterfaceClient {
-  DidFlush(array<int32> values);
-};
-
diff --git a/device/fido/hid/fake_hid_impl_for_testing.cc b/device/fido/hid/fake_hid_impl_for_testing.cc
index 8988ad2..1ece115 100644
--- a/device/fido/hid/fake_hid_impl_for_testing.cc
+++ b/device/fido/hid/fake_hid_impl_for_testing.cc
@@ -7,6 +7,7 @@
 #include <utility>
 
 #include "device/fido/fido_parsing_utils.h"
+#include "mojo/public/cpp/bindings/pending_associated_remote.h"
 #include "services/device/public/mojom/constants.mojom.h"
 #include "services/device/public/mojom/hid.mojom.h"
 #include "services/service_manager/public/cpp/connector.h"
@@ -152,7 +153,7 @@
 }
 
 void FakeFidoHidManager::GetDevicesAndSetClient(
-    device::mojom::HidManagerClientAssociatedPtrInfo client,
+    mojo::PendingAssociatedRemote<device::mojom::HidManagerClient> client,
     GetDevicesCallback callback) {
   GetDevices(std::move(callback));
 
diff --git a/device/fido/hid/fake_hid_impl_for_testing.h b/device/fido/hid/fake_hid_impl_for_testing.h
index 3d2dd32..d63ae10 100644
--- a/device/fido/hid/fake_hid_impl_for_testing.h
+++ b/device/fido/hid/fake_hid_impl_for_testing.h
@@ -107,7 +107,7 @@
 
   // device::mojom::HidManager implementation:
   void GetDevicesAndSetClient(
-      device::mojom::HidManagerClientAssociatedPtrInfo client,
+      mojo::PendingAssociatedRemote<device::mojom::HidManagerClient> client,
       GetDevicesCallback callback) override;
   void GetDevices(GetDevicesCallback callback) override;
   void Connect(
diff --git a/docs/speed/apk_size_regressions.md b/docs/speed/apk_size_regressions.md
index 8b7a7fa..a9f2110 100644
--- a/docs/speed/apk_size_regressions.md
+++ b/docs/speed/apk_size_regressions.md
@@ -23,8 +23,8 @@
    by looking at the `android-binary-size` trybot result for the roll commit.
  * For V8 rolls, try checking the [V8 size graph](https://chromeperf.appspot.com/report?sid=59435a74c93b42599af4b02e2b3df765faef4685eb015f8aaaf2ecf7f4afb29c)
    to see if any jumps correspond with a CL in the roll.
- * Otherwise, use [diagnose_bloat.py](https://chromium.googlesource.com/chromium/src/+/master/tools/binary_size/README.md#diagnose_bloat_py)
-   in a [local Android checkout](https://chromium.googlesource.com/chromium/src/+/master/docs/android_build_instructions.md)
+ * Otherwise, use [diagnose_bloat.py](/tools/binary_size/README.md#diagnose_bloat_py)
+   in a [local Android checkout](/docs/android_build_instructions.md)
    to build all commits locally and find the culprit.
    * If there were multiple commits due to a build breakage, use `--apply-patch`
      with the fixing commit (last one in the range).
@@ -98,15 +98,15 @@
 resources, etc.) by looking at the trybot results or size graphs that were
 linked from the bug (if it was not linked in the bug, see above).
 
-**See [//docs/speed/binary_size/metrics.md](https://chromium.googlesource.com/chromium/src/+/master/docs/speed/binary_size/metrics.md)
+**See [//docs/speed/binary_size/metrics.md](/docs/speed/binary_size/metrics.md)
 for a description of high-level binary size metrics.**
 
-**See [//tools/binary_size/README.md](https://chromium.googlesource.com/chromium/src/+/master/tools/binary_size/README.md)
+**See [//tools/binary_size/README.md](/tools/binary_size/README.md)
 for a description of binary size tools.**
 
 ## Step 2: Analyze
 
-See [optimization advice](//docs/speed/binary_size/optimization_advice.md).
+See [optimization advice](/docs/speed/binary_size/optimization_advice.md).
 
 ## Step 3: Give Up :/
 
diff --git a/extensions/browser/api/DEPS b/extensions/browser/api/DEPS
index 87dbfcb4..aeb38a9 100644
--- a/extensions/browser/api/DEPS
+++ b/extensions/browser/api/DEPS
@@ -2,7 +2,7 @@
   "+components/device_event_log",
   "+services/device/public",
   "+storage/browser/file_system",
-  "+storage/common/fileapi",
+  "+storage/common/file_system",
   "+ui/accessibility",
   "+ui/aura",
 ]
diff --git a/extensions/browser/api/file_handlers/app_file_handler_util.cc b/extensions/browser/api/file_handlers/app_file_handler_util.cc
index 54b0376..21b2dec 100644
--- a/extensions/browser/api/file_handlers/app_file_handler_util.cc
+++ b/extensions/browser/api/file_handlers/app_file_handler_util.cc
@@ -25,8 +25,8 @@
 #include "extensions/common/permissions/permissions_data.h"
 #include "net/base/mime_util.h"
 #include "storage/browser/file_system/isolated_context.h"
-#include "storage/common/fileapi/file_system_mount_option.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_mount_option.h"
+#include "storage/common/file_system/file_system_types.h"
 
 #if defined(OS_CHROMEOS)
 #include "extensions/browser/api/file_handlers/non_native_file_system_delegate.h"
diff --git a/extensions/browser/api/file_system/file_system_api.cc b/extensions/browser/api/file_system/file_system_api.cc
index aa954ba..7efd596 100644
--- a/extensions/browser/api/file_system/file_system_api.cc
+++ b/extensions/browser/api/file_system/file_system_api.cc
@@ -51,8 +51,8 @@
 #include "storage/browser/file_system/file_system_context.h"
 #include "storage/browser/file_system/file_system_operation_runner.h"
 #include "storage/browser/file_system/isolated_context.h"
-#include "storage/common/fileapi/file_system_types.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_types.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "ui/base/l10n/l10n_util.h"
 #include "ui/shell_dialogs/select_file_dialog.h"
 
diff --git a/extensions/renderer/DEPS b/extensions/renderer/DEPS
index 134cab9..1e9c6096 100644
--- a/extensions/renderer/DEPS
+++ b/extensions/renderer/DEPS
@@ -23,7 +23,7 @@
   "-v8",
   "+v8/include",
 
-  "+storage/common/fileapi",
+  "+storage/common/file_system",
 
   "+services/network/public",
   "+services/service_manager/public/cpp",
diff --git a/extensions/renderer/file_system_natives.cc b/extensions/renderer/file_system_natives.cc
index 2567f43..66d5470 100644
--- a/extensions/renderer/file_system_natives.cc
+++ b/extensions/renderer/file_system_natives.cc
@@ -9,8 +9,8 @@
 #include "base/bind.h"
 #include "extensions/common/constants.h"
 #include "extensions/renderer/script_context.h"
-#include "storage/common/fileapi/file_system_types.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_types.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "third_party/blink/public/platform/web_string.h"
 #include "third_party/blink/public/web/web_dom_file_system.h"
 #include "third_party/blink/public/web/web_local_frame.h"
diff --git a/gpu/command_buffer/client/webgpu_implementation.cc b/gpu/command_buffer/client/webgpu_implementation.cc
index 4093874d..cee8140 100644
--- a/gpu/command_buffer/client/webgpu_implementation.cc
+++ b/gpu/command_buffer/client/webgpu_implementation.cc
@@ -325,7 +325,7 @@
   helper_->Flush();
 }
 
-DawnDevice WebGPUImplementation::GetDefaultDevice() {
+WGPUDevice WebGPUImplementation::GetDefaultDevice() {
 #if BUILDFLAG(USE_DAWN)
   return wire_client_->GetDevice();
 #else
@@ -334,7 +334,7 @@
 #endif
 }
 
-ReservedTexture WebGPUImplementation::ReserveTexture(DawnDevice device) {
+ReservedTexture WebGPUImplementation::ReserveTexture(WGPUDevice device) {
 #if BUILDFLAG(USE_DAWN)
   dawn_wire::ReservedTexture reservation = wire_client_->ReserveTexture(device);
   return {reservation.texture, reservation.id, reservation.generation};
diff --git a/gpu/command_buffer/client/webgpu_implementation.h b/gpu/command_buffer/client/webgpu_implementation.h
index 982a1c3b..cbb1f5bc 100644
--- a/gpu/command_buffer/client/webgpu_implementation.h
+++ b/gpu/command_buffer/client/webgpu_implementation.h
@@ -5,7 +5,7 @@
 #ifndef GPU_COMMAND_BUFFER_CLIENT_WEBGPU_IMPLEMENTATION_H_
 #define GPU_COMMAND_BUFFER_CLIENT_WEBGPU_IMPLEMENTATION_H_
 
-#include <dawn/dawn.h>
+#include <dawn/webgpu.h>
 #include <dawn_wire/WireClient.h>
 
 #include <memory>
@@ -117,8 +117,8 @@
   // WebGPUInterface implementation
   const DawnProcTable& GetProcs() const override;
   void FlushCommands() override;
-  DawnDevice GetDefaultDevice() override;
-  ReservedTexture ReserveTexture(DawnDevice device) override;
+  WGPUDevice GetDefaultDevice() override;
+  ReservedTexture ReserveTexture(WGPUDevice device) override;
 
  private:
   const char* GetLogPrefix() const { return "webgpu"; }
diff --git a/gpu/command_buffer/client/webgpu_interface.h b/gpu/command_buffer/client/webgpu_interface.h
index 6255fa7..59e3cdc 100644
--- a/gpu/command_buffer/client/webgpu_interface.h
+++ b/gpu/command_buffer/client/webgpu_interface.h
@@ -5,8 +5,8 @@
 #ifndef GPU_COMMAND_BUFFER_CLIENT_WEBGPU_INTERFACE_H_
 #define GPU_COMMAND_BUFFER_CLIENT_WEBGPU_INTERFACE_H_
 
-#include <dawn/dawn.h>
 #include <dawn/dawn_proc_table.h>
+#include <dawn/webgpu.h>
 
 #include "gpu/command_buffer/client/interface_base.h"
 #include "gpu/command_buffer/common/webgpu_cmd_enums.h"
@@ -15,7 +15,7 @@
 namespace webgpu {
 
 struct ReservedTexture {
-  DawnTexture texture;
+  WGPUTexture texture;
   uint32_t id;
   uint32_t generation;
 };
@@ -27,8 +27,8 @@
 
   virtual const DawnProcTable& GetProcs() const = 0;
   virtual void FlushCommands() = 0;
-  virtual DawnDevice GetDefaultDevice() = 0;
-  virtual ReservedTexture ReserveTexture(DawnDevice device) = 0;
+  virtual WGPUDevice GetDefaultDevice() = 0;
+  virtual ReservedTexture ReserveTexture(WGPUDevice device) = 0;
 
 // Include the auto-generated part of this class. We split this because
 // it means we can easily edit the non-auto generated parts right here in
diff --git a/gpu/command_buffer/client/webgpu_interface_stub.cc b/gpu/command_buffer/client/webgpu_interface_stub.cc
index c0163e3..39ca9e5 100644
--- a/gpu/command_buffer/client/webgpu_interface_stub.cc
+++ b/gpu/command_buffer/client/webgpu_interface_stub.cc
@@ -23,10 +23,10 @@
   return null_procs_;
 }
 void WebGPUInterfaceStub::FlushCommands() {}
-DawnDevice WebGPUInterfaceStub::GetDefaultDevice() {
+WGPUDevice WebGPUInterfaceStub::GetDefaultDevice() {
   return nullptr;
 }
-ReservedTexture WebGPUInterfaceStub::ReserveTexture(DawnDevice device) {
+ReservedTexture WebGPUInterfaceStub::ReserveTexture(WGPUDevice device) {
   return {nullptr, 0, 0};
 }
 
diff --git a/gpu/command_buffer/client/webgpu_interface_stub.h b/gpu/command_buffer/client/webgpu_interface_stub.h
index e16a57e..5a04a38 100644
--- a/gpu/command_buffer/client/webgpu_interface_stub.h
+++ b/gpu/command_buffer/client/webgpu_interface_stub.h
@@ -25,8 +25,8 @@
   // WebGPUInterface implementation
   const DawnProcTable& GetProcs() const override;
   void FlushCommands() override;
-  DawnDevice GetDefaultDevice() override;
-  ReservedTexture ReserveTexture(DawnDevice device) override;
+  WGPUDevice GetDefaultDevice() override;
+  ReservedTexture ReserveTexture(WGPUDevice device) override;
 
 // Include the auto-generated part of this class. We split this because
 // it means we can easily edit the non-auto generated parts right here in
diff --git a/gpu/command_buffer/service/external_vk_image_backing.cc b/gpu/command_buffer/service/external_vk_image_backing.cc
index cc0af9d..b05e7028 100644
--- a/gpu/command_buffer/service/external_vk_image_backing.cc
+++ b/gpu/command_buffer/service/external_vk_image_backing.cc
@@ -169,18 +169,18 @@
   DISALLOW_COPY_AND_ASSIGN(ScopedPixelStore);
 };
 
-base::Optional<DawnTextureFormat> GetDawnFormat(viz::ResourceFormat format) {
+base::Optional<WGPUTextureFormat> GetWGPUFormat(viz::ResourceFormat format) {
   switch (format) {
     case viz::RED_8:
     case viz::ALPHA_8:
     case viz::LUMINANCE_8:
-      return DAWN_TEXTURE_FORMAT_R8_UNORM;
+      return WGPUTextureFormat_R8Unorm;
     case viz::RG_88:
-      return DAWN_TEXTURE_FORMAT_RG8_UNORM;
+      return WGPUTextureFormat_RG8Unorm;
     case viz::RGBA_8888:
-      return DAWN_TEXTURE_FORMAT_RGBA8_UNORM;
+      return WGPUTextureFormat_RGBA8Unorm;
     case viz::BGRA_8888:
-      return DAWN_TEXTURE_FORMAT_BGRA8_UNORM;
+      return WGPUTextureFormat_BGRA8Unorm;
     default:
       return {};
   }
@@ -265,7 +265,7 @@
   auto backing = base::WrapUnique(new ExternalVkImageBacking(
       mailbox, format, size, color_space, usage, context_state, image, memory,
       requirements.size, vk_format, command_pool, GrVkYcbcrConversionInfo(),
-      GetDawnFormat(format), mem_alloc_info.memoryTypeIndex));
+      GetWGPUFormat(format), mem_alloc_info.memoryTypeIndex));
 
   if (!pixel_data.empty()) {
     backing->WritePixels(
@@ -330,7 +330,7 @@
     return base::WrapUnique(new ExternalVkImageBacking(
         mailbox, resource_format, size, color_space, usage, context_state,
         vk_image, vk_device_memory, memory_size, vk_image_info.format,
-        command_pool, gr_ycbcr_info, GetDawnFormat(resource_format), {}));
+        command_pool, gr_ycbcr_info, GetWGPUFormat(resource_format), {}));
   }
 
   if (gfx::NumberOfPlanesForLinearBufferFormat(buffer_format) != 1) {
@@ -431,7 +431,7 @@
     VkFormat vk_format,
     VulkanCommandPool* command_pool,
     const GrVkYcbcrConversionInfo& ycbcr_info,
-    base::Optional<DawnTextureFormat> dawn_format,
+    base::Optional<WGPUTextureFormat> wgpu_format,
     base::Optional<uint32_t> memory_type_index)
     : SharedImageBacking(mailbox,
                          format,
@@ -450,7 +450,7 @@
                                            usage & SHARED_IMAGE_USAGE_PROTECTED,
                                            ycbcr_info)),
       command_pool_(command_pool),
-      dawn_format_(dawn_format),
+      wgpu_format_(wgpu_format),
       memory_type_index_(memory_type_index) {}
 
 ExternalVkImageBacking::~ExternalVkImageBacking() {
@@ -526,9 +526,9 @@
 std::unique_ptr<SharedImageRepresentationDawn>
 ExternalVkImageBacking::ProduceDawn(SharedImageManager* manager,
                                     MemoryTypeTracker* tracker,
-                                    DawnDevice dawnDevice) {
+                                    WGPUDevice wgpuDevice) {
 #if defined(OS_LINUX) && BUILDFLAG(USE_DAWN)
-  if (!dawn_format_) {
+  if (!wgpu_format_) {
     DLOG(ERROR) << "Format not supported for Dawn";
     return nullptr;
   }
@@ -548,7 +548,7 @@
   }
 
   return std::make_unique<ExternalVkImageDawnRepresentation>(
-      manager, this, tracker, dawnDevice, dawn_format_.value(), memory_fd,
+      manager, this, tracker, wgpuDevice, wgpu_format_.value(), memory_fd,
       image_info.fAlloc.fSize, memory_type_index_.value());
 #else  // !defined(OS_LINUX) || !BUILDFLAG(USE_DAWN)
   NOTIMPLEMENTED_LOG_ONCE();
diff --git a/gpu/command_buffer/service/external_vk_image_backing.h b/gpu/command_buffer/service/external_vk_image_backing.h
index fb5d8590..631da3ac 100644
--- a/gpu/command_buffer/service/external_vk_image_backing.h
+++ b/gpu/command_buffer/service/external_vk_image_backing.h
@@ -103,7 +103,7 @@
   std::unique_ptr<SharedImageRepresentationDawn> ProduceDawn(
       SharedImageManager* manager,
       MemoryTypeTracker* tracker,
-      DawnDevice dawnDevice) override;
+      WGPUDevice dawnDevice) override;
   std::unique_ptr<SharedImageRepresentationGLTexture> ProduceGLTexture(
       SharedImageManager* manager,
       MemoryTypeTracker* tracker) override;
@@ -128,7 +128,7 @@
                          VkFormat vk_format,
                          VulkanCommandPool* command_pool,
                          const GrVkYcbcrConversionInfo& ycbcr_info,
-                         base::Optional<DawnTextureFormat> dawn_format,
+                         base::Optional<WGPUTextureFormat> wgpu_format,
                          base::Optional<uint32_t> memory_type_index);
 
 #ifdef OS_LINUX
@@ -173,7 +173,7 @@
   };
   uint32_t latest_content_ = 0;
 
-  base::Optional<DawnTextureFormat> dawn_format_;
+  base::Optional<WGPUTextureFormat> wgpu_format_;
   base::Optional<uint32_t> memory_type_index_;
 
   DISALLOW_COPY_AND_ASSIGN(ExternalVkImageBacking);
diff --git a/gpu/command_buffer/service/external_vk_image_dawn_representation.cc b/gpu/command_buffer/service/external_vk_image_dawn_representation.cc
index 9e08c403..56a118c 100644
--- a/gpu/command_buffer/service/external_vk_image_dawn_representation.cc
+++ b/gpu/command_buffer/service/external_vk_image_dawn_representation.cc
@@ -23,14 +23,14 @@
     SharedImageManager* manager,
     SharedImageBacking* backing,
     MemoryTypeTracker* tracker,
-    DawnDevice device,
-    DawnTextureFormat dawn_format,
+    WGPUDevice device,
+    WGPUTextureFormat wgpu_format,
     int memory_fd,
     VkDeviceSize allocation_size,
     uint32_t memory_type_index)
     : SharedImageRepresentationDawn(manager, backing, tracker),
       device_(device),
-      dawn_format_(dawn_format),
+      wgpu_format_(wgpu_format),
       memory_fd_(memory_fd),
       allocation_size_(allocation_size),
       memory_type_index_(memory_type_index),
@@ -48,18 +48,18 @@
 }
 
 DawnTexture ExternalVkImageDawnRepresentation::BeginAccess(
-    DawnTextureUsage usage) {
+    WGPUTextureUsage usage) {
   std::vector<SemaphoreHandle> handles;
 
   if (!backing_impl()->BeginAccess(false, &handles, false /* is_gl */)) {
     return nullptr;
   }
 
-  DawnTextureDescriptor texture_descriptor = {};
+  WGPUTextureDescriptor texture_descriptor = {};
   texture_descriptor.nextInChain = nullptr;
-  texture_descriptor.format = dawn_format_;
+  texture_descriptor.format = wgpu_format_;
   texture_descriptor.usage = usage;
-  texture_descriptor.dimension = DAWN_TEXTURE_DIMENSION_2D;
+  texture_descriptor.dimension = WGPUTextureDimension_2D;
   texture_descriptor.size = {size().width(), size().height(), 1};
   texture_descriptor.arrayLayerCount = 1;
   texture_descriptor.mipLevelCount = 1;
diff --git a/gpu/command_buffer/service/external_vk_image_dawn_representation.h b/gpu/command_buffer/service/external_vk_image_dawn_representation.h
index e605db8..f26e0d1 100644
--- a/gpu/command_buffer/service/external_vk_image_dawn_representation.h
+++ b/gpu/command_buffer/service/external_vk_image_dawn_representation.h
@@ -15,24 +15,24 @@
   ExternalVkImageDawnRepresentation(SharedImageManager* manager,
                                     SharedImageBacking* backing,
                                     MemoryTypeTracker* tracker,
-                                    DawnDevice device,
-                                    DawnTextureFormat dawn_format,
+                                    WGPUDevice device,
+                                    WGPUTextureFormat dawn_format,
                                     int memory_fd,
                                     VkDeviceSize allocation_size,
                                     uint32_t memory_type_index);
   ~ExternalVkImageDawnRepresentation() override;
 
-  DawnTexture BeginAccess(DawnTextureUsage usage) override;
+  WGPUTexture BeginAccess(WGPUTextureUsage usage) override;
   void EndAccess() override;
 
  private:
-  const DawnDevice device_;
-  const DawnTextureFormat dawn_format_;
+  const WGPUDevice device_;
+  const WGPUTextureFormat wgpu_format_;
   const int memory_fd_;
   const VkDeviceSize allocation_size_;
   const uint32_t memory_type_index_;
 
-  DawnTexture texture_ = nullptr;
+  WGPUTexture texture_ = nullptr;
 
   // TODO(cwallez@chromium.org): Load procs only once when the factory is
   // created and pass a pointer to them around?
diff --git a/gpu/command_buffer/service/shared_image_backing.cc b/gpu/command_buffer/service/shared_image_backing.cc
index f4c22a4..bddce86 100644
--- a/gpu/command_buffer/service/shared_image_backing.cc
+++ b/gpu/command_buffer/service/shared_image_backing.cc
@@ -67,7 +67,7 @@
 std::unique_ptr<SharedImageRepresentationDawn> SharedImageBacking::ProduceDawn(
     SharedImageManager* manager,
     MemoryTypeTracker* tracker,
-    DawnDevice device) {
+    WGPUDevice device) {
   return nullptr;
 }
 
diff --git a/gpu/command_buffer/service/shared_image_backing.h b/gpu/command_buffer/service/shared_image_backing.h
index 11315ca..9e6f95c 100644
--- a/gpu/command_buffer/service/shared_image_backing.h
+++ b/gpu/command_buffer/service/shared_image_backing.h
@@ -5,7 +5,7 @@
 #ifndef GPU_COMMAND_BUFFER_SERVICE_SHARED_IMAGE_BACKING_H_
 #define GPU_COMMAND_BUFFER_SERVICE_SHARED_IMAGE_BACKING_H_
 
-#include <dawn/dawn.h>
+#include <dawn/webgpu.h>
 
 #include <memory>
 
@@ -125,7 +125,7 @@
   virtual std::unique_ptr<SharedImageRepresentationDawn> ProduceDawn(
       SharedImageManager* manager,
       MemoryTypeTracker* tracker,
-      DawnDevice device);
+      WGPUDevice device);
   virtual std::unique_ptr<SharedImageRepresentationOverlay> ProduceOverlay(
       SharedImageManager* manager,
       MemoryTypeTracker* tracker);
diff --git a/gpu/command_buffer/service/shared_image_backing_factory_d3d.cc b/gpu/command_buffer/service/shared_image_backing_factory_d3d.cc
index 85bc5f6..a9f423d4 100644
--- a/gpu/command_buffer/service/shared_image_backing_factory_d3d.cc
+++ b/gpu/command_buffer/service/shared_image_backing_factory_d3d.cc
@@ -93,15 +93,15 @@
 }
 
 #if BUILDFLAG(USE_DAWN)
-base::Optional<DawnTextureFormat> VizResourceFormatToDawnTextureFormat(
+base::Optional<WGPUTextureFormat> VizResourceFormatToWGPUTextureFormat(
     viz::ResourceFormat viz_resource_format) {
   switch (viz_resource_format) {
     case viz::RGBA_F16:
-      return DAWN_TEXTURE_FORMAT_RGBA16_FLOAT;
+      return WGPUTextureFormat_RGBA16Float;
     case viz::BGRA_8888:
-      return DAWN_TEXTURE_FORMAT_BGRA8_UNORM;
+      return WGPUTextureFormat_BGRA8Unorm;
     case viz::RGBA_8888:
-      return DAWN_TEXTURE_FORMAT_RGBA8_UNORM;
+      return WGPUTextureFormat_RGBA8Unorm;
     default:
       NOTREACHED();
       return {};
@@ -162,7 +162,7 @@
   SharedImageRepresentationDawnD3D(SharedImageManager* manager,
                                    SharedImageBacking* backing,
                                    MemoryTypeTracker* tracker,
-                                   DawnDevice device)
+                                   WGPUDevice device)
       : SharedImageRepresentationDawn(manager, backing, tracker),
         device_(device),
         dawn_procs_(dawn_native::GetProcs()) {
@@ -178,12 +178,12 @@
     dawn_procs_.deviceRelease(device_);
   }
 
-  DawnTexture BeginAccess(DawnTextureUsage usage) override;
+  WGPUTexture BeginAccess(WGPUTextureUsage usage) override;
   void EndAccess() override;
 
  private:
-  DawnDevice device_;
-  DawnTexture texture_ = nullptr;
+  WGPUDevice device_;
+  WGPUTexture texture_ = nullptr;
 
   // TODO(cwallez@chromium.org): Load procs only once when the factory is
   // created and pass a pointer to them around?
@@ -258,7 +258,7 @@
   std::unique_ptr<SharedImageRepresentationDawn> ProduceDawn(
       SharedImageManager* manager,
       MemoryTypeTracker* tracker,
-      DawnDevice device) override {
+      WGPUDevice device) override {
 #if BUILDFLAG(USE_DAWN)
     return std::make_unique<SharedImageRepresentationDawnD3D>(manager, this,
                                                               tracker, device);
@@ -431,16 +431,16 @@
 };
 
 #if BUILDFLAG(USE_DAWN)
-DawnTexture SharedImageRepresentationDawnD3D::BeginAccess(
-    DawnTextureUsage usage) {
+WGPUTexture SharedImageRepresentationDawnD3D::BeginAccess(
+    WGPUTextureUsage usage) {
   SharedImageBackingD3D* d3d_image_backing =
       static_cast<SharedImageBackingD3D*>(backing());
 
   const HANDLE shared_handle = d3d_image_backing->GetSharedHandle();
   const viz::ResourceFormat viz_resource_format = d3d_image_backing->format();
-  const base::Optional<DawnTextureFormat> dawn_texture_format =
-      VizResourceFormatToDawnTextureFormat(viz_resource_format);
-  if (!dawn_texture_format.has_value()) {
+  const base::Optional<WGPUTextureFormat> wgpu_texture_format =
+      VizResourceFormatToWGPUTextureFormat(viz_resource_format);
+  if (!wgpu_texture_format.has_value()) {
     DLOG(ERROR) << "Unsupported viz format found: " << viz_resource_format;
     return nullptr;
   }
@@ -450,11 +450,11 @@
     return nullptr;
   }
 
-  DawnTextureDescriptor desc;
+  WGPUTextureDescriptor desc;
   desc.nextInChain = nullptr;
-  desc.format = dawn_texture_format.value();
+  desc.format = wgpu_texture_format.value();
   desc.usage = usage;
-  desc.dimension = DAWN_TEXTURE_DIMENSION_2D;
+  desc.dimension = WGPUTextureDimension_2D;
   desc.size = {size().width(), size().height(), 1};
   desc.arrayLayerCount = 1;
   desc.mipLevelCount = 1;
diff --git a/gpu/command_buffer/service/shared_image_backing_factory_iosurface.mm b/gpu/command_buffer/service/shared_image_backing_factory_iosurface.mm
index 2ca66f31..2793f24 100644
--- a/gpu/command_buffer/service/shared_image_backing_factory_iosurface.mm
+++ b/gpu/command_buffer/service/shared_image_backing_factory_iosurface.mm
@@ -88,32 +88,32 @@
   api->glFlushFn();
 }
 
-base::Optional<DawnTextureFormat> GetDawnFormat(viz::ResourceFormat format) {
+base::Optional<WGPUTextureFormat> GetWGPUFormat(viz::ResourceFormat format) {
   switch (format) {
     case viz::RED_8:
     case viz::ALPHA_8:
     case viz::LUMINANCE_8:
-      return DAWN_TEXTURE_FORMAT_R8_UNORM;
+      return WGPUTextureFormat_R8Unorm;
     case viz::RG_88:
-      return DAWN_TEXTURE_FORMAT_RG8_UNORM;
+      return WGPUTextureFormat_RG8Unorm;
     case viz::RGBA_8888:
     case viz::BGRA_8888:
-      return DAWN_TEXTURE_FORMAT_BGRA8_UNORM;
+      return WGPUTextureFormat_BGRA8Unorm;
     default:
       return {};
   }
 }
 
-base::Optional<DawnTextureFormat> GetDawnFormat(gfx::BufferFormat format) {
+base::Optional<WGPUTextureFormat> GetWGPUFormat(gfx::BufferFormat format) {
   switch (format) {
     case gfx::BufferFormat::R_8:
-      return DAWN_TEXTURE_FORMAT_R8_UNORM;
+      return WGPUTextureFormat_R8Unorm;
     case gfx::BufferFormat::RG_88:
-      return DAWN_TEXTURE_FORMAT_RG8_UNORM;
+      return WGPUTextureFormat_RG8Unorm;
     case gfx::BufferFormat::RGBX_8888:
     case gfx::BufferFormat::RGBA_8888:
     case gfx::BufferFormat::BGRX_8888:
-      return DAWN_TEXTURE_FORMAT_BGRA8_UNORM;
+      return WGPUTextureFormat_BGRA8Unorm;
     default:
       return {};
   }
@@ -275,13 +275,13 @@
       SharedImageManager* manager,
       SharedImageBacking* backing,
       MemoryTypeTracker* tracker,
-      DawnDevice device,
+      WGPUDevice device,
       base::ScopedCFTypeRef<IOSurfaceRef> io_surface,
-      DawnTextureFormat dawn_format)
+      WGPUTextureFormat wgpu_format)
       : SharedImageRepresentationDawn(manager, backing, tracker),
         io_surface_(std::move(io_surface)),
         device_(device),
-        dawn_format_(dawn_format),
+        wgpu_format_(wgpu_format),
         dawn_procs_(dawn_native::GetProcs()) {
     DCHECK(device_);
     DCHECK(io_surface_);
@@ -296,12 +296,12 @@
     dawn_procs_.deviceRelease(device_);
   }
 
-  DawnTexture BeginAccess(DawnTextureUsage usage) final {
-    DawnTextureDescriptor desc;
+  WGPUTexture BeginAccess(WGPUTextureUsage usage) final {
+    WGPUTextureDescriptor desc;
     desc.nextInChain = nullptr;
-    desc.format = dawn_format_;
+    desc.format = wgpu_format_;
     desc.usage = usage;
-    desc.dimension = DAWN_TEXTURE_DIMENSION_2D;
+    desc.dimension = WGPUTextureDimension_2D;
     desc.size = {size().width(), size().height(), 1};
     desc.arrayLayerCount = 1;
     desc.mipLevelCount = 1;
@@ -339,7 +339,7 @@
     dawn_procs_.textureDestroy(texture_);
 
     // macOS has a global GPU command queue so synchronization between APIs and
-    // devices is automatic. However on Metal, dawnQueueSubmit "commits" the
+    // devices is automatic. However on Metal, wgpuQueueSubmit "commits" the
     // Metal command buffers but they aren't "scheduled" in the global queue
     // immediately. (that work seems offloaded to a different thread?)
     // Wait for all the previous submitted commands to be scheduled to have
@@ -354,9 +354,9 @@
 
  private:
   base::ScopedCFTypeRef<IOSurfaceRef> io_surface_;
-  DawnDevice device_;
-  DawnTexture texture_ = nullptr;
-  DawnTextureFormat dawn_format_;
+  WGPUDevice device_;
+  WGPUTexture texture_ = nullptr;
+  WGPUTextureFormat wgpu_format_;
 
   // TODO(cwallez@chromium.org): Load procs only once when the factory is
   // created and pass a pointer to them around?
@@ -645,7 +645,7 @@
 
   return std::make_unique<SharedImageBackingIOSurface>(
       mailbox, format, size, color_space, usage, std::move(io_surface),
-      GetDawnFormat(format), estimated_size);
+      GetWGPUFormat(format), estimated_size);
 }
 
 std::unique_ptr<SharedImageBacking>
@@ -692,7 +692,7 @@
 
   return std::make_unique<SharedImageBackingIOSurface>(
       mailbox, resource_format, size, color_space, usage, std::move(io_surface),
-      GetDawnFormat(format), estimated_size);
+      GetWGPUFormat(format), estimated_size);
 }
 
 bool SharedImageBackingFactoryIOSurface::CanImportGpuMemoryBuffer(
diff --git a/gpu/command_buffer/service/shared_image_backing_factory_iosurface_unittest.cc b/gpu/command_buffer/service/shared_image_backing_factory_iosurface_unittest.cc
index 0d03b52..53ccc3f 100644
--- a/gpu/command_buffer/service/shared_image_backing_factory_iosurface_unittest.cc
+++ b/gpu/command_buffer/service/shared_image_backing_factory_iosurface_unittest.cc
@@ -30,7 +30,7 @@
 
 #if BUILDFLAG(USE_DAWN)
 #include <dawn/dawn_proc.h>
-#include <dawn/dawncpp.h>
+#include <dawn/webgpu_cpp.h>
 #include <dawn_native/DawnNative.h>
 #endif  // BUILDFLAG(USE_DAWN)
 
@@ -266,7 +266,7 @@
       });
   ASSERT_NE(adapter_it, adapters.end());
 
-  dawn::Device device = dawn::Device::Acquire(adapter_it->CreateDevice());
+  wgpu::Device device = wgpu::Device::Acquire(adapter_it->CreateDevice());
   DawnProcTable procs = dawn_native::GetProcs();
   dawnProcSetProcs(&procs);
 
@@ -291,27 +291,27 @@
 
   // Clear the shared image to green using Dawn.
   {
-    dawn::Texture texture = dawn::Texture::Acquire(
+    wgpu::Texture texture = wgpu::Texture::Acquire(
         dawn_representation->BeginAccess(DAWN_TEXTURE_USAGE_OUTPUT_ATTACHMENT));
 
-    dawn::RenderPassColorAttachmentDescriptor color_desc;
+    wgpu::RenderPassColorAttachmentDescriptor color_desc;
     color_desc.attachment = texture.CreateView();
     color_desc.resolveTarget = nullptr;
-    color_desc.loadOp = dawn::LoadOp::Clear;
-    color_desc.storeOp = dawn::StoreOp::Store;
+    color_desc.loadOp = wgpu::LoadOp::Clear;
+    color_desc.storeOp = wgpu::StoreOp::Store;
     color_desc.clearColor = {0, 255, 0, 255};
 
-    dawn::RenderPassDescriptor renderPassDesc;
+    wgpu::RenderPassDescriptor renderPassDesc;
     renderPassDesc.colorAttachmentCount = 1;
     renderPassDesc.colorAttachments = &color_desc;
     renderPassDesc.depthStencilAttachment = nullptr;
 
-    dawn::CommandEncoder encoder = device.CreateCommandEncoder();
-    dawn::RenderPassEncoder pass = encoder.BeginRenderPass(&renderPassDesc);
+    wgpu::CommandEncoder encoder = device.CreateCommandEncoder();
+    wgpu::RenderPassEncoder pass = encoder.BeginRenderPass(&renderPassDesc);
     pass.EndPass();
-    dawn::CommandBuffer commands = encoder.Finish();
+    wgpu::CommandBuffer commands = encoder.Finish();
 
-    dawn::Queue queue = device.CreateQueue();
+    wgpu::Queue queue = device.CreateQueue();
     queue.Submit(1, &commands);
   }
 
@@ -355,7 +355,7 @@
   EXPECT_EQ(dst_pixels[3], 255);
 
   // Shut down Dawn
-  device = dawn::Device();
+  device = wgpu::Device();
   dawnProcSetProcs(nullptr);
 
   skia_representation.reset();
diff --git a/gpu/command_buffer/service/shared_image_factory.cc b/gpu/command_buffer/service/shared_image_factory.cc
index 4e5ec471..769a9d90 100644
--- a/gpu/command_buffer/service/shared_image_factory.cc
+++ b/gpu/command_buffer/service/shared_image_factory.cc
@@ -477,7 +477,7 @@
 
 std::unique_ptr<SharedImageRepresentationDawn>
 SharedImageRepresentationFactory::ProduceDawn(const Mailbox& mailbox,
-                                              DawnDevice device) {
+                                              WGPUDevice device) {
   return manager_->ProduceDawn(mailbox, tracker_.get(), device);
 }
 
diff --git a/gpu/command_buffer/service/shared_image_factory.h b/gpu/command_buffer/service/shared_image_factory.h
index eea81d4..87ded985 100644
--- a/gpu/command_buffer/service/shared_image_factory.h
+++ b/gpu/command_buffer/service/shared_image_factory.h
@@ -167,7 +167,7 @@
       scoped_refptr<SharedContextState> context_State);
   std::unique_ptr<SharedImageRepresentationDawn> ProduceDawn(
       const Mailbox& mailbox,
-      DawnDevice device);
+      WGPUDevice device);
   std::unique_ptr<SharedImageRepresentationOverlay> ProduceOverlay(
       const Mailbox& mailbox);
 
diff --git a/gpu/command_buffer/service/shared_image_manager.cc b/gpu/command_buffer/service/shared_image_manager.cc
index 37810b33..d966e338 100644
--- a/gpu/command_buffer/service/shared_image_manager.cc
+++ b/gpu/command_buffer/service/shared_image_manager.cc
@@ -206,7 +206,7 @@
 std::unique_ptr<SharedImageRepresentationDawn> SharedImageManager::ProduceDawn(
     const Mailbox& mailbox,
     MemoryTypeTracker* tracker,
-    DawnDevice device) {
+    WGPUDevice device) {
   CALLED_ON_VALID_THREAD();
 
   AutoLock autolock(this);
diff --git a/gpu/command_buffer/service/shared_image_manager.h b/gpu/command_buffer/service/shared_image_manager.h
index 9309757..5b34808 100644
--- a/gpu/command_buffer/service/shared_image_manager.h
+++ b/gpu/command_buffer/service/shared_image_manager.h
@@ -49,7 +49,7 @@
   std::unique_ptr<SharedImageRepresentationDawn> ProduceDawn(
       const Mailbox& mailbox,
       MemoryTypeTracker* ref,
-      DawnDevice device);
+      WGPUDevice device);
   std::unique_ptr<SharedImageRepresentationOverlay> ProduceOverlay(
       const Mailbox& mailbox,
       MemoryTypeTracker* ref);
diff --git a/gpu/command_buffer/service/shared_image_representation.h b/gpu/command_buffer/service/shared_image_representation.h
index ab27e23..dc97260 100644
--- a/gpu/command_buffer/service/shared_image_representation.h
+++ b/gpu/command_buffer/service/shared_image_representation.h
@@ -5,8 +5,8 @@
 #ifndef GPU_COMMAND_BUFFER_SERVICE_SHARED_IMAGE_REPRESENTATION_H_
 #define GPU_COMMAND_BUFFER_SERVICE_SHARED_IMAGE_REPRESENTATION_H_
 
-#include <dawn/dawn.h>
 #include <dawn/dawn_proc_table.h>
+#include <dawn/webgpu.h>
 
 #include "base/callback_helpers.h"
 #include "build/build_config.h"
@@ -305,7 +305,7 @@
   // TODO(penghuang): Add ScopedAccess helper class.
   // This can return null in case of a Dawn validation error, for example if
   // usage is invalid.
-  virtual DawnTexture BeginAccess(DawnTextureUsage usage) = 0;
+  virtual WGPUTexture BeginAccess(WGPUTextureUsage usage) = 0;
   virtual void EndAccess() = 0;
 };
 
diff --git a/gpu/command_buffer/service/webgpu_decoder_impl.cc b/gpu/command_buffer/service/webgpu_decoder_impl.cc
index 28dde0f..927f154 100644
--- a/gpu/command_buffer/service/webgpu_decoder_impl.cc
+++ b/gpu/command_buffer/service/webgpu_decoder_impl.cc
@@ -195,11 +195,11 @@
   bool HasPollingWork() const override { return true; }
 
   void PerformPollingWork() override {
-    DCHECK(dawn_device_);
+    DCHECK(wgpu_device_);
     DCHECK(wire_serializer_);
     TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("gpu.dawn"),
                  "WebGPUDecoderImpl::PerformPollingWork");
-    dawn_procs_.deviceTick(dawn_device_);
+    dawn_procs_.deviceTick(wgpu_device_);
     wire_serializer_->Flush();
   }
 
@@ -363,7 +363,7 @@
   std::unique_ptr<dawn_native::Instance> dawn_instance_;
   std::vector<dawn_native::Adapter> dawn_adapters_;
   DawnProcTable dawn_procs_;
-  DawnDevice dawn_device_ = nullptr;
+  WGPUDevice wgpu_device_ = nullptr;
   std::unique_ptr<dawn_wire::WireServer> wire_server_;
 
   DISALLOW_COPY_AND_ASSIGN(WebGPUDecoderImpl);
@@ -416,8 +416,8 @@
   // Reset the wire server first so all objects are destroyed before the device.
   // TODO(enga): Handle Device/Context lost.
   wire_server_ = nullptr;
-  if (dawn_device_ != nullptr) {
-    dawn_procs_.deviceRelease(dawn_device_);
+  if (wgpu_device_ != nullptr) {
+    dawn_procs_.deviceRelease(wgpu_device_);
   }
 }
 
@@ -431,18 +431,18 @@
   DCHECK(adapter != nullptr && (*adapter));
 
   // TODO(jiawei.shao@intel.com): support multiple Dawn devices.
-  if (dawn_device_ != nullptr) {
+  if (wgpu_device_ != nullptr) {
     DCHECK(wire_server_);
     return error::kNoError;
   }
 
-  dawn_device_ = adapter->CreateDevice();
-  if (dawn_device_ == nullptr) {
+  wgpu_device_ = adapter->CreateDevice();
+  if (wgpu_device_ == nullptr) {
     return error::kLostContext;
   }
 
   dawn_wire::WireServerDescriptor descriptor = {};
-  descriptor.device = dawn_device_;
+  descriptor.device = wgpu_device_;
   descriptor.procs = &dawn_procs_;
   descriptor.serializer = wire_serializer_.get();
   descriptor.memoryTransferService = memory_transfer_service_.get();
@@ -655,7 +655,7 @@
   uint32_t device_generation = static_cast<uint32_t>(c.device_generation);
   uint32_t id = static_cast<uint32_t>(c.id);
   uint32_t generation = static_cast<uint32_t>(c.generation);
-  uint32_t usage = static_cast<DawnTextureUsage>(c.usage);
+  uint32_t usage = static_cast<WGPUTextureUsage>(c.usage);
 
   // Unpack the mailbox
   if (sizeof(Mailbox) > immediate_data_size) {
@@ -680,23 +680,23 @@
   }
 
   static constexpr uint32_t kAllowedTextureUsages = static_cast<uint32_t>(
-      DAWN_TEXTURE_USAGE_COPY_SRC | DAWN_TEXTURE_USAGE_COPY_DST |
-      DAWN_TEXTURE_USAGE_SAMPLED | DAWN_TEXTURE_USAGE_OUTPUT_ATTACHMENT);
+      WGPUTextureUsage_CopySrc | WGPUTextureUsage_CopyDst |
+      WGPUTextureUsage_Sampled | WGPUTextureUsage_OutputAttachment);
   if (usage & ~kAllowedTextureUsages) {
     DLOG(ERROR) << "AssociateMailbox: Invalid usage";
     return error::kInvalidArguments;
   }
-  DawnTextureUsage dawn_usage = static_cast<DawnTextureUsage>(usage);
+  WGPUTextureUsage wgpu_usage = static_cast<WGPUTextureUsage>(usage);
 
-  // Create a DawnTexture from the mailbox.
+  // Create a WGPUTexture from the mailbox.
   std::unique_ptr<SharedImageRepresentationDawn> shared_image =
-      shared_image_representation_factory_->ProduceDawn(mailbox, dawn_device_);
+      shared_image_representation_factory_->ProduceDawn(mailbox, wgpu_device_);
   if (!shared_image) {
     DLOG(ERROR) << "AssociateMailbox: Couldn't produce shared image";
     return error::kInvalidArguments;
   }
 
-  DawnTexture texture = shared_image->BeginAccess(dawn_usage);
+  WGPUTexture texture = shared_image->BeginAccess(wgpu_usage);
   if (!texture) {
     DLOG(ERROR) << "AssociateMailbox: Couldn't begin shared image access";
     return error::kInvalidArguments;
diff --git a/gpu/command_buffer/service/webgpu_decoder_unittest.cc b/gpu/command_buffer/service/webgpu_decoder_unittest.cc
index b7cda9ce..983978a 100644
--- a/gpu/command_buffer/service/webgpu_decoder_unittest.cc
+++ b/gpu/command_buffer/service/webgpu_decoder_unittest.cc
@@ -137,7 +137,7 @@
   {
     gpu::Mailbox bad_mailbox;
     AssociateMailboxCmdStorage cmd;
-    cmd.cmd.Init(0, 0, 1, 0, DAWN_TEXTURE_USAGE_SAMPLED, bad_mailbox.name);
+    cmd.cmd.Init(0, 0, 1, 0, WGPUTextureUsage_Sampled, bad_mailbox.name);
     EXPECT_EQ(error::kInvalidArguments,
               ExecuteImmediateCmd(cmd.cmd, sizeof(bad_mailbox.name)));
   }
@@ -145,7 +145,7 @@
   // Error case: device doesn't exist.
   {
     AssociateMailboxCmdStorage cmd;
-    cmd.cmd.Init(42, 42, 1, 0, DAWN_TEXTURE_USAGE_SAMPLED, mailbox.name);
+    cmd.cmd.Init(42, 42, 1, 0, WGPUTextureUsage_Sampled, mailbox.name);
     EXPECT_EQ(error::kInvalidArguments,
               ExecuteImmediateCmd(cmd.cmd, sizeof(mailbox.name)));
   }
@@ -153,7 +153,7 @@
   // Error case: texture ID invalid for the wire server.
   {
     AssociateMailboxCmdStorage cmd;
-    cmd.cmd.Init(0, 0, 42, 42, DAWN_TEXTURE_USAGE_SAMPLED, mailbox.name);
+    cmd.cmd.Init(0, 0, 42, 42, WGPUTextureUsage_Sampled, mailbox.name);
     EXPECT_EQ(error::kInvalidArguments,
               ExecuteImmediateCmd(cmd.cmd, sizeof(mailbox.name)));
   }
@@ -161,7 +161,7 @@
   // Error case: invalid usage.
   {
     AssociateMailboxCmdStorage cmd;
-    cmd.cmd.Init(0, 0, 42, 42, DAWN_TEXTURE_USAGE_SAMPLED, mailbox.name);
+    cmd.cmd.Init(0, 0, 42, 42, WGPUTextureUsage_Sampled, mailbox.name);
     EXPECT_EQ(error::kInvalidArguments,
               ExecuteImmediateCmd(cmd.cmd, sizeof(mailbox.name)));
   }
@@ -169,7 +169,7 @@
   // Error case: invalid texture usage.
   {
     AssociateMailboxCmdStorage cmd;
-    cmd.cmd.Init(0, 0, 1, 0, DAWN_TEXTURE_USAGE_FORCE32, mailbox.name);
+    cmd.cmd.Init(0, 0, 1, 0, WGPUTextureUsage_Force32, mailbox.name);
     EXPECT_EQ(error::kInvalidArguments,
               ExecuteImmediateCmd(cmd.cmd, sizeof(mailbox.name)));
   }
@@ -181,7 +181,7 @@
   // and generation invalid.
   {
     AssociateMailboxCmdStorage cmd;
-    cmd.cmd.Init(0, 0, 1, 0, DAWN_TEXTURE_USAGE_SAMPLED, mailbox.name);
+    cmd.cmd.Init(0, 0, 1, 0, WGPUTextureUsage_Sampled, mailbox.name);
     EXPECT_EQ(error::kNoError,
               ExecuteImmediateCmd(cmd.cmd, sizeof(mailbox.name)));
   }
@@ -189,7 +189,7 @@
   // Error case: associated to an already associated texture.
   {
     AssociateMailboxCmdStorage cmd;
-    cmd.cmd.Init(0, 0, 1, 0, DAWN_TEXTURE_USAGE_SAMPLED, mailbox.name);
+    cmd.cmd.Init(0, 0, 1, 0, WGPUTextureUsage_Sampled, mailbox.name);
     EXPECT_EQ(error::kInvalidArguments,
               ExecuteImmediateCmd(cmd.cmd, sizeof(mailbox.name)));
   }
@@ -216,7 +216,7 @@
   // Associate a mailbox so we can later dissociate it.
   {
     AssociateMailboxCmdStorage cmd;
-    cmd.cmd.Init(0, 0, 1, 0, DAWN_TEXTURE_USAGE_SAMPLED, mailbox.name);
+    cmd.cmd.Init(0, 0, 1, 0, WGPUTextureUsage_Sampled, mailbox.name);
     EXPECT_EQ(error::kNoError,
               ExecuteImmediateCmd(cmd.cmd, sizeof(mailbox.name)));
   }
diff --git a/gpu/command_buffer/tests/webgpu_fence_unittest.cc b/gpu/command_buffer/tests/webgpu_fence_unittest.cc
index 4dfefb76..3728903 100644
--- a/gpu/command_buffer/tests/webgpu_fence_unittest.cc
+++ b/gpu/command_buffer/tests/webgpu_fence_unittest.cc
@@ -11,11 +11,11 @@
 
 class MockFenceOnCompletionCallback {
  public:
-  MOCK_METHOD2(Call, void(DawnFenceCompletionStatus status, void* userdata));
+  MOCK_METHOD2(Call, void(WGPUFenceCompletionStatus status, void* userdata));
 };
 
 std::unique_ptr<MockFenceOnCompletionCallback> mockFenceOnCompletionCallback;
-void ToMockFenceOnCompletionCallback(DawnFenceCompletionStatus status,
+void ToMockFenceOnCompletionCallback(WGPUFenceCompletionStatus status,
                                      void* userdata) {
   mockFenceOnCompletionCallback->Call(status, userdata);
 }
@@ -38,7 +38,7 @@
     WebGPUTest::TearDown();
   }
 
-  void WaitForFence(dawn::Device device, dawn::Fence fence, uint64_t value) {
+  void WaitForFence(wgpu::Device device, wgpu::Fence fence, uint64_t value) {
     while (fence.GetCompletedValue() < value) {
       device.Tick();
       webgpu()->FlushCommands();
@@ -53,16 +53,16 @@
     LOG(ERROR) << "Test skipped";
     return;
   }
-  dawn::Device device = dawn::Device::Acquire(webgpu()->GetDefaultDevice());
-  dawn::Queue queue = device.CreateQueue();
+  wgpu::Device device = wgpu::Device::Acquire(webgpu()->GetDefaultDevice());
+  wgpu::Queue queue = device.CreateQueue();
   {
-    dawn::FenceDescriptor fence_desc{nullptr, nullptr, 0};
-    dawn::Fence fence = queue.CreateFence(&fence_desc);
+    wgpu::FenceDescriptor fence_desc{nullptr, nullptr, 0};
+    wgpu::Fence fence = queue.CreateFence(&fence_desc);
     EXPECT_EQ(fence.GetCompletedValue(), 0u);
   }
   {
-    dawn::FenceDescriptor fence_desc{nullptr, nullptr, 2};
-    dawn::Fence fence = queue.CreateFence(&fence_desc);
+    wgpu::FenceDescriptor fence_desc{nullptr, nullptr, 2};
+    wgpu::Fence fence = queue.CreateFence(&fence_desc);
     EXPECT_EQ(fence.GetCompletedValue(), 2u);
   }
 }
@@ -73,10 +73,10 @@
     LOG(ERROR) << "Test skipped";
     return;
   }
-  dawn::Device device = dawn::Device::Acquire(webgpu()->GetDefaultDevice());
-  dawn::Queue queue = device.CreateQueue();
-  dawn::FenceDescriptor fence_desc{nullptr, nullptr, 0};
-  dawn::Fence fence = queue.CreateFence(&fence_desc);
+  wgpu::Device device = wgpu::Device::Acquire(webgpu()->GetDefaultDevice());
+  wgpu::Queue queue = device.CreateQueue();
+  wgpu::FenceDescriptor fence_desc{nullptr, nullptr, 0};
+  wgpu::Fence fence = queue.CreateFence(&fence_desc);
   queue.Signal(fence, 2u);
   WaitForFence(device, fence, 2u);
   EXPECT_EQ(fence.GetCompletedValue(), 2u);
@@ -89,14 +89,14 @@
     LOG(ERROR) << "Test skipped";
     return;
   }
-  dawn::Device device = dawn::Device::Acquire(webgpu()->GetDefaultDevice());
-  dawn::Queue queue = device.CreateQueue();
-  dawn::FenceDescriptor fence_desc{nullptr, nullptr, 0};
-  dawn::Fence fence = queue.CreateFence(&fence_desc);
+  wgpu::Device device = wgpu::Device::Acquire(webgpu()->GetDefaultDevice());
+  wgpu::Queue queue = device.CreateQueue();
+  wgpu::FenceDescriptor fence_desc{nullptr, nullptr, 0};
+  wgpu::Fence fence = queue.CreateFence(&fence_desc);
   queue.Signal(fence, 2u);
 
   EXPECT_CALL(*mockFenceOnCompletionCallback,
-              Call(DAWN_FENCE_COMPLETION_STATUS_SUCCESS, this))
+              Call(WGPUFenceCompletionStatus_Success, this))
       .Times(1);
   fence.OnCompletion(2u, ToMockFenceOnCompletionCallback, this);
   WaitForFence(device, fence, 2u);
@@ -108,10 +108,10 @@
     LOG(ERROR) << "Test skipped";
     return;
   }
-  dawn::Device device = dawn::Device::Acquire(webgpu()->GetDefaultDevice());
-  dawn::Queue queue = device.CreateQueue();
-  dawn::FenceDescriptor fence_desc{nullptr, nullptr, 0};
-  dawn::Fence fence = queue.CreateFence(&fence_desc);
+  wgpu::Device device = wgpu::Device::Acquire(webgpu()->GetDefaultDevice());
+  wgpu::Queue queue = device.CreateQueue();
+  wgpu::FenceDescriptor fence_desc{nullptr, nullptr, 0};
+  wgpu::Fence fence = queue.CreateFence(&fence_desc);
 
   uint64_t max_value = 1000000u;
   for (uint64_t i = 1; i <= max_value; ++i) {
diff --git a/gpu/command_buffer/tests/webgpu_mailbox_unittest.cc b/gpu/command_buffer/tests/webgpu_mailbox_unittest.cc
index f9d188b..b649bb5 100644
--- a/gpu/command_buffer/tests/webgpu_mailbox_unittest.cc
+++ b/gpu/command_buffer/tests/webgpu_mailbox_unittest.cc
@@ -17,7 +17,7 @@
 class MockBufferMapReadCallback {
  public:
   MOCK_METHOD4(Call,
-               void(DawnBufferMapAsyncStatus status,
+               void(WGPUBufferMapAsyncStatus status,
                     const uint32_t* ptr,
                     uint64_t data_length,
                     void* userdata));
@@ -25,7 +25,7 @@
 
 std::unique_ptr<testing::StrictMock<MockBufferMapReadCallback>>
     mock_buffer_map_read_callback;
-void ToMockBufferMapReadCallback(DawnBufferMapAsyncStatus status,
+void ToMockBufferMapReadCallback(WGPUBufferMapAsyncStatus status,
                                  const void* ptr,
                                  uint64_t data_length,
                                  void* userdata) {
@@ -37,12 +37,12 @@
 class MockUncapturedErrorCallback {
  public:
   MOCK_METHOD3(Call,
-               void(DawnErrorType type, const char* message, void* userdata));
+               void(WGPUErrorType type, const char* message, void* userdata));
 };
 
 std::unique_ptr<testing::StrictMock<MockUncapturedErrorCallback>>
     mock_device_error_callback;
-void ToMockUncapturedErrorCallback(DawnErrorType type,
+void ToMockUncapturedErrorCallback(WGPUErrorType type,
                                    const char* message,
                                    void* userdata) {
   mock_device_error_callback->Call(type, message, userdata);
@@ -90,7 +90,7 @@
   SyncToken mailbox_produced_token = sii->GenVerifiedSyncToken();
   webgpu()->WaitSyncTokenCHROMIUM(mailbox_produced_token.GetConstData());
 
-  dawn::Device device = dawn::Device::Acquire(webgpu()->GetDefaultDevice());
+  wgpu::Device device = wgpu::Device::Acquire(webgpu()->GetDefaultDevice());
 
   // Part 1: Write to the texture using Dawn
   {
@@ -99,29 +99,29 @@
         webgpu()->ReserveTexture(device.Get());
 
     webgpu()->AssociateMailbox(0, 0, reservation.id, reservation.generation,
-                               DAWN_TEXTURE_USAGE_OUTPUT_ATTACHMENT,
+                               WGPUTextureUsage_OutputAttachment,
                                reinterpret_cast<GLbyte*>(&mailbox));
-    dawn::Texture texture = dawn::Texture::Acquire(reservation.texture);
+    wgpu::Texture texture = wgpu::Texture::Acquire(reservation.texture);
 
     // Clear the texture using a render pass.
-    dawn::RenderPassColorAttachmentDescriptor color_desc;
+    wgpu::RenderPassColorAttachmentDescriptor color_desc;
     color_desc.attachment = texture.CreateView();
     color_desc.resolveTarget = nullptr;
-    color_desc.loadOp = dawn::LoadOp::Clear;
-    color_desc.storeOp = dawn::StoreOp::Store;
+    color_desc.loadOp = wgpu::LoadOp::Clear;
+    color_desc.storeOp = wgpu::StoreOp::Store;
     color_desc.clearColor = {0, 255, 0, 255};
 
-    dawn::RenderPassDescriptor render_pass_desc;
+    wgpu::RenderPassDescriptor render_pass_desc;
     render_pass_desc.colorAttachmentCount = 1;
     render_pass_desc.colorAttachments = &color_desc;
     render_pass_desc.depthStencilAttachment = nullptr;
 
-    dawn::CommandEncoder encoder = device.CreateCommandEncoder();
-    dawn::RenderPassEncoder pass = encoder.BeginRenderPass(&render_pass_desc);
+    wgpu::CommandEncoder encoder = device.CreateCommandEncoder();
+    wgpu::RenderPassEncoder pass = encoder.BeginRenderPass(&render_pass_desc);
     pass.EndPass();
-    dawn::CommandBuffer commands = encoder.Finish();
+    wgpu::CommandBuffer commands = encoder.Finish();
 
-    dawn::Queue queue = device.CreateQueue();
+    wgpu::Queue queue = device.CreateQueue();
     queue.Submit(1, &commands);
 
     // Dissociate the mailbox, flushing previous commands first
@@ -140,35 +140,35 @@
     webgpu()->FlushCommands();
 
     webgpu()->AssociateMailbox(0, 0, reservation.id, reservation.generation,
-                               DAWN_TEXTURE_USAGE_COPY_SRC,
+                               WGPUTextureUsage_CopySrc,
                                reinterpret_cast<GLbyte*>(&mailbox));
-    dawn::Texture texture = dawn::Texture::Acquire(reservation.texture);
+    wgpu::Texture texture = wgpu::Texture::Acquire(reservation.texture);
 
     // Copy the texture in a mappable buffer.
-    dawn::BufferDescriptor buffer_desc;
+    wgpu::BufferDescriptor buffer_desc;
     buffer_desc.size = 4;
-    buffer_desc.usage = dawn::BufferUsage::MapRead | dawn::BufferUsage::CopyDst;
-    dawn::Buffer readback_buffer = device.CreateBuffer(&buffer_desc);
+    buffer_desc.usage = wgpu::BufferUsage::MapRead | wgpu::BufferUsage::CopyDst;
+    wgpu::Buffer readback_buffer = device.CreateBuffer(&buffer_desc);
 
-    dawn::TextureCopyView copy_src;
+    wgpu::TextureCopyView copy_src;
     copy_src.texture = texture;
     copy_src.mipLevel = 0;
     copy_src.arrayLayer = 0;
     copy_src.origin = {0, 0, 0};
 
-    dawn::BufferCopyView copy_dst;
+    wgpu::BufferCopyView copy_dst;
     copy_dst.buffer = readback_buffer;
     copy_dst.offset = 0;
     copy_dst.rowPitch = 256;
     copy_dst.imageHeight = 0;
 
-    dawn::Extent3D copy_size = {1, 1, 1};
+    wgpu::Extent3D copy_size = {1, 1, 1};
 
-    dawn::CommandEncoder encoder = device.CreateCommandEncoder();
+    wgpu::CommandEncoder encoder = device.CreateCommandEncoder();
     encoder.CopyTextureToBuffer(&copy_src, &copy_dst, &copy_size);
-    dawn::CommandBuffer commands = encoder.Finish();
+    wgpu::CommandBuffer commands = encoder.Finish();
 
-    dawn::Queue queue = device.CreateQueue();
+    wgpu::Queue queue = device.CreateQueue();
     queue.Submit(1, &commands);
 
     // Dissociate the mailbox, flushing previous commands first
@@ -179,7 +179,7 @@
     readback_buffer.MapReadAsync(ToMockBufferMapReadCallback, 0);
     uint32_t buffer_contents = 0xFF00FF00;
     EXPECT_CALL(*mock_buffer_map_read_callback,
-                Call(DAWN_BUFFER_MAP_ASYNC_STATUS_SUCCESS,
+                Call(WGPUBufferMapAsyncStatus_Success,
                      testing::Pointee(testing::Eq(buffer_contents)),
                      sizeof(uint32_t), 0))
         .Times(1);
@@ -208,23 +208,23 @@
   webgpu()->WaitSyncTokenCHROMIUM(mailbox_produced_token.GetConstData());
 
   // Create the device, and expect a validation error.
-  dawn::Device device = dawn::Device::Acquire(webgpu()->GetDefaultDevice());
+  wgpu::Device device = wgpu::Device::Acquire(webgpu()->GetDefaultDevice());
   device.SetUncapturedErrorCallback(ToMockUncapturedErrorCallback, 0);
 
   // Associate and immediately dissociate the image.
   gpu::webgpu::ReservedTexture reservation =
       webgpu()->ReserveTexture(device.Get());
-  dawn::Texture texture = dawn::Texture::Acquire(reservation.texture);
+  wgpu::Texture texture = wgpu::Texture::Acquire(reservation.texture);
 
   webgpu()->AssociateMailbox(0, 0, reservation.id, reservation.generation,
-                             DAWN_TEXTURE_USAGE_OUTPUT_ATTACHMENT,
+                             WGPUTextureUsage_OutputAttachment,
                              reinterpret_cast<GLbyte*>(&mailbox));
   webgpu()->DissociateMailbox(reservation.id, reservation.generation);
 
   // Try using the texture, it should produce a validation error.
-  dawn::TextureView view = texture.CreateView();
+  wgpu::TextureView view = texture.CreateView();
   EXPECT_CALL(*mock_device_error_callback,
-              Call(DAWN_ERROR_TYPE_VALIDATION, testing::_, testing::_))
+              Call(WGPUErrorType_Validation, testing::_, testing::_))
       .Times(1);
   WaitForCompletion(device);
 }
diff --git a/gpu/command_buffer/tests/webgpu_test.cc b/gpu/command_buffer/tests/webgpu_test.cc
index db56128..200a25a 100644
--- a/gpu/command_buffer/tests/webgpu_test.cc
+++ b/gpu/command_buffer/tests/webgpu_test.cc
@@ -4,8 +4,8 @@
 
 #include "gpu/command_buffer/tests/webgpu_test.h"
 
-#include <dawn/dawn.h>
 #include <dawn/dawn_proc.h>
+#include <dawn/webgpu.h>
 
 #include "base/test/test_simple_task_runner.h"
 #include "build/build_config.h"
@@ -98,13 +98,13 @@
   context_->GetTaskRunner()->RunPendingTasks();
 }
 
-void WebGPUTest::WaitForCompletion(dawn::Device device) {
+void WebGPUTest::WaitForCompletion(wgpu::Device device) {
   // Insert a fence signal and wait for it to be signaled. The guarantees of
   // Dawn are that all previous operations will have been completed and more
   // importantly the callbacks will have been called.
-  dawn::Queue queue = device.CreateQueue();
-  dawn::FenceDescriptor fence_desc{nullptr, 0};
-  dawn::Fence fence = queue.CreateFence(&fence_desc);
+  wgpu::Queue queue = device.CreateQueue();
+  wgpu::FenceDescriptor fence_desc{nullptr, 0};
+  wgpu::Fence fence = queue.CreateFence(&fence_desc);
 
   queue.Submit(0, nullptr);
   queue.Signal(fence, 1u);
diff --git a/gpu/command_buffer/tests/webgpu_test.h b/gpu/command_buffer/tests/webgpu_test.h
index 92b37b3..5c48f6f4 100644
--- a/gpu/command_buffer/tests/webgpu_test.h
+++ b/gpu/command_buffer/tests/webgpu_test.h
@@ -5,7 +5,7 @@
 #ifndef GPU_COMMAND_BUFFER_TESTS_WEBGPU_TEST_H_
 #define GPU_COMMAND_BUFFER_TESTS_WEBGPU_TEST_H_
 
-#include <dawn/dawncpp.h>
+#include <dawn/webgpu_cpp.h>
 
 #include <memory>
 
@@ -51,7 +51,7 @@
   SharedImageInterface* GetSharedImageInterface() const;
 
   void RunPendingTasks();
-  void WaitForCompletion(dawn::Device device);
+  void WaitForCompletion(wgpu::Device device);
 
  private:
   std::unique_ptr<viz::TestGpuServiceHolder> gpu_service_holder_;
diff --git a/infra/config/PRESUBMIT.py b/infra/config/PRESUBMIT.py
index 7801680..d11d55df 100644
--- a/infra/config/PRESUBMIT.py
+++ b/infra/config/PRESUBMIT.py
@@ -12,7 +12,7 @@
 def _CommonChecks(input_api, output_api):
   commands = []
 
-  if ('infra/config/luci-milo.cfg' in input_api.LocalPaths() or
+  if ('infra/config/generated/luci-milo.cfg' in input_api.LocalPaths() or
       'infra/config/lint-luci-milo.py' in input_api.LocalPaths()):
     commands.append(
       input_api.Command(
@@ -20,9 +20,9 @@
           cmd=[input_api.python_executable, 'lint-luci-milo.py'],
           kwargs={},
           message=output_api.PresubmitError))
+  if ('infra/config/generated/luci-milo.cfg' in input_api.LocalPaths() or
+      'infra/config/luci-milo-dev.cfg' in input_api.LocalPaths()):
     commands.append(
-      # Technically doesn't rely on lint-luci-milo.py, but is a lightweight
-      # enough check it should be fine to trigger.
       input_api.Command(
         name='testing/buildbot config checks',
         cmd=[input_api.python_executable, input_api.os_path.join(
diff --git a/ios/chrome/app/strings/ios_strings.grd b/ios/chrome/app/strings/ios_strings.grd
index 95cd8a8..35b4366 100644
--- a/ios/chrome/app/strings/ios_strings.grd
+++ b/ios/chrome/app/strings/ios_strings.grd
@@ -1954,6 +1954,9 @@
       <message name="IDS_IOS_TRANSLATE_INFOBAR_DEFAULT_ACCESSIBILITY_ANNOUNCEMENT" desc="The accessibility announcement read by Voice Over when the Translate Infobar UI is shown in default mode. [Length: unlimited] [iOS only]">
         Translate is available. Options available near bottom of the screen.
       </message>
+      <message name="IDS_IOS_TRANSLATE_INFOBAR_TRANSLATE_ACTION" desc="The button text for the action to translate the page. [iOS only]">
+        Translate
+      </message>
       <message name="IDS_IOS_TRANSLATE_INFOBAR_TRANSLATING_ACCESSIBILITY_ANNOUNCEMENT" desc="The accessibility announcement read by Voice Over when the Translate Infobar UI is shown in translating mode. [Length: unlimited] [iOS only]">
         Translating the page to <ph name="language">$1<ex>French</ex></ph>. Options available near bottom of the screen.
       </message>
diff --git a/ios/chrome/browser/device_sharing/BUILD.gn b/ios/chrome/browser/device_sharing/BUILD.gn
index fbfb9b68..94906696 100644
--- a/ios/chrome/browser/device_sharing/BUILD.gn
+++ b/ios/chrome/browser/device_sharing/BUILD.gn
@@ -38,18 +38,64 @@
   ]
 }
 
+source_set("test_support") {
+  defines = [ "CHROME_EARL_GREY_1" ]
+  configs += [ "//build/config/compiler:enable_arc" ]
+  testonly = true
+  sources = [
+    "handoff_manager_app_interface.h",
+    "handoff_manager_app_interface.mm",
+  ]
+  deps = [
+    ":device_sharing",
+    "//components/handoff",
+    "//ios/chrome/test/app:test_support",
+  ]
+}
+
+source_set("eg_app_support+eg2") {
+  defines = [ "CHROME_EARL_GREY_2" ]
+  configs += [
+    "//build/config/compiler:enable_arc",
+    "//build/config/ios:xctest_config",
+  ]
+  testonly = true
+  sources = [
+    "handoff_manager_app_interface.h",
+    "handoff_manager_app_interface.mm",
+  ]
+  deps = [
+    ":device_sharing",
+    "//components/handoff",
+    "//ios/chrome/test/app:test_support",
+  ]
+}
+
+source_set("eg_test_support+eg2") {
+  defines = [ "CHROME_EARL_GREY_2" ]
+  configs += [
+    "//build/config/compiler:enable_arc",
+    "//build/config/ios:xctest_config",
+  ]
+  testonly = true
+
+  sources = [
+    "handoff_manager_app_interface.h",
+  ]
+}
+
 source_set("eg_tests") {
+  defines = [ "CHROME_EARL_GREY_1" ]
   configs += [ "//build/config/compiler:enable_arc" ]
   testonly = true
   sources = [
     "handoff_manager_egtest.mm",
   ]
   deps = [
-    ":device_sharing",
-    "//components/handoff",
+    ":test_support",
     "//ios/chrome/browser/ui/util",
-    "//ios/chrome/test/app:test_support",
     "//ios/chrome/test/earl_grey:test_support",
+    "//ios/testing/earl_grey:earl_grey_support",
     "//ios/third_party/earl_grey:earl_grey+link",
     "//ios/web/public/test/http_server",
     "//net",
@@ -57,3 +103,29 @@
   ]
   libs = [ "XCTest.framework" ]
 }
+
+source_set("eg2_tests") {
+  defines = [ "CHROME_EARL_GREY_2" ]
+  configs += [
+    "//build/config/compiler:enable_arc",
+    "//build/config/ios:xctest_config",
+  ]
+  testonly = true
+
+  sources = [
+    "handoff_manager_egtest.mm",
+  ]
+
+  deps = [
+    ":eg_test_support+eg2",
+    "//ios/chrome/browser/ui/util",
+    "//ios/chrome/test/earl_grey:eg_test_support+eg2",
+    "//ios/testing/earl_grey:eg_test_support+eg2",
+    "//ios/third_party/earl_grey2:test_lib",
+    "//ios/web/public/test/http_server",
+    "//net",
+    "//url",
+  ]
+
+  libs = [ "UIKit.framework" ]
+}
diff --git a/ios/chrome/browser/device_sharing/handoff_manager_app_interface.h b/ios/chrome/browser/device_sharing/handoff_manager_app_interface.h
new file mode 100644
index 0000000..c146c10
--- /dev/null
+++ b/ios/chrome/browser/device_sharing/handoff_manager_app_interface.h
@@ -0,0 +1,18 @@
+// Copyright 2019 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 IOS_CHROME_BROWSER_DEVICE_SHARING_HANDOFF_MANAGER_APP_INTERFACE_H_
+#define IOS_CHROME_BROWSER_DEVICE_SHARING_HANDOFF_MANAGER_APP_INTERFACE_H_
+
+#import <UIKit/UIKit.h>
+
+// The app interface for handoff tests.
+@interface HandoffManagerAppInterface : NSObject
+
+// Current user activity web page url from the handoff manager.
++ (NSURL*)currentUserActivityWebPageURL;
+
+@end
+
+#endif  // IOS_CHROME_BROWSER_DEVICE_SHARING_HANDOFF_MANAGER_APP_INTERFACE_H_
diff --git a/ios/chrome/browser/device_sharing/handoff_manager_app_interface.mm b/ios/chrome/browser/device_sharing/handoff_manager_app_interface.mm
new file mode 100644
index 0000000..9654da2
--- /dev/null
+++ b/ios/chrome/browser/device_sharing/handoff_manager_app_interface.mm
@@ -0,0 +1,23 @@
+// Copyright 2019 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.
+
+#import "ios/chrome/browser/device_sharing/handoff_manager_app_interface.h"
+
+#import "components/handoff/handoff_manager.h"
+#import "ios/chrome/browser/device_sharing/device_sharing_manager.h"
+#import "ios/chrome/test/app/chrome_test_util.h"
+
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
+@implementation HandoffManagerAppInterface
+
++ (NSURL*)currentUserActivityWebPageURL {
+  HandoffManager* manager =
+      [chrome_test_util::GetDeviceSharingManager() handoffManager];
+  return manager.userActivityWebpageURL;
+}
+
+@end
diff --git a/ios/chrome/browser/device_sharing/handoff_manager_egtest.mm b/ios/chrome/browser/device_sharing/handoff_manager_egtest.mm
index 3f53f97..dfbf467e 100644
--- a/ios/chrome/browser/device_sharing/handoff_manager_egtest.mm
+++ b/ios/chrome/browser/device_sharing/handoff_manager_egtest.mm
@@ -2,15 +2,12 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#import <EarlGrey/EarlGrey.h>
 #import <XCTest/XCTest.h>
 
-#import "components/handoff/handoff_manager.h"
-#import "ios/chrome/browser/device_sharing/device_sharing_manager.h"
-#include "ios/chrome/browser/ui/util/ui_util.h"
-#import "ios/chrome/test/app/chrome_test_util.h"
+#import "ios/chrome/browser/device_sharing/handoff_manager_app_interface.h"
 #import "ios/chrome/test/earl_grey/chrome_earl_grey.h"
 #import "ios/chrome/test/earl_grey/chrome_test_case.h"
+#import "ios/testing/earl_grey/earl_grey_test.h"
 #include "ios/web/public/test/http_server/http_server.h"
 #include "ios/web/public/test/http_server/http_server_util.h"
 #import "net/base/mac/url_conversions.h"
@@ -20,20 +17,24 @@
 #error "This file requires ARC support."
 #endif
 
+#if defined(CHROME_EARL_GREY_2)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wc++98-compat-extra-semi"
+GREY_STUB_CLASS_IN_APP_MAIN_QUEUE(HandoffManagerAppInterface);
+#pragma clang diagnostic pop
+#endif  // defined(CHROME_EARL_GREY_2)
+
 namespace {
 
 // Checks that Handoff will report the specified |gurl|.
 void AssertHandoffURL(const GURL& gurl) {
-  HandoffManager* manager =
-      [chrome_test_util::GetDeviceSharingManager() handoffManager];
-  GREYAssertTrue(manager != nil, @"Handoff Manager should not be nil");
+  NSURL* handoffURL =
+      [HandoffManagerAppInterface currentUserActivityWebPageURL];
   if (gurl.is_valid()) {
     NSURL* URL = net::NSURLWithGURL(gurl);
-    GREYAssertTrue([manager.userActivityWebpageURL isEqual:URL],
-                   @"Incorrect Handoff URL.");
+    GREYAssertTrue([handoffURL isEqual:URL], @"Incorrect Handoff URL.");
   } else {
-    GREYAssertTrue(manager.userActivityWebpageURL == nil,
-                   @"Handoff URL is not nil.");
+    GREYAssertTrue(handoffURL == nil, @"Handoff URL is not nil.");
   }
 }
 
diff --git a/ios/chrome/browser/flags/about_flags.mm b/ios/chrome/browser/flags/about_flags.mm
index fdeeeb0..eed3f75b 100644
--- a/ios/chrome/browser/flags/about_flags.mm
+++ b/ios/chrome/browser/flags/about_flags.mm
@@ -47,7 +47,6 @@
 #include "components/sync/driver/sync_driver_switches.h"
 #include "components/translate/core/browser/translate_prefs.h"
 #include "components/ukm/ios/features.h"
-#include "components/unified_consent/feature.h"
 #include "ios/chrome/browser/app_launcher/app_launcher_flags.h"
 #include "ios/chrome/browser/browsing_data/browsing_data_features.h"
 #include "ios/chrome/browser/chrome_switches.h"
diff --git a/ios/chrome/browser/infobars/infobar_badge_model.mm b/ios/chrome/browser/infobars/infobar_badge_model.mm
index dd06741..02661cbc 100644
--- a/ios/chrome/browser/infobars/infobar_badge_model.mm
+++ b/ios/chrome/browser/infobars/infobar_badge_model.mm
@@ -46,6 +46,8 @@
       return BadgeType::kBadgeTypePasswordUpdate;
     case InfobarType::kInfobarTypeSaveCard:
       return BadgeType::kBadgeTypeSaveCard;
+    case InfobarType::kInfobarTypeTranslate:
+      return BadgeType::kBadgeTypeTranslate;
     default:
       NOTREACHED() << "This infobar should not have a badge";
       return BadgeType::kBadgeTypeNone;
diff --git a/ios/chrome/browser/metrics/ukm_egtest.mm b/ios/chrome/browser/metrics/ukm_egtest.mm
index a60de87..0d1e567 100644
--- a/ios/chrome/browser/metrics/ukm_egtest.mm
+++ b/ios/chrome/browser/metrics/ukm_egtest.mm
@@ -12,7 +12,6 @@
 #include "components/metrics_services_manager/metrics_services_manager.h"
 #include "components/strings/grit/components_strings.h"
 #include "components/ukm/ukm_service.h"
-#include "components/unified_consent/feature.h"
 #include "ios/chrome/browser/application_context.h"
 #include "ios/chrome/browser/metrics/ios_chrome_metrics_service_accessor.h"
 #import "ios/chrome/browser/ui/authentication/cells/signin_promo_view.h"
@@ -333,7 +332,6 @@
   uint64_t original_client_id = metrics::UkmEGTestHelper::client_id();
 
   [ChromeEarlGreyUI openSettingsMenu];
-  if (unified_consent::IsUnifiedConsentFeatureEnabled()) {
     // Open Sync and Google services settings
     [ChromeEarlGreyUI tapSettingsMenuButton:GoogleServicesSettingsButton()];
     // Toggle "Make searches and browsing better" switch off.
@@ -347,45 +345,13 @@
                                  kGoogleServicesSettingsViewIdentifier)]
         performAction:chrome_test_util::TurnSettingsSwitchOn(NO)];
 
-  } else {
-    // Open accounts settings, then sync settings.
-    [[EarlGrey selectElementWithMatcher:SettingsAccountButton()]
-        performAction:grey_tap()];
-    [[EarlGrey selectElementWithMatcher:AccountsSyncButton()]
-        performAction:grey_tap()];
-    // Toggle "Sync Everything" then "History" switches off.
-    [[EarlGrey selectElementWithMatcher:SyncSwitchCell(
-                                            l10n_util::GetNSString(
-                                                IDS_IOS_SYNC_EVERYTHING_TITLE),
-                                            YES)]
-        performAction:TurnSyncSwitchOn(NO)];
-    [[EarlGrey selectElementWithMatcher:SyncSwitchCell(
-                                            l10n_util::GetNSString(
-                                                IDS_SYNC_DATATYPE_TYPED_URLS),
-                                            YES)]
-        performAction:TurnSyncSwitchOn(NO)];
-  }
   AssertUKMEnabled(false);
 
-  if (unified_consent::IsUnifiedConsentFeatureEnabled()) {
     // Toggle "Make searches and browsing better" switch on.
     [[EarlGrey
         selectElementWithMatcher:chrome_test_util::SettingsSwitchCell(
                                      @"betterSearchAndBrowsingItem_switch", NO)]
         performAction:chrome_test_util::TurnSettingsSwitchOn(YES)];
-  } else {
-    // Toggle "History" then "Sync Everything" switches on.
-    [[EarlGrey selectElementWithMatcher:SyncSwitchCell(
-                                            l10n_util::GetNSString(
-                                                IDS_SYNC_DATATYPE_TYPED_URLS),
-                                            NO)]
-        performAction:TurnSyncSwitchOn(YES)];
-    [[EarlGrey selectElementWithMatcher:SyncSwitchCell(
-                                            l10n_util::GetNSString(
-                                                IDS_IOS_SYNC_EVERYTHING_TITLE),
-                                            NO)]
-        performAction:TurnSyncSwitchOn(YES)];
-  }
 
   AssertUKMEnabled(true);
   // Client ID should have been reset.
@@ -398,55 +364,6 @@
 
 // testMultiDisableSync not needed, since there can't be multiple profiles.
 
-// Make sure that UKM is disabled when a secondary passphrase is used.
-- (void)testSecondaryPassphrase {
-  if (unified_consent::IsUnifiedConsentFeatureEnabled()) {
-    EARL_GREY_TEST_DISABLED(
-        @"When Unified Consent feature is enabled, setting a custom passphrase "
-         "does not disable UKM anymore, so this test is not needed");
-  }
-
-  uint64_t original_client_id = metrics::UkmEGTestHelper::client_id();
-
-  [ChromeEarlGreyUI openSettingsMenu];
-  // Open accounts settings, then sync settings.
-  [[EarlGrey selectElementWithMatcher:SettingsAccountButton()]
-      performAction:grey_tap()];
-  [[EarlGrey selectElementWithMatcher:AccountsSyncButton()]
-      performAction:grey_tap()];
-  // Open sync encryption menu.
-  [[EarlGrey selectElementWithMatcher:grey_accessibilityID(@"kSettingsSyncId")]
-      performAction:grey_scrollToContentEdge(kGREYContentEdgeBottom)];
-  [[EarlGrey selectElementWithMatcher:ButtonWithAccessibilityLabelId(
-
-                                          IDS_IOS_SYNC_ENCRYPTION_TITLE)]
-      performAction:grey_tap()];
-  // Select passphrase encryption.
-  [[EarlGrey selectElementWithMatcher:ButtonWithAccessibilityLabelId(
-                                          IDS_SYNC_FULL_ENCRYPTION_DATA)]
-      performAction:grey_tap()];
-  // Type and confirm passphrase, then submit.
-  [[EarlGrey selectElementWithMatcher:grey_accessibilityValue(@"Passphrase")]
-      performAction:grey_replaceText(@"mypassphrase")];
-  [[EarlGrey
-      selectElementWithMatcher:grey_accessibilityValue(@"Confirm passphrase")]
-      performAction:grey_replaceText(@"mypassphrase")];
-
-  AssertUKMEnabled(false);
-  // Client ID should have been reset.
-  GREYAssert(original_client_id != metrics::UkmEGTestHelper::client_id(),
-             @"Client ID was not reset.");
-
-  [[EarlGrey selectElementWithMatcher:SettingsDoneButton()]
-      performAction:grey_tap()];
-
-  // Reset sync back to original state.
-  SignOut();
-  [ChromeEarlGrey clearSyncServerData];
-  [SigninEarlGreyUI signinWithIdentity:[SigninEarlGreyUtils fakeIdentity1]];
-  AssertUKMEnabled(true);
-}
-
 // Make sure that UKM is disabled when sync is not enabled.
 - (void)testSingleSyncSignout {
   uint64_t original_client_id = metrics::UkmEGTestHelper::client_id();
diff --git a/ios/chrome/browser/prerender/BUILD.gn b/ios/chrome/browser/prerender/BUILD.gn
index 27db3fd..7d8ba79 100644
--- a/ios/chrome/browser/prerender/BUILD.gn
+++ b/ios/chrome/browser/prerender/BUILD.gn
@@ -63,18 +63,15 @@
   ]
 }
 source_set("eg_tests") {
+  defines = [ "CHROME_EARL_GREY_1" ]
   testonly = true
   sources = [
     "prerender_egtest.mm",
   ]
   deps = [
-    "//base",
-    "//ios/chrome/browser/ui/content_suggestions:content_suggestions_constant",
-    "//ios/chrome/browser/ui/omnibox:omnibox_internal",
-    "//ios/chrome/browser/ui/omnibox/popup:popup_ui",
-    "//ios/chrome/browser/ui/util",
     "//ios/chrome/test/app:test_support",
     "//ios/chrome/test/earl_grey:test_support",
+    "//ios/testing/earl_grey:earl_grey_support",
     "//ios/web/public/test/http_server",
   ]
   libs = [
@@ -83,3 +80,22 @@
   ]
   configs += [ "//build/config/compiler:enable_arc" ]
 }
+
+source_set("eg2_tests") {
+  defines = [ "CHROME_EARL_GREY_2" ]
+  configs += [
+    "//build/config/compiler:enable_arc",
+    "//build/config/ios:xctest_config",
+  ]
+  testonly = true
+  sources = [
+    "prerender_egtest.mm",
+  ]
+  deps = [
+    "//ios/chrome/test/earl_grey:eg_test_support+eg2",
+    "//ios/testing/earl_grey:eg_test_support+eg2",
+    "//ios/third_party/earl_grey2:test_lib",
+    "//net:test_support",
+  ]
+  libs = [ "UIKit.framework" ]
+}
diff --git a/ios/chrome/browser/prerender/prerender_egtest.mm b/ios/chrome/browser/prerender/prerender_egtest.mm
index 42a5e47..b1470d5 100644
--- a/ios/chrome/browser/prerender/prerender_egtest.mm
+++ b/ios/chrome/browser/prerender/prerender_egtest.mm
@@ -2,17 +2,13 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#import <EarlGrey/EarlGrey.h>
 #import <XCTest/XCTest.h>
+#import "ios/testing/earl_grey/earl_grey_test.h"
 
 #include "base/bind.h"
 #include "base/memory/ptr_util.h"
 #include "base/strings/sys_string_conversions.h"
 #import "base/test/ios/wait_util.h"
-#import "ios/chrome/browser/ui/content_suggestions/ntp_home_constant.h"
-#import "ios/chrome/browser/ui/omnibox/omnibox_text_field_ios.h"
-#import "ios/chrome/browser/ui/omnibox/popup/omnibox_popup_truncating_label.h"
-#include "ios/chrome/browser/ui/util/ui_util.h"
 #import "ios/chrome/test/earl_grey/chrome_earl_grey.h"
 #import "ios/chrome/test/earl_grey/chrome_matchers.h"
 #import "ios/chrome/test/earl_grey/chrome_test_case.h"
@@ -110,21 +106,20 @@
   // Make sure the omnibox is autocompleted.
   [[EarlGrey
       selectElementWithMatcher:grey_allOf(grey_accessibilityLabel(pageString),
-                                          grey_ancestor(grey_kindOfClass(
-                                              [OmniboxTextFieldIOS class])),
+                                          grey_ancestor(grey_kindOfClassName(
+                                              @"OmniboxTextFieldIOS")),
                                           nil)]
       assertWithMatcher:grey_sufficientlyVisible()];
 
   // Open the suggestion. The suggestion needs to be the first suggestion to
   // have the prerenderer activated.
   [[EarlGrey
-      selectElementWithMatcher:grey_allOf(
-                                   grey_accessibilityLabel(pageString),
-                                   grey_kindOfClass(
-                                       [OmniboxPopupTruncatingLabel class]),
-                                   grey_ancestor(grey_accessibilityID(
-                                       @"omnibox suggestion 0")),
-                                   grey_sufficientlyVisible(), nil)]
+      selectElementWithMatcher:grey_allOf(grey_accessibilityLabel(pageString),
+                                          grey_kindOfClassName(
+                                              @"OmniboxPopupTruncatingLabel"),
+                                          grey_ancestor(grey_accessibilityID(
+                                              @"omnibox suggestion 0")),
+                                          grey_sufficientlyVisible(), nil)]
       performAction:grey_tap()];
 
   [ChromeEarlGrey waitForWebStateContainingText:kPageLoadedString];
diff --git a/ios/chrome/browser/translate/BUILD.gn b/ios/chrome/browser/translate/BUILD.gn
index b6ee5e30..fe43ca0a 100644
--- a/ios/chrome/browser/translate/BUILD.gn
+++ b/ios/chrome/browser/translate/BUILD.gn
@@ -5,6 +5,7 @@
 source_set("public") {
   configs += [ "//build/config/compiler:enable_arc" ]
   sources = [
+    "translate_constants.h",
     "translate_infobar_delegate_observer_bridge.h",
     "translate_infobar_delegate_observer_bridge.mm",
   ]
diff --git a/ios/chrome/browser/translate/translate_constants.h b/ios/chrome/browser/translate/translate_constants.h
new file mode 100644
index 0000000..88aeeaa8
--- /dev/null
+++ b/ios/chrome/browser/translate/translate_constants.h
@@ -0,0 +1,57 @@
+// Copyright 2019 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 IOS_CHROME_BROWSER_TRANSLATE_TRANSLATE_CONSTANTS_H_
+#define IOS_CHROME_BROWSER_TRANSLATE_TRANSLATE_CONSTANTS_H_
+
+#import <UIKit/UIKit.h>
+
+// Track the usage of Translate over its lifetime to log metrics of whether the
+// user closed the infobar without interacting with it.
+typedef NS_OPTIONS(NSUInteger, UserAction) {
+  UserActionNone = 0,
+  UserActionTranslate = 1 << 0,
+  UserActionRevert = 1 << 1,
+  UserActionAlwaysTranslate = 1 << 2,
+  UserActionNeverTranslateLanguage = 1 << 3,
+  UserActionNeverTranslateSite = 1 << 4,
+  UserActionExpandMenu = 1 << 5,
+};
+
+// Enum for the Translate.CompactInfobar.Event UMA histogram.
+// Note: These values are repeated as constants in TranslateCompactInfoBar.java.
+// Note: This enum is used to back an UMA histogram, and should be treated as
+// append-only.
+// TODO(crbug.com/933371): Share these enums with Java.
+enum class InfobarEvent {
+  INFOBAR_IMPRESSION = 0,
+  INFOBAR_TARGET_TAB_TRANSLATE = 1,
+  INFOBAR_DECLINE = 2,
+  INFOBAR_OPTIONS = 3,
+  INFOBAR_MORE_LANGUAGES = 4,
+  INFOBAR_MORE_LANGUAGES_TRANSLATE = 5,
+  INFOBAR_PAGE_NOT_IN = 6,
+  INFOBAR_ALWAYS_TRANSLATE = 7,
+  INFOBAR_NEVER_TRANSLATE = 8,
+  INFOBAR_NEVER_TRANSLATE_SITE = 9,
+  INFOBAR_SCROLL_HIDE = 10,
+  INFOBAR_SCROLL_SHOW = 11,
+  INFOBAR_REVERT = 12,
+  INFOBAR_SNACKBAR_ALWAYS_TRANSLATE_IMPRESSION = 13,
+  INFOBAR_SNACKBAR_NEVER_TRANSLATE_IMPRESSION = 14,
+  INFOBAR_SNACKBAR_NEVER_TRANSLATE_SITE_IMPRESSION = 15,
+  INFOBAR_SNACKBAR_CANCEL_ALWAYS = 16,
+  INFOBAR_SNACKBAR_CANCEL_NEVER_SITE = 17,
+  INFOBAR_SNACKBAR_CANCEL_NEVER = 18,
+  INFOBAR_ALWAYS_TRANSLATE_UNDO = 19,
+  INFOBAR_CLOSE_DEPRECATED = 20,
+  INFOBAR_SNACKBAR_AUTO_ALWAYS_IMPRESSION = 21,
+  INFOBAR_SNACKBAR_AUTO_NEVER_IMPRESSION = 22,
+  INFOBAR_SNACKBAR_CANCEL_AUTO_ALWAYS = 23,
+  INFOBAR_SNACKBAR_CANCEL_AUTO_NEVER = 24,
+  INFOBAR_HISTOGRAM_BOUNDARY = 25,
+  kMaxValue = INFOBAR_HISTOGRAM_BOUNDARY,
+};
+
+#endif  // IOS_CHROME_BROWSER_TRANSLATE_TRANSLATE_CONSTANTS_H_
diff --git a/ios/chrome/browser/translate/translate_infobar_controller.mm b/ios/chrome/browser/translate/translate_infobar_controller.mm
index 7bc7012..b14e81d2 100644
--- a/ios/chrome/browser/translate/translate_infobar_controller.mm
+++ b/ios/chrome/browser/translate/translate_infobar_controller.mm
@@ -23,6 +23,7 @@
 #include "ios/chrome/browser/translate/language_selection_context.h"
 #include "ios/chrome/browser/translate/language_selection_delegate.h"
 #include "ios/chrome/browser/translate/language_selection_handler.h"
+#import "ios/chrome/browser/translate/translate_constants.h"
 #import "ios/chrome/browser/translate/translate_infobar_delegate_observer_bridge.h"
 #include "ios/chrome/browser/translate/translate_option_selection_delegate.h"
 #include "ios/chrome/browser/translate/translate_option_selection_handler.h"
@@ -47,17 +48,6 @@
   LanguageSelectionStateTarget,
 };
 
-// Various user actions to keep track of.
-typedef NS_OPTIONS(NSUInteger, UserAction) {
-  UserActionNone = 0,
-  UserActionTranslate = 1 << 0,
-  UserActionRevert = 1 << 1,
-  UserActionAlwaysTranslate = 1 << 2,
-  UserActionNeverTranslateLanguage = 1 << 3,
-  UserActionNeverTranslateSite = 1 << 4,
-  UserActionExpandMenu = 1 << 5,
-};
-
 // UMA histogram names.
 // Note: These string constants are repeated in TranslateCompactInfoBar.java.
 const char kLanguageHistogramTranslate[] =
@@ -74,41 +64,6 @@
 const char kTranslationCountHistogram[] =
     "Translate.CompactInfobar.TranslationsPerPage";
 
-// Enum for the Translate.CompactInfobar.Event UMA histogram.
-// Note: These values are repeated as constants in TranslateCompactInfoBar.java.
-// Note: This enum is used to back an UMA histogram, and should be treated as
-// append-only.
-// TODO(crbug.com/933371): Share these enums with Java.
-enum class InfobarEvent {
-  INFOBAR_IMPRESSION = 0,
-  INFOBAR_TARGET_TAB_TRANSLATE = 1,
-  INFOBAR_DECLINE = 2,
-  INFOBAR_OPTIONS = 3,
-  INFOBAR_MORE_LANGUAGES = 4,
-  INFOBAR_MORE_LANGUAGES_TRANSLATE = 5,
-  INFOBAR_PAGE_NOT_IN = 6,
-  INFOBAR_ALWAYS_TRANSLATE = 7,
-  INFOBAR_NEVER_TRANSLATE = 8,
-  INFOBAR_NEVER_TRANSLATE_SITE = 9,
-  INFOBAR_SCROLL_HIDE = 10,
-  INFOBAR_SCROLL_SHOW = 11,
-  INFOBAR_REVERT = 12,
-  INFOBAR_SNACKBAR_ALWAYS_TRANSLATE_IMPRESSION = 13,
-  INFOBAR_SNACKBAR_NEVER_TRANSLATE_IMPRESSION = 14,
-  INFOBAR_SNACKBAR_NEVER_TRANSLATE_SITE_IMPRESSION = 15,
-  INFOBAR_SNACKBAR_CANCEL_ALWAYS = 16,
-  INFOBAR_SNACKBAR_CANCEL_NEVER_SITE = 17,
-  INFOBAR_SNACKBAR_CANCEL_NEVER = 18,
-  INFOBAR_ALWAYS_TRANSLATE_UNDO = 19,
-  INFOBAR_CLOSE_DEPRECATED = 20,
-  INFOBAR_SNACKBAR_AUTO_ALWAYS_IMPRESSION = 21,
-  INFOBAR_SNACKBAR_AUTO_NEVER_IMPRESSION = 22,
-  INFOBAR_SNACKBAR_CANCEL_AUTO_ALWAYS = 23,
-  INFOBAR_SNACKBAR_CANCEL_AUTO_NEVER = 24,
-  INFOBAR_HISTOGRAM_BOUNDARY = 25,
-  kMaxValue = INFOBAR_HISTOGRAM_BOUNDARY,
-};
-
 }  // namespace
 
 @interface TranslateInfoBarController () <LanguageSelectionDelegate,
diff --git a/ios/chrome/browser/ui/autofill/BUILD.gn b/ios/chrome/browser/ui/autofill/BUILD.gn
index c0446488..8d3e2f4 100644
--- a/ios/chrome/browser/ui/autofill/BUILD.gn
+++ b/ios/chrome/browser/ui/autofill/BUILD.gn
@@ -161,3 +161,55 @@
     "XCTest.framework",
   ]
 }
+
+source_set("test_support") {
+  defines = [ "CHROME_EARL_GREY_1" ]
+  configs += [ "//build/config/compiler:enable_arc" ]
+  testonly = true
+  sources = [
+    "autofill_app_interface.h",
+    "autofill_app_interface.mm",
+  ]
+  deps = [
+    "//base",
+    "//base/test:test_support",
+    "//components/keyed_service/core",
+    "//components/password_manager/core/browser",
+    "//ios/chrome/browser/passwords",
+    "//ios/chrome/test/app:test_support",
+    "//ios/testing/earl_grey:earl_grey_support",
+  ]
+}
+
+source_set("eg_app_support+eg2") {
+  defines = [ "CHROME_EARL_GREY_2" ]
+  configs += [
+    "//build/config/compiler:enable_arc",
+    "//build/config/ios:xctest_config",
+  ]
+  testonly = true
+  sources = [
+    "autofill_app_interface.h",
+    "autofill_app_interface.mm",
+  ]
+  deps = [
+    "//base",
+    "//base/test:test_support",
+    "//components/keyed_service/core",
+    "//components/password_manager/core/browser",
+    "//ios/chrome/browser/passwords",
+    "//ios/chrome/test/app:test_support",
+  ]
+}
+
+source_set("eg_test_support+eg2") {
+  defines = [ "CHROME_EARL_GREY_2" ]
+  configs += [
+    "//build/config/compiler:enable_arc",
+    "//build/config/ios:xctest_config",
+  ]
+  testonly = true
+  sources = [
+    "autofill_app_interface.h",
+  ]
+}
diff --git a/ios/chrome/browser/ui/autofill/autofill_app_interface.h b/ios/chrome/browser/ui/autofill/autofill_app_interface.h
new file mode 100644
index 0000000..67df0273
--- /dev/null
+++ b/ios/chrome/browser/ui/autofill/autofill_app_interface.h
@@ -0,0 +1,26 @@
+// Copyright 2019 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 IOS_CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_APP_INTERFACE_H_
+#define IOS_CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_APP_INTERFACE_H_
+
+#import <Foundation/Foundation.h>
+
+// AutofillAppInterface contains the app-side
+// implementation for helpers. These helpers are compiled into
+// the app binary and can be called from either app or test code.
+@interface AutofillAppInterface : NSObject
+
+// Removes all credentials stored.
++ (void)clearPasswordStore;
+
+// Saves an example form in the store.
++ (void)saveExamplePasswordForm;
+
+// Saves an example form in the store for the passed URL spec.
++ (void)savePasswordFormForURLSpec:(NSString*)URLSpec;
+
+@end
+
+#endif  // IOS_CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_APP_INTERFACE_H_
diff --git a/ios/chrome/browser/ui/autofill/autofill_app_interface.mm b/ios/chrome/browser/ui/autofill/autofill_app_interface.mm
new file mode 100644
index 0000000..72c8a27
--- /dev/null
+++ b/ios/chrome/browser/ui/autofill/autofill_app_interface.mm
@@ -0,0 +1,145 @@
+// Copyright 2019 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.
+
+#import "ios/chrome/browser/ui/autofill/autofill_app_interface.h"
+
+#include "base/strings/sys_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
+#import "base/test/ios/wait_util.h"
+#include "components/keyed_service/core/service_access_type.h"
+#include "components/password_manager/core/browser/password_store.h"
+#include "components/password_manager/core/browser/password_store_consumer.h"
+#include "ios/chrome/browser/passwords/ios_chrome_password_store_factory.h"
+#import "ios/chrome/test/app/chrome_test_util.h"
+
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
+namespace {
+
+const char kExampleUsername[] = "concrete username";
+const char kExamplePassword[] = "concrete password";
+
+// Gets the current password store.
+scoped_refptr<password_manager::PasswordStore> GetPasswordStore() {
+  // ServiceAccessType governs behaviour in Incognito: only modifications with
+  // EXPLICIT_ACCESS, which correspond to user's explicit gesture, succeed.
+  // This test does not deal with Incognito, and should not run in Incognito
+  // context. Therefore IMPLICIT_ACCESS is used to let the test fail if in
+  // Incognito context.
+  return IOSChromePasswordStoreFactory::GetForBrowserState(
+      chrome_test_util::GetOriginalBrowserState(),
+      ServiceAccessType::IMPLICIT_ACCESS);
+}
+
+// This class is used to obtain results from the PasswordStore and hence both
+// check the success of store updates and ensure that store has finished
+// processing.
+class TestStoreConsumer : public password_manager::PasswordStoreConsumer {
+ public:
+  void OnGetPasswordStoreResults(
+      std::vector<std::unique_ptr<autofill::PasswordForm>> obtained) override {
+    obtained_ = std::move(obtained);
+  }
+
+  const std::vector<autofill::PasswordForm>& GetStoreResults() {
+    results_.clear();
+    ResetObtained();
+    GetPasswordStore()->GetAllLogins(this);
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunused-result"
+    base::test::ios::WaitUntilConditionOrTimeout(
+        base::test::ios::kWaitForFileOperationTimeout, ^bool {
+          return !AreObtainedReset();
+        });
+#pragma clang diagnostic pop
+    AppendObtainedToResults();
+    return results_;
+  }
+
+ private:
+  // Puts |obtained_| in a known state not corresponding to any PasswordStore
+  // state.
+  void ResetObtained() {
+    obtained_.clear();
+    obtained_.emplace_back(nullptr);
+  }
+
+  // Returns true if |obtained_| are in the reset state.
+  bool AreObtainedReset() { return obtained_.size() == 1 && !obtained_[0]; }
+
+  void AppendObtainedToResults() {
+    for (const auto& source : obtained_) {
+      results_.emplace_back(*source);
+    }
+    ResetObtained();
+  }
+
+  // Temporary cache of obtained store results.
+  std::vector<std::unique_ptr<autofill::PasswordForm>> obtained_;
+
+  // Combination of fillable and blacklisted credentials from the store.
+  std::vector<autofill::PasswordForm> results_;
+};
+
+// Saves |form| to the password store and waits until the async processing is
+// done.
+void SaveToPasswordStore(const autofill::PasswordForm& form) {
+  GetPasswordStore()->AddLogin(form);
+  // When we retrieve the form from the store, |from_store| should be set.
+  autofill::PasswordForm expected_form = form;
+  expected_form.from_store = autofill::PasswordForm::Store::kProfileStore;
+  // Check the result and ensure PasswordStore processed this.
+  TestStoreConsumer consumer;
+  for (const auto& result : consumer.GetStoreResults()) {
+    if (result == expected_form)
+      return;
+  }
+}
+
+// Saves an example form in the store.
+void SaveExamplePasswordForm() {
+  autofill::PasswordForm example;
+  example.username_value = base::ASCIIToUTF16(kExampleUsername);
+  example.password_value = base::ASCIIToUTF16(kExamplePassword);
+  example.origin = GURL("https://example.com/");
+  example.signon_realm = example.origin.spec();
+  SaveToPasswordStore(example);
+}
+
+// Saves an example form in the store for the passed URL.
+void SaveLocalPasswordForm(const GURL& url) {
+  autofill::PasswordForm localForm;
+  localForm.username_value = base::ASCIIToUTF16(kExampleUsername);
+  localForm.password_value = base::ASCIIToUTF16(kExamplePassword);
+  localForm.origin = url;
+  localForm.signon_realm = localForm.origin.spec();
+  SaveToPasswordStore(localForm);
+}
+
+// Removes all credentials stored.
+void ClearPasswordStore() {
+  GetPasswordStore()->RemoveLoginsCreatedBetween(base::Time(), base::Time(),
+                                                 base::Closure());
+  TestStoreConsumer consumer;
+}
+
+}  // namespace
+
+@implementation AutofillAppInterface
+
++ (void)clearPasswordStore {
+  ClearPasswordStore();
+}
+
++ (void)saveExamplePasswordForm {
+  SaveExamplePasswordForm();
+}
+
++ (void)savePasswordFormForURLSpec:(NSString*)URLSpec {
+  SaveLocalPasswordForm(GURL(base::SysNSStringToUTF8(URLSpec)));
+}
+
+@end
diff --git a/ios/chrome/browser/ui/autofill/manual_fill/BUILD.gn b/ios/chrome/browser/ui/autofill/manual_fill/BUILD.gn
index 0d5351b..295dac5 100644
--- a/ios/chrome/browser/ui/autofill/manual_fill/BUILD.gn
+++ b/ios/chrome/browser/ui/autofill/manual_fill/BUILD.gn
@@ -62,7 +62,7 @@
     "//ios/web/public",
     "//ios/web/public/deprecated",
     "//ios/web/public/js_messaging",
-    "//ui/base:base",
+    "//ui/base",
   ]
   libs = [ "UIKit.framework" ]
   configs += [ "//build/config/compiler:enable_arc" ]
@@ -183,13 +183,14 @@
     "//ios/chrome/browser/web_state_list:web_state_list",
     "//ios/web/public:public",
     "//ios/web/public/js_messaging",
-    "//ui/base:base",
+    "//ui/base",
   ]
   libs = [ "UIKit.framework" ]
   configs += [ "//build/config/compiler:enable_arc" ]
 }
 
 source_set("eg_tests") {
+  defines = [ "CHROME_EARL_GREY_1" ]
   configs += [ "//build/config/compiler:enable_arc" ]
   testonly = true
   sources = [
@@ -210,11 +211,10 @@
     "//components/autofill/core/common",
     "//components/autofill/ios/browser",
     "//components/keyed_service/core",
-    "//components/password_manager/core/browser",
     "//ios/chrome/app/strings:ios_strings_grit",
     "//ios/chrome/browser",
     "//ios/chrome/browser/autofill",
-    "//ios/chrome/browser/passwords",
+    "//ios/chrome/browser/ui/autofill:test_support",
     "//ios/chrome/browser/ui/settings",
     "//ios/chrome/browser/ui/settings/autofill",
     "//ios/chrome/browser/ui/settings/autofill:feature_flags",
@@ -231,3 +231,28 @@
     "//third_party/ocmock",
   ]
 }
+
+source_set("eg2_tests") {
+  defines = [ "CHROME_EARL_GREY_2" ]
+  configs += [
+    "//build/config/compiler:enable_arc",
+    "//build/config/ios:xctest_config",
+  ]
+  testonly = true
+  sources = [
+    "password_view_controller_egtest.mm",
+  ]
+  deps = [
+    "//base",
+    "//base/test:test_support",
+    "//ios/chrome/app/strings:ios_strings_grit",
+    "//ios/chrome/browser/ui/autofill:eg_test_support+eg2",
+    "//ios/chrome/test/earl_grey:eg_test_support+eg2",
+    "//ios/testing/earl_grey:eg_test_support+eg2",
+    "//ios/third_party/earl_grey2:test_lib",
+    "//ios/web/public/test:element_selector",
+    "//net:test_support",
+    "//url",
+  ]
+  libs = [ "UIKit.framework" ]
+}
diff --git a/ios/chrome/browser/ui/autofill/manual_fill/address_view_controller_egtest.mm b/ios/chrome/browser/ui/autofill/manual_fill/address_view_controller_egtest.mm
index e65ab6ee..32b49bb 100644
--- a/ios/chrome/browser/ui/autofill/manual_fill/address_view_controller_egtest.mm
+++ b/ios/chrome/browser/ui/autofill/manual_fill/address_view_controller_egtest.mm
@@ -16,9 +16,6 @@
 #include "components/keyed_service/core/service_access_type.h"
 #import "ios/chrome/browser/autofill/form_suggestion_constants.h"
 #include "ios/chrome/browser/autofill/personal_data_manager_factory.h"
-#import "ios/chrome/browser/ui/autofill/manual_fill/address_mediator.h"
-#import "ios/chrome/browser/ui/autofill/manual_fill/address_view_controller.h"
-#import "ios/chrome/browser/ui/autofill/manual_fill/manual_fill_accessory_view_controller.h"
 #import "ios/chrome/browser/ui/settings/autofill/autofill_profile_table_view_controller.h"
 #import "ios/chrome/browser/ui/util/ui_util.h"
 #import "ios/chrome/test/app/chrome_test_util.h"
@@ -37,11 +34,15 @@
 
 using chrome_test_util::CancelButton;
 using chrome_test_util::GetOriginalBrowserState;
+using chrome_test_util::ManualFallbackFormSuggestionViewMatcher;
+using chrome_test_util::ManualFallbackKeyboardIconMatcher;
+using chrome_test_util::ManualFallbackManageProfilesMatcher;
+using chrome_test_util::ManualFallbackProfilesIconMatcher;
+using chrome_test_util::ManualFallbackProfilesTableViewMatcher;
+using chrome_test_util::ManualFallbackProfileTableViewWindowMatcher;
+using chrome_test_util::NavigationBarCancelButton;
+using chrome_test_util::SettingsProfileMatcher;
 using ios::ChromeBrowserState;
-using manual_fill::AccessoryAddressAccessibilityIdentifier;
-using manual_fill::AccessoryKeyboardAccessibilityIdentifier;
-using manual_fill::AddressTableViewAccessibilityIdentifier;
-using manual_fill::ManageAddressAccessibilityIdentifier;
 
 namespace {
 
@@ -50,51 +51,6 @@
 
 constexpr char kFormHTMLFile[] = "/profile_form.html";
 
-// Returns a matcher for the scroll view in keyboard accessory bar.
-id<GREYMatcher> FormSuggestionViewMatcher() {
-  return grey_accessibilityID(kFormSuggestionsViewAccessibilityIdentifier);
-}
-
-// Returns a matcher for the profiles icon in the keyboard accessory bar.
-id<GREYMatcher> ProfilesIconMatcher() {
-  return grey_accessibilityID(AccessoryAddressAccessibilityIdentifier);
-}
-
-// Matcher for the Keyboard icon in the accessory bar.
-id<GREYMatcher> KeyboardIconMatcher() {
-  return grey_accessibilityID(AccessoryKeyboardAccessibilityIdentifier);
-}
-
-// Returns a matcher for the profiles table view in manual fallback.
-id<GREYMatcher> ProfilesTableViewMatcher() {
-  return grey_accessibilityID(AddressTableViewAccessibilityIdentifier);
-}
-
-// Returns a matcher for the button to open profile settings in manual
-// fallback.
-id<GREYMatcher> ManageProfilesMatcher() {
-  return grey_accessibilityID(ManageAddressAccessibilityIdentifier);
-}
-
-// Returns the matcher for an enabled cancel button in a navigation bar.
-id<GREYMatcher> NavigationBarCancelMatcher() {
-  return grey_allOf(
-      grey_ancestor(grey_kindOfClass([UINavigationBar class])), CancelButton(),
-      grey_not(grey_accessibilityTrait(UIAccessibilityTraitNotEnabled)), nil);
-}
-
-// Returns a matcher for the profiles settings collection view.
-id<GREYMatcher> ProfileSettingsMatcher() {
-  return grey_accessibilityID(kAutofillProfileTableViewID);
-}
-
-// Returns a matcher for the ProfileTableView window.
-id<GREYMatcher> ProfileTableViewWindowMatcher() {
-  id<GREYMatcher> classMatcher = grey_kindOfClass([UIWindow class]);
-  id<GREYMatcher> parentMatcher = grey_descendant(ProfilesTableViewMatcher());
-  return grey_allOf(classMatcher, parentMatcher, nil);
-}
-
 // Saves an example profile in the store.
 void AddAutofillProfile(autofill::PersonalDataManager* personalDataManager) {
   using base::test::ios::WaitUntilConditionOrTimeout;
@@ -174,13 +130,13 @@
       performAction:chrome_test_util::TapWebElementWithId(kFormElementName)];
 
   // Tap on the addresses icon.
-  [[EarlGrey selectElementWithMatcher:FormSuggestionViewMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackFormSuggestionViewMatcher()]
       performAction:grey_scrollToContentEdge(kGREYContentEdgeRight)];
-  [[EarlGrey selectElementWithMatcher:ProfilesIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackProfilesIconMatcher()]
       performAction:grey_tap()];
 
   // Verify the address controller table view is visible.
-  [[EarlGrey selectElementWithMatcher:ProfilesTableViewMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackProfilesTableViewMatcher()]
       assertWithMatcher:grey_sufficientlyVisible()];
 }
 
@@ -192,15 +148,15 @@
       performAction:chrome_test_util::TapWebElementWithId(kFormElementName)];
 
   // Tap on the addresses icon.
-  [[EarlGrey selectElementWithMatcher:FormSuggestionViewMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackFormSuggestionViewMatcher()]
       performAction:grey_scrollToContentEdge(kGREYContentEdgeRight)];
-  [[EarlGrey selectElementWithMatcher:ProfilesIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackProfilesIconMatcher()]
       performAction:grey_tap()];
 
   // Verify the address controller contains the "Manage Addresses..." action.
-  [[EarlGrey selectElementWithMatcher:ProfilesTableViewMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackProfilesTableViewMatcher()]
       performAction:grey_scrollToContentEdge(kGREYContentEdgeBottom)];
-  [[EarlGrey selectElementWithMatcher:ManageProfilesMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackManageProfilesMatcher()]
       assertWithMatcher:grey_interactable()];
 }
 
@@ -211,19 +167,19 @@
       performAction:chrome_test_util::TapWebElementWithId(kFormElementName)];
 
   // Tap on the addresses icon.
-  [[EarlGrey selectElementWithMatcher:FormSuggestionViewMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackFormSuggestionViewMatcher()]
       performAction:grey_scrollToContentEdge(kGREYContentEdgeRight)];
-  [[EarlGrey selectElementWithMatcher:ProfilesIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackProfilesIconMatcher()]
       performAction:grey_tap()];
 
   // Tap the "Manage Addresses..." action.
-  [[EarlGrey selectElementWithMatcher:ProfilesTableViewMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackProfilesTableViewMatcher()]
       performAction:grey_scrollToContentEdge(kGREYContentEdgeBottom)];
-  [[EarlGrey selectElementWithMatcher:ManageProfilesMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackManageProfilesMatcher()]
       performAction:grey_tap()];
 
   // Verify the address settings opened.
-  [[EarlGrey selectElementWithMatcher:ProfileSettingsMatcher()]
+  [[EarlGrey selectElementWithMatcher:SettingsProfileMatcher()]
       assertWithMatcher:grey_sufficientlyVisible()];
 }
 
@@ -235,43 +191,43 @@
       performAction:chrome_test_util::TapWebElementWithId(kFormElementName)];
 
   // Tap on the addresses icon.
-  [[EarlGrey selectElementWithMatcher:FormSuggestionViewMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackFormSuggestionViewMatcher()]
       performAction:grey_scrollToContentEdge(kGREYContentEdgeRight)];
-  [[EarlGrey selectElementWithMatcher:ProfilesIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackProfilesIconMatcher()]
       performAction:grey_tap()];
 
   // Verify the status of the icon.
-  [[EarlGrey selectElementWithMatcher:ProfilesIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackProfilesIconMatcher()]
       assertWithMatcher:grey_not(grey_userInteractionEnabled())];
 
   // Tap the "Manage Addresses..." action.
-  [[EarlGrey selectElementWithMatcher:ProfilesTableViewMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackProfilesTableViewMatcher()]
       performAction:grey_scrollToContentEdge(kGREYContentEdgeBottom)];
-  [[EarlGrey selectElementWithMatcher:ManageProfilesMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackManageProfilesMatcher()]
       performAction:grey_tap()];
 
   // Verify the address settings opened.
-  [[EarlGrey selectElementWithMatcher:ProfileSettingsMatcher()]
+  [[EarlGrey selectElementWithMatcher:SettingsProfileMatcher()]
       assertWithMatcher:grey_sufficientlyVisible()];
 
   // Tap Cancel Button.
-  [[EarlGrey selectElementWithMatcher:NavigationBarCancelMatcher()]
+  [[EarlGrey selectElementWithMatcher:NavigationBarCancelButton()]
       performAction:grey_tap()];
 
   // Verify the address settings closed.
-  [[EarlGrey selectElementWithMatcher:ProfileSettingsMatcher()]
+  [[EarlGrey selectElementWithMatcher:SettingsProfileMatcher()]
       assertWithMatcher:grey_not(grey_sufficientlyVisible())];
 
   // Verify the status of the icons.
-  [[EarlGrey selectElementWithMatcher:ProfilesIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackProfilesIconMatcher()]
       assertWithMatcher:grey_sufficientlyVisible()];
-  [[EarlGrey selectElementWithMatcher:ProfilesIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackProfilesIconMatcher()]
       assertWithMatcher:grey_userInteractionEnabled()];
-  [[EarlGrey selectElementWithMatcher:KeyboardIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackKeyboardIconMatcher()]
       assertWithMatcher:grey_not(grey_sufficientlyVisible())];
 
   // Verify the keyboard is not cover by the profiles view.
-  [[EarlGrey selectElementWithMatcher:ProfilesTableViewMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackProfilesTableViewMatcher()]
       assertWithMatcher:grey_notVisible()];
 }
 
@@ -288,24 +244,24 @@
       performAction:chrome_test_util::TapWebElementWithId(kFormElementName)];
 
   // Tap on the addresses icon.
-  [[EarlGrey selectElementWithMatcher:FormSuggestionViewMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackFormSuggestionViewMatcher()]
       performAction:grey_scrollToContentEdge(kGREYContentEdgeRight)];
-  [[EarlGrey selectElementWithMatcher:ProfilesIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackProfilesIconMatcher()]
       performAction:grey_tap()];
 
   // Verify the address controller table view is visible.
-  [[EarlGrey selectElementWithMatcher:ProfilesTableViewMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackProfilesTableViewMatcher()]
       assertWithMatcher:grey_sufficientlyVisible()];
 
   // Tap on the keyboard icon.
-  [[EarlGrey selectElementWithMatcher:KeyboardIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackKeyboardIconMatcher()]
       performAction:grey_tap()];
 
   // Verify the address controller table view and the address icon is NOT
   // visible.
-  [[EarlGrey selectElementWithMatcher:ProfilesTableViewMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackProfilesTableViewMatcher()]
       assertWithMatcher:grey_notVisible()];
-  [[EarlGrey selectElementWithMatcher:KeyboardIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackKeyboardIconMatcher()]
       assertWithMatcher:grey_notVisible()];
 }
 
@@ -320,26 +276,27 @@
       performAction:chrome_test_util::TapWebElementWithId(kFormElementName)];
 
   // Tap on the addresses icon.
-  [[EarlGrey selectElementWithMatcher:FormSuggestionViewMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackFormSuggestionViewMatcher()]
       performAction:grey_scrollToContentEdge(kGREYContentEdgeRight)];
-  [[EarlGrey selectElementWithMatcher:ProfilesIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackProfilesIconMatcher()]
       performAction:grey_tap()];
 
   // Verify the address controller table view is visible.
-  [[EarlGrey selectElementWithMatcher:ProfilesTableViewMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackProfilesTableViewMatcher()]
       assertWithMatcher:grey_sufficientlyVisible()];
 
   // Tap on a point outside of the popover.
   // The way EarlGrey taps doesn't go through the window hierarchy. Because of
   // this, the tap needs to be done in the same window as the popover.
-  [[EarlGrey selectElementWithMatcher:ProfileTableViewWindowMatcher()]
+  [[EarlGrey
+      selectElementWithMatcher:ManualFallbackProfileTableViewWindowMatcher()]
       performAction:grey_tapAtPoint(CGPointMake(0, 0))];
 
   // Verify the address controller table view and the address icon is NOT
   // visible.
-  [[EarlGrey selectElementWithMatcher:ProfilesTableViewMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackProfilesTableViewMatcher()]
       assertWithMatcher:grey_notVisible()];
-  [[EarlGrey selectElementWithMatcher:KeyboardIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackKeyboardIconMatcher()]
       assertWithMatcher:grey_notVisible()];
 }
 
@@ -356,7 +313,7 @@
   [GREYKeyboard waitForKeyboardToAppear];
 
   // Assert the address icon is not visible.
-  [[EarlGrey selectElementWithMatcher:ProfilesIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackProfilesIconMatcher()]
       assertWithMatcher:grey_notVisible()];
 
   // Store one address.
@@ -367,14 +324,14 @@
       performAction:chrome_test_util::TapWebElementWithId(kFormElementCity)];
 
   // Assert the address icon is visible now.
-  [[EarlGrey selectElementWithMatcher:FormSuggestionViewMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackFormSuggestionViewMatcher()]
       performAction:grey_scrollToContentEdge(kGREYContentEdgeRight)];
   // Verify the status of the icons.
-  [[EarlGrey selectElementWithMatcher:ProfilesIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackProfilesIconMatcher()]
       assertWithMatcher:grey_sufficientlyVisible()];
-  [[EarlGrey selectElementWithMatcher:ProfilesIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackProfilesIconMatcher()]
       assertWithMatcher:grey_userInteractionEnabled()];
-  [[EarlGrey selectElementWithMatcher:KeyboardIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackKeyboardIconMatcher()]
       assertWithMatcher:grey_not(grey_sufficientlyVisible())];
 }
 
diff --git a/ios/chrome/browser/ui/autofill/manual_fill/fallback_coordinator_egtest.mm b/ios/chrome/browser/ui/autofill/manual_fill/fallback_coordinator_egtest.mm
index 276fc3a9..4738281d 100644
--- a/ios/chrome/browser/ui/autofill/manual_fill/fallback_coordinator_egtest.mm
+++ b/ios/chrome/browser/ui/autofill/manual_fill/fallback_coordinator_egtest.mm
@@ -5,7 +5,6 @@
 #import <EarlGrey/EarlGrey.h>
 #import <EarlGrey/GREYAppleInternals.h>
 #import <EarlGrey/GREYKeyboard.h>
-#include <atomic>
 
 #include "base/ios/ios_util.h"
 #include "base/strings/sys_string_conversions.h"
@@ -25,6 +24,7 @@
 #import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h"
 #import "ios/chrome/test/earl_grey/chrome_matchers.h"
 #import "ios/chrome/test/earl_grey/chrome_test_case.h"
+#import "ios/testing/earl_grey/keyboard_app_interface.h"
 #import "ios/web/public/test/earl_grey/web_view_matchers.h"
 #include "ios/web/public/test/element_selector.h"
 #include "net/test/embedded_test_server/embedded_test_server.h"
@@ -43,10 +43,6 @@
 
 constexpr char kFormHTMLFile[] = "/profile_form.html";
 
-// EarlGrey fails to detect undocked keyboards on screen, so this help check
-// for them.
-static std::atomic_bool gCHRIsKeyboardShown(false);
-
 // Returns a matcher for the scroll view in keyboard accessory bar.
 id<GREYMatcher> FormSuggestionViewMatcher() {
   return grey_accessibilityID(kFormSuggestionsViewAccessibilityIdentifier);
@@ -118,75 +114,6 @@
   return [condition waitWithTimeout:timeout];
 }
 
-// If the keyboard is not present this will add a text field to the hierarchy,
-// make it first responder and return it. If it is already present, this does
-// nothing and returns nil.
-UITextField* ShowKeyboard() {
-  UITextField* textField = nil;
-  if (!gCHRIsKeyboardShown) {
-    CGRect rect = CGRectMake(0, 0, 300, 100);
-    textField = [[UITextField alloc] initWithFrame:rect];
-    textField.backgroundColor = [UIColor blueColor];
-    [[[UIApplication sharedApplication] keyWindow] addSubview:textField];
-    [textField becomeFirstResponder];
-  }
-  auto verify_block = ^BOOL {
-    return gCHRIsKeyboardShown;
-  };
-  NSTimeInterval timeout = base::test::ios::kWaitForUIElementTimeout;
-  NSString* condition_name =
-      [NSString stringWithFormat:@"Wait for keyboard to appear"];
-  GREYCondition* condition = [GREYCondition conditionWithName:condition_name
-                                                        block:verify_block];
-  [condition waitWithTimeout:timeout];
-  return textField;
-}
-
-// Returns the dismiss key if present in the passed keyboard layout. Returns nil
-// if not found.
-UIAccessibilityElement* KeyboardDismissKeyInLayout(UIView* layout) {
-  UIAccessibilityElement* key = nil;
-  if ([layout accessibilityElementCount] != NSNotFound) {
-    for (NSInteger i = [layout accessibilityElementCount]; i >= 0; --i) {
-      id element = [layout accessibilityElementAtIndex:i];
-      if ([[[element key] valueForKey:@"name"]
-              isEqualToString:@"Dismiss-Key"]) {
-        key = element;
-        break;
-      }
-    }
-  }
-  return key;
-}
-
-// Matcher for the Keyboard Window.
-id<GREYMatcher> KeyboardWindow(UIView* layout) {
-  id<GREYMatcher> classMatcher = grey_kindOfClass([UIWindow class]);
-  UIAccessibilityElement* key = KeyboardDismissKeyInLayout(layout);
-  id<GREYMatcher> parentMatcher =
-      grey_descendant(grey_accessibilityLabel(key.accessibilityLabel));
-  return grey_allOf(classMatcher, parentMatcher, nil);
-}
-
-// Returns YES if the keyboard is docked at the bottom. NO otherwise.
-BOOL IsKeyboardDockedForLayout(UIView* layout) {
-  CGRect windowBounds = layout.window.bounds;
-  UIView* viewToCompare = layout;
-  while (viewToCompare &&
-         viewToCompare.bounds.size.height < windowBounds.size.height) {
-    CGRect keyboardFrameInWindow =
-        [viewToCompare.window convertRect:viewToCompare.bounds
-                                 fromView:viewToCompare];
-
-    CGFloat maxY = CGRectGetMaxY(keyboardFrameInWindow);
-    if ([@(maxY) isEqualToNumber:@(windowBounds.size.height)]) {
-      return YES;
-    }
-    viewToCompare = viewToCompare.superview;
-  }
-  return NO;
-}
-
 // Undocks and split the keyboard by swiping it up. Does nothing if already
 // undocked. Some devices, like iPhone or iPad Pro, do not allow undocking or
 // splitting, this returns NO if it is the case.
@@ -194,46 +121,23 @@
   if (![ChromeEarlGrey isIPadIdiom]) {
     return NO;
   }
-
-  UITextField* textField = ShowKeyboard();
-
-  // Assert the "Dismiss-Key" is present.
-  UIView* layout = [[UIKeyboardImpl sharedInstance] _layout];
-  GREYAssert([[layout valueForKey:@"keyplaneContainsDismissKey"] boolValue],
-             @"No dismiss key is pressent");
+  UITextField* textField = [KeyboardAppInterface showKeyboard];
 
   // Return if already undocked.
-  if (!IsKeyboardDockedForLayout(layout)) {
-    // If we created a dummy textfield for this, remove it.
+  if (![KeyboardAppInterface isKeyboadDocked]) {
+    // If a dummy textfield was created for this, remove it.
     [textField removeFromSuperview];
     return YES;
   }
 
-  // Swipe it up.
-  if (!layout.accessibilityIdentifier.length) {
-    layout.accessibilityIdentifier = @"CRKBLayout";
-  }
+  [[EarlGrey
+      selectElementWithMatcher:[KeyboardAppInterface keyboardWindowMatcher]]
+      performAction:[KeyboardAppInterface keyboardUndockAction]];
 
-  UIAccessibilityElement* key = KeyboardDismissKeyInLayout(layout);
-  CGRect keyFrameInScreen = [key accessibilityFrame];
-  CGRect keyFrameInWindow = [UIScreen.mainScreen.coordinateSpace
-            convertRect:keyFrameInScreen
-      toCoordinateSpace:layout.window.coordinateSpace];
-  CGRect windowBounds = layout.window.bounds;
+  // If a dummy textfield was created for this, remove it.
+  [textField removeFromSuperview];
 
-  CGPoint startPoint = CGPointMake(
-      (keyFrameInWindow.origin.x + keyFrameInWindow.size.width / 2.0) /
-          windowBounds.size.width,
-      (keyFrameInWindow.origin.y + keyFrameInWindow.size.height / 2.0) /
-          windowBounds.size.height);
-
-  id action = grey_swipeFastInDirectionWithStartPoint(
-      kGREYDirectionUp, startPoint.x, startPoint.y);
-
-  [[EarlGrey selectElementWithMatcher:KeyboardWindow(layout)]
-      performAction:action];
-
-  return !IsKeyboardDockedForLayout(layout);
+  return ![KeyboardAppInterface isKeyboadDocked];
 }
 
 // Docks the keyboard by swiping it down. Does nothing if already docked.
@@ -242,56 +146,33 @@
     return;
   }
 
-  UITextField* textField = ShowKeyboard();
-
-  // Assert the "Dismiss-Key" is present.
-  UIView* layout = [[UIKeyboardImpl sharedInstance] _layout];
-  GREYAssert([[layout valueForKey:@"keyplaneContainsDismissKey"] boolValue],
-             @"No dismiss key is pressent");
+  UITextField* textField = [KeyboardAppInterface showKeyboard];
 
   // Return if already docked.
-  if (IsKeyboardDockedForLayout(layout)) {
+  if ([KeyboardAppInterface isKeyboadDocked]) {
     // If we created a dummy textfield for this, remove it.
     [textField removeFromSuperview];
     return;
   }
 
-  // Swipe it down.
-  UIAccessibilityElement* key = KeyboardDismissKeyInLayout(layout);
-
-  CGRect keyFrameInScreen = [key accessibilityFrame];
-  CGRect keyFrameInWindow = [UIScreen.mainScreen.coordinateSpace
-            convertRect:keyFrameInScreen
-      toCoordinateSpace:layout.window.coordinateSpace];
-  CGRect windowBounds = layout.window.bounds;
-
-  GREYAssertFalse(CGRectEqualToRect(keyFrameInWindow, CGRectZero),
-                  @"The dismiss key accessibility frame musn't be zero");
-  CGPoint startPoint = CGPointMake(
-      (keyFrameInWindow.origin.x + keyFrameInWindow.size.width / 2.0) /
-          windowBounds.size.width,
-      (keyFrameInWindow.origin.y + keyFrameInWindow.size.height / 2.0) /
-          windowBounds.size.height);
-  id<GREYAction> action = grey_swipeFastInDirectionWithStartPoint(
-      kGREYDirectionDown, startPoint.x, startPoint.y);
-
-  [[EarlGrey selectElementWithMatcher:KeyboardWindow(layout)]
-      performAction:action];
+  [[EarlGrey
+      selectElementWithMatcher:[KeyboardAppInterface keyboardWindowMatcher]]
+      performAction:[KeyboardAppInterface keyboardDockAction]];
 
   // If we created a dummy textfield for this, remove it.
   [textField removeFromSuperview];
 
-  GREYCondition* waitForDockedKeyboard =
-      [GREYCondition conditionWithName:@"Wait For Docked Keyboard Animations"
-                                 block:^BOOL {
-                                   return IsKeyboardDockedForLayout(layout);
-                                 }];
+  GREYCondition* waitForDockedKeyboard = [GREYCondition
+      conditionWithName:@"Wait For Docked Keyboard Animations"
+                  block:^BOOL {
+                    BOOL isDocked = [KeyboardAppInterface isKeyboadDocked];
+                    return isDocked;
+                  }];
 
   GREYAssertTrue([waitForDockedKeyboard
                      waitWithTimeout:base::test::ios::kWaitForActionTimeout],
                  @"Keyboard animations still present.");
 }
-
 }  // namespace
 
 // Integration Tests for fallback coordinator.
@@ -304,41 +185,6 @@
 
 @implementation FallbackCoordinatorTestCase
 
-+ (void)load {
-  @autoreleasepool {
-    // EarlGrey fails to detect undocked keyboards on screen, so this help check
-    // for them.
-    auto block = ^(NSNotification* note) {
-      CGRect keyboardFrame =
-          [note.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
-      UIWindow* window = [UIApplication sharedApplication].keyWindow;
-      keyboardFrame = [window convertRect:keyboardFrame fromWindow:nil];
-      CGRect windowFrame = window.frame;
-      CGRect frameIntersection = CGRectIntersection(windowFrame, keyboardFrame);
-      gCHRIsKeyboardShown =
-          frameIntersection.size.width > 1 && frameIntersection.size.height > 1;
-    };
-
-    [[NSNotificationCenter defaultCenter]
-        addObserverForName:UIKeyboardDidChangeFrameNotification
-                    object:nil
-                     queue:nil
-                usingBlock:block];
-
-    [[NSNotificationCenter defaultCenter]
-        addObserverForName:UIKeyboardDidShowNotification
-                    object:nil
-                     queue:nil
-                usingBlock:block];
-
-    [[NSNotificationCenter defaultCenter]
-        addObserverForName:UIKeyboardDidHideNotification
-                    object:nil
-                     queue:nil
-                usingBlock:block];
-  }
-}
-
 + (void)setUp {
   [super setUp];
   // If the previous run was manually stopped then the profile will be in the
diff --git a/ios/chrome/browser/ui/autofill/manual_fill/password_view_controller_egtest.mm b/ios/chrome/browser/ui/autofill/manual_fill/password_view_controller_egtest.mm
index 5b737d8..e4dc36e4 100644
--- a/ios/chrome/browser/ui/autofill/manual_fill/password_view_controller_egtest.mm
+++ b/ios/chrome/browser/ui/autofill/manual_fill/password_view_controller_egtest.mm
@@ -2,34 +2,16 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#import <EarlGrey/EarlGrey.h>
-#import <EarlGrey/GREYKeyboard.h>
-
 #include "base/ios/ios_util.h"
 #include "base/strings/sys_string_conversions.h"
-#include "base/strings/utf_string_conversions.h"
 #import "base/test/ios/wait_util.h"
-#include "components/autofill/core/common/autofill_features.h"
-#include "components/autofill/core/common/password_form.h"
-#include "components/autofill/ios/browser/autofill_switches.h"
-#include "components/keyed_service/core/service_access_type.h"
-#include "components/password_manager/core/browser/password_store.h"
-#include "components/password_manager/core/browser/password_store_consumer.h"
-#include "ios/chrome/browser/passwords/ios_chrome_password_store_factory.h"
-#import "ios/chrome/browser/ui/autofill/manual_fill/all_password_coordinator.h"
-#import "ios/chrome/browser/ui/autofill/manual_fill/manual_fill_accessory_view_controller.h"
-#import "ios/chrome/browser/ui/autofill/manual_fill/manual_fill_password_cell.h"
-#import "ios/chrome/browser/ui/autofill/manual_fill/manual_fill_password_mediator.h"
-#import "ios/chrome/browser/ui/autofill/manual_fill/password_view_controller.h"
-#import "ios/chrome/browser/ui/settings/password/passwords_table_view_controller.h"
-#import "ios/chrome/browser/ui/util/ui_util.h"
+#import "ios/chrome/browser/ui/autofill/autofill_app_interface.h"
 #include "ios/chrome/grit/ios_strings.h"
-#import "ios/chrome/test/app/chrome_test_util.h"
 #import "ios/chrome/test/earl_grey/chrome_actions.h"
 #import "ios/chrome/test/earl_grey/chrome_earl_grey.h"
 #import "ios/chrome/test/earl_grey/chrome_matchers.h"
 #import "ios/chrome/test/earl_grey/chrome_test_case.h"
-#import "ios/web/public/test/earl_grey/web_view_matchers.h"
+#import "ios/testing/earl_grey/earl_grey_test.h"
 #include "ios/web/public/test/element_selector.h"
 #include "net/test/embedded_test_server/embedded_test_server.h"
 #include "url/gurl.h"
@@ -38,8 +20,30 @@
 #error "This file requires ARC support."
 #endif
 
+#if defined(CHROME_EARL_GREY_2)
+// TODO(crbug.com/1015113): The EG2 macro is breaking indexing for some reason
+// without the trailing semicolon.  For now, disable the extra semi warning
+// so Xcode indexing works for the egtest.
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wc++98-compat-extra-semi"
+GREY_STUB_CLASS_IN_APP_MAIN_QUEUE(AutofillAppInterface);
+#pragma clang diagnostic pop
+#endif  // defined(CHROME_EARL_GREY_2)
+
 using chrome_test_util::CancelButton;
+using chrome_test_util::ManualFallbackKeyboardIconMatcher;
+using chrome_test_util::ManualFallbackPasswordIconMatcher;
+using chrome_test_util::ManualFallbackPasswordTableViewMatcher;
+using chrome_test_util::ManualFallbackPasswordSearchBarMatcher;
+using chrome_test_util::ManualFallbackManagePasswordsMatcher;
+using chrome_test_util::ManualFallbackOtherPasswordsMatcher;
+using chrome_test_util::ManualFallbackOtherPasswordsDismissMatcher;
+using chrome_test_util::ManualFallbackPasswordButtonMatcher;
+using chrome_test_util::ManualFallbackPasswordTableViewWindowMatcher;
 using chrome_test_util::NavigationBarDoneButton;
+using chrome_test_util::NavigationBarCancelButton;
+using chrome_test_util::SettingsPasswordMatcher;
+using chrome_test_util::SettingsPasswordSearchMatcher;
 using chrome_test_util::StaticTextWithAccessibilityLabelId;
 using chrome_test_util::TapWebElementWithId;
 using chrome_test_util::TapWebElementWithIdInFrame;
@@ -50,196 +54,29 @@
 const char kFormElementPassword[] = "password";
 
 const char kExampleUsername[] = "concrete username";
-const char kExamplePassword[] = "concrete password";
 
 const char kFormHTMLFile[] = "/username_password_field_form.html";
+
+// TODO(crbug.com/1016367): Remove the guard once ExecuteJavaScript is updated
+// to compile on EG2.
+#if defined(CHROME_EARL_GREY_1)
 const char kIFrameHTMLFile[] = "/iframe_form.html";
-
-// Returns a matcher for the password icon in the keyboard accessory bar.
-id<GREYMatcher> PasswordIconMatcher() {
-  return grey_accessibilityID(
-      manual_fill::AccessoryPasswordAccessibilityIdentifier);
-}
-
-id<GREYMatcher> KeyboardIconMatcher() {
-  return grey_accessibilityID(
-      manual_fill::AccessoryKeyboardAccessibilityIdentifier);
-}
-
-// Returns a matcher for the password table view in manual fallback.
-id<GREYMatcher> PasswordTableViewMatcher() {
-  return grey_accessibilityID(
-      manual_fill::kPasswordTableViewAccessibilityIdentifier);
-}
-
-// Returns a matcher for the password search bar in manual fallback.
-id<GREYMatcher> PasswordSearchBarMatcher() {
-  return grey_accessibilityID(
-      manual_fill::kPasswordSearchBarAccessibilityIdentifier);
-}
-
-// Returns a matcher for the button to open password settings in manual
-// fallback.
-id<GREYMatcher> ManagePasswordsMatcher() {
-  return grey_accessibilityID(
-      manual_fill::ManagePasswordsAccessibilityIdentifier);
-}
-
-// Returns a matcher for the button to open all passwords in manual fallback.
-id<GREYMatcher> OtherPasswordsMatcher() {
-  return grey_accessibilityID(
-      manual_fill::OtherPasswordsAccessibilityIdentifier);
-}
-
-id<GREYMatcher> OtherPasswordsDismissMatcher() {
-  return grey_accessibilityID(
-      manual_fill::kPasswordDoneButtonAccessibilityIdentifier);
-}
+#endif  // CHROME_EARL_GREY_1
 
 // Returns a matcher for the example username in the list.
 id<GREYMatcher> UsernameButtonMatcher() {
   return grey_buttonTitle(base::SysUTF8ToNSString(kExampleUsername));
 }
 
-// Returns a matcher for the example password in the list.
-id<GREYMatcher> PasswordButtonMatcher() {
-  return grey_buttonTitle(kMaskedPasswordTitle);
-}
-
-// Returns a matcher for the password settings collection view.
-id<GREYMatcher> PasswordSettingsMatcher() {
-  return grey_accessibilityID(kPasswordsTableViewId);
-}
-
-// Returns a matcher for the search bar in password settings.
-id<GREYMatcher> PasswordSettingsSearchMatcher() {
-  return grey_accessibilityID(kPasswordsSearchBarId);
-}
-
 // Matcher for the not secure website alert.
 id<GREYMatcher> NotSecureWebsiteAlert() {
   return StaticTextWithAccessibilityLabelId(
       IDS_IOS_MANUAL_FALLBACK_NOT_SECURE_TITLE);
 }
 
-// Returns a matcher for the PasswordTableView window.
-id<GREYMatcher> PasswordTableViewWindowMatcher() {
-  id<GREYMatcher> classMatcher = grey_kindOfClass([UIWindow class]);
-  id<GREYMatcher> parentMatcher = grey_descendant(PasswordTableViewMatcher());
-  return grey_allOf(classMatcher, parentMatcher, nil);
-}
-
-// Returns the matcher for an enabled cancel button in a navigation bar.
-id<GREYMatcher> NavigationBarCancelMatcher() {
-  return grey_allOf(
-      grey_ancestor(grey_kindOfClass([UINavigationBar class])), CancelButton(),
-      grey_not(grey_accessibilityTrait(UIAccessibilityTraitNotEnabled)), nil);
-}
-
-// Gets the current password store.
-scoped_refptr<password_manager::PasswordStore> GetPasswordStore() {
-  // ServiceAccessType governs behaviour in Incognito: only modifications with
-  // EXPLICIT_ACCESS, which correspond to user's explicit gesture, succeed.
-  // This test does not deal with Incognito, and should not run in Incognito
-  // context. Therefore IMPLICIT_ACCESS is used to let the test fail if in
-  // Incognito context.
-  return IOSChromePasswordStoreFactory::GetForBrowserState(
-      chrome_test_util::GetOriginalBrowserState(),
-      ServiceAccessType::IMPLICIT_ACCESS);
-}
-
-// This class is used to obtain results from the PasswordStore and hence both
-// check the success of store updates and ensure that store has finished
-// processing.
-class TestStoreConsumer : public password_manager::PasswordStoreConsumer {
- public:
-  void OnGetPasswordStoreResults(
-      std::vector<std::unique_ptr<autofill::PasswordForm>> obtained) override {
-    obtained_ = std::move(obtained);
-  }
-
-  const std::vector<autofill::PasswordForm>& GetStoreResults() {
-    results_.clear();
-    ResetObtained();
-    GetPasswordStore()->GetAllLogins(this);
-    bool responded = base::test::ios::WaitUntilConditionOrTimeout(1.0, ^bool {
-      return !AreObtainedReset();
-    });
-    GREYAssert(responded, @"Obtaining fillable items took too long.");
-    AppendObtainedToResults();
-    return results_;
-  }
-
- private:
-  // Puts |obtained_| in a known state not corresponding to any PasswordStore
-  // state.
-  void ResetObtained() {
-    obtained_.clear();
-    obtained_.emplace_back(nullptr);
-  }
-
-  // Returns true if |obtained_| are in the reset state.
-  bool AreObtainedReset() { return obtained_.size() == 1 && !obtained_[0]; }
-
-  void AppendObtainedToResults() {
-    for (const auto& source : obtained_) {
-      results_.emplace_back(*source);
-    }
-    ResetObtained();
-  }
-
-  // Temporary cache of obtained store results.
-  std::vector<std::unique_ptr<autofill::PasswordForm>> obtained_;
-
-  // Combination of fillable and blacklisted credentials from the store.
-  std::vector<autofill::PasswordForm> results_;
-};
-
-// Saves |form| to the password store and waits until the async processing is
-// done.
-void SaveToPasswordStore(const autofill::PasswordForm& form) {
-  GetPasswordStore()->AddLogin(form);
-  // When we retrieve the form from the store, |from_store| should be set.
-  autofill::PasswordForm expected_form = form;
-  expected_form.from_store = autofill::PasswordForm::Store::kProfileStore;
-  // Check the result and ensure PasswordStore processed this.
-  TestStoreConsumer consumer;
-  for (const auto& result : consumer.GetStoreResults()) {
-    if (result == expected_form)
-      return;
-  }
-  GREYFail(@"Stored form was not found in the PasswordStore results.");
-}
-
-// Saves an example form in the store.
-void SaveExamplePasswordForm() {
-  autofill::PasswordForm example;
-  example.username_value = base::ASCIIToUTF16(kExampleUsername);
-  example.password_value = base::ASCIIToUTF16(kExamplePassword);
-  example.origin = GURL("https://example.com/");
-  example.signon_realm = example.origin.spec();
-  SaveToPasswordStore(example);
-}
-
-// Saves an example form in the storefor the passed URL.
-void SaveLocalPasswordForm(const GURL& url) {
-  autofill::PasswordForm localForm;
-  localForm.username_value = base::ASCIIToUTF16(kExampleUsername);
-  localForm.password_value = base::ASCIIToUTF16(kExamplePassword);
-  localForm.origin = url;
-  localForm.signon_realm = localForm.origin.spec();
-  SaveToPasswordStore(localForm);
-}
-
-// Removes all credentials stored.
-void ClearPasswordStore() {
-  GetPasswordStore()->RemoveLoginsCreatedBetween(base::Time(), base::Time(),
-                                                 base::Closure());
-  TestStoreConsumer consumer;
-  GREYAssert(consumer.GetStoreResults().empty(),
-             @"PasswordStore was not cleared.");
-}
-
+// TODO(crbug.com/1016367): Remove the guard once ExecuteJavaScript is updated
+// to compile on EG2.
+#if defined(CHROME_EARL_GREY_1)
 // Polls the JavaScript query |java_script_condition| until the returned
 // |boolValue| is YES with a kWaitForActionTimeout timeout.
 BOOL WaitForJavaScriptCondition(NSString* java_script_condition) {
@@ -254,6 +91,7 @@
       [GREYCondition conditionWithName:condition_name block:verify_block];
   return [condition waitWithTimeout:timeout];
 }
+#endif  // CHROME_EARL_GREY_1
 
 }  // namespace
 
@@ -269,13 +107,11 @@
   const GURL URL = self.testServer->GetURL(kFormHTMLFile);
   [ChromeEarlGrey loadURL:URL];
   [ChromeEarlGrey waitForWebStateContainingText:"hello!"];
-  SaveExamplePasswordForm();
+  [AutofillAppInterface saveExamplePasswordForm];
 }
 
 - (void)tearDown {
-  ClearPasswordStore();
-  [EarlGrey rotateDeviceToOrientation:UIDeviceOrientationPortrait
-                           errorOrNil:nil];
+  [AutofillAppInterface clearPasswordStore];
   [super tearDown];
 }
 
@@ -286,11 +122,11 @@
       performAction:TapWebElementWithId(kFormElementUsername)];
 
   // Tap on the passwords icon.
-  [[EarlGrey selectElementWithMatcher:PasswordIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordIconMatcher()]
       performAction:grey_tap()];
 
   // Verify the password controller table view is visible.
-  [[EarlGrey selectElementWithMatcher:PasswordTableViewMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordTableViewMatcher()]
       assertWithMatcher:grey_sufficientlyVisible()];
 }
 
@@ -302,11 +138,11 @@
       performAction:TapWebElementWithId(kFormElementUsername)];
 
   // Tap on the passwords icon.
-  [[EarlGrey selectElementWithMatcher:PasswordIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordIconMatcher()]
       performAction:grey_tap()];
 
   // Verify the password controller contains the "Manage Passwords..." action.
-  [[EarlGrey selectElementWithMatcher:ManagePasswordsMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackManagePasswordsMatcher()]
       assertWithMatcher:grey_interactable()];
 }
 
@@ -317,15 +153,15 @@
       performAction:TapWebElementWithId(kFormElementUsername)];
 
   // Tap on the passwords icon.
-  [[EarlGrey selectElementWithMatcher:PasswordIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordIconMatcher()]
       performAction:grey_tap()];
 
   // Tap the "Manage Passwords..." action.
-  [[EarlGrey selectElementWithMatcher:ManagePasswordsMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackManagePasswordsMatcher()]
       performAction:grey_tap()];
 
   // Verify the password settings opened.
-  [[EarlGrey selectElementWithMatcher:PasswordSettingsMatcher()]
+  [[EarlGrey selectElementWithMatcher:SettingsPasswordMatcher()]
       assertWithMatcher:grey_sufficientlyVisible()];
 }
 
@@ -337,35 +173,35 @@
       performAction:TapWebElementWithId(kFormElementUsername)];
 
   // Tap on the passwords icon.
-  [[EarlGrey selectElementWithMatcher:PasswordIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordIconMatcher()]
       performAction:grey_tap()];
 
   // Verify the status of the icon.
-  [[EarlGrey selectElementWithMatcher:PasswordIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordIconMatcher()]
       assertWithMatcher:grey_not(grey_userInteractionEnabled())];
 
   // Tap the "Manage Passwords..." action.
-  [[EarlGrey selectElementWithMatcher:ManagePasswordsMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackManagePasswordsMatcher()]
       performAction:grey_tap()];
 
   // Verify the password settings opened.
-  [[EarlGrey selectElementWithMatcher:PasswordSettingsMatcher()]
+  [[EarlGrey selectElementWithMatcher:SettingsPasswordMatcher()]
       assertWithMatcher:grey_sufficientlyVisible()];
 
   // Tap Cancel Button.
-  [[EarlGrey selectElementWithMatcher:NavigationBarCancelMatcher()]
+  [[EarlGrey selectElementWithMatcher:NavigationBarCancelButton()]
       performAction:grey_tap()];
 
   // Verify the status of the icons.
-  [[EarlGrey selectElementWithMatcher:PasswordIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordIconMatcher()]
       assertWithMatcher:grey_sufficientlyVisible()];
-  [[EarlGrey selectElementWithMatcher:PasswordIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordIconMatcher()]
       assertWithMatcher:grey_userInteractionEnabled()];
-  [[EarlGrey selectElementWithMatcher:KeyboardIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackKeyboardIconMatcher()]
       assertWithMatcher:grey_not(grey_sufficientlyVisible())];
 
   // Verify the keyboard is not cover by the password view.
-  [[EarlGrey selectElementWithMatcher:PasswordTableViewMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordTableViewMatcher()]
       assertWithMatcher:grey_notVisible()];
 }
 
@@ -376,15 +212,16 @@
       performAction:TapWebElementWithId(kFormElementUsername)];
 
   // Tap on the passwords icon.
-  [[EarlGrey selectElementWithMatcher:PasswordIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordIconMatcher()]
       performAction:grey_tap()];
 
   // Tap the "Manage Passwords..." action.
-  [[EarlGrey selectElementWithMatcher:OtherPasswordsMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackOtherPasswordsMatcher()]
       performAction:grey_tap()];
 
   // Verify the use other passwords opened.
-  [[EarlGrey selectElementWithMatcher:OtherPasswordsDismissMatcher()]
+  [[EarlGrey
+      selectElementWithMatcher:ManualFallbackOtherPasswordsDismissMatcher()]
       assertWithMatcher:grey_sufficientlyVisible()];
 }
 
@@ -396,19 +233,20 @@
       performAction:TapWebElementWithId(kFormElementUsername)];
 
   // Tap on the passwords icon.
-  [[EarlGrey selectElementWithMatcher:PasswordIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordIconMatcher()]
       performAction:grey_tap()];
 
   // Verify the status of the icon.
-  [[EarlGrey selectElementWithMatcher:PasswordIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordIconMatcher()]
       assertWithMatcher:grey_not(grey_userInteractionEnabled())];
 
   // Tap the "Manage Passwords..." action.
-  [[EarlGrey selectElementWithMatcher:OtherPasswordsMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackOtherPasswordsMatcher()]
       performAction:grey_tap()];
 
   // Verify the use other passwords opened.
-  [[EarlGrey selectElementWithMatcher:OtherPasswordsDismissMatcher()]
+  [[EarlGrey
+      selectElementWithMatcher:ManualFallbackOtherPasswordsDismissMatcher()]
       assertWithMatcher:grey_sufficientlyVisible()];
 
   // Tap Cancel Button.
@@ -416,15 +254,15 @@
       performAction:grey_tap()];
 
   // Verify the status of the icons.
-  [[EarlGrey selectElementWithMatcher:PasswordIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordIconMatcher()]
       assertWithMatcher:grey_sufficientlyVisible()];
-  [[EarlGrey selectElementWithMatcher:PasswordIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordIconMatcher()]
       assertWithMatcher:grey_userInteractionEnabled()];
-  [[EarlGrey selectElementWithMatcher:KeyboardIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackKeyboardIconMatcher()]
       assertWithMatcher:grey_not(grey_sufficientlyVisible())];
 
   // Verify the keyboard is not cover by the password view.
-  [[EarlGrey selectElementWithMatcher:PasswordTableViewMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordTableViewMatcher()]
       assertWithMatcher:grey_notVisible()];
 }
 
@@ -435,20 +273,21 @@
       performAction:TapWebElementWithId(kFormElementUsername)];
 
   // Tap on the passwords icon.
-  [[EarlGrey selectElementWithMatcher:PasswordIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordIconMatcher()]
       performAction:grey_tap()];
 
   // Tap the "Manage Passwords..." action.
-  [[EarlGrey selectElementWithMatcher:ManagePasswordsMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackManagePasswordsMatcher()]
       performAction:grey_tap()];
 
   // Tap the password search.
-  [[EarlGrey selectElementWithMatcher:PasswordSettingsSearchMatcher()]
+  [[EarlGrey selectElementWithMatcher:SettingsPasswordSearchMatcher()]
       performAction:grey_tap()];
 
   // Verify keyboard is shown without the password controller.
-  GREYAssertTrue([GREYKeyboard isKeyboardShown], @"Keyboard Should be Shown");
-  [[EarlGrey selectElementWithMatcher:PasswordTableViewMatcher()]
+  GREYAssertTrue([ChromeEarlGrey isKeyboardShownWithError:nil],
+                 @"Keyboard Should be Shown");
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordTableViewMatcher()]
       assertWithMatcher:grey_notVisible()];
 }
 
@@ -461,17 +300,18 @@
       performAction:TapWebElementWithId(kFormElementUsername)];
 
   // Tap on the passwords icon.
-  [[EarlGrey selectElementWithMatcher:PasswordIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordIconMatcher()]
       performAction:grey_tap()];
 
   // Tap the "Other Passwords..." action.
-  [[EarlGrey selectElementWithMatcher:OtherPasswordsMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackOtherPasswordsMatcher()]
       performAction:grey_tap()];
 
   // Tap the password search.
-  [[EarlGrey selectElementWithMatcher:PasswordSearchBarMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordSearchBarMatcher()]
       performAction:grey_tap()];
-  GREYAssertTrue([GREYKeyboard isKeyboardShown], @"Keyboard Should be Shown");
+  GREYAssertTrue([ChromeEarlGrey isKeyboardShownWithError:nil],
+                 @"Keyboard Should be Shown");
 
   // Select a username.
   [[EarlGrey selectElementWithMatcher:UsernameButtonMatcher()]
@@ -479,17 +319,13 @@
 
   // Wait for the password list to disappear. Using the search bar, since the
   // popover doesn't have it.
-  [[EarlGrey selectElementWithMatcher:PasswordSearchBarMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordSearchBarMatcher()]
       assertWithMatcher:grey_notVisible()];
 
-  // Only on iOS 11.3 it is certain that on iPhones the keyboard is back. On iOS
-  // 11.0-11.2, it varies by device and version.
-  if ([GREYKeyboard isKeyboardShown]) {
-    [[EarlGrey selectElementWithMatcher:PasswordTableViewMatcher()]
-        assertWithMatcher:grey_sufficientlyVisible()];
-    [[EarlGrey selectElementWithMatcher:PasswordIconMatcher()]
-        assertWithMatcher:grey_sufficientlyVisible()];
-  }
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordTableViewMatcher()]
+      assertWithMatcher:grey_sufficientlyVisible()];
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordIconMatcher()]
+      assertWithMatcher:grey_sufficientlyVisible()];
 }
 
 // Tests that the Password View Controller is resumed after dismissing "Other
@@ -501,30 +337,27 @@
       performAction:TapWebElementWithId(kFormElementUsername)];
 
   // Tap on the passwords icon.
-  [[EarlGrey selectElementWithMatcher:PasswordIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordIconMatcher()]
       performAction:grey_tap()];
 
   // Tap the "Other Passwords..." action.
-  [[EarlGrey selectElementWithMatcher:OtherPasswordsMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackOtherPasswordsMatcher()]
       performAction:grey_tap()];
 
   // Dismiss the Other Passwords view.
-  [[EarlGrey selectElementWithMatcher:OtherPasswordsDismissMatcher()]
+  [[EarlGrey
+      selectElementWithMatcher:ManualFallbackOtherPasswordsDismissMatcher()]
       performAction:grey_tap()];
 
   // Wait for the password list to disappear. Using the search bar, since the
   // popover doesn't have it.
-  [[EarlGrey selectElementWithMatcher:PasswordSearchBarMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordSearchBarMatcher()]
       assertWithMatcher:grey_notVisible()];
 
-  // Only on iOS 11.3 it is certain that on iPhones the keyboard is back. On iOS
-  // 11.0-11.2, it varies by device and version.
-  if ([GREYKeyboard isKeyboardShown]) {
-    [[EarlGrey selectElementWithMatcher:PasswordTableViewMatcher()]
-        assertWithMatcher:grey_sufficientlyVisible()];
-    [[EarlGrey selectElementWithMatcher:PasswordIconMatcher()]
-        assertWithMatcher:grey_sufficientlyVisible()];
-  }
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordTableViewMatcher()]
+      assertWithMatcher:grey_sufficientlyVisible()];
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordIconMatcher()]
+      assertWithMatcher:grey_sufficientlyVisible()];
 }
 
 // Tests that the Password View Controller is dismissed when tapping the
@@ -539,22 +372,22 @@
       performAction:TapWebElementWithId(kFormElementUsername)];
 
   // Tap on the passwords icon.
-  [[EarlGrey selectElementWithMatcher:PasswordIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordIconMatcher()]
       performAction:grey_tap()];
 
   // Verify the password controller table view is visible.
-  [[EarlGrey selectElementWithMatcher:PasswordTableViewMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordTableViewMatcher()]
       assertWithMatcher:grey_sufficientlyVisible()];
 
   // Tap on the keyboard icon.
-  [[EarlGrey selectElementWithMatcher:KeyboardIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackKeyboardIconMatcher()]
       performAction:grey_tap()];
 
   // Verify the password controller table view and the password icon is NOT
   // visible.
-  [[EarlGrey selectElementWithMatcher:PasswordTableViewMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordTableViewMatcher()]
       assertWithMatcher:grey_notVisible()];
-  [[EarlGrey selectElementWithMatcher:KeyboardIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackKeyboardIconMatcher()]
       assertWithMatcher:grey_notVisible()];
 }
 
@@ -569,27 +402,28 @@
       performAction:TapWebElementWithId(kFormElementUsername)];
 
   // Tap on the passwords icon.
-  [[EarlGrey selectElementWithMatcher:PasswordIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordIconMatcher()]
       performAction:grey_tap()];
 
   // Verify the password controller table view is visible.
-  [[EarlGrey selectElementWithMatcher:PasswordTableViewMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordTableViewMatcher()]
       assertWithMatcher:grey_sufficientlyVisible()];
 
   // Tap on a point outside of the popover.
   // The way EarlGrey taps doesn't go through the window hierarchy. Because of
   // this, the tap needs to be done in the same window as the popover.
-  [[EarlGrey selectElementWithMatcher:PasswordTableViewWindowMatcher()]
+  [[EarlGrey
+      selectElementWithMatcher:ManualFallbackPasswordTableViewWindowMatcher()]
       performAction:grey_tapAtPoint(CGPointMake(0, 0))];
 
   // Verify the password controller table view is not visible and the password
   // icon is visible.
-  [[EarlGrey selectElementWithMatcher:PasswordTableViewMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordTableViewMatcher()]
       assertWithMatcher:grey_notVisible()];
-  [[EarlGrey selectElementWithMatcher:PasswordIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordIconMatcher()]
       assertWithMatcher:grey_interactable()];
   // Verify the interaction status of the password icon.
-  [[EarlGrey selectElementWithMatcher:PasswordIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordIconMatcher()]
       assertWithMatcher:grey_userInteractionEnabled()];
 }
 
@@ -606,21 +440,21 @@
       performAction:TapWebElementWithId(kFormElementUsername)];
 
   // Tap on the passwords icon.
-  [[EarlGrey selectElementWithMatcher:PasswordIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordIconMatcher()]
       performAction:grey_tap()];
 
   // Verify the password controller table view is visible.
-  [[EarlGrey selectElementWithMatcher:PasswordTableViewMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordTableViewMatcher()]
       assertWithMatcher:grey_sufficientlyVisible()];
 
-  [[EarlGrey selectElementWithMatcher:PasswordTableViewMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordTableViewMatcher()]
       performAction:grey_typeText(@"text")];
 
   // Verify the password controller table view and the password icon is NOT
   // visible.
-  [[EarlGrey selectElementWithMatcher:PasswordTableViewMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordTableViewMatcher()]
       assertWithMatcher:grey_notVisible()];
-  [[EarlGrey selectElementWithMatcher:KeyboardIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackKeyboardIconMatcher()]
       assertWithMatcher:grey_notVisible()];
 }
 
@@ -632,11 +466,11 @@
       performAction:TapWebElementWithId(kFormElementUsername)];
 
   // Tap on the passwords icon.
-  [[EarlGrey selectElementWithMatcher:PasswordIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordIconMatcher()]
       performAction:grey_tap()];
 
   // Verify the "Manage Passwords..." is on screen.
-  [[EarlGrey selectElementWithMatcher:OtherPasswordsMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackOtherPasswordsMatcher()]
       assertWithMatcher:grey_sufficientlyVisible()];
 
   // Tap the second element.
@@ -644,11 +478,11 @@
       performAction:TapWebElementWithId(kFormElementPassword)];
 
   // Try to scroll.
-  [[EarlGrey selectElementWithMatcher:PasswordTableViewMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordTableViewMatcher()]
       performAction:grey_scrollToContentEdge(kGREYContentEdgeBottom)];
 
   // Verify the "Manage Passwords..." is on screen.
-  [[EarlGrey selectElementWithMatcher:OtherPasswordsMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackOtherPasswordsMatcher()]
       assertWithMatcher:grey_sufficientlyVisible()];
 }
 
@@ -659,46 +493,46 @@
       performAction:TapWebElementWithId(kFormElementUsername)];
 
   // Tap on the passwords icon.
-  [[EarlGrey selectElementWithMatcher:PasswordIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordIconMatcher()]
       performAction:grey_tap()];
 
   // Verify the password controller table view is visible.
-  [[EarlGrey selectElementWithMatcher:PasswordTableViewMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordTableViewMatcher()]
       assertWithMatcher:grey_sufficientlyVisible()];
 
-  [EarlGrey rotateDeviceToOrientation:UIDeviceOrientationLandscapeLeft
-                           errorOrNil:nil];
+  [ChromeEarlGrey rotateDeviceToOrientation:UIDeviceOrientationLandscapeLeft
+                                      error:nil];
 
   // Verify the password controller table view is still visible.
-  [[EarlGrey selectElementWithMatcher:PasswordTableViewMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordTableViewMatcher()]
       assertWithMatcher:grey_sufficientlyVisible()];
 }
 
+// TODO(crbug.com/1016367): Remove the guard of this test when ExecuteJavaScript
+// util is updated for EG2.
+#if defined(CHROME_EARL_GREY_1)
 // Tests that content is injected in iframe messaging.
 - (void)testPasswordControllerSupportsIFrameMessaging {
-  // Iframe messaging is not supported on iOS < 11.3.
-  if (!base::ios::IsRunningOnOrLater(11, 3, 0)) {
-    EARL_GREY_TEST_SKIPPED(@"Skipped for iOS < 11.3");
-  }
-
   const GURL URL = self.testServer->GetURL(kIFrameHTMLFile);
   [ChromeEarlGrey loadURL:URL];
   [ChromeEarlGrey waitForWebStateContainingText:"iFrame"];
-  SaveLocalPasswordForm(URL);
+  NSString* URLString = base::SysUTF8ToNSString(URL.spec());
+  [AutofillAppInterface savePasswordFormForURLSpec:URLString];
 
   // Bring up the keyboard.
   [[EarlGrey selectElementWithMatcher:chrome_test_util::WebViewMatcher()]
       performAction:TapWebElementWithIdInFrame(kFormElementUsername, 0)];
 
   // Wait for the accessory icon to appear.
-  [GREYKeyboard waitForKeyboardToAppear];
+  GREYAssertTrue([ChromeEarlGrey isKeyboardShownWithError:nil],
+                 @"Keyboard Should be Shown");
 
   // Tap on the passwords icon.
-  [[EarlGrey selectElementWithMatcher:PasswordIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordIconMatcher()]
       performAction:grey_tap()];
 
   // Verify the password controller table view is visible.
-  [[EarlGrey selectElementWithMatcher:PasswordTableViewMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordTableViewMatcher()]
       assertWithMatcher:grey_sufficientlyVisible()];
 
   // Select a username.
@@ -712,30 +546,34 @@
           kFormElementUsername, kExampleUsername];
   XCTAssertTrue(WaitForJavaScriptCondition(javaScriptCondition));
 }
+#endif  // CHROME_EARL_GREY_1
 
 // Tests that an alert is shown when trying to fill a password in an unsecure
 // field.
 - (void)testPasswordControllerPresentsUnsecureAlert {
   const GURL URL = self.testServer->GetURL(kFormHTMLFile);
-  SaveLocalPasswordForm(URL);
+  // Only Objc objects can cross the EDO portal.
+  NSString* URLString = base::SysUTF8ToNSString(URL.spec());
+  [AutofillAppInterface savePasswordFormForURLSpec:URLString];
 
   // Bring up the keyboard.
   [[EarlGrey selectElementWithMatcher:chrome_test_util::WebViewMatcher()]
       performAction:TapWebElementWithId(kFormElementUsername)];
 
   // Wait for the accessory icon to appear.
-  [GREYKeyboard waitForKeyboardToAppear];
+  GREYAssertTrue([ChromeEarlGrey isKeyboardShownWithError:nil],
+                 @"Keyboard Should be Shown");
 
   // Tap on the passwords icon.
-  [[EarlGrey selectElementWithMatcher:PasswordIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordIconMatcher()]
       performAction:grey_tap()];
 
   // Verify the password controller table view is visible.
-  [[EarlGrey selectElementWithMatcher:PasswordTableViewMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordTableViewMatcher()]
       assertWithMatcher:grey_sufficientlyVisible()];
 
   // Select a password.
-  [[EarlGrey selectElementWithMatcher:PasswordButtonMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordButtonMatcher()]
       performAction:grey_tap()];
 
   // Look for the alert.
@@ -745,28 +583,29 @@
 
 // Tests that the password icon is hidden when no passwords are available.
 - (void)testPasswordIconIsNotVisibleWhenPasswordStoreEmpty {
-  ClearPasswordStore();
+  [AutofillAppInterface clearPasswordStore];
 
   // Bring up the keyboard.
   [[EarlGrey selectElementWithMatcher:chrome_test_util::WebViewMatcher()]
       performAction:TapWebElementWithId(kFormElementUsername)];
 
   // Wait for the keyboard to appear.
-  [GREYKeyboard waitForKeyboardToAppear];
+  GREYAssertTrue([ChromeEarlGrey isKeyboardShownWithError:nil],
+                 @"Keyboard Should be Shown");
 
   // Assert the password icon is not visible.
-  [[EarlGrey selectElementWithMatcher:PasswordIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordIconMatcher()]
       assertWithMatcher:grey_notVisible()];
 
   // Store one password.
-  SaveExamplePasswordForm();
+  [AutofillAppInterface saveExamplePasswordForm];
 
   // Tap another field to trigger form activity.
   [[EarlGrey selectElementWithMatcher:chrome_test_util::WebViewMatcher()]
       performAction:TapWebElementWithId(kFormElementPassword)];
 
   // Assert the password icon is visible now.
-  [[EarlGrey selectElementWithMatcher:PasswordIconMatcher()]
+  [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordIconMatcher()]
       assertWithMatcher:grey_sufficientlyVisible()];
 }
 
diff --git a/ios/chrome/browser/ui/badges/badge_button_factory.mm b/ios/chrome/browser/ui/badges/badge_button_factory.mm
index 0d43740..c1f94e54 100644
--- a/ios/chrome/browser/ui/badges/badge_button_factory.mm
+++ b/ios/chrome/browser/ui/badges/badge_button_factory.mm
@@ -28,6 +28,8 @@
       return [self passwordsUpdateBadgeButton];
     case BadgeType::kBadgeTypeSaveCard:
       return [self saveCardBadgeButton];
+    case BadgeType::kBadgeTypeTranslate:
+      return [self translateBadgeButton];
     case BadgeType::kBadgeTypeIncognito:
       return [self incognitoBadgeButton];
     case BadgeType::kBadgeTypeOverflow:
@@ -83,6 +85,19 @@
   return button;
 }
 
+- (BadgeButton*)translateBadgeButton {
+  BadgeButton* button =
+      [self createButtonForType:BadgeType::kBadgeTypeTranslate
+                     imageNamed:@"infobar_translate_icon"
+                  renderingMode:UIImageRenderingModeAlwaysTemplate];
+  [button addTarget:self.delegate
+                action:@selector(translateBadgeButtonTapped:)
+      forControlEvents:UIControlEventTouchUpInside];
+  button.accessibilityIdentifier = kBadgeButtonTranslateAccessibilityIdentifier;
+  // TODO(crbug.com/1014959): Create a11y label hint.
+  return button;
+}
+
 - (BadgeButton*)incognitoBadgeButton {
   BadgeButton* button =
       [self createButtonForType:BadgeType::kBadgeTypeIncognito
diff --git a/ios/chrome/browser/ui/badges/badge_constants.h b/ios/chrome/browser/ui/badges/badge_constants.h
index dee73f23..72690c4 100644
--- a/ios/chrome/browser/ui/badges/badge_constants.h
+++ b/ios/chrome/browser/ui/badges/badge_constants.h
@@ -13,6 +13,7 @@
 extern NSString* const kBadgeButtonIncognitoAccessibilityIdentifier;
 extern NSString* const kBadgeButtonOverflowAccessibilityIdentifier;
 extern NSString* const kBadgeButtonSaveCardAccessibilityIdentifier;
+extern NSString* const kBadgeButtonTranslateAccessibilityIdentifier;
 
 // A11y identifier for the Badge Popup Menu Table View.
 extern NSString* const kBadgePopupMenuTableViewAccessibilityIdentifier;
diff --git a/ios/chrome/browser/ui/badges/badge_constants.mm b/ios/chrome/browser/ui/badges/badge_constants.mm
index 1242804..b6c566a 100644
--- a/ios/chrome/browser/ui/badges/badge_constants.mm
+++ b/ios/chrome/browser/ui/badges/badge_constants.mm
@@ -23,6 +23,9 @@
 NSString* const kBadgeButtonSaveCardAccessibilityIdentifier =
     @"badgeButtonSaveCardAXID";
 
+NSString* const kBadgeButtonTranslateAccessibilityIdentifier =
+    @"badgeButtonTranslateAXID";
+
 NSString* const kBadgePopupMenuTableViewAccessibilityIdentifier =
     @"badgePopupMenuOverflowAXID";
 
diff --git a/ios/chrome/browser/ui/badges/badge_delegate.h b/ios/chrome/browser/ui/badges/badge_delegate.h
index c80a0f0..516fd95 100644
--- a/ios/chrome/browser/ui/badges/badge_delegate.h
+++ b/ios/chrome/browser/ui/badges/badge_delegate.h
@@ -13,6 +13,9 @@
 // Action when a Save Card badge is tapped.
 - (void)saveCardBadgeButtonTapped:(id)sender;
 
+// Action when a Translate badge is tapped.
+- (void)translateBadgeButtonTapped:(id)sender;
+
 // Action when the overflow badge is tapped.
 - (void)overflowBadgeButtonTapped:(id)sender;
 @end
diff --git a/ios/chrome/browser/ui/badges/badge_mediator.mm b/ios/chrome/browser/ui/badges/badge_mediator.mm
index d5e1aa3..3076bb7 100644
--- a/ios/chrome/browser/ui/badges/badge_mediator.mm
+++ b/ios/chrome/browser/ui/badges/badge_mediator.mm
@@ -140,6 +140,10 @@
                         infobarType:InfobarType::kInfobarTypeSaveCard];
 }
 
+- (void)translateBadgeButtonTapped:(id)sender {
+  // TODO(crbug.com/1014959): Implement.
+}
+
 - (void)overflowBadgeButtonTapped:(id)sender {
   NSMutableArray<id<BadgeItem>>* popupMenuBadges =
       [[NSMutableArray alloc] init];
diff --git a/ios/chrome/browser/ui/badges/badge_popup_menu_item.mm b/ios/chrome/browser/ui/badges/badge_popup_menu_item.mm
index ca47755..2557fbb 100644
--- a/ios/chrome/browser/ui/badges/badge_popup_menu_item.mm
+++ b/ios/chrome/browser/ui/badges/badge_popup_menu_item.mm
@@ -65,6 +65,11 @@
         // "Save Card" on the delegate and "Save Credit Card on mocks.
         _title = @"Save Credit Card";
         break;
+      case BadgeType::kBadgeTypeTranslate:
+        _actionIdentifier = PopupMenuActionShowTranslateOptions;
+        // TODO(crbug.com/1014959): use l10n to translate string.
+        _title = @"Translate Page";
+        break;
       case BadgeType::kBadgeTypeIncognito:
         NOTREACHED() << "A BadgePopupMenuItem should not be an Incognito badge";
         break;
@@ -95,6 +100,10 @@
       badgeImage = [[UIImage imageNamed:@"infobar_save_card_icon"]
           imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
       break;
+    case BadgeType::kBadgeTypeTranslate:
+      badgeImage = [[UIImage imageNamed:@"infobar_translate_icon"]
+          imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
+      break;
     case BadgeType::kBadgeTypeIncognito:
       NOTREACHED()
           << "A popup menu item should not be of type kBadgeTypeIncognito";
diff --git a/ios/chrome/browser/ui/badges/badge_type.h b/ios/chrome/browser/ui/badges/badge_type.h
index 02b0a155..c780932b 100644
--- a/ios/chrome/browser/ui/badges/badge_type.h
+++ b/ios/chrome/browser/ui/badges/badge_type.h
@@ -21,6 +21,8 @@
   kBadgeTypeOverflow = 4,
   // Badge type for Save Credit Card Infobar.
   kBadgeTypeSaveCard = 5,
+  // Badge type for the Translate Infobar.
+  kBadgeTypeTranslate = 6,
 };
 
 #endif  // IOS_CHROME_BROWSER_UI_BADGES_BADGE_TYPE_H_
diff --git a/ios/chrome/browser/ui/infobars/BUILD.gn b/ios/chrome/browser/ui/infobars/BUILD.gn
index bd9b0cc..ee523f1 100644
--- a/ios/chrome/browser/ui/infobars/BUILD.gn
+++ b/ios/chrome/browser/ui/infobars/BUILD.gn
@@ -76,6 +76,7 @@
     "resources:infobar_reveal_password_icon",
     "resources:infobar_save_card_icon",
     "resources:infobar_settings_icon",
+    "resources:infobar_translate_icon",
     "resources:infobar_warning",
     "//base",
     "//base:i18n",
diff --git a/ios/chrome/browser/ui/infobars/coordinators/infobar_confirm_coordinator.mm b/ios/chrome/browser/ui/infobars/coordinators/infobar_confirm_coordinator.mm
index bb9412a0..b3d86768 100644
--- a/ios/chrome/browser/ui/infobars/coordinators/infobar_confirm_coordinator.mm
+++ b/ios/chrome/browser/ui/infobars/coordinators/infobar_confirm_coordinator.mm
@@ -89,6 +89,10 @@
   return YES;
 }
 
+- (BOOL)isInfobarAccepted {
+  return NO;
+}
+
 - (void)infobarBannerWasPresented {
   // NO-OP.
 }
diff --git a/ios/chrome/browser/ui/infobars/coordinators/infobar_coordinator.mm b/ios/chrome/browser/ui/infobars/coordinators/infobar_coordinator.mm
index 68c4b189..d62a5ff 100644
--- a/ios/chrome/browser/ui/infobars/coordinators/infobar_coordinator.mm
+++ b/ios/chrome/browser/ui/infobars/coordinators/infobar_coordinator.mm
@@ -201,8 +201,10 @@
 
 - (void)bannerInfobarButtonWasPressed:(id)sender {
   [self performInfobarAction];
-  [self.badgeDelegate infobarWasAccepted:self.infobarType
-                             forWebState:self.webState];
+  if ([self isInfobarAccepted]) {
+    [self.badgeDelegate infobarWasAccepted:self.infobarType
+                               forWebState:self.webState];
+  }
   [self dismissInfobarBanner:sender animated:YES completion:nil];
 }
 
@@ -350,6 +352,11 @@
   return NO;
 }
 
+- (BOOL)isInfobarAccepted {
+  NOTREACHED() << "Subclass must implement.";
+  return NO;
+}
+
 - (void)infobarBannerWasPresented {
   NOTREACHED() << "Subclass must implement.";
 }
diff --git a/ios/chrome/browser/ui/infobars/coordinators/infobar_coordinator_implementation.h b/ios/chrome/browser/ui/infobars/coordinators/infobar_coordinator_implementation.h
index eea8dd6..2ec62d7 100644
--- a/ios/chrome/browser/ui/infobars/coordinators/infobar_coordinator_implementation.h
+++ b/ios/chrome/browser/ui/infobars/coordinators/infobar_coordinator_implementation.h
@@ -17,6 +17,11 @@
 // successfully. If it returns NO no Modal should be presented.
 - (BOOL)configureModalViewController;
 
+// Returns YES if the Infobar action was completed successfully. Useful for
+// Infobar actions that finish asynchronously to delay marking the Infobar as
+// accepted.
+- (BOOL)isInfobarAccepted;
+
 // Performs any actions related to an Infobar Banner presentation.
 - (void)infobarBannerWasPresented;
 
diff --git a/ios/chrome/browser/ui/infobars/coordinators/infobar_password_coordinator.mm b/ios/chrome/browser/ui/infobars/coordinators/infobar_password_coordinator.mm
index f7b1139..64244e3 100644
--- a/ios/chrome/browser/ui/infobars/coordinators/infobar_password_coordinator.mm
+++ b/ios/chrome/browser/ui/infobars/coordinators/infobar_password_coordinator.mm
@@ -149,6 +149,10 @@
   return YES;
 }
 
+- (BOOL)isInfobarAccepted {
+  return YES;
+}
+
 - (void)infobarBannerWasPresented {
   // There's a chance the Delegate was destroyed while the presentation was
   // taking place e.g. User navigated away. Check if the delegate still exists.
diff --git a/ios/chrome/browser/ui/infobars/coordinators/infobar_save_card_coordinator.mm b/ios/chrome/browser/ui/infobars/coordinators/infobar_save_card_coordinator.mm
index 2f8c353dd..ad8b8a80 100644
--- a/ios/chrome/browser/ui/infobars/coordinators/infobar_save_card_coordinator.mm
+++ b/ios/chrome/browser/ui/infobars/coordinators/infobar_save_card_coordinator.mm
@@ -84,6 +84,10 @@
 
 #pragma mark - InfobarCoordinatorImplementation
 
+- (BOOL)isInfobarAccepted {
+  return YES;
+}
+
 - (void)performInfobarAction {
   if (self.saveCardInfoBarDelegate->upload()) {
     // TODO(crbug.com/1014652): Open Modal if CreditCard details will be
diff --git a/ios/chrome/browser/ui/infobars/coordinators/infobar_translate_coordinator.mm b/ios/chrome/browser/ui/infobars/coordinators/infobar_translate_coordinator.mm
index b907a7c65..1e3b27f9 100644
--- a/ios/chrome/browser/ui/infobars/coordinators/infobar_translate_coordinator.mm
+++ b/ios/chrome/browser/ui/infobars/coordinators/infobar_translate_coordinator.mm
@@ -4,12 +4,16 @@
 
 #import "ios/chrome/browser/ui/infobars/coordinators/infobar_translate_coordinator.h"
 
+#include "base/strings/sys_string_conversions.h"
 #include "components/translate/core/browser/translate_infobar_delegate.h"
 #include "ios/chrome/browser/infobars/infobar_controller_delegate.h"
 #import "ios/chrome/browser/infobars/infobar_type.h"
+#import "ios/chrome/browser/translate/translate_constants.h"
 #import "ios/chrome/browser/translate/translate_infobar_delegate_observer_bridge.h"
 #import "ios/chrome/browser/ui/infobars/banners/infobar_banner_view_controller.h"
 #import "ios/chrome/browser/ui/infobars/infobar_container.h"
+#include "ios/chrome/grit/ios_strings.h"
+#include "ui/base/l10n/l10n_util.h"
 
 #if !defined(__has_feature) || !__has_feature(objc_arc)
 #error "This file requires ARC support."
@@ -25,9 +29,20 @@
 @property(nonatomic, readonly)
     translate::TranslateInfoBarDelegate* translateInfoBarDelegate;
 
+// InfobarBannerViewController owned by this Coordinator.
+@property(nonatomic, strong) InfobarBannerViewController* bannerViewController;
+
+// The current state of translate.
+@property(nonatomic, assign) translate::TranslateStep currentStep;
+
+// Tracks user actions taken throughout Translate lifetime.
+@property(nonatomic, assign) UserAction userAction;
+
 @end
 
 @implementation TranslateInfobarCoordinator
+// Synthesize since readonly property from superclass is changed to readwrite.
+@synthesize bannerViewController = _bannerViewController;
 
 - (instancetype)initWithInfoBarDelegate:
     (translate::TranslateInfoBarDelegate*)infoBarDelegate {
@@ -39,6 +54,8 @@
     _translateInfobarDelegateObserver =
         std::make_unique<TranslateInfobarDelegateObserverBridge>(
             infoBarDelegate, self);
+    _userAction = UserActionNone;
+    _currentStep = translate::TranslateStep::TRANSLATE_STEP_BEFORE_TRANSLATE;
   }
   return self;
 }
@@ -48,13 +65,13 @@
 - (void)translateInfoBarDelegate:(translate::TranslateInfoBarDelegate*)delegate
           didChangeTranslateStep:(translate::TranslateStep)step
                    withErrorType:(translate::TranslateErrors::Type)errorType {
-  // TODO(crbug.com/1014959): implement
+  // TODO(crbug.com/1014959): Update currentStep and call
+  // infobarWasAccepted:forWebState: if translate finished.
 }
 
 - (BOOL)translateInfoBarDelegateDidDismissWithoutInteraction:
     (translate::TranslateInfoBarDelegate*)delegate {
-  // TODO(crbug.com/1014959): implement
-  return YES;
+  return self.userAction == UserActionNone;
 }
 
 #pragma mark - ChromeCoordinator
@@ -62,7 +79,16 @@
 - (void)start {
   if (!self.started) {
     self.started = YES;
-    // TODO(crbug.com/1014959): Configure BannerViewController.
+    self.bannerViewController = [[InfobarBannerViewController alloc]
+        initWithDelegate:self
+           presentsModal:self.hasBadge
+                    type:InfobarType::kInfobarTypeTranslate];
+    self.bannerViewController.titleText = [self titleText];
+    self.bannerViewController.buttonText = [self buttonText];
+    self.bannerViewController.iconImage =
+        [UIImage imageNamed:@"infobar_translate_icon"];
+    self.bannerViewController.optionalAccessibilityLabel =
+        self.bannerViewController.titleText;
   }
 }
 
@@ -79,12 +105,24 @@
 
 #pragma mark - InfobarCoordinatorImplementation
 
+- (BOOL)shouldBadgeBeAccepted {
+  return self.currentStep ==
+         translate::TranslateStep::TRANSLATE_STEP_AFTER_TRANSLATE;
+}
+
 - (void)performInfobarAction {
-  // TODO(crbug.com/1014959): implement
+  self.userAction |= UserActionTranslate;
+
+  // TODO(crbug.com/1014959): Add metrics
+  if (self.translateInfoBarDelegate->ShouldAutoAlwaysTranslate()) {
+    self.translateInfoBarDelegate->ToggleAlwaysTranslate();
+  }
+  self.translateInfoBarDelegate->Translate();
 }
 
 - (void)infobarWasDismissed {
-  // TODO(crbug.com/1014959): implement
+  // Release these strong ViewControllers at the time of infobar dismissal.
+  self.bannerViewController = nil;
 }
 
 #pragma mark - Banner
@@ -94,7 +132,7 @@
 }
 
 - (void)dismissBannerWhenInteractionIsFinished {
-  // TODO(crbug.com/1014959): implement
+  [self.bannerViewController dismissWhenInteractionIsFinished];
 }
 
 - (void)infobarBannerWillBeDismissed:(BOOL)userInitiated {
@@ -117,4 +155,23 @@
   return 0.0;
 }
 
+#pragma mark - Private
+
+- (NSString*)titleText {
+  // TODO(crbug.com/1014959): Return different strings depending on
+  // TranslateStep. Also, consider looking into base::i18n::MessageFormatter to
+  // ensure the dstring can be translated properly with a dynamic variable
+  // inserted.
+  return [NSString
+      stringWithFormat:@"%@ %@?", @"Translate",
+                       base::SysUTF16ToNSString(self.translateInfoBarDelegate
+                                                    ->target_language_name())];
+}
+
+- (NSString*)buttonText {
+  // TODO(crbug.com/1014959): Return different strings depending on
+  // TranslateStep.
+  return l10n_util::GetNSString(IDS_IOS_TRANSLATE_INFOBAR_TRANSLATE_ACTION);
+}
+
 @end
diff --git a/ios/chrome/browser/ui/infobars/resources/BUILD.gn b/ios/chrome/browser/ui/infobars/resources/BUILD.gn
index 8848552..8966145 100644
--- a/ios/chrome/browser/ui/infobars/resources/BUILD.gn
+++ b/ios/chrome/browser/ui/infobars/resources/BUILD.gn
@@ -56,6 +56,14 @@
   ]
 }
 
+imageset("infobar_translate_icon") {
+  sources = [
+    "infobar_translate_icon.imageset/Contents.json",
+    "infobar_translate_icon.imageset/infobar_translate_icon@2x.png",
+    "infobar_translate_icon.imageset/infobar_translate_icon@3x.png",
+  ]
+}
+
 imageset("infobar_settings_icon") {
   sources = [
     "infobar_settings_icon.imageset/Contents.json",
diff --git a/ios/chrome/browser/ui/infobars/resources/infobar_translate_icon.imageset/Contents.json b/ios/chrome/browser/ui/infobars/resources/infobar_translate_icon.imageset/Contents.json
new file mode 100644
index 0000000..044be17
--- /dev/null
+++ b/ios/chrome/browser/ui/infobars/resources/infobar_translate_icon.imageset/Contents.json
@@ -0,0 +1,18 @@
+{
+    "images": [
+        {
+            "idiom": "universal",
+            "scale": "2x",
+            "filename": "infobar_translate_icon@2x.png"
+        },
+        {
+            "idiom": "universal",
+            "scale": "3x",
+            "filename": "infobar_translate_icon@3x.png"
+        }
+    ],
+    "info": {
+        "version": 1,
+        "author": "xcode"
+    }
+}
diff --git a/ios/chrome/browser/ui/infobars/resources/infobar_translate_icon.imageset/infobar_translate_icon@2x.png b/ios/chrome/browser/ui/infobars/resources/infobar_translate_icon.imageset/infobar_translate_icon@2x.png
new file mode 100644
index 0000000..d94aec2
--- /dev/null
+++ b/ios/chrome/browser/ui/infobars/resources/infobar_translate_icon.imageset/infobar_translate_icon@2x.png
Binary files differ
diff --git a/ios/chrome/browser/ui/infobars/resources/infobar_translate_icon.imageset/infobar_translate_icon@3x.png b/ios/chrome/browser/ui/infobars/resources/infobar_translate_icon.imageset/infobar_translate_icon@3x.png
new file mode 100644
index 0000000..778ed906
--- /dev/null
+++ b/ios/chrome/browser/ui/infobars/resources/infobar_translate_icon.imageset/infobar_translate_icon@3x.png
Binary files differ
diff --git a/ios/chrome/browser/ui/popup_menu/public/cells/popup_menu_item.h b/ios/chrome/browser/ui/popup_menu/public/cells/popup_menu_item.h
index ff8e121..48000fbf 100644
--- a/ios/chrome/browser/ui/popup_menu/public/cells/popup_menu_item.h
+++ b/ios/chrome/browser/ui/popup_menu/public/cells/popup_menu_item.h
@@ -52,6 +52,7 @@
   PopupMenuActionShowSavePasswordOptions,
   PopupMenuActionShowUpdatePasswordOptions,
   PopupMenuActionShowSaveCardOptions,
+  PopupMenuActionShowTranslateOptions,
 };
 
 // Protocol defining a popup item.
diff --git a/ios/chrome/browser/ui/settings/sync/BUILD.gn b/ios/chrome/browser/ui/settings/sync/BUILD.gn
index 86c82d6..f299382a 100644
--- a/ios/chrome/browser/ui/settings/sync/BUILD.gn
+++ b/ios/chrome/browser/ui/settings/sync/BUILD.gn
@@ -70,7 +70,6 @@
     "//components/sync_preferences",
     "//components/sync_preferences:test_support",
     "//components/unified_consent",
-    "//components/unified_consent:test_support",
     "//ios/chrome/app/strings",
     "//ios/chrome/browser",
     "//ios/chrome/browser",
diff --git a/ios/chrome/browser/ui/signin_interaction/BUILD.gn b/ios/chrome/browser/ui/signin_interaction/BUILD.gn
index a67bf66..e6d567d 100644
--- a/ios/chrome/browser/ui/signin_interaction/BUILD.gn
+++ b/ios/chrome/browser/ui/signin_interaction/BUILD.gn
@@ -50,7 +50,6 @@
   testonly = true
   sources = [
     "signin_interaction_controller_egtest.mm",
-    "signin_interaction_controller_unity_egtest.mm",
   ]
   deps = [
     ":eg_test_support",
diff --git a/ios/chrome/browser/ui/signin_interaction/signin_interaction_controller_egtest.mm b/ios/chrome/browser/ui/signin_interaction/signin_interaction_controller_egtest.mm
index e357bf4..7047ad96 100644
--- a/ios/chrome/browser/ui/signin_interaction/signin_interaction_controller_egtest.mm
+++ b/ios/chrome/browser/ui/signin_interaction/signin_interaction_controller_egtest.mm
@@ -17,6 +17,7 @@
 #import "ios/chrome/browser/ui/authentication/chrome_signin_view_controller.h"
 #import "ios/chrome/browser/ui/authentication/signin_earl_grey_ui.h"
 #import "ios/chrome/browser/ui/authentication/signin_earlgrey_utils.h"
+#import "ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_cell.h"
 #import "ios/chrome/browser/ui/commands/application_commands.h"
 #import "ios/chrome/browser/ui/commands/open_new_tab_command.h"
 #import "ios/chrome/browser/ui/content_suggestions/ntp_home_constant.h"
@@ -31,6 +32,7 @@
 #import "ios/chrome/test/earl_grey/chrome_matchers.h"
 #import "ios/chrome/test/earl_grey/chrome_test_case.h"
 #import "ios/public/provider/chrome/browser/signin/fake_chrome_identity.h"
+#import "ios/public/provider/chrome/browser/signin/fake_chrome_identity_interaction_manager.h"
 #import "ios/public/provider/chrome/browser/signin/fake_chrome_identity_service.h"
 #import "ios/testing/earl_grey/matchers.h"
 #import "ios/web/public/web_state.h"
@@ -96,6 +98,13 @@
       @"Browsing data was not removed.");
 }
 
+// Returns a matcher for |userEmail| in IdentityChooserViewController.
+id<GREYMatcher> identityChooserButtonMatcherWithEmail(NSString* userEmail) {
+  return grey_allOf(grey_accessibilityID(userEmail),
+                    grey_kindOfClass([IdentityChooserCell class]),
+                    grey_sufficientlyVisible(), nil);
+}
+
 }  // namespace
 
 // Sign-in interaction tests that work both with Unified Consent enabled or
@@ -126,6 +135,94 @@
   [SigninEarlGreyUtils checkSignedInWithIdentity:identity];
 }
 
+// Tests signing in with one account, switching sync account to a second and
+// choosing to keep the browsing data separate during the switch.
+- (void)testSignInSwitchAccountsAndKeepDataSeparate {
+  // The ChromeSigninView's activity indicator must be hidden as the import
+  // data UI is presented on top of the activity indicator and Earl Grey cannot
+  // interact with any UI while an animation is active.
+  std::unique_ptr<base::AutoReset<BOOL>> hideActivityMonitor =
+      [ChromeSigninViewController hideActivityIndicatorForTesting];
+
+  // Set up the fake identities.
+  ios::FakeChromeIdentityService* identity_service =
+      ios::FakeChromeIdentityService::GetInstanceFromChromeProvider();
+  ChromeIdentity* identity1 = [SigninEarlGreyUtils fakeIdentity1];
+  ChromeIdentity* identity2 = [SigninEarlGreyUtils fakeIdentity2];
+  identity_service->AddIdentity(identity1);
+  identity_service->AddIdentity(identity2);
+
+  [SigninEarlGreyUI signinWithIdentity:identity1];
+  [SigninEarlGreyUI signOutWithManagedAccount:NO];
+
+  // Sign in with |identity2|.
+  [ChromeEarlGreyUI openSettingsMenu];
+  [[EarlGrey selectElementWithMatcher:SecondarySignInButton()]
+      performAction:grey_tap()];
+  [SigninEarlGreyUI selectIdentityWithEmail:identity2.userEmail];
+  [SigninEarlGreyUI confirmSigninConfirmationDialog];
+
+  // Switch Sync account to |identity2| should ask whether date should be
+  // imported or kept separate. Choose to keep data separate.
+  [[EarlGrey selectElementWithMatcher:
+                 chrome_test_util::SettingsImportDataKeepSeparateButton()]
+      performAction:grey_tap()];
+
+  [[EarlGrey selectElementWithMatcher:chrome_test_util::
+                                          SettingsImportDataContinueButton()]
+      performAction:grey_tap()];
+
+  // Check the signed-in user did change.
+  [SigninEarlGreyUtils checkSignedInWithIdentity:identity2];
+
+  [[EarlGrey selectElementWithMatcher:SettingsDoneButton()]
+      performAction:grey_tap()];
+}
+
+// Tests signing in with one account, switching sync account to a second and
+// choosing to import the browsing data during the switch.
+- (void)testSignInSwitchAccountsAndImportData {
+  // The ChromeSigninView's activity indicator must be hidden as the import
+  // data UI is presented on top of the activity indicator and Earl Grey cannot
+  // interact with any UI while an animation is active.
+  std::unique_ptr<base::AutoReset<BOOL>> hideActivityMonitor =
+      [ChromeSigninViewController hideActivityIndicatorForTesting];
+
+  // Set up the fake identities.
+  ios::FakeChromeIdentityService* identity_service =
+      ios::FakeChromeIdentityService::GetInstanceFromChromeProvider();
+  ChromeIdentity* identity1 = [SigninEarlGreyUtils fakeIdentity1];
+  ChromeIdentity* identity2 = [SigninEarlGreyUtils fakeIdentity2];
+  identity_service->AddIdentity(identity1);
+  identity_service->AddIdentity(identity2);
+
+  // Sign in to |identity1|.
+  [SigninEarlGreyUI signinWithIdentity:identity1];
+  [SigninEarlGreyUI signOutWithManagedAccount:NO];
+
+  // Sign in with |identity2|.
+  [ChromeEarlGreyUI openSettingsMenu];
+  [[EarlGrey selectElementWithMatcher:SecondarySignInButton()]
+      performAction:grey_tap()];
+  [SigninEarlGreyUI selectIdentityWithEmail:identity2.userEmail];
+  [SigninEarlGreyUI confirmSigninConfirmationDialog];
+
+  // Switch Sync account to |identity2| should ask whether date should be
+  // imported or kept separate. Choose to import the data.
+  [[EarlGrey selectElementWithMatcher:chrome_test_util::
+                                          SettingsImportDataImportButton()]
+      performAction:grey_tap()];
+  [[EarlGrey selectElementWithMatcher:chrome_test_util::
+                                          SettingsImportDataContinueButton()]
+      performAction:grey_tap()];
+
+  // Check the signed-in user did change.
+  [SigninEarlGreyUtils checkSignedInWithIdentity:identity2];
+
+  [[EarlGrey selectElementWithMatcher:SettingsDoneButton()]
+      performAction:grey_tap()];
+}
+
 // Tests that signing out from the Settings works correctly.
 - (void)testSignInDisconnectFromChrome {
   ChromeIdentity* identity = [SigninEarlGreyUtils fakeIdentity1];
@@ -467,4 +564,91 @@
   }
 }
 
+// Tests the "ADD ACCOUNT" button in the identity chooser view controller.
+- (void)testAddAccountAutomatically {
+  [ChromeEarlGreyUI openSettingsMenu];
+  [ChromeEarlGreyUI tapSettingsMenuButton:PrimarySignInButton()];
+  [[GREYUIThreadExecutor sharedInstance] drainUntilIdle];
+  // Tap on "ADD ACCOUNT".
+  [SigninEarlGreyUI tapAddAccountButton];
+  // Check for the fake SSO screen.
+  WaitForMatcher(grey_accessibilityID(kFakeAddAccountViewIdentifier));
+  // Close the SSO view controller.
+  id<GREYMatcher> matcher =
+      grey_allOf(chrome_test_util::ButtonWithAccessibilityLabel(@"Cancel"),
+                 grey_sufficientlyVisible(), nil);
+  [[EarlGrey selectElementWithMatcher:matcher] performAction:grey_tap()];
+  // Make sure the SSO view controller is fully removed before ending the test.
+  // The tear down needs to remove other view controllers, and it cannot be done
+  // during the animation of the SSO view controler.
+  [[GREYUIThreadExecutor sharedInstance] drainUntilIdle];
+}
+
+// Tests to remove the last identity in the identity chooser.
+- (void)testRemoveLastAccount {
+  // Set up a fake identity.
+  ChromeIdentity* identity = [SigninEarlGreyUtils fakeIdentity1];
+  ios::FakeChromeIdentityService::GetInstanceFromChromeProvider()->AddIdentity(
+      identity);
+
+  // Open the identity chooser.
+  [ChromeEarlGreyUI openSettingsMenu];
+  [ChromeEarlGreyUI tapSettingsMenuButton:SecondarySignInButton()];
+  WaitForMatcher(identityChooserButtonMatcherWithEmail(identity.userEmail));
+
+  // Remove the fake identity.
+  ios::FakeChromeIdentityService::GetInstanceFromChromeProvider()
+      ->RemoveIdentity(identity);
+  [[GREYUIThreadExecutor sharedInstance] drainUntilIdle];
+
+  // Check that the identity has been removed.
+  [[EarlGrey selectElementWithMatcher:identityChooserButtonMatcherWithEmail(
+                                          identity.userEmail)]
+      assertWithMatcher:grey_notVisible()];
+}
+
+// Opens the add account screen and then cancels it by opening a new tab.
+// Ensures that the add account screen is correctly dismissed. crbug.com/462200
+//
+// TODO(crbug.com/962847): This test crashes when the the add account screen
+// is dismissed.
+- (void)DISABLED_testSignInCancelAddAccount {
+  // Add an identity to avoid arriving on the Add Account screen when opening
+  // sign-in.
+  ChromeIdentity* identity = [SigninEarlGreyUtils fakeIdentity1];
+  ios::FakeChromeIdentityService::GetInstanceFromChromeProvider()->AddIdentity(
+      identity);
+
+  [ChromeEarlGreyUI openSettingsMenu];
+  [ChromeEarlGreyUI tapSettingsMenuButton:SecondarySignInButton()];
+
+  // Open Add Account screen.
+  id<GREYMatcher> add_account_matcher =
+      chrome_test_util::StaticTextWithAccessibilityLabelId(
+          IDS_IOS_ACCOUNT_IDENTITY_CHOOSER_ADD_ACCOUNT);
+  [[EarlGrey selectElementWithMatcher:add_account_matcher]
+      performAction:grey_tap()];
+  [[GREYUIThreadExecutor sharedInstance] drainUntilIdle];
+
+  // Open new tab to cancel sign-in.
+  OpenNewTabCommand* command =
+      [OpenNewTabCommand commandWithURLFromChrome:GURL("about:blank")];
+  [chrome_test_util::DispatcherForActiveBrowserViewController()
+      openURLInNewTab:command];
+  // Wait until the page is opened.
+  [[GREYUIThreadExecutor sharedInstance] drainUntilIdle];
+
+  // Re-open the sign-in screen. If it wasn't correctly dismissed previously,
+  // this will fail.
+  [ChromeEarlGreyUI openSettingsMenu];
+  [ChromeEarlGreyUI tapSettingsMenuButton:SecondarySignInButton()];
+  [SigninEarlGreyUI selectIdentityWithEmail:identity.userEmail];
+  VerifyChromeSigninViewVisible();
+
+  // Close sign-in screen and Settings.
+  TapButtonWithLabelId(IDS_IOS_ACCOUNT_CONSISTENCY_SETUP_SKIP_BUTTON);
+  [[EarlGrey selectElementWithMatcher:SettingsDoneButton()]
+      performAction:grey_tap()];
+}
+
 @end
diff --git a/ios/chrome/browser/ui/signin_interaction/signin_interaction_controller_unity_egtest.mm b/ios/chrome/browser/ui/signin_interaction/signin_interaction_controller_unity_egtest.mm
deleted file mode 100644
index 158b951..0000000
--- a/ios/chrome/browser/ui/signin_interaction/signin_interaction_controller_unity_egtest.mm
+++ /dev/null
@@ -1,230 +0,0 @@
-// Copyright 2019 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.
-
-#import <EarlGrey/EarlGrey.h>
-#import <XCTest/XCTest.h>
-
-#include "base/auto_reset.h"
-#import "base/test/ios/wait_util.h"
-#import "ios/chrome/browser/ui/authentication/chrome_signin_view_controller.h"
-#import "ios/chrome/browser/ui/authentication/signin_earl_grey_ui.h"
-#import "ios/chrome/browser/ui/authentication/signin_earlgrey_utils.h"
-#import "ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_cell.h"
-#import "ios/chrome/browser/ui/commands/application_commands.h"
-#import "ios/chrome/browser/ui/commands/open_new_tab_command.h"
-#import "ios/chrome/browser/ui/signin_interaction/signin_interaction_controller_egtest_util.h"
-#include "ios/chrome/grit/ios_strings.h"
-#import "ios/chrome/test/app/chrome_test_util.h"
-#import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h"
-#import "ios/chrome/test/earl_grey/chrome_matchers.h"
-#import "ios/chrome/test/earl_grey/chrome_test_case.h"
-#import "ios/public/provider/chrome/browser/signin/fake_chrome_identity.h"
-#import "ios/public/provider/chrome/browser/signin/fake_chrome_identity_interaction_manager.h"
-#import "ios/public/provider/chrome/browser/signin/fake_chrome_identity_service.h"
-#import "ios/testing/earl_grey/matchers.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/l10n/l10n_util_mac.h"
-
-#if !defined(__has_feature) || !__has_feature(objc_arc)
-#error "This file requires ARC support."
-#endif
-
-using chrome_test_util::BookmarksNavigationBarDoneButton;
-using chrome_test_util::PrimarySignInButton;
-using chrome_test_util::SecondarySignInButton;
-using chrome_test_util::SettingsDoneButton;
-
-namespace {
-
-// Returns a matcher for |userEmail| in IdentityChooserViewController.
-id<GREYMatcher> identityChooserButtonMatcherWithEmail(NSString* userEmail) {
-  return grey_allOf(grey_accessibilityID(userEmail),
-                    grey_kindOfClass([IdentityChooserCell class]),
-                    grey_sufficientlyVisible(), nil);
-}
-
-}  // namespace
-
-// Sign-in interactions tests that require Unified Consent to be enabled.
-@interface SigninInteractionControllerUnityEnabledTestCase : ChromeTestCase
-@end
-
-@implementation SigninInteractionControllerUnityEnabledTestCase
-
-// Tests the "ADD ACCOUNT" button in the identity chooser view controller.
-- (void)testAddAccountAutomatically {
-  [ChromeEarlGreyUI openSettingsMenu];
-  [ChromeEarlGreyUI tapSettingsMenuButton:PrimarySignInButton()];
-  [[GREYUIThreadExecutor sharedInstance] drainUntilIdle];
-  // Tap on "ADD ACCOUNT".
-  [SigninEarlGreyUI tapAddAccountButton];
-  // Check for the fake SSO screen.
-  WaitForMatcher(grey_accessibilityID(kFakeAddAccountViewIdentifier));
-  // Close the SSO view controller.
-  id<GREYMatcher> matcher =
-      grey_allOf(chrome_test_util::ButtonWithAccessibilityLabel(@"Cancel"),
-                 grey_sufficientlyVisible(), nil);
-  [[EarlGrey selectElementWithMatcher:matcher] performAction:grey_tap()];
-  // Make sure the SSO view controller is fully removed before ending the test.
-  // The tear down needs to remove other view controllers, and it cannot be done
-  // during the animation of the SSO view controler.
-  [[GREYUIThreadExecutor sharedInstance] drainUntilIdle];
-}
-
-// Tests to remove the last identity in the identity chooser.
-- (void)testRemoveLastAccount {
-  // Set up a fake identity.
-  ChromeIdentity* identity = [SigninEarlGreyUtils fakeIdentity1];
-  ios::FakeChromeIdentityService::GetInstanceFromChromeProvider()->AddIdentity(
-      identity);
-
-  // Open the identity chooser.
-  [ChromeEarlGreyUI openSettingsMenu];
-  [ChromeEarlGreyUI tapSettingsMenuButton:SecondarySignInButton()];
-  WaitForMatcher(identityChooserButtonMatcherWithEmail(identity.userEmail));
-
-  // Remove the fake identity.
-  ios::FakeChromeIdentityService::GetInstanceFromChromeProvider()
-      ->RemoveIdentity(identity);
-  [[GREYUIThreadExecutor sharedInstance] drainUntilIdle];
-
-  // Check that the identity has been removed.
-  [[EarlGrey selectElementWithMatcher:identityChooserButtonMatcherWithEmail(
-                                          identity.userEmail)]
-      assertWithMatcher:grey_notVisible()];
-}
-
-// Tests signing in with one account, switching sync account to a second and
-// choosing to keep the browsing data separate during the switch.
-- (void)testSignInSwitchAccountsAndKeepDataSeparate {
-  // The ChromeSigninView's activity indicator must be hidden as the import
-  // data UI is presented on top of the activity indicator and Earl Grey cannot
-  // interact with any UI while an animation is active.
-  std::unique_ptr<base::AutoReset<BOOL>> hideActivityMonitor =
-      [ChromeSigninViewController hideActivityIndicatorForTesting];
-
-  // Set up the fake identities.
-  ios::FakeChromeIdentityService* identity_service =
-      ios::FakeChromeIdentityService::GetInstanceFromChromeProvider();
-  ChromeIdentity* identity1 = [SigninEarlGreyUtils fakeIdentity1];
-  ChromeIdentity* identity2 = [SigninEarlGreyUtils fakeIdentity2];
-  identity_service->AddIdentity(identity1);
-  identity_service->AddIdentity(identity2);
-
-  [SigninEarlGreyUI signinWithIdentity:identity1];
-  [SigninEarlGreyUI signOutWithManagedAccount:NO];
-
-  // Sign in with |identity2|.
-  [ChromeEarlGreyUI openSettingsMenu];
-  [[EarlGrey selectElementWithMatcher:SecondarySignInButton()]
-      performAction:grey_tap()];
-  [SigninEarlGreyUI selectIdentityWithEmail:identity2.userEmail];
-  [SigninEarlGreyUI confirmSigninConfirmationDialog];
-
-  // Switch Sync account to |identity2| should ask whether date should be
-  // imported or kept separate. Choose to keep data separate.
-  [[EarlGrey selectElementWithMatcher:
-                 chrome_test_util::SettingsImportDataKeepSeparateButton()]
-      performAction:grey_tap()];
-
-  [[EarlGrey selectElementWithMatcher:chrome_test_util::
-                                          SettingsImportDataContinueButton()]
-      performAction:grey_tap()];
-
-  // Check the signed-in user did change.
-  [SigninEarlGreyUtils checkSignedInWithIdentity:identity2];
-
-  [[EarlGrey selectElementWithMatcher:SettingsDoneButton()]
-      performAction:grey_tap()];
-}
-
-// Tests signing in with one account, switching sync account to a second and
-// choosing to import the browsing data during the switch.
-- (void)testSignInSwitchAccountsAndImportData {
-  // The ChromeSigninView's activity indicator must be hidden as the import
-  // data UI is presented on top of the activity indicator and Earl Grey cannot
-  // interact with any UI while an animation is active.
-  std::unique_ptr<base::AutoReset<BOOL>> hideActivityMonitor =
-      [ChromeSigninViewController hideActivityIndicatorForTesting];
-
-  // Set up the fake identities.
-  ios::FakeChromeIdentityService* identity_service =
-      ios::FakeChromeIdentityService::GetInstanceFromChromeProvider();
-  ChromeIdentity* identity1 = [SigninEarlGreyUtils fakeIdentity1];
-  ChromeIdentity* identity2 = [SigninEarlGreyUtils fakeIdentity2];
-  identity_service->AddIdentity(identity1);
-  identity_service->AddIdentity(identity2);
-
-  // Sign in to |identity1|.
-  [SigninEarlGreyUI signinWithIdentity:identity1];
-  [SigninEarlGreyUI signOutWithManagedAccount:NO];
-
-  // Sign in with |identity2|.
-  [ChromeEarlGreyUI openSettingsMenu];
-  [[EarlGrey selectElementWithMatcher:SecondarySignInButton()]
-      performAction:grey_tap()];
-  [SigninEarlGreyUI selectIdentityWithEmail:identity2.userEmail];
-  [SigninEarlGreyUI confirmSigninConfirmationDialog];
-
-  // Switch Sync account to |identity2| should ask whether date should be
-  // imported or kept separate. Choose to import the data.
-  [[EarlGrey selectElementWithMatcher:chrome_test_util::
-                                          SettingsImportDataImportButton()]
-      performAction:grey_tap()];
-  [[EarlGrey selectElementWithMatcher:chrome_test_util::
-                                          SettingsImportDataContinueButton()]
-      performAction:grey_tap()];
-
-  // Check the signed-in user did change.
-  [SigninEarlGreyUtils checkSignedInWithIdentity:identity2];
-
-  [[EarlGrey selectElementWithMatcher:SettingsDoneButton()]
-      performAction:grey_tap()];
-}
-
-// Opens the add account screen and then cancels it by opening a new tab.
-// Ensures that the add account screen is correctly dismissed. crbug.com/462200
-//
-// TODO(crbug.com/962847): This test crashes when the the add account screen
-// is dismissed.
-- (void)DISABLED_testSignInCancelAddAccount {
-  // Add an identity to avoid arriving on the Add Account screen when opening
-  // sign-in.
-  ChromeIdentity* identity = [SigninEarlGreyUtils fakeIdentity1];
-  ios::FakeChromeIdentityService::GetInstanceFromChromeProvider()->AddIdentity(
-      identity);
-
-  [ChromeEarlGreyUI openSettingsMenu];
-  [ChromeEarlGreyUI tapSettingsMenuButton:SecondarySignInButton()];
-
-  // Open Add Account screen.
-  id<GREYMatcher> add_account_matcher =
-      chrome_test_util::StaticTextWithAccessibilityLabelId(
-          IDS_IOS_ACCOUNT_IDENTITY_CHOOSER_ADD_ACCOUNT);
-  [[EarlGrey selectElementWithMatcher:add_account_matcher]
-      performAction:grey_tap()];
-  [[GREYUIThreadExecutor sharedInstance] drainUntilIdle];
-
-  // Open new tab to cancel sign-in.
-  OpenNewTabCommand* command =
-      [OpenNewTabCommand commandWithURLFromChrome:GURL("about:blank")];
-  [chrome_test_util::DispatcherForActiveBrowserViewController()
-      openURLInNewTab:command];
-  // Wait until the page is opened.
-  [[GREYUIThreadExecutor sharedInstance] drainUntilIdle];
-
-  // Re-open the sign-in screen. If it wasn't correctly dismissed previously,
-  // this will fail.
-  [ChromeEarlGreyUI openSettingsMenu];
-  [ChromeEarlGreyUI tapSettingsMenuButton:SecondarySignInButton()];
-  [SigninEarlGreyUI selectIdentityWithEmail:identity.userEmail];
-  VerifyChromeSigninViewVisible();
-
-  // Close sign-in screen and Settings.
-  TapButtonWithLabelId(IDS_IOS_ACCOUNT_CONSISTENCY_SETUP_SKIP_BUTTON);
-  [[EarlGrey selectElementWithMatcher:SettingsDoneButton()]
-      performAction:grey_tap()];
-}
-
-@end
diff --git a/ios/chrome/test/earl_grey/BUILD.gn b/ios/chrome/test/earl_grey/BUILD.gn
index 560a82c..9640979 100644
--- a/ios/chrome/test/earl_grey/BUILD.gn
+++ b/ios/chrome/test/earl_grey/BUILD.gn
@@ -240,6 +240,8 @@
     "//ios/chrome/browser/ui:feature_flags",
     "//ios/chrome/browser/ui/authentication:authentication",
     "//ios/chrome/browser/ui/authentication/cells",
+    "//ios/chrome/browser/ui/autofill/manual_fill",
+    "//ios/chrome/browser/ui/autofill/manual_fill:manual_fill_ui",
     "//ios/chrome/browser/ui/bookmarks:bookmarks_ui",
     "//ios/chrome/browser/ui/collection_view/cells",
     "//ios/chrome/browser/ui/commands:commands",
@@ -261,6 +263,7 @@
     "//ios/chrome/browser/ui/settings/clear_browsing_data",
     "//ios/chrome/browser/ui/settings/credit_card_scanner",
     "//ios/chrome/browser/ui/settings/google_services",
+    "//ios/chrome/browser/ui/settings/password",
     "//ios/chrome/browser/ui/settings/sync",
     "//ios/chrome/browser/ui/static_content",
     "//ios/chrome/browser/ui/tab_grid:tab_grid_ui_constants",
@@ -358,9 +361,13 @@
     "//ios/chrome/browser/autofill",
     "//ios/chrome/browser/autofill/automation:eg_app_support+eg2",
     "//ios/chrome/browser/content_settings:content_settings",
+    "//ios/chrome/browser/device_sharing:eg_app_support+eg2",
     "//ios/chrome/browser/ntp:features",
     "//ios/chrome/browser/ui:feature_flags",
     "//ios/chrome/browser/ui/authentication/cells",
+    "//ios/chrome/browser/ui/autofill:eg_app_support+eg2",
+    "//ios/chrome/browser/ui/autofill/manual_fill",
+    "//ios/chrome/browser/ui/autofill/manual_fill:manual_fill_ui",
     "//ios/chrome/browser/ui/bookmarks:bookmarks_ui",
     "//ios/chrome/browser/ui/content_suggestions:content_suggestions_constant",
     "//ios/chrome/browser/ui/content_suggestions:content_suggestions_ui",
@@ -380,6 +387,7 @@
     "//ios/chrome/browser/ui/settings/clear_browsing_data",
     "//ios/chrome/browser/ui/settings/credit_card_scanner",
     "//ios/chrome/browser/ui/settings/google_services",
+    "//ios/chrome/browser/ui/settings/password",
     "//ios/chrome/browser/ui/settings/sync",
     "//ios/chrome/browser/ui/static_content",
     "//ios/chrome/browser/ui/tab_grid:tab_grid_ui_constants",
diff --git a/ios/chrome/test/earl_grey/chrome_earl_grey.h b/ios/chrome/test/earl_grey/chrome_earl_grey.h
index 8a19271..2211cb5 100644
--- a/ios/chrome/test/earl_grey/chrome_earl_grey.h
+++ b/ios/chrome/test/earl_grey/chrome_earl_grey.h
@@ -45,6 +45,11 @@
 - (void)rotateDeviceToOrientation:(UIDeviceOrientation)deviceOrientation
                             error:(NSError**)error;
 
+// Returns |YES| if the keyboard is on screen. |error| is only supported if the
+// test is running in EG2.
+// TODO(crbug.com/1017281): Remove along EG1 support.
+- (BOOL)isKeyboardShownWithError:(NSError**)error;
+
 // Returns YES if running on an iPad.
 - (BOOL)isIPadIdiom;
 
diff --git a/ios/chrome/test/earl_grey/chrome_earl_grey.mm b/ios/chrome/test/earl_grey/chrome_earl_grey.mm
index 67abe355..710aeb9 100644
--- a/ios/chrome/test/earl_grey/chrome_earl_grey.mm
+++ b/ios/chrome/test/earl_grey/chrome_earl_grey.mm
@@ -81,6 +81,17 @@
 #endif
 }
 
+- (BOOL)isKeyboardShownWithError:(NSError**)error {
+  return
+#if defined(CHROME_EARL_GREY_1)
+      [GREYKeyboard isKeyboardShown];
+#elif defined(CHROME_EARL_GREY_2)
+      [EarlGrey isKeyboardShownWithError:error];
+#else
+#error Neither CHROME_EARL_GREY_1 nor CHROME_EARL_GREY_2 are defined
+#endif
+}
+
 - (BOOL)isIPadIdiom {
 #if defined(CHROME_EARL_GREY_1)
   UIUserInterfaceIdiom idiom = [[UIDevice currentDevice] userInterfaceIdiom];
diff --git a/ios/chrome/test/earl_grey/chrome_matchers.h b/ios/chrome/test/earl_grey/chrome_matchers.h
index 60a2b1a..a4dde48d 100644
--- a/ios/chrome/test/earl_grey/chrome_matchers.h
+++ b/ios/chrome/test/earl_grey/chrome_matchers.h
@@ -59,6 +59,9 @@
 // Returns matcher for a cancel button.
 id<GREYMatcher> CancelButton();
 
+// Returns the matcher for an enabled cancel button in a navigation bar.
+id<GREYMatcher> NavigationBarCancelButton();
+
 // Returns matcher for a close button.
 id<GREYMatcher> CloseButton();
 
@@ -364,6 +367,64 @@
 // Returns the GREYMatcher for the button to close the cell at |index| in the
 // tab grid.
 id<GREYMatcher> TabGridCloseButtonForCellAtIndex(unsigned int index);
-}
+
+// Returns a matcher for the password settings collection view.
+id<GREYMatcher> SettingsPasswordMatcher();
+
+// Returns a matcher for the search bar in password settings.
+id<GREYMatcher> SettingsPasswordSearchMatcher();
+
+// Returns a matcher for the profiles settings collection view.
+id<GREYMatcher> SettingsProfileMatcher();
+
+#pragma mark - Manual Fallback
+
+// Returns a matcher for the scroll view in keyboard accessory bar.
+id<GREYMatcher> ManualFallbackFormSuggestionViewMatcher();
+
+// Returns a matcher for the keyboard icon in the keyboard accessory bar.
+id<GREYMatcher> ManualFallbackKeyboardIconMatcher();
+
+// Returns a matcher for the password icon in the keyboard accessory bar.
+id<GREYMatcher> ManualFallbackPasswordIconMatcher();
+
+// Returns a matcher for the password table view in manual fallback.
+id<GREYMatcher> ManualFallbackPasswordTableViewMatcher();
+
+// Returns a matcher for the password search bar in manual fallback.
+id<GREYMatcher> ManualFallbackPasswordSearchBarMatcher();
+
+// Returns a matcher for the button to open password settings in manual
+// fallback.
+id<GREYMatcher> ManualFallbackManagePasswordsMatcher();
+
+// Returns a matcher for the button to open all passwords in manual fallback.
+id<GREYMatcher> ManualFallbackOtherPasswordsMatcher();
+
+// Returns a matcher for the button to dismiss all passwords in manual fallback.
+id<GREYMatcher> ManualFallbackOtherPasswordsDismissMatcher();
+
+// Returns a matcher for the a password in the manual fallback list.
+id<GREYMatcher> ManualFallbackPasswordButtonMatcher();
+
+// Returns a matcher for the PasswordTableView window.
+id<GREYMatcher> ManualFallbackPasswordTableViewWindowMatcher();
+
+// Returns a matcher for the profiles icon in the keyboard accessory bar.
+id<GREYMatcher> ManualFallbackProfilesIconMatcher();
+
+// Returns a matcher for the profiles table view in manual fallback.
+id<GREYMatcher> ManualFallbackProfilesTableViewMatcher();
+// Returns a matcher for the button to open profile settings in manual
+// fallback.
+id<GREYMatcher> ManualFallbackManageProfilesMatcher();
+
+// Returns a matcher for the profiles settings collection view.
+id<GREYMatcher> SettingsProfileMatcher();
+
+// Returns a matcher for the ProfileTableView window.
+id<GREYMatcher> ManualFallbackProfileTableViewWindowMatcher();
+
+}  // namespace chrome_test_util
 
 #endif  // IOS_CHROME_TEST_EARL_GREY_CHROME_MATCHERS_H_
diff --git a/ios/chrome/test/earl_grey/chrome_matchers.mm b/ios/chrome/test/earl_grey/chrome_matchers.mm
index 9c8b7019..3da7c3ec 100644
--- a/ios/chrome/test/earl_grey/chrome_matchers.mm
+++ b/ios/chrome/test/earl_grey/chrome_matchers.mm
@@ -73,6 +73,10 @@
   return [ChromeMatchersAppInterface cancelButton];
 }
 
+id<GREYMatcher> NavigationBarCancelButton() {
+  return [ChromeMatchersAppInterface navigationBarCancelButton];
+}
+
 id<GREYMatcher> CloseButton() {
   return [ChromeMatchersAppInterface closeButton];
 }
@@ -455,4 +459,77 @@
   return [ChromeMatchersAppInterface tabGridCloseButtonForCellAtIndex:index];
 }
 
+id<GREYMatcher> SettingsPasswordMatcher() {
+  return [ChromeMatchersAppInterface settingsPasswordMatcher];
+}
+
+id<GREYMatcher> SettingsPasswordSearchMatcher() {
+  return [ChromeMatchersAppInterface settingsPasswordSearchMatcher];
+}
+
+id<GREYMatcher> SettingsProfileMatcher() {
+  return [ChromeMatchersAppInterface settingsProfileMatcher];
+}
+
+#pragma mark - Manual Fallback
+
+id<GREYMatcher> ManualFallbackFormSuggestionViewMatcher() {
+  return [ChromeMatchersAppInterface manualFallbackFormSuggestionViewMatcher];
+}
+
+id<GREYMatcher> ManualFallbackKeyboardIconMatcher() {
+  return [ChromeMatchersAppInterface manualFallbackKeyboardIconMatcher];
+}
+
+id<GREYMatcher> ManualFallbackPasswordIconMatcher() {
+  return [ChromeMatchersAppInterface manualFallbackPasswordIconMatcher];
+}
+
+id<GREYMatcher> ManualFallbackPasswordTableViewMatcher() {
+  return [ChromeMatchersAppInterface manualFallbackPasswordTableViewMatcher];
+}
+
+id<GREYMatcher> ManualFallbackPasswordSearchBarMatcher() {
+  return [ChromeMatchersAppInterface manualFallbackPasswordSearchBarMatcher];
+}
+
+id<GREYMatcher> ManualFallbackManagePasswordsMatcher() {
+  return [ChromeMatchersAppInterface manualFallbackManagePasswordsMatcher];
+}
+
+id<GREYMatcher> ManualFallbackOtherPasswordsMatcher() {
+  return [ChromeMatchersAppInterface manualFallbackOtherPasswordsMatcher];
+}
+
+id<GREYMatcher> ManualFallbackOtherPasswordsDismissMatcher() {
+  return
+      [ChromeMatchersAppInterface manualFallbackOtherPasswordsDismissMatcher];
+}
+
+id<GREYMatcher> ManualFallbackPasswordButtonMatcher() {
+  return [ChromeMatchersAppInterface manualFallbackPasswordButtonMatcher];
+}
+
+id<GREYMatcher> ManualFallbackPasswordTableViewWindowMatcher() {
+  return
+      [ChromeMatchersAppInterface manualFallbackPasswordTableViewWindowMatcher];
+}
+
+id<GREYMatcher> ManualFallbackProfilesIconMatcher() {
+  return [ChromeMatchersAppInterface manualFallbackProfilesIconMatcher];
+}
+
+id<GREYMatcher> ManualFallbackProfilesTableViewMatcher() {
+  return [ChromeMatchersAppInterface manualFallbackProfilesTableViewMatcher];
+}
+
+id<GREYMatcher> ManualFallbackManageProfilesMatcher() {
+  return [ChromeMatchersAppInterface manualFallbackManageProfilesMatcher];
+}
+
+id<GREYMatcher> ManualFallbackProfileTableViewWindowMatcher() {
+  return
+      [ChromeMatchersAppInterface manualFallbackProfileTableViewWindowMatcher];
+}
+
 }  // namespace chrome_test_util
diff --git a/ios/chrome/test/earl_grey/chrome_matchers_app_interface.h b/ios/chrome/test/earl_grey/chrome_matchers_app_interface.h
index 2576257..19d65e2 100644
--- a/ios/chrome/test/earl_grey/chrome_matchers_app_interface.h
+++ b/ios/chrome/test/earl_grey/chrome_matchers_app_interface.h
@@ -62,6 +62,9 @@
 // Returns matcher for a cancel button.
 + (id<GREYMatcher>)cancelButton;
 
+// Returns the matcher for an enabled cancel button in a navigation bar.
++ (id<GREYMatcher>)navigationBarCancelButton;
+
 // Returns matcher for a close button.
 + (id<GREYMatcher>)closeButton;
 
@@ -370,6 +373,60 @@
 // tab grid.
 + (id<GREYMatcher>)tabGridCloseButtonForCellAtIndex:(unsigned int)index;
 
+// Returns a matcher for the password settings collection view.
++ (id<GREYMatcher>)settingsPasswordMatcher;
+
+// Returns a matcher for the search bar in password settings.
++ (id<GREYMatcher>)settingsPasswordSearchMatcher;
+
+// Returns a matcher for the profiles settings collection view.
++ (id<GREYMatcher>)settingsProfileMatcher;
+
+#pragma mark - Manual Fallback
+
+// Returns a matcher for the scroll view in keyboard accessory bar.
++ (id<GREYMatcher>)manualFallbackFormSuggestionViewMatcher;
+
+// Returns a matcher for the keyboard icon in the keyboard accessory bar.
++ (id<GREYMatcher>)manualFallbackKeyboardIconMatcher;
+
+// Returns a matcher for the password icon in the keyboard accessory bar.
++ (id<GREYMatcher>)manualFallbackPasswordIconMatcher;
+
+// Returns a matcher for the password table view in manual fallback.
++ (id<GREYMatcher>)manualFallbackPasswordTableViewMatcher;
+
+// Returns a matcher for the password search bar in manual fallback.
++ (id<GREYMatcher>)manualFallbackPasswordSearchBarMatcher;
+
+// Returns a matcher for the button to open password settings in manual
+// fallback.
++ (id<GREYMatcher>)manualFallbackManagePasswordsMatcher;
+
+// Returns a matcher for the button to open all passwords in manual fallback.
++ (id<GREYMatcher>)manualFallbackOtherPasswordsMatcher;
+
+// Returns a matcher for the button to dismiss all passwords in manual fallback.
++ (id<GREYMatcher>)manualFallbackOtherPasswordsDismissMatcher;
+
+// Returns a matcher for the a password in the manual fallback list.
++ (id<GREYMatcher>)manualFallbackPasswordButtonMatcher;
+
+// Returns a matcher for the PasswordTableView window.
++ (id<GREYMatcher>)manualFallbackPasswordTableViewWindowMatcher;
+
+// Returns a matcher for the profiles icon in the keyboard accessory bar.
++ (id<GREYMatcher>)manualFallbackProfilesIconMatcher;
+
+// Returns a matcher for the profiles table view in manual fallback.
++ (id<GREYMatcher>)manualFallbackProfilesTableViewMatcher;
+// Returns a matcher for the button to open profile settings in manual
+// fallback.
++ (id<GREYMatcher>)manualFallbackManageProfilesMatcher;
+
+// Returns a matcher for the ProfileTableView window.
++ (id<GREYMatcher>)manualFallbackProfileTableViewWindowMatcher;
+
 @end
 
 #endif  // IOS_CHROME_TEST_EARL_GREY_CHROME_MATCHERS_APP_INTERFACE_H_
diff --git a/ios/chrome/test/earl_grey/chrome_matchers_app_interface.mm b/ios/chrome/test/earl_grey/chrome_matchers_app_interface.mm
index 918ab33..1a9ab8e2 100644
--- a/ios/chrome/test/earl_grey/chrome_matchers_app_interface.mm
+++ b/ios/chrome/test/earl_grey/chrome_matchers_app_interface.mm
@@ -7,8 +7,14 @@
 #include "base/mac/foundation_util.h"
 #include "base/strings/sys_string_conversions.h"
 #include "components/strings/grit/components_strings.h"
-#include "components/unified_consent/feature.h"
+#import "ios/chrome/browser/autofill/form_suggestion_constants.h"
 #import "ios/chrome/browser/ui/authentication/cells/signin_promo_view.h"
+#import "ios/chrome/browser/ui/autofill/manual_fill/address_mediator.h"
+#import "ios/chrome/browser/ui/autofill/manual_fill/address_view_controller.h"
+#import "ios/chrome/browser/ui/autofill/manual_fill/manual_fill_accessory_view_controller.h"
+#import "ios/chrome/browser/ui/autofill/manual_fill/manual_fill_password_cell.h"
+#import "ios/chrome/browser/ui/autofill/manual_fill/manual_fill_password_mediator.h"
+#import "ios/chrome/browser/ui/autofill/manual_fill/password_view_controller.h"
 #import "ios/chrome/browser/ui/bookmarks/bookmark_ui_constants.h"
 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.h"
 #import "ios/chrome/browser/ui/content_suggestions/ntp_home_constant.h"
@@ -23,6 +29,7 @@
 #import "ios/chrome/browser/ui/recent_tabs/recent_tabs_constants.h"
 #import "ios/chrome/browser/ui/settings/autofill/autofill_add_credit_card_view_controller.h"
 #import "ios/chrome/browser/ui/settings/autofill/autofill_credit_card_table_view_controller.h"
+#import "ios/chrome/browser/ui/settings/autofill/autofill_profile_table_view_controller.h"
 #import "ios/chrome/browser/ui/settings/cells/clear_browsing_data_constants.h"
 #import "ios/chrome/browser/ui/settings/cells/settings_switch_cell.h"
 #import "ios/chrome/browser/ui/settings/cells/settings_switch_item.h"
@@ -32,6 +39,7 @@
 #import "ios/chrome/browser/ui/settings/google_services/accounts_table_view_controller.h"
 #import "ios/chrome/browser/ui/settings/google_services/advanced_signin_settings_coordinator.h"
 #import "ios/chrome/browser/ui/settings/import_data_table_view_controller.h"
+#import "ios/chrome/browser/ui/settings/password/passwords_table_view_controller.h"
 #import "ios/chrome/browser/ui/settings/privacy_table_view_controller.h"
 #import "ios/chrome/browser/ui/settings/settings_table_view_controller.h"
 #import "ios/chrome/browser/ui/static_content/static_html_view_controller.h"
@@ -223,6 +231,13 @@
       [ChromeMatchersAppInterface buttonWithAccessibilityLabelID:(IDS_CANCEL)];
 }
 
++ (id<GREYMatcher>)navigationBarCancelButton {
+  return grey_allOf(
+      grey_ancestor(grey_kindOfClass([UINavigationBar class])),
+      [self cancelButton],
+      grey_not(grey_accessibilityTrait(UIAccessibilityTraitNotEnabled)), nil);
+}
+
 + (id<GREYMatcher>)closeButton {
   return grey_allOf(
       [ChromeMatchersAppInterface buttonWithAccessibilityLabelID:(IDS_CLOSE)],
@@ -721,4 +736,89 @@
       grey_sufficientlyVisible(), nil);
 }
 
++ (id<GREYMatcher>)settingsPasswordMatcher {
+  return grey_accessibilityID(kPasswordsTableViewId);
+}
+
++ (id<GREYMatcher>)settingsPasswordSearchMatcher {
+  return grey_accessibilityID(kPasswordsSearchBarId);
+}
+
++ (id<GREYMatcher>)settingsProfileMatcher {
+  return grey_accessibilityID(kAutofillProfileTableViewID);
+}
+
+#pragma mark - Manual Fallback
+
++ (id<GREYMatcher>)manualFallbackFormSuggestionViewMatcher {
+  return grey_accessibilityID(kFormSuggestionsViewAccessibilityIdentifier);
+}
+
++ (id<GREYMatcher>)manualFallbackPasswordIconMatcher {
+  return grey_accessibilityID(
+      manual_fill::AccessoryPasswordAccessibilityIdentifier);
+}
+
++ (id<GREYMatcher>)manualFallbackKeyboardIconMatcher {
+  return grey_accessibilityID(
+      manual_fill::AccessoryKeyboardAccessibilityIdentifier);
+}
+
++ (id<GREYMatcher>)manualFallbackPasswordTableViewMatcher {
+  return grey_accessibilityID(
+      manual_fill::kPasswordTableViewAccessibilityIdentifier);
+}
+
++ (id<GREYMatcher>)manualFallbackPasswordSearchBarMatcher {
+  return grey_accessibilityID(
+      manual_fill::kPasswordSearchBarAccessibilityIdentifier);
+}
+
++ (id<GREYMatcher>)manualFallbackManagePasswordsMatcher {
+  return grey_accessibilityID(
+      manual_fill::ManagePasswordsAccessibilityIdentifier);
+}
+
++ (id<GREYMatcher>)manualFallbackOtherPasswordsMatcher {
+  return grey_accessibilityID(
+      manual_fill::OtherPasswordsAccessibilityIdentifier);
+}
+
++ (id<GREYMatcher>)manualFallbackOtherPasswordsDismissMatcher {
+  return grey_accessibilityID(
+      manual_fill::kPasswordDoneButtonAccessibilityIdentifier);
+}
+
++ (id<GREYMatcher>)manualFallbackPasswordButtonMatcher {
+  return grey_buttonTitle(kMaskedPasswordTitle);
+}
+
++ (id<GREYMatcher>)manualFallbackPasswordTableViewWindowMatcher {
+  id<GREYMatcher> classMatcher = grey_kindOfClass([UIWindow class]);
+  id<GREYMatcher> parentMatcher =
+      grey_descendant([self manualFallbackPasswordTableViewMatcher]);
+  return grey_allOf(classMatcher, parentMatcher, nil);
+}
+
++ (id<GREYMatcher>)manualFallbackProfilesIconMatcher {
+  return grey_accessibilityID(
+      manual_fill::AccessoryAddressAccessibilityIdentifier);
+}
+
++ (id<GREYMatcher>)manualFallbackProfilesTableViewMatcher {
+  return grey_accessibilityID(
+      manual_fill::AddressTableViewAccessibilityIdentifier);
+}
+
++ (id<GREYMatcher>)manualFallbackManageProfilesMatcher {
+  return grey_accessibilityID(
+      manual_fill::ManageAddressAccessibilityIdentifier);
+}
+
++ (id<GREYMatcher>)manualFallbackProfileTableViewWindowMatcher {
+  id<GREYMatcher> classMatcher = grey_kindOfClass([UIWindow class]);
+  id<GREYMatcher> parentMatcher =
+      grey_descendant([self manualFallbackProfilesTableViewMatcher]);
+  return grey_allOf(classMatcher, parentMatcher, nil);
+}
 @end
diff --git a/ios/chrome/test/earl_grey2/BUILD.gn b/ios/chrome/test/earl_grey2/BUILD.gn
index 9698ed9a..3bf62c6 100644
--- a/ios/chrome/test/earl_grey2/BUILD.gn
+++ b/ios/chrome/test/earl_grey2/BUILD.gn
@@ -33,7 +33,9 @@
   xcode_test_application_name = "ios_chrome_eg2tests"
 
   deps = [
+    "//ios/chrome/browser/device_sharing:eg2_tests",
     "//ios/chrome/browser/ntp_tiles:eg2_tests",
+    "//ios/chrome/browser/prerender:eg2_tests",
   ]
 }
 
@@ -58,6 +60,7 @@
 
   deps = [
     "//ios/chrome/browser/ui/activity_services:eg2_tests",
+    "//ios/chrome/browser/ui/autofill/manual_fill:eg2_tests",
     "//ios/chrome/browser/ui/content_suggestions:eg2_tests",
     "//ios/chrome/browser/ui/download:eg2_tests",
     "//ios/chrome/browser/ui/integration_tests:eg2_tests",
diff --git a/ios/showcase/badges/sc_badge_coordinator.mm b/ios/showcase/badges/sc_badge_coordinator.mm
index f28ba73..d96b02a 100644
--- a/ios/showcase/badges/sc_badge_coordinator.mm
+++ b/ios/showcase/badges/sc_badge_coordinator.mm
@@ -118,6 +118,9 @@
 - (void)saveCardBadgeButtonTapped:(id)sender {
 }
 
+- (void)translateBadgeButtonTapped:(id)sender {
+}
+
 - (void)overflowBadgeButtonTapped:(id)sender {
   self.badgePopupMenuCoordinator = [[BadgePopupMenuCoordinator alloc]
       initWithBaseViewController:self.containerViewController];
diff --git a/ios/testing/earl_grey/BUILD.gn b/ios/testing/earl_grey/BUILD.gn
index a7a3db42..16e0d5e 100644
--- a/ios/testing/earl_grey/BUILD.gn
+++ b/ios/testing/earl_grey/BUILD.gn
@@ -31,6 +31,8 @@
     "earl_grey_app.mm",
     "earl_grey_test.h",
     "earl_grey_test.mm",
+    "keyboard_app_interface.h",
+    "keyboard_app_interface.mm",
     "matchers.h",
     "matchers.mm",
   ]
@@ -43,6 +45,7 @@
 
   deps = [
     "//base/test:test_support",
+    "//build/config/ios:xctest",
     "//ios/third_party/earl_grey2:app_framework+link",
     "//testing/gtest:gtest",
   ]
@@ -54,6 +57,8 @@
     "coverage_utils.mm",
     "earl_grey_app.h",
     "earl_grey_app.mm",
+    "keyboard_app_interface.h",
+    "keyboard_app_interface.mm",
   ]
 }
 
@@ -78,6 +83,7 @@
     "disabled_test_macros.h",
     "earl_grey_test.h",
     "earl_grey_test.mm",
+    "keyboard_app_interface.h",
     "matchers.h",
     "matchers.mm",
   ]
diff --git a/ios/testing/earl_grey/earl_grey_app.h b/ios/testing/earl_grey/earl_grey_app.h
index 710616f..7f453fd7 100644
--- a/ios/testing/earl_grey/earl_grey_app.h
+++ b/ios/testing/earl_grey/earl_grey_app.h
@@ -13,6 +13,8 @@
 #if defined(CHROME_EARL_GREY_1)
 
 #import <EarlGrey/EarlGrey.h>
+#import <EarlGrey/GREYAppleInternals.h>
+#import <EarlGrey/GREYKeyboard.h>
 
 typedef DescribeToBlock GREYDescribeToBlock;
 typedef MatchesBlock GREYMatchesBlock;
@@ -30,6 +32,7 @@
 #import <AppFramework/Matcher/GREYMatchersShorthand.h>
 #import <AppFramework/Synchronization/GREYSyncAPI.h>
 #import <CommonLib/Error/GREYErrorConstants.h>
+#import <CommonLib/GREYAppleInternals.h>
 
 #else
 #error Must define either CHROME_EARL_GREY_1 or CHROME_EARL_GREY_2.
diff --git a/ios/testing/earl_grey/earl_grey_test.h b/ios/testing/earl_grey/earl_grey_test.h
index c9db3d8..a69640c0 100644
--- a/ios/testing/earl_grey/earl_grey_test.h
+++ b/ios/testing/earl_grey/earl_grey_test.h
@@ -11,6 +11,7 @@
 #if defined(CHROME_EARL_GREY_1)
 
 #import <EarlGrey/EarlGrey.h>
+#import <EarlGrey/GREYKeyboard.h>
 
 typedef DescribeToBlock GREYDescribeToBlock;
 typedef MatchesBlock GREYMatchesBlock;
diff --git a/ios/testing/earl_grey/keyboard_app_interface.h b/ios/testing/earl_grey/keyboard_app_interface.h
new file mode 100644
index 0000000..9bd53eb
--- /dev/null
+++ b/ios/testing/earl_grey/keyboard_app_interface.h
@@ -0,0 +1,37 @@
+// Copyright 2019 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 IOS_TESTING_EARL_GREY_KEYBOARD_APP_INTERFACE_H_
+#define IOS_TESTING_EARL_GREY_KEYBOARD_APP_INTERFACE_H_
+
+#import <UIKit/UIKit.h>
+
+@protocol GREYAction;
+@protocol GREYMatcher;
+
+// KeyboardAppInterface contains helpers for interacting with the keyboard.
+// These are compiled into the app binary and can be called from either app or
+// test code.
+@interface KeyboardAppInterface : NSObject
+
+// Return a boolean indicating if the keyboard is docked.
++ (BOOL)isKeyboadDocked;
+
+// Matcher for the Keyboard Window.
++ (id<GREYMatcher>)keyboardWindowMatcher;
+
+// Swipe action to undock the keyboard.
++ (id<GREYAction>)keyboardUndockAction;
+
+// Swipe action to dock the keyboard.
++ (id<GREYAction>)keyboardDockAction;
+
+// If the keyboard is not present this will add a text field to the hierarchy,
+// make it first responder and return it. If it is already present, this does
+// nothing and returns nil.
++ (UITextField*)showKeyboard;
+
+@end
+
+#endif  // IOS_TESTING_EARL_GREY_KEYBOARD_APP_INTERFACE_H_
diff --git a/ios/testing/earl_grey/keyboard_app_interface.mm b/ios/testing/earl_grey/keyboard_app_interface.mm
new file mode 100644
index 0000000..6f72da9f
--- /dev/null
+++ b/ios/testing/earl_grey/keyboard_app_interface.mm
@@ -0,0 +1,169 @@
+// Copyright 2019 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.
+
+#import "ios/testing/earl_grey/keyboard_app_interface.h"
+
+#import <UIKit/UIKit.h>
+#include <atomic>
+
+#import "base/test/ios/wait_util.h"
+#import "ios/testing/earl_grey/earl_grey_app.h"
+
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
+namespace {
+
+// EarlGrey fails to detect undocked keyboards on screen, so this help check
+// for them.
+static std::atomic_bool gCHRIsKeyboardShown(false);
+
+// Returns the dismiss key if present in the passed keyboard layout. Returns nil
+// if not found.
+UIAccessibilityElement* KeyboardDismissKeyInLayout() {
+  UIView* layout = [[UIKeyboardImpl sharedInstance] _layout];
+  UIAccessibilityElement* key = nil;
+  if ([layout accessibilityElementCount] != NSNotFound) {
+    for (NSInteger i = [layout accessibilityElementCount]; i >= 0; --i) {
+      id element = [layout accessibilityElementAtIndex:i];
+      if ([[[element key] valueForKey:@"name"] isEqual:@"Dismiss-Key"]) {
+        key = element;
+        break;
+      }
+    }
+  }
+  return key;
+}
+
+// Returns YES if the keyboard is docked at the bottom. NO otherwise.
+BOOL IsKeyboardDockedForLayout() {
+  UIView* layout = [[UIKeyboardImpl sharedInstance] _layout];
+  CGRect windowBounds = layout.window.bounds;
+  UIView* viewToCompare = layout;
+  while (viewToCompare &&
+         viewToCompare.bounds.size.height < windowBounds.size.height) {
+    CGRect keyboardFrameInWindow =
+        [viewToCompare.window convertRect:viewToCompare.bounds
+                                 fromView:viewToCompare];
+
+    CGFloat maxY = CGRectGetMaxY(keyboardFrameInWindow);
+    if ([@(maxY) isEqualToNumber:@(windowBounds.size.height)]) {
+      return YES;
+    }
+    viewToCompare = viewToCompare.superview;
+  }
+  return NO;
+}
+
+}  // namespace
+
+@implementation KeyboardAppInterface
+
++ (void)load {
+  @autoreleasepool {
+    // EarlGrey fails to detect undocked keyboards on screen, so this help check
+    // for them.
+    auto block = ^(NSNotification* note) {
+      CGRect keyboardFrame =
+          [note.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
+      UIWindow* window = [UIApplication sharedApplication].keyWindow;
+      keyboardFrame = [window convertRect:keyboardFrame fromWindow:nil];
+      CGRect windowFrame = window.frame;
+      CGRect frameIntersection = CGRectIntersection(windowFrame, keyboardFrame);
+      gCHRIsKeyboardShown =
+          frameIntersection.size.width > 1 && frameIntersection.size.height > 1;
+    };
+
+    [[NSNotificationCenter defaultCenter]
+        addObserverForName:UIKeyboardDidChangeFrameNotification
+                    object:nil
+                     queue:nil
+                usingBlock:block];
+
+    [[NSNotificationCenter defaultCenter]
+        addObserverForName:UIKeyboardDidShowNotification
+                    object:nil
+                     queue:nil
+                usingBlock:block];
+
+    [[NSNotificationCenter defaultCenter]
+        addObserverForName:UIKeyboardDidHideNotification
+                    object:nil
+                     queue:nil
+                usingBlock:block];
+  }
+}
+
++ (BOOL)isKeyboadDocked {
+  return IsKeyboardDockedForLayout();
+}
+
++ (id<GREYMatcher>)keyboardWindowMatcher {
+  id<GREYMatcher> classMatcher = grey_kindOfClass([UIWindow class]);
+  UIAccessibilityElement* key = KeyboardDismissKeyInLayout();
+  id<GREYMatcher> parentMatcher =
+      grey_descendant(grey_accessibilityLabel(key.accessibilityLabel));
+  return grey_allOf(classMatcher, parentMatcher, nil);
+}
+
++ (id<GREYAction>)keyboardUndockAction {
+  UIAccessibilityElement* key = KeyboardDismissKeyInLayout();
+  CGRect keyFrameInScreen = [key accessibilityFrame];
+  UIView* layout = [[UIKeyboardImpl sharedInstance] _layout];
+  CGRect keyFrameInWindow = [UIScreen.mainScreen.coordinateSpace
+            convertRect:keyFrameInScreen
+      toCoordinateSpace:layout.window.coordinateSpace];
+  CGRect windowBounds = layout.window.bounds;
+
+  CGPoint startPoint = CGPointMake(
+      (keyFrameInWindow.origin.x + keyFrameInWindow.size.width / 2.0) /
+          windowBounds.size.width,
+      (keyFrameInWindow.origin.y + keyFrameInWindow.size.height / 2.0) /
+          windowBounds.size.height);
+
+  return grey_swipeFastInDirectionWithStartPoint(kGREYDirectionUp, startPoint.x,
+                                                 startPoint.y);
+}
+
++ (id<GREYAction>)keyboardDockAction {
+  UIAccessibilityElement* key = KeyboardDismissKeyInLayout();
+  CGRect keyFrameInScreen = [key accessibilityFrame];
+  UIView* layout = [[UIKeyboardImpl sharedInstance] _layout];
+  CGRect keyFrameInWindow = [UIScreen.mainScreen.coordinateSpace
+            convertRect:keyFrameInScreen
+      toCoordinateSpace:layout.window.coordinateSpace];
+  CGRect windowBounds = layout.window.bounds;
+  CGPoint startPoint = CGPointMake(
+      (keyFrameInWindow.origin.x + keyFrameInWindow.size.width / 2.0) /
+          windowBounds.size.width,
+      (keyFrameInWindow.origin.y + keyFrameInWindow.size.height / 2.0) /
+          windowBounds.size.height);
+  return grey_swipeFastInDirectionWithStartPoint(kGREYDirectionDown,
+                                                 startPoint.x, startPoint.y);
+}
+
+// If the keyboard is not present this will add a text field to the hierarchy,
+// make it first responder and return it. If it is already present, this does
+// nothing and returns nil.
++ (UITextField*)showKeyboard {
+  UITextField* textField = nil;
+  if (!gCHRIsKeyboardShown) {
+    CGRect rect = CGRectMake(0, 0, 300, 100);
+    textField = [[UITextField alloc] initWithFrame:rect];
+    textField.backgroundColor = [UIColor blueColor];
+    [[[UIApplication sharedApplication] keyWindow] addSubview:textField];
+    [textField becomeFirstResponder];
+  }
+
+  ConditionBlock conditionBlock = ^bool {
+    return gCHRIsKeyboardShown;
+  };
+  base::test::ios::TimeUntilCondition(
+      nil, conditionBlock, false,
+      base::TimeDelta::FromSeconds(base::test::ios::kWaitForUIElementTimeout));
+  return textField;
+}
+
+@end
diff --git a/ios/web_view/internal/autofill/cwv_autofill_suggestion.mm b/ios/web_view/internal/autofill/cwv_autofill_suggestion.mm
index fe981838..bb022a5 100644
--- a/ios/web_view/internal/autofill/cwv_autofill_suggestion.mm
+++ b/ios/web_view/internal/autofill/cwv_autofill_suggestion.mm
@@ -46,7 +46,12 @@
 }
 
 - (NSString*)displayDescription {
-  return [_formSuggestion.displayDescription copy];
+  if ([self isPasswordSuggestion]) {
+    // An opaque password string used to hide the true length of the password.
+    return @"••••••••";
+  } else {
+    return [_formSuggestion.displayDescription copy];
+  }
 }
 
 - (UIImage* __nullable)icon {
diff --git a/media/capture/video/mac/video_capture_device_avfoundation_mac.h b/media/capture/video/mac/video_capture_device_avfoundation_mac.h
index 6e8c698f..5120021d 100644
--- a/media/capture/video/mac/video_capture_device_avfoundation_mac.h
+++ b/media/capture/video/mac/video_capture_device_avfoundation_mac.h
@@ -65,9 +65,8 @@
 
   // |captureDevice_| is an object coming from AVFoundation, used only to be
   // plugged in |captureDeviceInput_| and to query for session preset support.
-  AVCaptureDevice* captureDevice_;
-  // |captureDeviceInput_| is owned by |captureSession_|.
-  AVCaptureDeviceInput* captureDeviceInput_;
+  base::scoped_nsobject<AVCaptureDevice> captureDevice_;
+  base::scoped_nsobject<AVCaptureDeviceInput> captureDeviceInput_;
   base::scoped_nsobject<AVCaptureVideoDataOutput> captureVideoDataOutput_;
 
   // An AVDataOutput specialized for taking pictures out of |captureSession_|.
diff --git a/media/capture/video/mac/video_capture_device_avfoundation_mac.mm b/media/capture/video/mac/video_capture_device_avfoundation_mac.mm
index 739b1db..99ced3a 100644
--- a/media/capture/video/mac/video_capture_device_avfoundation_mac.mm
+++ b/media/capture/video/mac/video_capture_device_avfoundation_mac.mm
@@ -280,15 +280,18 @@
     if (stillImageOutput_)
       [captureSession_ removeOutput:stillImageOutput_];
     if (captureDeviceInput_) {
+      DCHECK(captureDevice_);
+      [captureSession_ stopRunning];
       [captureSession_ removeInput:captureDeviceInput_];
-      // No need to release |captureDeviceInput_|, is owned by the session.
-      captureDeviceInput_ = nil;
+      captureDeviceInput_.reset();
+      captureDevice_.reset();
     }
     return YES;
   }
 
   // Look for input device with requested name.
-  captureDevice_ = [AVCaptureDevice deviceWithUniqueID:deviceId];
+  captureDevice_.reset([AVCaptureDevice deviceWithUniqueID:deviceId],
+                       base::scoped_policy::RETAIN);
   if (!captureDevice_) {
     *outMessage =
         [NSString stringWithUTF8String:"Could not open video capture device."];
@@ -297,10 +300,11 @@
 
   // Create the capture input associated with the device. Easy peasy.
   NSError* error = nil;
-  captureDeviceInput_ =
-      [AVCaptureDeviceInput deviceInputWithDevice:captureDevice_ error:&error];
+  captureDeviceInput_.reset(
+      [AVCaptureDeviceInput deviceInputWithDevice:captureDevice_ error:&error],
+      base::scoped_policy::RETAIN);
   if (!captureDeviceInput_) {
-    captureDevice_ = nil;
+    captureDevice_.reset();
     *outMessage = [NSString
         stringWithFormat:@"Could not create video capture input (%@): %@",
                          [error localizedDescription],
@@ -347,7 +351,7 @@
   FourCharCode best_fourcc = kCMPixelFormat_422YpCbCr8_yuvs;
   const bool prefer_mjpeg =
       width > kMjpegWidthThreshold || height > kMjpegHeightThreshold;
-  for (AVCaptureDeviceFormat* format in captureDevice_.formats) {
+  for (AVCaptureDeviceFormat* format in [captureDevice_ formats]) {
     const FourCharCode fourcc =
         CMFormatDescriptionGetMediaSubType([format formatDescription]);
     if (prefer_mjpeg && fourcc == kCMVideoCodecType_JPEG_OpenDML) {
diff --git a/media/gpu/vaapi/vaapi_video_decode_accelerator_unittest.cc b/media/gpu/vaapi/vaapi_video_decode_accelerator_unittest.cc
index 86b0720f..21390c6 100644
--- a/media/gpu/vaapi/vaapi_video_decode_accelerator_unittest.cc
+++ b/media/gpu/vaapi/vaapi_video_decode_accelerator_unittest.cc
@@ -67,7 +67,7 @@
 
 class MockVaapiWrapper : public VaapiWrapper {
  public:
-  MockVaapiWrapper() = default;
+  MockVaapiWrapper(CodecMode mode) : VaapiWrapper(mode) {}
   MOCK_METHOD5(CreateContextAndSurfaces,
                bool(unsigned int,
                     const gfx::Size&,
@@ -152,8 +152,8 @@
         decoder_thread_("VaapiVideoDecodeAcceleratorTestThread"),
         mock_decoder_(new ::testing::StrictMock<MockAcceleratedVideoDecoder>),
         mock_vaapi_picture_factory_(new MockVaapiPictureFactory()),
-        mock_vaapi_wrapper_(new MockVaapiWrapper()),
-        mock_vpp_vaapi_wrapper_(new MockVaapiWrapper()),
+        mock_vaapi_wrapper_(new MockVaapiWrapper(VaapiWrapper::kDecode)),
+        mock_vpp_vaapi_wrapper_(new MockVaapiWrapper(VaapiWrapper::kDecode)),
         weak_ptr_factory_(this) {
     decoder_thread_.Start();
 
diff --git a/media/gpu/vaapi/vaapi_wrapper.cc b/media/gpu/vaapi/vaapi_wrapper.cc
index ae8245cb..faa9f93 100644
--- a/media/gpu/vaapi/vaapi_wrapper.cc
+++ b/media/gpu/vaapi/vaapi_wrapper.cc
@@ -1081,7 +1081,7 @@
     return nullptr;
   }
 
-  scoped_refptr<VaapiWrapper> vaapi_wrapper(new VaapiWrapper());
+  scoped_refptr<VaapiWrapper> vaapi_wrapper(new VaapiWrapper(mode));
   if (vaapi_wrapper->VaInitialize(report_error_to_uma_cb)) {
     if (vaapi_wrapper->Initialize(mode, va_profile))
       return vaapi_wrapper;
@@ -1412,11 +1412,10 @@
   // (non-null) IDs until the signature gets updated.
   constexpr VASurfaceID* empty_va_surfaces_ids_pointer = nullptr;
   constexpr size_t empty_va_surfaces_ids_size = 0u;
-  // TODO(hiroh): VA_PROGRESSIVE might not ought to be set in VPP case. Think
-  // about removing it if something wrong happens or it turns out to be wrong.
+  const int flag = mode_ != kVideoProcess ? VA_PROGRESSIVE : 0x0;
   const VAStatus va_res =
       vaCreateContext(va_display_, va_config_id_, size.width(), size.height(),
-                      VA_PROGRESSIVE, empty_va_surfaces_ids_pointer,
+                      flag, empty_va_surfaces_ids_pointer,
                       empty_va_surfaces_ids_size, &va_context_id_);
   VA_LOG_ON_ERROR(va_res, "vaCreateContext failed");
   return va_res == VA_STATUS_SUCCESS;
@@ -2022,8 +2021,9 @@
   VASupportedProfiles::Get();
 }
 
-VaapiWrapper::VaapiWrapper()
-    : va_lock_(VADisplayState::Get()->va_lock()),
+VaapiWrapper::VaapiWrapper(CodecMode mode)
+    : mode_(mode),
+      va_lock_(VADisplayState::Get()->va_lock()),
       va_display_(NULL),
       va_config_id_(VA_INVALID_ID),
       va_context_id_(VA_INVALID_ID) {}
diff --git a/media/gpu/vaapi/vaapi_wrapper.h b/media/gpu/vaapi/vaapi_wrapper.h
index c9dc01d..64ec460 100644
--- a/media/gpu/vaapi/vaapi_wrapper.h
+++ b/media/gpu/vaapi/vaapi_wrapper.h
@@ -387,7 +387,7 @@
   void DestroySurface(VASurfaceID va_surface_id);
 
  protected:
-  VaapiWrapper();
+  VaapiWrapper(CodecMode mode);
   virtual ~VaapiWrapper();
 
  private:
@@ -424,6 +424,8 @@
   // Check low-power encode support for the given profile
   bool IsLowPowerEncSupported(VAProfile va_profile) const;
 
+  const CodecMode mode_;
+
   // Pointer to VADisplayState's member |va_lock_|. Guaranteed to be valid for
   // the lifetime of VaapiWrapper.
   base::Lock* va_lock_;
diff --git a/mojo/public/js/test/BUILD.gn b/mojo/public/js/test/BUILD.gn
index c969eac..c5fa1d5 100644
--- a/mojo/public/js/test/BUILD.gn
+++ b/mojo/public/js/test/BUILD.gn
@@ -13,40 +13,15 @@
     "module_b_1.test-mojom",
     "module_b_2.test-mojom",
   ]
-
-  use_old_js_lite_bindings_names = false
-}
-
-mojom("test_old_names_mojom") {
-  testonly = true
-  sources = [
-    "module_a_old_names.test-mojom",
-    "module_b_1_old_names.test-mojom",
-    "module_b_2_old_names.test-mojom",
-  ]
-
-  use_old_js_lite_bindings_names = true
 }
 
 if (enable_mojom_closure_compile || closure_compile) {
-  js_library("compile_test_sources") {
-    sources = [
-      "compile_test.js",
-    ]
-    deps = [
-      ":test_mojom_js_library_for_compile",
-      ":test_old_names_mojom_js_library_for_compile",
-    ]
-  }
-
   js_binary("compile_test") {
     outputs = [
       "$target_gen_dir/compile_test.js",
     ]
     deps = [
-      ":compile_test_sources",
       ":test_mojom_js_library_for_compile",
-      ":test_old_names_mojom_js_library_for_compile",
     ]
     closure_flags = strict_error_checking_closure_args + [
                       "compilation_level=ADVANCED_OPTIMIZATIONS",
diff --git a/mojo/public/js/test/compile_test.js b/mojo/public/js/test/compile_test.js
index edace08e..5f450de7 100644
--- a/mojo/public/js/test/compile_test.js
+++ b/mojo/public/js/test/compile_test.js
@@ -2,13 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-goog.require('moduleBOldNames.TestInterface');
 goog.require('moduleB.TestInterfaceRemote');
 
 // This is not expected to do anything useful, but it must compile.
-const proxy = moduleBOldNames.TestInterface.getProxy();
-proxy.passA1({'q': '', 'r': '', 's': ''});
-
-// This is not expected to do anything useful, but it must compile.
 const remote = moduleB.TestInterface.getRemote();
 remote.passA1({'q': '', 'r': '', 's': ''});
diff --git a/mojo/public/js/test/module_a_old_names.test-mojom b/mojo/public/js/test/module_a_old_names.test-mojom
deleted file mode 100644
index 505969b..0000000
--- a/mojo/public/js/test/module_a_old_names.test-mojom
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2019 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.
-
-module module_a_old_names;
-
-struct TestStructA1 {
-  string q;
-  string r;
-  string s;
-};
-
-struct TestStructA2 {
-  enum NestedEnum {
-    A,
-    B,
-  };
-
-  TestStructA1 ax;
-  TestStructA1 ay;
-  NestedEnum enumField;
-};
-
-enum ModuleEnum {
-  THIRD,
-};
-
-interface ParentInterface {
-  enum NestedEnum {
-    FIRST,
-    SECOND,
-  };
-
-  SomeMethod(NestedEnum value);
-};
diff --git a/mojo/public/js/test/module_b_1_old_names.test-mojom b/mojo/public/js/test/module_b_1_old_names.test-mojom
deleted file mode 100644
index eb09c1da..0000000
--- a/mojo/public/js/test/module_b_1_old_names.test-mojom
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2019 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.
-
-module module_b_old_names;
-
-struct TestStructB1 {
-  int32 x;
-  int32 y;
-};
diff --git a/mojo/public/js/test/module_b_2_old_names.test-mojom b/mojo/public/js/test/module_b_2_old_names.test-mojom
deleted file mode 100644
index 433c6915..0000000
--- a/mojo/public/js/test/module_b_2_old_names.test-mojom
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2019 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.
-
-module module_b_old_names;
-
-import "mojo/public/js/test/module_a_old_names.test-mojom";
-import "mojo/public/js/test/module_b_1_old_names.test-mojom";
-
-struct TestStructB2 {
-  module_a_old_names.TestStructA1 a1;
-  module_a_old_names.TestStructA2 a2;
-  TestStructB2 b2;
-};
-
-interface TestInterface {
-  PassA1(module_a_old_names.TestStructA1 a1);
-  PassB1(TestStructB1 b1);
-  PassB2(TestStructB2 b2);
-};
diff --git a/mojo/public/tools/bindings/generators/js_templates/lite/interface_definition.tmpl b/mojo/public/tools/bindings/generators/js_templates/lite/interface_definition.tmpl
index 55bdc964..c53f48d5 100644
--- a/mojo/public/tools/bindings/generators/js_templates/lite/interface_definition.tmpl
+++ b/mojo/public/tools/bindings/generators/js_templates/lite/interface_definition.tmpl
@@ -18,21 +18,19 @@
 {% endmacro %}
 
 {%  if generate_closure_exports -%}
-{% if not use_old_names -%}
 goog.provide('{{module.namespace}}.{{interface.name}}');
-{% endif %}
-goog.provide('{{module.namespace}}.{{interface.name}}{{primitives_names.receiver}}');
+goog.provide('{{module.namespace}}.{{interface.name}}Receiver');
 goog.provide('{{module.namespace}}.{{interface.name}}CallbackRouter');
 goog.provide('{{module.namespace}}.{{interface.name}}Interface');
-goog.provide('{{module.namespace}}.{{interface.name}}{{primitives_names.remote}}');
-goog.provide('{{module.namespace}}.{{interface.name}}{{primitives_names.pending_receiver}}');
+goog.provide('{{module.namespace}}.{{interface.name}}Remote');
+goog.provide('{{module.namespace}}.{{interface.name}}PendingReceiver');
 {% endif %}
 
 /**
  * @implements {mojo.internal.interfaceSupport.PendingReceiver}
  * @export
  */
-{{module.namespace}}.{{interface.name}}{{primitives_names.pending_receiver}} = class {
+{{module.namespace}}.{{interface.name}}PendingReceiver = class {
   /** @param {!MojoHandle} handle */
   constructor(handle) {
     /** @public {!MojoHandle} */
@@ -58,19 +56,19 @@
  * @export
  * @implements { {{module.namespace}}.{{interface.name}}Interface }
  */
-{{module.namespace}}.{{interface.name}}{{primitives_names.remote}} = class {
+{{module.namespace}}.{{interface.name}}Remote = class {
   /** @param {MojoHandle=} opt_handle */
   constructor(opt_handle) {
     /**
-     * @private {!mojo.internal.interfaceSupport.InterfaceRemoteBase<!{{module.namespace}}.{{interface.name}}{{primitives_names.pending_receiver}}>}
+     * @private {!mojo.internal.interfaceSupport.InterfaceRemoteBase<!{{module.namespace}}.{{interface.name}}PendingReceiver>}
      */
     this.proxy =
         new mojo.internal.interfaceSupport.InterfaceRemoteBase(
-          {{module.namespace}}.{{interface.name}}{{primitives_names.pending_receiver}},
+          {{module.namespace}}.{{interface.name}}PendingReceiver,
           opt_handle);
 
     /**
-     * @public {!mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper<!{{module.namespace}}.{{interface.name}}{{primitives_names.pending_receiver}}>}
+     * @public {!mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper<!{{module.namespace}}.{{interface.name}}PendingReceiver>}
      */
     this.$ = new mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper(this.proxy);
 
@@ -115,17 +113,17 @@
  *
  * @export
  */
-{{module.namespace}}.{{interface.name}}{{primitives_names.receiver}} = class {
+{{module.namespace}}.{{interface.name}}Receiver = class {
   /**
    * @param {!{{module.namespace}}.{{interface.name}}Interface } impl
    */
   constructor(impl) {
-    /** @private {!mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal<!{{module.namespace}}.{{interface.name}}{{primitives_names.remote}}>} */
+    /** @private {!mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal<!{{module.namespace}}.{{interface.name}}Remote>} */
     this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(
-        {{module.namespace}}.{{interface.name}}{{primitives_names.remote}});
+        {{module.namespace}}.{{interface.name}}Remote);
 
     /**
-     * @public {!mojo.internal.interfaceSupport.InterfaceReceiverHelper<!{{module.namespace}}.{{interface.name}}{{primitives_names.remote}}>}
+     * @public {!mojo.internal.interfaceSupport.InterfaceReceiverHelper<!{{module.namespace}}.{{interface.name}}Remote>}
      */
     this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
 
@@ -145,34 +143,8 @@
     /** @public {!mojo.internal.interfaceSupport.ConnectionErrorEventRouter} */
     this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter();
   }
-
-  {% if use_old_names -%}
-  /**
-   * Returns a proxy for this interface which sends messages to the browser.
-   * The browser must have an interface request binder registered for this
-   * interface and accessible to the calling document's frame.
-   *
-   * @return {!{{module.namespace}}.{{interface.name}}Proxy}
-   * @export
-   */
-  static getProxy() {
-    let proxy = new {{module.namespace}}.{{interface.name}}Proxy;
-    Mojo.bindInterface('{{mojom_namespace}}.{{interface.name}}',
-                       proxy.$.bindNewPipeAndPassReceiver().handle);
-    return proxy;
-  }
-
-  /**
-   * @return {!string}
-   */
-  static get $interfaceName() {
-    return "{{mojom_namespace}}.{{interface.name}}";
-  }
-  {% endif %}
 };
 
-{% if not use_old_names -%}
-
 /**
  *  @export
  */
@@ -200,8 +172,6 @@
   }
 };
 
-{% endif %}
-
 {#--- Enums #}
 {% from "lite/enum_definition.tmpl" import enum_def with context %}
 {%- for enum in interface.enums %}
@@ -221,10 +191,10 @@
 {{module.namespace}}.{{interface.name}}CallbackRouter = class {
   constructor() {
     this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(
-      {{module.namespace}}.{{interface.name}}{{primitives_names.remote}});
+      {{module.namespace}}.{{interface.name}}Remote);
 
     /**
-     * @public {!mojo.internal.interfaceSupport.InterfaceReceiverHelper<!{{module.namespace}}.{{interface.name}}{{primitives_names.remote}}>}
+     * @public {!mojo.internal.interfaceSupport.InterfaceReceiverHelper<!{{module.namespace}}.{{interface.name}}Remote>}
      */
     this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
 
diff --git a/mojo/public/tools/bindings/generators/js_templates/lite/test/BUILD.gn b/mojo/public/tools/bindings/generators/js_templates/lite/test/BUILD.gn
index d3c94dbc..ec085c5 100644
--- a/mojo/public/tools/bindings/generators/js_templates/lite/test/BUILD.gn
+++ b/mojo/public/tools/bindings/generators/js_templates/lite/test/BUILD.gn
@@ -12,17 +12,8 @@
   ]
 }
 
-mojom("mojo_old_names_bindings") {
-  testonly = true
-  sources = [
-    "test_old_names.test-mojom",
-  ]
-  use_old_js_lite_bindings_names = true
-}
-
 js_type_check("closure_compile") {
   deps = [
-    ":old_names_test",
     ":test",
   ]
 }
@@ -30,12 +21,5 @@
 js_library("test") {
   deps = [
     ":mojo_bindings_js_library_for_compile",
-    ":mojo_old_names_bindings_js_library_for_compile",
-  ]
-}
-
-js_library("old_names_test") {
-  deps = [
-    ":mojo_old_names_bindings_js_library_for_compile",
   ]
 }
diff --git a/mojo/public/tools/bindings/generators/js_templates/lite/test/old_names_test.js b/mojo/public/tools/bindings/generators/js_templates/lite/test/old_names_test.js
deleted file mode 100644
index 816e733..0000000
--- a/mojo/public/tools/bindings/generators/js_templates/lite/test/old_names_test.js
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2018 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.
-
-(() => {
-  async function testFunction() {
-    /** @type {oldNameTest.mojom.TestPageHandlerProxy} */
-    let proxy = oldNameTest.mojom.TestPageHandler.getProxy()
-
-    // Type infers {?{values: !Array<!string>}} from Promise return type.
-    let result = await proxy.method1(' ', 5);
-
-    /** @type {Array<string>} */
-    let values = result.values;
-
-    /** @type {oldNameTest.mojom.TestStruct} */
-    let testStruct = result.ts
-  }
-
-  /** @implements {oldNameTest.mojom.TestPageInterface} */
-  class TestPageImpl {
-    /** @override */
-    onEvent1(s) {
-      /** @type {oldNameTest.mojom.TestStruct} */ let t = s;
-      /** @type {string} */ let id = t.id;
-      /** @type {string|undefined} */ let title = t.title;
-      /** @type {oldNameTest.mojom.TestEnum} */ let enumValue = t.enums[0];
-
-      /** @type {string} */ let numberToStringMapValue = t.numberToStringMap[5];
-
-      /** @type {oldNameTest.mojom.Message} */
-      let messageToMessageArrayValue =
-        t.messageToArrayMap.get({message: 'asdf'})[0];
-
-      /** @type {oldNameTest.mojom.TestEnum} */ let enumToMapMapValue =
-        t.enumToMapMap[oldNameTest.mojom.TestEnum.FIRST]
-                      [oldNameTest.mojom.TestEnum.SECOND];
-      /** @type {oldNameTest.mojom.TestPageInterface} */
-      let handler = t.numberToInterfaceProxyMap[3];
-      handler.onEvent1(t);
-    }
-  }
-})();
diff --git a/mojo/public/tools/bindings/generators/js_templates/lite/test/test_old_names.test-mojom b/mojo/public/tools/bindings/generators/js_templates/lite/test/test_old_names.test-mojom
deleted file mode 100644
index 09fc6b08..0000000
--- a/mojo/public/tools/bindings/generators/js_templates/lite/test/test_old_names.test-mojom
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2018 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.
-
-module old_name_test.mojom;
-
-enum TestEnum {
-  FIRST,
-  SECOND,
-};
-
-struct Message {
-  string message;
-};
-
-struct TestStruct {
-  string id;
-  string? title;
-  array<TestEnum> enums;
-  map<uint32, string> numberToStringMap;
-  map<Message, array<Message>> messageToArrayMap;
-  map<TestEnum, map<TestEnum, TestEnum>> enumToMapMap;
-  map<uint32, TestPage> numberToInterfaceProxyMap;
-};
-
-interface TestPageHandler {
-  Method1(string p1, int32 p2) => (array<string> values, TestStruct ts);
-};
-
-interface TestPage {
-  OnEvent1(TestStruct s);
-};
diff --git a/mojo/public/tools/bindings/generators/mojom_js_generator.py b/mojo/public/tools/bindings/generators/mojom_js_generator.py
index 1fbf4e7..e61b585 100644
--- a/mojo/public/tools/bindings/generators/mojom_js_generator.py
+++ b/mojo/public/tools/bindings/generators/mojom_js_generator.py
@@ -264,8 +264,6 @@
       "unions": self.module.unions,
       "generate_fuzzing": self.generate_fuzzing,
       "generate_closure_exports": for_compile,
-      "use_old_names": self.use_old_js_lite_bindings_names,
-      "primitives_names": self._GetPrimitivesNames(),
    }
 
   @staticmethod
@@ -474,9 +472,9 @@
         mojom.IsEnumKind(kind)):
       return name
     if mojom.IsInterfaceKind(kind) or mojom.IsPendingRemoteKind(kind):
-      return name + self._GetPrimitivesNames()["remote"]
+      return name + "Remote"
     if mojom.IsInterfaceRequestKind(kind) or mojom.IsPendingReceiverKind(kind):
-      return name + self._GetPrimitivesNames()["pending_receiver"]
+      return name + "PendingReceiver"
     # TODO(calamity): Support associated interfaces properly.
     if (mojom.IsAssociatedInterfaceKind(kind) or
         mojom.IsPendingAssociatedRemoteKind(kind)):
@@ -573,21 +571,17 @@
         mojom.IsEnumKind(kind)):
       return "%sSpec.$" % name
     if mojom.IsInterfaceKind(kind) or mojom.IsPendingRemoteKind(kind):
-      remote_name = name + self._GetPrimitivesNames()["remote"]
-      return "mojo.internal.InterfaceProxy(%s)" % remote_name
+      return "mojo.internal.InterfaceProxy(%sRemote)" % name
     if mojom.IsInterfaceRequestKind(kind) or mojom.IsPendingReceiverKind(kind):
-      request_name = name + self._GetPrimitivesNames()["pending_receiver"]
-      return "mojo.internal.InterfaceRequest(%s)" % request_name
+      return "mojo.internal.InterfaceRequest(%sPendingReceiver)" % name
     if (mojom.IsAssociatedInterfaceKind(kind) or
         mojom.IsPendingAssociatedRemoteKind(kind)):
-      remote_name = name + self._GetPrimitivesNames()["remote"]
       # TODO(rockot): Implement associated interfaces.
-      return "mojo.internal.AssociatedInterfaceProxy(%s)" % (
-          remote_name)
+      return "mojo.internal.AssociatedInterfaceProxy(%sRemote)" % (name)
     if (mojom.IsAssociatedInterfaceRequestKind(kind) or
         mojom.IsPendingAssociatedReceiverKind(kind)):
-      request_name = name + self._GetPrimitivesNames()["pending_receiver"]
-      return "mojo.internal.AssociatedInterfaceRequest(%s)" % request_name
+      return "mojo.internal.AssociatedInterfaceRequest(%sPendingReceiver)" % (
+        name)
 
     return name
 
@@ -826,20 +820,6 @@
 
     return self._ExpressionToText(token)
 
-  def _GetPrimitivesNames(self):
-    if self.use_old_js_lite_bindings_names:
-      return {
-          "remote": "Proxy",
-          "receiver": "",
-          "pending_receiver": "Request",
-      }
-    else:
-      return {
-          "remote": "Remote",
-          "receiver": "Receiver",
-          "pending_receiver": "PendingReceiver",
-      }
-
   def _GenerateHtmlImports(self):
     result = []
     for full_import in self.module.imports:
diff --git a/mojo/public/tools/bindings/mojom.gni b/mojo/public/tools/bindings/mojom.gni
index 1f65a32..6e95a02 100644
--- a/mojo/public/tools/bindings/mojom.gni
+++ b/mojo/public/tools/bindings/mojom.gni
@@ -291,10 +291,6 @@
 #       correct dependency order. Note that this only has an effect if
 #       the |enable_mojom_closure_compile| global arg is set to |true| as well.
 #
-#   use_old_js_lite_bindings_names (optional)
-#       Use old names i.e. FooProxy, Foo, getProxy(), etc. instead of the new
-#       names i.e. FooRemote, FooReceiver, getRemote(), etc.
-#
 #   use_typescript_sources (optional)
 #       Uses the Typescript generator to generate JavaScript bindings.
 #
@@ -1296,11 +1292,6 @@
         if (generate_fuzzing) {
           args += [ "--generate_fuzzing" ]
         }
-
-        if (defined(invoker.use_old_js_lite_bindings_names) &&
-            invoker.use_old_js_lite_bindings_names) {
-          args += [ "--use_old_js_lite_bindings_names" ]
-        }
       }
     }
 
diff --git a/mojo/public/tools/bindings/mojom_bindings_generator.py b/mojo/public/tools/bindings/mojom_bindings_generator.py
index 27d4532..2c29fd8 100755
--- a/mojo/public/tools/bindings/mojom_bindings_generator.py
+++ b/mojo/public/tools/bindings/mojom_bindings_generator.py
@@ -219,7 +219,6 @@
             variant=args.variant, bytecode_path=args.bytecode_path,
             for_blink=args.for_blink,
             js_bindings_mode=args.js_bindings_mode,
-            use_old_js_lite_bindings_names=args.use_old_js_lite_bindings_names,
             export_attribute=args.export_attribute,
             export_header=args.export_header,
             generate_non_variant_code=args.generate_non_variant_code,
@@ -472,11 +471,6 @@
       "be \"new\" to generate new-style lite JS bindings in addition to the "
       "old, or \"old\" to only generate old bindings.")
   generate_parser.add_argument(
-      "--use_old_js_lite_bindings_names", action="store_true",
-      help="This option only affects the JavaScript bindings. Specifying this "
-      "argument causes the generated new-style lite JS bindings to use the old"
-      "names for primitives e.g. Foo, FooProxy, getProxy(), etc.")
-  generate_parser.add_argument(
       "--export_attribute", default="",
       help="Optional attribute to specify on class declaration to export it "
       "for the component build.")
diff --git a/mojo/public/tools/bindings/pylib/mojom/generate/generator.py b/mojo/public/tools/bindings/pylib/mojom/generate/generator.py
index d27e7ef5..7a4d964 100644
--- a/mojo/public/tools/bindings/pylib/mojom/generate/generator.py
+++ b/mojo/public/tools/bindings/pylib/mojom/generate/generator.py
@@ -194,7 +194,6 @@
   def __init__(self, module, output_dir=None, typemap=None, variant=None,
                bytecode_path=None, for_blink=False,
                js_bindings_mode="new",
-               use_old_js_lite_bindings_names=False,
                export_attribute=None,
                export_header=None, generate_non_variant_code=False,
                support_lazy_serialization=False, disallow_native_types=False,
@@ -207,7 +206,6 @@
     self.bytecode_path = bytecode_path
     self.for_blink = for_blink
     self.js_bindings_mode = js_bindings_mode
-    self.use_old_js_lite_bindings_names = use_old_js_lite_bindings_names
     self.export_attribute = export_attribute
     self.export_header = export_header
     self.generate_non_variant_code = generate_non_variant_code
diff --git a/net/data/websocket/connect_check.html b/net/data/websocket/connect_check.html
index 1efc604b..8e8f3176 100644
--- a/net/data/websocket/connect_check.html
+++ b/net/data/websocket/connect_check.html
@@ -22,6 +22,7 @@
       reject();
     }
   };
+  worker.onerror = reject;
 
   // Start the worker.
   worker.postMessage('');
diff --git a/services/device/hid/hid_manager_impl.cc b/services/device/hid/hid_manager_impl.cc
index a63cb13..5f286e9 100644
--- a/services/device/hid/hid_manager_impl.cc
+++ b/services/device/hid/hid_manager_impl.cc
@@ -44,7 +44,7 @@
 }
 
 void HidManagerImpl::GetDevicesAndSetClient(
-    mojom::HidManagerClientAssociatedPtrInfo client,
+    mojo::PendingAssociatedRemote<mojom::HidManagerClient> client,
     GetDevicesCallback callback) {
   hid_service_->GetDevices(base::BindOnce(
       &HidManagerImpl::CreateDeviceList, weak_factory_.GetWeakPtr(),
diff --git a/services/device/hid/hid_manager_impl.h b/services/device/hid/hid_manager_impl.h
index ecc5fe2..43c771c 100644
--- a/services/device/hid/hid_manager_impl.h
+++ b/services/device/hid/hid_manager_impl.h
@@ -35,8 +35,9 @@
   void AddReceiver(mojo::PendingReceiver<mojom::HidManager> receiver);
 
   // mojom::HidManager implementation:
-  void GetDevicesAndSetClient(mojom::HidManagerClientAssociatedPtrInfo client,
-                              GetDevicesCallback callback) override;
+  void GetDevicesAndSetClient(
+      mojo::PendingAssociatedRemote<mojom::HidManagerClient> client,
+      GetDevicesCallback callback) override;
   void GetDevices(GetDevicesCallback callback) override;
   void Connect(
       const std::string& device_guid,
diff --git a/services/device/public/cpp/hid/fake_hid_manager.cc b/services/device/public/cpp/hid/fake_hid_manager.cc
index dbe9d48..a574928 100644
--- a/services/device/public/cpp/hid/fake_hid_manager.cc
+++ b/services/device/public/cpp/hid/fake_hid_manager.cc
@@ -101,7 +101,7 @@
 
 // mojom::HidManager implementation:
 void FakeHidManager::GetDevicesAndSetClient(
-    mojom::HidManagerClientAssociatedPtrInfo client,
+    mojo::PendingAssociatedRemote<mojom::HidManagerClient> client,
     GetDevicesCallback callback) {
   GetDevices(std::move(callback));
 
diff --git a/services/device/public/cpp/hid/fake_hid_manager.h b/services/device/public/cpp/hid/fake_hid_manager.h
index e43425a..da1033d 100644
--- a/services/device/public/cpp/hid/fake_hid_manager.h
+++ b/services/device/public/cpp/hid/fake_hid_manager.h
@@ -9,6 +9,7 @@
 #include <string>
 #include <vector>
 
+#include "mojo/public/cpp/bindings/pending_associated_remote.h"
 #include "mojo/public/cpp/bindings/pending_remote.h"
 #include "mojo/public/cpp/bindings/receiver_set.h"
 #include "mojo/public/cpp/bindings/remote_set.h"
@@ -45,8 +46,9 @@
   void Bind(mojo::PendingReceiver<mojom::HidManager> receiver);
 
   // mojom::HidManager implementation:
-  void GetDevicesAndSetClient(mojom::HidManagerClientAssociatedPtrInfo client,
-                              GetDevicesCallback callback) override;
+  void GetDevicesAndSetClient(
+      mojo::PendingAssociatedRemote<mojom::HidManagerClient> client,
+      GetDevicesCallback callback) override;
   void GetDevices(GetDevicesCallback callback) override;
   void Connect(
       const std::string& device_guid,
diff --git a/services/device/public/mojom/hid.mojom b/services/device/public/mojom/hid.mojom
index dc87d7d6..1c67e69a 100644
--- a/services/device/public/mojom/hid.mojom
+++ b/services/device/public/mojom/hid.mojom
@@ -314,10 +314,7 @@
   // Enumerates available devices and set as a client of HidManager.
   // The implementation of HidManager guarantees that the returned callback
   // will always be posted earlier than DeviceAdded() and DeviceRemoved().
-  // TODO(crbug.com/955171): Use |pending_associated_remote| instead of
-  // |associated| after supporting mojom_js_generator.py completely for
-  // associated interfaces.
-  GetDevicesAndSetClient(associated HidManagerClient client) =>
+  GetDevicesAndSetClient(pending_associated_remote<HidManagerClient> client) =>
                        (array<HidDeviceInfo> devices);
 
   // Enumerates available devices only.
diff --git a/storage/browser/file_system/README.md b/storage/browser/file_system/README.md
index e67fb6e..3feda5ee 100644
--- a/storage/browser/file_system/README.md
+++ b/storage/browser/file_system/README.md
@@ -18,7 +18,7 @@
 
 There are two kinds of file system types supported by the file system
 implementation: Internal types and public types.
-[`//storage/common/fileapi/file_system_types.h`](../../common/fileapi/file_system_types.h)
+[`//storage/common/file_system/file_system_types.h`](../../common/file_system/file_system_types.h)
 has an `enum` of all the various types that exist. Many of these are Chrome OS specific or
 only make sense in the context of extensions.
 
diff --git a/storage/browser/file_system/async_file_util_adapter.cc b/storage/browser/file_system/async_file_util_adapter.cc
index e5eaa13..0a6ae411 100644
--- a/storage/browser/file_system/async_file_util_adapter.cc
+++ b/storage/browser/file_system/async_file_util_adapter.cc
@@ -22,7 +22,7 @@
 #include "storage/browser/file_system/file_system_file_util.h"
 #include "storage/browser/file_system/file_system_operation_context.h"
 #include "storage/browser/file_system/file_system_url.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 
 using base::Owned;
 using base::Unretained;
diff --git a/storage/browser/file_system/copy_or_move_file_validator_unittest.cc b/storage/browser/file_system/copy_or_move_file_validator_unittest.cc
index 9343efa..c08aeab 100644
--- a/storage/browser/file_system/copy_or_move_file_validator_unittest.cc
+++ b/storage/browser/file_system/copy_or_move_file_validator_unittest.cc
@@ -26,7 +26,7 @@
 #include "storage/browser/test/mock_special_storage_policy.h"
 #include "storage/browser/test/test_file_system_backend.h"
 #include "storage/browser/test/test_file_system_context.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 using content::AsyncFileTestHelper;
diff --git a/storage/browser/file_system/copy_or_move_operation_delegate.cc b/storage/browser/file_system/copy_or_move_operation_delegate.cc
index 851f104..6e017e2 100644
--- a/storage/browser/file_system/copy_or_move_operation_delegate.cc
+++ b/storage/browser/file_system/copy_or_move_operation_delegate.cc
@@ -23,7 +23,7 @@
 #include "storage/browser/file_system/file_system_context.h"
 #include "storage/browser/file_system/file_system_operation_runner.h"
 #include "storage/browser/file_system/file_system_url.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 
 namespace storage {
 
diff --git a/storage/browser/file_system/copy_or_move_operation_delegate_unittest.cc b/storage/browser/file_system/copy_or_move_operation_delegate_unittest.cc
index bc3e541..af5eb46 100644
--- a/storage/browser/file_system/copy_or_move_operation_delegate_unittest.cc
+++ b/storage/browser/file_system/copy_or_move_operation_delegate_unittest.cc
@@ -38,8 +38,8 @@
 #include "storage/browser/test/mock_quota_manager_proxy.h"
 #include "storage/browser/test/test_file_system_backend.h"
 #include "storage/browser/test/test_file_system_context.h"
-#include "storage/common/fileapi/file_system_mount_option.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_mount_option.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 using content::AsyncFileTestHelper;
diff --git a/storage/browser/file_system/dump_file_system.cc b/storage/browser/file_system/dump_file_system.cc
index 81bc6c8..fe85f66 100644
--- a/storage/browser/file_system/dump_file_system.cc
+++ b/storage/browser/file_system/dump_file_system.cc
@@ -47,8 +47,8 @@
 #include "storage/browser/file_system/sandbox_file_system_backend.h"
 #include "storage/browser/file_system/sandbox_origin_database.h"
 #include "storage/browser/file_system/sandbox_prioritized_origin_database.h"
-#include "storage/common/fileapi/file_system_types.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_types.h"
+#include "storage/common/file_system/file_system_util.h"
 
 namespace {
 
diff --git a/storage/browser/file_system/external_mount_points.h b/storage/browser/file_system/external_mount_points.h
index fdb4029..d472d12c 100644
--- a/storage/browser/file_system/external_mount_points.h
+++ b/storage/browser/file_system/external_mount_points.h
@@ -15,8 +15,8 @@
 #include "base/memory/ref_counted.h"
 #include "base/synchronization/lock.h"
 #include "storage/browser/file_system/mount_points.h"
-#include "storage/common/fileapi/file_system_mount_option.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_mount_option.h"
+#include "storage/common/file_system/file_system_types.h"
 
 namespace base {
 class FilePath;
diff --git a/storage/browser/file_system/external_mount_points_unittest.cc b/storage/browser/file_system/external_mount_points_unittest.cc
index 6cb4640..6a17c8d3 100644
--- a/storage/browser/file_system/external_mount_points_unittest.cc
+++ b/storage/browser/file_system/external_mount_points_unittest.cc
@@ -12,7 +12,7 @@
 #include "base/macros.h"
 #include "base/stl_util.h"
 #include "storage/browser/file_system/file_system_url.h"
-#include "storage/common/fileapi/file_system_mount_option.h"
+#include "storage/common/file_system/file_system_mount_option.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 #define FPL FILE_PATH_LITERAL
diff --git a/storage/browser/file_system/file_system_backend.h b/storage/browser/file_system/file_system_backend.h
index f796b071..d656181 100644
--- a/storage/browser/file_system/file_system_backend.h
+++ b/storage/browser/file_system/file_system_backend.h
@@ -19,7 +19,7 @@
 #include "storage/browser/file_system/file_permission_policy.h"
 #include "storage/browser/file_system/open_file_system_mode.h"
 #include "storage/browser/file_system/task_runner_bound_observer_list.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 
 class GURL;
 
diff --git a/storage/browser/file_system/file_system_context.cc b/storage/browser/file_system/file_system_context.cc
index b384e6a4..dc2541cb 100644
--- a/storage/browser/file_system/file_system_context.cc
+++ b/storage/browser/file_system/file_system_context.cc
@@ -36,8 +36,8 @@
 #include "storage/browser/file_system/sandbox_file_system_backend.h"
 #include "storage/browser/quota/quota_manager_proxy.h"
 #include "storage/browser/quota/special_storage_policy.h"
-#include "storage/common/fileapi/file_system_info.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_info.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "third_party/leveldatabase/leveldb_chrome.h"
 #include "url/gurl.h"
 
diff --git a/storage/browser/file_system/file_system_context.h b/storage/browser/file_system/file_system_context.h
index 89b821cf..e824d55 100644
--- a/storage/browser/file_system/file_system_context.h
+++ b/storage/browser/file_system/file_system_context.h
@@ -25,7 +25,7 @@
 #include "storage/browser/file_system/plugin_private_file_system_backend.h"
 #include "storage/browser/file_system/sandbox_file_system_backend_delegate.h"
 #include "storage/browser/file_system/task_runner_bound_observer_list.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 
 namespace base {
 class FilePath;
diff --git a/storage/browser/file_system/file_system_operation_impl.cc b/storage/browser/file_system/file_system_operation_impl.cc
index 82bbc7d7..7201910 100644
--- a/storage/browser/file_system/file_system_operation_impl.cc
+++ b/storage/browser/file_system/file_system_operation_impl.cc
@@ -27,8 +27,8 @@
 #include "storage/browser/file_system/remove_operation_delegate.h"
 #include "storage/browser/file_system/sandbox_file_system_backend.h"
 #include "storage/browser/quota/quota_manager_proxy.h"
-#include "storage/common/fileapi/file_system_types.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_types.h"
+#include "storage/common/file_system/file_system_util.h"
 
 using storage::ScopedFile;
 
diff --git a/storage/browser/file_system/file_system_operation_impl_unittest.cc b/storage/browser/file_system/file_system_operation_impl_unittest.cc
index e5bc93d..41f50398 100644
--- a/storage/browser/file_system/file_system_operation_impl_unittest.cc
+++ b/storage/browser/file_system/file_system_operation_impl_unittest.cc
@@ -38,7 +38,7 @@
 #include "storage/browser/test/mock_quota_manager.h"
 #include "storage/browser/test/mock_quota_manager_proxy.h"
 #include "storage/browser/test/sandbox_file_system_test_helper.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "url/gurl.h"
 
diff --git a/storage/browser/file_system/file_system_operation_impl_write_unittest.cc b/storage/browser/file_system/file_system_operation_impl_write_unittest.cc
index 696d18f2..d446de4 100644
--- a/storage/browser/file_system/file_system_operation_impl_write_unittest.cc
+++ b/storage/browser/file_system/file_system_operation_impl_write_unittest.cc
@@ -27,7 +27,7 @@
 #include "storage/browser/test/mock_quota_manager.h"
 #include "storage/browser/test/test_file_system_backend.h"
 #include "storage/browser/test/test_file_system_context.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "url/gurl.h"
 
diff --git a/storage/browser/file_system/file_system_quota_client.cc b/storage/browser/file_system/file_system_quota_client.cc
index aed76eb4..a1c569c 100644
--- a/storage/browser/file_system/file_system_quota_client.cc
+++ b/storage/browser/file_system/file_system_quota_client.cc
@@ -17,7 +17,7 @@
 #include "storage/browser/file_system/file_system_context.h"
 #include "storage/browser/file_system/file_system_usage_cache.h"
 #include "storage/browser/file_system/sandbox_file_system_backend.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "third_party/blink/public/mojom/quota/quota_types.mojom.h"
 #include "url/gurl.h"
 
diff --git a/storage/browser/file_system/file_system_quota_client.h b/storage/browser/file_system/file_system_quota_client.h
index 64da761..2156a47e 100644
--- a/storage/browser/file_system/file_system_quota_client.h
+++ b/storage/browser/file_system/file_system_quota_client.h
@@ -16,7 +16,7 @@
 #include "base/memory/ref_counted.h"
 #include "storage/browser/file_system/file_system_quota_util.h"
 #include "storage/browser/quota/quota_client.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 #include "third_party/blink/public/mojom/quota/quota_types.mojom.h"
 #include "url/origin.h"
 
diff --git a/storage/browser/file_system/file_system_quota_client_unittest.cc b/storage/browser/file_system/file_system_quota_client_unittest.cc
index 3434797f..e748c5c1 100644
--- a/storage/browser/file_system/file_system_quota_client_unittest.cc
+++ b/storage/browser/file_system/file_system_quota_client_unittest.cc
@@ -19,8 +19,8 @@
 #include "storage/browser/file_system/obfuscated_file_util.h"
 #include "storage/browser/test/async_file_test_helper.h"
 #include "storage/browser/test/test_file_system_context.h"
-#include "storage/common/fileapi/file_system_types.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_types.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/blink/public/mojom/quota/quota_types.mojom.h"
 #include "url/gurl.h"
diff --git a/storage/browser/file_system/file_system_quota_util.h b/storage/browser/file_system/file_system_quota_util.h
index 1b28fb3..f68163b 100644
--- a/storage/browser/file_system/file_system_quota_util.h
+++ b/storage/browser/file_system/file_system_quota_util.h
@@ -13,7 +13,7 @@
 #include "base/component_export.h"
 #include "base/files/file.h"
 #include "base/memory/scoped_refptr.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 #include "url/gurl.h"
 
 namespace storage {
diff --git a/storage/browser/file_system/file_system_url.cc b/storage/browser/file_system/file_system_url.cc
index 788302092..a6b6bc29 100644
--- a/storage/browser/file_system/file_system_url.cc
+++ b/storage/browser/file_system/file_system_url.cc
@@ -9,7 +9,7 @@
 #include "base/logging.h"
 #include "base/strings/string_util.h"
 #include "net/base/escape.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 
 namespace storage {
 
diff --git a/storage/browser/file_system/file_system_url.h b/storage/browser/file_system/file_system_url.h
index ba12c28..b88ece0 100644
--- a/storage/browser/file_system/file_system_url.h
+++ b/storage/browser/file_system/file_system_url.h
@@ -10,8 +10,8 @@
 
 #include "base/component_export.h"
 #include "base/files/file_path.h"
-#include "storage/common/fileapi/file_system_mount_option.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_mount_option.h"
+#include "storage/common/file_system/file_system_types.h"
 #include "url/gurl.h"
 #include "url/origin.h"
 
diff --git a/storage/browser/file_system/file_system_url_unittest.cc b/storage/browser/file_system/file_system_url_unittest.cc
index 54f86ea..516edc2 100644
--- a/storage/browser/file_system/file_system_url_unittest.cc
+++ b/storage/browser/file_system/file_system_url_unittest.cc
@@ -11,8 +11,8 @@
 #include "base/files/file_path.h"
 #include "base/macros.h"
 #include "base/stl_util.h"
-#include "storage/common/fileapi/file_system_types.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_types.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "url/gurl.h"
 
diff --git a/storage/browser/file_system/file_writer_delegate.cc b/storage/browser/file_system/file_writer_delegate.cc
index 620b6d7..e28b5f9 100644
--- a/storage/browser/file_system/file_writer_delegate.cc
+++ b/storage/browser/file_system/file_writer_delegate.cc
@@ -19,8 +19,8 @@
 #include "net/base/net_errors.h"
 #include "storage/browser/file_system/file_stream_writer.h"
 #include "storage/browser/file_system/file_system_context.h"
-#include "storage/common/fileapi/file_system_mount_option.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_mount_option.h"
+#include "storage/common/file_system/file_system_util.h"
 
 namespace storage {
 
diff --git a/storage/browser/file_system/file_writer_delegate_unittest.cc b/storage/browser/file_system/file_writer_delegate_unittest.cc
index 65d687d..a5be9be 100644
--- a/storage/browser/file_system/file_writer_delegate_unittest.cc
+++ b/storage/browser/file_system/file_writer_delegate_unittest.cc
@@ -36,7 +36,7 @@
 #include "storage/browser/file_system/sandbox_file_stream_writer.h"
 #include "storage/browser/test/async_file_test_helper.h"
 #include "storage/browser/test/test_file_system_context.h"
-#include "storage/common/fileapi/file_system_mount_option.h"
+#include "storage/common/file_system/file_system_mount_option.h"
 #include "testing/platform_test.h"
 #include "url/gurl.h"
 
diff --git a/storage/browser/file_system/isolated_context.h b/storage/browser/file_system/isolated_context.h
index c0fada2..1eaa9fb 100644
--- a/storage/browser/file_system/isolated_context.h
+++ b/storage/browser/file_system/isolated_context.h
@@ -17,7 +17,7 @@
 #include "base/memory/singleton.h"
 #include "base/synchronization/lock.h"
 #include "storage/browser/file_system/mount_points.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 
 namespace storage {
 class FileSystemURL;
diff --git a/storage/browser/file_system/isolated_file_system_backend.cc b/storage/browser/file_system/isolated_file_system_backend.cc
index 74086cf2..48897f2 100644
--- a/storage/browser/file_system/isolated_file_system_backend.cc
+++ b/storage/browser/file_system/isolated_file_system_backend.cc
@@ -26,8 +26,8 @@
 #include "storage/browser/file_system/native_file_util.h"
 #include "storage/browser/file_system/transient_file_util.h"
 #include "storage/browser/file_system/watcher_manager.h"
-#include "storage/common/fileapi/file_system_types.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_types.h"
+#include "storage/common/file_system/file_system_util.h"
 
 namespace storage {
 
diff --git a/storage/browser/file_system/local_file_util.cc b/storage/browser/file_system/local_file_util.cc
index 0ea6116..04b4463 100644
--- a/storage/browser/file_system/local_file_util.cc
+++ b/storage/browser/file_system/local_file_util.cc
@@ -16,8 +16,8 @@
 #include "storage/browser/file_system/file_system_operation_context.h"
 #include "storage/browser/file_system/file_system_url.h"
 #include "storage/browser/file_system/native_file_util.h"
-#include "storage/common/fileapi/file_system_types.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_types.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "url/gurl.h"
 
 namespace storage {
diff --git a/storage/browser/file_system/local_file_util_unittest.cc b/storage/browser/file_system/local_file_util_unittest.cc
index 7a9469e..a03f9f8 100644
--- a/storage/browser/file_system/local_file_util_unittest.cc
+++ b/storage/browser/file_system/local_file_util_unittest.cc
@@ -25,7 +25,7 @@
 #include "storage/browser/file_system/native_file_util.h"
 #include "storage/browser/test/async_file_test_helper.h"
 #include "storage/browser/test/test_file_system_context.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 using content::AsyncFileTestHelper;
diff --git a/storage/browser/file_system/mount_points.h b/storage/browser/file_system/mount_points.h
index ef8a82f..84487c83 100644
--- a/storage/browser/file_system/mount_points.h
+++ b/storage/browser/file_system/mount_points.h
@@ -11,7 +11,7 @@
 #include "base/component_export.h"
 #include "base/files/file_path.h"
 #include "base/macros.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 
 class GURL;
 namespace url {
diff --git a/storage/browser/file_system/native_file_util.cc b/storage/browser/file_system/native_file_util.cc
index 11457606..88c5e63 100644
--- a/storage/browser/file_system/native_file_util.cc
+++ b/storage/browser/file_system/native_file_util.cc
@@ -13,7 +13,7 @@
 #include "build/build_config.h"
 #include "storage/browser/file_system/file_system_operation_context.h"
 #include "storage/browser/file_system/file_system_url.h"
-#include "storage/common/fileapi/file_system_mount_option.h"
+#include "storage/common/file_system/file_system_mount_option.h"
 
 namespace storage {
 
diff --git a/storage/browser/file_system/obfuscated_file_util.cc b/storage/browser/file_system/obfuscated_file_util.cc
index e57b7cd..cc38345 100644
--- a/storage/browser/file_system/obfuscated_file_util.cc
+++ b/storage/browser/file_system/obfuscated_file_util.cc
@@ -33,7 +33,7 @@
 #include "storage/browser/file_system/sandbox_prioritized_origin_database.h"
 #include "storage/browser/quota/quota_manager.h"
 #include "storage/common/database/database_identifier.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "third_party/leveldatabase/leveldb_chrome.h"
 #include "url/gurl.h"
 
diff --git a/storage/browser/file_system/obfuscated_file_util.h b/storage/browser/file_system/obfuscated_file_util.h
index 143cd602..6e23902 100644
--- a/storage/browser/file_system/obfuscated_file_util.h
+++ b/storage/browser/file_system/obfuscated_file_util.h
@@ -26,7 +26,7 @@
 #include "storage/browser/file_system/obfuscated_file_util_delegate.h"
 #include "storage/browser/file_system/sandbox_directory_database.h"
 #include "storage/browser/file_system/sandbox_file_system_backend_delegate.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 
 namespace content {
 class ObfuscatedFileUtilTest;
diff --git a/storage/browser/file_system/plugin_private_file_system_backend.cc b/storage/browser/file_system/plugin_private_file_system_backend.cc
index a25ac1f3..a04c8562 100644
--- a/storage/browser/file_system/plugin_private_file_system_backend.cc
+++ b/storage/browser/file_system/plugin_private_file_system_backend.cc
@@ -29,7 +29,7 @@
 #include "storage/browser/file_system/obfuscated_file_util_memory_delegate.h"
 #include "storage/browser/file_system/quota/quota_reservation.h"
 #include "storage/browser/file_system/sandbox_file_stream_writer.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 
 namespace storage {
 
diff --git a/storage/browser/file_system/plugin_private_file_system_backend_unittest.cc b/storage/browser/file_system/plugin_private_file_system_backend_unittest.cc
index 2dd0463..4be4190 100644
--- a/storage/browser/file_system/plugin_private_file_system_backend_unittest.cc
+++ b/storage/browser/file_system/plugin_private_file_system_backend_unittest.cc
@@ -16,7 +16,7 @@
 #include "storage/browser/test/async_file_test_helper.h"
 #include "storage/browser/test/test_file_system_context.h"
 #include "storage/browser/test/test_file_system_options.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 using content::AsyncFileTestHelper;
diff --git a/storage/browser/file_system/quota/open_file_handle_context.h b/storage/browser/file_system/quota/open_file_handle_context.h
index 65cb1e80..1140cee8 100644
--- a/storage/browser/file_system/quota/open_file_handle_context.h
+++ b/storage/browser/file_system/quota/open_file_handle_context.h
@@ -13,7 +13,7 @@
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 #include "url/gurl.h"
 
 namespace storage {
diff --git a/storage/browser/file_system/quota/quota_backend_impl.cc b/storage/browser/file_system/quota/quota_backend_impl.cc
index 0c83b3fe..b4f0295 100644
--- a/storage/browser/file_system/quota/quota_backend_impl.cc
+++ b/storage/browser/file_system/quota/quota_backend_impl.cc
@@ -16,7 +16,7 @@
 #include "storage/browser/file_system/file_system_usage_cache.h"
 #include "storage/browser/quota/quota_client.h"
 #include "storage/browser/quota/quota_manager_proxy.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "url/origin.h"
 
 namespace storage {
diff --git a/storage/browser/file_system/quota/quota_reservation.h b/storage/browser/file_system/quota/quota_reservation.h
index 7f2f7837..cee6d6d 100644
--- a/storage/browser/file_system/quota/quota_reservation.h
+++ b/storage/browser/file_system/quota/quota_reservation.h
@@ -16,7 +16,7 @@
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
 #include "storage/browser/file_system/quota/quota_reservation_manager.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 
 namespace url {
 class Origin;
diff --git a/storage/browser/file_system/quota/quota_reservation_buffer.h b/storage/browser/file_system/quota/quota_reservation_buffer.h
index 351ad7a..a18f4e8 100644
--- a/storage/browser/file_system/quota/quota_reservation_buffer.h
+++ b/storage/browser/file_system/quota/quota_reservation_buffer.h
@@ -15,7 +15,7 @@
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 #include "url/origin.h"
 
 namespace storage {
diff --git a/storage/browser/file_system/quota/quota_reservation_manager.h b/storage/browser/file_system/quota/quota_reservation_manager.h
index bb4fe0c..cb924534 100644
--- a/storage/browser/file_system/quota/quota_reservation_manager.h
+++ b/storage/browser/file_system/quota/quota_reservation_manager.h
@@ -17,7 +17,7 @@
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 
 namespace content {
 class QuotaReservationManagerTest;
diff --git a/storage/browser/file_system/sandbox_directory_database.cc b/storage/browser/file_system/sandbox_directory_database.cc
index f985567..6356ef7 100644
--- a/storage/browser/file_system/sandbox_directory_database.cc
+++ b/storage/browser/file_system/sandbox_directory_database.cc
@@ -23,7 +23,7 @@
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_util.h"
 #include "storage/browser/file_system/file_system_usage_cache.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "third_party/leveldatabase/env_chromium.h"
 #include "third_party/leveldatabase/leveldb_chrome.h"
 #include "third_party/leveldatabase/src/include/leveldb/db.h"
diff --git a/storage/browser/file_system/sandbox_directory_database_unittest.cc b/storage/browser/file_system/sandbox_directory_database_unittest.cc
index c85dd93..3857030 100644
--- a/storage/browser/file_system/sandbox_directory_database_unittest.cc
+++ b/storage/browser/file_system/sandbox_directory_database_unittest.cc
@@ -18,7 +18,7 @@
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_util.h"
 #include "storage/browser/test/sandbox_database_test_helper.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/leveldatabase/src/include/leveldb/db.h"
 
diff --git a/storage/browser/file_system/sandbox_file_stream_writer.cc b/storage/browser/file_system/sandbox_file_stream_writer.cc
index 38a00589..3df2606f 100644
--- a/storage/browser/file_system/sandbox_file_stream_writer.cc
+++ b/storage/browser/file_system/sandbox_file_stream_writer.cc
@@ -22,7 +22,7 @@
 #include "storage/browser/file_system/obfuscated_file_util_memory_delegate.h"
 #include "storage/browser/file_system/plugin_private_file_system_backend.h"
 #include "storage/browser/quota/quota_manager_proxy.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 
 namespace storage {
 
diff --git a/storage/browser/file_system/sandbox_file_stream_writer.h b/storage/browser/file_system/sandbox_file_stream_writer.h
index b658565..b454365 100644
--- a/storage/browser/file_system/sandbox_file_stream_writer.h
+++ b/storage/browser/file_system/sandbox_file_stream_writer.h
@@ -17,7 +17,7 @@
 #include "storage/browser/file_system/file_stream_writer.h"
 #include "storage/browser/file_system/file_system_url.h"
 #include "storage/browser/file_system/task_runner_bound_observer_list.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 #include "third_party/blink/public/mojom/quota/quota_types.mojom.h"
 #include "url/gurl.h"
 
diff --git a/storage/browser/file_system/sandbox_file_system_backend.cc b/storage/browser/file_system/sandbox_file_system_backend.cc
index b170e84..612f95ca 100644
--- a/storage/browser/file_system/sandbox_file_system_backend.cc
+++ b/storage/browser/file_system/sandbox_file_system_backend.cc
@@ -26,8 +26,8 @@
 #include "storage/browser/file_system/obfuscated_file_util.h"
 #include "storage/browser/file_system/sandbox_quota_observer.h"
 #include "storage/browser/quota/quota_manager.h"
-#include "storage/common/fileapi/file_system_types.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_types.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "url/gurl.h"
 
 using storage::QuotaManagerProxy;
diff --git a/storage/browser/file_system/sandbox_file_system_backend_delegate.cc b/storage/browser/file_system/sandbox_file_system_backend_delegate.cc
index 4b12d9c..93d6fea1 100644
--- a/storage/browser/file_system/sandbox_file_system_backend_delegate.cc
+++ b/storage/browser/file_system/sandbox_file_system_backend_delegate.cc
@@ -34,7 +34,7 @@
 #include "storage/browser/file_system/sandbox_file_system_backend.h"
 #include "storage/browser/file_system/sandbox_quota_observer.h"
 #include "storage/browser/quota/quota_manager_proxy.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "url/origin.h"
 
 namespace storage {
diff --git a/storage/browser/file_system/sandbox_file_system_backend_unittest.cc b/storage/browser/file_system/sandbox_file_system_backend_unittest.cc
index fec19d3..a4328361 100644
--- a/storage/browser/file_system/sandbox_file_system_backend_unittest.cc
+++ b/storage/browser/file_system/sandbox_file_system_backend_unittest.cc
@@ -21,7 +21,7 @@
 #include "storage/browser/file_system/file_system_url.h"
 #include "storage/browser/file_system/sandbox_file_system_backend_delegate.h"
 #include "storage/browser/test/test_file_system_options.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/leveldatabase/leveldb_chrome.h"
 #include "url/gurl.h"
diff --git a/storage/browser/file_system/sandbox_origin_database.cc b/storage/browser/file_system/sandbox_origin_database.cc
index 7e5a6186..5b88e483 100644
--- a/storage/browser/file_system/sandbox_origin_database.cc
+++ b/storage/browser/file_system/sandbox_origin_database.cc
@@ -19,7 +19,7 @@
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_util.h"
 #include "base/strings/stringprintf.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "third_party/leveldatabase/env_chromium.h"
 #include "third_party/leveldatabase/src/include/leveldb/db.h"
 #include "third_party/leveldatabase/src/include/leveldb/write_batch.h"
diff --git a/storage/browser/file_system/sandbox_origin_database_unittest.cc b/storage/browser/file_system/sandbox_origin_database_unittest.cc
index b34c01a5..17b0273 100644
--- a/storage/browser/file_system/sandbox_origin_database_unittest.cc
+++ b/storage/browser/file_system/sandbox_origin_database_unittest.cc
@@ -19,7 +19,7 @@
 #include "base/stl_util.h"
 #include "storage/browser/file_system/sandbox_origin_database.h"
 #include "storage/browser/test/sandbox_database_test_helper.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/leveldatabase/src/db/filename.h"
 #include "third_party/leveldatabase/src/include/leveldb/db.h"
diff --git a/storage/browser/file_system/sandbox_quota_observer.cc b/storage/browser/file_system/sandbox_quota_observer.cc
index 6623ea9..25d03722 100644
--- a/storage/browser/file_system/sandbox_quota_observer.cc
+++ b/storage/browser/file_system/sandbox_quota_observer.cc
@@ -12,7 +12,7 @@
 #include "storage/browser/file_system/sandbox_file_system_backend_delegate.h"
 #include "storage/browser/quota/quota_client.h"
 #include "storage/browser/quota/quota_manager_proxy.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 
 namespace storage {
 
diff --git a/storage/browser/test/async_file_test_helper.cc b/storage/browser/test/async_file_test_helper.cc
index 30b0e1d..be5601b0 100644
--- a/storage/browser/test/async_file_test_helper.cc
+++ b/storage/browser/test/async_file_test_helper.cc
@@ -13,7 +13,7 @@
 #include "storage/browser/file_system/file_system_operation_runner.h"
 #include "storage/browser/file_system/file_system_url.h"
 #include "storage/browser/quota/quota_manager.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace content {
diff --git a/storage/browser/test/async_file_test_helper.h b/storage/browser/test/async_file_test_helper.h
index bd6cae5..2ba3221 100644
--- a/storage/browser/test/async_file_test_helper.h
+++ b/storage/browser/test/async_file_test_helper.h
@@ -9,7 +9,7 @@
 #include <stdint.h>
 
 #include "storage/browser/file_system/file_system_operation.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 #include "third_party/blink/public/mojom/quota/quota_types.mojom.h"
 
 namespace storage {
diff --git a/storage/browser/test/sandbox_database_test_helper.cc b/storage/browser/test/sandbox_database_test_helper.cc
index 155c425..4c2f80b0 100644
--- a/storage/browser/test/sandbox_database_test_helper.cc
+++ b/storage/browser/test/sandbox_database_test_helper.cc
@@ -14,7 +14,7 @@
 #include "base/files/file.h"
 #include "base/files/file_enumerator.h"
 #include "base/files/file_util.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/leveldatabase/leveldb_chrome.h"
 
diff --git a/storage/browser/test/sandbox_file_system_test_helper.cc b/storage/browser/test/sandbox_file_system_test_helper.cc
index 77a880c..fd47b112 100644
--- a/storage/browser/test/sandbox_file_system_test_helper.cc
+++ b/storage/browser/test/sandbox_file_system_test_helper.cc
@@ -19,7 +19,7 @@
 #include "storage/browser/quota/quota_manager_proxy.h"
 #include "storage/browser/test/mock_special_storage_policy.h"
 #include "storage/browser/test/test_file_system_context.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "url/gurl.h"
 
 using storage::FileSystemContext;
diff --git a/storage/browser/test/sandbox_file_system_test_helper.h b/storage/browser/test/sandbox_file_system_test_helper.h
index d7c5409..6a1ab8b 100644
--- a/storage/browser/test/sandbox_file_system_test_helper.h
+++ b/storage/browser/test/sandbox_file_system_test_helper.h
@@ -14,8 +14,8 @@
 #include "storage/browser/file_system/file_system_url.h"
 #include "storage/browser/file_system/file_system_usage_cache.h"
 #include "storage/browser/file_system/task_runner_bound_observer_list.h"
-#include "storage/common/fileapi/file_system_types.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_types.h"
+#include "storage/common/file_system/file_system_util.h"
 #include "third_party/blink/public/mojom/quota/quota_types.mojom.h"
 #include "url/gurl.h"
 
diff --git a/storage/browser/test/test_file_system_backend.cc b/storage/browser/test/test_file_system_backend.cc
index 6d409f88..917f7e69 100644
--- a/storage/browser/test/test_file_system_backend.cc
+++ b/storage/browser/test/test_file_system_backend.cc
@@ -27,7 +27,7 @@
 #include "storage/browser/file_system/quota/quota_reservation.h"
 #include "storage/browser/file_system/sandbox_file_stream_writer.h"
 #include "storage/browser/quota/quota_manager.h"
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 
 using storage::FileSystemContext;
 using storage::FileSystemOperation;
diff --git a/storage/common/BUILD.gn b/storage/common/BUILD.gn
index 3d55d197..9e8d3a1 100644
--- a/storage/common/BUILD.gn
+++ b/storage/common/BUILD.gn
@@ -11,12 +11,12 @@
     "database/database_connections.h",
     "database/database_identifier.cc",
     "database/database_identifier.h",
-    "fileapi/file_system_info.cc",
-    "fileapi/file_system_info.h",
-    "fileapi/file_system_mount_option.h",
-    "fileapi/file_system_types.h",
-    "fileapi/file_system_util.cc",
-    "fileapi/file_system_util.h",
+    "file_system/file_system_info.cc",
+    "file_system/file_system_info.h",
+    "file_system/file_system_mount_option.h",
+    "file_system/file_system_types.h",
+    "file_system/file_system_util.cc",
+    "file_system/file_system_util.h",
     "storage_histograms.cc",
     "storage_histograms.h",
   ]
@@ -49,7 +49,7 @@
   sources = [
     "database/database_connections_unittest.cc",
     "database/database_identifier_unittest.cc",
-    "fileapi/file_system_util_unittest.cc",
+    "file_system/file_system_util_unittest.cc",
     "run_all_unittests.cc",
   ]
 
diff --git a/storage/common/fileapi/OWNERS b/storage/common/file_system/OWNERS
similarity index 100%
rename from storage/common/fileapi/OWNERS
rename to storage/common/file_system/OWNERS
diff --git a/storage/common/fileapi/file_system_info.cc b/storage/common/file_system/file_system_info.cc
similarity index 72%
rename from storage/common/fileapi/file_system_info.cc
rename to storage/common/file_system/file_system_info.cc
index f84b1b2..fbc19fb8 100644
--- a/storage/common/fileapi/file_system_info.cc
+++ b/storage/common/file_system/file_system_info.cc
@@ -2,19 +2,17 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "storage/common/fileapi/file_system_info.h"
+#include "storage/common/file_system/file_system_info.h"
 
 namespace storage {
 
 FileSystemInfo::FileSystemInfo()
-    : mount_type(storage::kFileSystemTypeTemporary) {
-}
+    : mount_type(storage::kFileSystemTypeTemporary) {}
 
 FileSystemInfo::FileSystemInfo(const std::string& name,
                                const GURL& root_url,
                                storage::FileSystemType mount_type)
-    : name(name), root_url(root_url), mount_type(mount_type) {
-}
+    : name(name), root_url(root_url), mount_type(mount_type) {}
 
 FileSystemInfo::~FileSystemInfo() = default;
 
diff --git a/storage/common/fileapi/file_system_info.h b/storage/common/file_system/file_system_info.h
similarity index 78%
rename from storage/common/fileapi/file_system_info.h
rename to storage/common/file_system/file_system_info.h
index 9dec2b7e..fb96a4b 100644
--- a/storage/common/fileapi/file_system_info.h
+++ b/storage/common/file_system/file_system_info.h
@@ -2,13 +2,13 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef STORAGE_COMMON_FILEAPI_FILE_SYSTEM_INFO_H_
-#define STORAGE_COMMON_FILEAPI_FILE_SYSTEM_INFO_H_
+#ifndef STORAGE_COMMON_FILE_SYSTEM_FILE_SYSTEM_INFO_H_
+#define STORAGE_COMMON_FILE_SYSTEM_FILE_SYSTEM_INFO_H_
 
 #include <string>
 
 #include "base/component_export.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_types.h"
 #include "url/gurl.h"
 
 namespace storage {
@@ -30,4 +30,4 @@
 
 }  // namespace storage
 
-#endif  // STORAGE_COMMON_FILEAPI_FILE_SYSTEM_INFO_H_
+#endif  // STORAGE_COMMON_FILE_SYSTEM_FILE_SYSTEM_INFO_H_
diff --git a/storage/common/fileapi/file_system_mount_option.h b/storage/common/file_system/file_system_mount_option.h
similarity index 86%
rename from storage/common/fileapi/file_system_mount_option.h
rename to storage/common/file_system/file_system_mount_option.h
index 55ad7d1e..1728eb9 100644
--- a/storage/common/fileapi/file_system_mount_option.h
+++ b/storage/common/file_system/file_system_mount_option.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef STORAGE_COMMON_FILEAPI_FILE_SYSTEM_MOUNT_OPTION_H_
-#define STORAGE_COMMON_FILEAPI_FILE_SYSTEM_MOUNT_OPTION_H_
+#ifndef STORAGE_COMMON_FILE_SYSTEM_FILE_SYSTEM_MOUNT_OPTION_H_
+#define STORAGE_COMMON_FILE_SYSTEM_FILE_SYSTEM_MOUNT_OPTION_H_
 
 namespace storage {
 
@@ -40,4 +40,4 @@
 
 }  // namespace storage
 
-#endif  // STORAGE_COMMON_FILEAPI_FILE_SYSTEM_MOUNT_OPTION_H_
+#endif  // STORAGE_COMMON_FILE_SYSTEM_FILE_SYSTEM_MOUNT_OPTION_H_
diff --git a/storage/common/fileapi/file_system_types.h b/storage/common/file_system/file_system_types.h
similarity index 96%
rename from storage/common/fileapi/file_system_types.h
rename to storage/common/file_system/file_system_types.h
index 08268a1..0dee7e5 100644
--- a/storage/common/fileapi/file_system_types.h
+++ b/storage/common/file_system/file_system_types.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef STORAGE_COMMON_FILEAPI_FILE_SYSTEM_TYPES_H_
-#define STORAGE_COMMON_FILEAPI_FILE_SYSTEM_TYPES_H_
+#ifndef STORAGE_COMMON_FILE_SYSTEM_FILE_SYSTEM_TYPES_H_
+#define STORAGE_COMMON_FILE_SYSTEM_FILE_SYSTEM_TYPES_H_
 
 #include "third_party/blink/public/platform/web_file_system_type.h"
 
@@ -136,4 +136,4 @@
 
 }  // namespace storage
 
-#endif  // STORAGE_COMMON_FILEAPI_FILE_SYSTEM_TYPES_H_
+#endif  // STORAGE_COMMON_FILE_SYSTEM_FILE_SYSTEM_TYPES_H_
diff --git a/storage/common/fileapi/file_system_util.cc b/storage/common/file_system/file_system_util.cc
similarity index 90%
rename from storage/common/fileapi/file_system_util.cc
rename to storage/common/file_system/file_system_util.cc
index 78beb8b2..cc94a42 100644
--- a/storage/common/fileapi/file_system_util.cc
+++ b/storage/common/file_system/file_system_util.cc
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 
 #include <stddef.h>
 
@@ -53,7 +53,7 @@
 
 base::FilePath VirtualPath::DirName(const base::FilePath& virtual_path) {
   using StringType = base::FilePath::StringType;
-  StringType  path = virtual_path.value();
+  StringType path = virtual_path.value();
 
   // The logic below is taken from that of base::FilePath::DirName, except
   // that this version never cares about '//' or drive-letters even on win32.
@@ -119,15 +119,16 @@
 base::FilePath::StringType VirtualPath::GetNormalizedFilePath(
     const base::FilePath& path) {
   base::FilePath::StringType normalized_path = path.value();
-  const size_t num_separators = base::FilePath::StringType(
-      base::FilePath::kSeparators).length();
+  const size_t num_separators =
+      base::FilePath::StringType(base::FilePath::kSeparators).length();
   for (size_t i = 0; i < num_separators; ++i) {
     std::replace(normalized_path.begin(), normalized_path.end(),
                  base::FilePath::kSeparators[i], kSeparator);
   }
 
-  return (IsAbsolute(normalized_path)) ?
-      normalized_path : base::FilePath::StringType(kRoot) + normalized_path;
+  return (IsAbsolute(normalized_path))
+             ? normalized_path
+             : base::FilePath::StringType(kRoot) + normalized_path;
 }
 
 bool VirtualPath::IsAbsolute(const base::FilePath::StringType& path) {
@@ -138,8 +139,7 @@
   std::vector<base::FilePath::StringType> components =
       VirtualPath::GetComponents(path);
   return (path.empty() || components.empty() ||
-          (components.size() == 1 &&
-           components[0] == VirtualPath::kRoot));
+          (components.size() == 1 && components[0] == VirtualPath::kRoot));
 }
 
 bool ParseFileSystemSchemeURL(const GURL& url,
@@ -156,11 +156,11 @@
     FileSystemType type;
     const char* dir;
   } kValidTypes[] = {
-    { kFileSystemTypePersistent, kPersistentDir },
-    { kFileSystemTypeTemporary, kTemporaryDir },
-    { kFileSystemTypeIsolated, kIsolatedDir },
-    { kFileSystemTypeExternal, kExternalDir },
-    { kFileSystemTypeTest, kTestDir },
+      {kFileSystemTypePersistent, kPersistentDir},
+      {kFileSystemTypeTemporary, kTemporaryDir},
+      {kFileSystemTypeIsolated, kIsolatedDir},
+      {kFileSystemTypeExternal, kExternalDir},
+      {kFileSystemTypeTest, kTestDir},
   };
 
   // A path of the inner_url contains only mount type part (e.g. "/temporary").
@@ -193,8 +193,8 @@
   if (type)
     *type = file_system_type;
   if (virtual_path)
-    *virtual_path = converted_path.NormalizePathSeparators().
-        StripTrailingSeparators();
+    *virtual_path =
+        converted_path.NormalizePathSeparators().StripTrailingSeparators();
 
   return true;
 }
@@ -341,9 +341,8 @@
 #endif
 }
 
-bool GetFileSystemPublicType(
-    const std::string type_string,
-    blink::WebFileSystemType* type) {
+bool GetFileSystemPublicType(const std::string type_string,
+                             blink::WebFileSystemType* type) {
   DCHECK(type);
   if (type_string == "Temporary") {
     *type = blink::kWebFileSystemTypeTemporary;
@@ -380,8 +379,9 @@
 
   // |filesystem_name| is of the form {origin}:isolated_{filesystem_id}.
   std::string start_token(":");
-  start_token = start_token.append(
-      GetFileSystemTypeString(kFileSystemTypeIsolated)).append("_");
+  start_token =
+      start_token.append(GetFileSystemTypeString(kFileSystemTypeIsolated))
+          .append("_");
   // WebKit uses different case in its constant for isolated file system
   // names, so we do a case insensitive compare by converting both strings
   // to uppercase.
@@ -394,8 +394,8 @@
   if (pos == 0)
     return false;
 
-  *filesystem_id = filesystem_name.substr(pos + start_token.length(),
-                                          std::string::npos);
+  *filesystem_id =
+      filesystem_name.substr(pos + start_token.length(), std::string::npos);
   if (filesystem_id->empty())
     return false;
 
@@ -414,8 +414,8 @@
     const GURL& origin_url,
     const std::string& filesystem_id,
     const std::string& optional_root_name) {
-  std::string root = GetFileSystemRootURI(origin_url,
-                                          kFileSystemTypeIsolated).spec();
+  std::string root =
+      GetFileSystemRootURI(origin_url, kFileSystemTypeIsolated).spec();
   if (base::FilePath::FromUTF8Unsafe(filesystem_id).ReferencesParent())
     return std::string();
   root.append(net::EscapePath(filesystem_id));
@@ -429,11 +429,10 @@
   return root;
 }
 
-std::string GetExternalFileSystemRootURIString(
-    const GURL& origin_url,
-    const std::string& mount_name) {
-  std::string root = GetFileSystemRootURI(origin_url,
-                                          kFileSystemTypeExternal).spec();
+std::string GetExternalFileSystemRootURIString(const GURL& origin_url,
+                                               const std::string& mount_name) {
+  std::string root =
+      GetFileSystemRootURI(origin_url, kFileSystemTypeExternal).spec();
   if (base::FilePath::FromUTF8Unsafe(mount_name).ReferencesParent())
     return std::string();
   root.append(net::EscapePath(mount_name));
diff --git a/storage/common/fileapi/file_system_util.h b/storage/common/file_system/file_system_util.h
similarity index 95%
rename from storage/common/fileapi/file_system_util.h
rename to storage/common/file_system/file_system_util.h
index 06d8f29..c6f8fb7b 100644
--- a/storage/common/fileapi/file_system_util.h
+++ b/storage/common/file_system/file_system_util.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef STORAGE_COMMON_FILEAPI_FILE_SYSTEM_UTIL_H_
-#define STORAGE_COMMON_FILEAPI_FILE_SYSTEM_UTIL_H_
+#ifndef STORAGE_COMMON_FILE_SYSTEM_FILE_SYSTEM_UTIL_H_
+#define STORAGE_COMMON_FILE_SYSTEM_FILE_SYSTEM_UTIL_H_
 
 #include <string>
 #include <vector>
@@ -11,8 +11,8 @@
 #include "base/component_export.h"
 #include "base/files/file.h"
 #include "base/files/file_path.h"
-#include "storage/common/fileapi/file_system_info.h"
-#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/file_system/file_system_info.h"
+#include "storage/common/file_system/file_system_types.h"
 #include "third_party/blink/public/mojom/quota/quota_types.mojom.h"
 #include "third_party/blink/public/platform/web_file_system_type.h"
 
@@ -172,4 +172,4 @@
 
 }  // namespace storage
 
-#endif  // STORAGE_COMMON_FILEAPI_FILE_SYSTEM_UTIL_H_
+#endif  // STORAGE_COMMON_FILE_SYSTEM_FILE_SYSTEM_UTIL_H_
diff --git a/storage/common/fileapi/file_system_util_unittest.cc b/storage/common/file_system/file_system_util_unittest.cc
similarity index 69%
rename from storage/common/fileapi/file_system_util_unittest.cc
rename to storage/common/file_system/file_system_util_unittest.cc
index efa8567..d73536ef 100644
--- a/storage/common/fileapi/file_system_util_unittest.cc
+++ b/storage/common/file_system/file_system_util_unittest.cc
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/file_system/file_system_util.h"
 
 #include <stddef.h>
 
@@ -59,20 +59,19 @@
     const base::FilePath::StringType path;
     const base::FilePath::StringType base_name;
   } test_cases[] = {
-    { FILE_PATH_LITERAL("foo/bar"), FILE_PATH_LITERAL("bar") },
-    { FILE_PATH_LITERAL("foo/b:bar"), FILE_PATH_LITERAL("b:bar") },
-    { FILE_PATH_LITERAL(""), FILE_PATH_LITERAL("") },
-    { FILE_PATH_LITERAL("/"), FILE_PATH_LITERAL("/") },
-    { FILE_PATH_LITERAL("foo//////bar"), FILE_PATH_LITERAL("bar") },
-    { FILE_PATH_LITERAL("foo/bar/"), FILE_PATH_LITERAL("bar") },
-    { FILE_PATH_LITERAL("foo/bar/////"), FILE_PATH_LITERAL("bar") },
-    { FILE_PATH_LITERAL("/bar/////"), FILE_PATH_LITERAL("bar") },
-    { FILE_PATH_LITERAL("bar/////"), FILE_PATH_LITERAL("bar") },
-    { FILE_PATH_LITERAL("bar/"), FILE_PATH_LITERAL("bar") },
-    { FILE_PATH_LITERAL("/bar"), FILE_PATH_LITERAL("bar") },
-    { FILE_PATH_LITERAL("////bar"), FILE_PATH_LITERAL("bar") },
-    { FILE_PATH_LITERAL("bar"), FILE_PATH_LITERAL("bar") }
-  };
+      {FILE_PATH_LITERAL("foo/bar"), FILE_PATH_LITERAL("bar")},
+      {FILE_PATH_LITERAL("foo/b:bar"), FILE_PATH_LITERAL("b:bar")},
+      {FILE_PATH_LITERAL(""), FILE_PATH_LITERAL("")},
+      {FILE_PATH_LITERAL("/"), FILE_PATH_LITERAL("/")},
+      {FILE_PATH_LITERAL("foo//////bar"), FILE_PATH_LITERAL("bar")},
+      {FILE_PATH_LITERAL("foo/bar/"), FILE_PATH_LITERAL("bar")},
+      {FILE_PATH_LITERAL("foo/bar/////"), FILE_PATH_LITERAL("bar")},
+      {FILE_PATH_LITERAL("/bar/////"), FILE_PATH_LITERAL("bar")},
+      {FILE_PATH_LITERAL("bar/////"), FILE_PATH_LITERAL("bar")},
+      {FILE_PATH_LITERAL("bar/"), FILE_PATH_LITERAL("bar")},
+      {FILE_PATH_LITERAL("/bar"), FILE_PATH_LITERAL("bar")},
+      {FILE_PATH_LITERAL("////bar"), FILE_PATH_LITERAL("bar")},
+      {FILE_PATH_LITERAL("bar"), FILE_PATH_LITERAL("bar")}};
   for (const auto& test_case : test_cases) {
     base::FilePath input = base::FilePath(test_case.path);
     base::FilePath base_name = VirtualPath::BaseName(input);
@@ -85,32 +84,32 @@
     const base::FilePath::StringType path;
     const base::FilePath::StringType dir_name;
   } test_cases[] = {
-    { FILE_PATH_LITERAL("foo/bar"), FILE_PATH_LITERAL("foo") },
-    { FILE_PATH_LITERAL("foo/b:bar"), FILE_PATH_LITERAL("foo") },
-    { FILE_PATH_LITERAL(""), FILE_PATH_LITERAL(".") },
-    { FILE_PATH_LITERAL("/"), FILE_PATH_LITERAL("/") },
-    { FILE_PATH_LITERAL("foo//////bar"), FILE_PATH_LITERAL("foo") },
-    { FILE_PATH_LITERAL("foo/bar/"), FILE_PATH_LITERAL("foo") },
-    { FILE_PATH_LITERAL("foo/bar/////"), FILE_PATH_LITERAL("foo") },
-    { FILE_PATH_LITERAL("/bar/////"), FILE_PATH_LITERAL("/") },
-    { FILE_PATH_LITERAL("bar/////"), FILE_PATH_LITERAL(".") },
-    { FILE_PATH_LITERAL("bar/"), FILE_PATH_LITERAL(".") },
-    { FILE_PATH_LITERAL("/bar"), FILE_PATH_LITERAL("/") },
-    { FILE_PATH_LITERAL("////bar"), FILE_PATH_LITERAL("/") },
-    { FILE_PATH_LITERAL("bar"), FILE_PATH_LITERAL(".") },
-    { FILE_PATH_LITERAL("c:bar"), FILE_PATH_LITERAL(".") },
+      {FILE_PATH_LITERAL("foo/bar"), FILE_PATH_LITERAL("foo")},
+      {FILE_PATH_LITERAL("foo/b:bar"), FILE_PATH_LITERAL("foo")},
+      {FILE_PATH_LITERAL(""), FILE_PATH_LITERAL(".")},
+      {FILE_PATH_LITERAL("/"), FILE_PATH_LITERAL("/")},
+      {FILE_PATH_LITERAL("foo//////bar"), FILE_PATH_LITERAL("foo")},
+      {FILE_PATH_LITERAL("foo/bar/"), FILE_PATH_LITERAL("foo")},
+      {FILE_PATH_LITERAL("foo/bar/////"), FILE_PATH_LITERAL("foo")},
+      {FILE_PATH_LITERAL("/bar/////"), FILE_PATH_LITERAL("/")},
+      {FILE_PATH_LITERAL("bar/////"), FILE_PATH_LITERAL(".")},
+      {FILE_PATH_LITERAL("bar/"), FILE_PATH_LITERAL(".")},
+      {FILE_PATH_LITERAL("/bar"), FILE_PATH_LITERAL("/")},
+      {FILE_PATH_LITERAL("////bar"), FILE_PATH_LITERAL("/")},
+      {FILE_PATH_LITERAL("bar"), FILE_PATH_LITERAL(".")},
+      {FILE_PATH_LITERAL("c:bar"), FILE_PATH_LITERAL(".")},
 #ifdef FILE_PATH_USES_WIN_SEPARATORS
-    { FILE_PATH_LITERAL("foo\\bar"), FILE_PATH_LITERAL("foo") },
-    { FILE_PATH_LITERAL("foo\\b:bar"), FILE_PATH_LITERAL("foo") },
-    { FILE_PATH_LITERAL("\\"), FILE_PATH_LITERAL("\\") },
-    { FILE_PATH_LITERAL("foo\\\\\\\\\\\\bar"), FILE_PATH_LITERAL("foo") },
-    { FILE_PATH_LITERAL("foo\\bar\\"), FILE_PATH_LITERAL("foo") },
-    { FILE_PATH_LITERAL("foo\\bar\\\\\\\\\\"), FILE_PATH_LITERAL("foo") },
-    { FILE_PATH_LITERAL("\\bar\\\\\\\\\\"), FILE_PATH_LITERAL("\\") },
-    { FILE_PATH_LITERAL("bar\\\\\\\\\\"), FILE_PATH_LITERAL(".") },
-    { FILE_PATH_LITERAL("bar\\"), FILE_PATH_LITERAL(".") },
-    { FILE_PATH_LITERAL("\\bar"), FILE_PATH_LITERAL("\\") },
-    { FILE_PATH_LITERAL("\\\\\\\\bar"), FILE_PATH_LITERAL("\\") },
+      {FILE_PATH_LITERAL("foo\\bar"), FILE_PATH_LITERAL("foo")},
+      {FILE_PATH_LITERAL("foo\\b:bar"), FILE_PATH_LITERAL("foo")},
+      {FILE_PATH_LITERAL("\\"), FILE_PATH_LITERAL("\\")},
+      {FILE_PATH_LITERAL("foo\\\\\\\\\\\\bar"), FILE_PATH_LITERAL("foo")},
+      {FILE_PATH_LITERAL("foo\\bar\\"), FILE_PATH_LITERAL("foo")},
+      {FILE_PATH_LITERAL("foo\\bar\\\\\\\\\\"), FILE_PATH_LITERAL("foo")},
+      {FILE_PATH_LITERAL("\\bar\\\\\\\\\\"), FILE_PATH_LITERAL("\\")},
+      {FILE_PATH_LITERAL("bar\\\\\\\\\\"), FILE_PATH_LITERAL(".")},
+      {FILE_PATH_LITERAL("bar\\"), FILE_PATH_LITERAL(".")},
+      {FILE_PATH_LITERAL("\\bar"), FILE_PATH_LITERAL("\\")},
+      {FILE_PATH_LITERAL("\\\\\\\\bar"), FILE_PATH_LITERAL("\\")},
 #endif
   };
   for (const auto& test_case : test_cases) {
@@ -125,12 +124,12 @@
     const base::FilePath::StringType path;
     const base::FilePath::StringType normalized_path;
   } test_cases[] = {
-    { FILE_PATH_LITERAL(""), FILE_PATH_LITERAL("/") },
-    { FILE_PATH_LITERAL("/"), FILE_PATH_LITERAL("/") },
-    { FILE_PATH_LITERAL("foo/bar"), FILE_PATH_LITERAL("/foo/bar") },
-    { FILE_PATH_LITERAL("/foo/bar"), FILE_PATH_LITERAL("/foo/bar") },
+    {FILE_PATH_LITERAL(""), FILE_PATH_LITERAL("/")},
+    {FILE_PATH_LITERAL("/"), FILE_PATH_LITERAL("/")},
+    {FILE_PATH_LITERAL("foo/bar"), FILE_PATH_LITERAL("/foo/bar")},
+    {FILE_PATH_LITERAL("/foo/bar"), FILE_PATH_LITERAL("/foo/bar")},
 #if defined(FILE_PATH_USES_WIN_SEPARATORS)
-    { FILE_PATH_LITERAL("\\foo"), FILE_PATH_LITERAL("/foo") },
+    {FILE_PATH_LITERAL("\\foo"), FILE_PATH_LITERAL("/foo")},
 #endif
   };
   for (const auto& test_case : test_cases) {
@@ -153,12 +152,12 @@
   EXPECT_TRUE(VirtualPath::IsRootPath(base::FilePath()));
   EXPECT_TRUE(VirtualPath::IsRootPath(base::FilePath(FILE_PATH_LITERAL("/"))));
   EXPECT_TRUE(VirtualPath::IsRootPath(base::FilePath(FILE_PATH_LITERAL("//"))));
-  EXPECT_FALSE(VirtualPath::IsRootPath(
-      base::FilePath(FILE_PATH_LITERAL("c:/"))));
+  EXPECT_FALSE(
+      VirtualPath::IsRootPath(base::FilePath(FILE_PATH_LITERAL("c:/"))));
 #if defined(FILE_PATH_USES_WIN_SEPARATORS)
   EXPECT_TRUE(VirtualPath::IsRootPath(base::FilePath(FILE_PATH_LITERAL("\\"))));
-  EXPECT_FALSE(VirtualPath::IsRootPath(
-      base::FilePath(FILE_PATH_LITERAL("c:\\"))));
+  EXPECT_FALSE(
+      VirtualPath::IsRootPath(base::FilePath(FILE_PATH_LITERAL("c:\\"))));
 #endif
 }
 
@@ -168,34 +167,34 @@
     size_t count;
     const base::FilePath::StringType components[2];
   } test_cases[] = {
-    { FILE_PATH_LITERAL("foo/bar"),
-      2,
-      { FILE_PATH_LITERAL("foo"), FILE_PATH_LITERAL("bar") } },
-    { FILE_PATH_LITERAL("foo"),
-      1,
-      { FILE_PATH_LITERAL("foo"), FILE_PATH_LITERAL("") } },
-    { FILE_PATH_LITERAL("foo////bar"),
-      2,
-      { FILE_PATH_LITERAL("foo"), FILE_PATH_LITERAL("bar") } },
-    { FILE_PATH_LITERAL("foo/c:bar"),
-      2,
-      { FILE_PATH_LITERAL("foo"), FILE_PATH_LITERAL("c:bar") } },
-    { FILE_PATH_LITERAL("c:foo/bar"),
-      2,
-      { FILE_PATH_LITERAL("c:foo"), FILE_PATH_LITERAL("bar") } },
-    { FILE_PATH_LITERAL("foo/bar"),
-      2,
-      { FILE_PATH_LITERAL("foo"), FILE_PATH_LITERAL("bar") } },
-    { FILE_PATH_LITERAL("/foo/bar"),
-      2,
-      { FILE_PATH_LITERAL("foo"), FILE_PATH_LITERAL("bar") } },
-    { FILE_PATH_LITERAL("c:/bar"),
-      2,
-      { FILE_PATH_LITERAL("c:"), FILE_PATH_LITERAL("bar") } },
+      {FILE_PATH_LITERAL("foo/bar"),
+       2,
+       {FILE_PATH_LITERAL("foo"), FILE_PATH_LITERAL("bar")}},
+      {FILE_PATH_LITERAL("foo"),
+       1,
+       {FILE_PATH_LITERAL("foo"), FILE_PATH_LITERAL("")}},
+      {FILE_PATH_LITERAL("foo////bar"),
+       2,
+       {FILE_PATH_LITERAL("foo"), FILE_PATH_LITERAL("bar")}},
+      {FILE_PATH_LITERAL("foo/c:bar"),
+       2,
+       {FILE_PATH_LITERAL("foo"), FILE_PATH_LITERAL("c:bar")}},
+      {FILE_PATH_LITERAL("c:foo/bar"),
+       2,
+       {FILE_PATH_LITERAL("c:foo"), FILE_PATH_LITERAL("bar")}},
+      {FILE_PATH_LITERAL("foo/bar"),
+       2,
+       {FILE_PATH_LITERAL("foo"), FILE_PATH_LITERAL("bar")}},
+      {FILE_PATH_LITERAL("/foo/bar"),
+       2,
+       {FILE_PATH_LITERAL("foo"), FILE_PATH_LITERAL("bar")}},
+      {FILE_PATH_LITERAL("c:/bar"),
+       2,
+       {FILE_PATH_LITERAL("c:"), FILE_PATH_LITERAL("bar")}},
 #ifdef FILE_PATH_USES_WIN_SEPARATORS
-    { FILE_PATH_LITERAL("c:\\bar"),
-      2,
-      { FILE_PATH_LITERAL("c:"), FILE_PATH_LITERAL("bar") } },
+      {FILE_PATH_LITERAL("c:\\bar"),
+       2,
+       {FILE_PATH_LITERAL("c:"), FILE_PATH_LITERAL("bar")}},
 #endif
   };
   for (const auto& test_case : test_cases) {
diff --git a/testing/buildbot/filters/bfcache.browser_tests.filter b/testing/buildbot/filters/bfcache.browser_tests.filter
index b9afc26..11c2c14 100644
--- a/testing/buildbot/filters/bfcache.browser_tests.filter
+++ b/testing/buildbot/filters/bfcache.browser_tests.filter
@@ -1,8 +1,5 @@
 # These tests currently fail when run with --enable-features=BackForwardCache
 
-# No focused view.
--PaymentRequestShippingAddressEditorTest.FocusFirstInvalidField_NotName
-
 # Test are using a custom NavigateToURL function waiting for the old
 # RenderFrameHost to be deleted. This won't happen.
 -ProcessManagementTest.ExtensionProcessBalancing
@@ -13,14 +10,17 @@
 # but it isn't reloaded at all with the BackForwardCache.
 -PreviewsLitePageRedirectServerBrowserTest.LitePagePreviewsNavigation/*
 
-# Very flaky. Can't reproduce locally, it always succeed.
--SystemNetworkContextManagerMaxConnectionsPerProxyBrowsertest.MaxConnectionsPerProxy
-
 # Flaky on the bots, need to be investigated, see https://crbug.com/1010870.
+# 16/100 failures.
+# https://chromium-swarm.appspot.com/task?id=48104c14d9892f10
 -BookmarksCommandManagerTest.All
 
 # Time out since the removal of bfcache timed eviction. Probably waiting on the
 # RenderFrameHost deletion.
 -CredentialManagerBrowserTest.StoreInUnloadHandler_CrossSite_OnDemandMojoPipe
--CredentialManagerBrowserTest.StoreInUnloadHandler_CrossSite_PreestablishedPipe
 
+# https://crbug.com/1017594
+-IsolatedAppTest.CrossProcessClientRedirect
+
+# https://crbug.com/1017597
+-ViewSourceWithSplitCacheEnabledTest.NetworkIsolationKeyReusedForBackNavigation/0
diff --git a/testing/buildbot/filters/bfcache.content_browsertests.filter b/testing/buildbot/filters/bfcache.content_browsertests.filter
index 93d4d4d..fa67bfec 100644
--- a/testing/buildbot/filters/bfcache.content_browsertests.filter
+++ b/testing/buildbot/filters/bfcache.content_browsertests.filter
@@ -1,8 +1,5 @@
 # These tests currently fail when run with --enable-features=BackForwardCache.
 
-# WebLock  (deadlock)
--LockManagerBrowserTest.*
-
 # Same-document navigation pointing to a URL that would cause a redirect if it
 # was reloaded. It never happen, because the document is restored directly.
 -NavigationControllerBrowserTest.SiteInstanceChangeOnHistoryNavigation
@@ -11,7 +8,6 @@
 # the BackForwardCache.
 -BackForwardCacheMetricsBrowserTest.Features_SameOriginSubframes_CrossOriginNavigation
 -NavigationControllerBrowserTest.FrameNavigationEntry_DynamicSubframeHistoryFallback
--NavigationControllerBrowserTest.FrameNavigationEntry_RecreatedSubframeBackForward
 -NavigationControllerBrowserTest.FrameNavigationEntry_SubframeHistoryFallback
 
 # Create a URLLoaderInterceptor. It should cause the navigation to fail, but it
@@ -21,9 +17,6 @@
 # Document expects javascript to run again from the beginning.
 -WebContentsImplBrowserTest.JavaScriptDialogsInMainAndSubframes
 
-# Page with no-cache, no-store, must-revalidate shouldn't be cached.
--NavigationControllerBrowserTest.UncacheablePost
-
 # Test expects the RenderFrameHost to be deleted after a navigation. It is now
 # stored into the BackForwardCache instead. It isn't deleted.
 -RenderFrameHostManagerTest.CleanupOnCrossProcessNavigation
@@ -34,10 +27,6 @@
 -WebContentsBindingSetBrowserTest.CloseOnFrameDeletion
 -WorkerImportScriptsAndFetchRequestNetworkIsolationKeyBrowserTest.ImportScriptsAndFetchRequest/*
 
-# This test waits for a network request after a back navigation. It won't be
-# made, because the document is restored from the BackForwardCache.
--RenderFrameHostManagerTest.DeleteSpeculativeRFHPendingCommitOfPendingEntryOnInterrupted2
-
 # Wait for the old process to exit. It won't, because it is still used by a
 # bfcached document.
 -DynamicIsolatedOriginTest.LockedProcessNotReusedForNonisolatedSameSiteNavigation
@@ -62,42 +51,5 @@
 -SignedExchangeRequestHandlerBrowserTest.Simple/3
 -SignedExchangeRequestHandlerBrowserTest.VariantMatch/3
 
-# Check failed: !is_active().
-# https://crbug.com/1003744
--NavigationBaseBrowserTest.BackForwardInOldDocumentCancelPendingNavigation/1
--NavigationBaseBrowserTest.BackForwardInOldDocumentCancelPendingNavigation/0
-
-# The BackForwardCache evicts page asynchronously. The test expects the
-# RenderFrameHostImpl to be removed immediately.
--SitePerProcessBrowserTest.RenderViewHostIsNotReusedAfterDelayedSwapOutACK
-
-# Android-only test. Timeout.
-# https://crbug.com/1004786
--SitePerProcessBrowserTest.TestChildProcessImportance
-
-# NOTREACHED() is hit in RenderFrameHostManager::GetFrameHostForNavigation,
-# because, "A frame that's pending deletion should never be navigated.".
--NavigationControllerBrowserTest.PageStateWithIframeAfterForwardInCompetingFrames
--SitePerProcessBrowserTest.TwoCrossSitePendingNavigationsAndMainFrameWins
-
-# Failing on android only, need to be triaged, see https://crbug.com/1006267.
--BackForwardCacheMetricsBrowserTest.Fetch
--BackForwardCacheMetricsBrowserTest.XHR
--WebContentsSplitCacheBrowserTestEnabled.SplitCache*
--WebRtcBrowserTest.CanSetupH264VideoCallOnSupportedDevice
--WithoutCORBProtectionSniffing/CrossSiteDocumentBlockingTest.*
--WithCORBProtectionSniffing/CrossSiteDocumentBlockingTest.*
-
-# Flaky on android only, need to be triaged, see https://crbug.com/1006267.
--IndexedDBBrowserTest*
--MHTMLGenerationTest/MHTMLGenerationTest.*
--MSE_ClearKey/EncryptedMediaTest.*
--MSE_ExternalClearKey/EncryptedMediaTest.*
--NavigationControllerBrowserTest.BackOnBrowserInitiatedErrorPageNavigation
--NavigationControllerBrowserTest.BackSameDocumentAfterBlockedSubframe
--NavigationControllerBrowserTest.BrowserInitiatedLoadPostCommitErrorPageForSubframe
--NavigationControllerBrowserTest.PageStateAfterForwardInCompetingFrames
--NavigationControllerBrowserTest.ReplacedNavigationEntryData_Back
--RenderViewHostTest.IsFocusedElementEditable
--TouchInputBrowserTest.*
--TouchpadPinchBrowserTest.*
+# https://crbug.com/1017605
+-SecurityExploitBrowserTest.InvalidBeginNavigationInitiator
diff --git a/testing/buildbot/gn_isolate_map.pyl b/testing/buildbot/gn_isolate_map.pyl
index 70b77cf8..40c9ffa7 100644
--- a/testing/buildbot/gn_isolate_map.pyl
+++ b/testing/buildbot/gn_isolate_map.pyl
@@ -1850,14 +1850,6 @@
     "label": "//chrome/android:monochrome_static_initializers",
     "type": "additional_compile_target",
   },
-  "motopho_latency_test": {
-    "args": [
-      "-v",
-    ],
-    "label": "//chrome/test/vr/perf:motopho_latency_test",
-    "script": "//chrome/test/vr/perf/latency/run_latency_test.py",
-    "type": "script",
-  },
   "nacl_helper": {
     "label": "//components/nacl/loader:nacl_helper",
     "skip_usage_check": True,
diff --git a/testing/buildbot/manage.py b/testing/buildbot/manage.py
index 5f4b42a..7753306a 100755
--- a/testing/buildbot/manage.py
+++ b/testing/buildbot/manage.py
@@ -129,7 +129,6 @@
   'media_router_e2e_tests',
   'media_router_junit_tests',
   'media_router_perf_tests',
-  'motopho_latency_test',
   'net_junit_tests',
   'net_junit_tests',
   'service_junit_tests',
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json
index 7798698d..f98e910 100644
--- a/testing/variations/fieldtrial_testing_config.json
+++ b/testing/variations/fieldtrial_testing_config.json
@@ -605,7 +605,7 @@
             ],
             "experiments": [
                 {
-                    "name": "AppListZeroStateMixedTypesRanker",
+                    "name": "Enabled_20191017",
                     "enable_features": [
                         "EnableZeroStateMixedTypesRanker"
                     ]
diff --git a/third_party/blink/public/mojom/native_file_system/native_file_system_directory_handle.mojom b/third_party/blink/public/mojom/native_file_system/native_file_system_directory_handle.mojom
index 9c33fd9..438d6704 100644
--- a/third_party/blink/public/mojom/native_file_system/native_file_system_directory_handle.mojom
+++ b/third_party/blink/public/mojom/native_file_system/native_file_system_directory_handle.mojom
@@ -21,6 +21,15 @@
   string name;
 };
 
+interface NativeFileSystemDirectoryEntriesListener {
+  // Called by NativeFileSystemDirectoryHandle.GetEntries when some entries
+  // have been obtained. |has_more_entries| is false when all the entries have
+  // been obtained, and  indicates that the callback will not be called again.
+  DidReadDirectory(NativeFileSystemError result,
+                   array<NativeFileSystemEntry> entries,
+                   bool has_more_entries);
+};
+
 // This interface represents a handle to a directory in the Native File System
 // API.
 //
@@ -55,9 +64,7 @@
        pending_remote<NativeFileSystemDirectoryHandle>? directory);
 
   // Returns all the direct children of this directory.
-  // TODO(mek): Change this API to stream results in chunks rather than block
-  // until all entries have been retrieved.
-  GetEntries() => (NativeFileSystemError result, array<NativeFileSystemEntry> entries);
+  GetEntries(pending_remote<NativeFileSystemDirectoryEntriesListener> listener);
 
   // Deletes an entry which is a child of this directory.
   // To delete recursively, set |recurse| to true.
diff --git a/third_party/blink/public/mojom/web_feature/web_feature.mojom b/third_party/blink/public/mojom/web_feature/web_feature.mojom
index 189db1f2..2f75c5b9 100644
--- a/third_party/blink/public/mojom/web_feature/web_feature.mojom
+++ b/third_party/blink/public/mojom/web_feature/web_feature.mojom
@@ -2445,6 +2445,8 @@
   kDecompressionStreamConstructor = 3061,
   kV8RTCRtpReceiver_PlayoutDelayHint_AttributeGetter = 3062,
   kV8RTCRtpReceiver_PlayoutDelayHint_AttributeSetter = 3063,
+  kV8RegExpExecCalledOnSlowRegExp = 3064,
+  kV8RegExpReplaceCalledOnSlowRegExp = 3065,
 
   // Add new features immediately above this line. Don't change assigned
   // numbers of any item, and don't reuse removed slots.
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
index e88219cb..69576ff 100644
--- a/third_party/blink/public/platform/platform.h
+++ b/third_party/blink/public/platform/platform.h
@@ -72,10 +72,6 @@
 class SingleThreadTaskRunner;
 }
 
-namespace cricket {
-class PortAllocator;
-}
-
 namespace gpu {
 class GpuMemoryBufferManager;
 }
@@ -101,10 +97,6 @@
 class ContextProvider;
 }
 
-namespace webrtc {
-class AsyncResolverFactory;
-}
-
 namespace blink {
 
 class ThreadSafeBrowserInterfaceBrokerProxy;
@@ -576,14 +568,6 @@
     return nullptr;
   }
 
-  // May return null if WebRTC functionality is not implemented.
-  virtual std::unique_ptr<cricket::PortAllocator> CreateWebRtcPortAllocator(
-      WebLocalFrame* frame);
-
-  // May return null if WebRTC functionality is not implemented.
-  virtual std::unique_ptr<webrtc::AsyncResolverFactory>
-  CreateWebRtcAsyncResolverFactory();
-
   // Checks if the default minimum starting volume value for the AGC is
   // overridden on the command line.
   virtual base::Optional<double> GetWebRtcMaxCaptureFrameRate() {
diff --git a/third_party/blink/renderer/bindings/core/v8/use_counter_callback.cc b/third_party/blink/renderer/bindings/core/v8/use_counter_callback.cc
index 46acbdc2..7a098c8 100644
--- a/third_party/blink/renderer/bindings/core/v8/use_counter_callback.cc
+++ b/third_party/blink/renderer/bindings/core/v8/use_counter_callback.cc
@@ -234,6 +234,12 @@
     case v8::Isolate::kCallSiteAPIGetThisSloppyCall:
       blink_feature = WebFeature::kV8CallSiteAPIGetThisSloppyCall;
       break;
+    case v8::Isolate::kRegExpExecCalledOnSlowRegExp:
+      blink_feature = WebFeature::kV8RegExpExecCalledOnSlowRegExp;
+      break;
+    case v8::Isolate::kRegExpReplaceCalledOnSlowRegExp:
+      blink_feature = WebFeature::kV8RegExpReplaceCalledOnSlowRegExp;
+      break;
     default:
       // This can happen if V8 has added counters that this version of Blink
       // does not know about. It's harmless.
diff --git a/third_party/blink/renderer/bindings/modules/BUILD.gn b/third_party/blink/renderer/bindings/modules/BUILD.gn
index b4a1566..7c0d280 100644
--- a/third_party/blink/renderer/bindings/modules/BUILD.gn
+++ b/third_party/blink/renderer/bindings/modules/BUILD.gn
@@ -68,7 +68,6 @@
     "//third_party/blink/renderer/modules/speech/speech_synthesis_error_event.idl",
     "//third_party/blink/renderer/modules/speech/speech_synthesis_event.idl",
     "//third_party/blink/renderer/modules/storage/storage_event.idl",
-    "//third_party/blink/renderer/modules/vr/vr_display_event.idl",
     "//third_party/blink/renderer/modules/webaudio/audio_processing_event.idl",
     "//third_party/blink/renderer/modules/webaudio/offline_audio_completion_event.idl",
     "//third_party/blink/renderer/modules/webgl/webgl_context_event.idl",
diff --git a/third_party/blink/renderer/bindings/scripts/bind_gen/code_node.py b/third_party/blink/renderer/bindings/scripts/bind_gen/code_node.py
index 0d4c79a..1015f30 100644
--- a/third_party/blink/renderer/bindings/scripts/bind_gen/code_node.py
+++ b/third_party/blink/renderer/bindings/scripts/bind_gen/code_node.py
@@ -58,8 +58,10 @@
 
         def __init__(self):
             # Symbols used in generated code, but not yet defined.  See also
-            # SymbolNode.
-            self.undefined_code_symbols = set()
+            # SymbolNode.  Code symbols are accumulated in order from the first
+            # appearance to the last.  This order affects the insertion order of
+            # SymbolDefinitionNodes at SymbolScopeNode.
+            self.undefined_code_symbols = []
 
     class _LooseFormatter(string.Formatter):
         def get_value(self, key, args, kwargs):
@@ -281,11 +283,21 @@
             return self.upstream.is_code_symbol_defined(symbol_node)
         return False
 
+    def is_code_symbol_registered(self, symbol_node):
+        """
+        Returns True if |symbol_node| is registered and available for use at
+        this point.  See also |SymbolScopeNode.register_code_symbol|.
+        """
+        if self.outer is not None:
+            return self.outer.is_code_symbol_registered(symbol_node)
+        return False
+
     def on_undefined_code_symbol_found(self, symbol_node):
         """Receives a report of use of an undefined symbol node."""
         assert isinstance(symbol_node, SymbolNode)
         state = self.current_render_state
-        state.undefined_code_symbols.add(symbol_node)
+        if symbol_node not in state.undefined_code_symbols:
+            state.undefined_code_symbols.append(symbol_node)
 
     def likeliness_of_undefined_code_symbol_usage(self, symbol_node):
         """
@@ -532,13 +544,12 @@
             separator_last="\n",
             renderer=renderer)
 
+        self._registered_code_symbols = set()
+
     def _render(self, renderer, last_render_state):
-        # Sort nodes in order to render reproducible results.
-        symbol_nodes = sorted(
-            last_render_state.undefined_code_symbols,
-            key=lambda symbol_node: symbol_node.name)
-        for symbol_node in symbol_nodes:
-            if not self.is_code_symbol_defined(symbol_node):
+        for symbol_node in last_render_state.undefined_code_symbols:
+            if (self.is_code_symbol_registered(symbol_node)
+                    and not self.is_code_symbol_defined(symbol_node)):
                 self._insert_symbol_definition(symbol_node)
 
         return super(SymbolScopeNode, self)._render(
@@ -605,10 +616,17 @@
         did_insert = insert_right_before_first_use(self)
         assert did_insert
 
+    def is_code_symbol_registered(self, symbol_node):
+        if symbol_node in self._registered_code_symbols:
+            return True
+        return super(SymbolScopeNode,
+                     self).is_code_symbol_registered(symbol_node)
+
     def register_code_symbol(self, symbol_node):
         """Registers a SymbolNode and makes it available in this scope."""
         assert isinstance(symbol_node, SymbolNode)
         self.add_template_var(symbol_node.name, symbol_node)
+        self._registered_code_symbols.add(symbol_node)
 
     def register_code_symbols(self, symbol_nodes):
         for symbol_node in symbol_nodes:
diff --git a/third_party/blink/renderer/bindings/scripts/bind_gen/code_node_test.py b/third_party/blink/renderer/bindings/scripts/bind_gen/code_node_test.py
index 0b6340b9..ee1e2b9 100644
--- a/third_party/blink/renderer/bindings/scripts/bind_gen/code_node_test.py
+++ b/third_party/blink/renderer/bindings/scripts/bind_gen/code_node_test.py
@@ -279,3 +279,23 @@
   return var2;
 }
 """)
+
+    def test_template_error_handling(self):
+        renderer = MakoRenderer()
+
+        root = SymbolScopeNode(renderer=renderer)
+        root.append(
+            SymbolScopeNode([
+                # Have Mako raise a NameError.
+                TextNode("${unbound_symbol}"),
+            ]))
+
+        with self.assertRaises(NameError):
+            root.render()
+
+        callers_on_error = list(renderer.callers_on_error)
+        self.assertEqual(len(callers_on_error), 3)
+        self.assertEqual(callers_on_error[0], root[0][0])
+        self.assertEqual(callers_on_error[1], root[0])
+        self.assertEqual(callers_on_error[2], root)
+        self.assertEqual(renderer.last_caller_on_error, root[0][0])
diff --git a/third_party/blink/renderer/bindings/scripts/bind_gen/mako_renderer.py b/third_party/blink/renderer/bindings/scripts/bind_gen/mako_renderer.py
index a9f6b05..8749419 100644
--- a/third_party/blink/renderer/bindings/scripts/bind_gen/mako_renderer.py
+++ b/third_party/blink/renderer/bindings/scripts/bind_gen/mako_renderer.py
@@ -2,6 +2,8 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
+import sys
+
 import mako.lookup
 import mako.template
 
@@ -10,11 +12,15 @@
     """Represents a renderer object implemented with Mako templates."""
 
     def __init__(self, template_dirs=None):
-        template_dirs = template_dirs or []
+        self._template_params = {
+            "strict_undefined": True,
+        }
+
         self._template_lookup = mako.lookup.TemplateLookup(
-            directories=template_dirs)
+            directories=template_dirs, **self._template_params)
 
         self._caller_stack = []
+        self._caller_stack_on_error = []
 
     def render(self,
                caller,
@@ -47,8 +53,32 @@
             if template_path is not None:
                 template = self._template_lookup.get_template(template_path)
             elif template_text is not None:
-                template = mako.template.Template(text=template_text)
+                template = mako.template.Template(
+                    text=template_text, **self._template_params)
+
             text = template.render(**template_vars)
+        except:
+            # Print stacktrace of template rendering.
+            sys.stderr.write("\n")
+            sys.stderr.write("==== template rendering error ====\n")
+            sys.stderr.write("  * name: {}, type: {}\n".format(
+                _guess_caller_name(self.last_caller), type(self.last_caller)))
+            sys.stderr.write("  * depth: {}, module_id: {}\n".format(
+                len(self._caller_stack), template.module_id))
+            sys.stderr.write("---- template source ----\n")
+            sys.stderr.write(template.source)
+
+            # Save the error state at the deepest call.
+            current = self._caller_stack
+            on_error = self._caller_stack_on_error
+            if (len(current) <= len(on_error)
+                    and all(current[i] == on_error[i]
+                            for i in xrange(len(current)))):
+                pass  # Error happened in a deeper caller.
+            else:
+                self._caller_stack_on_error = list(self._caller_stack)
+
+            raise
         finally:
             self._caller_stack.pop()
 
@@ -66,3 +96,37 @@
     def last_caller(self):
         """Returns the last caller in the call stack of this renderer."""
         return self._caller_stack[-1]
+
+    @property
+    def callers_on_error(self):
+        """
+        Returns the callers of this renderer in the order from the last caller
+        to the first caller at the moment when an exception was thrown.
+        """
+        return reversed(self._caller_stack_on_error)
+
+    @property
+    def last_caller_on_error(self):
+        """
+        Returns the deepest caller at the moment when an exception was thrown.
+        """
+        return self._caller_stack_on_error[-1]
+
+
+def _guess_caller_name(caller):
+    """Returns the best-guessed name of |caller|."""
+    try:
+        # Outer CodeNode may have a binding to the caller.
+        for name, value in caller.outer.template_vars.iteritems():
+            if value is caller:
+                return name
+        try:
+            # Outer SequenceNode may contain the caller.
+            for index, value in enumerate(caller.outer, 1):
+                if value is caller:
+                    return "{}-of-{}-in-seq".format(index, len(caller.outer))
+        except:
+            pass
+        return "<no name>"
+    except:
+        return "<unknown>"
diff --git a/third_party/blink/renderer/core/accessibility/apply_dark_mode.cc b/third_party/blink/renderer/core/accessibility/apply_dark_mode.cc
index 269edc4..2fd3d71b 100644
--- a/third_party/blink/renderer/core/accessibility/apply_dark_mode.cc
+++ b/third_party/blink/renderer/core/accessibility/apply_dark_mode.cc
@@ -102,18 +102,9 @@
   return settings;
 }
 
-// In theory it should be sufficient for the disabled settings to set mode to
-// kOff (or to just return the default struct) without also setting
-// image_policy. However, this causes images to be inverted unexpectedly in
-// some cases (such as when toggling between the site's light and dark theme
-// on arstechnica.com).
-//
-// TODO(gilmanmh): Investigate unexpected image inversion behavior when
-// image_policy not set to kFilterNone.
 DarkModeSettings GetDisabledSettings() {
   DarkModeSettings settings;
   settings.mode = DarkModeInversionAlgorithm::kOff;
-  settings.image_policy = DarkModeImagePolicy::kFilterNone;
   return settings;
 }
 
diff --git a/third_party/blink/renderer/core/dom/element.cc b/third_party/blink/renderer/core/dom/element.cc
index 4e62440..d651994 100644
--- a/third_party/blink/renderer/core/dom/element.cc
+++ b/third_party/blink/renderer/core/dom/element.cc
@@ -333,6 +333,16 @@
       return true;
     if (document.Printing() && element == document.documentElement())
       return true;
+
+    // Fall back to legacy layout for frameset documents. The frameset itself
+    // (and the frames) can only create legacy layout objects anyway (no NG
+    // counterpart for them yet). However, the layout object for the HTML root
+    // element would be an NG one. If we'd then print the document, we'd fall
+    // back to legacy layout (because of the above check), which would re-attach
+    // all layout objects, which would cause the frameset to lose state of some
+    // sort, leaving everything blank when printed.
+    if (document.IsFrameSet())
+      return true;
   }
 
   // 'text-combine-upright' property is not supported yet.
diff --git a/third_party/blink/renderer/core/editing/selection_modifier.cc b/third_party/blink/renderer/core/editing/selection_modifier.cc
index 9fd25c3..07e3b9e8 100644
--- a/third_party/blink/renderer/core/editing/selection_modifier.cc
+++ b/third_party/blink/renderer/core/editing/selection_modifier.cc
@@ -159,9 +159,9 @@
     return base::nullopt;
 
   if (NGInlineFormattingContextOf(adjusted.GetPosition())) {
-    if (const NGPaintFragment* fragment =
-            ComputeNGCaretPosition(adjusted).PaintFragment())
-      return fragment->PhysicalFragment().ResolvedDirection();
+    const NGInlineCursor& cursor = ComputeNGCaretPosition(adjusted).cursor;
+    if (cursor)
+      return cursor.CurrentResolvedDirection();
     return base::nullopt;
   }
 
@@ -181,11 +181,11 @@
     return base::nullopt;
 
   if (NGInlineFormattingContextOf(adjusted.GetPosition())) {
-    if (const NGPaintFragment* fragment =
-            ComputeNGCaretPosition(adjusted).PaintFragment()) {
-      return ParagraphDirectionOf(*fragment);
-    }
-    return base::nullopt;
+    NGInlineCursor line = ComputeNGCaretPosition(adjusted).cursor;
+    if (!line)
+      return base::nullopt;
+    line.MoveToContainingLine();
+    return line.CurrentBaseDirection();
   }
 
   if (const InlineBox* box =
diff --git a/third_party/blink/renderer/core/frame/deprecation.cc b/third_party/blink/renderer/core/frame/deprecation.cc
index 400a106..817277e 100644
--- a/third_party/blink/renderer/core/frame/deprecation.cc
+++ b/third_party/blink/renderer/core/frame/deprecation.cc
@@ -346,11 +346,6 @@
               "https://www.chromestatus.com/features/4964279606312960 for more "
               "details."};
 
-    case WebFeature::kVREyeParametersOffset:
-      return {"VREyeParametersOffset", kUnknown,
-              ReplacedBy("VREyeParameters.offset",
-                         "view matrices provided by VRFrameData")};
-
     case WebFeature::kCSSSelectorInternalMediaControlsOverlayCastButton:
       return {
           "CSSSelectorInternalMediaControlsOverlayCastButton", kM61,
@@ -517,14 +512,6 @@
               ReplacedWillBeRemoved("Atomics.wake", "Atomics.notify", kM76,
                                     "6228189936353280")};
 
-    case WebFeature::kVRGetDisplays:
-      return {"WebVR", kM79,
-              String::Format("WebVR is deprecated and will be removed as soon "
-                             "as %s. Please use WebXR instead.  See "
-                             "https://www.chromestatus.com/feature/"
-                             "4532810371039232 for details.",
-                             MilestoneString(kM79))};
-
     case WebFeature::kCSSValueAppearanceCheckboxForOthersRendered:
       return {"CSSValueAppearanceCheckboxForOthersRendered", kM79,
               WillBeRemoved("'-webkit-appearance: checkbox' for elements other "
diff --git a/third_party/blink/renderer/core/inspector/inspector_performance_agent.cc b/third_party/blink/renderer/core/inspector/inspector_performance_agent.cc
index c8222ba0..716a15d 100644
--- a/third_party/blink/renderer/core/inspector/inspector_performance_agent.cc
+++ b/third_party/blink/renderer/core/inspector/inspector_performance_agent.cc
@@ -95,11 +95,11 @@
         " is enabled.");
   }
 
-  using namespace protocol::Performance::SetTimeDomain;
-
-  if (time_domain == TimeDomainEnum::TimeTicks) {
+  if (time_domain ==
+      protocol::Performance::SetTimeDomain::TimeDomainEnum::TimeTicks) {
     use_thread_ticks_.Clear();
-  } else if (time_domain == TimeDomainEnum::ThreadTicks) {
+  } else if (time_domain == protocol::Performance::SetTimeDomain::
+                                TimeDomainEnum::ThreadTicks) {
     if (!base::ThreadTicks::IsSupported()) {
       return Response::Error("Thread time is not supported on this platform.");
     }
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_item_result.cc b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_item_result.cc
index 801aaf3..b6e4388 100644
--- a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_item_result.cc
+++ b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_item_result.cc
@@ -220,18 +220,7 @@
   for (const NGInlineItemResult& item_result : Results())
     inline_size += item_result.inline_size;
 
-  if (UNLIKELY(line_end_fragment_)) {
-    inline_size += line_end_fragment_->Size()
-                       .ConvertToLogical(LineStyle().GetWritingMode())
-                       .inline_size;
-  }
-
   return inline_size;
 }
 
-void NGLineInfo::SetLineEndFragment(
-    scoped_refptr<const NGPhysicalTextFragment> fragment) {
-  line_end_fragment_ = std::move(fragment);
-}
-
 }  // namespace blink
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_item_result.h b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_item_result.h
index c55dfae4..a8a97f9 100644
--- a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_item_result.h
+++ b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_item_result.h
@@ -7,7 +7,6 @@
 
 #include "third_party/blink/renderer/core/layout/ng/geometry/ng_box_strut.h"
 #include "third_party/blink/renderer/core/layout/ng/inline/ng_physical_text_fragment.h"
-#include "third_party/blink/renderer/core/layout/ng/inline/ng_text_end_effect.h"
 #include "third_party/blink/renderer/core/layout/ng/ng_layout_result.h"
 #include "third_party/blink/renderer/core/layout/ng/ng_positioned_float.h"
 #include "third_party/blink/renderer/platform/fonts/shaping/shape_result.h"
@@ -37,6 +36,15 @@
     return end_offset - start_offset;
   }
 
+  LayoutUnit HyphenInlineSize() const {
+    return hyphen_shape_result->SnappedWidth().ClampNegativeToZero();
+  }
+
+  void ClearHyphen() {
+    hyphen_string = String();
+    hyphen_shape_result = nullptr;
+  }
+
   // The NGInlineItem and its index.
   const NGInlineItem* item;
   unsigned item_index;
@@ -52,6 +60,10 @@
   // is needed in the line breaker.
   scoped_refptr<const ShapeResultView> shape_result;
 
+  // Hyphen character and its |ShapeResult| if this text is hyphenated.
+  String hyphen_string;
+  scoped_refptr<const ShapeResult> hyphen_shape_result;
+
   // NGLayoutResult for atomic inline items.
   scoped_refptr<const NGLayoutResult> layout_result;
 
@@ -112,10 +124,6 @@
   // position) any unpositioned floats.
   bool has_unpositioned_floats = false;
 
-  // End effects for text items.
-  // The effects are included in |shape_result|, but not in text content.
-  NGTextEndEffect text_end_effect = NGTextEndEffect::kNone;
-
   NGInlineItemResult();
   NGInlineItemResult(const NGInlineItem*,
                      unsigned index,
@@ -242,12 +250,6 @@
   // justify alignment.
   bool NeedsAccurateEndPosition() const { return needs_accurate_end_position_; }
 
-  // Fragment to append to the line end. Used by 'text-overflow: ellipsis'.
-  scoped_refptr<const NGPhysicalTextFragment>& LineEndFragment() {
-    return line_end_fragment_;
-  }
-  void SetLineEndFragment(scoped_refptr<const NGPhysicalTextFragment>);
-
  private:
   bool ComputeNeedsAccurateEndPosition() const;
 
@@ -258,7 +260,6 @@
   const NGInlineItemsData* items_data_ = nullptr;
   const ComputedStyle* line_style_ = nullptr;
   NGInlineItemResults results_;
-  scoped_refptr<const NGPhysicalTextFragment> line_end_fragment_;
 
   NGBfcOffset bfc_offset_;
 
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.cc b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.cc
index a3558995e..f12452e 100644
--- a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.cc
+++ b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.cc
@@ -236,7 +236,7 @@
                                  baseline_type_);
       }
 
-      if (item.IsSymbolMarker()) {
+      if (UNLIKELY(item.IsSymbolMarker())) {
         text_builder.SetItem(NGPhysicalTextFragment::kSymbolMarker,
                              line_info->ItemsData(), &item_result,
                              box->text_height);
@@ -245,10 +245,19 @@
                              line_info->ItemsData(), &item_result,
                              box->text_height);
       }
-      line_box_.AddChild(text_builder.ToTextFragment(), box->text_top,
-                         item_result.inline_size, item.BidiLevel());
+      if (UNLIKELY(item_result.hyphen_shape_result)) {
+        LayoutUnit hyphen_inline_size = item_result.HyphenInlineSize();
+        line_box_.AddChild(text_builder.ToTextFragment(), box->text_top,
+                           item_result.inline_size - hyphen_inline_size,
+                           item.BidiLevel());
+        PlaceHyphen(item_result, hyphen_inline_size, box);
+      } else {
+        line_box_.AddChild(text_builder.ToTextFragment(), box->text_top,
+                           item_result.inline_size, item.BidiLevel());
+      }
       // Text boxes always need full paint invalidations.
       item.GetLayoutObject()->ClearNeedsLayoutWithFullPaintInvalidation();
+
     } else if (item.Type() == NGInlineItem::kControl) {
       PlaceControlItem(item, *line_info, &item_result, box);
     } else if (item.Type() == NGInlineItem::kOpenTag) {
@@ -284,13 +293,6 @@
     }
   }
 
-  if (line_info->LineEndFragment()) {
-    // Add a generated text fragment, hyphen or ellipsis, at the logical end.
-    // By using the paragraph bidi_level, it will appear at the visual end.
-    PlaceGeneratedContent(std::move(line_info->LineEndFragment()),
-                          IsLtr(line_info->BaseDirection()) ? 0 : 1, box);
-  }
-
   box_states_->OnEndPlaceItems(&line_box_, baseline_type_);
 
   if (UNLIKELY(Node().IsBidiEnabled())) {
@@ -425,32 +427,23 @@
                      item_result->inline_size, item.BidiLevel());
 }
 
-// Place a generated content that does not exist in DOM nor in LayoutObject
-// tree.
-void NGInlineLayoutAlgorithm::PlaceGeneratedContent(
-    scoped_refptr<const NGPhysicalTextFragment> fragment,
-    UBiDiLevel bidi_level,
-    NGInlineBoxState* box) {
-  LayoutUnit inline_size = IsHorizontalWritingMode() ? fragment->Size().width
-                                                     : fragment->Size().height;
-  const ComputedStyle& style = fragment->Style();
-  if (box->CanAddTextOfStyle(style)) {
-    if (UNLIKELY(quirks_mode_))
-      box->EnsureTextMetrics(style, baseline_type_);
-    DCHECK(!box->text_metrics.IsEmpty());
-    line_box_.AddChild(std::move(fragment), box->text_top, inline_size,
-                       bidi_level);
-  } else {
-    scoped_refptr<ComputedStyle> text_style =
-        ComputedStyle::CreateAnonymousStyleWithDisplay(style,
-                                                       EDisplay::kInline);
-    NGInlineBoxState* box = box_states_->OnOpenTag(*text_style, line_box_);
-    box->ComputeTextMetrics(*text_style, baseline_type_);
-    DCHECK(!box->text_metrics.IsEmpty());
-    line_box_.AddChild(std::move(fragment), box->text_top, inline_size,
-                       bidi_level);
-    box_states_->OnCloseTag(&line_box_, box, baseline_type_);
-  }
+void NGInlineLayoutAlgorithm::PlaceHyphen(const NGInlineItemResult& item_result,
+                                          LayoutUnit hyphen_inline_size,
+                                          NGInlineBoxState* box) {
+  DCHECK(item_result.item);
+  DCHECK(item_result.hyphen_string);
+  DCHECK(item_result.hyphen_shape_result);
+  DCHECK_EQ(hyphen_inline_size, item_result.HyphenInlineSize());
+  const NGInlineItem& item = *item_result.item;
+  const WritingMode writing_mode = ConstraintSpace().GetWritingMode();
+  NGTextFragmentBuilder builder(writing_mode);
+  builder.SetText(
+      item.GetLayoutObject(), item_result.hyphen_string, item.Style(),
+      /* is_ellipsis_style */ false,
+      ShapeResultView::Create(item_result.hyphen_shape_result.get()));
+  DCHECK(!box->text_metrics.IsEmpty());
+  line_box_.AddChild(builder.ToTextFragment(), box->text_top,
+                     hyphen_inline_size, item.BidiLevel());
 }
 
 NGInlineBoxState* NGInlineLayoutAlgorithm::PlaceAtomicInline(
@@ -694,8 +687,8 @@
   // matches to the |ShapeResult|.
   DCHECK(!line_info->Results().IsEmpty());
   const NGInlineItemResult& last_item_result = line_info->Results().back();
-  if (last_item_result.text_end_effect == NGTextEndEffect::kHyphen)
-    line_text_builder.Append(last_item_result.item->Style()->HyphenString());
+  if (last_item_result.hyphen_string)
+    line_text_builder.Append(last_item_result.hyphen_string);
 
   // Compute the spacing to justify.
   String line_text = line_text_builder.ToString();
@@ -714,14 +707,14 @@
       scoped_refptr<ShapeResult> shape_result =
           item_result.shape_result->CreateShapeResult();
       DCHECK_GE(item_result.start_offset, line_info->StartOffset());
-      // |shape_result| has more characters if it's hyphenated.
-      DCHECK(item_result.text_end_effect != NGTextEndEffect::kNone ||
-             shape_result->NumCharacters() ==
-                 item_result.end_offset - item_result.start_offset);
+      DCHECK_EQ(shape_result->NumCharacters(),
+                item_result.end_offset - item_result.start_offset);
       shape_result->ApplySpacing(spacing, item_result.start_offset -
                                               line_info->StartOffset() -
                                               shape_result->StartIndex());
       item_result.inline_size = shape_result->SnappedWidth();
+      if (UNLIKELY(item_result.hyphen_shape_result))
+        item_result.inline_size += item_result.HyphenInlineSize();
       item_result.shape_result = ShapeResultView::Create(shape_result.get());
     } else if (item_result.item->Type() == NGInlineItem::kAtomicInline) {
       float offset = 0.f;
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.h b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.h
index 6fe33fe9..71df67e 100644
--- a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.h
+++ b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.h
@@ -80,9 +80,9 @@
                         const NGLineInfo&,
                         NGInlineItemResult*,
                         NGInlineBoxState*);
-  void PlaceGeneratedContent(scoped_refptr<const NGPhysicalTextFragment>,
-                             UBiDiLevel,
-                             NGInlineBoxState*);
+  void PlaceHyphen(const NGInlineItemResult&,
+                   LayoutUnit hyphen_inline_size,
+                   NGInlineBoxState*);
   NGInlineBoxState* PlaceAtomicInline(const NGInlineItem&,
                                       const NGLineInfo&,
                                       NGInlineItemResult*);
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc b/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc
index d08ea84..e07af31 100644
--- a/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc
+++ b/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc
@@ -132,22 +132,16 @@
   return inline_end_size;
 }
 
-scoped_refptr<const NGPhysicalTextFragment> CreateHyphenFragment(
-    NGInlineNode node,
-    WritingMode writing_mode,
-    const NGInlineItem& item) {
+void CreateHyphen(NGInlineNode node,
+                  WritingMode writing_mode,
+                  const NGInlineItem& item,
+                  NGInlineItemResult* item_result) {
   DCHECK(item.Style());
   const ComputedStyle& style = *item.Style();
   TextDirection direction = style.Direction();
-  String hyphen_string = style.HyphenString();
-  HarfBuzzShaper shaper(hyphen_string);
-  scoped_refptr<ShapeResult> hyphen_result =
-      shaper.Shape(&style.GetFont(), direction);
-  NGTextFragmentBuilder builder(writing_mode);
-  builder.SetText(item.GetLayoutObject(), hyphen_string, &style,
-                  /* is_ellipsis_style */ false,
-                  ShapeResultView::Create(hyphen_result.get()));
-  return builder.ToTextFragment();
+  item_result->hyphen_string = style.HyphenString();
+  HarfBuzzShaper shaper(item_result->hyphen_string);
+  item_result->hyphen_shape_result = shaper.Shape(&style.GetFont(), direction);
 }
 
 inline void ClearNeedsLayout(const NGInlineItem& item) {
@@ -262,25 +256,6 @@
   max_size_cache_ = max_size_cache;
 }
 
-LayoutUnit NGLineBreaker::SetLineEndFragment(
-    scoped_refptr<const NGPhysicalTextFragment> fragment,
-    NGLineInfo* line_info) {
-  LayoutUnit inline_size;
-  bool is_horizontal =
-      IsHorizontalWritingMode(constraint_space_.GetWritingMode());
-  if (line_info->LineEndFragment()) {
-    const PhysicalSize& size = line_info->LineEndFragment()->Size();
-    inline_size = is_horizontal ? -size.width : -size.height;
-  }
-  if (fragment) {
-    const PhysicalSize& size = fragment->Size();
-    inline_size = is_horizontal ? size.width : size.height;
-  }
-  line_info->SetLineEndFragment(std::move(fragment));
-  position_ += inline_size;
-  return inline_size;
-}
-
 // Compute the base direction for bidi algorithm for this line.
 void NGLineBreaker::ComputeBaseDirection() {
   // If 'unicode-bidi' is not 'plaintext', use the base direction of the block.
@@ -752,25 +727,24 @@
     CHECK_GT(result.break_offset, item_result->start_offset);
 
     inline_size = shape_result->SnappedWidth().ClampNegativeToZero();
-    item_result->inline_size = inline_size;
     if (UNLIKELY(result.is_hyphenated)) {
       const WritingMode writing_mode = constraint_space_.GetWritingMode();
-      scoped_refptr<const NGPhysicalTextFragment> hyphen_fragment =
-          CreateHyphenFragment(node_, writing_mode, item);
+      CreateHyphen(node_, writing_mode, item, item_result);
+      DCHECK(item_result->hyphen_shape_result);
+      DCHECK(item_result->hyphen_string);
       LayoutUnit space_for_hyphen = available_width - inline_size;
-      LayoutUnit hyphen_inline_size = IsHorizontalWritingMode(writing_mode)
-                                          ? hyphen_fragment->Size().width
-                                          : hyphen_fragment->Size().height;
+      LayoutUnit hyphen_inline_size = item_result->HyphenInlineSize();
       // If the hyphen overflows, retry with the reduced available width.
       if (space_for_hyphen >= 0 && hyphen_inline_size > space_for_hyphen) {
         available_width -= hyphen_inline_size;
         continue;
       }
-      inline_size += SetLineEndFragment(std::move(hyphen_fragment), line_info);
-      item_result->text_end_effect = NGTextEndEffect::kHyphen;
+      inline_size += hyphen_inline_size;
+    } else if (UNLIKELY(item_result->hyphen_shape_result)) {
+      item_result->hyphen_shape_result = nullptr;
+      item_result->hyphen_string = String();
     }
-    item_result->inline_size =
-        shape_result->SnappedWidth().ClampNegativeToZero();
+    item_result->inline_size = inline_size;
     item_result->end_offset = result.break_offset;
     item_result->shape_result = std::move(shape_result);
     break;
@@ -1744,8 +1718,6 @@
           if (new_end == item_results->size()) {
             position_ =
                 available_width + width_to_rewind + item_result->inline_size;
-            if (line_info->LineEndFragment())
-              SetLineEndFragment(nullptr, line_info);
             DCHECK_EQ(position_, line_info->ComputeWidth());
             item_index_ = item_result->item_index;
             offset_ = item_result->end_offset;
@@ -1762,6 +1734,8 @@
           return;
         }
         SetCurrentStyle(*was_current_style);
+        if (i < item_results->size() - 1 && item_result->can_break_after)
+          break_before = i + 1;
         position_maybe_changed = true;
       }
     }
@@ -1814,6 +1788,23 @@
   const Vector<NGInlineItem>& items = Items();
   const NGInlineItemResults& item_results = line_info->Results();
   DCHECK_LT(new_end, item_results.size());
+
+  // |HandleOverflow()| may have tried to break the last text item. In that
+  // case, stop trying to include following items because there is a gap to the
+  // next item.
+  if (new_end) {
+    const NGInlineItemResult& item_result = item_results[new_end - 1];
+    DCHECK(item_result.item);
+    const NGInlineItem& item = *item_result.item;
+    if (item.Type() == NGInlineItem::kText &&
+        item.EndOffset() != item_result.end_offset) {
+      Rewind(new_end, line_info);
+      DCHECK_EQ(static_cast<unsigned>(&item - items.begin()), item_index_);
+      HandleTrailingSpaces(item, line_info);
+      return;
+    }
+  }
+
   unsigned open_tag_count = 0;
   const String& text = Text();
   for (unsigned index = new_end; index < item_results.size(); index++) {
@@ -1966,7 +1957,6 @@
   item_results.Shrink(new_end);
 
   trailing_collapsible_space_.reset();
-  SetLineEndFragment(nullptr, line_info);
   position_ = line_info->ComputeWidth();
 }
 
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.h b/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.h
index 37ceadf..3205bae 100644
--- a/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.h
+++ b/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.h
@@ -99,8 +99,6 @@
                               unsigned end_offset,
                               NGLineInfo*);
   NGInlineItemResult* AddItem(const NGInlineItem&, NGLineInfo*);
-  LayoutUnit SetLineEndFragment(scoped_refptr<const NGPhysicalTextFragment>,
-                                NGLineInfo*);
 
   void BreakLine(LayoutUnit percentage_resolution_block_size_for_min_max,
                  NGLineInfo*);
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_physical_text_fragment.h b/third_party/blink/renderer/core/layout/ng/inline/ng_physical_text_fragment.h
index 7d0adc9b..76a445e 100644
--- a/third_party/blink/renderer/core/layout/ng/inline/ng_physical_text_fragment.h
+++ b/third_party/blink/renderer/core/layout/ng/inline/ng_physical_text_fragment.h
@@ -6,7 +6,6 @@
 #define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_NG_INLINE_NG_PHYSICAL_TEXT_FRAGMENT_H_
 
 #include "third_party/blink/renderer/core/core_export.h"
-#include "third_party/blink/renderer/core/layout/ng/inline/ng_text_end_effect.h"
 #include "third_party/blink/renderer/core/layout/ng/ng_ink_overflow.h"
 #include "third_party/blink/renderer/core/layout/ng/ng_physical_fragment.h"
 #include "third_party/blink/renderer/platform/fonts/ng_text_fragment_paint_info.h"
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_text_end_effect.h b/third_party/blink/renderer/core/layout/ng/inline/ng_text_end_effect.h
deleted file mode 100644
index 0dbc9f8..0000000
--- a/third_party/blink/renderer/core/layout/ng/inline/ng_text_end_effect.h
+++ /dev/null
@@ -1,20 +0,0 @@
-// 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_BLINK_RENDERER_CORE_LAYOUT_NG_INLINE_NG_TEXT_END_EFFECT_H_
-#define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_NG_INLINE_NG_TEXT_END_EFFECT_H_
-
-namespace blink {
-
-// Effects at the end of text fragments.
-enum class NGTextEndEffect {
-  kNone,
-  kHyphen,
-
-  // When adding new values, ensure NGPhysicalTextFragment has enough bits.
-};
-
-}  // namespace blink
-
-#endif  // THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_NG_INLINE_NG_TEXT_END_EFFECT_H_
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_text_fragment_builder.h b/third_party/blink/renderer/core/layout/ng/inline/ng_text_fragment_builder.h
index 422fcd3..f97bbda 100644
--- a/third_party/blink/renderer/core/layout/ng/inline/ng_text_fragment_builder.h
+++ b/third_party/blink/renderer/core/layout/ng/inline/ng_text_fragment_builder.h
@@ -8,7 +8,6 @@
 #include "third_party/blink/renderer/core/layout/geometry/logical_size.h"
 #include "third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.h"
 #include "third_party/blink/renderer/core/layout/ng/inline/ng_physical_text_fragment.h"
-#include "third_party/blink/renderer/core/layout/ng/inline/ng_text_end_effect.h"
 #include "third_party/blink/renderer/core/layout/ng/ng_fragment_builder.h"
 #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
 
diff --git a/third_party/blink/renderer/modules/BUILD.gn b/third_party/blink/renderer/modules/BUILD.gn
index 5f787b71..cabe4e8 100644
--- a/third_party/blink/renderer/modules/BUILD.gn
+++ b/third_party/blink/renderer/modules/BUILD.gn
@@ -141,7 +141,6 @@
     "//third_party/blink/renderer/modules/srcobject",
     "//third_party/blink/renderer/modules/storage",
     "//third_party/blink/renderer/modules/vibration",
-    "//third_party/blink/renderer/modules/vr",
     "//third_party/blink/renderer/modules/wake_lock",
     "//third_party/blink/renderer/modules/webaudio",
     "//third_party/blink/renderer/modules/webdatabase",
@@ -150,7 +149,6 @@
     "//third_party/blink/renderer/modules/webmidi",
     "//third_party/blink/renderer/modules/webshare",
     "//third_party/blink/renderer/modules/websockets",
-    "//third_party/blink/renderer/modules/webtransport",
     "//third_party/blink/renderer/modules/webusb",
     "//third_party/blink/renderer/modules/worklet",
     "//third_party/blink/renderer/modules/xr",
@@ -459,7 +457,6 @@
     "//third_party/blink/renderer/modules/gamepad:unit_tests",
     "//third_party/blink/renderer/modules/hid:unit_tests",
     "//third_party/blink/renderer/modules/storage:unit_tests",
-    "//third_party/blink/renderer/modules/webtransport:unit_tests",
     "//third_party/blink/renderer/platform",
     "//third_party/blink/renderer/platform/wtf",
     "//third_party/opus",
diff --git a/third_party/blink/renderer/modules/event_target_modules_names.json5 b/third_party/blink/renderer/modules/event_target_modules_names.json5
index 67818f7..46911fe9 100644
--- a/third_party/blink/renderer/modules/event_target_modules_names.json5
+++ b/third_party/blink/renderer/modules/event_target_modules_names.json5
@@ -63,7 +63,6 @@
     "SpeechRecognition",
     "SpeechSynthesis",
     "SpeechSynthesisUtterance",
-    "VRDisplay",
     "AudioContext",
     "AudioNode",
     "MIDIAccess",
diff --git a/third_party/blink/renderer/modules/gamepad/BUILD.gn b/third_party/blink/renderer/modules/gamepad/BUILD.gn
index 5835c74d..abfa14e 100644
--- a/third_party/blink/renderer/modules/gamepad/BUILD.gn
+++ b/third_party/blink/renderer/modules/gamepad/BUILD.gn
@@ -24,8 +24,6 @@
     "gamepad_haptic_actuator.h",
     "gamepad_list.cc",
     "gamepad_list.h",
-    "gamepad_pose.cc",
-    "gamepad_pose.h",
     "gamepad_shared_memory_reader.cc",
     "gamepad_shared_memory_reader.h",
     "navigator_gamepad.cc",
diff --git a/third_party/blink/renderer/modules/gamepad/gamepad.cc b/third_party/blink/renderer/modules/gamepad/gamepad.cc
index b8d4afe8..c27bd3f 100644
--- a/third_party/blink/renderer/modules/gamepad/gamepad.cc
+++ b/third_party/blink/renderer/modules/gamepad/gamepad.cc
@@ -43,7 +43,6 @@
       timestamp_(0.0),
       has_vibration_actuator_(false),
       vibration_actuator_type_(device::GamepadHapticActuatorType::kDualRumble),
-      display_id_(0),
       is_axis_data_dirty_(true),
       is_button_data_dirty_(true),
       time_origin_(time_origin),
@@ -72,21 +71,11 @@
   // also simpler than logic to conditionally call.
   SetVibrationActuatorInfo(device_gamepad.vibration_actuator);
 
-  if (device_gamepad.is_xr) {
-    SetPose(device_gamepad.pose);
-    SetHand(device_gamepad.hand);
-  }
-
   // These fields are not expected to change and will only be written when the
   // gamepad is newly connected.
   if (newly_connected) {
     SetId(device_gamepad.id);
     SetMapping(device_gamepad.mapping);
-
-    if (device_gamepad.is_xr && device_gamepad.display_id) {
-      // Re-map display ids, since we will hand out at most one VRDisplay.
-      SetDisplayId(1);
-    }
   }
 }
 
@@ -158,35 +147,6 @@
   vibration_actuator_type_ = actuator.type;
 }
 
-void Gamepad::SetPose(const device::GamepadPose& pose) {
-  if (!pose.not_null) {
-    if (pose_)
-      pose_ = nullptr;
-    return;
-  }
-
-  if (!pose_)
-    pose_ = MakeGarbageCollected<GamepadPose>();
-
-  pose_->SetPose(pose);
-}
-
-void Gamepad::SetHand(const device::GamepadHand& hand) {
-  switch (hand) {
-    case device::GamepadHand::kNone:
-      hand_ = "";
-      break;
-    case device::GamepadHand::kLeft:
-      hand_ = "left";
-      break;
-    case device::GamepadHand::kRight:
-      hand_ = "right";
-      break;
-    default:
-      NOTREACHED();
-  }
-}
-
 // Convert the raw timestamp from the device to a relative one and apply the
 // floor.
 void Gamepad::SetTimestamp(const device::Gamepad& device_gamepad) {
@@ -209,7 +169,6 @@
 void Gamepad::Trace(blink::Visitor* visitor) {
   visitor->Trace(client_);
   visitor->Trace(buttons_);
-  visitor->Trace(pose_);
   ScriptWrappable::Trace(visitor);
 }
 
diff --git a/third_party/blink/renderer/modules/gamepad/gamepad.h b/third_party/blink/renderer/modules/gamepad/gamepad.h
index 5f293d14..2f6db63 100644
--- a/third_party/blink/renderer/modules/gamepad/gamepad.h
+++ b/third_party/blink/renderer/modules/gamepad/gamepad.h
@@ -30,7 +30,6 @@
 #include "third_party/blink/renderer/core/dom/dom_high_res_time_stamp.h"
 #include "third_party/blink/renderer/modules/gamepad/gamepad_button.h"
 #include "third_party/blink/renderer/modules/gamepad/gamepad_haptic_actuator.h"
-#include "third_party/blink/renderer/modules/gamepad/gamepad_pose.h"
 #include "third_party/blink/renderer/modules/modules_export.h"
 #include "third_party/blink/renderer/platform/bindings/script_wrappable.h"
 #include "third_party/blink/renderer/platform/heap/handle.h"
@@ -89,15 +88,6 @@
     return vibration_actuator_type_;
   }
 
-  GamepadPose* pose() const { return pose_; }
-  void SetPose(const device::GamepadPose&);
-
-  const String& hand() const { return hand_; }
-  void SetHand(const device::GamepadHand&);
-
-  unsigned displayId() const { return display_id_; }
-  void SetDisplayId(unsigned val) { display_id_ = val; }
-
   void Trace(blink::Visitor*) override;
 
  private:
@@ -132,15 +122,6 @@
   // The type of haptic actuator used for vibration effects.
   device::GamepadHapticActuatorType vibration_actuator_type_;
 
-  // Snapshot of the gamepad pose.
-  Member<GamepadPose> pose_;
-
-  // A string representing the handedness of the gamepad.
-  String hand_;
-
-  // An identifier for associating a gamepad with a VR headset.
-  unsigned display_id_;
-
   // True if the data in |axes_| has changed since the last time it was
   // accessed.
   bool is_axis_data_dirty_;
diff --git a/third_party/blink/renderer/modules/gamepad/gamepad.idl b/third_party/blink/renderer/modules/gamepad/gamepad.idl
index 5de7236b..512bb8c 100644
--- a/third_party/blink/renderer/modules/gamepad/gamepad.idl
+++ b/third_party/blink/renderer/modules/gamepad/gamepad.idl
@@ -53,10 +53,4 @@
     // Gamepad vibration is proposed as an extension to the Gamepad API.
     // https://github.com/w3c/gamepad/pull/68
     [MeasureAs=GamepadVibrationActuator] readonly attribute GamepadHapticActuator? vibrationActuator;
-
-    [RuntimeEnabled=WebVR, MeasureAs=GamepadPose] readonly attribute GamepadPose? pose;
-    [RuntimeEnabled=WebVR, MeasureAs=GamepadHand] readonly attribute GamepadHand hand;
-
-    // https://w3c.github.io/webvr/#interface-gamepad
-    [RuntimeEnabled=WebVR, MeasureAs=GamepadDisplayId] readonly attribute unsigned long displayId;
 };
diff --git a/third_party/blink/renderer/modules/gamepad/gamepad_comparisons.cc b/third_party/blink/renderer/modules/gamepad/gamepad_comparisons.cc
index 1063286..a3f1141 100644
--- a/third_party/blink/renderer/modules/gamepad/gamepad_comparisons.cc
+++ b/third_party/blink/renderer/modules/gamepad/gamepad_comparisons.cc
@@ -127,14 +127,13 @@
         CompareAxes(old_gamepad, new_gamepad, i, compare_all_axes);
     bool any_button_updated =
         CompareButtons(old_gamepad, new_gamepad, i, compare_all_buttons);
-    bool pose_changed = ComparePose(old_gamepad, new_gamepad);
 
     if (newly_connected)
       gamepad_connected_.set(i);
     if (newly_disconnected)
       gamepad_disconnected_.set(i);
     if (newly_connected || newly_disconnected || any_axis_updated ||
-        any_button_updated || pose_changed) {
+        any_button_updated) {
       any_change = true;
     }
   }
@@ -226,67 +225,6 @@
   return any_button_changed;
 }
 
-bool GamepadStateCompareResult::ComparePose(Gamepad* old_gamepad,
-                                            Gamepad* new_gamepad) {
-  if (!new_gamepad)
-    return false;
-  const auto* new_pose = new_gamepad->pose();
-  const auto* old_pose = old_gamepad ? old_gamepad->pose() : nullptr;
-  if (old_pose && new_pose) {
-    // Both poses are non-null. Compare pose members until a difference is
-    // found.
-    if (CompareFloat32Array(old_pose->orientation(), new_pose->orientation())) {
-      return true;
-    }
-    if (CompareFloat32Array(old_pose->position(), new_pose->position())) {
-      return true;
-    }
-    if (CompareFloat32Array(old_pose->angularVelocity(),
-                            new_pose->angularVelocity())) {
-      return true;
-    }
-    if (CompareFloat32Array(old_pose->linearVelocity(),
-                            new_pose->linearVelocity())) {
-      return true;
-    }
-    if (CompareFloat32Array(old_pose->angularAcceleration(),
-                            new_pose->angularAcceleration())) {
-      return true;
-    }
-    if (CompareFloat32Array(old_pose->linearAcceleration(),
-                            new_pose->linearAcceleration())) {
-      return true;
-    }
-  } else if (old_pose != new_pose) {
-    // Exactly one pose is non-null.
-    return true;
-  }
-  // Both poses are null, or the poses are identical.
-  return false;
-}
-
-bool GamepadStateCompareResult::CompareFloat32Array(
-    DOMFloat32Array* old_array,
-    DOMFloat32Array* new_array) {
-  if (old_array && new_array) {
-    // Both arrays are non-null. Compare elements until a difference is found.
-    uint32_t length = old_array->length();
-    if (length != new_array->length())
-      return true;
-    const float* old_data = old_array->Data();
-    const float* new_data = new_array->Data();
-    for (uint32_t i = 0; i < length; ++i) {
-      if (old_data[i] != new_data[i])
-        return true;
-    }
-  } else if (old_array != new_array) {
-    // Exactly one array is non-null.
-    return true;
-  }
-  // Both arrays are null, or the arrays are identical.
-  return false;
-}
-
 GamepadStateCompareResult GamepadComparisons::Compare(
     GamepadList* old_gamepads,
     GamepadList* new_gamepads,
diff --git a/third_party/blink/renderer/modules/gamepad/gamepad_comparisons.h b/third_party/blink/renderer/modules/gamepad/gamepad_comparisons.h
index 5f2e1db..9133e9c 100644
--- a/third_party/blink/renderer/modules/gamepad/gamepad_comparisons.h
+++ b/third_party/blink/renderer/modules/gamepad/gamepad_comparisons.h
@@ -49,9 +49,6 @@
                       Gamepad* new_gamepad,
                       size_t gamepad_index,
                       bool compare_all);
-  bool ComparePose(Gamepad* old_gamepad, Gamepad* new_gamepad);
-  bool CompareFloat32Array(DOMFloat32Array* old_array,
-                           DOMFloat32Array* new_array);
 
   bool any_change_ = false;
   std::bitset<device::Gamepads::kItemsLengthCap> gamepad_connected_;
diff --git a/third_party/blink/renderer/modules/gamepad/gamepad_comparisons_test.cc b/third_party/blink/renderer/modules/gamepad/gamepad_comparisons_test.cc
index 0bceaae..5a6ede9 100644
--- a/third_party/blink/renderer/modules/gamepad/gamepad_comparisons_test.cc
+++ b/third_party/blink/renderer/modules/gamepad/gamepad_comparisons_test.cc
@@ -32,18 +32,6 @@
     v.z = 0.f;
   }
 
-  void InitGamepadPose(device::GamepadPose& p) {
-    p.not_null = true;
-    p.has_orientation = true;
-    p.has_position = true;
-    InitGamepadQuaternion(p.orientation);
-    InitGamepadVector(p.position);
-    InitGamepadVector(p.angular_velocity);
-    InitGamepadVector(p.linear_velocity);
-    InitGamepadVector(p.angular_acceleration);
-    InitGamepadVector(p.linear_acceleration);
-  }
-
   Gamepad* CreateGamepad() {
     base::TimeTicks dummy_time_origin =
         base::TimeTicks() + base::TimeDelta::FromMicroseconds(1000);
@@ -60,14 +48,12 @@
   GamepadList* CreateGamepadListWithNeutralGamepad() {
     double axes[1] = {0.0};
     device::GamepadButton buttons[1] = {{false, false, 0.0}};
-    device::GamepadPose null_pose;
     auto* list = MakeGarbageCollected<GamepadList>();
     auto* gamepad = CreateGamepad();
     gamepad->SetId("gamepad");
     gamepad->SetAxes(1, axes);
     gamepad->SetButtons(1, buttons);
     gamepad->SetConnected(true);
-    gamepad->SetPose(null_pose);
     list->Set(0, gamepad);
     return list;
   }
@@ -138,40 +124,6 @@
     return list;
   }
 
-  GamepadList* CreateGamepadListWithNeutralPose() {
-    double axes[1] = {0.0};
-    device::GamepadButton buttons[1] = {{false, false, 0.0}};
-    device::GamepadPose pose;
-    InitGamepadPose(pose);
-    auto* list = MakeGarbageCollected<GamepadList>();
-    auto* gamepad = CreateGamepad();
-    gamepad->SetId("gamepad");
-    gamepad->SetAxes(1, axes);
-    gamepad->SetButtons(1, buttons);
-    gamepad->SetConnected(true);
-    gamepad->SetPose(pose);
-    list->Set(0, gamepad);
-    return list;
-  }
-
-  GamepadList* CreateGamepadListWithAlteredPose() {
-    double axes[1] = {0.0};
-    device::GamepadButton buttons[1] = {{false, false, 0.0}};
-    device::GamepadPose pose;
-    InitGamepadPose(pose);
-    // Modify the linear velocity.
-    pose.linear_velocity.x = 100.f;
-    auto* list = MakeGarbageCollected<GamepadList>();
-    auto* gamepad = CreateGamepad();
-    gamepad->SetId("gamepad");
-    gamepad->SetAxes(1, axes);
-    gamepad->SetButtons(1, buttons);
-    gamepad->SetConnected(true);
-    gamepad->SetPose(pose);
-    list->Set(0, gamepad);
-    return list;
-  }
-
  private:
   DISALLOW_COPY_AND_ASSIGN(GamepadComparisonsTest);
 };
@@ -428,31 +380,4 @@
   EXPECT_FALSE(compareResult.IsButtonUp(0, 0));
 }
 
-TEST_F(GamepadComparisonsTest, CompareNeutralPoseWithNeutralPose) {
-  auto* list1 = CreateGamepadListWithNeutralPose();
-  auto* list2 = CreateGamepadListWithNeutralPose();
-
-  auto compareResult = GamepadComparisons::Compare(
-      list1, list2, /*compare_all_axes=*/false, /*compare_all_buttons=*/false);
-  EXPECT_FALSE(compareResult.IsDifferent());
-}
-
-TEST_F(GamepadComparisonsTest, CompareNullPoseWithNeutralPose) {
-  auto* list1 = CreateGamepadListWithNeutralGamepad();
-  auto* list2 = CreateGamepadListWithNeutralPose();
-
-  auto compareResult = GamepadComparisons::Compare(
-      list1, list2, /*compare_all_axes=*/false, /*compare_all_buttons=*/false);
-  EXPECT_TRUE(compareResult.IsDifferent());
-}
-
-TEST_F(GamepadComparisonsTest, CompareNeutralPoseWithAlteredPose) {
-  auto* list1 = CreateGamepadListWithNeutralPose();
-  auto* list2 = CreateGamepadListWithAlteredPose();
-
-  auto compareResult = GamepadComparisons::Compare(
-      list1, list2, /*compare_all_axes=*/false, /*compare_all_buttons=*/false);
-  EXPECT_TRUE(compareResult.IsDifferent());
-}
-
 }  // namespace blink
diff --git a/third_party/blink/renderer/modules/gamepad/gamepad_pose.cc b/third_party/blink/renderer/modules/gamepad/gamepad_pose.cc
deleted file mode 100644
index 6fce407..0000000
--- a/third_party/blink/renderer/modules/gamepad/gamepad_pose.cc
+++ /dev/null
@@ -1,64 +0,0 @@
-// 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.
-
-#include "third_party/blink/renderer/modules/gamepad/gamepad_pose.h"
-
-#include "device/gamepad/public/cpp/gamepad.h"
-
-namespace blink {
-
-namespace {
-
-DOMFloat32Array* VecToFloat32Array(const device::GamepadVector& vec) {
-  if (vec.not_null) {
-    DOMFloat32Array* out = DOMFloat32Array::Create(3);
-    out->Data()[0] = vec.x;
-    out->Data()[1] = vec.y;
-    out->Data()[2] = vec.z;
-    return out;
-  }
-  return nullptr;
-}
-
-DOMFloat32Array* QuatToFloat32Array(const device::GamepadQuaternion& quat) {
-  if (quat.not_null) {
-    DOMFloat32Array* out = DOMFloat32Array::Create(4);
-    out->Data()[0] = quat.x;
-    out->Data()[1] = quat.y;
-    out->Data()[2] = quat.z;
-    out->Data()[3] = quat.w;
-    return out;
-  }
-  return nullptr;
-}
-
-}  // namespace
-
-GamepadPose::GamepadPose() = default;
-
-void GamepadPose::SetPose(const device::GamepadPose& state) {
-  if (state.not_null) {
-    has_orientation_ = state.has_orientation;
-    has_position_ = state.has_position;
-
-    orientation_ = QuatToFloat32Array(state.orientation);
-    position_ = VecToFloat32Array(state.position);
-    angular_velocity_ = VecToFloat32Array(state.angular_velocity);
-    linear_velocity_ = VecToFloat32Array(state.linear_velocity);
-    angular_acceleration_ = VecToFloat32Array(state.angular_acceleration);
-    linear_acceleration_ = VecToFloat32Array(state.linear_acceleration);
-  }
-}
-
-void GamepadPose::Trace(blink::Visitor* visitor) {
-  visitor->Trace(orientation_);
-  visitor->Trace(position_);
-  visitor->Trace(angular_velocity_);
-  visitor->Trace(linear_velocity_);
-  visitor->Trace(angular_acceleration_);
-  visitor->Trace(linear_acceleration_);
-  ScriptWrappable::Trace(visitor);
-}
-
-}  // namespace blink
diff --git a/third_party/blink/renderer/modules/gamepad/gamepad_pose.h b/third_party/blink/renderer/modules/gamepad/gamepad_pose.h
deleted file mode 100644
index d7580717..0000000
--- a/third_party/blink/renderer/modules/gamepad/gamepad_pose.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// 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.
-
-#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_GAMEPAD_GAMEPAD_POSE_H_
-#define THIRD_PARTY_BLINK_RENDERER_MODULES_GAMEPAD_GAMEPAD_POSE_H_
-
-#include "third_party/blink/renderer/core/typed_arrays/dom_typed_array.h"
-#include "third_party/blink/renderer/platform/bindings/script_wrappable.h"
-#include "third_party/blink/renderer/platform/heap/member.h"
-
-namespace device {
-class GamepadPose;
-}
-
-namespace blink {
-
-class GamepadPose final : public ScriptWrappable {
-  DEFINE_WRAPPERTYPEINFO();
-
- public:
-  GamepadPose();
-
-  bool hasOrientation() const { return has_orientation_; }
-  bool hasPosition() const { return has_position_; }
-
-  DOMFloat32Array* orientation() const { return orientation_; }
-  DOMFloat32Array* position() const { return position_; }
-  DOMFloat32Array* angularVelocity() const { return angular_velocity_; }
-  DOMFloat32Array* linearVelocity() const { return linear_velocity_; }
-  DOMFloat32Array* angularAcceleration() const { return angular_acceleration_; }
-  DOMFloat32Array* linearAcceleration() const { return linear_acceleration_; }
-
-  void SetPose(const device::GamepadPose& state);
-
-  void Trace(blink::Visitor*) override;
-
- private:
-  bool has_orientation_;
-  bool has_position_;
-
-  Member<DOMFloat32Array> orientation_;
-  Member<DOMFloat32Array> position_;
-  Member<DOMFloat32Array> angular_velocity_;
-  Member<DOMFloat32Array> linear_velocity_;
-  Member<DOMFloat32Array> angular_acceleration_;
-  Member<DOMFloat32Array> linear_acceleration_;
-};
-
-}  // namespace blink
-
-#endif  // VRPose_h
diff --git a/third_party/blink/renderer/modules/gamepad/gamepad_pose.idl b/third_party/blink/renderer/modules/gamepad/gamepad_pose.idl
deleted file mode 100644
index 61fe24ff..0000000
--- a/third_party/blink/renderer/modules/gamepad/gamepad_pose.idl
+++ /dev/null
@@ -1,17 +0,0 @@
-// 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.
-
-// https://w3c.github.io/gamepad/extensions.html#gamepadpose-interface
-[
-    RuntimeEnabled=WebVR
-] interface GamepadPose {
-    [MeasureAs=GamepadPoseHasOrientation] readonly attribute boolean hasOrientation;
-    [MeasureAs=GamepadPoseHasPosition] readonly attribute boolean hasPosition;
-    [MeasureAs=GamepadPosePosition] readonly attribute Float32Array? position;
-    [MeasureAs=GamepadPoseLinearVelocity] readonly attribute Float32Array? linearVelocity;
-    [MeasureAs=GamepadPoseLinearAcceleration] readonly attribute Float32Array? linearAcceleration;
-    [MeasureAs=GamepadPoseOrientation] readonly attribute Float32Array? orientation;
-    [MeasureAs=GamepadPoseAngularVelocity] readonly attribute Float32Array? angularVelocity;
-    [MeasureAs=GamepadPoseAngularAcceleration] readonly attribute Float32Array? angularAcceleration;
-};
diff --git a/third_party/blink/renderer/modules/gamepad/navigator_gamepad.cc b/third_party/blink/renderer/modules/gamepad/navigator_gamepad.cc
index b59b275..2d58ec5e 100644
--- a/third_party/blink/renderer/modules/gamepad/navigator_gamepad.cc
+++ b/third_party/blink/renderer/modules/gamepad/navigator_gamepad.cc
@@ -40,7 +40,6 @@
 #include "third_party/blink/renderer/modules/gamepad/gamepad_dispatcher.h"
 #include "third_party/blink/renderer/modules/gamepad/gamepad_event.h"
 #include "third_party/blink/renderer/modules/gamepad/gamepad_list.h"
-#include "third_party/blink/renderer/modules/vr/navigator_vr.h"
 #include "third_party/blink/renderer/platform/wtf/text/atomic_string.h"
 
 namespace blink {
@@ -57,20 +56,6 @@
          window->HasEventListeners(event_type_names::kGamepaddisconnected);
 }
 
-// XR-backed controllers are only exposed via this path for WebVR (not
-// WebXR). Controllers are only exposed during VR presentation, so we can
-// just check if WebVR has been used. WebXR cannot be used once WebVR has been.
-bool ShouldIncludeXrGamepads(LocalFrame* frame) {
-  if (!frame)
-    return false;
-
-  Document* document = frame->GetDocument();
-  if (!document)
-    return false;
-
-  return NavigatorVR::HasWebVrBeenUsed(*document);
-}
-
 }  // namespace
 
 // static
@@ -132,13 +117,12 @@
   device::Gamepads gamepads;
   gamepad_dispatcher_->SampleGamepads(gamepads);
 
-  bool include_xr_gamepads = ShouldIncludeXrGamepads(GetFrame());
 
   for (uint32_t i = 0; i < device::Gamepads::kItemsLengthCap; ++i) {
     device::Gamepad& device_gamepad = gamepads.items[i];
 
-    bool hide_xr_gamepad = device_gamepad.is_xr && !include_xr_gamepads;
-    if (hide_xr_gamepad) {
+    // All WebXR gamepads should be hidden
+    if (device_gamepad.is_xr) {
       gamepads_back_->Set(i, nullptr);
     } else if (device_gamepad.connected) {
       Gamepad* gamepad = gamepads_back_->item(i);
diff --git a/third_party/blink/renderer/modules/imagecapture/DEPS b/third_party/blink/renderer/modules/imagecapture/DEPS
index d9f3687..a073069 100644
--- a/third_party/blink/renderer/modules/imagecapture/DEPS
+++ b/third_party/blink/renderer/modules/imagecapture/DEPS
@@ -6,4 +6,5 @@
   "+skia/ext/platform_canvas.h",
   "+third_party/libyuv",
   "+third_party/skia/include/core",
+  "+ui/gfx/gpu_memory_buffer.h",
 ]
diff --git a/third_party/blink/renderer/modules/imagecapture/image_capture_frame_grabber.cc b/third_party/blink/renderer/modules/imagecapture/image_capture_frame_grabber.cc
index d609544..1a250f12 100644
--- a/third_party/blink/renderer/modules/imagecapture/image_capture_frame_grabber.cc
+++ b/third_party/blink/renderer/modules/imagecapture/image_capture_frame_grabber.cc
@@ -18,6 +18,7 @@
 #include "third_party/libyuv/include/libyuv.h"
 #include "third_party/skia/include/core/SkImage.h"
 #include "third_party/skia/include/core/SkSurface.h"
+#include "ui/gfx/gpu_memory_buffer.h"
 
 namespace WTF {
 // Template specialization of [1], needed to be able to pass callbacks
@@ -79,7 +80,8 @@
     scoped_refptr<media::VideoFrame> frame,
     base::TimeTicks /* current_time */) {
   DCHECK(frame->format() == media::PIXEL_FORMAT_I420 ||
-         frame->format() == media::PIXEL_FORMAT_I420A);
+         frame->format() == media::PIXEL_FORMAT_I420A ||
+         frame->format() == media::PIXEL_FORMAT_NV12);
 
   if (first_frame_received_)
     return;
@@ -107,25 +109,68 @@
   const uint32_t destination_pixel_format =
       (kN32_SkColorType == kRGBA_8888_SkColorType) ? libyuv::FOURCC_ABGR
                                                    : libyuv::FOURCC_ARGB;
+  uint8_t* destination_plane = static_cast<uint8_t*>(pixmap.writable_addr());
+  int destination_stride = pixmap.width() * 4;
+  int destination_width = pixmap.width();
+  int destination_height = pixmap.height();
 
-  libyuv::ConvertFromI420(frame->visible_data(media::VideoFrame::kYPlane),
-                          frame->stride(media::VideoFrame::kYPlane),
-                          frame->visible_data(media::VideoFrame::kUPlane),
-                          frame->stride(media::VideoFrame::kUPlane),
-                          frame->visible_data(media::VideoFrame::kVPlane),
-                          frame->stride(media::VideoFrame::kVPlane),
-                          static_cast<uint8_t*>(pixmap.writable_addr()),
-                          pixmap.width() * 4, pixmap.width(), pixmap.height(),
-                          destination_pixel_format);
+  if (frame->storage_type() == media::VideoFrame::STORAGE_GPU_MEMORY_BUFFER) {
+    auto* gmb = frame->GetGpuMemoryBuffer();
+    if (!gmb->Map()) {
+      DLOG(ERROR) << "Error mapping GpuMemoryBuffer video frame";
+      std::move(wrapper_callback).Run(sk_sp<SkImage>());
+      return;
+    }
 
-  if (frame->format() == media::PIXEL_FORMAT_I420A) {
-    DCHECK(!info.isOpaque());
-    // This function copies any plane into the alpha channel of an ARGB image.
-    libyuv::ARGBCopyYToAlpha(frame->visible_data(media::VideoFrame::kAPlane),
-                             frame->stride(media::VideoFrame::kAPlane),
-                             static_cast<uint8_t*>(pixmap.writable_addr()),
-                             pixmap.width() * 4, pixmap.width(),
-                             pixmap.height());
+    // NV12 is the only supported pixel format at the moment.
+    DCHECK_EQ(frame->format(), media::PIXEL_FORMAT_NV12);
+    int y_stride = gmb->stride(0);
+    int uv_stride = gmb->stride(1);
+    const uint8_t* y_plane =
+        (static_cast<uint8_t*>(gmb->memory(0)) + frame->visible_rect().x() +
+         (frame->visible_rect().y() * y_stride));
+    // UV plane of NV12 has 2-byte pixel width, with half chroma subsampling
+    // both horizontally and vertically.
+    const uint8_t* uv_plane = (static_cast<uint8_t*>(gmb->memory(1)) +
+                               ((frame->visible_rect().x() * 2) / 2) +
+                               ((frame->visible_rect().y() / 2) * uv_stride));
+
+    switch (destination_pixel_format) {
+      case libyuv::FOURCC_ABGR:
+        libyuv::NV12ToABGR(y_plane, y_stride, uv_plane, uv_stride,
+                           destination_plane, destination_stride,
+                           destination_width, destination_height);
+        break;
+      case libyuv::FOURCC_ARGB:
+        libyuv::NV12ToARGB(y_plane, y_stride, uv_plane, uv_stride,
+                           destination_plane, destination_stride,
+                           destination_width, destination_height);
+        break;
+      default:
+        NOTREACHED();
+    }
+    gmb->Unmap();
+  } else {
+    DCHECK(frame->format() == media::PIXEL_FORMAT_I420 ||
+           frame->format() == media::PIXEL_FORMAT_I420A);
+    libyuv::ConvertFromI420(frame->visible_data(media::VideoFrame::kYPlane),
+                            frame->stride(media::VideoFrame::kYPlane),
+                            frame->visible_data(media::VideoFrame::kUPlane),
+                            frame->stride(media::VideoFrame::kUPlane),
+                            frame->visible_data(media::VideoFrame::kVPlane),
+                            frame->stride(media::VideoFrame::kVPlane),
+                            destination_plane, destination_stride,
+                            destination_width, destination_height,
+                            destination_pixel_format);
+
+    if (frame->format() == media::PIXEL_FORMAT_I420A) {
+      DCHECK(!info.isOpaque());
+      // This function copies any plane into the alpha channel of an ARGB image.
+      libyuv::ARGBCopyYToAlpha(frame->visible_data(media::VideoFrame::kAPlane),
+                               frame->stride(media::VideoFrame::kAPlane),
+                               destination_plane, destination_stride,
+                               destination_width, destination_height);
+    }
   }
 
   std::move(wrapper_callback).Run(surface->makeImageSnapshot());
diff --git a/third_party/blink/renderer/modules/modules_idl_files.gni b/third_party/blink/renderer/modules/modules_idl_files.gni
index ed7767ce..94b9545 100644
--- a/third_party/blink/renderer/modules/modules_idl_files.gni
+++ b/third_party/blink/renderer/modules/modules_idl_files.gni
@@ -164,7 +164,6 @@
           "gamepad/gamepad_event.idl",
           "gamepad/gamepad_haptic_actuator.idl",
           "gamepad/gamepad_list.idl",
-          "gamepad/gamepad_pose.idl",
           "geolocation/geolocation.idl",
           "geolocation/geolocation_coordinates.idl",
           "geolocation/geolocation_position.idl",
@@ -347,13 +346,6 @@
           "sms/sms_receiver.idl",
           "storage/storage.idl",
           "storage/storage_event.idl",
-          "vr/vr_display.idl",
-          "vr/vr_display_capabilities.idl",
-          "vr/vr_display_event.idl",
-          "vr/vr_eye_parameters.idl",
-          "vr/vr_frame_data.idl",
-          "vr/vr_pose.idl",
-          "vr/vr_stage_parameters.idl",
           "wake_lock/wake_lock.idl",
           "wake_lock/wake_lock_sentinel.idl",
           "webaudio/analyser_node.idl",
@@ -498,7 +490,6 @@
           "websockets/close_event.idl",
           "websockets/websocket.idl",
           "websockets/websocket_stream.idl",
-          "webtransport/quic_transport.idl",
           "webusb/usb.idl",
           "webusb/usb_alternate_interface.idl",
           "webusb/usb_configuration.idl",
@@ -802,8 +793,6 @@
           "speech/speech_synthesis_error_event_init.idl",
           "speech/speech_synthesis_event_init.idl",
           "storage/storage_event_init.idl",
-          "vr/vr_display_event_init.idl",
-          "vr/vr_layer_init.idl",
           "webaudio/analyser_options.idl",
           "webaudio/audio_buffer_options.idl",
           "webaudio/audio_buffer_source_options.idl",
@@ -1012,7 +1001,6 @@
           "srcobject/html_media_element_src_object.idl",
           "storage/window_storage.idl",
           "vibration/navigator_vibration.idl",
-          "vr/navigator_vr.idl",
           "wake_lock/navigator_wake_lock.idl",
           "wake_lock/worker_navigator_wake_lock.idl",
           "webdatabase/window_web_database.idl",
diff --git a/third_party/blink/renderer/modules/modules_initializer.cc b/third_party/blink/renderer/modules/modules_initializer.cc
index 30b024c..4c3e570 100644
--- a/third_party/blink/renderer/modules/modules_initializer.cc
+++ b/third_party/blink/renderer/modules/modules_initializer.cc
@@ -74,8 +74,6 @@
 #include "third_party/blink/renderer/modules/storage/dom_window_storage_controller.h"
 #include "third_party/blink/renderer/modules/storage/inspector_dom_storage_agent.h"
 #include "third_party/blink/renderer/modules/storage/storage_namespace.h"
-#include "third_party/blink/renderer/modules/vr/navigator_vr.h"
-#include "third_party/blink/renderer/modules/vr/vr_controller.h"
 #include "third_party/blink/renderer/modules/webaudio/audio_graph_tracer.h"
 #include "third_party/blink/renderer/modules/webaudio/inspector_web_audio_agent.h"
 #include "third_party/blink/renderer/modules/webdatabase/database_client.h"
@@ -241,8 +239,6 @@
   NavigatorGamepad::From(document);
   NavigatorServiceWorker::From(document);
   DOMWindowStorageController::From(document);
-  if (RuntimeEnabledFeatures::WebVREnabled(document.GetExecutionContext()))
-    NavigatorVR::From(document);
   if (RuntimeEnabledFeatures::WebXREnabled(document.GetExecutionContext()))
     NavigatorXR::From(document);
   if (RuntimeEnabledFeatures::PresentationEnabled() &&
diff --git a/third_party/blink/renderer/modules/native_file_system/native_file_system_directory_iterator.cc b/third_party/blink/renderer/modules/native_file_system/native_file_system_directory_iterator.cc
index b934f8d..e8b2111 100644
--- a/third_party/blink/renderer/modules/native_file_system/native_file_system_directory_iterator.cc
+++ b/third_party/blink/renderer/modules/native_file_system/native_file_system_directory_iterator.cc
@@ -19,9 +19,7 @@
     NativeFileSystemDirectoryHandle* directory,
     ExecutionContext* execution_context)
     : ContextLifecycleObserver(execution_context), directory_(directory) {
-  directory_->MojoHandle()->GetEntries(
-      WTF::Bind(&NativeFileSystemDirectoryIterator::OnGotEntries,
-                WrapWeakPersistent(this)));
+  directory_->MojoHandle()->GetEntries(receiver_.BindNewPipeAndPassRemote());
 }
 
 ScriptPromise NativeFileSystemDirectoryIterator::next(
@@ -60,9 +58,10 @@
   visitor->Trace(directory_);
 }
 
-void NativeFileSystemDirectoryIterator::OnGotEntries(
+void NativeFileSystemDirectoryIterator::DidReadDirectory(
     mojom::blink::NativeFileSystemErrorPtr result,
-    Vector<mojom::blink::NativeFileSystemEntryPtr> entries) {
+    Vector<mojom::blink::NativeFileSystemEntryPtr> entries,
+    bool has_more_entries) {
   if (!GetExecutionContext())
     return;
   if (result->status != mojom::blink::NativeFileSystemStatus::kOk) {
@@ -77,7 +76,7 @@
     entries_.push_back(NativeFileSystemHandle::CreateFromMojoEntry(
         std::move(e), GetExecutionContext()));
   }
-  waiting_for_more_entries_ = false;
+  waiting_for_more_entries_ = has_more_entries;
   if (pending_next_) {
     ScriptState::Scope scope(pending_next_->GetScriptState());
     pending_next_->Resolve(
@@ -86,4 +85,8 @@
   }
 }
 
+void NativeFileSystemDirectoryIterator::Dispose() {
+  receiver_.reset();
+}
+
 }  // namespace blink
diff --git a/third_party/blink/renderer/modules/native_file_system/native_file_system_directory_iterator.h b/third_party/blink/renderer/modules/native_file_system/native_file_system_directory_iterator.h
index 7a7200b..34026cd 100644
--- a/third_party/blink/renderer/modules/native_file_system/native_file_system_directory_iterator.h
+++ b/third_party/blink/renderer/modules/native_file_system/native_file_system_directory_iterator.h
@@ -6,7 +6,8 @@
 #define THIRD_PARTY_BLINK_RENDERER_MODULES_NATIVE_FILE_SYSTEM_NATIVE_FILE_SYSTEM_DIRECTORY_ITERATOR_H_
 
 #include "base/files/file.h"
-#include "third_party/blink/public/mojom/native_file_system/native_file_system_directory_handle.mojom-blink-forward.h"
+#include "mojo/public/cpp/bindings/receiver.h"
+#include "third_party/blink/public/mojom/native_file_system/native_file_system_directory_handle.mojom-blink.h"
 #include "third_party/blink/public/mojom/native_file_system/native_file_system_error.mojom-blink.h"
 #include "third_party/blink/renderer/core/execution_context/context_lifecycle_observer.h"
 #include "third_party/blink/renderer/platform/bindings/script_wrappable.h"
@@ -20,9 +21,11 @@
 
 class NativeFileSystemDirectoryIterator final
     : public ScriptWrappable,
-      public ContextLifecycleObserver {
+      public ContextLifecycleObserver,
+      public mojom::blink::NativeFileSystemDirectoryEntriesListener {
   DEFINE_WRAPPERTYPEINFO();
   USING_GARBAGE_COLLECTED_MIXIN(NativeFileSystemDirectoryIterator);
+  USING_PRE_FINALIZER(NativeFileSystemDirectoryIterator, Dispose);
 
  public:
   NativeFileSystemDirectoryIterator(NativeFileSystemDirectoryHandle* directory,
@@ -33,14 +36,18 @@
   void Trace(Visitor*) override;
 
  private:
-  void OnGotEntries(mojom::blink::NativeFileSystemErrorPtr result,
-                    Vector<mojom::blink::NativeFileSystemEntryPtr> entries);
+  void DidReadDirectory(mojom::blink::NativeFileSystemErrorPtr result,
+                        Vector<mojom::blink::NativeFileSystemEntryPtr> entries,
+                        bool has_more_entries) override;
+  void Dispose();
 
   mojom::blink::NativeFileSystemErrorPtr error_;
   bool waiting_for_more_entries_ = true;
   HeapDeque<Member<NativeFileSystemHandle>> entries_;
   Member<ScriptPromiseResolver> pending_next_;
   Member<NativeFileSystemDirectoryHandle> directory_;
+  mojo::Receiver<mojom::blink::NativeFileSystemDirectoryEntriesListener>
+      receiver_{this};
 };
 
 }  // namespace blink
diff --git a/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc b/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc
index 6155156..c9a06c0 100644
--- a/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc
+++ b/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc
@@ -364,6 +364,7 @@
 PeerConnectionDependencyFactory::CreatePortAllocator(
     blink::WebLocalFrame* web_frame) {
   DCHECK(web_frame);
+  EnsureInitialized();
 
   // Copy the flag from Preference associated with this WebLocalFrame.
   P2PPortAllocator::Config port_config;
@@ -464,6 +465,7 @@
 
 std::unique_ptr<webrtc::AsyncResolverFactory>
 PeerConnectionDependencyFactory::CreateAsyncResolverFactory() {
+  EnsureInitialized();
   return std::make_unique<ProxyAsyncResolverFactory>(socket_factory_.get());
 }
 
diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_ice_transport.cc b/third_party/blink/renderer/modules/peerconnection/rtc_ice_transport.cc
index 12a8181..5f33bcaa 100644
--- a/third_party/blink/renderer/modules/peerconnection/rtc_ice_transport.cc
+++ b/third_party/blink/renderer/modules/peerconnection/rtc_ice_transport.cc
@@ -92,14 +92,12 @@
 
     auto* rtc_dependency_factory =
         blink::PeerConnectionDependencyFactory::GetInstance();
-    rtc_dependency_factory->EnsureInitialized();
     port_allocator_ = rtc_dependency_factory->CreatePortAllocator(
         frame.Client()->GetWebFrame());
-
     async_resolver_factory_ =
-        Platform::Current()->CreateWebRtcAsyncResolverFactory();
-    worker_thread_rtc_thread_ = PeerConnectionDependencyFactory::GetInstance()
-                                    ->GetWebRtcWorkerThreadRtcThread();
+        rtc_dependency_factory->CreateAsyncResolverFactory();
+    worker_thread_rtc_thread_ =
+        rtc_dependency_factory->GetWebRtcWorkerThreadRtcThread();
   }
 
   std::unique_ptr<IceTransportAdapter> ConstructOnWorkerThread(
diff --git a/third_party/blink/renderer/modules/vr/BUILD.gn b/third_party/blink/renderer/modules/vr/BUILD.gn
deleted file mode 100644
index 54bd835a..0000000
--- a/third_party/blink/renderer/modules/vr/BUILD.gn
+++ /dev/null
@@ -1,33 +0,0 @@
-# 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.
-
-import("//third_party/blink/renderer/modules/modules.gni")
-
-blink_modules_sources("vr") {
-  sources = [
-    "navigator_vr.cc",
-    "navigator_vr.h",
-    "vr_controller.cc",
-    "vr_controller.h",
-    "vr_display.cc",
-    "vr_display.h",
-    "vr_display_capabilities.h",
-    "vr_display_event.cc",
-    "vr_display_event.h",
-    "vr_eye_parameters.cc",
-    "vr_eye_parameters.h",
-    "vr_field_of_view.h",
-    "vr_frame_data.cc",
-    "vr_frame_data.h",
-    "vr_pose.cc",
-    "vr_pose.h",
-    "vr_stage_parameters.cc",
-    "vr_stage_parameters.h",
-  ]
-
-  deps = [
-    "//device/vr/public/mojom:mojom_blink",
-    "//services/metrics/public/cpp:ukm_builders",
-  ]
-}
diff --git a/third_party/blink/renderer/modules/vr/OWNERS b/third_party/blink/renderer/modules/vr/OWNERS
deleted file mode 100644
index 042b46ff..0000000
--- a/third_party/blink/renderer/modules/vr/OWNERS
+++ /dev/null
@@ -1,5 +0,0 @@
-bajones@chromium.org
-klausw@chromium.org
-
-# TEAM: xr-dev@chromium.org
-# COMPONENT: Blink>WebXR>VR
diff --git a/third_party/blink/renderer/modules/vr/navigator_vr.cc b/third_party/blink/renderer/modules/vr/navigator_vr.cc
deleted file mode 100644
index 44a63ee..0000000
--- a/third_party/blink/renderer/modules/vr/navigator_vr.cc
+++ /dev/null
@@ -1,221 +0,0 @@
-// Copyright 2015 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.
-
-#include "third_party/blink/renderer/modules/vr/navigator_vr.h"
-
-#include "services/metrics/public/cpp/ukm_builders.h"
-#include "third_party/blink/public/mojom/feature_policy/feature_policy.mojom-blink.h"
-#include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h"
-#include "third_party/blink/renderer/core/dom/document.h"
-#include "third_party/blink/renderer/core/dom/dom_exception.h"
-#include "third_party/blink/renderer/core/execution_context/execution_context.h"
-#include "third_party/blink/renderer/core/frame/deprecation.h"
-#include "third_party/blink/renderer/core/frame/local_frame.h"
-#include "third_party/blink/renderer/modules/vr/vr_controller.h"
-#include "third_party/blink/renderer/modules/vr/vr_pose.h"
-#include "third_party/blink/renderer/modules/xr/navigator_xr.h"
-#include "third_party/blink/renderer/platform/heap/heap.h"
-#include "third_party/blink/renderer/platform/instrumentation/use_counter.h"
-
-namespace blink {
-
-namespace {
-
-const char kFeaturePolicyBlockedMessage[] =
-    "Access to the feature \"vr\" is disallowed by feature policy.";
-
-const char kNotAssociatedWithDocumentMessage[] =
-    "The object is no longer associated with a document.";
-
-const char kCannotUseBothNewAndOldAPIMessage[] =
-    "Cannot use navigator.getVRDisplays if WebXR is already in use.";
-
-}  // namespace
-
-bool NavigatorVR::HasWebVrBeenUsed(Document& document) {
-  if (!document.GetFrame())
-    return false;
-  Navigator& navigator = *document.GetFrame()->DomWindow()->navigator();
-
-  NavigatorVR* supplement = Supplement<Navigator>::From<NavigatorVR>(navigator);
-  if (!supplement) {
-    // No supplement means WebVR has not been used.
-    return false;
-  }
-
-  return NavigatorVR::From(navigator).did_use_webvr_;
-}
-
-NavigatorVR* NavigatorVR::From(Document& document) {
-  if (!document.GetFrame())
-    return nullptr;
-  Navigator& navigator = *document.GetFrame()->DomWindow()->navigator();
-  return &From(navigator);
-}
-
-NavigatorVR& NavigatorVR::From(Navigator& navigator) {
-  NavigatorVR* supplement = Supplement<Navigator>::From<NavigatorVR>(navigator);
-  if (!supplement) {
-    supplement = MakeGarbageCollected<NavigatorVR>(navigator);
-    ProvideTo(navigator, supplement);
-  }
-  return *supplement;
-}
-
-ScriptPromise NavigatorVR::getVRDisplays(ScriptState* script_state,
-                                         Navigator& navigator) {
-  if (!navigator.GetFrame()) {
-    return ScriptPromise::RejectWithDOMException(
-        script_state,
-        MakeGarbageCollected<DOMException>(DOMExceptionCode::kInvalidStateError,
-                                           kNotAssociatedWithDocumentMessage));
-  }
-  return NavigatorVR::From(navigator).getVRDisplays(script_state);
-}
-
-ScriptPromise NavigatorVR::getVRDisplays(ScriptState* script_state) {
-  did_use_webvr_ = true;
-
-  auto* document = GetDocument();
-  if (!document) {
-    return ScriptPromise::RejectWithDOMException(
-        script_state,
-        MakeGarbageCollected<DOMException>(DOMExceptionCode::kInvalidStateError,
-                                           kNotAssociatedWithDocumentMessage));
-  }
-
-  if (!did_log_getVRDisplays_ && document->IsInMainFrame()) {
-    did_log_getVRDisplays_ = true;
-
-    ukm::builders::XR_WebXR(document->UkmSourceID())
-        .SetDidRequestAvailableDevices(1)
-        .Record(document->UkmRecorder());
-  }
-
-  if (!document->IsFeatureEnabled(mojom::FeaturePolicyFeature::kWebVr,
-                                  ReportOptions::kReportOnFailure)) {
-    return ScriptPromise::RejectWithDOMException(
-        script_state,
-        MakeGarbageCollected<DOMException>(DOMExceptionCode::kSecurityError,
-                                           kFeaturePolicyBlockedMessage));
-  }
-
-  // Block developers from using WebVR if they've already used WebXR.
-  if (NavigatorXR::HasWebXrBeenUsed(*document)) {
-    return ScriptPromise::RejectWithDOMException(
-        script_state,
-        MakeGarbageCollected<DOMException>(DOMExceptionCode::kInvalidStateError,
-                                           kCannotUseBothNewAndOldAPIMessage));
-  }
-
-  Deprecation::CountDeprecation(*document, WebFeature::kVRGetDisplays);
-  ExecutionContext* execution_context = ExecutionContext::From(script_state);
-  if (!execution_context->IsSecureContext())
-    UseCounter::Count(*document, WebFeature::kVRGetDisplaysInsecureOrigin);
-
-  Platform::Current()->RecordRapporURL("VR.WebVR.GetDisplays", document->Url());
-
-  auto* resolver = MakeGarbageCollected<ScriptPromiseResolver>(script_state);
-  ScriptPromise promise = resolver->Promise();
-  Controller()->GetDisplays(resolver);
-
-  return promise;
-}
-
-VRController* NavigatorVR::Controller() {
-  if (!GetSupplementable()->GetFrame())
-    return nullptr;
-
-  if (!controller_) {
-    controller_ = MakeGarbageCollected<VRController>(this);
-    controller_->SetListeningForActivate(focused_ && listening_for_activate_);
-    controller_->FocusChanged();
-  }
-
-  return controller_;
-}
-
-Document* NavigatorVR::GetDocument() {
-  if (!GetSupplementable() || !GetSupplementable()->GetFrame())
-    return nullptr;
-
-  return GetSupplementable()->GetFrame()->GetDocument();
-}
-
-void NavigatorVR::Trace(blink::Visitor* visitor) {
-  visitor->Trace(controller_);
-  Supplement<Navigator>::Trace(visitor);
-}
-
-NavigatorVR::NavigatorVR(Navigator& navigator)
-    : Supplement<Navigator>(navigator),
-      FocusChangedObserver(navigator.GetFrame()->GetPage()) {
-  navigator.GetFrame()->DomWindow()->RegisterEventListenerObserver(this);
-  FocusedFrameChanged();
-}
-
-NavigatorVR::~NavigatorVR() = default;
-
-const char NavigatorVR::kSupplementName[] = "NavigatorVR";
-
-void NavigatorVR::EnqueueVREvent(VRDisplayEvent* event) {
-  if (!GetSupplementable()->GetFrame())
-    return;
-
-  GetSupplementable()->GetFrame()->DomWindow()->EnqueueWindowEvent(
-      *event, TaskType::kMiscPlatformAPI);
-}
-
-void NavigatorVR::DispatchVREvent(VRDisplayEvent* event) {
-  if (!(GetSupplementable()->GetFrame()))
-    return;
-
-  LocalDOMWindow* window = GetSupplementable()->GetFrame()->DomWindow();
-  DCHECK(window);
-  event->SetTarget(window);
-  window->DispatchEvent(*event);
-}
-
-void NavigatorVR::FocusedFrameChanged() {
-  bool focused = IsFrameFocused(GetSupplementable()->GetFrame());
-  if (focused == focused_)
-    return;
-  focused_ = focused;
-  if (controller_) {
-    controller_->SetListeningForActivate(listening_for_activate_ && focused);
-    controller_->FocusChanged();
-  }
-}
-
-void NavigatorVR::DidAddEventListener(LocalDOMWindow* window,
-                                      const AtomicString& event_type) {
-  if (event_type == event_type_names::kVrdisplayactivate) {
-    listening_for_activate_ = true;
-    Controller()->SetListeningForActivate(focused_);
-  } else if (event_type == event_type_names::kVrdisplayconnect) {
-    // If the page is listening for connection events make sure we've created a
-    // controller so that we'll be notified of new devices.
-    Controller();
-  }
-}
-
-void NavigatorVR::DidRemoveEventListener(LocalDOMWindow* window,
-                                         const AtomicString& event_type) {
-  if (event_type == event_type_names::kVrdisplayactivate &&
-      !window->HasEventListeners(event_type_names::kVrdisplayactivate)) {
-    listening_for_activate_ = false;
-    Controller()->SetListeningForActivate(false);
-  }
-}
-
-void NavigatorVR::DidRemoveAllEventListeners(LocalDOMWindow* window) {
-  if (!controller_)
-    return;
-
-  controller_->SetListeningForActivate(false);
-  listening_for_activate_ = false;
-}
-
-}  // namespace blink
diff --git a/third_party/blink/renderer/modules/vr/navigator_vr.h b/third_party/blink/renderer/modules/vr/navigator_vr.h
deleted file mode 100644
index 29f3602..0000000
--- a/third_party/blink/renderer/modules/vr/navigator_vr.h
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright 2015 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_BLINK_RENDERER_MODULES_VR_NAVIGATOR_VR_H_
-#define THIRD_PARTY_BLINK_RENDERER_MODULES_VR_NAVIGATOR_VR_H_
-
-#include "base/macros.h"
-#include "third_party/blink/renderer/bindings/core/v8/script_promise.h"
-#include "third_party/blink/renderer/core/frame/local_dom_window.h"
-#include "third_party/blink/renderer/core/frame/navigator.h"
-#include "third_party/blink/renderer/core/page/focus_changed_observer.h"
-#include "third_party/blink/renderer/modules/modules_export.h"
-#include "third_party/blink/renderer/modules/vr/vr_display.h"
-#include "third_party/blink/renderer/modules/vr/vr_display_event.h"
-#include "third_party/blink/renderer/platform/supplementable.h"
-
-namespace blink {
-
-class Document;
-class VRController;
-
-class MODULES_EXPORT NavigatorVR final
-    : public GarbageCollected<NavigatorVR>,
-      public Supplement<Navigator>,
-      public LocalDOMWindow::EventListenerObserver,
-      public FocusChangedObserver {
-  USING_GARBAGE_COLLECTED_MIXIN(NavigatorVR);
-
- public:
-  static const char kSupplementName[];
-
-  // Returns whether WebVR has beeen used in the document.
-  // If no supplement has been created, it returns false without creating one.
-  // This allows it to be used in cases where creating objects is not allowed,
-  // such as within NavigatorGamepad::DidAddEventListener().
-  static bool HasWebVrBeenUsed(Document&);
-
-  static NavigatorVR* From(Document&);
-  static NavigatorVR& From(Navigator&);
-
-  explicit NavigatorVR(Navigator&);
-  ~NavigatorVR() override;
-
-  // Legacy API
-  static ScriptPromise getVRDisplays(ScriptState*, Navigator&);
-  ScriptPromise getVRDisplays(ScriptState*);
-
-  VRController* Controller();
-  Document* GetDocument();
-  bool IsFocused() const { return focused_; }
-
-  // Queues up event to be fired soon.
-  void EnqueueVREvent(VRDisplayEvent*);
-
-  // Dispatches an event immediately.
-  void DispatchVREvent(VRDisplayEvent*);
-
-  // Inherited from FocusChangedObserver.
-  void FocusedFrameChanged() override;
-
-  // Inherited from LocalDOMWindow::EventListenerObserver.
-  void DidAddEventListener(LocalDOMWindow*, const AtomicString&) override;
-  void DidRemoveEventListener(LocalDOMWindow*, const AtomicString&) override;
-  void DidRemoveAllEventListeners(LocalDOMWindow*) override;
-
-  void Trace(blink::Visitor*) override;
-
- private:
-  friend class VRDisplay;
-  friend class VRGetDevicesCallback;
-
-  void FireVRDisplayPresentChange(VRDisplay*);
-
-  Member<VRController> controller_;
-
-  // Whether this page is listening for vrdisplayactivate event.
-  bool listening_for_activate_ = false;
-  bool focused_ = false;
-
-  bool did_use_webvr_ = false;
-
-  // Metrics data - indicates whether we've already measured this data so we
-  // don't do it every frame.
-  bool did_log_getVRDisplays_ = false;
-
-  DISALLOW_COPY_AND_ASSIGN(NavigatorVR);
-};
-
-}  // namespace blink
-
-#endif  // THIRD_PARTY_BLINK_RENDERER_MODULES_VR_NAVIGATOR_VR_H_
diff --git a/third_party/blink/renderer/modules/vr/navigator_vr.idl b/third_party/blink/renderer/modules/vr/navigator_vr.idl
deleted file mode 100644
index 4485686..0000000
--- a/third_party/blink/renderer/modules/vr/navigator_vr.idl
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2015 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.
-
-// https://immersive-web.github.io/webvr/spec/1.1/#interface-navigator
-[
-    ImplementedAs=NavigatorVR
-] partial interface Navigator {
-    [RuntimeEnabled=WebVR, CallWith=ScriptState] Promise<sequence<VRDisplay>> getVRDisplays();
-};
diff --git a/third_party/blink/renderer/modules/vr/vr_controller.cc b/third_party/blink/renderer/modules/vr/vr_controller.cc
deleted file mode 100644
index fb555e7d..0000000
--- a/third_party/blink/renderer/modules/vr/vr_controller.cc
+++ /dev/null
@@ -1,248 +0,0 @@
-// Copyright 2015 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.
-
-#include "third_party/blink/renderer/modules/vr/vr_controller.h"
-
-#include "device/vr/public/mojom/vr_service.mojom-blink.h"
-#include "mojo/public/cpp/bindings/pending_remote.h"
-#include "services/metrics/public/cpp/ukm_builders.h"
-#include "third_party/blink/public/common/browser_interface_broker_proxy.h"
-#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h"
-#include "third_party/blink/renderer/core/dom/document.h"
-#include "third_party/blink/renderer/core/dom/dom_exception.h"
-#include "third_party/blink/renderer/core/frame/local_frame.h"
-#include "third_party/blink/renderer/modules/vr/navigator_vr.h"
-#include "third_party/blink/renderer/platform/wtf/assertions.h"
-
-namespace blink {
-
-VRController::VRController(NavigatorVR* navigator_vr)
-    : ContextLifecycleObserver(navigator_vr->GetDocument()),
-      navigator_vr_(navigator_vr),
-      feature_handle_for_scheduler_(
-          navigator_vr->GetDocument()->GetScheduler()->RegisterFeature(
-              SchedulingPolicy::Feature::kWebVR,
-              {SchedulingPolicy::RecordMetricsForBackForwardCache()})) {
-  // See https://bit.ly/2S0zRAS for task types.
-  scoped_refptr<base::SingleThreadTaskRunner> task_runner =
-      navigator_vr->GetDocument()->GetTaskRunner(TaskType::kMiscPlatformAPI);
-  navigator_vr->GetDocument()->GetBrowserInterfaceBroker().GetInterface(
-      service_.BindNewPipeAndPassReceiver(task_runner));
-  service_.set_disconnect_handler(
-      WTF::Bind(&VRController::Dispose, WrapWeakPersistent(this)));
-
-  service_->SetClient(receiver_.BindNewPipeAndPassRemote(task_runner));
-
-  // Request display info. If we get it, we have a device.
-  service_->GetImmersiveVRDisplayInfo(WTF::Bind(
-      &VRController::OnImmersiveDisplayInfoReturned, WrapPersistent(this)));
-
-  // Request a non-immersive session immediately as WebVR 1.1 expects to be able
-  // to get non-immersive poses as soon as the display is returned.
-  device::mojom::blink::XRSessionOptionsPtr options =
-      device::mojom::blink::XRSessionOptions::New();
-  options->immersive = false;
-  options->is_legacy_webvr = true;
-  service_->RequestSession(
-      std::move(options),
-      WTF::Bind(&VRController::OnNonImmersiveSessionRequestReturned,
-                WrapPersistent(this)));
-}
-
-VRController::~VRController() = default;
-
-bool VRController::ShouldResolveGetDisplays() {
-  return have_latest_immersive_info_ && nonimmersive_session_returned_;
-}
-
-void VRController::EnsureDisplay() {
-  if (!display_) {
-    // We have a display for the first time.
-    display_ = VRDisplay::Create(navigator_vr_);
-    if (pending_listening_for_activate_) {
-      SetListeningForActivate(pending_listening_for_activate_);
-      pending_listening_for_activate_ = false;
-    }
-    display_->OnConnected();
-    display_->FocusChanged();
-  }
-
-  // If we have a non-immersive session, give it to the display so we can
-  // satisfy inline animation frame requests.
-  if (nonimmersive_session_)
-    display_->SetNonImmersiveSession(std::move(nonimmersive_session_));
-}
-
-void VRController::GetDisplays(ScriptPromiseResolver* resolver) {
-  // If we've previously synced the VRDisplays or no longer have a valid service
-  // connection just return the current list. In the case of the service being
-  // disconnected this will be an empty array.
-  if (!service_ || ShouldResolveGetDisplays()) {
-    LogGetDisplayResult();
-    HeapVector<Member<VRDisplay>> displays;
-    if (display_)
-      displays.push_back(display_);
-    resolver->Resolve(displays);
-    return;
-  }
-
-  // Otherwise we're still waiting for the full list of displays to be populated
-  // so queue up the promise resolver for resolution when OnGetDisplays is
-  // called.
-  pending_promise_resolvers_.push_back(resolver);
-}
-
-void VRController::SetListeningForActivate(bool listening) {
-  if (!service_ || !display_) {
-    pending_listening_for_activate_ = listening;
-    return;
-  }
-
-  if (listening_for_activate_ && listening) {
-    // We're already listening so leave things as is.
-    return;
-  }
-
-  listening_for_activate_ = listening;
-
-  if (listening)
-    service_->SetListeningForActivate(display_->GetDisplayClient());
-  else
-    service_->SetListeningForActivate(mojo::NullRemote());
-}
-
-void VRController::OnDeviceChanged() {
-  if (!have_latest_immersive_info_) {
-    // We're already underway checking if there is a device.
-    return;
-  }
-
-  have_latest_immersive_info_ = false;
-
-  // Get updated display info.
-  service_->GetImmersiveVRDisplayInfo(WTF::Bind(
-      &VRController::OnImmersiveDisplayInfoReturned, WrapPersistent(this)));
-}
-
-void VRController::FocusChanged() {
-  if (display_)
-    display_->FocusChanged();
-}
-
-void VRController::OnImmersiveDisplayInfoReturned(
-    device::mojom::blink::VRDisplayInfoPtr info) {
-  if (disposed_) {
-    return;
-  }
-
-  if (info) {
-    has_presentation_capable_display_ = info->capabilities->can_present;
-  } else {
-    has_presentation_capable_display_ = false;
-  }
-
-  if (info) {
-    EnsureDisplay();
-    display_->OnChanged(std::move(info), true /* is_immersive */);
-  }
-
-  // We know whether there is a display at this point.
-  have_latest_immersive_info_ = true;
-
-  if (ShouldResolveGetDisplays())
-    OnGetDisplays();
-}
-
-void VRController::LogGetDisplayResult() {
-  Document* doc = navigator_vr_->GetDocument();
-  if (display_ && doc && doc->IsInMainFrame()) {
-    ukm::builders::XR_WebXR ukm_builder(doc->UkmSourceID());
-    ukm_builder.SetReturnedDevice(1);
-    if (has_presentation_capable_display_) {
-      ukm_builder.SetReturnedPresentationCapableDevice(1);
-    }
-    ukm_builder.Record(doc->UkmRecorder());
-  }
-}
-
-void VRController::OnGetDisplays() {
-  while (!pending_promise_resolvers_.IsEmpty()) {
-    LogGetDisplayResult();
-
-    HeapVector<Member<VRDisplay>> displays;
-    if (display_)
-      displays.push_back(display_);
-
-    auto promise_resolver = pending_promise_resolvers_.TakeFirst();
-    OnGetDevicesSuccess(promise_resolver, displays);
-  }
-}
-
-void VRController::OnNonImmersiveSessionRequestReturned(
-    device::mojom::blink::RequestSessionResultPtr result) {
-  if (disposed_) {
-    return;
-  }
-
-  nonimmersive_session_returned_ = true;
-  nonimmersive_session_ = std::move(result);
-
-  // If we support non-immersive, we have a display.
-  if (nonimmersive_session_->is_session())
-    EnsureDisplay();
-
-  if (ShouldResolveGetDisplays())
-    OnGetDisplays();
-}
-
-void VRController::OnGetDevicesSuccess(ScriptPromiseResolver* resolver,
-                                       VRDisplayVector displays) {
-  bool display_supports_presentation = false;
-  for (auto display : displays) {
-    if (display->capabilities()->canPresent()) {
-      display_supports_presentation = true;
-    }
-  }
-
-  if (display_supports_presentation) {
-    ExecutionContext* execution_context =
-        ExecutionContext::From(resolver->GetScriptState());
-    UseCounter::Count(execution_context,
-                      WebFeature::kVRGetDisplaysSupportsPresent);
-  }
-
-  resolver->Resolve(displays);
-}
-
-void VRController::ContextDestroyed(ExecutionContext*) {
-  Dispose();
-}
-
-void VRController::Dispose() {
-  // If the document context was destroyed, shut down the client connection
-  // and never call the mojo service again.
-  service_.reset();
-  receiver_.reset();
-
-  // Shutdown all displays' message pipe
-  if (display_) {
-    display_->Dispose();
-    display_ = nullptr;
-  }
-
-  disposed_ = true;
-
-  // Ensure that any outstanding getDisplays promises are resolved.
-  OnGetDisplays();
-}
-
-void VRController::Trace(blink::Visitor* visitor) {
-  visitor->Trace(navigator_vr_);
-  visitor->Trace(display_);
-  visitor->Trace(pending_promise_resolvers_);
-
-  ContextLifecycleObserver::Trace(visitor);
-}
-
-}  // namespace blink
diff --git a/third_party/blink/renderer/modules/vr/vr_display.cc b/third_party/blink/renderer/modules/vr/vr_display.cc
deleted file mode 100644
index 81b28bd54..0000000
--- a/third_party/blink/renderer/modules/vr/vr_display.cc
+++ /dev/null
@@ -1,1258 +0,0 @@
-// 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.
-
-#include "third_party/blink/renderer/modules/vr/vr_display.h"
-
-#include <memory>
-#include <utility>
-
-#include "base/auto_reset.h"
-#include "gpu/command_buffer/client/gles2_interface.h"
-#include "services/metrics/public/cpp/ukm_builders.h"
-#include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/task_type.h"
-#include "third_party/blink/renderer/core/css/css_property_value_set.h"
-#include "third_party/blink/renderer/core/dom/dom_exception.h"
-#include "third_party/blink/renderer/core/dom/frame_request_callback_collection.h"
-#include "third_party/blink/renderer/core/dom/scripted_animation_controller.h"
-#include "third_party/blink/renderer/core/dom/user_gesture_indicator.h"
-#include "third_party/blink/renderer/core/execution_context/execution_context.h"
-#include "third_party/blink/renderer/core/frame/frame.h"
-#include "third_party/blink/renderer/core/frame/local_frame.h"
-#include "third_party/blink/renderer/core/frame/local_frame_view.h"
-#include "third_party/blink/renderer/core/imagebitmap/image_bitmap.h"
-#include "third_party/blink/renderer/core/inspector/console_message.h"
-#include "third_party/blink/renderer/core/layout/layout_view.h"
-#include "third_party/blink/renderer/core/loader/document_loader.h"
-#include "third_party/blink/renderer/core/paint/compositing/paint_layer_compositor.h"
-#include "third_party/blink/renderer/modules/event_target_modules.h"
-#include "third_party/blink/renderer/modules/vr/navigator_vr.h"
-#include "third_party/blink/renderer/modules/vr/vr_controller.h"
-#include "third_party/blink/renderer/modules/vr/vr_display_capabilities.h"
-#include "third_party/blink/renderer/modules/vr/vr_eye_parameters.h"
-#include "third_party/blink/renderer/modules/vr/vr_frame_data.h"
-#include "third_party/blink/renderer/modules/vr/vr_layer_init.h"
-#include "third_party/blink/renderer/modules/vr/vr_pose.h"
-#include "third_party/blink/renderer/modules/vr/vr_stage_parameters.h"
-#include "third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h"
-#include "third_party/blink/renderer/platform/heap/heap.h"
-#include "third_party/blink/renderer/platform/instrumentation/histogram.h"
-#include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h"
-#include "third_party/blink/renderer/platform/instrumentation/use_counter.h"
-
-namespace blink {
-
-namespace {
-
-// Threshold for rejecting stored non-immersive poses as being too old.
-// If it's exceeded, defer non-immersive rAF callback execution until
-// a fresh pose is received.
-constexpr base::TimeDelta kNonImmersivePoseAgeThreshold =
-    base::TimeDelta::FromMilliseconds(250);
-
-device::mojom::blink::XRFrameDataPtr CreateIdentityFrameData() {
-  auto data = device::mojom::blink::XRFrameData::New();
-  data->pose = device::mojom::blink::VRPose::New();
-  data->pose->orientation = gfx::Quaternion();
-  data->pose->position = WebFloatPoint3D();
-
-  return data;
-}
-
-VREye StringToVREye(const String& which_eye) {
-  if (which_eye == "left")
-    return kVREyeLeft;
-  if (which_eye == "right")
-    return kVREyeRight;
-  return kVREyeNone;
-}
-
-class VRDisplayFrameRequestCallback
-    : public FrameRequestCallbackCollection::FrameCallback {
- public:
-  explicit VRDisplayFrameRequestCallback(VRDisplay* vr_display)
-      : vr_display_(vr_display) {}
-  ~VRDisplayFrameRequestCallback() override = default;
-  void Invoke(double high_res_time_ms) override {
-    if (Id() != vr_display_->PendingNonImmersiveVSyncId())
-      return;
-    base::TimeTicks monotonic_time;
-    if (!vr_display_->GetDocument() || !vr_display_->GetDocument()->Loader()) {
-      monotonic_time = base::TimeTicks::Now();
-    } else {
-      // Convert document-zero time back to monotonic time.
-      base::TimeTicks reference_monotonic_time = vr_display_->GetDocument()
-                                                     ->Loader()
-                                                     ->GetTiming()
-                                                     .ReferenceMonotonicTime();
-      monotonic_time = reference_monotonic_time +
-                       base::TimeDelta::FromMillisecondsD(high_res_time_ms);
-    }
-    vr_display_->OnNonImmersiveVSync(monotonic_time);
-  }
-
-  void Trace(blink::Visitor* visitor) override {
-    visitor->Trace(vr_display_);
-
-    FrameRequestCallbackCollection::FrameCallback::Trace(visitor);
-  }
-
-  Member<VRDisplay> vr_display_;
-};
-
-}  // namespace
-
-SessionClientBinding::SessionClientBinding(
-    VRDisplay* display,
-    SessionClientBinding::SessionBindingType immersive,
-    mojo::PendingReceiver<device::mojom::blink::XRSessionClient> receiver)
-    : display_(display),
-      is_immersive_(immersive ==
-                    SessionClientBinding::SessionBindingType::kImmersive),
-      client_receiver_(this, std::move(receiver)) {}
-
-SessionClientBinding::~SessionClientBinding() = default;
-
-void SessionClientBinding::Close() {
-  client_receiver_.reset();
-}
-void SessionClientBinding::OnChanged(
-    device::mojom::blink::VRDisplayInfoPtr ptr) {
-  display_->OnChanged(std::move(ptr), is_immersive_);
-}
-void SessionClientBinding::OnExitPresent() {
-  display_->OnExitPresent(is_immersive_);
-}
-void SessionClientBinding::OnVisibilityStateChanged(
-    device::mojom::blink::XRVisibilityState visibility_state) {
-  switch (visibility_state) {
-    case device::mojom::blink::XRVisibilityState::VISIBLE:
-      display_->OnFocus(is_immersive_);
-      break;
-    case device::mojom::blink::XRVisibilityState::VISIBLE_BLURRED:
-      display_->OnBlur(is_immersive_);
-      break;
-    case device::mojom::blink::XRVisibilityState::HIDDEN:
-      display_->OnBlur(is_immersive_);
-      break;
-  }
-}
-void SessionClientBinding::Trace(blink::Visitor* visitor) {
-  visitor->Trace(display_);
-}
-
-VRDisplay::VRDisplay(NavigatorVR* navigator_vr)
-    : ContextLifecycleStateObserver(navigator_vr->GetDocument()),
-      navigator_vr_(navigator_vr),
-      capabilities_(MakeGarbageCollected<VRDisplayCapabilities>()) {}
-
-VRDisplay::~VRDisplay() = default;
-
-void VRDisplay::ContextLifecycleStateChanged(mojom::FrameLifecycleState state) {
-  if (state == mojom::FrameLifecycleState::kRunning)
-    RequestVSync();
-}
-
-VRController* VRDisplay::Controller() {
-  return navigator_vr_->Controller();
-}
-
-void VRDisplay::Update(const device::mojom::blink::VRDisplayInfoPtr& display) {
-  display_name_ = display->display_name;
-  is_connected_ = true;
-
-  capabilities_->SetHasPosition(display->capabilities->has_position);
-  capabilities_->SetHasExternalDisplay(
-      display->capabilities->has_external_display);
-  capabilities_->SetCanPresent(display->capabilities->can_present);
-  capabilities_->SetMaxLayers(display->capabilities->can_present ? 1 : 0);
-
-  // Clear eye parameters to prevent them from getting stale.
-  eye_parameters_left_.Clear();
-  eye_parameters_right_.Clear();
-
-  bool is_valid = false;
-  if (capabilities_->canPresent()) {
-    DCHECK_GT(display->left_eye->render_width, 0u);
-    is_valid = true;
-
-    eye_parameters_left_ = MakeGarbageCollected<VREyeParameters>(
-        display->left_eye, display->webvr_default_framebuffer_scale);
-    eye_parameters_right_ = MakeGarbageCollected<VREyeParameters>(
-        display->right_eye, display->webvr_default_framebuffer_scale);
-  }
-
-  bool need_on_present_change = false;
-  if (is_presenting_ && is_valid && !is_valid_device_for_presenting_) {
-    need_on_present_change = true;
-  }
-  is_valid_device_for_presenting_ = is_valid;
-
-  if (!display->stage_parameters.is_null()) {
-    if (!stage_parameters_)
-      stage_parameters_ = MakeGarbageCollected<VRStageParameters>();
-    stage_parameters_->Update(display->stage_parameters);
-  } else {
-    stage_parameters_ = nullptr;
-  }
-
-  if (need_on_present_change) {
-    OnPresentChange();
-  }
-}
-
-bool VRDisplay::getFrameData(VRFrameData* frame_data) {
-  if (!did_log_getFrameData_ && GetDocument() &&
-      GetDocument()->IsInMainFrame()) {
-    did_log_getFrameData_ = true;
-
-    ukm::builders::XR_WebXR(GetDocument()->UkmSourceID())
-        .SetDidRequestPose(1)
-        .Record(GetDocument()->UkmRecorder());
-  }
-
-  if (!FocusedOrPresenting() || !frame_pose_ || display_blurred_)
-    return false;
-
-  if (!frame_data)
-    return false;
-
-  if (!in_animation_frame_) {
-    Document* doc = navigator_vr_->GetDocument();
-    if (doc) {
-      doc->AddConsoleMessage(
-          ConsoleMessage::Create(mojom::ConsoleMessageSource::kRendering,
-                                 mojom::ConsoleMessageLevel::kWarning,
-                                 "getFrameData must be called within a "
-                                 "VRDisplay.requestAnimationFrame callback."));
-    }
-    return false;
-  }
-
-  if (depth_near_ == depth_far_)
-    return false;
-
-  return frame_data->Update(frame_pose_, eye_parameters_left_,
-                            eye_parameters_right_, depth_near_, depth_far_);
-}
-
-VREyeParameters* VRDisplay::getEyeParameters(const String& which_eye) {
-  if (!capabilities_->canPresent())
-    return nullptr;
-
-  switch (StringToVREye(which_eye)) {
-    case kVREyeLeft:
-      return eye_parameters_left_;
-    case kVREyeRight:
-      return eye_parameters_right_;
-    default:
-      return nullptr;
-  }
-}
-
-void VRDisplay::RequestVSync() {
-  DVLOG(2) << __FUNCTION__
-           << " start: pending_vrdisplay_raf_=" << pending_vrdisplay_raf_
-           << " in_animation_frame_=" << in_animation_frame_
-           << " did_submit_this_frame_=" << did_submit_this_frame_
-           << " pending_non_immersive_vsync_=" << pending_non_immersive_vsync_
-           << " pending_presenting_vsync_=" << pending_presenting_vsync_;
-  if (!pending_vrdisplay_raf_)
-    return;
-  Document* doc = navigator_vr_->GetDocument();
-  if (!doc)
-    return;
-  if (display_blurred_)
-    return;
-
-  if (is_presenting_) {
-    DCHECK(vr_presentation_provider_.is_bound());
-
-    if (pending_presenting_vsync_)
-      return;
-
-    pending_non_immersive_vsync_ = false;
-    pending_presenting_vsync_ = true;
-    vr_presentation_data_provider_->GetFrameData(
-        nullptr,
-        WTF::Bind(&VRDisplay::OnPresentingVSync, WrapWeakPersistent(this)));
-
-    DVLOG(2) << __FUNCTION__ << " done: pending_presenting_vsync_="
-             << pending_presenting_vsync_;
-  } else {
-    // If we haven't been fully initialized yet, then we need to keep waiting
-    // so that we know if we have a non immersive provider or if we need to
-    // pass out identity poses.  When the callback from initialization happens
-    // it will run this code again.
-    if (!non_immersive_session_initialized_)
-      return;
-    if (pending_non_immersive_vsync_)
-      return;
-    non_immersive_vsync_waiting_for_pose_.Reset();
-    non_immersive_pose_request_time_ = base::TimeTicks::Now();
-
-    if (non_immersive_provider_) {
-      non_immersive_provider_->GetFrameData(
-          nullptr, WTF::Bind(&VRDisplay::OnNonImmersiveFrameData,
-                             WrapWeakPersistent(this)));
-    } else {
-      // If we don't have a non immersive provider, we should just return
-      // an identity pose.  We're not worried about re-entrant calls right now
-      // because we should end up waiting for the RAF callback which we request
-      // below. If we start to see errors with this, we'll want to do this as a
-      // posted task.
-      OnNonImmersiveFrameData(CreateIdentityFrameData());
-    }
-    pending_non_immersive_vsync_ = true;
-    pending_non_immersive_vsync_id_ = doc->RequestAnimationFrame(
-        MakeGarbageCollected<VRDisplayFrameRequestCallback>(this));
-    DVLOG(2) << __FUNCTION__ << " done: pending_non_immersive_vsync_="
-             << pending_non_immersive_vsync_;
-  }
-}
-
-int VRDisplay::requestAnimationFrame(V8FrameRequestCallback* callback) {
-  DVLOG(2) << __FUNCTION__;
-  Document* doc = this->GetDocument();
-  if (!doc)
-    return 0;
-  pending_vrdisplay_raf_ = true;
-
-  RequestVSync();
-
-  auto* frame_callback =
-      MakeGarbageCollected<FrameRequestCallbackCollection::V8FrameCallback>(
-          callback);
-
-  frame_callback->SetUseLegacyTimeBase(false);
-  return EnsureScriptedAnimationController(doc).RegisterFrameCallback(
-      frame_callback);
-}
-
-void VRDisplay::cancelAnimationFrame(int id) {
-  DVLOG(2) << __FUNCTION__;
-  if (!scripted_animation_controller_)
-    return;
-  scripted_animation_controller_->CancelFrameCallback(id);
-}
-
-void VRDisplay::OnBlur(bool is_immersive) {
-  // TODO(http://crbug.com/845283) When cleaning up the Blur events, determine
-  // whether we should react to blur events from both immersive and non-
-  // immersive sessions.
-  DVLOG(1) << __FUNCTION__;
-  display_blurred_ = true;
-  navigator_vr_->EnqueueVREvent(
-      VRDisplayEvent::Create(event_type_names::kVrdisplayblur, this, ""));
-}
-
-void VRDisplay::OnFocus(bool is_immersive) {
-  // TODO(http://crbug.com/845283) When cleaning up the Blur events, determine
-  // whether we should react to blur events from both immersive and non-
-  // immersive sessions.
-  DVLOG(1) << __FUNCTION__;
-  display_blurred_ = false;
-  RequestVSync();
-
-  navigator_vr_->EnqueueVREvent(
-      VRDisplayEvent::Create(event_type_names::kVrdisplayfocus, this, ""));
-}
-
-void ReportPresentationResult(PresentationResult result) {
-  // Note that this is called twice for each call to requestPresent -
-  // one to declare that requestPresent was called, and one for the
-  // result.
-  DEFINE_STATIC_LOCAL(
-      EnumerationHistogram, vr_presentation_result_histogram,
-      ("VRDisplayPresentResult",
-       static_cast<int>(PresentationResult::kPresentationResultMax)));
-  vr_presentation_result_histogram.Count(static_cast<int>(result));
-}
-
-ScriptPromise VRDisplay::requestPresent(
-    ScriptState* script_state,
-    const HeapVector<Member<VRLayerInit>>& layers) {
-  DVLOG(1) << __FUNCTION__;
-  ExecutionContext* execution_context = ExecutionContext::From(script_state);
-  UseCounter::Count(execution_context, WebFeature::kVRRequestPresent);
-  if (!execution_context->IsSecureContext()) {
-    UseCounter::Count(execution_context,
-                      WebFeature::kVRRequestPresentInsecureOrigin);
-  }
-
-  if (!did_log_requestPresent_ && GetDocument() &&
-      GetDocument()->IsInMainFrame()) {
-    did_log_requestPresent_ = true;
-    ukm::builders::XR_WebXR(GetDocument()->UkmSourceID())
-        .SetDidRequestPresentation(1)
-        .Record(GetDocument()->UkmRecorder());
-  }
-
-  ReportPresentationResult(PresentationResult::kRequested);
-
-  auto* resolver = MakeGarbageCollected<ScriptPromiseResolver>(script_state);
-  ScriptPromise promise = resolver->Promise();
-
-  // If the VRDisplay does not advertise the ability to present reject the
-  // request.
-  if (!capabilities_->canPresent()) {
-    auto* exception = MakeGarbageCollected<DOMException>(
-        DOMExceptionCode::kInvalidStateError, "VRDisplay cannot present.");
-    resolver->Reject(exception);
-    ReportPresentationResult(PresentationResult::kVRDisplayCannotPresent);
-    return promise;
-  }
-
-  bool first_present = !is_presenting_;
-  Document* doc = GetDocument();
-
-  // Initiating VR presentation is only allowed in response to a user gesture.
-  // If the VRDisplay is already presenting, however, repeated calls are
-  // allowed outside a user gesture so that the presented content may be
-  // updated.
-  if (first_present) {
-    if (!LocalFrame::HasTransientUserActivation(doc ? doc->GetFrame()
-                                                    : nullptr)) {
-      auto* exception = MakeGarbageCollected<DOMException>(
-          DOMExceptionCode::kInvalidStateError,
-          "API can only be initiated by a user gesture.");
-      resolver->Reject(exception);
-      ReportPresentationResult(PresentationResult::kNotInitiatedByUserGesture);
-      return promise;
-    }
-
-    // When we are requesting to start presentation with a user action or the
-    // display has activated, record the user action.
-    Platform::Current()->RecordAction(
-        UserMetricsAction("VR.WebVR.requestPresent"));
-  }
-
-  // A valid number of layers must be provided in order to present.
-  if (layers.size() == 0 || layers.size() > capabilities_->maxLayers()) {
-    ForceExitPresent();
-    auto* exception = MakeGarbageCollected<DOMException>(
-        DOMExceptionCode::kInvalidStateError, "Invalid number of layers.");
-    resolver->Reject(exception);
-    ReportPresentationResult(PresentationResult::kInvalidNumberOfLayers);
-    return promise;
-  }
-
-  // If what we were given has an invalid source, need to exit fullscreen with
-  // previous, valid source, so delay m_layer reassignment
-  if (layers[0]->source().IsNull()) {
-    ForceExitPresent();
-    auto* exception = MakeGarbageCollected<DOMException>(
-        DOMExceptionCode::kInvalidStateError, "Invalid layer source.");
-    resolver->Reject(exception);
-    ReportPresentationResult(PresentationResult::kInvalidLayerSource);
-    return promise;
-  }
-  layer_ = layers[0];
-
-  CanvasRenderingContext* rendering_context;
-  if (layer_->source().IsHTMLCanvasElement()) {
-    rendering_context =
-        layer_->source().GetAsHTMLCanvasElement()->RenderingContext();
-  } else {
-    DCHECK(layer_->source().IsOffscreenCanvas());
-    rendering_context =
-        layer_->source().GetAsOffscreenCanvas()->RenderingContext();
-  }
-
-  if (!rendering_context || !rendering_context->Is3d()) {
-    ForceExitPresent();
-    auto* exception = MakeGarbageCollected<DOMException>(
-        DOMExceptionCode::kInvalidStateError,
-        "Layer source must have a WebGLRenderingContext");
-    resolver->Reject(exception);
-    ReportPresentationResult(
-        PresentationResult::kLayerSourceMissingWebGLContext);
-    return promise;
-  }
-
-  // Save the WebGL script and underlying GL contexts for use by submitFrame().
-  rendering_context_ = ToWebGLRenderingContextBase(rendering_context);
-  context_gl_ = rendering_context_->ContextGL();
-
-  if ((layer_->leftBounds().size() != 0 && layer_->leftBounds().size() != 4) ||
-      (layer_->rightBounds().size() != 0 &&
-       layer_->rightBounds().size() != 4)) {
-    ForceExitPresent();
-    auto* exception = MakeGarbageCollected<DOMException>(
-        DOMExceptionCode::kInvalidStateError,
-        "Layer bounds must either be an empty array or have 4 values");
-    resolver->Reject(exception);
-    ReportPresentationResult(PresentationResult::kInvalidLayerBounds);
-    return promise;
-  }
-
-  for (float value : layer_->leftBounds()) {
-    if (std::isnan(value)) {
-      ForceExitPresent();
-      auto* exception = MakeGarbageCollected<DOMException>(
-          DOMExceptionCode::kInvalidStateError,
-          "Layer bounds must not contain NAN values");
-      resolver->Reject(exception);
-      ReportPresentationResult(PresentationResult::kInvalidLayerBounds);
-      return promise;
-    }
-  }
-
-  for (float value : layer_->rightBounds()) {
-    if (std::isnan(value)) {
-      ForceExitPresent();
-      auto* exception = MakeGarbageCollected<DOMException>(
-          DOMExceptionCode::kInvalidStateError,
-          "Layer bounds must not contain NAN values");
-      resolver->Reject(exception);
-      ReportPresentationResult(PresentationResult::kInvalidLayerBounds);
-      return promise;
-    }
-  }
-
-  if (!pending_present_resolvers_.IsEmpty()) {
-    // If we are waiting on the results of a previous requestPresent call don't
-    // fire a new request, just cache the resolver and resolve it when the
-    // original request returns.
-    pending_present_resolvers_.push_back(resolver);
-  } else if (first_present) {
-    if (!Controller()->Service()) {
-      ForceExitPresent();
-      auto* exception = MakeGarbageCollected<DOMException>(
-          DOMExceptionCode::kInvalidStateError,
-          "The service is no longer active.");
-      resolver->Reject(exception);
-      return promise;
-    }
-
-    pending_present_resolvers_.push_back(resolver);
-
-    // Set up the VR backwards compatible XRSessionOptions based on canvas
-    // properties.
-    device::mojom::blink::XRSessionOptionsPtr options =
-        device::mojom::blink::XRSessionOptions::New();
-    options->immersive = true;
-    options->is_legacy_webvr = true;
-
-    Controller()->Service()->RequestSession(
-        std::move(options),
-        WTF::Bind(&VRDisplay::OnRequestImmersiveSessionReturned,
-                  WrapPersistent(this)));
-    pending_present_request_ = true;
-
-    // The old vr_presentation_provider_ won't be delivering any vsyncs anymore,
-    // so we aren't waiting on it anymore.
-    pending_presenting_vsync_ = false;
-  } else {
-    UpdateLayerBounds();
-    resolver->Resolve();
-    ReportPresentationResult(PresentationResult::kSuccessAlreadyPresenting);
-  }
-
-  return promise;
-}
-
-void VRDisplay::OnRequestImmersiveSessionReturned(
-    device::mojom::blink::RequestSessionResultPtr result) {
-  device::mojom::blink::XRSessionPtr session =
-      result->is_session() ? std::move(result->get_session()) : nullptr;
-  pending_present_request_ = false;
-  if (session) {
-    DCHECK(session->submit_frame_sink);
-    vr_presentation_data_provider_.reset();
-    vr_presentation_data_provider_.Bind(std::move(session->data_provider));
-    // The presentation provider error handler can trigger if a device is
-    // disconnected from the system. This can happen if, for example, an HMD is
-    // unplugged.
-    vr_presentation_data_provider_.set_disconnect_handler(
-        WTF::Bind(&VRDisplay::OnPresentationProviderConnectionError,
-                  WrapWeakPersistent(this)));
-    vr_presentation_provider_.Bind(
-        std::move(session->submit_frame_sink->provider));
-    vr_presentation_provider_.set_disconnect_handler(
-        WTF::Bind(&VRDisplay::OnPresentationProviderConnectionError,
-                  WrapWeakPersistent(this)));
-
-    frame_transport_ = MakeGarbageCollected<XRFrameTransport>();
-    frame_transport_->BindSubmitFrameClient(
-        std::move(session->submit_frame_sink->client_receiver));
-    frame_transport_->SetTransportOptions(
-        std::move(session->submit_frame_sink->transport_options));
-
-    if (immersive_client_binding_)
-      immersive_client_binding_->Close();
-    immersive_client_binding_ = MakeGarbageCollected<SessionClientBinding>(
-        this, SessionClientBinding::SessionBindingType::kImmersive,
-        std::move(session->client_receiver));
-
-    Update(std::move(session->display_info));
-
-    this->BeginPresent();
-  } else {
-    this->ForceExitPresent();
-    auto* exception = MakeGarbageCollected<DOMException>(
-        DOMExceptionCode::kNotAllowedError, "Presentation request was denied.");
-
-    while (!pending_present_resolvers_.IsEmpty()) {
-      ScriptPromiseResolver* resolver = pending_present_resolvers_.TakeFirst();
-      resolver->Reject(exception);
-    }
-  }
-}
-
-void VRDisplay::SetNonImmersiveSession(
-    device::mojom::blink::RequestSessionResultPtr result) {
-  device::mojom::blink::XRSessionPtr session =
-      result->is_session() ? std::move(result->get_session()) : nullptr;
-  non_immersive_session_initialized_ = true;
-
-  // Only create the non immersive provider if we actually got a session.
-  // If we didn't get a session, we will just hand out identity poses.
-  if (session) {
-    non_immersive_provider_.Bind(std::move(session->data_provider));
-    non_immersive_client_binding_ = MakeGarbageCollected<SessionClientBinding>(
-        this, SessionClientBinding::SessionBindingType::kNonImmersive,
-        std::move(session->client_receiver));
-  }
-
-  // Now that we're initialized, we need to ensure that the data is flowing
-  // by requesting a VSync, since it may have skipped requesting one because
-  // we weren't yet initialized.
-  RequestVSync();
-}
-
-ScriptPromise VRDisplay::exitPresent(ScriptState* script_state) {
-  DVLOG(1) << __FUNCTION__;
-  auto* resolver = MakeGarbageCollected<ScriptPromiseResolver>(script_state);
-  ScriptPromise promise = resolver->Promise();
-
-  if (!is_presenting_) {
-    // Can't stop presenting if we're not presenting.
-    auto* exception = MakeGarbageCollected<DOMException>(
-        DOMExceptionCode::kInvalidStateError, "VRDisplay is not presenting.");
-    resolver->Reject(exception);
-    return promise;
-  }
-
-  if (!Controller()->Service()) {
-    auto* exception = MakeGarbageCollected<DOMException>(
-        DOMExceptionCode::kInvalidStateError, "VRService is not available.");
-    resolver->Reject(exception);
-    return promise;
-  }
-  Controller()->Service()->ExitPresent();
-
-  resolver->Resolve();
-
-  StopPresenting();
-
-  return promise;
-}
-
-void VRDisplay::BeginPresent() {
-  Document* doc = this->GetDocument();
-
-  DOMException* exception = nullptr;
-  if (!frame_transport_) {
-    exception = MakeGarbageCollected<DOMException>(
-        DOMExceptionCode::kInvalidStateError,
-        "VRDisplay presentation path not configured.");
-  }
-
-  if (layer_->source().IsOffscreenCanvas()) {
-    // TODO(junov, crbug.com/695497): Implement OffscreenCanvas presentation
-    exception = MakeGarbageCollected<DOMException>(
-        DOMExceptionCode::kInvalidStateError,
-        "OffscreenCanvas presentation not implemented.");
-  } else {
-    // A canvas must be either Offscreen or plain HTMLCanvas.
-    DCHECK(layer_->source().IsHTMLCanvasElement());
-  }
-
-  if (exception) {
-    ForceExitPresent();
-    while (!pending_present_resolvers_.IsEmpty()) {
-      ScriptPromiseResolver* resolver = pending_present_resolvers_.TakeFirst();
-      resolver->Reject(exception);
-    }
-    ReportPresentationResult(
-        PresentationResult::kPresentationNotSupportedByDisplay);
-    return;
-  }
-
-  // Presenting with external displays has to make a copy of the image
-  // since the canvas may still be visible at the same time.
-  present_image_needs_copy_ = capabilities_->hasExternalDisplay();
-
-  if (doc) {
-    Platform::Current()->RecordRapporURL("VR.WebVR.PresentSuccess",
-                                         WebURL(doc->Url()));
-  }
-  if (!FocusedOrPresenting() && display_blurred_) {
-    // Presentation doesn't care about focus, so if we're blurred because of
-    // focus, then unblur.
-    OnFocus(true);
-  }
-  is_presenting_ = true;
-  // Call RequestVSync to switch from the (internal) document rAF to the
-  // XRPresentationProvider GetFrameData rate.
-  RequestVSync();
-  ReportPresentationResult(PresentationResult::kSuccess);
-
-  UpdateLayerBounds();
-
-  while (!pending_present_resolvers_.IsEmpty()) {
-    ScriptPromiseResolver* resolver = pending_present_resolvers_.TakeFirst();
-    resolver->Resolve();
-  }
-  OnPresentChange();
-
-  // For GVR, we shut down normal vsync processing during VR presentation.
-  // Run window.rAF once manually so that applications get a chance to
-  // schedule a VRDisplay.rAF in case they do so only while presenting.
-  if (doc && !pending_vrdisplay_raf_ && !capabilities_->hasExternalDisplay()) {
-    base::TimeTicks timestamp = base::TimeTicks::Now();
-    doc->GetTaskRunner(blink::TaskType::kInternalMedia)
-        ->PostTask(FROM_HERE,
-                   WTF::Bind(&VRDisplay::ProcessScheduledWindowAnimations,
-                             WrapWeakPersistent(this), timestamp));
-  }
-}
-
-// Need to close service if exists and then free rendering context.
-void VRDisplay::ForceExitPresent() {
-  if (Controller()->Service()) {
-    Controller()->Service()->ExitPresent();
-  }
-  StopPresenting();
-}
-
-void VRDisplay::UpdateLayerBounds() {
-  if (!Controller()->Service())
-    return;
-
-  // Left eye defaults
-  if (layer_->leftBounds().size() != 4)
-    layer_->setLeftBounds({0.0f, 0.0f, 0.5f, 1.0f});
-  // Right eye defaults
-  if (layer_->rightBounds().size() != 4)
-    layer_->setRightBounds({0.5f, 0.0f, 0.5f, 1.0f});
-
-  const Vector<float>& left = layer_->leftBounds();
-  const Vector<float>& right = layer_->rightBounds();
-
-  vr_presentation_provider_->UpdateLayerBounds(
-      vr_frame_id_, WebFloatRect(left[0], left[1], left[2], left[3]),
-      WebFloatRect(right[0], right[1], right[2], right[3]),
-      WebSize(source_width_, source_height_));
-}
-
-HeapVector<Member<VRLayerInit>> VRDisplay::getLayers() {
-  HeapVector<Member<VRLayerInit>> layers;
-
-  if (is_presenting_) {
-    layers.push_back(layer_);
-  }
-
-  return layers;
-}
-
-scoped_refptr<Image> VRDisplay::GetFrameImage(
-    std::unique_ptr<viz::SingleReleaseCallback>* out_release_callback) {
-  TRACE_EVENT_BEGIN0("gpu", "VRDisplay:GetStaticBitmapImage");
-
-  scoped_refptr<Image> image_ref =
-      rendering_context_->GetStaticBitmapImage(out_release_callback);
-  TRACE_EVENT_END0("gpu", "VRDisplay::GetStaticBitmapImage");
-
-  // Hardware-accelerated rendering should always be texture backed,
-  // as implemented by AcceleratedStaticBitmapImage. Ensure this is
-  // the case, don't attempt to render if using an unexpected drawing
-  // path.
-  if (!image_ref.get() || !image_ref->IsTextureBacked()) {
-    TRACE_EVENT0("gpu", "VRDisplay::GetImage_SlowFallback");
-    // We get a non-texture-backed image when running web tests
-    // on desktop builds. Add a slow fallback so that these continue
-    // working.
-    image_ref = rendering_context_->GetImage(kPreferAcceleration);
-    if (!image_ref.get() || !image_ref->IsTextureBacked()) {
-      NOTREACHED()
-          << "WebXR requires hardware-accelerated rendering to texture";
-      return nullptr;
-    }
-  }
-  return image_ref;
-}
-
-void VRDisplay::submitFrame() {
-  DVLOG(2) << __FUNCTION__;
-
-  if (!Controller()->Service())
-    return;
-  TRACE_EVENT1("gpu", "submitFrame", "frame", vr_frame_id_);
-
-  Document* doc = this->GetDocument();
-  if (!doc)
-    return;
-
-  if (!is_presenting_) {
-    doc->AddConsoleMessage(ConsoleMessage::Create(
-        mojom::ConsoleMessageSource::kRendering,
-        mojom::ConsoleMessageLevel::kWarning,
-        "submitFrame has no effect when the VRDisplay is not presenting."));
-    return;
-  }
-
-  if (!in_animation_frame_) {
-    doc->AddConsoleMessage(
-        ConsoleMessage::Create(mojom::ConsoleMessageSource::kRendering,
-                               mojom::ConsoleMessageLevel::kWarning,
-                               "submitFrame must be called within a "
-                               "VRDisplay.requestAnimationFrame callback."));
-    return;
-  }
-
-  if (!context_gl_) {
-    // Something got confused, we can't submit frames without a GL context.
-    return;
-  }
-
-  // No frame Id to write before submitting the frame.
-  if (vr_frame_id_ < 0) {
-    // TODO(klausw): There used to be a submitFrame here, but we can't
-    // submit without a frameId and associated pose data. Just drop it.
-    return;
-  }
-
-  // Can't submit frames when the page isn't visible. This can happen  because
-  // we don't use the unified BeginFrame rendering path for WebVR so visibility
-  // updates aren't synchronized with WebVR VSync.
-  if (!doc->GetPage()->IsPageVisible())
-    return;
-
-  // Check if the canvas got resized, if yes send a bounds update.
-  int current_width = rendering_context_->drawingBufferWidth();
-  int current_height = rendering_context_->drawingBufferHeight();
-  if ((current_width != source_width_ || current_height != source_height_) &&
-      current_width != 0 && current_height != 0) {
-    source_width_ = current_width;
-    source_height_ = current_height;
-    UpdateLayerBounds();
-  }
-
-  frame_transport_->FramePreImage(context_gl_);
-
-  // Shared buffer draw is not supposed to be enabled for WebVR 1.1 since
-  // we don't currently have a way to override the canvas drawing buffer's
-  // bindings. Sanity check that it's off.
-  DCHECK(!frame_transport_->DrawingIntoSharedBuffer());
-
-  std::unique_ptr<viz::SingleReleaseCallback> image_release_callback;
-
-  scoped_refptr<Image> image_ref = GetFrameImage(&image_release_callback);
-  if (!image_ref)
-    return;
-
-  DrawingBuffer::Client* drawing_buffer_client =
-      static_cast<DrawingBuffer::Client*>(rendering_context_.Get());
-
-  frame_transport_->FrameSubmit(vr_presentation_provider_.get(), context_gl_,
-                                drawing_buffer_client, std::move(image_ref),
-                                std::move(image_release_callback), vr_frame_id_,
-                                present_image_needs_copy_);
-
-  did_submit_this_frame_ = true;
-  // Reset our frame id, since anything we'd want to do (resizing/etc) can
-  // no-longer happen to this frame.
-  vr_frame_id_ = -1;
-
-  // If preserveDrawingBuffer is false, must clear now. Normally this
-  // happens as part of compositing, but that's not active while
-  // presenting, so run the responsible code directly.
-  rendering_context_->MarkCompositedAndClearBackbufferIfNeeded();
-}
-
-Document* VRDisplay::GetDocument() {
-  return navigator_vr_->GetDocument();
-}
-
-mojo::PendingRemote<device::mojom::blink::VRDisplayClient>
-VRDisplay::GetDisplayClient() {
-  display_client_receiver_.reset();
-  // See https://bit.ly/2S0zRAS for task types.
-  return display_client_receiver_.BindNewPipeAndPassRemote(
-      GetExecutionContext()->GetTaskRunner(TaskType::kMiscPlatformAPI));
-}
-
-void VRDisplay::OnPresentChange() {
-  if (frame_transport_)
-    frame_transport_->PresentChange();
-
-  DVLOG(1) << __FUNCTION__ << ": is_presenting_=" << is_presenting_;
-  if (is_presenting_ && !is_valid_device_for_presenting_) {
-    DVLOG(1) << __FUNCTION__ << ": device not valid, not sending event";
-    return;
-  }
-  navigator_vr_->EnqueueVREvent(VRDisplayEvent::Create(
-      event_type_names::kVrdisplaypresentchange, this, ""));
-}
-
-void VRDisplay::OnChanged(device::mojom::blink::VRDisplayInfoPtr display,
-                          bool is_immersive) {
-  // VrDisplayInfo is only used for immersive sessions, so unless this is
-  // from an immersive device, ignore it.
-  // We expect that non-immersive sessions don't use display info, and immersive
-  // sessions will not use display info until they are presenting, so it is fine
-  // for us not to start listening until then.
-  if (is_immersive) {
-    Update(display);
-  }
-}
-
-void VRDisplay::OnExitPresent(bool is_immersive) {
-  if (is_immersive) {
-    StopPresenting();
-  }
-}
-
-void VRDisplay::OnConnected() {
-  navigator_vr_->EnqueueVREvent(VRDisplayEvent::Create(
-      event_type_names::kVrdisplayconnect, this, "connect"));
-}
-
-void VRDisplay::OnDisconnected() {
-  navigator_vr_->EnqueueVREvent(VRDisplayEvent::Create(
-      event_type_names::kVrdisplaydisconnect, this, "disconnect"));
-}
-
-void VRDisplay::StopPresenting() {
-  if (is_presenting_) {
-    if (!capabilities_->hasExternalDisplay()) {
-      if (layer_->source().IsHTMLCanvasElement()) {
-        // TODO(klausw,crbug.com/698923): If compositor updates are
-        // suppressed, restore them here.
-      } else {
-        // TODO(junov, crbug.com/695497): Implement for OffscreenCanvas
-      }
-    } else {
-      // Can't get into this presentation mode, so nothing to do here.
-    }
-    is_presenting_ = false;
-
-    OnPresentChange();
-
-    // Record user action for stop presenting.  Note that this could be
-    // user-triggered or not.
-    Platform::Current()->RecordAction(
-        UserMetricsAction("VR.WebVR.StopPresenting"));
-  }
-
-  frame_transport_ = nullptr;
-  rendering_context_ = nullptr;
-  context_gl_ = nullptr;
-  did_submit_this_frame_ = false;
-  RequestVSync();
-}
-
-void VRDisplay::OnActivate(device::mojom::blink::VRDisplayEventReason reason,
-                           OnActivateCallback on_handled) {
-  Document* doc = GetDocument();
-  if (!doc) {
-    std::move(on_handled).Run(true /* will_not_present */);
-    return;
-  }
-
-  std::unique_ptr<UserGestureIndicator> gesture_indicator;
-  if (reason == device::mojom::blink::VRDisplayEventReason::MOUNTED)
-    gesture_indicator = LocalFrame::NotifyUserActivation(doc->GetFrame());
-
-  navigator_vr_->DispatchVREvent(VRDisplayEvent::Create(
-      event_type_names::kVrdisplayactivate, this, reason));
-  std::move(on_handled).Run(!pending_present_request_ && !is_presenting_);
-}
-
-void VRDisplay::OnDeactivate(
-    device::mojom::blink::VRDisplayEventReason reason) {
-  navigator_vr_->EnqueueVREvent(VRDisplayEvent::Create(
-      event_type_names::kVrdisplaydeactivate, this, reason));
-}
-
-void VRDisplay::ProcessScheduledWindowAnimations(base::TimeTicks timestamp) {
-  TRACE_EVENT1("gpu", "VRDisplay::window.rAF", "frame", vr_frame_id_);
-  auto* doc = navigator_vr_->GetDocument();
-  if (!doc)
-    return;
-  auto* page = doc->GetPage();
-  if (!page)
-    return;
-
-  bool had_pending_vrdisplay_raf = pending_vrdisplay_raf_;
-  // TODO(klausw): update timestamp based on scheduling delay?
-  page->Animator().ServiceScriptedAnimations(timestamp);
-
-  if (had_pending_vrdisplay_raf != pending_vrdisplay_raf_) {
-    DVLOG(1) << __FUNCTION__
-             << ": window.rAF fallback successfully scheduled VRDisplay.rAF";
-  }
-
-  if (!pending_vrdisplay_raf_) {
-    // There wasn't any call to vrDisplay.rAF, so we will not be getting new
-    // frames from now on unless the application schedules one down the road in
-    // reaction to a separate event or timeout. TODO(klausw,crbug.com/716087):
-    // do something more useful here?
-    DVLOG(1) << __FUNCTION__
-             << ": no scheduled VRDisplay.requestAnimationFrame, presentation "
-                "broken?";
-  }
-}
-
-void VRDisplay::ProcessScheduledAnimations(base::TimeTicks timestamp) {
-  DVLOG(2) << __FUNCTION__;
-  // Check if we still have a valid context, the animation controller
-  // or document may have disappeared since we scheduled this.
-  Document* doc = this->GetDocument();
-  if (!doc || display_blurred_) {
-    DVLOG(2) << __FUNCTION__ << ": early exit, doc=" << doc
-             << " display_blurred_=" << display_blurred_;
-    return;
-  }
-
-  if (doc->IsContextPaused()) {
-    // We are currently suspended - try ProcessScheduledAnimations again later
-    // when we resume.
-    return;
-  }
-
-  TRACE_EVENT1("gpu", "VRDisplay::OnVSync", "frame", vr_frame_id_);
-
-  if (pending_vrdisplay_raf_ && scripted_animation_controller_) {
-    // Run the callback, making sure that in_animation_frame_ is only
-    // true for the vrDisplay rAF and not for a legacy window rAF
-    // that may be called later.
-    base::AutoReset<bool> animating(&in_animation_frame_, true);
-    pending_vrdisplay_raf_ = false;
-    did_submit_this_frame_ = false;
-    scripted_animation_controller_->ServiceScriptedAnimations(timestamp);
-    // If presenting and the script didn't call SubmitFrame, let the device
-    // side know so that it can cleanly reuse resources and make appropriate
-    // timing decisions. Note that is_presenting_ could become false during
-    // an animation loop due to reentrant mojo processing in SubmitFrame,
-    // so there's no guarantee that this is called for the last animating
-    // frame. That's OK since the sync token placed by FrameSubmitMissing
-    // is only intended to separate frames while presenting.
-    if (is_presenting_ && !did_submit_this_frame_) {
-      DCHECK(frame_transport_);
-      DCHECK(context_gl_);
-      frame_transport_->FrameSubmitMissing(vr_presentation_provider_.get(),
-                                           context_gl_, vr_frame_id_);
-    }
-  }
-  if (pending_pose_)
-    frame_pose_ = std::move(pending_pose_);
-
-  // Sanity check: If pending_vrdisplay_raf_ is true and the vsync provider
-  // is connected, we must now have a pending vsync.
-  DCHECK(!pending_vrdisplay_raf_ || pending_non_immersive_vsync_ ||
-         pending_presenting_vsync_);
-}
-
-void VRDisplay::OnPresentingVSync(
-    device::mojom::blink::XRFrameDataPtr frame_data) {
-  TRACE_EVENT0("gpu", __FUNCTION__);
-  if (!frame_data) {
-    return;
-  }
-
-  if (!context_gl_) {
-    DVLOG(1) << __FUNCTION__ << ": lost context";
-    return;
-  }
-
-  // All early exits that want this VSync converted to a non-immersive
-  // VSync must happen before this line. Once it's set to not pending,
-  // an early exit woud break animation.
-  pending_presenting_vsync_ = false;
-
-  frame_pose_ = std::move(frame_data->pose);
-  vr_frame_id_ = frame_data->frame_id;
-
-  if (frame_transport_ && frame_transport_->DrawingIntoSharedBuffer()) {
-    NOTIMPLEMENTED();
-  }
-
-  Document* doc = GetDocument();
-  if (!doc)
-    return;
-
-  if (frame_data->left_eye) {
-    eye_parameters_left_ =
-        MakeGarbageCollected<VREyeParameters>(frame_data->left_eye, 1);
-  }
-
-  if (frame_data->right_eye) {
-    eye_parameters_right_ =
-        MakeGarbageCollected<VREyeParameters>(frame_data->right_eye, 1);
-  }
-
-  if (frame_data->stage_parameters_updated) {
-    if (frame_data->stage_parameters) {
-      if (!stage_parameters_)
-        stage_parameters_ = MakeGarbageCollected<VRStageParameters>();
-      stage_parameters_->Update(frame_data->stage_parameters);
-    } else {
-      stage_parameters_ = nullptr;
-    }
-  }
-
-  // Post a task to handle scheduled animations after the current
-  // execution context finishes, so that we yield to non-mojo tasks in
-  // between frames. Executing mojo tasks back to back within the same
-  // execution context caused extreme input delay due to processing
-  // multiple frames without yielding, see crbug.com/701444. I suspect
-  // this is due to WaitForIncomingMethodCall receiving the OnVSync
-  // but queueing it for immediate execution since it doesn't match
-  // the interface being waited on.
-  //
-  // Used kInternalMedia since 1) this is not spec-ed and 2) this is media
-  // related then tasks should not be throttled or frozen in background tabs.
-  doc->GetTaskRunner(blink::TaskType::kInternalMedia)
-      ->PostTask(FROM_HERE,
-                 WTF::Bind(&VRDisplay::ProcessScheduledAnimations,
-                           WrapWeakPersistent(this),
-                           base::TimeTicks() + frame_data->time_delta));
-}
-
-void VRDisplay::OnNonImmersiveVSync(base::TimeTicks timestamp) {
-  DVLOG(2) << __FUNCTION__;
-  pending_non_immersive_vsync_ = false;
-  pending_non_immersive_vsync_id_ = -1;
-  if (is_presenting_)
-    return;
-  vr_frame_id_ = -1;
-  base::TimeDelta pose_age =
-      base::TimeTicks::Now() - non_immersive_pose_received_time_;
-  if (pose_age >= kNonImmersivePoseAgeThreshold &&
-      non_immersive_pose_request_time_ > non_immersive_pose_received_time_) {
-    // The VSync got triggered before ever receiving a pose, or the pose is
-    // stale. Defer the animation until a pose arrives to avoid passing null
-    // poses to the application, but only do this if we have an outstanding
-    // unresolved GetPose request. For example, the pose might be stale after
-    // exiting VR Browser non-immersive mode due to a longish transition, but we
-    // need to use it anyway if it's from the current frame's GetPose.
-    non_immersive_vsync_waiting_for_pose_ =
-        WTF::Bind(&VRDisplay::ProcessScheduledAnimations,
-                  WrapWeakPersistent(this), timestamp);
-  } else {
-    ProcessScheduledAnimations(timestamp);
-  }
-}
-
-void VRDisplay::OnNonImmersiveFrameData(
-    device::mojom::blink::XRFrameDataPtr data) {
-  non_immersive_pose_received_time_ = base::TimeTicks::Now();
-  if (data) {
-    if (!in_animation_frame_) {
-      frame_pose_ = std::move(data->pose);
-    } else {
-      pending_pose_ = std::move(data->pose);
-    }
-  }
-  if (non_immersive_vsync_waiting_for_pose_) {
-    // We have a vsync waiting for a pose, run it now.
-    std::move(non_immersive_vsync_waiting_for_pose_).Run();
-    non_immersive_vsync_waiting_for_pose_.Reset();
-  }
-}
-
-void VRDisplay::OnPresentationProviderConnectionError() {
-  DVLOG(1) << __FUNCTION__ << ";;; is_presenting_=" << is_presenting_
-           << " pending_non_immersive_vsync_=" << pending_non_immersive_vsync_
-           << " pending_presenting_vsync_=" << pending_presenting_vsync_;
-  vr_presentation_provider_.reset();
-  vr_presentation_data_provider_.reset();
-  if (is_presenting_) {
-    ForceExitPresent();
-  }
-  pending_presenting_vsync_ = false;
-  RequestVSync();
-}
-
-ScriptedAnimationController& VRDisplay::EnsureScriptedAnimationController(
-    Document* doc) {
-  if (!scripted_animation_controller_) {
-    scripted_animation_controller_ =
-        MakeGarbageCollected<ScriptedAnimationController>(doc);
-  }
-
-  return *scripted_animation_controller_;
-}
-
-void VRDisplay::Dispose() {
-  if (non_immersive_client_binding_)
-    non_immersive_client_binding_->Close();
-  non_immersive_client_binding_ = nullptr;
-  vr_presentation_provider_.reset();
-}
-
-ExecutionContext* VRDisplay::GetExecutionContext() const {
-  return ContextLifecycleObserver::GetExecutionContext();
-}
-
-const AtomicString& VRDisplay::InterfaceName() const {
-  return event_target_names::kVRDisplay;
-}
-
-void VRDisplay::ContextDestroyed(ExecutionContext* context) {
-  ContextLifecycleStateObserver::ContextDestroyed(context);
-  ForceExitPresent();
-  scripted_animation_controller_.Clear();
-}
-
-bool VRDisplay::HasPendingActivity() const {
-  // Prevent V8 from garbage collecting the wrapper object if there are
-  // event listeners and/or callbacks attached to it.
-  return GetExecutionContext() &&
-         (HasEventListeners() ||
-          (scripted_animation_controller_ &&
-           scripted_animation_controller_->HasFrameCallback()));
-}
-
-void VRDisplay::FocusChanged() {
-  DVLOG(1) << __FUNCTION__;
-  if (navigator_vr_->IsFocused()) {
-    if (is_presenting_) {
-      OnFocus(true /* is_immmersive */);
-    } else {
-      OnFocus(false /* is_immmersive */);
-    }
-  } else if (!is_presenting_) {
-    OnBlur(false);
-  }
-}
-
-bool VRDisplay::FocusedOrPresenting() {
-  // The browser can't track focus for frames, so we still need to check for
-  // focus in the renderer, even if the browser is checking focus before
-  // sending input.
-  return navigator_vr_->IsFocused() || is_presenting_;
-}
-
-void VRDisplay::Trace(blink::Visitor* visitor) {
-  visitor->Trace(navigator_vr_);
-  visitor->Trace(capabilities_);
-  visitor->Trace(stage_parameters_);
-  visitor->Trace(eye_parameters_left_);
-  visitor->Trace(eye_parameters_right_);
-  visitor->Trace(layer_);
-  visitor->Trace(rendering_context_);
-  visitor->Trace(frame_transport_);
-  visitor->Trace(scripted_animation_controller_);
-  visitor->Trace(non_immersive_client_binding_);
-  visitor->Trace(immersive_client_binding_);
-  visitor->Trace(pending_present_resolvers_);
-  EventTargetWithInlineData::Trace(visitor);
-  ContextLifecycleObserver::Trace(visitor);
-}
-
-}  // namespace blink
diff --git a/third_party/blink/renderer/modules/vr/vr_display.idl b/third_party/blink/renderer/modules/vr/vr_display.idl
deleted file mode 100644
index 04e577ae..0000000
--- a/third_party/blink/renderer/modules/vr/vr_display.idl
+++ /dev/null
@@ -1,54 +0,0 @@
-// 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.
-
-enum VREye {
-    "left",
-    "right"
-};
-
-// https://w3c.github.io/webvr/#interface-vrdisplay
-[
-    ActiveScriptWrappable,
-    RuntimeEnabled=WebVR
-] interface VRDisplay : EventTarget {
-    // An identifier for this device unique across VRDisplays.
-    readonly attribute unsigned long displayId;
-
-    // A user-readable name identifying the device.
-    [MeasureAs=VRDisplayDisplayName] readonly attribute DOMString displayName;
-
-    readonly attribute boolean isPresenting;
-
-    // [Constant]?
-    readonly attribute VRDisplayCapabilities capabilities;
-
-    readonly attribute VRStageParameters stageParameters;
-
-    [MeasureAs=VRDisplayGetFrameData] boolean getFrameData(VRFrameData frameData);
-
-    attribute double depthNear;
-    attribute double depthFar;
-
-    VREyeParameters getEyeParameters(VREye whichEye);
-
-    long requestAnimationFrame(FrameRequestCallback callback);
-    void cancelAnimationFrame(long handle);
-
-    // Begin presenting to the VRDisplay. Must be called in response to a user
-    // gesture. Repeat calls while already presenting will update the layer
-    // being displayed.
-    [CallWith=ScriptState] Promise<void> requestPresent(sequence<VRLayerInit> layers);
-
-    // Stops presenting to the VRDisplay.
-    [CallWith=ScriptState] Promise<void> exitPresent();
-
-    // Get the sources currently being presented.
-    sequence<VRLayerInit> getLayers();
-
-    // The layer provided to the `VRDisplay` will be captured and presented
-    // in the HMD. Calling this function has the same effect on the source
-    // canvas as any other operation that uses its source image, and canvases
-    // created without preserveDrawingBuffer set to true will be cleared.
-    void submitFrame();
-};
diff --git a/third_party/blink/renderer/modules/vr/vr_display_capabilities.h b/third_party/blink/renderer/modules/vr/vr_display_capabilities.h
deleted file mode 100644
index b927dbe..0000000
--- a/third_party/blink/renderer/modules/vr/vr_display_capabilities.h
+++ /dev/null
@@ -1,39 +0,0 @@
-// 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.
-
-#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_VR_VR_DISPLAY_CAPABILITIES_H_
-#define THIRD_PARTY_BLINK_RENDERER_MODULES_VR_VR_DISPLAY_CAPABILITIES_H_
-
-#include "third_party/blink/renderer/platform/bindings/script_wrappable.h"
-#include "third_party/blink/renderer/platform/heap/handle.h"
-#include "third_party/blink/renderer/platform/wtf/forward.h"
-
-namespace blink {
-
-class VRDisplayCapabilities final : public ScriptWrappable {
-  DEFINE_WRAPPERTYPEINFO();
-
- public:
-  VRDisplayCapabilities() = default;
-
-  bool hasPosition() const { return has_position_; }
-  bool hasExternalDisplay() const { return has_external_display_; }
-  bool canPresent() const { return can_present_; }
-  unsigned maxLayers() const { return max_layers_; }
-
-  void SetHasPosition(bool value) { has_position_ = value; }
-  void SetHasExternalDisplay(bool value) { has_external_display_ = value; }
-  void SetCanPresent(bool value) { can_present_ = value; }
-  void SetMaxLayers(unsigned value) { max_layers_ = value; }
-
- private:
-  bool has_position_ = false;
-  bool has_external_display_ = false;
-  bool can_present_ = false;
-  unsigned max_layers_ = 0;
-};
-
-}  // namespace blink
-
-#endif  // THIRD_PARTY_BLINK_RENDERER_MODULES_VR_VR_DISPLAY_CAPABILITIES_H_
diff --git a/third_party/blink/renderer/modules/vr/vr_display_capabilities.idl b/third_party/blink/renderer/modules/vr/vr_display_capabilities.idl
deleted file mode 100644
index 78cd1f5..0000000
--- a/third_party/blink/renderer/modules/vr/vr_display_capabilities.idl
+++ /dev/null
@@ -1,28 +0,0 @@
-// 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.
-
-// https://w3c.github.io/webvr/#interface-vrdisplaycapabilities
-[
-    RuntimeEnabled=WebVR
-] interface VRDisplayCapabilities {
-  // Whether or not the VR display is capable of reporting user position.
-  // If false position may still be reported using simulated values like
-  // neck modeling.
-  readonly attribute boolean hasPosition;
-
-  // Whether or not the VRDisplay is separate from the device’s primary display.
-  // If presenting VR content will obscure other content on the device, this
-  // should be false. When false VR content should not be mirrored.
-  readonly attribute boolean hasExternalDisplay;
-
-  // Whether or not the VRDisplay is capable of presenting content to an HMD or
-  // similar device. Can be used to indicate “magic window” devices that are
-  // capable of 6DoF tracking but for which requestPresent is not meaningful. If
-  // false then calls to requestPresent should always fail, and getEyeParameters
-  // should return null.
-  readonly attribute boolean canPresent;
-
-  // The maximum length of the array that VRDisplay.requestPresent will accept.
-  readonly attribute unsigned long maxLayers;
-};
diff --git a/third_party/blink/renderer/modules/vr/vr_display_event.cc b/third_party/blink/renderer/modules/vr/vr_display_event.cc
deleted file mode 100644
index ec24267..0000000
--- a/third_party/blink/renderer/modules/vr/vr_display_event.cc
+++ /dev/null
@@ -1,68 +0,0 @@
-// 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.
-
-#include "third_party/blink/renderer/modules/vr/vr_display_event.h"
-
-namespace blink {
-
-namespace {
-
-String VRDisplayEventReasonToString(
-    device::mojom::blink::VRDisplayEventReason reason) {
-  switch (reason) {
-    case device::mojom::blink::VRDisplayEventReason::NONE:
-      return "";
-    case device::mojom::blink::VRDisplayEventReason::NAVIGATION:
-      return "navigation";
-    case device::mojom::blink::VRDisplayEventReason::MOUNTED:
-      return "mounted";
-    case device::mojom::blink::VRDisplayEventReason::UNMOUNTED:
-      return "unmounted";
-  }
-
-  NOTREACHED();
-  return "";
-}
-
-}  // namespace
-
-VRDisplayEvent* VRDisplayEvent::Create(
-    const AtomicString& type,
-    VRDisplay* display,
-    device::mojom::blink::VRDisplayEventReason reason) {
-  return MakeGarbageCollected<VRDisplayEvent>(
-      type, display, VRDisplayEventReasonToString(reason));
-}
-
-VRDisplayEvent::VRDisplayEvent() = default;
-
-VRDisplayEvent::VRDisplayEvent(const AtomicString& type,
-                               VRDisplay* display,
-                               String reason)
-    : Event(type, Bubbles::kYes, Cancelable::kNo),
-      display_(display),
-      reason_(reason) {}
-
-VRDisplayEvent::VRDisplayEvent(const AtomicString& type,
-                               const VRDisplayEventInit* initializer)
-    : Event(type, initializer) {
-  if (initializer->hasDisplay())
-    display_ = initializer->display();
-
-  if (initializer->hasReason())
-    reason_ = initializer->reason();
-}
-
-VRDisplayEvent::~VRDisplayEvent() = default;
-
-const AtomicString& VRDisplayEvent::InterfaceName() const {
-  return event_interface_names::kVRDisplayEvent;
-}
-
-void VRDisplayEvent::Trace(blink::Visitor* visitor) {
-  visitor->Trace(display_);
-  Event::Trace(visitor);
-}
-
-}  // namespace blink
diff --git a/third_party/blink/renderer/modules/vr/vr_display_event.h b/third_party/blink/renderer/modules/vr/vr_display_event.h
deleted file mode 100644
index a73c03a..0000000
--- a/third_party/blink/renderer/modules/vr/vr_display_event.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// 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.
-
-#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_VR_VR_DISPLAY_EVENT_H_
-#define THIRD_PARTY_BLINK_RENDERER_MODULES_VR_VR_DISPLAY_EVENT_H_
-
-#include "third_party/blink/renderer/modules/event_modules.h"
-#include "third_party/blink/renderer/modules/vr/vr_display.h"
-#include "third_party/blink/renderer/modules/vr/vr_display_event_init.h"
-
-namespace blink {
-
-class VRDisplayEvent final : public Event {
-  DEFINE_WRAPPERTYPEINFO();
-
- public:
-  static VRDisplayEvent* Create() {
-    return MakeGarbageCollected<VRDisplayEvent>();
-  }
-  static VRDisplayEvent* Create(const AtomicString& type,
-                                VRDisplay* display,
-                                String reason) {
-    return MakeGarbageCollected<VRDisplayEvent>(type, display, reason);
-  }
-  static VRDisplayEvent* Create(const AtomicString& type,
-                                VRDisplay*,
-                                device::mojom::blink::VRDisplayEventReason);
-
-  static VRDisplayEvent* Create(const AtomicString& type,
-                                const VRDisplayEventInit* initializer) {
-    return MakeGarbageCollected<VRDisplayEvent>(type, initializer);
-  }
-
-  VRDisplayEvent();
-  VRDisplayEvent(const AtomicString& type, VRDisplay*, String);
-  VRDisplayEvent(const AtomicString&, const VRDisplayEventInit*);
-  ~VRDisplayEvent() override;
-
-  VRDisplay* display() const { return display_.Get(); }
-  const String& reason() const { return reason_; }
-
-  const AtomicString& InterfaceName() const override;
-
-  void Trace(blink::Visitor*) override;
-
- private:
-  Member<VRDisplay> display_;
-  String reason_;
-};
-
-}  // namespace blink
-
-#endif  // THIRD_PARTY_BLINK_RENDERER_MODULES_VR_VR_DISPLAY_EVENT_H_
diff --git a/third_party/blink/renderer/modules/vr/vr_display_event.idl b/third_party/blink/renderer/modules/vr/vr_display_event.idl
deleted file mode 100644
index 5627279..0000000
--- a/third_party/blink/renderer/modules/vr/vr_display_event.idl
+++ /dev/null
@@ -1,20 +0,0 @@
-// 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.
-
-enum VRDisplayEventReason {
-    "connected",
-    "disconnected",
-    "navigation",
-    "mounted",
-    "unmounted"
-};
-
-// https://w3c.github.io/webvr/#interface-vrdisplayevent
-[
-    RuntimeEnabled=WebVR,
-    Constructor(DOMString type, optional VRDisplayEventInit eventInitDict)
-] interface VRDisplayEvent : Event {
-    readonly attribute VRDisplay display;
-    readonly attribute VRDisplayEventReason reason;
-};
diff --git a/third_party/blink/renderer/modules/vr/vr_display_event_init.idl b/third_party/blink/renderer/modules/vr/vr_display_event_init.idl
deleted file mode 100644
index 2b8695a..0000000
--- a/third_party/blink/renderer/modules/vr/vr_display_event_init.idl
+++ /dev/null
@@ -1,13 +0,0 @@
-// 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.
-
-// https://w3c.github.io/webvr/#interface-vrdisplayeventinit
-
-dictionary VRDisplayEventInit : EventInit {
-    // TODO(foolip): |display| should be required and not nullable.
-    // https://crbug.com/647693
-    // https://github.com/w3c/webvr/issues/83
-    VRDisplay? display;
-    VRDisplayEventReason reason;
-};
diff --git a/third_party/blink/renderer/modules/vr/vr_eye_parameters.idl b/third_party/blink/renderer/modules/vr/vr_eye_parameters.idl
deleted file mode 100644
index 4da215c..0000000
--- a/third_party/blink/renderer/modules/vr/vr_eye_parameters.idl
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2015 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.
-
-// https://w3c.github.io/webvr/#interface-vreyeparameters
-[
-    RuntimeEnabled=WebVR
-] interface VREyeParameters {
-  /* These values will vary after a FOV has been set */
-  [DeprecateAs=VREyeParametersOffset] readonly attribute Float32Array offset;
-  readonly attribute unsigned long renderWidth;
-  readonly attribute unsigned long renderHeight;
-};
diff --git a/third_party/blink/renderer/modules/vr/vr_field_of_view.h b/third_party/blink/renderer/modules/vr/vr_field_of_view.h
deleted file mode 100644
index 50a513a..0000000
--- a/third_party/blink/renderer/modules/vr/vr_field_of_view.h
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2015 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_BLINK_RENDERER_MODULES_VR_VR_FIELD_OF_VIEW_H_
-#define THIRD_PARTY_BLINK_RENDERER_MODULES_VR_VR_FIELD_OF_VIEW_H_
-
-#include "third_party/blink/renderer/platform/heap/handle.h"
-#include "third_party/blink/renderer/platform/wtf/forward.h"
-
-namespace blink {
-
-class VRFieldOfView final : public GarbageCollected<VRFieldOfView> {
- public:
-  VRFieldOfView()
-      : up_degrees_(0.0),
-        down_degrees_(0.0),
-        left_degrees_(0.0),
-        right_degrees_(0.0) {}
-
-  VRFieldOfView(double up_degrees,
-                double right_degrees,
-                double down_degrees,
-                double left_degrees)
-      : up_degrees_(0.0),
-        down_degrees_(0.0),
-        left_degrees_(0.0),
-        right_degrees_(0.0) {}
-
-  explicit VRFieldOfView(const VRFieldOfView& fov)
-      : up_degrees_(fov.up_degrees_),
-        down_degrees_(fov.down_degrees_),
-        left_degrees_(fov.left_degrees_),
-        right_degrees_(fov.right_degrees_) {}
-
-  double UpDegrees() const { return up_degrees_; }
-  double DownDegrees() const { return down_degrees_; }
-  double LeftDegrees() const { return left_degrees_; }
-  double RightDegrees() const { return right_degrees_; }
-
-  void SetUpDegrees(double value) { up_degrees_ = value; }
-  void SetDownDegrees(double value) { down_degrees_ = value; }
-  void SetLeftDegrees(double value) { left_degrees_ = value; }
-  void SetRightDegrees(double value) { right_degrees_ = value; }
-
-  void Trace(blink::Visitor* visitor) {}
-
- private:
-  double up_degrees_;
-  double down_degrees_;
-  double left_degrees_;
-  double right_degrees_;
-};
-
-}  // namespace blink
-
-#endif  // THIRD_PARTY_BLINK_RENDERER_MODULES_VR_VR_FIELD_OF_VIEW_H_
diff --git a/third_party/blink/renderer/modules/vr/vr_frame_data.idl b/third_party/blink/renderer/modules/vr/vr_frame_data.idl
deleted file mode 100644
index 9df122c..0000000
--- a/third_party/blink/renderer/modules/vr/vr_frame_data.idl
+++ /dev/null
@@ -1,17 +0,0 @@
-// 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.
-
-// https://w3c.github.io/webvr/#interface-vrframedata
-[
-    RuntimeEnabled=WebVR,
-    Constructor
-] interface VRFrameData {
-    readonly attribute Float32Array leftProjectionMatrix;
-    readonly attribute Float32Array leftViewMatrix;
-
-    readonly attribute Float32Array rightProjectionMatrix;
-    readonly attribute Float32Array rightViewMatrix;
-
-    readonly attribute VRPose pose;
-};
diff --git a/third_party/blink/renderer/modules/vr/vr_layer_init.idl b/third_party/blink/renderer/modules/vr/vr_layer_init.idl
deleted file mode 100644
index 114de359..0000000
--- a/third_party/blink/renderer/modules/vr/vr_layer_init.idl
+++ /dev/null
@@ -1,21 +0,0 @@
-// 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.
-
-typedef (HTMLCanvasElement or OffscreenCanvas) VRSource;
-
-// https://w3c.github.io/webvr/#interface-vrlayerinit
-
-dictionary VRLayerInit {
-  // The canvas to be presented to the VRDisplay
-  VRSource? source = null;
-
-  // The left and right bounds contain 4 git statvalues defining the texture bounds
-  // within the canvas to present to the eye in UV space.
-  // [0] left offset of the bounds (0.0 - 1.0)
-  // [1] top offset of the bounds (0.0 - 1.0)
-  // [2] width of the bounds (0.0 - 1.0)
-  // [3] height of the bounds (0.0 - 1.0)
-  sequence<float> leftBounds = []; //= [0.0, 0.0, 0.5, 1.0];
-  sequence<float> rightBounds = []; //= [0.5, 0.0, 0.5, 1.0];
-};
diff --git a/third_party/blink/renderer/modules/vr/vr_pose.idl b/third_party/blink/renderer/modules/vr/vr_pose.idl
deleted file mode 100644
index e8dcd63..0000000
--- a/third_party/blink/renderer/modules/vr/vr_pose.idl
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2015 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.
-
-// https://w3c.github.io/webvr/#interface-vrpose
-[
-    RuntimeEnabled=WebVR
-] interface VRPose {
-    readonly attribute Float32Array? position;
-    [MeasureAs=VRPoseLinearVelocity] readonly attribute Float32Array? linearVelocity;
-    [MeasureAs=VRPoseLinearAcceleration] readonly attribute Float32Array? linearAcceleration;
-    readonly attribute Float32Array? orientation;
-    [MeasureAs=VRPoseAngularVelocity] readonly attribute Float32Array? angularVelocity;
-    [MeasureAs=VRPoseAngularAcceleration] readonly attribute Float32Array? angularAcceleration;
-};
diff --git a/third_party/blink/renderer/modules/vr/vr_stage_parameters.idl b/third_party/blink/renderer/modules/vr/vr_stage_parameters.idl
deleted file mode 100644
index 562c9b5a..0000000
--- a/third_party/blink/renderer/modules/vr/vr_stage_parameters.idl
+++ /dev/null
@@ -1,25 +0,0 @@
-// 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.
-
-// https://w3c.github.io/webvr/#interface-vrstageparameters
-[
-    RuntimeEnabled=WebVR
-] interface VRStageParameters {
-  // A 16 element array containing the components of a 4x4 transform
-  // matrix.  This matrix transforms the sitting space position
-  // returned by get{Immediate}Pose() to a standing space position.
-  readonly attribute Float32Array sittingToStandingTransform;
-
-  // Dimensions of the play area bounds. The bounds are defined
-  // as an axis aligned rectangle on the floor.
-  // The center of the rectangle is at (0,0,0) in standing space
-  // coordinates.
-  // These bounds are defined for safety purposes.
-  // Content should not require the user to move beyond these
-  // bounds; however, it is possible for the user to ignore
-  // the bounds resulting in position values outside of
-  // this rectangle.
-  readonly attribute float sizeX;
-  readonly attribute float sizeZ;
-};
diff --git a/third_party/blink/renderer/modules/webgpu/dawn_conversions.cc b/third_party/blink/renderer/modules/webgpu/dawn_conversions.cc
index af1fb2a..94b5f72 100644
--- a/third_party/blink/renderer/modules/webgpu/dawn_conversions.cc
+++ b/third_party/blink/renderer/modules/webgpu/dawn_conversions.cc
@@ -4,7 +4,7 @@
 
 #include "third_party/blink/renderer/modules/webgpu/dawn_conversions.h"
 
-#include <dawn/dawn.h>
+#include <dawn/webgpu.h>
 
 #include "third_party/blink/renderer/bindings/modules/v8/double_sequence_or_gpu_color_dict.h"
 #include "third_party/blink/renderer/bindings/modules/v8/unsigned_long_sequence_or_gpu_extent_3d_dict.h"
@@ -16,599 +16,599 @@
 namespace blink {
 
 template <>
-DawnBindingType AsDawnEnum<DawnBindingType>(const WTF::String& webgpu_enum) {
+WGPUBindingType AsDawnEnum<WGPUBindingType>(const WTF::String& webgpu_enum) {
   if (webgpu_enum == "uniform-buffer") {
-    return DAWN_BINDING_TYPE_UNIFORM_BUFFER;
+    return WGPUBindingType_UniformBuffer;
   }
   if (webgpu_enum == "storage-buffer") {
-    return DAWN_BINDING_TYPE_STORAGE_BUFFER;
+    return WGPUBindingType_StorageBuffer;
   }
   if (webgpu_enum == "readonly-storage-buffer") {
-    return DAWN_BINDING_TYPE_READONLY_STORAGE_BUFFER;
+    return WGPUBindingType_ReadonlyStorageBuffer;
   }
   if (webgpu_enum == "sampler") {
-    return DAWN_BINDING_TYPE_SAMPLER;
+    return WGPUBindingType_Sampler;
   }
   if (webgpu_enum == "sampled-texture") {
-    return DAWN_BINDING_TYPE_SAMPLED_TEXTURE;
+    return WGPUBindingType_SampledTexture;
   }
   if (webgpu_enum == "storage-texture") {
-    return DAWN_BINDING_TYPE_STORAGE_TEXTURE;
+    return WGPUBindingType_StorageTexture;
   }
   NOTREACHED();
-  return DAWN_BINDING_TYPE_FORCE32;
+  return WGPUBindingType_Force32;
 }
 
 template <>
-DawnTextureComponentType AsDawnEnum<DawnTextureComponentType>(
+WGPUTextureComponentType AsDawnEnum<WGPUTextureComponentType>(
     const WTF::String& webgpu_enum) {
   if (webgpu_enum == "float") {
-    return DAWN_TEXTURE_COMPONENT_TYPE_FLOAT;
+    return WGPUTextureComponentType_Float;
   }
   if (webgpu_enum == "uint") {
-    return DAWN_TEXTURE_COMPONENT_TYPE_UINT;
+    return WGPUTextureComponentType_Uint;
   }
   if (webgpu_enum == "sint") {
-    return DAWN_TEXTURE_COMPONENT_TYPE_SINT;
+    return WGPUTextureComponentType_Sint;
   }
   NOTREACHED();
-  return DAWN_TEXTURE_COMPONENT_TYPE_FORCE32;
+  return WGPUTextureComponentType_Force32;
 }
 
 template <>
-DawnCompareFunction AsDawnEnum<DawnCompareFunction>(
+WGPUCompareFunction AsDawnEnum<WGPUCompareFunction>(
     const WTF::String& webgpu_enum) {
   if (webgpu_enum == "never") {
-    return DAWN_COMPARE_FUNCTION_NEVER;
+    return WGPUCompareFunction_Never;
   }
   if (webgpu_enum == "less") {
-    return DAWN_COMPARE_FUNCTION_LESS;
+    return WGPUCompareFunction_Less;
   }
   if (webgpu_enum == "equal") {
-    return DAWN_COMPARE_FUNCTION_EQUAL;
+    return WGPUCompareFunction_Equal;
   }
   if (webgpu_enum == "less-equal") {
-    return DAWN_COMPARE_FUNCTION_LESS_EQUAL;
+    return WGPUCompareFunction_LessEqual;
   }
   if (webgpu_enum == "greater") {
-    return DAWN_COMPARE_FUNCTION_GREATER;
+    return WGPUCompareFunction_Greater;
   }
   if (webgpu_enum == "not-equal") {
-    return DAWN_COMPARE_FUNCTION_NOT_EQUAL;
+    return WGPUCompareFunction_NotEqual;
   }
   if (webgpu_enum == "greater-equal") {
-    return DAWN_COMPARE_FUNCTION_GREATER_EQUAL;
+    return WGPUCompareFunction_GreaterEqual;
   }
   if (webgpu_enum == "always") {
-    return DAWN_COMPARE_FUNCTION_ALWAYS;
+    return WGPUCompareFunction_Always;
   }
   NOTREACHED();
-  return DAWN_COMPARE_FUNCTION_FORCE32;
+  return WGPUCompareFunction_Force32;
 }
 
 template <>
-DawnTextureFormat AsDawnEnum<DawnTextureFormat>(
+WGPUTextureFormat AsDawnEnum<WGPUTextureFormat>(
     const WTF::String& webgpu_enum) {
   if (webgpu_enum.IsNull()) {
-    return DAWN_TEXTURE_FORMAT_UNDEFINED;
+    return WGPUTextureFormat_Undefined;
   }
 
   // Normal 8 bit formats
   if (webgpu_enum == "r8unorm") {
-    return DAWN_TEXTURE_FORMAT_R8_UNORM;
+    return WGPUTextureFormat_R8Unorm;
   }
   if (webgpu_enum == "r8snorm") {
-    return DAWN_TEXTURE_FORMAT_R8_SNORM;
+    return WGPUTextureFormat_R8Snorm;
   }
   if (webgpu_enum == "r8uint") {
-    return DAWN_TEXTURE_FORMAT_R8_UINT;
+    return WGPUTextureFormat_R8Uint;
   }
   if (webgpu_enum == "r8sint") {
-    return DAWN_TEXTURE_FORMAT_R8_SINT;
+    return WGPUTextureFormat_R8Sint;
   }
 
   // Normal 16 bit formats
   if (webgpu_enum == "r16uint") {
-    return DAWN_TEXTURE_FORMAT_R16_UINT;
+    return WGPUTextureFormat_R16Uint;
   }
   if (webgpu_enum == "r16sint") {
-    return DAWN_TEXTURE_FORMAT_R16_SINT;
+    return WGPUTextureFormat_R16Sint;
   }
   if (webgpu_enum == "r16float") {
-    return DAWN_TEXTURE_FORMAT_R16_FLOAT;
+    return WGPUTextureFormat_R16Float;
   }
   if (webgpu_enum == "rg8unorm") {
-    return DAWN_TEXTURE_FORMAT_RG8_UNORM;
+    return WGPUTextureFormat_RG8Unorm;
   }
   if (webgpu_enum == "rg8snorm") {
-    return DAWN_TEXTURE_FORMAT_RG8_SNORM;
+    return WGPUTextureFormat_RG8Snorm;
   }
   if (webgpu_enum == "rg8uint") {
-    return DAWN_TEXTURE_FORMAT_RG8_UINT;
+    return WGPUTextureFormat_RG8Uint;
   }
   if (webgpu_enum == "rg8sint") {
-    return DAWN_TEXTURE_FORMAT_RG8_SINT;
+    return WGPUTextureFormat_RG8Sint;
   }
 
   // Normal 32 bit formats
   if (webgpu_enum == "r32uint") {
-    return DAWN_TEXTURE_FORMAT_R32_UINT;
+    return WGPUTextureFormat_R32Uint;
   }
   if (webgpu_enum == "r32sint") {
-    return DAWN_TEXTURE_FORMAT_R32_SINT;
+    return WGPUTextureFormat_R32Sint;
   }
   if (webgpu_enum == "r32float") {
-    return DAWN_TEXTURE_FORMAT_R32_FLOAT;
+    return WGPUTextureFormat_R32Float;
   }
   if (webgpu_enum == "rg16uint") {
-    return DAWN_TEXTURE_FORMAT_RG16_UINT;
+    return WGPUTextureFormat_RG16Uint;
   }
   if (webgpu_enum == "rg16sint") {
-    return DAWN_TEXTURE_FORMAT_RG16_SINT;
+    return WGPUTextureFormat_RG16Sint;
   }
   if (webgpu_enum == "rg16float") {
-    return DAWN_TEXTURE_FORMAT_RG16_FLOAT;
+    return WGPUTextureFormat_RG16Float;
   }
   if (webgpu_enum == "rgba8unorm") {
-    return DAWN_TEXTURE_FORMAT_RGBA8_UNORM;
+    return WGPUTextureFormat_RGBA8Unorm;
   }
   if (webgpu_enum == "rgba8unorm-srgb") {
-    return DAWN_TEXTURE_FORMAT_RGBA8_UNORM_SRGB;
+    return WGPUTextureFormat_RGBA8UnormSrgb;
   }
   if (webgpu_enum == "rgba8snorm") {
-    return DAWN_TEXTURE_FORMAT_RGBA8_SNORM;
+    return WGPUTextureFormat_RGBA8Snorm;
   }
   if (webgpu_enum == "rgba8uint") {
-    return DAWN_TEXTURE_FORMAT_RGBA8_UINT;
+    return WGPUTextureFormat_RGBA8Uint;
   }
   if (webgpu_enum == "rgba8sint") {
-    return DAWN_TEXTURE_FORMAT_RGBA8_SINT;
+    return WGPUTextureFormat_RGBA8Sint;
   }
   if (webgpu_enum == "bgra8unorm") {
-    return DAWN_TEXTURE_FORMAT_BGRA8_UNORM;
+    return WGPUTextureFormat_BGRA8Unorm;
   }
   if (webgpu_enum == "bgra8unorm-srgb") {
-    return DAWN_TEXTURE_FORMAT_BGRA8_UNORM_SRGB;
+    return WGPUTextureFormat_BGRA8UnormSrgb;
   }
 
   // Packed 32 bit formats
   if (webgpu_enum == "rgb10a2unorm") {
-    return DAWN_TEXTURE_FORMAT_RGB10_A2_UNORM;
+    return WGPUTextureFormat_RGB10A2Unorm;
   }
   if (webgpu_enum == "rg11b10float") {
-    return DAWN_TEXTURE_FORMAT_RG11_B10_FLOAT;
+    return WGPUTextureFormat_RG11B10Float;
   }
 
   // Normal 64 bit formats
   if (webgpu_enum == "rg32uint") {
-    return DAWN_TEXTURE_FORMAT_RG32_UINT;
+    return WGPUTextureFormat_RG32Uint;
   }
   if (webgpu_enum == "rg32sint") {
-    return DAWN_TEXTURE_FORMAT_RG32_SINT;
+    return WGPUTextureFormat_RG32Sint;
   }
   if (webgpu_enum == "rg32float") {
-    return DAWN_TEXTURE_FORMAT_RG32_FLOAT;
+    return WGPUTextureFormat_RG32Float;
   }
   if (webgpu_enum == "rgba16uint") {
-    return DAWN_TEXTURE_FORMAT_RGBA16_UINT;
+    return WGPUTextureFormat_RGBA16Uint;
   }
   if (webgpu_enum == "rgba16sint") {
-    return DAWN_TEXTURE_FORMAT_RGBA16_SINT;
+    return WGPUTextureFormat_RGBA16Sint;
   }
   if (webgpu_enum == "rgba16float") {
-    return DAWN_TEXTURE_FORMAT_RGBA16_FLOAT;
+    return WGPUTextureFormat_RGBA16Float;
   }
 
   // Normal 128 bit formats
   if (webgpu_enum == "rgba32uint") {
-    return DAWN_TEXTURE_FORMAT_RGBA32_UINT;
+    return WGPUTextureFormat_RGBA32Uint;
   }
   if (webgpu_enum == "rgba32sint") {
-    return DAWN_TEXTURE_FORMAT_RGBA32_SINT;
+    return WGPUTextureFormat_RGBA32Sint;
   }
   if (webgpu_enum == "rgba32float") {
-    return DAWN_TEXTURE_FORMAT_RGBA32_FLOAT;
+    return WGPUTextureFormat_RGBA32Float;
   }
 
   // Depth / Stencil formats
   if (webgpu_enum == "depth32float") {
-    return DAWN_TEXTURE_FORMAT_DEPTH32_FLOAT;
+    return WGPUTextureFormat_Depth32Float;
   }
   if (webgpu_enum == "depth24plus") {
-    return DAWN_TEXTURE_FORMAT_DEPTH24_PLUS;
+    return WGPUTextureFormat_Depth24Plus;
   }
   if (webgpu_enum == "depth24plus-stencil8") {
-    return DAWN_TEXTURE_FORMAT_DEPTH24_PLUS_STENCIL8;
+    return WGPUTextureFormat_Depth24PlusStencil8;
   }
 
-  return DAWN_TEXTURE_FORMAT_FORCE32;
+  return WGPUTextureFormat_Force32;
 }
 
 template <>
-DawnTextureDimension AsDawnEnum<DawnTextureDimension>(
+WGPUTextureDimension AsDawnEnum<WGPUTextureDimension>(
     const WTF::String& webgpu_enum) {
   if (webgpu_enum == "2d") {
-    return DAWN_TEXTURE_DIMENSION_2D;
+    return WGPUTextureDimension_2D;
   }
   // TODO(crbug.com/dawn/129): Implement "1d" and "3d".
   NOTREACHED();
-  return DAWN_TEXTURE_DIMENSION_FORCE32;
+  return WGPUTextureDimension_Force32;
 }
 
 template <>
-DawnTextureViewDimension AsDawnEnum<DawnTextureViewDimension>(
+WGPUTextureViewDimension AsDawnEnum<WGPUTextureViewDimension>(
     const WTF::String& webgpu_enum) {
   if (webgpu_enum.IsNull()) {
-    return DAWN_TEXTURE_VIEW_DIMENSION_UNDEFINED;
+    return WGPUTextureViewDimension_Undefined;
   }
   if (webgpu_enum == "2d") {
-    return DAWN_TEXTURE_VIEW_DIMENSION_2D;
+    return WGPUTextureViewDimension_2D;
   }
   if (webgpu_enum == "2d-array") {
-    return DAWN_TEXTURE_VIEW_DIMENSION_2D_ARRAY;
+    return WGPUTextureViewDimension_2DArray;
   }
   if (webgpu_enum == "cube") {
-    return DAWN_TEXTURE_VIEW_DIMENSION_CUBE;
+    return WGPUTextureViewDimension_Cube;
   }
   if (webgpu_enum == "cube-array") {
-    return DAWN_TEXTURE_VIEW_DIMENSION_CUBE_ARRAY;
+    return WGPUTextureViewDimension_CubeArray;
   }
   // TODO(crbug.com/dawn/129): Implement "1d" and "3d".
   NOTREACHED();
-  return DAWN_TEXTURE_VIEW_DIMENSION_FORCE32;
+  return WGPUTextureViewDimension_Force32;
 }
 
 template <>
-DawnStencilOperation AsDawnEnum<DawnStencilOperation>(
+WGPUStencilOperation AsDawnEnum<WGPUStencilOperation>(
     const WTF::String& webgpu_enum) {
   if (webgpu_enum == "keep") {
-    return DAWN_STENCIL_OPERATION_KEEP;
+    return WGPUStencilOperation_Keep;
   }
   if (webgpu_enum == "zero") {
-    return DAWN_STENCIL_OPERATION_ZERO;
+    return WGPUStencilOperation_Zero;
   }
   if (webgpu_enum == "replace") {
-    return DAWN_STENCIL_OPERATION_REPLACE;
+    return WGPUStencilOperation_Replace;
   }
   if (webgpu_enum == "invert") {
-    return DAWN_STENCIL_OPERATION_INVERT;
+    return WGPUStencilOperation_Invert;
   }
   if (webgpu_enum == "increment-clamp") {
-    return DAWN_STENCIL_OPERATION_INCREMENT_CLAMP;
+    return WGPUStencilOperation_IncrementClamp;
   }
   if (webgpu_enum == "decrement-clamp") {
-    return DAWN_STENCIL_OPERATION_DECREMENT_CLAMP;
+    return WGPUStencilOperation_DecrementClamp;
   }
   if (webgpu_enum == "increment-wrap") {
-    return DAWN_STENCIL_OPERATION_INCREMENT_WRAP;
+    return WGPUStencilOperation_IncrementWrap;
   }
   if (webgpu_enum == "decrement-wrap") {
-    return DAWN_STENCIL_OPERATION_DECREMENT_WRAP;
+    return WGPUStencilOperation_DecrementWrap;
   }
   NOTREACHED();
-  return DAWN_STENCIL_OPERATION_FORCE32;
+  return WGPUStencilOperation_Force32;
 }
 
 template <>
-DawnStoreOp AsDawnEnum<DawnStoreOp>(const WTF::String& webgpu_enum) {
+WGPUStoreOp AsDawnEnum<WGPUStoreOp>(const WTF::String& webgpu_enum) {
   if (webgpu_enum == "store") {
-    return DAWN_STORE_OP_STORE;
+    return WGPUStoreOp_Store;
   }
   if (webgpu_enum == "clear") {
-    return DAWN_STORE_OP_CLEAR;
+    return WGPUStoreOp_Clear;
   }
   NOTREACHED();
-  return DAWN_STORE_OP_FORCE32;
+  return WGPUStoreOp_Force32;
 }
 
 template <>
-DawnLoadOp AsDawnEnum<DawnLoadOp>(const WTF::String& webgpu_enum) {
+WGPULoadOp AsDawnEnum<WGPULoadOp>(const WTF::String& webgpu_enum) {
   if (webgpu_enum == "load") {
-    return DAWN_LOAD_OP_LOAD;
+    return WGPULoadOp_Load;
   }
   NOTREACHED();
-  return DAWN_LOAD_OP_FORCE32;
+  return WGPULoadOp_Force32;
 }
 
 template <>
-DawnIndexFormat AsDawnEnum<DawnIndexFormat>(const WTF::String& webgpu_enum) {
+WGPUIndexFormat AsDawnEnum<WGPUIndexFormat>(const WTF::String& webgpu_enum) {
   if (webgpu_enum == "uint16") {
-    return DAWN_INDEX_FORMAT_UINT16;
+    return WGPUIndexFormat_Uint16;
   }
   if (webgpu_enum == "uint32") {
-    return DAWN_INDEX_FORMAT_UINT32;
+    return WGPUIndexFormat_Uint32;
   }
   NOTREACHED();
-  return DAWN_INDEX_FORMAT_FORCE32;
+  return WGPUIndexFormat_Force32;
 }
 
 template <>
-DawnPrimitiveTopology AsDawnEnum<DawnPrimitiveTopology>(
+WGPUPrimitiveTopology AsDawnEnum<WGPUPrimitiveTopology>(
     const WTF::String& webgpu_enum) {
   if (webgpu_enum == "point-list") {
-    return DAWN_PRIMITIVE_TOPOLOGY_POINT_LIST;
+    return WGPUPrimitiveTopology_PointList;
   }
   if (webgpu_enum == "line-list") {
-    return DAWN_PRIMITIVE_TOPOLOGY_LINE_LIST;
+    return WGPUPrimitiveTopology_LineList;
   }
   if (webgpu_enum == "line-strip") {
-    return DAWN_PRIMITIVE_TOPOLOGY_LINE_STRIP;
+    return WGPUPrimitiveTopology_LineStrip;
   }
   if (webgpu_enum == "triangle-list") {
-    return DAWN_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
+    return WGPUPrimitiveTopology_TriangleList;
   }
   if (webgpu_enum == "triangle-strip") {
-    return DAWN_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP;
+    return WGPUPrimitiveTopology_TriangleStrip;
   }
   NOTREACHED();
-  return DAWN_PRIMITIVE_TOPOLOGY_FORCE32;
+  return WGPUPrimitiveTopology_Force32;
 }
 
 template <>
-DawnBlendFactor AsDawnEnum<DawnBlendFactor>(const WTF::String& webgpu_enum) {
+WGPUBlendFactor AsDawnEnum<WGPUBlendFactor>(const WTF::String& webgpu_enum) {
   if (webgpu_enum == "zero") {
-    return DAWN_BLEND_FACTOR_ZERO;
+    return WGPUBlendFactor_Zero;
   }
   if (webgpu_enum == "one") {
-    return DAWN_BLEND_FACTOR_ONE;
+    return WGPUBlendFactor_One;
   }
   if (webgpu_enum == "src-color") {
-    return DAWN_BLEND_FACTOR_SRC_COLOR;
+    return WGPUBlendFactor_SrcColor;
   }
   if (webgpu_enum == "one-minus-src-color") {
-    return DAWN_BLEND_FACTOR_ONE_MINUS_SRC_COLOR;
+    return WGPUBlendFactor_OneMinusSrcColor;
   }
   if (webgpu_enum == "src-alpha") {
-    return DAWN_BLEND_FACTOR_SRC_ALPHA;
+    return WGPUBlendFactor_SrcAlpha;
   }
   if (webgpu_enum == "one-minus-src-alpha") {
-    return DAWN_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA;
+    return WGPUBlendFactor_OneMinusSrcAlpha;
   }
   if (webgpu_enum == "dst-color") {
-    return DAWN_BLEND_FACTOR_DST_COLOR;
+    return WGPUBlendFactor_DstColor;
   }
   if (webgpu_enum == "one-minus-dst-color") {
-    return DAWN_BLEND_FACTOR_ONE_MINUS_DST_COLOR;
+    return WGPUBlendFactor_OneMinusDstColor;
   }
   if (webgpu_enum == "dst-alpha") {
-    return DAWN_BLEND_FACTOR_DST_ALPHA;
+    return WGPUBlendFactor_DstAlpha;
   }
   if (webgpu_enum == "one-minus-dst-alpha") {
-    return DAWN_BLEND_FACTOR_ONE_MINUS_DST_ALPHA;
+    return WGPUBlendFactor_OneMinusDstAlpha;
   }
   if (webgpu_enum == "src-alpha-saturated") {
-    return DAWN_BLEND_FACTOR_SRC_ALPHA_SATURATED;
+    return WGPUBlendFactor_SrcAlphaSaturated;
   }
   if (webgpu_enum == "blend-color") {
-    return DAWN_BLEND_FACTOR_BLEND_COLOR;
+    return WGPUBlendFactor_BlendColor;
   }
   if (webgpu_enum == "one-minus-blend-color") {
-    return DAWN_BLEND_FACTOR_ONE_MINUS_BLEND_COLOR;
+    return WGPUBlendFactor_OneMinusBlendColor;
   }
   NOTREACHED();
-  return DAWN_BLEND_FACTOR_FORCE32;
+  return WGPUBlendFactor_Force32;
 }
 
 template <>
-DawnBlendOperation AsDawnEnum<DawnBlendOperation>(
+WGPUBlendOperation AsDawnEnum<WGPUBlendOperation>(
     const WTF::String& webgpu_enum) {
   if (webgpu_enum == "add") {
-    return DAWN_BLEND_OPERATION_ADD;
+    return WGPUBlendOperation_Add;
   }
   if (webgpu_enum == "subtract") {
-    return DAWN_BLEND_OPERATION_SUBTRACT;
+    return WGPUBlendOperation_Subtract;
   }
   if (webgpu_enum == "reverse-subtract") {
-    return DAWN_BLEND_OPERATION_REVERSE_SUBTRACT;
+    return WGPUBlendOperation_ReverseSubtract;
   }
   if (webgpu_enum == "min") {
-    return DAWN_BLEND_OPERATION_MIN;
+    return WGPUBlendOperation_Min;
   }
   if (webgpu_enum == "max") {
-    return DAWN_BLEND_OPERATION_MAX;
+    return WGPUBlendOperation_Max;
   }
   NOTREACHED();
-  return DAWN_BLEND_OPERATION_FORCE32;
+  return WGPUBlendOperation_Force32;
 }
 
 template <>
-DawnInputStepMode AsDawnEnum<DawnInputStepMode>(
+WGPUInputStepMode AsDawnEnum<WGPUInputStepMode>(
     const WTF::String& webgpu_enum) {
   if (webgpu_enum == "vertex") {
-    return DAWN_INPUT_STEP_MODE_VERTEX;
+    return WGPUInputStepMode_Vertex;
   }
   if (webgpu_enum == "instance") {
-    return DAWN_INPUT_STEP_MODE_INSTANCE;
+    return WGPUInputStepMode_Instance;
   }
   NOTREACHED();
-  return DAWN_INPUT_STEP_MODE_FORCE32;
+  return WGPUInputStepMode_Force32;
 }
 
 template <>
-DawnVertexFormat AsDawnEnum<DawnVertexFormat>(const WTF::String& webgpu_enum) {
+WGPUVertexFormat AsDawnEnum<WGPUVertexFormat>(const WTF::String& webgpu_enum) {
   if (webgpu_enum == "uchar2") {
-    return DAWN_VERTEX_FORMAT_UCHAR2;
+    return WGPUVertexFormat_UChar2;
   }
   if (webgpu_enum == "uchar4") {
-    return DAWN_VERTEX_FORMAT_UCHAR4;
+    return WGPUVertexFormat_UChar4;
   }
   if (webgpu_enum == "char2") {
-    return DAWN_VERTEX_FORMAT_CHAR2;
+    return WGPUVertexFormat_Char2;
   }
   if (webgpu_enum == "char4") {
-    return DAWN_VERTEX_FORMAT_CHAR4;
+    return WGPUVertexFormat_Char4;
   }
   if (webgpu_enum == "uchar2norm") {
-    return DAWN_VERTEX_FORMAT_UCHAR2_NORM;
+    return WGPUVertexFormat_UChar2Norm;
   }
   if (webgpu_enum == "uchar4norm") {
-    return DAWN_VERTEX_FORMAT_UCHAR4_NORM;
+    return WGPUVertexFormat_UChar4Norm;
   }
   if (webgpu_enum == "char2norm") {
-    return DAWN_VERTEX_FORMAT_CHAR2_NORM;
+    return WGPUVertexFormat_Char2Norm;
   }
   if (webgpu_enum == "char4norm") {
-    return DAWN_VERTEX_FORMAT_CHAR4_NORM;
+    return WGPUVertexFormat_Char4Norm;
   }
   if (webgpu_enum == "ushort2") {
-    return DAWN_VERTEX_FORMAT_USHORT2;
+    return WGPUVertexFormat_UShort2;
   }
   if (webgpu_enum == "ushort4") {
-    return DAWN_VERTEX_FORMAT_USHORT4;
+    return WGPUVertexFormat_UShort4;
   }
   if (webgpu_enum == "short2") {
-    return DAWN_VERTEX_FORMAT_SHORT2;
+    return WGPUVertexFormat_Short2;
   }
   if (webgpu_enum == "short4") {
-    return DAWN_VERTEX_FORMAT_SHORT4;
+    return WGPUVertexFormat_Short4;
   }
   if (webgpu_enum == "ushort2norm") {
-    return DAWN_VERTEX_FORMAT_USHORT2_NORM;
+    return WGPUVertexFormat_UShort2Norm;
   }
   if (webgpu_enum == "ushort4norm") {
-    return DAWN_VERTEX_FORMAT_USHORT4_NORM;
+    return WGPUVertexFormat_UShort4Norm;
   }
   if (webgpu_enum == "short2norm") {
-    return DAWN_VERTEX_FORMAT_SHORT2_NORM;
+    return WGPUVertexFormat_Short2Norm;
   }
   if (webgpu_enum == "short4norm") {
-    return DAWN_VERTEX_FORMAT_SHORT4_NORM;
+    return WGPUVertexFormat_Short4Norm;
   }
   if (webgpu_enum == "half2") {
-    return DAWN_VERTEX_FORMAT_HALF2;
+    return WGPUVertexFormat_Half2;
   }
   if (webgpu_enum == "half4") {
-    return DAWN_VERTEX_FORMAT_HALF4;
+    return WGPUVertexFormat_Half4;
   }
   if (webgpu_enum == "float") {
-    return DAWN_VERTEX_FORMAT_FLOAT;
+    return WGPUVertexFormat_Float;
   }
   if (webgpu_enum == "float2") {
-    return DAWN_VERTEX_FORMAT_FLOAT2;
+    return WGPUVertexFormat_Float2;
   }
   if (webgpu_enum == "float3") {
-    return DAWN_VERTEX_FORMAT_FLOAT3;
+    return WGPUVertexFormat_Float3;
   }
   if (webgpu_enum == "float4") {
-    return DAWN_VERTEX_FORMAT_FLOAT4;
+    return WGPUVertexFormat_Float4;
   }
   if (webgpu_enum == "uint") {
-    return DAWN_VERTEX_FORMAT_UINT;
+    return WGPUVertexFormat_UInt;
   }
   if (webgpu_enum == "uint2") {
-    return DAWN_VERTEX_FORMAT_UINT2;
+    return WGPUVertexFormat_UInt2;
   }
   if (webgpu_enum == "uint3") {
-    return DAWN_VERTEX_FORMAT_UINT3;
+    return WGPUVertexFormat_UInt3;
   }
   if (webgpu_enum == "uint4") {
-    return DAWN_VERTEX_FORMAT_UINT4;
+    return WGPUVertexFormat_UInt4;
   }
   if (webgpu_enum == "int") {
-    return DAWN_VERTEX_FORMAT_INT;
+    return WGPUVertexFormat_Int;
   }
   if (webgpu_enum == "int2") {
-    return DAWN_VERTEX_FORMAT_INT2;
+    return WGPUVertexFormat_Int2;
   }
   if (webgpu_enum == "int3") {
-    return DAWN_VERTEX_FORMAT_INT3;
+    return WGPUVertexFormat_Int3;
   }
   if (webgpu_enum == "int4") {
-    return DAWN_VERTEX_FORMAT_INT4;
+    return WGPUVertexFormat_Int4;
   }
   NOTREACHED();
-  return DAWN_VERTEX_FORMAT_FORCE32;
+  return WGPUVertexFormat_Force32;
 }
 
 template <>
-DawnAddressMode AsDawnEnum<DawnAddressMode>(const WTF::String& webgpu_enum) {
+WGPUAddressMode AsDawnEnum<WGPUAddressMode>(const WTF::String& webgpu_enum) {
   if (webgpu_enum == "clamp-to-edge") {
-    return DAWN_ADDRESS_MODE_CLAMP_TO_EDGE;
+    return WGPUAddressMode_ClampToEdge;
   }
   if (webgpu_enum == "repeat") {
-    return DAWN_ADDRESS_MODE_REPEAT;
+    return WGPUAddressMode_Repeat;
   }
   if (webgpu_enum == "mirror-repeat") {
-    return DAWN_ADDRESS_MODE_MIRROR_REPEAT;
+    return WGPUAddressMode_MirrorRepeat;
   }
   NOTREACHED();
-  return DAWN_ADDRESS_MODE_FORCE32;
+  return WGPUAddressMode_Force32;
 }
 
 template <>
-DawnFilterMode AsDawnEnum<DawnFilterMode>(const WTF::String& webgpu_enum) {
+WGPUFilterMode AsDawnEnum<WGPUFilterMode>(const WTF::String& webgpu_enum) {
   if (webgpu_enum == "nearest") {
-    return DAWN_FILTER_MODE_NEAREST;
+    return WGPUFilterMode_Nearest;
   }
   if (webgpu_enum == "linear") {
-    return DAWN_FILTER_MODE_LINEAR;
+    return WGPUFilterMode_Linear;
   }
   NOTREACHED();
-  return DAWN_FILTER_MODE_FORCE32;
+  return WGPUFilterMode_Force32;
 }
 
 template <>
-DawnCullMode AsDawnEnum<DawnCullMode>(const WTF::String& webgpu_enum) {
+WGPUCullMode AsDawnEnum<WGPUCullMode>(const WTF::String& webgpu_enum) {
   if (webgpu_enum == "none") {
-    return DAWN_CULL_MODE_NONE;
+    return WGPUCullMode_None;
   }
   if (webgpu_enum == "front") {
-    return DAWN_CULL_MODE_FRONT;
+    return WGPUCullMode_Front;
   }
   if (webgpu_enum == "back") {
-    return DAWN_CULL_MODE_BACK;
+    return WGPUCullMode_Back;
   }
   NOTREACHED();
-  return DAWN_CULL_MODE_FORCE32;
+  return WGPUCullMode_Force32;
 }
 
 template <>
-DawnFrontFace AsDawnEnum<DawnFrontFace>(const WTF::String& webgpu_enum) {
+WGPUFrontFace AsDawnEnum<WGPUFrontFace>(const WTF::String& webgpu_enum) {
   if (webgpu_enum == "ccw") {
-    return DAWN_FRONT_FACE_CCW;
+    return WGPUFrontFace_CCW;
   }
   if (webgpu_enum == "cw") {
-    return DAWN_FRONT_FACE_CW;
+    return WGPUFrontFace_CW;
   }
   NOTREACHED();
-  return DAWN_FRONT_FACE_FORCE32;
+  return WGPUFrontFace_Force32;
 }
 
 template <>
-DawnTextureAspect AsDawnEnum<DawnTextureAspect>(
+WGPUTextureAspect AsDawnEnum<WGPUTextureAspect>(
     const WTF::String& webgpu_enum) {
   if (webgpu_enum == "all") {
-    return DAWN_TEXTURE_ASPECT_ALL;
+    return WGPUTextureAspect_All;
   }
   if (webgpu_enum == "stencil-only") {
-    return DAWN_TEXTURE_ASPECT_STENCIL_ONLY;
+    return WGPUTextureAspect_StencilOnly;
   }
   if (webgpu_enum == "depth-only") {
-    return DAWN_TEXTURE_ASPECT_DEPTH_ONLY;
+    return WGPUTextureAspect_DepthOnly;
   }
   NOTREACHED();
-  return DAWN_TEXTURE_ASPECT_FORCE32;
+  return WGPUTextureAspect_Force32;
 }
 
 template <>
-DawnErrorFilter AsDawnEnum<DawnErrorFilter>(const WTF::String& webgpu_enum) {
+WGPUErrorFilter AsDawnEnum<WGPUErrorFilter>(const WTF::String& webgpu_enum) {
   if (webgpu_enum == "none") {
-    return DAWN_ERROR_FILTER_NONE;
+    return WGPUErrorFilter_None;
   }
   if (webgpu_enum == "out-of-memory") {
-    return DAWN_ERROR_FILTER_OUT_OF_MEMORY;
+    return WGPUErrorFilter_OutOfMemory;
   }
   if (webgpu_enum == "validation") {
-    return DAWN_ERROR_FILTER_VALIDATION;
+    return WGPUErrorFilter_Validation;
   }
   NOTREACHED();
-  return DAWN_ERROR_FILTER_FORCE32;
+  return WGPUErrorFilter_Force32;
 }
 
-DawnColor AsDawnColor(const Vector<double>& webgpu_color) {
+WGPUColor AsDawnColor(const Vector<double>& webgpu_color) {
   DCHECK_EQ(webgpu_color.size(), 4UL);
 
-  DawnColor dawn_color = {};
+  WGPUColor dawn_color = {};
   dawn_color.r = webgpu_color[0];
   dawn_color.g = webgpu_color[1];
   dawn_color.b = webgpu_color[2];
@@ -617,10 +617,10 @@
   return dawn_color;
 }
 
-DawnColor AsDawnType(const GPUColorDict* webgpu_color) {
+WGPUColor AsDawnType(const GPUColorDict* webgpu_color) {
   DCHECK(webgpu_color);
 
-  DawnColor dawn_color = {};
+  WGPUColor dawn_color = {};
   dawn_color.r = webgpu_color->r();
   dawn_color.g = webgpu_color->g();
   dawn_color.b = webgpu_color->b();
@@ -629,7 +629,7 @@
   return dawn_color;
 }
 
-DawnColor AsDawnType(const DoubleSequenceOrGPUColorDict* webgpu_color) {
+WGPUColor AsDawnType(const DoubleSequenceOrGPUColorDict* webgpu_color) {
   DCHECK(webgpu_color);
 
   if (webgpu_color->IsDoubleSequence()) {
@@ -638,15 +638,15 @@
     return AsDawnType(webgpu_color->GetAsGPUColorDict());
   }
   NOTREACHED();
-  DawnColor dawn_color = {};
+  WGPUColor dawn_color = {};
   return dawn_color;
 }
 
-DawnExtent3D AsDawnType(
+WGPUExtent3D AsDawnType(
     const UnsignedLongSequenceOrGPUExtent3DDict* webgpu_extent) {
   DCHECK(webgpu_extent);
 
-  DawnExtent3D dawn_extent = {};
+  WGPUExtent3D dawn_extent = {};
 
   if (webgpu_extent->IsUnsignedLongSequence()) {
     const Vector<uint32_t>& webgpu_extent_sequence =
@@ -670,11 +670,11 @@
   return dawn_extent;
 }
 
-DawnOrigin3D AsDawnType(
+WGPUOrigin3D AsDawnType(
     const UnsignedLongSequenceOrGPUOrigin3DDict* webgpu_origin) {
   DCHECK(webgpu_origin);
 
-  DawnOrigin3D dawn_origin = {};
+  WGPUOrigin3D dawn_origin = {};
 
   if (webgpu_origin->IsUnsignedLongSequence()) {
     const Vector<uint32_t>& webgpu_origin_sequence =
@@ -711,7 +711,7 @@
   char* entry_point_ptr = entry_point_keepalive.get();
   memcpy(entry_point_ptr, entry_point.c_str(), byte_size);
 
-  DawnProgrammableStageDescriptor dawn_stage = {};
+  WGPUProgrammableStageDescriptor dawn_stage = {};
   dawn_stage.module = webgpu_stage->module()->GetHandle();
   dawn_stage.entryPoint = entry_point_ptr;
 
diff --git a/third_party/blink/renderer/modules/webgpu/dawn_conversions.h b/third_party/blink/renderer/modules/webgpu/dawn_conversions.h
index 7411163..6fc8546 100644
--- a/third_party/blink/renderer/modules/webgpu/dawn_conversions.h
+++ b/third_party/blink/renderer/modules/webgpu/dawn_conversions.h
@@ -5,7 +5,7 @@
 #ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_WEBGPU_DAWN_CONVERSIONS_H_
 #define THIRD_PARTY_BLINK_RENDERER_MODULES_WEBGPU_DAWN_CONVERSIONS_H_
 
-#include <dawn/dawn.h>
+#include <dawn/webgpu.h>
 
 #include <memory>
 
@@ -38,14 +38,14 @@
 // These conversions are used multiple times and are declared here. Conversions
 // used only once, for example for object construction, are defined
 // individually.
-DawnColor AsDawnColor(const Vector<double>&);
-DawnColor AsDawnType(const GPUColorDict*);
-DawnColor AsDawnType(const DoubleSequenceOrGPUColorDict*);
-DawnExtent3D AsDawnType(const UnsignedLongSequenceOrGPUExtent3DDict*);
-DawnOrigin3D AsDawnType(const UnsignedLongSequenceOrGPUOrigin3DDict*);
+WGPUColor AsDawnColor(const Vector<double>&);
+WGPUColor AsDawnType(const GPUColorDict*);
+WGPUColor AsDawnType(const DoubleSequenceOrGPUColorDict*);
+WGPUExtent3D AsDawnType(const UnsignedLongSequenceOrGPUExtent3DDict*);
+WGPUOrigin3D AsDawnType(const UnsignedLongSequenceOrGPUOrigin3DDict*);
 
 using OwnedProgrammableStageDescriptor =
-    std::tuple<DawnProgrammableStageDescriptor, std::unique_ptr<char[]>>;
+    std::tuple<WGPUProgrammableStageDescriptor, std::unique_ptr<char[]>>;
 OwnedProgrammableStageDescriptor AsDawnType(
     const GPUProgrammableStageDescriptor*);
 
diff --git a/third_party/blink/renderer/modules/webgpu/dawn_object.h b/third_party/blink/renderer/modules/webgpu/dawn_object.h
index 7b47862..31fb27a 100644
--- a/third_party/blink/renderer/modules/webgpu/dawn_object.h
+++ b/third_party/blink/renderer/modules/webgpu/dawn_object.h
@@ -5,8 +5,8 @@
 #ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_WEBGPU_DAWN_OBJECT_H_
 #define THIRD_PARTY_BLINK_RENDERER_MODULES_WEBGPU_DAWN_OBJECT_H_
 
-#include <dawn/dawn.h>
 #include <dawn/dawn_proc_table.h>
+#include <dawn/webgpu.h>
 
 #include "base/memory/scoped_refptr.h"
 #include "third_party/blink/renderer/platform/bindings/script_wrappable.h"
@@ -67,16 +67,16 @@
 };
 
 template <>
-class DawnObject<DawnDevice> : public DawnObjectBase {
+class DawnObject<WGPUDevice> : public DawnObjectBase {
  public:
   DawnObject(scoped_refptr<DawnControlClientHolder> dawn_control_client,
-             DawnDevice handle)
+             WGPUDevice handle)
       : DawnObjectBase(std::move(dawn_control_client)), handle_(handle) {}
 
-  DawnDevice GetHandle() const { return handle_; }
+  WGPUDevice GetHandle() const { return handle_; }
 
  private:
-  DawnDevice const handle_;
+  WGPUDevice const handle_;
 };
 
 }  // namespace blink
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_bind_group.cc b/third_party/blink/renderer/modules/webgpu/gpu_bind_group.cc
index 0aee4c2b..d156a527 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_bind_group.cc
+++ b/third_party/blink/renderer/modules/webgpu/gpu_bind_group.cc
@@ -14,8 +14,8 @@
 
 namespace blink {
 
-DawnBindGroupBinding AsDawnType(const GPUBindGroupBinding* webgpu_binding) {
-  DawnBindGroupBinding dawn_binding = {};
+WGPUBindGroupBinding AsDawnType(const GPUBindGroupBinding* webgpu_binding) {
+  WGPUBindGroupBinding dawn_binding = {};
 
   dawn_binding.binding = webgpu_binding->binding();
 
@@ -23,7 +23,7 @@
     GPUBufferBinding* buffer =
         webgpu_binding->resource().GetAsGPUBufferBinding();
     dawn_binding.offset = buffer->offset();
-    dawn_binding.size = buffer->hasSize() ? buffer->size() : DAWN_WHOLE_SIZE;
+    dawn_binding.size = buffer->hasSize() ? buffer->size() : WGPU_WHOLE_SIZE;
     dawn_binding.buffer = AsDawnType(buffer->buffer());
 
   } else if (webgpu_binding->resource().IsGPUSampler()) {
@@ -51,10 +51,10 @@
   uint32_t binding_count =
       static_cast<uint32_t>(webgpu_desc->bindings().size());
 
-  std::unique_ptr<DawnBindGroupBinding[]> bindings =
+  std::unique_ptr<WGPUBindGroupBinding[]> bindings =
       binding_count != 0 ? AsDawnType(webgpu_desc->bindings()) : nullptr;
 
-  DawnBindGroupDescriptor dawn_desc = {};
+  WGPUBindGroupDescriptor dawn_desc = {};
   dawn_desc.nextInChain = nullptr;
   dawn_desc.layout = AsDawnType(webgpu_desc->layout());
   dawn_desc.bindingCount = binding_count;
@@ -68,8 +68,8 @@
                                                        &dawn_desc));
 }
 
-GPUBindGroup::GPUBindGroup(GPUDevice* device, DawnBindGroup bind_group)
-    : DawnObject<DawnBindGroup>(device, bind_group) {}
+GPUBindGroup::GPUBindGroup(GPUDevice* device, WGPUBindGroup bind_group)
+    : DawnObject<WGPUBindGroup>(device, bind_group) {}
 
 GPUBindGroup::~GPUBindGroup() {
   if (IsDawnControlClientDestroyed()) {
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_bind_group.h b/third_party/blink/renderer/modules/webgpu/gpu_bind_group.h
index 2f06669..2ae7722 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_bind_group.h
+++ b/third_party/blink/renderer/modules/webgpu/gpu_bind_group.h
@@ -11,13 +11,13 @@
 
 class GPUBindGroupDescriptor;
 
-class GPUBindGroup : public DawnObject<DawnBindGroup> {
+class GPUBindGroup : public DawnObject<WGPUBindGroup> {
   DEFINE_WRAPPERTYPEINFO();
 
  public:
   static GPUBindGroup* Create(GPUDevice* device,
                               const GPUBindGroupDescriptor* webgpu_desc);
-  explicit GPUBindGroup(GPUDevice* device, DawnBindGroup bind_group);
+  explicit GPUBindGroup(GPUDevice* device, WGPUBindGroup bind_group);
   ~GPUBindGroup() override;
 
  private:
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_bind_group_layout.cc b/third_party/blink/renderer/modules/webgpu/gpu_bind_group_layout.cc
index 3bc7266..49489891 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_bind_group_layout.cc
+++ b/third_party/blink/renderer/modules/webgpu/gpu_bind_group_layout.cc
@@ -10,17 +10,17 @@
 
 namespace blink {
 
-DawnBindGroupLayoutBinding AsDawnType(
+WGPUBindGroupLayoutBinding AsDawnType(
     const GPUBindGroupLayoutBinding* webgpu_binding) {
-  DawnBindGroupLayoutBinding dawn_binding = {};
+  WGPUBindGroupLayoutBinding dawn_binding = {};
 
   dawn_binding.binding = webgpu_binding->binding();
-  dawn_binding.type = AsDawnEnum<DawnBindingType>(webgpu_binding->type());
+  dawn_binding.type = AsDawnEnum<WGPUBindingType>(webgpu_binding->type());
   dawn_binding.visibility =
-      AsDawnEnum<DawnShaderStage>(webgpu_binding->visibility());
+      AsDawnEnum<WGPUShaderStage>(webgpu_binding->visibility());
   dawn_binding.textureDimension =
-      AsDawnEnum<DawnTextureViewDimension>(webgpu_binding->textureDimension());
-  dawn_binding.textureComponentType = AsDawnEnum<DawnTextureComponentType>(
+      AsDawnEnum<WGPUTextureViewDimension>(webgpu_binding->textureDimension());
+  dawn_binding.textureComponentType = AsDawnEnum<WGPUTextureComponentType>(
       webgpu_binding->textureComponentType());
   dawn_binding.multisampled = webgpu_binding->multisampled();
   dawn_binding.hasDynamicOffset = webgpu_binding->hasDynamicOffset();
@@ -38,10 +38,10 @@
   uint32_t binding_count =
       static_cast<uint32_t>(webgpu_desc->bindings().size());
 
-  std::unique_ptr<DawnBindGroupLayoutBinding[]> bindings =
+  std::unique_ptr<WGPUBindGroupLayoutBinding[]> bindings =
       binding_count != 0 ? AsDawnType(webgpu_desc->bindings()) : nullptr;
 
-  DawnBindGroupLayoutDescriptor dawn_desc = {};
+  WGPUBindGroupLayoutDescriptor dawn_desc = {};
   dawn_desc.nextInChain = nullptr;
   dawn_desc.bindingCount = binding_count;
   dawn_desc.bindings = bindings.get();
@@ -55,8 +55,8 @@
 }
 
 GPUBindGroupLayout::GPUBindGroupLayout(GPUDevice* device,
-                                       DawnBindGroupLayout bind_group_layout)
-    : DawnObject<DawnBindGroupLayout>(device, bind_group_layout) {}
+                                       WGPUBindGroupLayout bind_group_layout)
+    : DawnObject<WGPUBindGroupLayout>(device, bind_group_layout) {}
 
 GPUBindGroupLayout::~GPUBindGroupLayout() {
   if (IsDawnControlClientDestroyed()) {
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_bind_group_layout.h b/third_party/blink/renderer/modules/webgpu/gpu_bind_group_layout.h
index 553e50d..61d4c03 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_bind_group_layout.h
+++ b/third_party/blink/renderer/modules/webgpu/gpu_bind_group_layout.h
@@ -11,7 +11,7 @@
 
 class GPUBindGroupLayoutDescriptor;
 
-class GPUBindGroupLayout : public DawnObject<DawnBindGroupLayout> {
+class GPUBindGroupLayout : public DawnObject<WGPUBindGroupLayout> {
   DEFINE_WRAPPERTYPEINFO();
 
  public:
@@ -19,7 +19,7 @@
       GPUDevice* device,
       const GPUBindGroupLayoutDescriptor* webgpu_desc);
   explicit GPUBindGroupLayout(GPUDevice* device,
-                              DawnBindGroupLayout bind_group_layout);
+                              WGPUBindGroupLayout bind_group_layout);
   ~GPUBindGroupLayout() override;
 
  private:
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_buffer.cc b/third_party/blink/renderer/modules/webgpu/gpu_buffer.cc
index bf8e359..c93014f5 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_buffer.cc
+++ b/third_party/blink/renderer/modules/webgpu/gpu_buffer.cc
@@ -44,12 +44,12 @@
   return true;
 }
 
-DawnBufferDescriptor AsDawnType(const GPUBufferDescriptor* webgpu_desc) {
+WGPUBufferDescriptor AsDawnType(const GPUBufferDescriptor* webgpu_desc) {
   DCHECK(webgpu_desc);
 
-  DawnBufferDescriptor dawn_desc = {};
+  WGPUBufferDescriptor dawn_desc = {};
   dawn_desc.nextInChain = nullptr;
-  dawn_desc.usage = AsDawnEnum<DawnBufferUsage>(webgpu_desc->usage());
+  dawn_desc.usage = AsDawnEnum<WGPUBufferUsage>(webgpu_desc->usage());
   dawn_desc.size = webgpu_desc->size();
   if (webgpu_desc->hasLabel()) {
     dawn_desc.label = webgpu_desc->label().Utf8().data();
@@ -78,7 +78,7 @@
                              const GPUBufferDescriptor* webgpu_desc) {
   DCHECK(device);
 
-  DawnBufferDescriptor dawn_desc = AsDawnType(webgpu_desc);
+  WGPUBufferDescriptor dawn_desc = AsDawnType(webgpu_desc);
   return MakeGarbageCollected<GPUBuffer>(
       device, dawn_desc.size,
       device->GetProcs().deviceCreateBuffer(device->GetHandle(), &dawn_desc));
@@ -91,13 +91,13 @@
     ExceptionState& exception_state) {
   DCHECK(device);
 
-  DawnBufferDescriptor dawn_desc = AsDawnType(webgpu_desc);
+  WGPUBufferDescriptor dawn_desc = AsDawnType(webgpu_desc);
 
   if (!ValidateMapSize(dawn_desc.size, exception_state)) {
     return std::make_pair(nullptr, nullptr);
   }
 
-  DawnCreateBufferMappedResult result =
+  WGPUCreateBufferMappedResult result =
       device->GetProcs().deviceCreateBufferMapped(device->GetHandle(),
                                                   &dawn_desc);
 
@@ -112,8 +112,8 @@
   return std::make_pair(gpu_buffer, gpu_buffer->mapped_buffer_);
 }
 
-GPUBuffer::GPUBuffer(GPUDevice* device, uint64_t size, DawnBuffer buffer)
-    : DawnObject<DawnBuffer>(device, buffer), size_(size) {}
+GPUBuffer::GPUBuffer(GPUDevice* device, uint64_t size, WGPUBuffer buffer)
+    : DawnObject<WGPUBuffer>(device, buffer), size_(size) {}
 
 GPUBuffer::~GPUBuffer() {
   if (IsDawnControlClientDestroyed()) {
@@ -124,7 +124,7 @@
 
 void GPUBuffer::Trace(blink::Visitor* visitor) {
   visitor->Trace(mapped_buffer_);
-  DawnObject<DawnBuffer>::Trace(visitor);
+  DawnObject<WGPUBuffer>::Trace(visitor);
 }
 
 void GPUBuffer::setSubData(uint64_t dst_byte_offset,
@@ -153,23 +153,23 @@
 }
 
 void GPUBuffer::OnMapAsyncCallback(ScriptPromiseResolver* resolver,
-                                   DawnBufferMapAsyncStatus status,
+                                   WGPUBufferMapAsyncStatus status,
                                    void* data,
                                    uint64_t data_length) {
   switch (status) {
-    case DAWN_BUFFER_MAP_ASYNC_STATUS_SUCCESS:
+    case WGPUBufferMapAsyncStatus_Success:
       DCHECK(data);
       DCHECK_LE(data_length, kLargestMappableSize);
       mapped_buffer_ = CreateArrayBufferForMappedData(
           data, static_cast<size_t>(data_length));
       resolver->Resolve(mapped_buffer_);
       break;
-    case DAWN_BUFFER_MAP_ASYNC_STATUS_ERROR:
+    case WGPUBufferMapAsyncStatus_Error:
       resolver->Reject(MakeGarbageCollected<DOMException>(
           DOMExceptionCode::kOperationError));
       break;
-    case DAWN_BUFFER_MAP_ASYNC_STATUS_UNKNOWN:
-    case DAWN_BUFFER_MAP_ASYNC_STATUS_DEVICE_LOST:
+    case WGPUBufferMapAsyncStatus_Unknown:
+    case WGPUBufferMapAsyncStatus_DeviceLost:
       resolver->Reject(
           MakeGarbageCollected<DOMException>(DOMExceptionCode::kAbortError));
       break;
@@ -200,7 +200,7 @@
 
   GetProcs().bufferMapReadAsync(
       GetHandle(),
-      [](DawnBufferMapAsyncStatus status, const void* data,
+      [](WGPUBufferMapAsyncStatus status, const void* data,
          uint64_t data_length, void* userdata) {
         // It is safe to const_cast the |data| pointer because it is a shadow
         // copy that Dawn wire makes and does not point to the mapped GPU data.
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_buffer.h b/third_party/blink/renderer/modules/webgpu/gpu_buffer.h
index c81f857..4554f938 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_buffer.h
+++ b/third_party/blink/renderer/modules/webgpu/gpu_buffer.h
@@ -16,7 +16,7 @@
 class GPUBufferDescriptor;
 class ScriptPromiseResolver;
 
-class GPUBuffer : public DawnObject<DawnBuffer> {
+class GPUBuffer : public DawnObject<WGPUBuffer> {
   DEFINE_WRAPPERTYPEINFO();
 
  public:
@@ -26,7 +26,7 @@
       GPUDevice* device,
       const GPUBufferDescriptor* webgpu_desc,
       ExceptionState& exception_state);
-  explicit GPUBuffer(GPUDevice* device, uint64_t size, DawnBuffer buffer);
+  explicit GPUBuffer(GPUDevice* device, uint64_t size, WGPUBuffer buffer);
   ~GPUBuffer() override;
 
   void Trace(blink::Visitor* visitor) override;
@@ -47,7 +47,7 @@
 
  private:
   void OnMapAsyncCallback(ScriptPromiseResolver* resolver,
-                          DawnBufferMapAsyncStatus status,
+                          WGPUBufferMapAsyncStatus status,
                           void* data,
                           uint64_t data_length);
   void DetachArrayBufferForCurrentMapping(ScriptState* script_state);
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_command_buffer.cc b/third_party/blink/renderer/modules/webgpu/gpu_command_buffer.cc
index 52540fc8..d2057ad 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_command_buffer.cc
+++ b/third_party/blink/renderer/modules/webgpu/gpu_command_buffer.cc
@@ -10,13 +10,13 @@
 
 // static
 GPUCommandBuffer* GPUCommandBuffer::Create(GPUDevice* device,
-                                           DawnCommandBuffer command_buffer) {
+                                           WGPUCommandBuffer command_buffer) {
   return MakeGarbageCollected<GPUCommandBuffer>(device, command_buffer);
 }
 
 GPUCommandBuffer::GPUCommandBuffer(GPUDevice* device,
-                                   DawnCommandBuffer command_buffer)
-    : DawnObject<DawnCommandBuffer>(device, command_buffer) {}
+                                   WGPUCommandBuffer command_buffer)
+    : DawnObject<WGPUCommandBuffer>(device, command_buffer) {}
 
 GPUCommandBuffer::~GPUCommandBuffer() {
   if (IsDawnControlClientDestroyed()) {
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_command_buffer.h b/third_party/blink/renderer/modules/webgpu/gpu_command_buffer.h
index 5f235e3..af3523c8 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_command_buffer.h
+++ b/third_party/blink/renderer/modules/webgpu/gpu_command_buffer.h
@@ -9,14 +9,14 @@
 
 namespace blink {
 
-class GPUCommandBuffer : public DawnObject<DawnCommandBuffer> {
+class GPUCommandBuffer : public DawnObject<WGPUCommandBuffer> {
   DEFINE_WRAPPERTYPEINFO();
 
  public:
   static GPUCommandBuffer* Create(GPUDevice* device,
-                                  DawnCommandBuffer command_buffer);
+                                  WGPUCommandBuffer command_buffer);
   explicit GPUCommandBuffer(GPUDevice* device,
-                            DawnCommandBuffer command_buffer);
+                            WGPUCommandBuffer command_buffer);
   ~GPUCommandBuffer() override;
 
  private:
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_command_encoder.cc b/third_party/blink/renderer/modules/webgpu/gpu_command_encoder.cc
index 3afc410..b7fee55 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_command_encoder.cc
+++ b/third_party/blink/renderer/modules/webgpu/gpu_command_encoder.cc
@@ -51,11 +51,11 @@
   return true;
 }
 
-DawnRenderPassColorAttachmentDescriptor AsDawnType(
+WGPURenderPassColorAttachmentDescriptor AsDawnType(
     const GPURenderPassColorAttachmentDescriptor* webgpu_desc) {
   DCHECK(webgpu_desc);
 
-  DawnRenderPassColorAttachmentDescriptor dawn_desc = {};
+  WGPURenderPassColorAttachmentDescriptor dawn_desc = {};
   dawn_desc.attachment = webgpu_desc->attachment()->GetHandle();
   dawn_desc.resolveTarget = webgpu_desc->resolveTarget()
                                 ? webgpu_desc->resolveTarget()->GetHandle()
@@ -63,61 +63,61 @@
 
   if (webgpu_desc->loadValue().IsGPULoadOp()) {
     const WTF::String& gpuLoadOp = webgpu_desc->loadValue().GetAsGPULoadOp();
-    dawn_desc.loadOp = AsDawnEnum<DawnLoadOp>(gpuLoadOp);
+    dawn_desc.loadOp = AsDawnEnum<WGPULoadOp>(gpuLoadOp);
 
   } else if (webgpu_desc->loadValue().IsDoubleSequence()) {
     const Vector<double>& gpuColor =
         webgpu_desc->loadValue().GetAsDoubleSequence();
-    dawn_desc.loadOp = DAWN_LOAD_OP_CLEAR;
+    dawn_desc.loadOp = WGPULoadOp_Clear;
     dawn_desc.clearColor = AsDawnColor(gpuColor);
 
   } else if (webgpu_desc->loadValue().IsGPUColorDict()) {
     const GPUColorDict* gpuColor = webgpu_desc->loadValue().GetAsGPUColorDict();
-    dawn_desc.loadOp = DAWN_LOAD_OP_CLEAR;
+    dawn_desc.loadOp = WGPULoadOp_Clear;
     dawn_desc.clearColor = AsDawnType(gpuColor);
 
   } else {
     NOTREACHED();
   }
 
-  dawn_desc.storeOp = AsDawnEnum<DawnStoreOp>(webgpu_desc->storeOp());
+  dawn_desc.storeOp = AsDawnEnum<WGPUStoreOp>(webgpu_desc->storeOp());
 
   return dawn_desc;
 }
 
 namespace {
 
-DawnRenderPassDepthStencilAttachmentDescriptor AsDawnType(
+WGPURenderPassDepthStencilAttachmentDescriptor AsDawnType(
     const GPURenderPassDepthStencilAttachmentDescriptor* webgpu_desc) {
   DCHECK(webgpu_desc);
 
-  DawnRenderPassDepthStencilAttachmentDescriptor dawn_desc = {};
+  WGPURenderPassDepthStencilAttachmentDescriptor dawn_desc = {};
   dawn_desc.attachment = webgpu_desc->attachment()->GetHandle();
 
   if (webgpu_desc->depthLoadValue().IsGPULoadOp()) {
     const WTF::String& gpuLoadOp =
         webgpu_desc->depthLoadValue().GetAsGPULoadOp();
-    dawn_desc.depthLoadOp = AsDawnEnum<DawnLoadOp>(gpuLoadOp);
+    dawn_desc.depthLoadOp = AsDawnEnum<WGPULoadOp>(gpuLoadOp);
     dawn_desc.clearDepth = 1.0f;
 
   } else if (webgpu_desc->depthLoadValue().IsFloat()) {
-    dawn_desc.depthLoadOp = DAWN_LOAD_OP_CLEAR;
+    dawn_desc.depthLoadOp = WGPULoadOp_Clear;
     dawn_desc.clearDepth = webgpu_desc->depthLoadValue().GetAsFloat();
 
   } else {
     NOTREACHED();
   }
 
-  dawn_desc.depthStoreOp = AsDawnEnum<DawnStoreOp>(webgpu_desc->depthStoreOp());
+  dawn_desc.depthStoreOp = AsDawnEnum<WGPUStoreOp>(webgpu_desc->depthStoreOp());
 
   if (webgpu_desc->stencilLoadValue().IsGPULoadOp()) {
     const WTF::String& gpuLoadOp =
         webgpu_desc->stencilLoadValue().GetAsGPULoadOp();
-    dawn_desc.stencilLoadOp = AsDawnEnum<DawnLoadOp>(gpuLoadOp);
+    dawn_desc.stencilLoadOp = AsDawnEnum<WGPULoadOp>(gpuLoadOp);
     dawn_desc.clearStencil = 0;
 
   } else if (webgpu_desc->stencilLoadValue().IsUnsignedLong()) {
-    dawn_desc.stencilLoadOp = DAWN_LOAD_OP_CLEAR;
+    dawn_desc.stencilLoadOp = WGPULoadOp_Clear;
     dawn_desc.clearStencil =
         webgpu_desc->stencilLoadValue().GetAsUnsignedLong();
 
@@ -126,16 +126,16 @@
   }
 
   dawn_desc.stencilStoreOp =
-      AsDawnEnum<DawnStoreOp>(webgpu_desc->stencilStoreOp());
+      AsDawnEnum<WGPUStoreOp>(webgpu_desc->stencilStoreOp());
 
   return dawn_desc;
 }
 
-DawnBufferCopyView AsDawnType(const GPUBufferCopyView* webgpu_view) {
+WGPUBufferCopyView AsDawnType(const GPUBufferCopyView* webgpu_view) {
   DCHECK(webgpu_view);
   DCHECK(webgpu_view->buffer());
 
-  DawnBufferCopyView dawn_view;
+  WGPUBufferCopyView dawn_view;
   dawn_view.nextInChain = nullptr;
   dawn_view.buffer = webgpu_view->buffer()->GetHandle();
   dawn_view.offset = webgpu_view->offset();
@@ -145,11 +145,11 @@
   return dawn_view;
 }
 
-DawnTextureCopyView AsDawnType(const GPUTextureCopyView* webgpu_view) {
+WGPUTextureCopyView AsDawnType(const GPUTextureCopyView* webgpu_view) {
   DCHECK(webgpu_view);
   DCHECK(webgpu_view->texture());
 
-  DawnTextureCopyView dawn_view;
+  WGPUTextureCopyView dawn_view;
   dawn_view.nextInChain = nullptr;
   dawn_view.texture = webgpu_view->texture()->GetHandle();
   dawn_view.mipLevel = webgpu_view->mipLevel();
@@ -159,11 +159,11 @@
   return dawn_view;
 }
 
-DawnCommandEncoderDescriptor AsDawnType(
+WGPUCommandEncoderDescriptor AsDawnType(
     const GPUCommandEncoderDescriptor* webgpu_desc) {
   DCHECK(webgpu_desc);
 
-  DawnCommandEncoderDescriptor dawn_desc = {};
+  WGPUCommandEncoderDescriptor dawn_desc = {};
   dawn_desc.nextInChain = nullptr;
   if (webgpu_desc->hasLabel()) {
     dawn_desc.label = webgpu_desc->label().Utf8().data();
@@ -182,8 +182,8 @@
   DCHECK(webgpu_desc);
   ALLOW_UNUSED_LOCAL(webgpu_desc);
 
-  DawnCommandEncoderDescriptor dawn_desc = {};
-  const DawnCommandEncoderDescriptor* dawn_desc_ptr = nullptr;
+  WGPUCommandEncoderDescriptor dawn_desc = {};
+  const WGPUCommandEncoderDescriptor* dawn_desc_ptr = nullptr;
   if (webgpu_desc) {
     dawn_desc = AsDawnType(webgpu_desc);
     dawn_desc_ptr = &dawn_desc;
@@ -195,8 +195,8 @@
 }
 
 GPUCommandEncoder::GPUCommandEncoder(GPUDevice* device,
-                                     DawnCommandEncoder command_encoder)
-    : DawnObject<DawnCommandEncoder>(device, command_encoder) {}
+                                     WGPUCommandEncoder command_encoder)
+    : DawnObject<WGPUCommandEncoder>(device, command_encoder) {}
 
 GPUCommandEncoder::~GPUCommandEncoder() {
   if (IsDawnControlClientDestroyed()) {
@@ -227,21 +227,21 @@
     }
   }
 
-  DawnRenderPassDescriptor dawn_desc = {};
+  WGPURenderPassDescriptor dawn_desc = {};
   dawn_desc.colorAttachmentCount = color_attachment_count;
   dawn_desc.colorAttachments = nullptr;
   if (descriptor->hasLabel()) {
     dawn_desc.label = descriptor->label().Utf8().data();
   }
 
-  std::unique_ptr<DawnRenderPassColorAttachmentDescriptor[]> color_attachments;
+  std::unique_ptr<WGPURenderPassColorAttachmentDescriptor[]> color_attachments;
 
   if (color_attachment_count > 0) {
     color_attachments = AsDawnType(descriptor->colorAttachments());
     dawn_desc.colorAttachments = color_attachments.get();
   }
 
-  DawnRenderPassDepthStencilAttachmentDescriptor depthStencilAttachment = {};
+  WGPURenderPassDepthStencilAttachmentDescriptor depthStencilAttachment = {};
   if (descriptor->hasDepthStencilAttachment()) {
     depthStencilAttachment = AsDawnType(descriptor->depthStencilAttachment());
     dawn_desc.depthStencilAttachment = &depthStencilAttachment;
@@ -256,7 +256,7 @@
 
 GPUComputePassEncoder* GPUCommandEncoder::beginComputePass(
     const GPUComputePassDescriptor* descriptor) {
-  DawnComputePassDescriptor dawn_desc = {};
+  WGPUComputePassDescriptor dawn_desc = {};
   if (descriptor->hasLabel()) {
     dawn_desc.label = descriptor->label().Utf8().data();
   }
@@ -288,9 +288,9 @@
     return;
   }
 
-  DawnBufferCopyView dawn_source = AsDawnType(source);
-  DawnTextureCopyView dawn_destination = AsDawnType(destination);
-  DawnExtent3D dawn_copy_size = AsDawnType(&copy_size);
+  WGPUBufferCopyView dawn_source = AsDawnType(source);
+  WGPUTextureCopyView dawn_destination = AsDawnType(destination);
+  WGPUExtent3D dawn_copy_size = AsDawnType(&copy_size);
 
   GetProcs().commandEncoderCopyBufferToTexture(
       GetHandle(), &dawn_source, &dawn_destination, &dawn_copy_size);
@@ -306,9 +306,9 @@
     return;
   }
 
-  DawnTextureCopyView dawn_source = AsDawnType(source);
-  DawnBufferCopyView dawn_destination = AsDawnType(destination);
-  DawnExtent3D dawn_copy_size = AsDawnType(&copy_size);
+  WGPUTextureCopyView dawn_source = AsDawnType(source);
+  WGPUBufferCopyView dawn_destination = AsDawnType(destination);
+  WGPUExtent3D dawn_copy_size = AsDawnType(&copy_size);
 
   GetProcs().commandEncoderCopyTextureToBuffer(
       GetHandle(), &dawn_source, &dawn_destination, &dawn_copy_size);
@@ -325,9 +325,9 @@
     return;
   }
 
-  DawnTextureCopyView dawn_source = AsDawnType(source);
-  DawnTextureCopyView dawn_destination = AsDawnType(destination);
-  DawnExtent3D dawn_copy_size = AsDawnType(&copy_size);
+  WGPUTextureCopyView dawn_source = AsDawnType(source);
+  WGPUTextureCopyView dawn_destination = AsDawnType(destination);
+  WGPUExtent3D dawn_copy_size = AsDawnType(&copy_size);
 
   GetProcs().commandEncoderCopyTextureToTexture(
       GetHandle(), &dawn_source, &dawn_destination, &dawn_copy_size);
@@ -349,7 +349,7 @@
 
 GPUCommandBuffer* GPUCommandEncoder::finish(
     const GPUCommandBufferDescriptor* descriptor) {
-  DawnCommandBufferDescriptor dawn_desc = {};
+  WGPUCommandBufferDescriptor dawn_desc = {};
   if (descriptor->hasLabel()) {
     dawn_desc.label = descriptor->label().Utf8().data();
   }
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_command_encoder.h b/third_party/blink/renderer/modules/webgpu/gpu_command_encoder.h
index d00bb82..68fa195 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_command_encoder.h
+++ b/third_party/blink/renderer/modules/webgpu/gpu_command_encoder.h
@@ -23,7 +23,7 @@
 class GPUTextureCopyView;
 class UnsignedLongSequenceOrGPUExtent3DDict;
 
-class GPUCommandEncoder : public DawnObject<DawnCommandEncoder> {
+class GPUCommandEncoder : public DawnObject<WGPUCommandEncoder> {
   DEFINE_WRAPPERTYPEINFO();
 
  public:
@@ -31,7 +31,7 @@
       GPUDevice* device,
       const GPUCommandEncoderDescriptor* webgpu_desc);
   explicit GPUCommandEncoder(GPUDevice* device,
-                             DawnCommandEncoder command_encoder);
+                             WGPUCommandEncoder command_encoder);
   ~GPUCommandEncoder() override;
 
   // gpu_command_encoder.idl
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_compute_pass_encoder.cc b/third_party/blink/renderer/modules/webgpu/gpu_compute_pass_encoder.cc
index 70d2e98..20964bc 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_compute_pass_encoder.cc
+++ b/third_party/blink/renderer/modules/webgpu/gpu_compute_pass_encoder.cc
@@ -5,6 +5,7 @@
 #include "third_party/blink/renderer/modules/webgpu/gpu_compute_pass_encoder.h"
 
 #include "third_party/blink/renderer/modules/webgpu/gpu_bind_group.h"
+#include "third_party/blink/renderer/modules/webgpu/gpu_buffer.h"
 #include "third_party/blink/renderer/modules/webgpu/gpu_compute_pipeline.h"
 #include "third_party/blink/renderer/modules/webgpu/gpu_device.h"
 
@@ -13,15 +14,15 @@
 // static
 GPUComputePassEncoder* GPUComputePassEncoder::Create(
     GPUDevice* device,
-    DawnComputePassEncoder compute_pass_encoder) {
+    WGPUComputePassEncoder compute_pass_encoder) {
   return MakeGarbageCollected<GPUComputePassEncoder>(device,
                                                      compute_pass_encoder);
 }
 
 GPUComputePassEncoder::GPUComputePassEncoder(
     GPUDevice* device,
-    DawnComputePassEncoder compute_pass_encoder)
-    : DawnObject<DawnComputePassEncoder>(device, compute_pass_encoder) {}
+    WGPUComputePassEncoder compute_pass_encoder)
+    : DawnObject<WGPUComputePassEncoder>(device, compute_pass_encoder) {}
 
 GPUComputePassEncoder::~GPUComputePassEncoder() {
   if (IsDawnControlClientDestroyed()) {
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_compute_pass_encoder.h b/third_party/blink/renderer/modules/webgpu/gpu_compute_pass_encoder.h
index de3ec931..ac51fbc 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_compute_pass_encoder.h
+++ b/third_party/blink/renderer/modules/webgpu/gpu_compute_pass_encoder.h
@@ -6,22 +6,22 @@
 #define THIRD_PARTY_BLINK_RENDERER_MODULES_WEBGPU_GPU_COMPUTE_PASS_ENCODER_H_
 
 #include "third_party/blink/renderer/modules/webgpu/dawn_object.h"
-#include "third_party/blink/renderer/modules/webgpu/gpu_buffer.h"
 
 namespace blink {
 
 class GPUBindGroup;
+class GPUBuffer;
 class GPUComputePipeline;
 
-class GPUComputePassEncoder : public DawnObject<DawnComputePassEncoder> {
+class GPUComputePassEncoder : public DawnObject<WGPUComputePassEncoder> {
   DEFINE_WRAPPERTYPEINFO();
 
  public:
   static GPUComputePassEncoder* Create(
       GPUDevice* device,
-      DawnComputePassEncoder compute_pass_encoder);
+      WGPUComputePassEncoder compute_pass_encoder);
   explicit GPUComputePassEncoder(GPUDevice* device,
-                                 DawnComputePassEncoder compute_pass_encoder);
+                                 WGPUComputePassEncoder compute_pass_encoder);
   ~GPUComputePassEncoder() override;
 
   // gpu_compute_pass_encoder.idl
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_compute_pipeline.cc b/third_party/blink/renderer/modules/webgpu/gpu_compute_pipeline.cc
index 4da7c3c..0a0e7481 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_compute_pipeline.cc
+++ b/third_party/blink/renderer/modules/webgpu/gpu_compute_pipeline.cc
@@ -20,7 +20,7 @@
   DCHECK(device);
   DCHECK(webgpu_desc);
 
-  DawnComputePipelineDescriptor dawn_desc = {};
+  WGPUComputePipelineDescriptor dawn_desc = {};
   dawn_desc.nextInChain = nullptr;
   dawn_desc.layout = AsDawnType(webgpu_desc->layout());
   if (webgpu_desc->hasLabel()) {
@@ -36,8 +36,8 @@
 }
 
 GPUComputePipeline::GPUComputePipeline(GPUDevice* device,
-                                       DawnComputePipeline compute_pipeline)
-    : DawnObject<DawnComputePipeline>(device, compute_pipeline) {}
+                                       WGPUComputePipeline compute_pipeline)
+    : DawnObject<WGPUComputePipeline>(device, compute_pipeline) {}
 
 GPUComputePipeline::~GPUComputePipeline() {
   if (IsDawnControlClientDestroyed()) {
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_compute_pipeline.h b/third_party/blink/renderer/modules/webgpu/gpu_compute_pipeline.h
index 14250419..22bef0eb 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_compute_pipeline.h
+++ b/third_party/blink/renderer/modules/webgpu/gpu_compute_pipeline.h
@@ -11,7 +11,7 @@
 
 class GPUComputePipelineDescriptor;
 
-class GPUComputePipeline : public DawnObject<DawnComputePipeline> {
+class GPUComputePipeline : public DawnObject<WGPUComputePipeline> {
   DEFINE_WRAPPERTYPEINFO();
 
  public:
@@ -19,7 +19,7 @@
       GPUDevice* device,
       const GPUComputePipelineDescriptor* webgpu_desc);
   explicit GPUComputePipeline(GPUDevice* device,
-                              DawnComputePipeline compute_pipeline);
+                              WGPUComputePipeline compute_pipeline);
   ~GPUComputePipeline() override;
 
  private:
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_device.cc b/third_party/blink/renderer/modules/webgpu/gpu_device.cc
index 1604383f..c1d13fc 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_device.cc
+++ b/third_party/blink/renderer/modules/webgpu/gpu_device.cc
@@ -71,10 +71,10 @@
 }
 
 void GPUDevice::OnUncapturedError(ExecutionContext* execution_context,
-                                  DawnErrorType errorType,
+                                  WGPUErrorType errorType,
                                   const char* message) {
   if (execution_context) {
-    DCHECK_NE(errorType, DAWN_ERROR_TYPE_NO_ERROR);
+    DCHECK_NE(errorType, WGPUErrorType_NoError);
     LOG(ERROR) << "GPUDevice: " << message;
     ConsoleMessage* console_message =
         ConsoleMessage::Create(mojom::ConsoleMessageSource::kRendering,
@@ -83,18 +83,18 @@
   }
 
   // TODO: Use device lost callback instead of uncaptured error callback.
-  if (errorType == DAWN_ERROR_TYPE_DEVICE_LOST &&
+  if (errorType == WGPUErrorType_DeviceLost &&
       lost_property_->GetState() == ScriptPromisePropertyBase::kPending) {
     GPUDeviceLostInfo* device_lost_info = GPUDeviceLostInfo::Create(message);
     lost_property_->Resolve(device_lost_info);
   }
 
   GPUUncapturedErrorEventInit* init = GPUUncapturedErrorEventInit::Create();
-  if (errorType == DAWN_ERROR_TYPE_VALIDATION) {
+  if (errorType == WGPUErrorType_Validation) {
     GPUValidationError* error = GPUValidationError::Create(message);
     init->setError(
         GPUOutOfMemoryErrorOrGPUValidationError::FromGPUValidationError(error));
-  } else if (errorType == DAWN_ERROR_TYPE_OUT_OF_MEMORY) {
+  } else if (errorType == WGPUErrorType_OutOfMemory) {
     GPUOutOfMemoryError* error = GPUOutOfMemoryError::Create();
     init->setError(
         GPUOutOfMemoryErrorOrGPUValidationError::FromGPUOutOfMemoryError(
@@ -229,7 +229,7 @@
 
 void GPUDevice::pushErrorScope(const WTF::String& filter) {
   GetProcs().devicePushErrorScope(GetHandle(),
-                                  AsDawnEnum<DawnErrorFilter>(filter));
+                                  AsDawnEnum<WGPUErrorFilter>(filter));
 }
 
 ScriptPromise GPUDevice::popErrorScope(ScriptState* script_state) {
@@ -258,21 +258,21 @@
 }
 
 void GPUDevice::OnPopErrorScopeCallback(ScriptPromiseResolver* resolver,
-                                        DawnErrorType type,
+                                        WGPUErrorType type,
                                         const char* message) {
   v8::Isolate* isolate = resolver->GetScriptState()->GetIsolate();
   switch (type) {
-    case DAWN_ERROR_TYPE_NO_ERROR:
+    case WGPUErrorType_NoError:
       resolver->Resolve(v8::Null(isolate));
       break;
-    case DAWN_ERROR_TYPE_OUT_OF_MEMORY:
+    case WGPUErrorType_OutOfMemory:
       resolver->Resolve(GPUOutOfMemoryError::Create());
       break;
-    case DAWN_ERROR_TYPE_VALIDATION:
+    case WGPUErrorType_Validation:
       resolver->Resolve(GPUValidationError::Create(message));
       break;
-    case DAWN_ERROR_TYPE_UNKNOWN:
-    case DAWN_ERROR_TYPE_DEVICE_LOST:
+    case WGPUErrorType_Unknown:
+    case WGPUErrorType_DeviceLost:
       resolver->Reject(
           MakeGarbageCollected<DOMException>(DOMExceptionCode::kAbortError));
       break;
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_device.h b/third_party/blink/renderer/modules/webgpu/gpu_device.h
index 1f17269..0b2e5a3 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_device.h
+++ b/third_party/blink/renderer/modules/webgpu/gpu_device.h
@@ -48,7 +48,7 @@
 
 class GPUDevice final : public EventTargetWithInlineData,
                         public ContextClient,
-                        public DawnObject<DawnDevice> {
+                        public DawnObject<WGPUDevice> {
   USING_GARBAGE_COLLECTED_MIXIN(GPUDevice);
   DEFINE_WRAPPERTYPEINFO();
 
@@ -118,18 +118,18 @@
                                              ToV8UndefinedGenerator>;
 
   void OnUncapturedError(ExecutionContext* execution_context,
-                         DawnErrorType errorType,
+                         WGPUErrorType errorType,
                          const char* message);
 
   void OnPopErrorScopeCallback(ScriptPromiseResolver* resolver,
-                               DawnErrorType type,
+                               WGPUErrorType type,
                                const char* message);
 
   Member<GPUAdapter> adapter_;
   Member<GPUQueue> queue_;
   Member<LostProperty> lost_property_;
   std::unique_ptr<
-      DawnCallback<base::RepeatingCallback<void(DawnErrorType, const char*)>>>
+      DawnCallback<base::RepeatingCallback<void(WGPUErrorType, const char*)>>>
       error_callback_;
 
   DISALLOW_COPY_AND_ASSIGN(GPUDevice);
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_fence.cc b/third_party/blink/renderer/modules/webgpu/gpu_fence.cc
index 06f4f0a..15eacf0a 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_fence.cc
+++ b/third_party/blink/renderer/modules/webgpu/gpu_fence.cc
@@ -14,12 +14,12 @@
 namespace blink {
 
 // static
-GPUFence* GPUFence::Create(GPUDevice* device, DawnFence fence) {
+GPUFence* GPUFence::Create(GPUDevice* device, WGPUFence fence) {
   return MakeGarbageCollected<GPUFence>(device, fence);
 }
 
-GPUFence::GPUFence(GPUDevice* device, DawnFence fence)
-    : DawnObject<DawnFence>(device, fence) {}
+GPUFence::GPUFence(GPUDevice* device, WGPUFence fence)
+    : DawnObject<WGPUFence>(device, fence) {}
 
 GPUFence::~GPUFence() {
   if (IsDawnControlClientDestroyed()) {
@@ -33,17 +33,17 @@
 }
 
 void GPUFence::OnCompletionCallback(ScriptPromiseResolver* resolver,
-                                    DawnFenceCompletionStatus status) {
+                                    WGPUFenceCompletionStatus status) {
   switch (status) {
-    case DAWN_FENCE_COMPLETION_STATUS_SUCCESS:
+    case WGPUFenceCompletionStatus_Success:
       resolver->Resolve();
       break;
-    case DAWN_FENCE_COMPLETION_STATUS_ERROR:
+    case WGPUFenceCompletionStatus_Error:
       resolver->Reject(MakeGarbageCollected<DOMException>(
           DOMExceptionCode::kOperationError));
       break;
-    case DAWN_FENCE_COMPLETION_STATUS_UNKNOWN:
-    case DAWN_FENCE_COMPLETION_STATUS_DEVICE_LOST:
+    case WGPUFenceCompletionStatus_Unknown:
+    case WGPUFenceCompletionStatus_DeviceLost:
       resolver->Reject(
           MakeGarbageCollected<DOMException>(DOMExceptionCode::kAbortError));
       break;
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_fence.h b/third_party/blink/renderer/modules/webgpu/gpu_fence.h
index b8e204c8..27dbcac 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_fence.h
+++ b/third_party/blink/renderer/modules/webgpu/gpu_fence.h
@@ -13,12 +13,12 @@
 class ScriptPromiseResolver;
 class ScriptState;
 
-class GPUFence : public DawnObject<DawnFence> {
+class GPUFence : public DawnObject<WGPUFence> {
   DEFINE_WRAPPERTYPEINFO();
 
  public:
-  static GPUFence* Create(GPUDevice* device, DawnFence fence);
-  explicit GPUFence(GPUDevice* device, DawnFence fence);
+  static GPUFence* Create(GPUDevice* device, WGPUFence fence);
+  explicit GPUFence(GPUDevice* device, WGPUFence fence);
   ~GPUFence() override;
 
   // gpu_fence.idl
@@ -27,7 +27,7 @@
 
  private:
   void OnCompletionCallback(ScriptPromiseResolver* resolver,
-                            DawnFenceCompletionStatus status);
+                            WGPUFenceCompletionStatus status);
 
   DISALLOW_COPY_AND_ASSIGN(GPUFence);
 };
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_pipeline_layout.cc b/third_party/blink/renderer/modules/webgpu/gpu_pipeline_layout.cc
index 97a61728..490d05b 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_pipeline_layout.cc
+++ b/third_party/blink/renderer/modules/webgpu/gpu_pipeline_layout.cc
@@ -21,11 +21,11 @@
   uint32_t bind_group_layout_count =
       static_cast<uint32_t>(webgpu_desc->bindGroupLayouts().size());
 
-  std::unique_ptr<DawnBindGroupLayout[]> bind_group_layouts =
+  std::unique_ptr<WGPUBindGroupLayout[]> bind_group_layouts =
       bind_group_layout_count != 0 ? AsDawnType(webgpu_desc->bindGroupLayouts())
                                    : nullptr;
 
-  DawnPipelineLayoutDescriptor dawn_desc = {};
+  WGPUPipelineLayoutDescriptor dawn_desc = {};
   dawn_desc.nextInChain = nullptr;
   dawn_desc.bindGroupLayoutCount = bind_group_layout_count;
   dawn_desc.bindGroupLayouts = bind_group_layouts.get();
@@ -39,8 +39,8 @@
 }
 
 GPUPipelineLayout::GPUPipelineLayout(GPUDevice* device,
-                                     DawnPipelineLayout pipeline_layout)
-    : DawnObject<DawnPipelineLayout>(device, pipeline_layout) {}
+                                     WGPUPipelineLayout pipeline_layout)
+    : DawnObject<WGPUPipelineLayout>(device, pipeline_layout) {}
 
 GPUPipelineLayout::~GPUPipelineLayout() {
   if (IsDawnControlClientDestroyed()) {
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_pipeline_layout.h b/third_party/blink/renderer/modules/webgpu/gpu_pipeline_layout.h
index 4f3a69c..21cc71c 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_pipeline_layout.h
+++ b/third_party/blink/renderer/modules/webgpu/gpu_pipeline_layout.h
@@ -11,7 +11,7 @@
 
 class GPUPipelineLayoutDescriptor;
 
-class GPUPipelineLayout : public DawnObject<DawnPipelineLayout> {
+class GPUPipelineLayout : public DawnObject<WGPUPipelineLayout> {
   DEFINE_WRAPPERTYPEINFO();
 
  public:
@@ -19,7 +19,7 @@
       GPUDevice* device,
       const GPUPipelineLayoutDescriptor* webgpu_desc);
   explicit GPUPipelineLayout(GPUDevice* device,
-                             DawnPipelineLayout pipeline_layout);
+                             WGPUPipelineLayout pipeline_layout);
   ~GPUPipelineLayout() override;
 
  private:
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_queue.cc b/third_party/blink/renderer/modules/webgpu/gpu_queue.cc
index a4a5a0dd..b9ec412 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_queue.cc
+++ b/third_party/blink/renderer/modules/webgpu/gpu_queue.cc
@@ -14,12 +14,12 @@
 namespace blink {
 
 // static
-GPUQueue* GPUQueue::Create(GPUDevice* device, DawnQueue queue) {
+GPUQueue* GPUQueue::Create(GPUDevice* device, WGPUQueue queue) {
   return MakeGarbageCollected<GPUQueue>(device, queue);
 }
 
-GPUQueue::GPUQueue(GPUDevice* device, DawnQueue queue)
-    : DawnObject<DawnQueue>(device, queue) {}
+GPUQueue::GPUQueue(GPUDevice* device, WGPUQueue queue)
+    : DawnObject<WGPUQueue>(device, queue) {}
 
 GPUQueue::~GPUQueue() {
   if (IsDawnControlClientDestroyed()) {
@@ -29,7 +29,7 @@
 }
 
 void GPUQueue::submit(const HeapVector<Member<GPUCommandBuffer>>& buffers) {
-  std::unique_ptr<DawnCommandBuffer[]> commandBuffers = AsDawnType(buffers);
+  std::unique_ptr<WGPUCommandBuffer[]> commandBuffers = AsDawnType(buffers);
 
   GetProcs().queueSubmit(GetHandle(), buffers.size(), commandBuffers.get());
   // WebGPU guarantees that submitted commands finish in finite time so we
@@ -48,7 +48,7 @@
 GPUFence* GPUQueue::createFence(const GPUFenceDescriptor* descriptor) {
   DCHECK(descriptor);
 
-  DawnFenceDescriptor desc = {};
+  WGPUFenceDescriptor desc = {};
   desc.nextInChain = nullptr;
   desc.initialValue = descriptor->initialValue();
   if (descriptor->hasLabel()) {
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_queue.h b/third_party/blink/renderer/modules/webgpu/gpu_queue.h
index baae1807..abdd866e 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_queue.h
+++ b/third_party/blink/renderer/modules/webgpu/gpu_queue.h
@@ -13,12 +13,12 @@
 class GPUFence;
 class GPUFenceDescriptor;
 
-class GPUQueue : public DawnObject<DawnQueue> {
+class GPUQueue : public DawnObject<WGPUQueue> {
   DEFINE_WRAPPERTYPEINFO();
 
  public:
-  static GPUQueue* Create(GPUDevice* device, DawnQueue queue);
-  explicit GPUQueue(GPUDevice* device, DawnQueue queue);
+  static GPUQueue* Create(GPUDevice* device, WGPUQueue queue);
+  explicit GPUQueue(GPUDevice* device, WGPUQueue queue);
   ~GPUQueue() override;
 
   // gpu_queue.idl
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_render_bundle.cc b/third_party/blink/renderer/modules/webgpu/gpu_render_bundle.cc
index bc13ebd..a84dc98 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_render_bundle.cc
+++ b/third_party/blink/renderer/modules/webgpu/gpu_render_bundle.cc
@@ -10,13 +10,13 @@
 
 // static
 GPURenderBundle* GPURenderBundle::Create(GPUDevice* device,
-                                         DawnRenderBundle render_bundle) {
+                                         WGPURenderBundle render_bundle) {
   return MakeGarbageCollected<GPURenderBundle>(device, render_bundle);
 }
 
 GPURenderBundle::GPURenderBundle(GPUDevice* device,
-                                 DawnRenderBundle render_bundle)
-    : DawnObject<DawnRenderBundle>(device, render_bundle) {}
+                                 WGPURenderBundle render_bundle)
+    : DawnObject<WGPURenderBundle>(device, render_bundle) {}
 
 GPURenderBundle::~GPURenderBundle() {
   if (IsDawnControlClientDestroyed()) {
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_render_bundle.h b/third_party/blink/renderer/modules/webgpu/gpu_render_bundle.h
index b754e174..8107a12 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_render_bundle.h
+++ b/third_party/blink/renderer/modules/webgpu/gpu_render_bundle.h
@@ -11,13 +11,13 @@
 
 class GPUDevice;
 
-class GPURenderBundle : public DawnObject<DawnRenderBundle> {
+class GPURenderBundle : public DawnObject<WGPURenderBundle> {
   DEFINE_WRAPPERTYPEINFO();
 
  public:
   static GPURenderBundle* Create(GPUDevice* device,
-                                 DawnRenderBundle render_bundle);
-  explicit GPURenderBundle(GPUDevice* device, DawnRenderBundle render_bundle);
+                                 WGPURenderBundle render_bundle);
+  explicit GPURenderBundle(GPUDevice* device, WGPURenderBundle render_bundle);
   ~GPURenderBundle() override;
 
   DISALLOW_COPY_AND_ASSIGN(GPURenderBundle);
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_render_bundle_encoder.cc b/third_party/blink/renderer/modules/webgpu/gpu_render_bundle_encoder.cc
index 78def744..0654435 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_render_bundle_encoder.cc
+++ b/third_party/blink/renderer/modules/webgpu/gpu_render_bundle_encoder.cc
@@ -22,16 +22,16 @@
   uint32_t color_formats_count =
       static_cast<uint32_t>(webgpu_desc->colorFormats().size());
 
-  std::unique_ptr<DawnTextureFormat[]> color_formats =
-      AsDawnEnum<DawnTextureFormat>(webgpu_desc->colorFormats());
+  std::unique_ptr<WGPUTextureFormat[]> color_formats =
+      AsDawnEnum<WGPUTextureFormat>(webgpu_desc->colorFormats());
 
-  DawnTextureFormat depth_stencil_format = DAWN_TEXTURE_FORMAT_UNDEFINED;
+  WGPUTextureFormat depth_stencil_format = WGPUTextureFormat_Undefined;
   if (webgpu_desc->hasDepthStencilFormat()) {
     depth_stencil_format =
-        AsDawnEnum<DawnTextureFormat>(webgpu_desc->depthStencilFormat());
+        AsDawnEnum<WGPUTextureFormat>(webgpu_desc->depthStencilFormat());
   }
 
-  DawnRenderBundleEncoderDescriptor dawn_desc = {};
+  WGPURenderBundleEncoderDescriptor dawn_desc = {};
   dawn_desc.nextInChain = nullptr;
   dawn_desc.colorFormatsCount = color_formats_count;
   dawn_desc.colorFormats = color_formats.get();
@@ -48,8 +48,8 @@
 
 GPURenderBundleEncoder::GPURenderBundleEncoder(
     GPUDevice* device,
-    DawnRenderBundleEncoder render_bundle_encoder)
-    : DawnObject<DawnRenderBundleEncoder>(device, render_bundle_encoder) {}
+    WGPURenderBundleEncoder render_bundle_encoder)
+    : DawnObject<WGPURenderBundleEncoder>(device, render_bundle_encoder) {}
 
 GPURenderBundleEncoder::~GPURenderBundleEncoder() {
   if (IsDawnControlClientDestroyed()) {
@@ -130,13 +130,13 @@
 
 GPURenderBundle* GPURenderBundleEncoder::finish(
     const GPURenderBundleDescriptor* webgpu_desc) {
-  DawnRenderBundleDescriptor dawn_desc = {};
+  WGPURenderBundleDescriptor dawn_desc = {};
   dawn_desc.nextInChain = nullptr;
   if (webgpu_desc->hasLabel()) {
     dawn_desc.label = webgpu_desc->label().Utf8().data();
   }
 
-  DawnRenderBundle render_bundle =
+  WGPURenderBundle render_bundle =
       GetProcs().renderBundleEncoderFinish(GetHandle(), &dawn_desc);
   return GPURenderBundle::Create(device_, render_bundle);
 }
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_render_bundle_encoder.h b/third_party/blink/renderer/modules/webgpu/gpu_render_bundle_encoder.h
index a8015a7..2805ab7d 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_render_bundle_encoder.h
+++ b/third_party/blink/renderer/modules/webgpu/gpu_render_bundle_encoder.h
@@ -17,7 +17,7 @@
 class GPURenderBundleEncoderDescriptor;
 class GPURenderPipeline;
 
-class GPURenderBundleEncoder : public DawnObject<DawnRenderBundleEncoder> {
+class GPURenderBundleEncoder : public DawnObject<WGPURenderBundleEncoder> {
   DEFINE_WRAPPERTYPEINFO();
 
  public:
@@ -26,7 +26,7 @@
       const GPURenderBundleEncoderDescriptor* webgpu_desc);
   explicit GPURenderBundleEncoder(
       GPUDevice* device,
-      DawnRenderBundleEncoder render_bundle_encoder);
+      WGPURenderBundleEncoder render_bundle_encoder);
   ~GPURenderBundleEncoder() override;
 
   // gpu_render_bundle_encoder.idl
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_render_pass_encoder.cc b/third_party/blink/renderer/modules/webgpu/gpu_render_pass_encoder.cc
index 6214d674..1854595 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_render_pass_encoder.cc
+++ b/third_party/blink/renderer/modules/webgpu/gpu_render_pass_encoder.cc
@@ -17,15 +17,15 @@
 // static
 GPURenderPassEncoder* GPURenderPassEncoder::Create(
     GPUDevice* device,
-    DawnRenderPassEncoder render_pass_encoder) {
+    WGPURenderPassEncoder render_pass_encoder) {
   return MakeGarbageCollected<GPURenderPassEncoder>(device,
                                                     render_pass_encoder);
 }
 
 GPURenderPassEncoder::GPURenderPassEncoder(
     GPUDevice* device,
-    DawnRenderPassEncoder render_pass_encoder)
-    : DawnObject<DawnRenderPassEncoder>(device, render_pass_encoder) {}
+    WGPURenderPassEncoder render_pass_encoder)
+    : DawnObject<WGPURenderPassEncoder>(device, render_pass_encoder) {}
 
 GPURenderPassEncoder::~GPURenderPassEncoder() {
   if (IsDawnControlClientDestroyed()) {
@@ -68,7 +68,7 @@
     return;
   }
 
-  DawnColor dawn_color = AsDawnType(&color);
+  WGPUColor dawn_color = AsDawnType(&color);
   GetProcs().renderPassEncoderSetBlendColor(GetHandle(), &dawn_color);
 }
 
@@ -137,7 +137,7 @@
 
 void GPURenderPassEncoder::executeBundles(
     const HeapVector<Member<GPURenderBundle>>& bundles) {
-  std::unique_ptr<DawnRenderBundle[]> dawn_bundles = AsDawnType(bundles);
+  std::unique_ptr<WGPURenderBundle[]> dawn_bundles = AsDawnType(bundles);
 
   GetProcs().renderPassEncoderExecuteBundles(GetHandle(), bundles.size(),
                                              dawn_bundles.get());
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_render_pass_encoder.h b/third_party/blink/renderer/modules/webgpu/gpu_render_pass_encoder.h
index 0362203..1073f48 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_render_pass_encoder.h
+++ b/third_party/blink/renderer/modules/webgpu/gpu_render_pass_encoder.h
@@ -16,15 +16,15 @@
 class GPURenderBundle;
 class GPURenderPipeline;
 
-class GPURenderPassEncoder : public DawnObject<DawnRenderPassEncoder> {
+class GPURenderPassEncoder : public DawnObject<WGPURenderPassEncoder> {
   DEFINE_WRAPPERTYPEINFO();
 
  public:
   static GPURenderPassEncoder* Create(
       GPUDevice* device,
-      DawnRenderPassEncoder render_pass_encoder);
+      WGPURenderPassEncoder render_pass_encoder);
   explicit GPURenderPassEncoder(GPUDevice* device,
-                                DawnRenderPassEncoder render_pass_encoder);
+                                WGPURenderPassEncoder render_pass_encoder);
   ~GPURenderPassEncoder() override;
 
   // gpu_render_pass_encoder.idl
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_render_pipeline.cc b/third_party/blink/renderer/modules/webgpu/gpu_render_pipeline.cc
index 658342c..56fc21a3 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_render_pipeline.cc
+++ b/third_party/blink/renderer/modules/webgpu/gpu_render_pipeline.cc
@@ -21,61 +21,61 @@
 
 namespace {
 
-DawnBlendDescriptor AsDawnType(const GPUBlendDescriptor* webgpu_desc) {
+WGPUBlendDescriptor AsDawnType(const GPUBlendDescriptor* webgpu_desc) {
   DCHECK(webgpu_desc);
 
-  DawnBlendDescriptor dawn_desc = {};
-  dawn_desc.dstFactor = AsDawnEnum<DawnBlendFactor>(webgpu_desc->dstFactor());
-  dawn_desc.srcFactor = AsDawnEnum<DawnBlendFactor>(webgpu_desc->srcFactor());
+  WGPUBlendDescriptor dawn_desc = {};
+  dawn_desc.dstFactor = AsDawnEnum<WGPUBlendFactor>(webgpu_desc->dstFactor());
+  dawn_desc.srcFactor = AsDawnEnum<WGPUBlendFactor>(webgpu_desc->srcFactor());
   dawn_desc.operation =
-      AsDawnEnum<DawnBlendOperation>(webgpu_desc->operation());
+      AsDawnEnum<WGPUBlendOperation>(webgpu_desc->operation());
 
   return dawn_desc;
 }
 
 }  // anonymous namespace
 
-DawnColorStateDescriptor AsDawnType(
+WGPUColorStateDescriptor AsDawnType(
     const GPUColorStateDescriptor* webgpu_desc) {
   DCHECK(webgpu_desc);
 
-  DawnColorStateDescriptor dawn_desc = {};
+  WGPUColorStateDescriptor dawn_desc = {};
   dawn_desc.nextInChain = nullptr;
   dawn_desc.alphaBlend = AsDawnType(webgpu_desc->alphaBlend());
   dawn_desc.colorBlend = AsDawnType(webgpu_desc->colorBlend());
   dawn_desc.writeMask =
-      AsDawnEnum<DawnColorWriteMask>(webgpu_desc->writeMask());
-  dawn_desc.format = AsDawnEnum<DawnTextureFormat>(webgpu_desc->format());
+      AsDawnEnum<WGPUColorWriteMask>(webgpu_desc->writeMask());
+  dawn_desc.format = AsDawnEnum<WGPUTextureFormat>(webgpu_desc->format());
 
   return dawn_desc;
 }
 
 namespace {
 
-DawnStencilStateFaceDescriptor AsDawnType(
+WGPUStencilStateFaceDescriptor AsDawnType(
     const GPUStencilStateFaceDescriptor* webgpu_desc) {
   DCHECK(webgpu_desc);
 
-  DawnStencilStateFaceDescriptor dawn_desc = {};
-  dawn_desc.compare = AsDawnEnum<DawnCompareFunction>(webgpu_desc->compare());
+  WGPUStencilStateFaceDescriptor dawn_desc = {};
+  dawn_desc.compare = AsDawnEnum<WGPUCompareFunction>(webgpu_desc->compare());
   dawn_desc.depthFailOp =
-      AsDawnEnum<DawnStencilOperation>(webgpu_desc->depthFailOp());
-  dawn_desc.failOp = AsDawnEnum<DawnStencilOperation>(webgpu_desc->failOp());
-  dawn_desc.passOp = AsDawnEnum<DawnStencilOperation>(webgpu_desc->passOp());
+      AsDawnEnum<WGPUStencilOperation>(webgpu_desc->depthFailOp());
+  dawn_desc.failOp = AsDawnEnum<WGPUStencilOperation>(webgpu_desc->failOp());
+  dawn_desc.passOp = AsDawnEnum<WGPUStencilOperation>(webgpu_desc->passOp());
 
   return dawn_desc;
 }
 
-DawnDepthStencilStateDescriptor AsDawnType(
+WGPUDepthStencilStateDescriptor AsDawnType(
     const GPUDepthStencilStateDescriptor* webgpu_desc) {
   DCHECK(webgpu_desc);
 
-  DawnDepthStencilStateDescriptor dawn_desc = {};
+  WGPUDepthStencilStateDescriptor dawn_desc = {};
   dawn_desc.nextInChain = nullptr;
   dawn_desc.depthCompare =
-      AsDawnEnum<DawnCompareFunction>(webgpu_desc->depthCompare());
+      AsDawnEnum<WGPUCompareFunction>(webgpu_desc->depthCompare());
   dawn_desc.depthWriteEnabled = webgpu_desc->depthWriteEnabled();
-  dawn_desc.format = AsDawnEnum<DawnTextureFormat>(webgpu_desc->format());
+  dawn_desc.format = AsDawnEnum<WGPUTextureFormat>(webgpu_desc->format());
   dawn_desc.stencilBack = AsDawnType(webgpu_desc->stencilBack());
   dawn_desc.stencilFront = AsDawnType(webgpu_desc->stencilFront());
   dawn_desc.stencilReadMask = webgpu_desc->stencilReadMask();
@@ -84,22 +84,22 @@
   return dawn_desc;
 }
 
-using DawnVertexInputInfo = std::tuple<DawnVertexInputDescriptor,
-                                       Vector<DawnVertexBufferDescriptor>,
-                                       Vector<DawnVertexAttributeDescriptor>>;
+using WGPUVertexInputInfo = std::tuple<WGPUVertexInputDescriptor,
+                                       Vector<WGPUVertexBufferDescriptor>,
+                                       Vector<WGPUVertexAttributeDescriptor>>;
 
-DawnVertexInputInfo GPUVertexInputAsDawnInputState(
+WGPUVertexInputInfo GPUVertexInputAsWGPUInputState(
     v8::Isolate* isolate,
     const GPUVertexInputDescriptor* descriptor,
     ExceptionState& exception_state) {
-  DawnVertexInputDescriptor dawn_desc = {};
+  WGPUVertexInputDescriptor dawn_desc = {};
   dawn_desc.indexFormat =
-      AsDawnEnum<DawnIndexFormat>(descriptor->indexFormat());
+      AsDawnEnum<WGPUIndexFormat>(descriptor->indexFormat());
   dawn_desc.bufferCount = 0;
   dawn_desc.buffers = nullptr;
 
-  Vector<DawnVertexBufferDescriptor> dawn_vertex_buffers;
-  Vector<DawnVertexAttributeDescriptor> dawn_vertex_attributes;
+  Vector<WGPUVertexBufferDescriptor> dawn_vertex_buffers;
+  Vector<WGPUVertexAttributeDescriptor> dawn_vertex_attributes;
 
   if (descriptor->hasVertexBuffers()) {
     // TODO(crbug.com/951629): Use a sequence of nullable descriptors.
@@ -116,9 +116,9 @@
     v8::Local<v8::Array> vertex_buffers = vertex_buffers_value.As<v8::Array>();
 
     // First we collect all the descriptors but we don't set
-    // DawnVertexBufferDescriptor::attributes
+    // WGPUVertexBufferDescriptor::attributes
     // TODO(cwallez@chromium.org): Should we validate the Length() first so we
-    // don't risk creating HUGE vectors of DawnVertexBufferDescriptor from the
+    // don't risk creating HUGE vectors of WGPUVertexBufferDescriptor from the
     // sparse array?
     for (uint32_t i = 0; i < vertex_buffers->Length(); ++i) {
       // This array can be sparse. Skip empty slots.
@@ -126,9 +126,9 @@
       v8::Local<v8::Value> value;
       if (!maybe_value.ToLocal(&value) || value.IsEmpty() ||
           value->IsNullOrUndefined()) {
-        DawnVertexBufferDescriptor dawn_vertex_buffer = {};
+        WGPUVertexBufferDescriptor dawn_vertex_buffer = {};
         dawn_vertex_buffer.stride = 0;
-        dawn_vertex_buffer.stepMode = DAWN_INPUT_STEP_MODE_VERTEX;
+        dawn_vertex_buffer.stepMode = WGPUInputStepMode_Vertex;
         dawn_vertex_buffer.attributeCount = 0;
         dawn_vertex_buffer.attributes = nullptr;
         dawn_vertex_buffers.push_back(dawn_vertex_buffer);
@@ -143,10 +143,10 @@
                                std::move(dawn_vertex_attributes));
       }
 
-      DawnVertexBufferDescriptor dawn_vertex_buffer = {};
+      WGPUVertexBufferDescriptor dawn_vertex_buffer = {};
       dawn_vertex_buffer.stride = vertex_buffer.stride();
       dawn_vertex_buffer.stepMode =
-          AsDawnEnum<DawnInputStepMode>(vertex_buffer.stepMode());
+          AsDawnEnum<WGPUInputStepMode>(vertex_buffer.stepMode());
       dawn_vertex_buffer.attributeCount =
           static_cast<uint32_t>(vertex_buffer.attributeSet().size());
       dawn_vertex_buffer.attributes = nullptr;
@@ -155,11 +155,11 @@
       for (wtf_size_t j = 0; j < vertex_buffer.attributeSet().size(); ++j) {
         const GPUVertexAttributeDescriptor* attribute =
             vertex_buffer.attributeSet()[j];
-        DawnVertexAttributeDescriptor dawn_vertex_attribute = {};
+        WGPUVertexAttributeDescriptor dawn_vertex_attribute = {};
         dawn_vertex_attribute.shaderLocation = attribute->shaderLocation();
         dawn_vertex_attribute.offset = attribute->offset();
         dawn_vertex_attribute.format =
-            AsDawnEnum<DawnVertexFormat>(attribute->format());
+            AsDawnEnum<WGPUVertexFormat>(attribute->format());
         dawn_vertex_attributes.push_back(dawn_vertex_attribute);
       }
     }
@@ -167,7 +167,7 @@
     // Set up pointers in DawnVertexBufferDescriptor::attributes only after we
     // stopped appending to the vector so the pointers aren't invalidated.
     uint32_t attributeIndex = 0;
-    for (DawnVertexBufferDescriptor& buffer : dawn_vertex_buffers) {
+    for (WGPUVertexBufferDescriptor& buffer : dawn_vertex_buffers) {
       if (buffer.attributeCount == 0) {
         continue;
       }
@@ -183,14 +183,14 @@
                          std::move(dawn_vertex_attributes));
 }
 
-DawnRasterizationStateDescriptor AsDawnType(
+WGPURasterizationStateDescriptor AsDawnType(
     const GPURasterizationStateDescriptor* webgpu_desc) {
   DCHECK(webgpu_desc);
 
-  DawnRasterizationStateDescriptor dawn_desc = {};
+  WGPURasterizationStateDescriptor dawn_desc = {};
   dawn_desc.nextInChain = nullptr;
-  dawn_desc.frontFace = AsDawnEnum<DawnFrontFace>(webgpu_desc->frontFace());
-  dawn_desc.cullMode = AsDawnEnum<DawnCullMode>(webgpu_desc->cullMode());
+  dawn_desc.frontFace = AsDawnEnum<WGPUFrontFace>(webgpu_desc->frontFace());
+  dawn_desc.cullMode = AsDawnEnum<WGPUCullMode>(webgpu_desc->cullMode());
   dawn_desc.depthBias = webgpu_desc->depthBias();
   dawn_desc.depthBiasSlopeScale = webgpu_desc->depthBiasSlopeScale();
   dawn_desc.depthBiasClamp = webgpu_desc->depthBiasClamp();
@@ -208,7 +208,7 @@
   DCHECK(device);
   DCHECK(webgpu_desc);
 
-  DawnRenderPipelineDescriptor dawn_desc = {};
+  WGPURenderPipelineDescriptor dawn_desc = {};
   dawn_desc.nextInChain = nullptr;
   dawn_desc.layout = AsDawnType(webgpu_desc->layout());
   if (webgpu_desc->hasLabel()) {
@@ -230,7 +230,7 @@
   v8::Isolate* isolate = script_state->GetIsolate();
   ExceptionState exception_state(isolate, ExceptionState::kConstructionContext,
                                  "GPUVertexInputDescriptor");
-  DawnVertexInputInfo vertex_input_info = GPUVertexInputAsDawnInputState(
+  WGPUVertexInputInfo vertex_input_info = GPUVertexInputAsWGPUInputState(
       isolate, webgpu_desc->vertexInput(), exception_state);
   dawn_desc.vertexInput = &std::get<0>(vertex_input_info);
 
@@ -239,15 +239,15 @@
   }
 
   dawn_desc.primitiveTopology =
-      AsDawnEnum<DawnPrimitiveTopology>(webgpu_desc->primitiveTopology());
+      AsDawnEnum<WGPUPrimitiveTopology>(webgpu_desc->primitiveTopology());
 
-  DawnRasterizationStateDescriptor rasterization_state;
+  WGPURasterizationStateDescriptor rasterization_state;
   rasterization_state = AsDawnType(webgpu_desc->rasterizationState());
   dawn_desc.rasterizationState = &rasterization_state;
 
   dawn_desc.sampleCount = webgpu_desc->sampleCount();
 
-  DawnDepthStencilStateDescriptor depth_stencil_state = {};
+  WGPUDepthStencilStateDescriptor depth_stencil_state = {};
   if (webgpu_desc->hasDepthStencilState()) {
     depth_stencil_state = AsDawnType(webgpu_desc->depthStencilState());
     dawn_desc.depthStencilState = &depth_stencil_state;
@@ -255,7 +255,7 @@
     dawn_desc.depthStencilState = nullptr;
   }
 
-  std::unique_ptr<DawnColorStateDescriptor[]> color_states =
+  std::unique_ptr<WGPUColorStateDescriptor[]> color_states =
       AsDawnType(webgpu_desc->colorStates());
   dawn_desc.colorStateCount =
       static_cast<uint32_t>(webgpu_desc->colorStates().size());
@@ -271,8 +271,8 @@
 }
 
 GPURenderPipeline::GPURenderPipeline(GPUDevice* device,
-                                     DawnRenderPipeline render_pipeline)
-    : DawnObject<DawnRenderPipeline>(device, render_pipeline) {}
+                                     WGPURenderPipeline render_pipeline)
+    : DawnObject<WGPURenderPipeline>(device, render_pipeline) {}
 
 GPURenderPipeline::~GPURenderPipeline() {
   if (IsDawnControlClientDestroyed()) {
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_render_pipeline.h b/third_party/blink/renderer/modules/webgpu/gpu_render_pipeline.h
index c6cc49f..9b50e6c 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_render_pipeline.h
+++ b/third_party/blink/renderer/modules/webgpu/gpu_render_pipeline.h
@@ -12,7 +12,7 @@
 class GPURenderPipelineDescriptor;
 class ScriptState;
 
-class GPURenderPipeline : public DawnObject<DawnRenderPipeline> {
+class GPURenderPipeline : public DawnObject<WGPURenderPipeline> {
   DEFINE_WRAPPERTYPEINFO();
 
  public:
@@ -21,7 +21,7 @@
       GPUDevice* device,
       const GPURenderPipelineDescriptor* webgpu_desc);
   explicit GPURenderPipeline(GPUDevice* device,
-                             DawnRenderPipeline render_pipeline);
+                             WGPURenderPipeline render_pipeline);
   ~GPURenderPipeline() override;
 
  private:
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_sampler.cc b/third_party/blink/renderer/modules/webgpu/gpu_sampler.cc
index 37aa1f6..b0d72e4d 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_sampler.cc
+++ b/third_party/blink/renderer/modules/webgpu/gpu_sampler.cc
@@ -12,24 +12,24 @@
 
 namespace {
 
-DawnSamplerDescriptor AsDawnType(const GPUSamplerDescriptor* webgpu_desc) {
+WGPUSamplerDescriptor AsDawnType(const GPUSamplerDescriptor* webgpu_desc) {
   DCHECK(webgpu_desc);
 
-  DawnSamplerDescriptor dawn_desc = {};
+  WGPUSamplerDescriptor dawn_desc = {};
   dawn_desc.nextInChain = nullptr;
   dawn_desc.addressModeU =
-      AsDawnEnum<DawnAddressMode>(webgpu_desc->addressModeU());
+      AsDawnEnum<WGPUAddressMode>(webgpu_desc->addressModeU());
   dawn_desc.addressModeV =
-      AsDawnEnum<DawnAddressMode>(webgpu_desc->addressModeV());
+      AsDawnEnum<WGPUAddressMode>(webgpu_desc->addressModeV());
   dawn_desc.addressModeW =
-      AsDawnEnum<DawnAddressMode>(webgpu_desc->addressModeW());
-  dawn_desc.magFilter = AsDawnEnum<DawnFilterMode>(webgpu_desc->magFilter());
-  dawn_desc.minFilter = AsDawnEnum<DawnFilterMode>(webgpu_desc->minFilter());
+      AsDawnEnum<WGPUAddressMode>(webgpu_desc->addressModeW());
+  dawn_desc.magFilter = AsDawnEnum<WGPUFilterMode>(webgpu_desc->magFilter());
+  dawn_desc.minFilter = AsDawnEnum<WGPUFilterMode>(webgpu_desc->minFilter());
   dawn_desc.mipmapFilter =
-      AsDawnEnum<DawnFilterMode>(webgpu_desc->mipmapFilter());
+      AsDawnEnum<WGPUFilterMode>(webgpu_desc->mipmapFilter());
   dawn_desc.lodMinClamp = webgpu_desc->lodMinClamp();
   dawn_desc.lodMaxClamp = webgpu_desc->lodMaxClamp();
-  dawn_desc.compare = AsDawnEnum<DawnCompareFunction>(webgpu_desc->compare());
+  dawn_desc.compare = AsDawnEnum<WGPUCompareFunction>(webgpu_desc->compare());
   if (webgpu_desc->hasLabel()) {
     dawn_desc.label = webgpu_desc->label().Utf8().data();
   }
@@ -44,14 +44,14 @@
                                const GPUSamplerDescriptor* webgpu_desc) {
   DCHECK(device);
   DCHECK(webgpu_desc);
-  DawnSamplerDescriptor dawn_desc = AsDawnType(webgpu_desc);
+  WGPUSamplerDescriptor dawn_desc = AsDawnType(webgpu_desc);
   return MakeGarbageCollected<GPUSampler>(
       device,
       device->GetProcs().deviceCreateSampler(device->GetHandle(), &dawn_desc));
 }
 
-GPUSampler::GPUSampler(GPUDevice* device, DawnSampler sampler)
-    : DawnObject<DawnSampler>(device, sampler) {}
+GPUSampler::GPUSampler(GPUDevice* device, WGPUSampler sampler)
+    : DawnObject<WGPUSampler>(device, sampler) {}
 
 GPUSampler::~GPUSampler() {
   if (IsDawnControlClientDestroyed()) {
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_sampler.h b/third_party/blink/renderer/modules/webgpu/gpu_sampler.h
index 3a99688..a7c9164 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_sampler.h
+++ b/third_party/blink/renderer/modules/webgpu/gpu_sampler.h
@@ -11,13 +11,13 @@
 
 class GPUSamplerDescriptor;
 
-class GPUSampler : public DawnObject<DawnSampler> {
+class GPUSampler : public DawnObject<WGPUSampler> {
   DEFINE_WRAPPERTYPEINFO();
 
  public:
   static GPUSampler* Create(GPUDevice* device,
                             const GPUSamplerDescriptor* webgpu_desc);
-  explicit GPUSampler(GPUDevice* device, DawnSampler sampler);
+  explicit GPUSampler(GPUDevice* device, WGPUSampler sampler);
   ~GPUSampler() override;
 
  private:
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_shader_module.cc b/third_party/blink/renderer/modules/webgpu/gpu_shader_module.cc
index edd4004..305509f8 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_shader_module.cc
+++ b/third_party/blink/renderer/modules/webgpu/gpu_shader_module.cc
@@ -11,9 +11,9 @@
 
 namespace {
 
-DawnShaderModuleDescriptor AsDawnType(
+WGPUShaderModuleDescriptor AsDawnType(
     const GPUShaderModuleDescriptor* webgpu_desc) {
-  DawnShaderModuleDescriptor dawn_desc = {};
+  WGPUShaderModuleDescriptor dawn_desc = {};
 
   dawn_desc.nextInChain = nullptr;
   dawn_desc.code = webgpu_desc->code().View()->Data();
@@ -33,15 +33,15 @@
     const GPUShaderModuleDescriptor* webgpu_desc) {
   DCHECK(device);
   DCHECK(webgpu_desc);
-  DawnShaderModuleDescriptor dawn_desc = AsDawnType(webgpu_desc);
+  WGPUShaderModuleDescriptor dawn_desc = AsDawnType(webgpu_desc);
   return MakeGarbageCollected<GPUShaderModule>(
       device, device->GetProcs().deviceCreateShaderModule(device->GetHandle(),
                                                           &dawn_desc));
 }
 
 GPUShaderModule::GPUShaderModule(GPUDevice* device,
-                                 DawnShaderModule shader_module)
-    : DawnObject<DawnShaderModule>(device, shader_module) {}
+                                 WGPUShaderModule shader_module)
+    : DawnObject<WGPUShaderModule>(device, shader_module) {}
 
 GPUShaderModule::~GPUShaderModule() {
   if (IsDawnControlClientDestroyed()) {
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_shader_module.h b/third_party/blink/renderer/modules/webgpu/gpu_shader_module.h
index ac8cb74..3f1d4b7 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_shader_module.h
+++ b/third_party/blink/renderer/modules/webgpu/gpu_shader_module.h
@@ -11,13 +11,13 @@
 
 class GPUShaderModuleDescriptor;
 
-class GPUShaderModule : public DawnObject<DawnShaderModule> {
+class GPUShaderModule : public DawnObject<WGPUShaderModule> {
   DEFINE_WRAPPERTYPEINFO();
 
  public:
   static GPUShaderModule* Create(GPUDevice* device,
                                  const GPUShaderModuleDescriptor* webgpu_desc);
-  explicit GPUShaderModule(GPUDevice* device, DawnShaderModule shader_module);
+  explicit GPUShaderModule(GPUDevice* device, WGPUShaderModule shader_module);
   ~GPUShaderModule() override;
 
  private:
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_swap_chain.cc b/third_party/blink/renderer/modules/webgpu/gpu_swap_chain.cc
index 9521cc2..4b98fdbd 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_swap_chain.cc
+++ b/third_party/blink/renderer/modules/webgpu/gpu_swap_chain.cc
@@ -23,11 +23,11 @@
     : DawnObjectBase(descriptor->device()->GetDawnControlClient()),
       device_(descriptor->device()),
       context_(context),
-      usage_(AsDawnEnum<DawnTextureUsage>(descriptor->usage())) {
+      usage_(AsDawnEnum<WGPUTextureUsage>(descriptor->usage())) {
   // TODO: Use label from GPUObjectDescriptorBase.
   swap_buffers_ = base::AdoptRef(new WebGPUSwapBufferProvider(
       this, GetDawnControlClient(), usage_,
-      AsDawnEnum<DawnTextureFormat>(descriptor->format())));
+      AsDawnEnum<WGPUTextureFormat>(descriptor->format())));
 }
 
 GPUSwapChain::~GPUSwapChain() {
@@ -71,7 +71,7 @@
     return texture_;
   }
 
-  DawnTexture dawn_client_texture = swap_buffers_->GetNewTexture(
+  WGPUTexture dawn_client_texture = swap_buffers_->GetNewTexture(
       device_->GetHandle(), context_->CanvasSize());
   DCHECK(dawn_client_texture);
   texture_ = MakeGarbageCollected<GPUTexture>(device_, dawn_client_texture);
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_swap_chain.h b/third_party/blink/renderer/modules/webgpu/gpu_swap_chain.h
index edaedbfd..ee20386 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_swap_chain.h
+++ b/third_party/blink/renderer/modules/webgpu/gpu_swap_chain.h
@@ -49,7 +49,7 @@
 
   Member<GPUDevice> device_;
   Member<GPUCanvasContext> context_;
-  DawnTextureUsage usage_;
+  WGPUTextureUsage usage_;
 
   Member<GPUTexture> texture_;
 };
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_texture.cc b/third_party/blink/renderer/modules/webgpu/gpu_texture.cc
index 9a4ec19..39e6142 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_texture.cc
+++ b/third_party/blink/renderer/modules/webgpu/gpu_texture.cc
@@ -14,17 +14,17 @@
 
 namespace {
 
-DawnTextureDescriptor AsDawnType(const GPUTextureDescriptor* webgpu_desc) {
+WGPUTextureDescriptor AsDawnType(const GPUTextureDescriptor* webgpu_desc) {
   DCHECK(webgpu_desc);
 
-  DawnTextureDescriptor dawn_desc = {};
+  WGPUTextureDescriptor dawn_desc = {};
   dawn_desc.nextInChain = nullptr;
-  dawn_desc.usage = static_cast<DawnTextureUsage>(webgpu_desc->usage());
+  dawn_desc.usage = static_cast<WGPUTextureUsage>(webgpu_desc->usage());
   dawn_desc.dimension =
-      AsDawnEnum<DawnTextureDimension>(webgpu_desc->dimension());
+      AsDawnEnum<WGPUTextureDimension>(webgpu_desc->dimension());
   dawn_desc.size = AsDawnType(&webgpu_desc->size());
   dawn_desc.arrayLayerCount = webgpu_desc->arrayLayerCount();
-  dawn_desc.format = AsDawnEnum<DawnTextureFormat>(webgpu_desc->format());
+  dawn_desc.format = AsDawnEnum<WGPUTextureFormat>(webgpu_desc->format());
   dawn_desc.mipLevelCount = webgpu_desc->mipLevelCount();
   dawn_desc.sampleCount = webgpu_desc->sampleCount();
   if (webgpu_desc->hasLabel()) {
@@ -34,20 +34,20 @@
   return dawn_desc;
 }
 
-DawnTextureViewDescriptor AsDawnType(
+WGPUTextureViewDescriptor AsDawnType(
     const GPUTextureViewDescriptor* webgpu_desc) {
   DCHECK(webgpu_desc);
 
-  DawnTextureViewDescriptor dawn_desc = {};
+  WGPUTextureViewDescriptor dawn_desc = {};
   dawn_desc.nextInChain = nullptr;
-  dawn_desc.format = AsDawnEnum<DawnTextureFormat>(webgpu_desc->format());
+  dawn_desc.format = AsDawnEnum<WGPUTextureFormat>(webgpu_desc->format());
   dawn_desc.dimension =
-      AsDawnEnum<DawnTextureViewDimension>(webgpu_desc->dimension());
+      AsDawnEnum<WGPUTextureViewDimension>(webgpu_desc->dimension());
   dawn_desc.baseMipLevel = webgpu_desc->baseMipLevel();
   dawn_desc.mipLevelCount = webgpu_desc->mipLevelCount();
   dawn_desc.baseArrayLayer = webgpu_desc->baseArrayLayer();
   dawn_desc.arrayLayerCount = webgpu_desc->arrayLayerCount();
-  dawn_desc.aspect = AsDawnEnum<DawnTextureAspect>(webgpu_desc->aspect());
+  dawn_desc.aspect = AsDawnEnum<WGPUTextureAspect>(webgpu_desc->aspect());
   if (webgpu_desc->hasLabel()) {
     dawn_desc.label = webgpu_desc->label().Utf8().data();
   }
@@ -72,15 +72,15 @@
     return nullptr;
   }
 
-  DawnTextureDescriptor dawn_desc = AsDawnType(webgpu_desc);
+  WGPUTextureDescriptor dawn_desc = AsDawnType(webgpu_desc);
 
   return MakeGarbageCollected<GPUTexture>(
       device,
       device->GetProcs().deviceCreateTexture(device->GetHandle(), &dawn_desc));
 }
 
-GPUTexture::GPUTexture(GPUDevice* device, DawnTexture texture)
-    : DawnObject<DawnTexture>(device, texture) {}
+GPUTexture::GPUTexture(GPUDevice* device, WGPUTexture texture)
+    : DawnObject<WGPUTexture>(device, texture) {}
 
 GPUTexture::~GPUTexture() {
   if (IsDawnControlClientDestroyed()) {
@@ -93,7 +93,7 @@
     const GPUTextureViewDescriptor* webgpu_desc) {
   DCHECK(webgpu_desc);
 
-  DawnTextureViewDescriptor dawn_desc = AsDawnType(webgpu_desc);
+  WGPUTextureViewDescriptor dawn_desc = AsDawnType(webgpu_desc);
   return GPUTextureView::Create(
       device_, GetProcs().textureCreateView(GetHandle(), &dawn_desc));
 }
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_texture.h b/third_party/blink/renderer/modules/webgpu/gpu_texture.h
index a137fdc..99408c8 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_texture.h
+++ b/third_party/blink/renderer/modules/webgpu/gpu_texture.h
@@ -14,14 +14,14 @@
 class GPUTextureView;
 class GPUTextureViewDescriptor;
 
-class GPUTexture : public DawnObject<DawnTexture> {
+class GPUTexture : public DawnObject<WGPUTexture> {
   DEFINE_WRAPPERTYPEINFO();
 
  public:
   static GPUTexture* Create(GPUDevice* device,
                             const GPUTextureDescriptor* webgpu_desc,
                             ExceptionState& exception_state);
-  explicit GPUTexture(GPUDevice* device, DawnTexture texture);
+  explicit GPUTexture(GPUDevice* device, WGPUTexture texture);
   ~GPUTexture() override;
 
   // gpu_texture.idl
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_texture_view.cc b/third_party/blink/renderer/modules/webgpu/gpu_texture_view.cc
index 584223a..88ec146 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_texture_view.cc
+++ b/third_party/blink/renderer/modules/webgpu/gpu_texture_view.cc
@@ -10,12 +10,12 @@
 
 // static
 GPUTextureView* GPUTextureView::Create(GPUDevice* device,
-                                       DawnTextureView texture_view) {
+                                       WGPUTextureView texture_view) {
   return MakeGarbageCollected<GPUTextureView>(device, texture_view);
 }
 
-GPUTextureView::GPUTextureView(GPUDevice* device, DawnTextureView texture_view)
-    : DawnObject<DawnTextureView>(device, texture_view) {}
+GPUTextureView::GPUTextureView(GPUDevice* device, WGPUTextureView texture_view)
+    : DawnObject<WGPUTextureView>(device, texture_view) {}
 
 GPUTextureView::~GPUTextureView() {
   if (IsDawnControlClientDestroyed()) {
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_texture_view.h b/third_party/blink/renderer/modules/webgpu/gpu_texture_view.h
index 5a66edc..600c55b 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_texture_view.h
+++ b/third_party/blink/renderer/modules/webgpu/gpu_texture_view.h
@@ -9,13 +9,13 @@
 
 namespace blink {
 
-class GPUTextureView : public DawnObject<DawnTextureView> {
+class GPUTextureView : public DawnObject<WGPUTextureView> {
   DEFINE_WRAPPERTYPEINFO();
 
  public:
   static GPUTextureView* Create(GPUDevice* device,
-                                DawnTextureView texture_view);
-  explicit GPUTextureView(GPUDevice* device, DawnTextureView texture_view);
+                                WGPUTextureView texture_view);
+  explicit GPUTextureView(GPUDevice* device, WGPUTextureView texture_view);
   ~GPUTextureView() override;
 
  private:
diff --git a/third_party/blink/renderer/modules/webtransport/BUILD.gn b/third_party/blink/renderer/modules/webtransport/BUILD.gn
deleted file mode 100644
index 1e3507c..0000000
--- a/third_party/blink/renderer/modules/webtransport/BUILD.gn
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 2019 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.
-
-import("//third_party/blink/renderer/modules/modules.gni")
-
-blink_modules_sources("webtransport") {
-  sources = [
-    "quic_transport.cc",
-    "quic_transport.h",
-  ]
-}
-
-jumbo_source_set("unit_tests") {
-  testonly = true
-  sources = []
-
-  configs += [
-    "//third_party/blink/renderer:config",
-    "//third_party/blink/renderer:inside_blink",
-    "//third_party/blink/renderer/core:blink_core_pch",
-  ]
-
-  deps = [
-    "//testing/gmock",
-    "//testing/gtest",
-    "//third_party/blink/renderer/modules",
-    "//third_party/blink/renderer/platform",
-    "//third_party/blink/renderer/platform/wtf",
-  ]
-}
diff --git a/third_party/blink/renderer/modules/webtransport/OWNERS b/third_party/blink/renderer/modules/webtransport/OWNERS
deleted file mode 100644
index e57af91f..0000000
--- a/third_party/blink/renderer/modules/webtransport/OWNERS
+++ /dev/null
@@ -1,5 +0,0 @@
-ricea@chromium.org
-yhirano@chromium.org
-
-# TEAM: blink-network-dev@chromium.org
-# COMPONENT: Blink>Network>WebTransport
diff --git a/third_party/blink/renderer/modules/webtransport/README.md b/third_party/blink/renderer/modules/webtransport/README.md
deleted file mode 100644
index 4014d4a..0000000
--- a/third_party/blink/renderer/modules/webtransport/README.md
+++ /dev/null
@@ -1,8 +0,0 @@
-# WebTransport API
-
-This is a directory for [Web Transport](https://wicg.github.io/web-transport/)
-implementation.
-
-## Design docs
-
- - [QuicTransport](https://docs.google.com/document/d/1UgviRBnZkMUq4OKcsAJvIQFX6UCXeCbOtX_wMgwD_es/edit)
diff --git a/third_party/blink/renderer/modules/webtransport/quic_transport.cc b/third_party/blink/renderer/modules/webtransport/quic_transport.cc
deleted file mode 100644
index b9403846..0000000
--- a/third_party/blink/renderer/modules/webtransport/quic_transport.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2019 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.
-
-#include "third_party/blink/renderer/modules/webtransport/quic_transport.h"
-
-namespace blink {
-
-QuicTransport::QuicTransport(ScriptState* script_state, const String& url) {}
-
-void QuicTransport::Dispose() {}
-
-}  // namespace blink
diff --git a/third_party/blink/renderer/modules/webtransport/quic_transport.h b/third_party/blink/renderer/modules/webtransport/quic_transport.h
deleted file mode 100644
index c9262d6..0000000
--- a/third_party/blink/renderer/modules/webtransport/quic_transport.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2019 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_BLINK_RENDERER_MODULES_WEBTRANSPORT_QUIC_TRANSPORT_H_
-#define THIRD_PARTY_BLINK_RENDERER_MODULES_WEBTRANSPORT_QUIC_TRANSPORT_H_
-
-#include "third_party/blink/renderer/modules/modules_export.h"
-#include "third_party/blink/renderer/platform/bindings/script_wrappable.h"
-#include "third_party/blink/renderer/platform/wtf/forward.h"
-
-namespace blink {
-
-class ScriptState;
-
-class MODULES_EXPORT QuicTransport final : public ScriptWrappable {
-  DEFINE_WRAPPERTYPEINFO();
-  USING_PRE_FINALIZER(QuicTransport, Dispose);
-
- public:
-  static QuicTransport* Create(ScriptState* script_state, const String& url) {
-    return MakeGarbageCollected<QuicTransport>(script_state, url);
-  }
-
-  QuicTransport(ScriptState*, const String& url);
-  ~QuicTransport() override = default;
-
- private:
-  void Dispose();
-};
-
-}  // namespace blink
-
-#endif
diff --git a/third_party/blink/renderer/modules/webtransport/quic_transport.idl b/third_party/blink/renderer/modules/webtransport/quic_transport.idl
deleted file mode 100644
index 469fc482..0000000
--- a/third_party/blink/renderer/modules/webtransport/quic_transport.idl
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2019 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.
-
-// https://wicg.github.io/web-transport/#quic-transport
-[
-    Constructor(USVString url),
-    Exposed=(Window, Worker),
-    RuntimeEnabled=QuicTransport,
-    ConstructorCallWith=ScriptState
-] interface QuicTransport {
-  // QuicTransport is the first, and at this moment only, transport which is
-  // implemented. In the (draft) spec there are many mix-in interfaces which
-  // QuicTransport includes, but we define all their methods/attributes here
-  // for simplicity.
-};
diff --git a/third_party/blink/renderer/modules/xr/navigator_xr.cc b/third_party/blink/renderer/modules/xr/navigator_xr.cc
index 3401f9f..039e450 100644
--- a/third_party/blink/renderer/modules/xr/navigator_xr.cc
+++ b/third_party/blink/renderer/modules/xr/navigator_xr.cc
@@ -10,27 +10,12 @@
 #include "third_party/blink/renderer/core/frame/local_frame.h"
 #include "third_party/blink/renderer/core/frame/navigator.h"
 #include "third_party/blink/renderer/core/inspector/console_message.h"
-#include "third_party/blink/renderer/modules/vr/navigator_vr.h"
 #include "third_party/blink/renderer/modules/xr/xr.h"
 
 namespace blink {
 
 const char NavigatorXR::kSupplementName[] = "NavigatorXR";
 
-bool NavigatorXR::HasWebXrBeenUsed(Document& document) {
-  if (!document.GetFrame())
-    return false;
-  Navigator& navigator = *document.GetFrame()->DomWindow()->navigator();
-
-  NavigatorXR* supplement = Supplement<Navigator>::From<NavigatorXR>(navigator);
-  if (!supplement) {
-    // No supplement means WebXR has not been used.
-    return false;
-  }
-
-  return NavigatorXR::From(navigator).did_use_webxr_;
-}
-
 NavigatorXR* NavigatorXR::From(Document& document) {
   if (!document.GetFrame())
     return nullptr;
@@ -72,16 +57,9 @@
   }
 
   if (!xr_) {
-    if (NavigatorVR::HasWebVrBeenUsed(*document)) {
-      document->AddConsoleMessage(ConsoleMessage::Create(
-          mojom::ConsoleMessageSource::kOther,
-          mojom::ConsoleMessageLevel::kError,
-          "Cannot use navigator.xr if WebVR is already in use."));
-      return nullptr;
-    }
-    did_use_webxr_ = true;
     xr_ = XR::Create(*document->GetFrame(), document->UkmSourceID());
   }
+
   return xr_;
 }
 
diff --git a/third_party/blink/renderer/modules/xr/navigator_xr.h b/third_party/blink/renderer/modules/xr/navigator_xr.h
index 5ed2491..89d1e217 100644
--- a/third_party/blink/renderer/modules/xr/navigator_xr.h
+++ b/third_party/blink/renderer/modules/xr/navigator_xr.h
@@ -22,11 +22,6 @@
  public:
   static const char kSupplementName[];
 
-  // Returns whether WebXR has beeen used in the document.
-  // If no supplement has been created, it returns false without creating one.
-  // TODO(https://crbug.com/960132): Remove when WebVR is removed.
-  static bool HasWebXrBeenUsed(Document&);
-
   static NavigatorXR* From(Document&);
   static NavigatorXR& From(Navigator&);
 
@@ -42,8 +37,6 @@
 
   Member<XR> xr_;
 
-  bool did_use_webxr_ = false;
-
   // Gates metrics collection once per local DOM window frame.
   bool did_log_navigator_xr_ = false;
 
diff --git a/third_party/blink/renderer/platform/exported/platform.cc b/third_party/blink/renderer/platform/exported/platform.cc
index ff12a36a1..844afb3 100644
--- a/third_party/blink/renderer/platform/exported/platform.cc
+++ b/third_party/blink/renderer/platform/exported/platform.cc
@@ -63,7 +63,6 @@
 #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
 #include "third_party/blink/renderer/platform/wtf/cross_thread_functional.h"
 #include "third_party/blink/renderer/platform/wtf/hash_map.h"
-#include "third_party/webrtc/api/async_resolver_factory.h"
 #include "third_party/webrtc/api/rtp_parameters.h"
 #include "third_party/webrtc/p2p/base/port_allocator.h"
 
@@ -342,14 +341,4 @@
   return nullptr;
 }
 
-std::unique_ptr<cricket::PortAllocator> Platform::CreateWebRtcPortAllocator(
-    WebLocalFrame* frame) {
-  return nullptr;
-}
-
-std::unique_ptr<webrtc::AsyncResolverFactory>
-Platform::CreateWebRtcAsyncResolverFactory() {
-  return nullptr;
-}
-
 }  // namespace blink
diff --git a/third_party/blink/renderer/platform/graphics/dark_mode_filter.h b/third_party/blink/renderer/platform/graphics/dark_mode_filter.h
index 6c96642..54e47a8c 100644
--- a/third_party/blink/renderer/platform/graphics/dark_mode_filter.h
+++ b/third_party/blink/renderer/platform/graphics/dark_mode_filter.h
@@ -49,6 +49,8 @@
                                  Image* image,
                                  cc::PaintFlags* flags);
 
+  SkColorFilter* GetImageFilterForTesting() { return image_filter_.get(); }
+
  private:
   DarkModeSettings settings_;
 
diff --git a/third_party/blink/renderer/platform/graphics/dark_mode_filter_test.cc b/third_party/blink/renderer/platform/graphics/dark_mode_filter_test.cc
index 34e414d..487a867f 100644
--- a/third_party/blink/renderer/platform/graphics/dark_mode_filter_test.cc
+++ b/third_party/blink/renderer/platform/graphics/dark_mode_filter_test.cc
@@ -14,7 +14,6 @@
 namespace blink {
 namespace {
 
-// TODO(gilmanmh): Add expectations for image inversion to each test.
 TEST(DarkModeFilterTest, DoNotApplyFilterWhenDarkModeIsOff) {
   DarkModeFilter filter;
 
@@ -32,6 +31,8 @@
   EXPECT_EQ(base::nullopt,
             filter.ApplyToFlagsIfNeeded(
                 cc::PaintFlags(), DarkModeFilter::ElementRole::kBackground));
+
+  EXPECT_EQ(nullptr, filter.GetImageFilterForTesting());
 }
 
 TEST(DarkModeFilterTest, ApplyDarkModeToColorsAndFlags) {
@@ -54,6 +55,8 @@
       flags, DarkModeFilter::ElementRole::kBackground);
   ASSERT_NE(flags_or_nullopt, base::nullopt);
   EXPECT_EQ(SK_ColorBLACK, flags_or_nullopt.value().getColor());
+
+  EXPECT_NE(nullptr, filter.GetImageFilterForTesting());
 }
 
 }  // namespace
diff --git a/third_party/blink/renderer/platform/graphics/dark_mode_settings.h b/third_party/blink/renderer/platform/graphics/dark_mode_settings.h
index babdfb632..50dad6f6 100644
--- a/third_party/blink/renderer/platform/graphics/dark_mode_settings.h
+++ b/third_party/blink/renderer/platform/graphics/dark_mode_settings.h
@@ -48,7 +48,7 @@
   bool grayscale = false;
   float image_grayscale_percent = 0.0;  // Valid range from 0.0 to 1.0
   float contrast = 0.0;                 // Valid range from -1.0 to 1.0
-  DarkModeImagePolicy image_policy = DarkModeImagePolicy::kFilterAll;
+  DarkModeImagePolicy image_policy = DarkModeImagePolicy::kFilterNone;
   DarkModeClassifierType classifier_type = DarkModeClassifierType::kGeneric;
 
   // Text colors with brightness below this threshold will be inverted, and
diff --git a/third_party/blink/renderer/platform/graphics/gpu/dawn_control_client_holder.h b/third_party/blink/renderer/platform/graphics/gpu/dawn_control_client_holder.h
index af14383..8e88b40 100644
--- a/third_party/blink/renderer/platform/graphics/gpu/dawn_control_client_holder.h
+++ b/third_party/blink/renderer/platform/graphics/gpu/dawn_control_client_holder.h
@@ -5,8 +5,8 @@
 #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_GRAPHICS_GPU_DAWN_CONTROL_CLIENT_HOLDER_H_
 #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_GRAPHICS_GPU_DAWN_CONTROL_CLIENT_HOLDER_H_
 
-#include <dawn/dawn.h>
 #include <dawn/dawn_proc_table.h>
+#include <dawn/webgpu.h>
 
 #include "third_party/blink/public/platform/web_graphics_context_3d_provider.h"
 #include "third_party/blink/renderer/platform/platform_export.h"
diff --git a/third_party/blink/renderer/platform/graphics/gpu/webgpu_swap_buffer_provider.cc b/third_party/blink/renderer/platform/graphics/gpu/webgpu_swap_buffer_provider.cc
index 928096a8..d2fd96c 100644
--- a/third_party/blink/renderer/platform/graphics/gpu/webgpu_swap_buffer_provider.cc
+++ b/third_party/blink/renderer/platform/graphics/gpu/webgpu_swap_buffer_provider.cc
@@ -14,11 +14,11 @@
 namespace blink {
 
 namespace {
-viz::ResourceFormat DawnFormatToViz(DawnTextureFormat format) {
-  if (format == DAWN_TEXTURE_FORMAT_BGRA8_UNORM) {
+viz::ResourceFormat WGPUFormatToViz(WGPUTextureFormat format) {
+  if (format == WGPUTextureFormat_BGRA8Unorm) {
     return viz::BGRA_8888;
   }
-  if (format == DAWN_TEXTURE_FORMAT_RGBA8_UNORM) {
+  if (format == WGPUTextureFormat_RGBA8Unorm) {
     return viz::RGBA_8888;
   }
   NOTREACHED();
@@ -29,12 +29,12 @@
 WebGPUSwapBufferProvider::WebGPUSwapBufferProvider(
     Client* client,
     scoped_refptr<DawnControlClientHolder> dawn_control_client,
-    DawnTextureUsage usage,
-    DawnTextureFormat format)
+    WGPUTextureUsage usage,
+    WGPUTextureFormat format)
     : dawn_control_client_(dawn_control_client),
       client_(client),
       usage_(usage),
-      format_(DawnFormatToViz(format)) {
+      format_(WGPUFormatToViz(format)) {
   // Create a layer that will be used by the canvas and will ask for a
   // SharedImage each frame.
   layer_ = cc::TextureLayer::CreateForMailbox(this);
@@ -85,7 +85,7 @@
   neutered_ = true;
 }
 
-DawnTexture WebGPUSwapBufferProvider::GetNewTexture(DawnDevice device,
+WGPUTexture WebGPUSwapBufferProvider::GetNewTexture(WGPUDevice device,
                                                     const IntSize& size) {
   DCHECK(!current_swap_buffer_ && !dawn_control_client_->IsDestroyed());
 
diff --git a/third_party/blink/renderer/platform/graphics/gpu/webgpu_swap_buffer_provider.h b/third_party/blink/renderer/platform/graphics/gpu/webgpu_swap_buffer_provider.h
index 5d2a866..601e49b 100644
--- a/third_party/blink/renderer/platform/graphics/gpu/webgpu_swap_buffer_provider.h
+++ b/third_party/blink/renderer/platform/graphics/gpu/webgpu_swap_buffer_provider.h
@@ -35,13 +35,13 @@
   WebGPUSwapBufferProvider(
       Client* client,
       scoped_refptr<DawnControlClientHolder> dawn_control_client,
-      DawnTextureUsage usage,
-      DawnTextureFormat format);
+      WGPUTextureUsage usage,
+      WGPUTextureFormat format);
   ~WebGPUSwapBufferProvider() override;
 
   cc::Layer* CcLayer();
   void Neuter();
-  DawnTexture GetNewTexture(DawnDevice device, const IntSize& size);
+  WGPUTexture GetNewTexture(WGPUDevice device, const IntSize& size);
 
   // cc::TextureLayerClient implementation.
   bool PrepareTransferableResource(
@@ -84,7 +84,7 @@
   scoped_refptr<cc::TextureLayer> layer_;
   bool neutered_ = false;
 
-  DawnTextureUsage usage_;
+  WGPUTextureUsage usage_;
 
   uint32_t wire_texture_id_ = 0;
   uint32_t wire_texture_generation_ = 0;
diff --git a/third_party/blink/renderer/platform/graphics/gpu/webgpu_swap_buffer_provider_test.cc b/third_party/blink/renderer/platform/graphics/gpu/webgpu_swap_buffer_provider_test.cc
index 9e99fc6..6ff93d7e 100644
--- a/third_party/blink/renderer/platform/graphics/gpu/webgpu_swap_buffer_provider_test.cc
+++ b/third_party/blink/renderer/platform/graphics/gpu/webgpu_swap_buffer_provider_test.cc
@@ -19,7 +19,7 @@
 
 class MockWebGPUInterface : public gpu::webgpu::WebGPUInterfaceStub {
  public:
-  MOCK_METHOD1(ReserveTexture, gpu::webgpu::ReservedTexture(DawnDevice device));
+  MOCK_METHOD1(ReserveTexture, gpu::webgpu::ReservedTexture(WGPUDevice device));
 
   // It is hard to use GMock with SyncTokens represented as GLByte*, instead we
   // remember which were the last sync tokens generated or waited upon.
@@ -58,8 +58,8 @@
       bool* alive,
       Client* client,
       scoped_refptr<DawnControlClientHolder> dawn_control_client,
-      DawnTextureUsage usage,
-      DawnTextureFormat format)
+      WGPUTextureUsage usage,
+      WGPUTextureFormat format)
       : WebGPUSwapBufferProvider(client, dawn_control_client, usage, format),
         alive_(alive) {}
   ~WebGPUSwapBufferProviderForTests() override { *alive_ = false; }
@@ -84,7 +84,7 @@
         base::MakeRefCounted<DawnControlClientHolder>(std::move(provider));
     provider_ = base::MakeRefCounted<WebGPUSwapBufferProviderForTests>(
         &provider_alive_, &client_, dawn_control_client_,
-        DAWN_TEXTURE_USAGE_OUTPUT_ATTACHMENT, DAWN_TEXTURE_FORMAT_RGBA8_UNORM);
+        WGPUTextureUsage_OutputAttachment, WGPUTextureFormat_RGBA8Unorm);
   }
 
   scoped_refptr<DawnControlClientHolder> dawn_control_client_;
@@ -101,17 +101,17 @@
 
   viz::TransferableResource resource1;
   gpu::webgpu::ReservedTexture reservation1 = {
-      reinterpret_cast<DawnTexture>(&resource1), 1, 1};
+      reinterpret_cast<WGPUTexture>(&resource1), 1, 1};
   std::unique_ptr<viz::SingleReleaseCallback> release_callback1;
 
   viz::TransferableResource resource2;
   gpu::webgpu::ReservedTexture reservation2 = {
-      reinterpret_cast<DawnTexture>(&resource2), 2, 2};
+      reinterpret_cast<WGPUTexture>(&resource2), 2, 2};
   std::unique_ptr<viz::SingleReleaseCallback> release_callback2;
 
   viz::TransferableResource resource3;
   gpu::webgpu::ReservedTexture reservation3 = {
-      reinterpret_cast<DawnTexture>(&resource3), 3, 3};
+      reinterpret_cast<WGPUTexture>(&resource3), 3, 3};
   std::unique_ptr<viz::SingleReleaseCallback> release_callback3;
 
   // Produce resources.
@@ -149,7 +149,7 @@
 
   viz::TransferableResource resource;
   gpu::webgpu::ReservedTexture reservation = {
-      reinterpret_cast<DawnTexture>(&resource), 1, 1};
+      reinterpret_cast<WGPUTexture>(&resource), 1, 1};
   std::unique_ptr<viz::SingleReleaseCallback> release_callback;
 
   // Produce one resource of size kSize.
@@ -182,7 +182,7 @@
 
   viz::TransferableResource resource;
   gpu::webgpu::ReservedTexture reservation = {
-      reinterpret_cast<DawnTexture>(&resource), 1, 1};
+      reinterpret_cast<WGPUTexture>(&resource), 1, 1};
   std::unique_ptr<viz::SingleReleaseCallback> release_callback;
 
   // Produce the first resource, check that WebGPU will wait for the creation of
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5
index 76e9a50..43aa05a 100644
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -1326,10 +1326,6 @@
       status: "experimental",
     },
     {
-      name: "QuicTransport",
-      status: "experimental",
-    },
-    {
       name: "ReducedReferrerGranularity",
     },
     {
@@ -1767,9 +1763,6 @@
       depends_on: ["WebUSB"],
     },
     {
-      name: "WebVR",
-    },
-    {
       name: "WebVTTRegions",
       status: "experimental",
     },
diff --git a/third_party/blink/web_tests/NeverFixTests b/third_party/blink/web_tests/NeverFixTests
index 1c98385..d171b0c1 100644
--- a/third_party/blink/web_tests/NeverFixTests
+++ b/third_party/blink/web_tests/NeverFixTests
@@ -440,6 +440,9 @@
 external/wpt/css/css-text/text-transform/text-transform-full-size-kana-007.html [ WontFix ]
 external/wpt/css/css-text/text-transform/text-transform-fullwidth-008.html [ WontFix ]
 external/wpt/css/css-text/text-transform/text-transform-fullwidth-009.html [ WontFix ]
+external/wpt/css/css-text/writing-system/writing-system-line-break-001.html [ WontFix ]
+external/wpt/css/css-text/writing-system/writing-system-line-break-002.html [ WontFix ]
+external/wpt/css/css-text/writing-system/writing-system-segment-break-001.html [ WontFix ]
 
 # Undefined behavior without any implementations.
 external/wpt/css/css-text/white-space/seg-break-transformation-019.html [ WontFix ]
diff --git a/third_party/blink/web_tests/TestExpectations b/third_party/blink/web_tests/TestExpectations
index 7e217aa..5f28caf6 100644
--- a/third_party/blink/web_tests/TestExpectations
+++ b/third_party/blink/web_tests/TestExpectations
@@ -2604,6 +2604,8 @@
 crbug.com/893490 [ Win ] external/wpt/css/css-text/white-space/control-chars-09E.html [ Failure ]
 crbug.com/893490 [ Mac ] external/wpt/css/css-text/white-space/control-chars-09F.html [ Failure ]
 
+crbug.com/1015331 external/wpt/css/css-text/white-space/eol-spaces-bidi-001.html [ Failure ]
+
 # needs implementation of test_driver_internal.action_sequence
 crbug.com/893480 external/wpt/infrastructure/testdriver/actions/elementTiming.html [ Timeout ]
 crbug.com/893480 external/wpt/infrastructure/testdriver/actions/multiDevice.html [ Failure Timeout ]
@@ -2638,13 +2640,18 @@
 crbug.com/1012627 [ Win7 ] external/wpt/css/css-text/line-breaking/line-breaking-021.html [ Failure ]
 
 # ====== New tests from wpt-importer added here ======
+crbug.com/626703 [ Linux ] external/wpt/fetch/corb/script-resource-with-nonsniffable-types.tentative.sub.html [ Timeout ]
+crbug.com/626703 [ Mac ] external/wpt/fetch/corb/script-resource-with-nonsniffable-types.tentative.sub.html [ Timeout ]
+crbug.com/626703 [ Win ] external/wpt/fetch/corb/script-resource-with-nonsniffable-types.tentative.sub.html [ Timeout ]
+crbug.com/626703 [ Linux ] virtual/omt-worker-fetch/external/wpt/fetch/corb/script-resource-with-nonsniffable-types.tentative.sub.html [ Timeout ]
+crbug.com/626703 [ Mac ] virtual/omt-worker-fetch/external/wpt/fetch/corb/script-resource-with-nonsniffable-types.tentative.sub.html [ Timeout ]
+crbug.com/626703 [ Win ] virtual/omt-worker-fetch/external/wpt/fetch/corb/script-resource-with-nonsniffable-types.tentative.sub.html [ Timeout ]
 crbug.com/626703 [ Linux ] external/wpt/css/css-values/attr-in-max.html [ Failure ]
 crbug.com/626703 [ Mac ] external/wpt/css/css-values/attr-in-max.html [ Failure ]
 crbug.com/626703 [ Win ] external/wpt/css/css-values/attr-in-max.html [ Failure ]
 crbug.com/626703 [ Mac10.12 ] external/wpt/html/semantics/embedded-content/media-elements/track/track-element/track-disabled.html [ Timeout ]
 crbug.com/626703 [ Win ] external/wpt/webvtt/rendering/cues-with-video/processing-model/embedded_style_media_queries.html [ Failure ]
 crbug.com/626703 [ Win ] external/wpt/webvtt/rendering/cues-with-video/processing-model/embedded_style_media_queries_resized.html [ Failure ]
-crbug.com/626703 [ Linux ] external/wpt/css/css-text/white-space/eol-spaces-bidi-001.html [ Failure ]
 crbug.com/626703 [ Linux ] external/wpt/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/location-set-and-document-open.html [ Timeout ]
 crbug.com/626703 [ Mac ] external/wpt/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/location-set-and-document-open.html [ Timeout ]
 crbug.com/626703 [ Win ] external/wpt/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/location-set-and-document-open.html [ Timeout ]
@@ -3065,9 +3072,6 @@
 crbug.com/626703 external/wpt/html/webappapis/user-prompts/newline-normalization-manual.html [ Skip ]
 crbug.com/626703 [ Mac ] external/wpt/infrastructure/testdriver/actions/pause.html [ Pass Timeout ]
 crbug.com/626703 external/wpt/infrastructure/testdriver/actions/eventOrder.html [ Timeout ]
-crbug.com/626703 external/wpt/css/css-text/writing-system/writing-system-segment-break-001.html [ Failure ]
-crbug.com/626703 external/wpt/css/css-text/writing-system/writing-system-line-break-001.html [ Failure ]
-crbug.com/626703 external/wpt/css/css-text/writing-system/writing-system-line-break-002.html [ Failure ]
 crbug.com/626703 external/wpt/css/css-text/writing-system/writing-system-text-transform-001.html [ Failure ]
 crbug.com/903383 external/wpt/css/filter-effects/css-filters-animation-combined-001.html [ Failure ]
 crbug.com/903383 external/wpt/css/filter-effects/css-filters-animation-blur.html [ Failure ]
@@ -5690,6 +5694,11 @@
 crbug.com/1013523 [ Release Linux Mac ] external/wpt/html/cross-origin-embedder-policy/require-corp.https.html [ Failure Pass ]
 crbug.com/1010472 [ Linux Mac Debug ] virtual/disable-deferred-rendering/fast/canvas/color-space/canvas-drawImage-offscreenCanvas.html [ Timeout Pass ]
 crbug.com/1010472 [ Mac Debug ] virtual/disable-deferred-rendering/fast/canvas/OffscreenCanvas-placeholder-createImageBitmap.html [ Failure Pass ]
+crbug.com/1013779 virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance.html [ Failure Pass ]
+crbug.com/1013779 [ Mac ] virtual/scalefactor200/fast/hidpi/static/data-suggestion-picker-appearance.html [ Failure Pass ]
+crbug.com/1013779 virtual/scalefactor200/fast/hidpi/static/pointerevents/pointerevent_touch-adjustment_click_target.html [ Failure Pass ]
+crbug.com/1013779 virtual/scalefactor200/fast/hidpi/static/popup-menu-appearance.html [ Failure Pass ]
+crbug.com/1013779 virtual/scalefactor200/fast/hidpi/static/validation-bubble-appearance-hidpi.html [ Failure Pass ]
 crbug.com/990900 external/wpt/cookie-store/idlharness.tentative.https.any.serviceworker.html [ Pass Timeout ]
 crbug.com/990900 virtual/omt-worker-fetch/external/wpt/fetch/api/idlharness.any.html [ Pass Timeout ]
 
@@ -5718,3 +5727,6 @@
 
 # cci-trooper 2019-10-22
 crbug.com/1016804 external/wpt/css/css-grid/layout-algorithm/grid-flex-track-intrinsic-sizes-002.html [ Pass Failure ]
+
+# Sheriff 2019-10-24
+crbug.com/1017626 [ Linux ] external/wpt/compat/idlharness.window.html [ Pass Timeout ]
diff --git a/third_party/blink/web_tests/compositing/overflow/resources/update-widget-positions-on-nested-frames-and-scrollers-inner-frame.html b/third_party/blink/web_tests/compositing/overflow/resources/update-widget-positions-on-nested-frames-and-scrollers-inner-frame.html
index 6bc0eaa..c8dfa67 100644
--- a/third_party/blink/web_tests/compositing/overflow/resources/update-widget-positions-on-nested-frames-and-scrollers-inner-frame.html
+++ b/third_party/blink/web_tests/compositing/overflow/resources/update-widget-positions-on-nested-frames-and-scrollers-inner-frame.html
@@ -17,7 +17,10 @@
         return;
 
       var select = document.getElementById('select');
-      openPicker(select, callback, function () {
+      // FIXME: it would be really nice to use getBoundingClientRect() and not
+      // hard-code pixel coordinates here, but since it's in an iframe, the
+      // coordinates are translated anyway.
+      clickToOpenPicker(50, 120, callback, function () {
           setTimeout(callback, 0);
       });
     }
@@ -44,7 +47,7 @@
           select.appendChild(option);
         }
 
-        if (x == 23) {
+        if (x == 24) {
           select.id = 'select';
         }
 
diff --git a/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_6.json b/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_6.json
index c67bfa3..ef611ad7 100644
--- a/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_6.json
+++ b/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_6.json
@@ -138982,9 +138982,6 @@
    "css/css-grid/parsing/grid-template-rows-computed-nogrid-expected.txt": [
     []
    ],
-   "css/css-grid/parsing/grid-template-rows-computed-withcontent-expected.txt": [
-    []
-   ],
    "css/css-grid/reference/display-grid-ref.html": [
     []
    ],
@@ -139654,9 +139651,6 @@
    "css/css-logical/parsing/border-inline-width-valid-expected.txt": [
     []
    ],
-   "css/css-logical/parsing/inset-block-inline-shorthand-expected.txt": [
-    []
-   ],
    "css/css-logical/parsing/inset-block-inline-valid-expected.txt": [
     []
    ],
@@ -153490,12 +153484,6 @@
    "feature-policy/reporting/usb-reporting.https.html.headers": [
     []
    ],
-   "feature-policy/reporting/vr-report-only.https.html.headers": [
-    []
-   ],
-   "feature-policy/reporting/vr-reporting.https.html.headers": [
-    []
-   ],
    "feature-policy/reporting/xr-report-only.https.html.headers": [
     []
    ],
@@ -153556,9 +153544,6 @@
    "feature-policy/resources/feature-policy-wakelock.html": [
     []
    ],
-   "feature-policy/resources/feature-policy-webvr.html": [
-    []
-   ],
    "feature-policy/resources/featurepolicy.js": [
     []
    ],
@@ -161107,6 +161092,9 @@
    "html/semantics/scripting-1/the-script-element/module/bad-module-specifier.js": [
     []
    ],
+   "html/semantics/scripting-1/the-script-element/module/charset-02-expected.txt": [
+    []
+   ],
    "html/semantics/scripting-1/the-script-element/module/choice-of-error-1a.js": [
     []
    ],
@@ -177868,24 +177856,6 @@
    "webusb/usb.serviceworker.js": [
     []
    ],
-   "webvr/META.yml": [
-    []
-   ],
-   "webvr/OWNERS": [
-    []
-   ],
-   "webvr/idlharness.https-expected.txt": [
-    []
-   ],
-   "webvr/webvr-disabled-by-feature-policy.https.sub.html.headers": [
-    []
-   ],
-   "webvr/webvr-enabled-by-feature-policy.https.sub.html.headers": [
-    []
-   ],
-   "webvr/webvr-enabled-on-self-origin-by-feature-policy.https.sub.html.headers": [
-    []
-   ],
    "webvtt/META.yml": [
     []
    ],
@@ -237307,18 +237277,6 @@
      {}
     ]
    ],
-   "feature-policy/reporting/vr-report-only.https.html": [
-    [
-     "feature-policy/reporting/vr-report-only.https.html",
-     {}
-    ]
-   ],
-   "feature-policy/reporting/vr-reporting.https.html": [
-    [
-     "feature-policy/reporting/vr-reporting.https.html",
-     {}
-    ]
-   ],
    "feature-policy/reporting/xr-report-only.https.html": [
     [
      "feature-policy/reporting/xr-report-only.https.html",
@@ -318243,48 +318201,6 @@
      {}
     ]
    ],
-   "webvr/idlharness.https.html": [
-    [
-     "webvr/idlharness.https.html",
-     {}
-    ]
-   ],
-   "webvr/webvr-disabled-by-feature-policy.https.sub.html": [
-    [
-     "webvr/webvr-disabled-by-feature-policy.https.sub.html",
-     {}
-    ]
-   ],
-   "webvr/webvr-enabled-by-feature-policy-attribute-redirect-on-load.https.sub.html": [
-    [
-     "webvr/webvr-enabled-by-feature-policy-attribute-redirect-on-load.https.sub.html",
-     {}
-    ]
-   ],
-   "webvr/webvr-enabled-by-feature-policy-attribute.https.sub.html": [
-    [
-     "webvr/webvr-enabled-by-feature-policy-attribute.https.sub.html",
-     {}
-    ]
-   ],
-   "webvr/webvr-enabled-by-feature-policy.https.sub.html": [
-    [
-     "webvr/webvr-enabled-by-feature-policy.https.sub.html",
-     {}
-    ]
-   ],
-   "webvr/webvr-enabled-on-self-origin-by-feature-policy.https.sub.html": [
-    [
-     "webvr/webvr-enabled-on-self-origin-by-feature-policy.https.sub.html",
-     {}
-    ]
-   ],
-   "webvr/webvr-supported-by-feature-policy.html": [
-    [
-     "webvr/webvr-supported-by-feature-policy.html",
-     {}
-    ]
-   ],
    "webvtt/api/VTTCue/align.html": [
     [
      "webvtt/api/VTTCue/align.html",
@@ -340958,7 +340874,7 @@
    "support"
   ],
   "contacts/contacts-select.https.window.js": [
-   "5503ea6968a8d2bd89e49a67bf0def695738d68d",
+   "617dee8b7f85a77c3d412d87f1c7dcada176749f",
    "testharness"
   ],
   "contacts/resources/helpers.js": [
@@ -383870,11 +383786,11 @@
    "testharness"
   ],
   "css/css-grid/parsing/grid-template-columns-computed-nogrid-expected.txt": [
-   "26a5800fd43cc04adfa1c27962dc94e7815cc55a",
+   "3baf75f607d4587ca38181468f6dcc0b0049d3e9",
    "support"
   ],
   "css/css-grid/parsing/grid-template-columns-computed-nogrid.html": [
-   "b95914fe3e55bebd04a77f1146279089efd5f964",
+   "11b0393a676c7f18ede6485fbb9dab7cf1d98067",
    "testharness"
   ],
   "css/css-grid/parsing/grid-template-columns-computed-withcontent.html": [
@@ -383882,7 +383798,7 @@
    "testharness"
   ],
   "css/css-grid/parsing/grid-template-columns-computed.html": [
-   "f6d0d9721c9dd8ed1c0441a9dd2e2077b71350d3",
+   "54380ef455eb9d45330e5aa50253c026f0a8fcb4",
    "testharness"
   ],
   "css/css-grid/parsing/grid-template-columns-invalid.html": [
@@ -383894,23 +383810,19 @@
    "testharness"
   ],
   "css/css-grid/parsing/grid-template-rows-computed-nogrid-expected.txt": [
-   "b2946e95984285b62f9e89121ef951d3b1eed6eb",
+   "c6ba7b0fa95c69b6c93254dcb56e1815c4cc0fbe",
    "support"
   ],
   "css/css-grid/parsing/grid-template-rows-computed-nogrid.html": [
-   "03e601acb93191cecaa73b571d5f6cd8e2a6710a",
+   "057a7fa0615fae3797939aa77c762b8335a90f2b",
    "testharness"
   ],
-  "css/css-grid/parsing/grid-template-rows-computed-withcontent-expected.txt": [
-   "27c7ad78f1b72b3d5917b6da8c8e0fdd7ba6920b",
-   "support"
-  ],
   "css/css-grid/parsing/grid-template-rows-computed-withcontent.html": [
    "693cf338c0dc42406336ccd99a605b1cf0d4f9be",
    "testharness"
   ],
   "css/css-grid/parsing/grid-template-rows-computed.html": [
-   "40722623aaa1ee805dc6e282951febb0021e2a8a",
+   "b7584e1954369cb4a98f5c3d6989bd03c8528421",
    "testharness"
   ],
   "css/css-grid/parsing/grid-template-rows-invalid.html": [
@@ -386233,12 +386145,8 @@
    "fe073f852ea38910c35ee471f54e52d1b9aca95b",
    "testharness"
   ],
-  "css/css-logical/parsing/inset-block-inline-shorthand-expected.txt": [
-   "b644542606b4cba92acd509bb3b79e3ab2bc9256",
-   "support"
-  ],
   "css/css-logical/parsing/inset-block-inline-shorthand.html": [
-   "3b2ce6c040bf2bb9a4e7a2b61ff9d76312c07255",
+   "c089c2a0d896ae1b3d3cc3ac0de60f22343f3fa7",
    "testharness"
   ],
   "css/css-logical/parsing/inset-block-inline-valid-expected.txt": [
@@ -396958,7 +396866,7 @@
    "reftest"
   ],
   "css/css-text/hyphens/hyphens-overflow-001.html": [
-   "948b728254a3a097964e3a341f8475c0c93b4340",
+   "4154e5e1181b47f39b238abb40537262fe4906dc",
    "reftest"
   ],
   "css/css-text/hyphens/hyphens-shaping-001.html": [
@@ -396986,7 +396894,7 @@
    "support"
   ],
   "css/css-text/hyphens/reference/hyphens-overflow-001-ref.html": [
-   "08d521d33960ea5d495de39ce9bb2be5fc5c29a0",
+   "db002ce45d84a89ba9692e8e6d3c97a5227fc64f",
    "support"
   ],
   "css/css-text/hyphens/reference/hyphens-shaping-001-ref.html": [
@@ -420782,7 +420690,7 @@
    "support"
   ],
   "css/css-writing-modes/wm-propagation-001.html": [
-   "f552265d0d0b32593f18df806929d86a368ee81b",
+   "a86d32f3ed5e8f7aa637d83f6db6c46ac2c8f93b",
    "reftest"
   ],
   "css/css-writing-modes/wm-propagation-002-ref.html": [
@@ -438437,22 +438345,6 @@
    "4fd1e269362c43d282ca8e3c5c35a5d648f0666b",
    "support"
   ],
-  "feature-policy/reporting/vr-report-only.https.html": [
-   "b64a2015f7cd46ecc90641e08c552441532088f1",
-   "testharness"
-  ],
-  "feature-policy/reporting/vr-report-only.https.html.headers": [
-   "0761021f45e141f35ce104e5cefe81f9704ccb7a",
-   "support"
-  ],
-  "feature-policy/reporting/vr-reporting.https.html": [
-   "42a2e7371ecf9c5c1a7fe5532bb24e13d6863064",
-   "testharness"
-  ],
-  "feature-policy/reporting/vr-reporting.https.html.headers": [
-   "d021af75636de273c868412cd98dfff50576151d",
-   "support"
-  ],
   "feature-policy/reporting/xr-report-only.https.html": [
    "872db22849545c174b385543e4e12747574a34af",
    "testharness"
@@ -438541,10 +438433,6 @@
    "fac421c09fa2274a8de5f3b914a27fd15f3aaba3",
    "support"
   ],
-  "feature-policy/resources/feature-policy-webvr.html": [
-   "64a152bf1ce784099562d9dfc11683b0b0d227e4",
-   "support"
-  ],
   "feature-policy/resources/featurepolicy.js": [
    "9aba0ab8c675352301802f2386f07470585d7e97",
    "support"
@@ -458525,6 +458413,10 @@
    "7cd49163097cd5ac6cb426319e037b86ecca5bd0",
    "testharness"
   ],
+  "html/semantics/scripting-1/the-script-element/module/charset-02-expected.txt": [
+   "8060f6ef1d6e06d983a2f6395499280dc3ebfae6",
+   "support"
+  ],
   "html/semantics/scripting-1/the-script-element/module/charset-02.html": [
    "c7c4517ad3ac8cb73937eb09245b0d8c17081215",
    "testharness"
@@ -493090,7 +492982,7 @@
    "support"
   ],
   "resources/chromium/contacts_manager_mock.js": [
-   "ae4c33b073dfd2b156030b2cb6d045e133b57c23",
+   "8e7c9eef38e39e39652075e757bcc8bf521c4039",
    "support"
   ],
   "resources/chromium/device.mojom.js": [
@@ -493274,7 +493166,7 @@
    "support"
   ],
   "resources/testharness.js": [
-   "0b06791fa8f94973a2431e93d59e7c8dadef0d93",
+   "9f7426b7d36a093806790fc35aad28e29ff34e06",
    "support"
   ],
   "resources/testharness.js.headers": [
@@ -512258,7 +512150,7 @@
    "support"
   ],
   "web-animations/animation-model/animation-types/accumulation-per-property-expected.txt": [
-   "7b2bd8e27b4223b0369ca8873b14c1e0f0378c20",
+   "f12ce9d0ab4f98ea6c53446edd8e7fcc4406d271",
    "support"
   ],
   "web-animations/animation-model/animation-types/accumulation-per-property.html": [
@@ -518269,58 +518161,6 @@
    "f880a43ea1c590e24724408565245946ebef519e",
    "testharness"
   ],
-  "webvr/META.yml": [
-   "b50e559457d19d8d43f51804ca35cc366a830a7f",
-   "support"
-  ],
-  "webvr/OWNERS": [
-   "f514e5d4ad1ed270e59f47b81d35b465c402d75c",
-   "support"
-  ],
-  "webvr/idlharness.https-expected.txt": [
-   "abb45a2ef60268ae2b7451d2a5680863e9242a90",
-   "support"
-  ],
-  "webvr/idlharness.https.html": [
-   "2a89c575cef57bbf7072b60881c7ab0d7a73d8cd",
-   "testharness"
-  ],
-  "webvr/webvr-disabled-by-feature-policy.https.sub.html": [
-   "567499cefadb2c3f64acc6cd6f17a0b799743f69",
-   "testharness"
-  ],
-  "webvr/webvr-disabled-by-feature-policy.https.sub.html.headers": [
-   "d021af75636de273c868412cd98dfff50576151d",
-   "support"
-  ],
-  "webvr/webvr-enabled-by-feature-policy-attribute-redirect-on-load.https.sub.html": [
-   "da01dafd1c178dfd8105480ef08b55a3d49db40a",
-   "testharness"
-  ],
-  "webvr/webvr-enabled-by-feature-policy-attribute.https.sub.html": [
-   "d715f9021380496d57f9f0f88bda5e9bd637ebf2",
-   "testharness"
-  ],
-  "webvr/webvr-enabled-by-feature-policy.https.sub.html": [
-   "ee0256684f9b19241f98caad7e204e23658c56ec",
-   "testharness"
-  ],
-  "webvr/webvr-enabled-by-feature-policy.https.sub.html.headers": [
-   "e7427ee8c7e0482e618109c52f309e7765088916",
-   "support"
-  ],
-  "webvr/webvr-enabled-on-self-origin-by-feature-policy.https.sub.html": [
-   "bd7e82f606828a0420c85045505bc796a6521f5d",
-   "testharness"
-  ],
-  "webvr/webvr-enabled-on-self-origin-by-feature-policy.https.sub.html.headers": [
-   "87d343d8f84d20d9b4cc12669318d6d2c3f9ae47",
-   "support"
-  ],
-  "webvr/webvr-supported-by-feature-policy.html": [
-   "416e286c04cbeb9581903d96a18b0662c3357cf9",
-   "testharness"
-  ],
   "webvtt/META.yml": [
    "949f312d7acc3444b3c116a55d1175dd12be33ca",
    "support"
diff --git a/third_party/blink/web_tests/external/wpt/css/css-text/hyphens/hyphens-overflow-001.html b/third_party/blink/web_tests/external/wpt/css/css-text/hyphens/hyphens-overflow-001.html
index 948b728..4154e5e1 100644
--- a/third_party/blink/web_tests/external/wpt/css/css-text/hyphens/hyphens-overflow-001.html
+++ b/third_party/blink/web_tests/external/wpt/css/css-text/hyphens/hyphens-overflow-001.html
@@ -9,6 +9,7 @@
   font-size: 10px;
   font-family: Ahem;
   width: 5.1ch;
+  border: 1px solid blue;
 }
 </style>
 <body>
@@ -18,4 +19,7 @@
   <div>1234&shy;xx</div>
   <div>12345&shy;xx</div>
   <div>123456&shy;xx</div>
+
+  <div style="width: 10ch"><span>ren&shy;for&shy;cer</span>99999</div>
+  <div><span>00&shy;1</span>222</div>
 </body>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-text/hyphens/reference/hyphens-overflow-001-ref.html b/third_party/blink/web_tests/external/wpt/css/css-text/hyphens/reference/hyphens-overflow-001-ref.html
index 08d521d3..db002ce4 100644
--- a/third_party/blink/web_tests/external/wpt/css/css-text/hyphens/reference/hyphens-overflow-001-ref.html
+++ b/third_party/blink/web_tests/external/wpt/css/css-text/hyphens/reference/hyphens-overflow-001-ref.html
@@ -4,6 +4,8 @@
 div {
   font-size: 10px;
   font-family: Ahem;
+  width: 5.1ch;
+  border: 1px solid blue;
 }
 </style>
 <body>
@@ -13,4 +15,7 @@
   <div>1234-<br>xx</div>
   <div>12345-<br>xx</div>
   <div>123456-<br>xx</div>
+
+  <div style="width: 10ch">renfor-<br>cer99999</div>
+  <div>00-<br>1222</div>
 </body>
diff --git a/third_party/blink/web_tests/external/wpt/html/semantics/scripting-1/the-script-element/module/charset-02-expected.txt b/third_party/blink/web_tests/external/wpt/html/semantics/scripting-1/the-script-element/module/charset-02-expected.txt
new file mode 100644
index 0000000..8060f6ef
--- /dev/null
+++ b/third_party/blink/web_tests/external/wpt/html/semantics/scripting-1/the-script-element/module/charset-02-expected.txt
@@ -0,0 +1,6 @@
+This is a testharness.js-based test.
+FAIL UTF-8 module script with UTF-8 BOM assert_equals: Should be decoded as UTF-8 expected (string) "三村かな子" but got (undefined) undefined
+PASS UTF-16 module script with UTF-16BE BOM
+PASS UTF-16 module script with UTF-16LE BOM
+Harness: the test ran to completion.
+
diff --git a/third_party/blink/web_tests/external/wpt/resources/testharness.js b/third_party/blink/web_tests/external/wpt/resources/testharness.js
index 0b06791f..9f7426b 100644
--- a/third_party/blink/web_tests/external/wpt/resources/testharness.js
+++ b/third_party/blink/web_tests/external/wpt/resources/testharness.js
@@ -3682,7 +3682,14 @@
                 tests.status.message = message;
                 tests.status.stack = stack;
             }
-            done();
+
+            // Do not transition to the "complete" phase if the test has been
+            // configured to allow uncaught exceptions. This gives the test an
+            // opportunity to define subtests based on the exception reporting
+            // behavior.
+            if (!tests.allow_uncaught_exception) {
+                done();
+            }
         };
 
         addEventListener("error", function(e) {
diff --git a/third_party/blink/web_tests/fast/forms/resources/picker-common.js b/third_party/blink/web_tests/fast/forms/resources/picker-common.js
index 9b95148..8db456d 100644
--- a/third_party/blink/web_tests/fast/forms/resources/picker-common.js
+++ b/third_party/blink/web_tests/fast/forms/resources/picker-common.js
@@ -45,8 +45,17 @@
             eventSender.keyDown("ArrowDown", ["altKey"]);
         }
     }
-    // To avoid flakiness of test about focused status of the element.
-    element.focus();
+    popupWindow = internals.pagePopupWindow;
+    if (typeof callback === "function" && popupWindow)
+        setPopupOpenCallback(callback);
+    else if (typeof errorCallback === "function" && !popupWindow)
+        errorCallback();
+}
+
+function clickToOpenPicker(x, y, callback, errorCallback) {
+    eventSender.mouseMoveTo(x, y);
+    eventSender.mouseDown();
+    eventSender.mouseUp();
     popupWindow = internals.pagePopupWindow;
     if (typeof callback === "function" && popupWindow)
         setPopupOpenCallback(callback);
diff --git a/third_party/blink/web_tests/fast/hidpi/static/validation-bubble-appearance-hidpi.html b/third_party/blink/web_tests/fast/hidpi/static/validation-bubble-appearance-hidpi.html
index 208db74..03d3e9a 100644
--- a/third_party/blink/web_tests/fast/hidpi/static/validation-bubble-appearance-hidpi.html
+++ b/third_party/blink/web_tests/fast/hidpi/static/validation-bubble-appearance-hidpi.html
@@ -2,12 +2,10 @@
 <body>
 <div style="width:100%; height:4em; overflow:scroll">
 <div style="position:relative; left:90%; top:1000px; width:100%; font-family:system-ui; font-size:16px">
-Font-size in the validation bubble should be same as this paragraph.<input id=checkbox type=checkbox required>
+Font-size in the validation bubble should be same as this paragraph.<input type=checkbox required>
 </div>
 </div>
 <script>
-checkbox.reportValidity();
-// To avoid flakiness of test about focused status of the element.
-checkbox.focus();
+document.querySelector('input').reportValidity();
 </script>
 </body>
diff --git a/third_party/blink/web_tests/http/tests/mojo/bindings-lite-old-names.html b/third_party/blink/web_tests/http/tests/mojo/bindings-lite-old-names.html
deleted file mode 100644
index 205ce28..0000000
--- a/third_party/blink/web_tests/http/tests/mojo/bindings-lite-old-names.html
+++ /dev/null
@@ -1,209 +0,0 @@
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/gen/layout_test_data/mojo/public/js/mojo_bindings_lite.js"></script>
-<script src="/gen/content/test/data/lite_js_old_names_test.mojom-lite.js"></script>
-<script>
-'use strict';
-
-const kTestMessage = 'hello there';
-const kTestNumbers = [0, 1, 1, 2, 3, 5, 8, 13, 21];
-
-class TargetImpl {
-  constructor() {
-    this.numPokes = 0;
-    this.target = new liteJsOldNamesTest.mojom.TestMessageTarget(this);
-  }
-
-  poke() { this.numPokes++; }
-  ping() { return Promise.resolve(); }
-  repeat(message, numbers) { return {message: message, numbers: numbers}; }
-  flatten(values) {}
-  flattenUnions(unions) {}
-  requestSubinterface(request, client) {}
-}
-
-promise_test(() => {
-  let impl = new TargetImpl;
-  let proxy = impl.target.$.createProxy();
-  proxy.poke();
-  return proxy.ping().then(() => {
-    assert_equals(impl.numPokes, 1);
-  });
-}, 'messages with replies return Promises that resolve on reply received');
-
-promise_test(() => {
-  let impl = new TargetImpl;
-  let proxy = impl.target.$.createProxy();
-  return proxy.repeat(kTestMessage, kTestNumbers)
-              .then(reply => {
-                assert_equals(reply.message, kTestMessage);
-                assert_array_equals(reply.numbers, kTestNumbers);
-              });
-}, 'implementations can reply with multiple reply arguments');
-
-promise_test(async (t) => {
-  const impl = new TargetImpl;
-  const proxy = impl.target.$.createProxy();
-
-  await proxy.ping();
-  proxy.$.close();
-
-  await promise_rejects(t, new Error(), proxy.ping());
-}, 'after the pipe is closed all future calls should fail');
-
-promise_test(async (t) => {
-  const impl = new TargetImpl;
-  const proxy = impl.target.$.createProxy();
-
-  // None of these promises should successfully resolve because we are
-  // immediately closing the pipe.
-  const promises = []
-  for (let i = 0; i < 10; i++) {
-    promises.push(proxy.ping());
-  }
-
-  proxy.$.close();
-
-  for (const promise of promises) {
-    await promise_rejects(t, new Error(), promise);
-  }
-}, 'closing the pipe drops any pending messages');
-
-promise_test(() => {
-  let impl = new TargetImpl;
-
-  // Intercept any browser-bound request for TestMessageTarget and bind it
-  // instead to the local |impl| object.
-  let interceptor = new MojoInterfaceInterceptor(
-    liteJsOldNamesTest.mojom.TestMessageTarget.$interfaceName);
-  interceptor.oninterfacerequest = e => {
-    impl.target.$.bindHandle(e.handle);
-  }
-  interceptor.start();
-
-  let proxy = liteJsOldNamesTest.mojom.TestMessageTarget.getProxy();
-  proxy.poke();
-
-  return proxy.ping().then(() => {
-    assert_equals(impl.numPokes, 1);
-  });
-}, 'getProxy() attempts to send requests to the frame host');
-
-promise_test(() => {
-  let router = new liteJsOldNamesTest.mojom.TestMessageTargetCallbackRouter;
-  let proxy = router.$.createProxy();
-  return new Promise(resolve => {
-    router.poke.addListener(resolve);
-    proxy.poke();
-  });
-}, 'basic generated CallbackRouter behavior works as intended');
-
-promise_test(() => {
-  let router = new liteJsOldNamesTest.mojom.TestMessageTargetCallbackRouter;
-  let proxy = router.$.createProxy();
-  let numPokes = 0;
-  router.poke.addListener(() => ++numPokes);
-  router.ping.addListener(() => Promise.resolve());
-  proxy.poke();
-  return proxy.ping().then(() => assert_equals(numPokes, 1));
-}, 'CallbackRouter listeners can reply to messages');
-
-promise_test(() => {
-  let router = new liteJsOldNamesTest.mojom.TestMessageTargetCallbackRouter;
-  let proxy = router.$.createProxy();
-  router.repeat.addListener(
-    (message, numbers) => ({message: message, numbers: numbers}));
-  return proxy.repeat(kTestMessage, kTestNumbers)
-              .then(reply => {
-                assert_equals(reply.message, kTestMessage);
-                assert_array_equals(reply.numbers, kTestNumbers);
-              });
-}, 'CallbackRouter listeners can reply with multiple reply arguments');
-
-promise_test(() => {
-  let targetRouter = new liteJsOldNamesTest.mojom.TestMessageTargetCallbackRouter;
-  let targetProxy = targetRouter.$.createProxy();
-  let subinterfaceRouter = new liteJsOldNamesTest.mojom.SubinterfaceCallbackRouter;
-  targetRouter.requestSubinterface.addListener((request, client) => {
-    let values = [];
-    subinterfaceRouter.$.bindHandle(request.handle);
-    subinterfaceRouter.push.addListener(value => values.push(value));
-    subinterfaceRouter.flush.addListener(() => {
-      client.didFlush(values);
-      values = [];
-    });
-  });
-
-  let clientRouter = new liteJsOldNamesTest.mojom.SubinterfaceClientCallbackRouter;
-  let subinterfaceProxy = new liteJsOldNamesTest.mojom.SubinterfaceProxy;
-  targetProxy.requestSubinterface(
-    subinterfaceProxy.$.createRequest(), clientRouter.$.createProxy());
-  return new Promise(resolve => {
-    clientRouter.didFlush.addListener(values => {
-      assert_array_equals(values, kTestNumbers);
-      resolve();
-    });
-
-    kTestNumbers.forEach(n => subinterfaceProxy.push(n));
-    subinterfaceProxy.flush();
-  });
-}, 'can send and receive interface requests and proxies');
-
-promise_test(() => {
-  const targetRouter = new liteJsOldNamesTest.mojom.TestMessageTargetCallbackRouter;
-  const targetProxy = targetRouter.$.createProxy();
-  targetRouter.flatten.addListener(values => ({values: values.map(v => v.x)}));
-  return targetProxy.flatten([{x: 1}, {x: 2}, {x: 3}]).then(reply => {
-    assert_array_equals(reply.values, [1, 2, 3]);
-  });
-}, 'regression test for complex array serialization');
-
-promise_test(() => {
-  const targetRouter = new liteJsOldNamesTest.mojom.TestMessageTargetCallbackRouter;
-  const targetProxy = targetRouter.$.createProxy();
-  targetRouter.flattenUnions.addListener(unions => {
-    return {x: unions.filter(u => u.x !== undefined).map(u => u.x),
-            s: unions.filter(u => u.s !== undefined).map(u => u.s.x)};
-  });
-
-  return targetProxy.flattenUnions(
-    [{x: 1}, {x: 2}, {s: {x: 3}}, {s: {x: 4}}, {x: 5}, {s: {x: 6}}])
-                    .then(reply => {
-                      assert_array_equals(reply.x, [1, 2, 5]);
-                      assert_array_equals(reply.s, [3, 4, 6]);
-                    });
-}, 'can serialize and deserialize unions');
-
-promise_test(() => {
-  let impl = new TargetImpl;
-  let proxy = impl.target.$.createProxy();
-
-  // Poke a bunch of times. These should never race with the assertion below,
-  // because the |flushForTesting| request/response is ordered against other
-  // messages on |proxy|.
-  const kNumPokes = 100;
-  for (let i = 0; i < kNumPokes; ++i)
-    proxy.poke();
-  return proxy.$.flushForTesting().then(() => {
-    assert_equals(impl.numPokes, kNumPokes);
-  });
-}, 'can use generated flushForTesting API for synchronization in tests');
-
-promise_test(async(t) => {
-  const impl = new TargetImpl;
-  const proxy = impl.target.$.createProxy();
-  const disconnectPromise = new Promise(resolve => impl.target.onConnectionError.addListener(resolve));
-  proxy.$.close();
-  return disconnectPromise;
-}, 'InterfaceTarget connection error handler runs when set on an Interface object');
-
-promise_test(() => {
-  const router = new liteJsOldNamesTest.mojom.TestMessageTargetCallbackRouter;
-  const proxy = router.$.createProxy();
-  const disconnectPromise = new Promise(resolve => router.onConnectionError.addListener(resolve));
-  proxy.$.close();
-  return disconnectPromise;
-}, 'InterfaceTarget connection error handler runs when set on an InterfaceCallbackRouter object');
-
-</script>
diff --git a/third_party/blink/web_tests/http/tests/origin_trials/webexposed/resources/sync-xhr-in-page-dismissal.html b/third_party/blink/web_tests/http/tests/origin_trials/webexposed/resources/sync-xhr-in-page-dismissal.html
new file mode 100644
index 0000000..e298420
--- /dev/null
+++ b/third_party/blink/web_tests/http/tests/origin_trials/webexposed/resources/sync-xhr-in-page-dismissal.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<!--- Generate token with the command:
+tools/origin_trials/generate_token.py http://127.0.0.1:8000 AllowSyncXHRInPageDismissal --expire-timestamp=2000000000
+- --->
+<meta http-equiv="origin-trial" content="AqLbn6J2A0k+teF1WJA9pid0csRR356z7Gcnoq7hfegRNL3A5sf/FNTSgitsYD+bTG1q1iFshX9QvbT/yKJUoAkAAABjeyJvcmlnaW4iOiAiaHR0cDovLzEyNy4wLjAuMTo4MDAwIiwgImZlYXR1cmUiOiAiQWxsb3dTeW5jWEhSSW5QYWdlRGlzbWlzc2FsIiwgImV4cGlyeSI6IDIwMDAwMDAwMDB9">
+<head>
+<script>
+addEventListener("unload", function() {
+  try {
+    var xhr = new XMLHttpRequest();
+    xhr.open('GET', '', false);
+    xhr.send(null);
+    parent.xhr_fired = true;
+  } catch (e) {
+    parent.xhr_fired = false;
+  }
+  parent.start_test();
+});
+</script>
+</head>
+<body>
+</body>
+</html>
diff --git a/third_party/blink/web_tests/http/tests/origin_trials/webexposed/sync-xhr-in-page-dismissal.html b/third_party/blink/web_tests/http/tests/origin_trials/webexposed/sync-xhr-in-page-dismissal.html
new file mode 100644
index 0000000..a20dd0a2
--- /dev/null
+++ b/third_party/blink/web_tests/http/tests/origin_trials/webexposed/sync-xhr-in-page-dismissal.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<body>
+<title>Test behavior of sync XHR during unload</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+var t = async_test();
+var xhr_fired = false;
+
+function start_test() {
+  step_timeout(t.step_func(function() {
+    assert_true(xhr_fired);
+    t.done();
+  }), 1000);
+}
+
+onload = function() {
+  setTimeout(function() {
+    var iframe = document.getElementById("ifr")
+    iframe.src = "about:blank";
+  }, 100)
+}
+</script>
+<iframe id="ifr" name="ifr" src="resources/sync-xhr-in-page-dismissal.html"></iframe>
+</body>
+</html>
diff --git a/third_party/blink/web_tests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt b/third_party/blink/web_tests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
index ead7975..c767408d 100644
--- a/third_party/blink/web_tests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
+++ b/third_party/blink/web_tests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
@@ -1219,9 +1219,6 @@
     getter applicationServerKey
     getter userVisibleOnly
     method constructor
-interface QuicTransport
-    attribute @@toStringTag
-    method constructor
 interface ReadableStream
     attribute @@toStringTag
     getter locked
diff --git a/third_party/blink/web_tests/platform/linux/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers-expected.png b/third_party/blink/web_tests/platform/linux/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers-expected.png
index 2cf57b2..459948dd 100644
--- a/third_party/blink/web_tests/platform/linux/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers-expected.png
+++ b/third_party/blink/web_tests/platform/linux/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/virtual/prefer_compositing_to_lcd_text/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers-expected.png b/third_party/blink/web_tests/platform/linux/virtual/prefer_compositing_to_lcd_text/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers-expected.png
index 2cf57b2..459948dd 100644
--- a/third_party/blink/web_tests/platform/linux/virtual/prefer_compositing_to_lcd_text/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers-expected.png
+++ b/third_party/blink/web_tests/platform/linux/virtual/prefer_compositing_to_lcd_text/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.10/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers-expected.png b/third_party/blink/web_tests/platform/mac-mac10.10/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers-expected.png
index 1f98884..d7a3577 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.10/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.10/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.10/virtual/prefer_compositing_to_lcd_text/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers-expected.png b/third_party/blink/web_tests/platform/mac-mac10.10/virtual/prefer_compositing_to_lcd_text/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers-expected.png
index 1f98884..d7a3577 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.10/virtual/prefer_compositing_to_lcd_text/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.10/virtual/prefer_compositing_to_lcd_text/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.11/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers-expected.png b/third_party/blink/web_tests/platform/mac-mac10.11/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers-expected.png
index 21bdc04..2d26010 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.11/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.11/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.11/virtual/prefer_compositing_to_lcd_text/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers-expected.png b/third_party/blink/web_tests/platform/mac-mac10.11/virtual/prefer_compositing_to_lcd_text/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers-expected.png
index 21bdc04..2d26010 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.11/virtual/prefer_compositing_to_lcd_text/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.11/virtual/prefer_compositing_to_lcd_text/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.11/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png b/third_party/blink/web_tests/platform/mac-mac10.11/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png
index c6dbf9a..6ddedb9 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.11/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.11/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.11/virtual/scalefactor200/fast/hidpi/static/data-suggestion-picker-appearance-expected.png b/third_party/blink/web_tests/platform/mac-mac10.11/virtual/scalefactor200/fast/hidpi/static/data-suggestion-picker-appearance-expected.png
index f343a9b..2c84db24 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.11/virtual/scalefactor200/fast/hidpi/static/data-suggestion-picker-appearance-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.11/virtual/scalefactor200/fast/hidpi/static/data-suggestion-picker-appearance-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers-expected.png
index 44d141d..40840209 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.12/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.12/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/virtual/prefer_compositing_to_lcd_text/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/virtual/prefer_compositing_to_lcd_text/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers-expected.png
index 44d141d..40840209 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.12/virtual/prefer_compositing_to_lcd_text/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.12/virtual/prefer_compositing_to_lcd_text/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers-expected.png b/third_party/blink/web_tests/platform/mac/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers-expected.png
index c066138a..532a1a4c 100644
--- a/third_party/blink/web_tests/platform/mac/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers-expected.png
+++ b/third_party/blink/web_tests/platform/mac/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/virtual/scalefactor200/fast/hidpi/static/validation-bubble-appearance-hidpi-expected.png b/third_party/blink/web_tests/platform/win/virtual/scalefactor200/fast/hidpi/static/validation-bubble-appearance-hidpi-expected.png
index c4beace..368a0bfe 100644
--- a/third_party/blink/web_tests/platform/win/virtual/scalefactor200/fast/hidpi/static/validation-bubble-appearance-hidpi-expected.png
+++ b/third_party/blink/web_tests/platform/win/virtual/scalefactor200/fast/hidpi/static/validation-bubble-appearance-hidpi-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/printing/frameset-expected.html b/third_party/blink/web_tests/printing/frameset-expected.html
new file mode 100644
index 0000000..1859d7a
--- /dev/null
+++ b/third_party/blink/web_tests/printing/frameset-expected.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<script>
+    if (window.testRunner)
+        testRunner.setPrinting();
+</script>
+PASS
diff --git a/third_party/blink/web_tests/printing/frameset.html b/third_party/blink/web_tests/printing/frameset.html
new file mode 100644
index 0000000..a26dddd9
--- /dev/null
+++ b/third_party/blink/web_tests/printing/frameset.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<script>
+    if (window.testRunner)
+        testRunner.setPrinting();
+</script>
+<frameset>
+  <frame src="resources/pass.html"></frame>
+</frameset>
diff --git a/third_party/blink/web_tests/printing/resources/pass.html b/third_party/blink/web_tests/printing/resources/pass.html
new file mode 100644
index 0000000..0c3be40
--- /dev/null
+++ b/third_party/blink/web_tests/printing/resources/pass.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+PASS
diff --git a/third_party/blink/web_tests/webexposed/global-interface-listing-dedicated-worker-expected.txt b/third_party/blink/web_tests/webexposed/global-interface-listing-dedicated-worker-expected.txt
index aeda26e..3e128bf 100644
--- a/third_party/blink/web_tests/webexposed/global-interface-listing-dedicated-worker-expected.txt
+++ b/third_party/blink/web_tests/webexposed/global-interface-listing-dedicated-worker-expected.txt
@@ -1154,9 +1154,6 @@
 [Worker]     getter applicationServerKey
 [Worker]     getter userVisibleOnly
 [Worker]     method constructor
-[Worker] interface QuicTransport
-[Worker]     attribute @@toStringTag
-[Worker]     method constructor
 [Worker] interface ReadableStream
 [Worker]     attribute @@toStringTag
 [Worker]     getter locked
diff --git a/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt b/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt
index 80325d9..1ea59d7 100644
--- a/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt
+++ b/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt
@@ -5955,9 +5955,6 @@
     getter applicationServerKey
     getter userVisibleOnly
     method constructor
-interface QuicTransport
-    attribute @@toStringTag
-    method constructor
 interface RTCCertificate
     attribute @@toStringTag
     getter expires
diff --git a/third_party/blink/web_tests/webexposed/global-interface-listing-shared-worker-expected.txt b/third_party/blink/web_tests/webexposed/global-interface-listing-shared-worker-expected.txt
index 83990e1..647debe 100644
--- a/third_party/blink/web_tests/webexposed/global-interface-listing-shared-worker-expected.txt
+++ b/third_party/blink/web_tests/webexposed/global-interface-listing-shared-worker-expected.txt
@@ -1136,9 +1136,6 @@
 [Worker]     getter applicationServerKey
 [Worker]     getter userVisibleOnly
 [Worker]     method constructor
-[Worker] interface QuicTransport
-[Worker]     attribute @@toStringTag
-[Worker]     method constructor
 [Worker] interface ReadableStream
 [Worker]     attribute @@toStringTag
 [Worker]     getter locked
diff --git a/tools/clang/scripts/package.py b/tools/clang/scripts/package.py
index 5d7c1f9..f5fde44d8 100755
--- a/tools/clang/scripts/package.py
+++ b/tools/clang/scripts/package.py
@@ -487,6 +487,25 @@
             filter=PrintTarProgress)
   MaybeUpload(args.upload, translation_unit_dir + '.tgz', platform)
 
+  # Zip up the libclang binaries.
+  libclang_dir = 'libclang-' + stamp
+  shutil.rmtree(libclang_dir, ignore_errors=True)
+  os.makedirs(os.path.join(libclang_dir, 'bin'))
+  os.makedirs(os.path.join(libclang_dir, 'bindings', 'python', 'clang'))
+  if sys.platform == 'win32':
+    shutil.copy(os.path.join(LLVM_RELEASE_DIR, 'bin', 'libclang.dll'),
+                os.path.join(libclang_dir, 'bin'))
+  for filename in ['__init__.py', 'cindex.py', 'enumerations.py']:
+    shutil.copy(os.path.join(LLVM_DIR, 'clang', 'bindings', 'python', 'clang',
+                             filename),
+                os.path.join(libclang_dir, 'bindings', 'python', 'clang'))
+  tar_entries = ['bin', 'bindings' ]
+  with tarfile.open(libclang_dir + '.tgz', 'w:gz') as tar:
+    for entry in tar_entries:
+      tar.add(os.path.join(libclang_dir, entry), arcname=entry,
+              filter=PrintTarProgress)
+  MaybeUpload(args.upload, libclang_dir + '.tgz', platform)
+
   if sys.platform == 'win32' and args.upload:
     UploadPDBToSymbolServer()
 
diff --git a/tools/mb/mb.py b/tools/mb/mb.py
index 88bb871c1..a063b4a 100755
--- a/tools/mb/mb.py
+++ b/tools/mb/mb.py
@@ -494,9 +494,9 @@
       ('infra/tools/luci/logdog/butler/${platform}',
        'git_revision:e1abc57be62d198b5c2f487bfb2fa2d2eb0e867c'),
       ('infra/tools/luci/vpython-native/${platform}',
-       'git_revision:98a268c6432f18aedd55d62b9621765316dc2a16'),
+       'git_revision:e317c7d2c17d4c3460ee37524dfce4e1dee4306a'),
       ('infra/tools/luci/vpython/${platform}',
-       'git_revision:98a268c6432f18aedd55d62b9621765316dc2a16'),
+       'git_revision:e317c7d2c17d4c3460ee37524dfce4e1dee4306a'),
     ]
     for pkg, vers in cipd_packages:
       cmd.append('--cipd-package=.swarming_module:%s:%s' % (pkg, vers))
@@ -1358,6 +1358,7 @@
     msan = 'is_msan=true' in vals['gn_args']
     tsan = 'is_tsan=true' in vals['gn_args']
     cfi_diag = 'use_cfi_diag=true' in vals['gn_args']
+    clang_coverage = 'use_clang_coverage=true' in vals['gn_args']
     java_coverage = 'use_jacoco_coverage=true' in vals['gn_args']
 
     test_type = isolate_map[target]['type']
@@ -1405,7 +1406,7 @@
           '--target', target,
           '--logdog-bin-cmd', '../../bin/logdog_butler',
           '--store-tombstones']
-      if java_coverage:
+      if clang_coverage or java_coverage:
         cmdline += ['--coverage-dir', '${ISOLATED_OUTDIR}']
     elif is_fuchsia and test_type != 'script':
       cmdline += [
diff --git a/tools/mb/mb_config.pyl b/tools/mb/mb_config.pyl
index 58456e784..820a17d 100644
--- a/tools/mb/mb_config.pyl
+++ b/tools/mb/mb_config.pyl
@@ -1095,7 +1095,7 @@
     ],
 
     'android_debug_trybot_java_coverage': [
-      'android', 'debug_trybot', 'java_coverage', 'strip_debug_info',
+      'android', 'debug_trybot', 'use_java_coverage', 'strip_debug_info',
     ],
 
     'android_incremental_debug_bot': [
@@ -1114,7 +1114,7 @@
 
     'android_release_bot_minimal_symbols_arm64_coverage': [
       'android', 'release_bot', 'minimal_symbols', 'arm64',
-      'strip_debug_info', 'java_coverage',
+      'strip_debug_info', 'use_java_coverage',
     ],
 
     'android_release_bot_minimal_symbols_arm64_webview_google': [
@@ -1417,6 +1417,10 @@
       'clang_tot', 'tsan', 'release',
     ],
 
+    'clang_tot_win_release_cross': [
+      'clang_tot', 'win_cross', 'minimal_symbols', 'shared', 'release', 'dcheck_always_on',
+    ],
+
     'closure_compilation': [
       # The closure bots run their own recipe and shouldn't go through MB.
       'error',
@@ -1513,18 +1517,6 @@
       'debug_bot', 'x86', 'no_com_init_hooks', 'chrome_with_codecs'
     ],
 
-    'libfuzzer_asan_debug_bot_v8_arm64': [
-      'libfuzzer', 'asan', 'debug_bot', 'shared', 'chromeos_codecs', 'pdf_xfa', 'disable_nacl', 'optimize_for_fuzzing', 'v8_simulate_arm64', 'disable_seed_corpus',
-    ],
-
-    'libfuzzer_asan_debug_bot_x86': [
-      'libfuzzer', 'asan', 'debug_bot', 'shared', 'chromeos_codecs', 'pdf_xfa', 'disable_nacl', 'optimize_for_fuzzing', 'x86', 'x86_host',  'disable_seed_corpus',
-    ],
-
-    'libfuzzer_asan_debug_bot_x86_v8_arm': [
-      'libfuzzer', 'asan', 'debug_bot', 'shared', 'chromeos_codecs', 'pdf_xfa', 'disable_nacl', 'optimize_for_fuzzing', 'x86_host', 'v8_simulate_arm',  'disable_seed_corpus',
-    ],
-
     'debug_trybot': [
       'debug_trybot',
     ],
@@ -1612,7 +1604,7 @@
 
     'gpu_tests_android_release_trybot_arm64_resource_whitelisting_java_coverage': [
       'android', 'release_trybot', 'arm64', 'static_angle', 'resource_whitelisting',
-      'java_coverage', 'partial_code_coverage_instrumentation',
+      'use_java_coverage', 'partial_code_coverage_instrumentation',
     ],
 
     'gpu_tests_android_vulkan_release_trybot': [
@@ -1711,6 +1703,18 @@
       'libfuzzer', 'asan', 'debug_bot', 'shared', 'chromeos_codecs', 'pdf_xfa', 'disable_nacl', 'optimize_for_fuzzing', 'disable_seed_corpus',
     ],
 
+    'libfuzzer_asan_debug_bot_v8_arm64': [
+      'libfuzzer', 'asan', 'debug_bot', 'shared', 'chromeos_codecs', 'pdf_xfa', 'disable_nacl', 'optimize_for_fuzzing', 'v8_simulate_arm64', 'disable_seed_corpus',
+    ],
+
+    'libfuzzer_asan_debug_bot_x86': [
+      'libfuzzer', 'asan', 'debug_bot', 'shared', 'chromeos_codecs', 'pdf_xfa', 'disable_nacl', 'optimize_for_fuzzing', 'x86', 'x86_host',  'disable_seed_corpus',
+    ],
+
+    'libfuzzer_asan_debug_bot_x86_v8_arm': [
+      'libfuzzer', 'asan', 'debug_bot', 'shared', 'chromeos_codecs', 'pdf_xfa', 'disable_nacl', 'optimize_for_fuzzing', 'x86_host', 'v8_simulate_arm',  'disable_seed_corpus',
+    ],
+
     'libfuzzer_chromeos_asan_release_bot': [
       'libfuzzer', 'asan', 'shared_release_bot', 'chromeos_with_codecs', 'pdf_xfa', 'disable_nacl', 'optimize_for_fuzzing', 'disable_seed_corpus',
     ],
@@ -2001,10 +2005,6 @@
     'win32_arm64_release_bot': [
       'arm64', 'disable_nacl', 'minimal_symbols', 'release_bot',
     ],
-
-    'clang_tot_win_release_cross': [
-      'clang_tot', 'win_cross', 'minimal_symbols', 'shared', 'release', 'dcheck_always_on',
-    ],
   },
 
   # This is a dict mapping a given 'mixin' name to a dict of settings that
@@ -2053,14 +2053,6 @@
       'gn_args': 'is_asan=true',
     },
 
-    'ffmpeg_branding_chrome': {
-      'gn_args': 'ffmpeg_branding="Chrome"',
-    },
-
-    'ffmpeg_branding_chromeos': {
-      'gn_args': 'ffmpeg_branding="ChromeOS"',
-    },
-
     'cast': {
       'gn_args': 'is_chromecast=true'
     },
@@ -2119,18 +2111,6 @@
       'gn_args': 'is_clang=true',
     },
 
-    'no_clang': {
-      'gn_args': 'is_clang=false',
-    },
-
-    'use_clang_coverage': {
-      'gn_args': 'use_clang_coverage=true',
-    },
-
-    'use_cxx11': {
-      'gn_args': 'use_cxx11=true',
-    },
-
     # Settings used by the codesearch builders to generate cross-references.
     'codesearch': {
       'gn_args': 'clang_use_chrome_plugins=false enable_kythe_annotations=true',
@@ -2229,6 +2209,10 @@
       'gn_args': 'error',
     },
 
+    'ffmpeg_branding_chrome': {
+      'gn_args': 'ffmpeg_branding="Chrome"',
+    },
+
     'ffmpeg_branding_chromeos': {
       'gn_args': 'ffmpeg_branding="ChromeOS"',
     },
@@ -2290,10 +2274,6 @@
       'gn_args': 'target_cpu="x64"',
     },
 
-    'java_coverage': {
-      'gn_args': 'use_jacoco_coverage=true',
-    },
-
     'libcxx': {
       'gn_args': 'use_custom_libcxx=true',
     },
@@ -2328,6 +2308,10 @@
       'gn_args': 'is_msan=true msan_track_origins=0',
     },
 
+    'no_clang': {
+      'gn_args': 'is_clang=false',
+    },
+
     'no_com_init_hooks': {
       'gn_args': 'com_init_check_hook_disabled=true',
     },
@@ -2409,6 +2393,10 @@
       'mixins': ['release_bot', 'minimal_symbols', 'dcheck_always_on'],
     },
 
+    'resource_whitelisting': {
+      'gn_args': 'enable_resource_whitelist_generation=true',
+    },
+
     'shared': {
       'gn_args': 'is_component_build=true',
     },
@@ -2421,6 +2409,10 @@
       'mixins': ['shared_release_bot', 'minimal_symbols', 'dcheck_always_on'],
     },
 
+    'stable_channel': {
+      'gn_args': 'android_channel="stable"',
+    },
+
     'static': {
       'gn_args': 'is_component_build=false',
     },
@@ -2445,18 +2437,6 @@
       'gn_args': 'use_thin_lto=true thin_lto_enable_optimizations=true',
     },
 
-    'win_linker_timing': {
-      'gn_args': 'win_linker_timing=true',
-    },
-
-    'resource_whitelisting': {
-      'gn_args': 'enable_resource_whitelist_generation=true',
-    },
-
-    'stable_channel': {
-      'gn_args': 'android_channel="stable"',
-    },
-
     'tsan': {
       'gn_args': 'is_tsan=true',
     },
@@ -2478,12 +2458,24 @@
       'gn_args': 'is_ubsan_vptr=true',
     },
 
+    'use_clang_coverage': {
+      'gn_args': 'use_clang_coverage=true',
+    },
+
+    'use_cxx11': {
+      'gn_args': 'use_cxx11=true',
+    },
+
     # TODO(crbug.com/869348): Remove this if we set this by default or don't use
     # this feature.
     'use_dummy_lastchange': {
       'gn_args': 'use_dummy_lastchange=true',
     },
 
+    'use_java_coverage': {
+      'gn_args': 'use_jacoco_coverage=true',
+    },
+
     'v8_simulate_arm': {
       'gn_args': 'target_cpu="x86" v8_target_cpu="arm"',
     },
@@ -2524,6 +2516,10 @@
       'gn_args': 'target_os="win"',
     },
 
+    'win_linker_timing': {
+      'gn_args': 'win_linker_timing=true',
+    },
+
     'x64': {
       'gn_args': 'target_cpu="x64"',
     },
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml
index 3382a820..e6fc89c 100644
--- a/tools/metrics/histograms/enums.xml
+++ b/tools/metrics/histograms/enums.xml
@@ -2504,6 +2504,13 @@
   <int value="4" label="PROMO_SEEN"/>
 </enum>
 
+<enum name="AppSeedRequestState">
+  <int value="0" label="Unknown seed state"/>
+  <int value="1" label="Current seed fresh"/>
+  <int value="2" label="New seed requested from the service"/>
+  <int value="3" label="Seed request to service throttled by client"/>
+</enum>
+
 <enum name="AppsPageDragSource">
   <int value="0" label="Same apps pane"/>
   <int value="1" label="Different apps pane"/>
@@ -25152,6 +25159,8 @@
   <int value="3061" label="DecompressionStreamConstructor"/>
   <int value="3062" label="V8RTCRtpReceiver_PlayoutDelayHint_AttributeGetter"/>
   <int value="3063" label="V8RTCRtpReceiver_PlayoutDelayHint_AttributeSetter"/>
+  <int value="3064" label="V8RegExpExecCalledOnSlowRegExp"/>
+  <int value="3065" label="V8RegExpReplaceCalledOnSlowRegExp"/>
 </enum>
 
 <enum name="FeaturePolicyAllowlistType">
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml
index dae26815..610716a 100644
--- a/tools/metrics/histograms/histograms.xml
+++ b/tools/metrics/histograms/histograms.xml
@@ -18624,6 +18624,19 @@
   </summary>
 </histogram>
 
+<histogram name="Browser.Metal.TestShaderCompileTime" units="ms"
+    expires_after="M81">
+  <owner>ccameron@chromium.org</owner>
+  <owner>graphics-dev@chromium.org</owner>
+  <summary>
+    Compiling a MTLLibrary will sometimes hang forever. When initializing the
+    browser process, a test shader is compiled to see if the MTLCompilerService
+    is responding or not. This records the time that it took for the compile to
+    succeeded, up to 1 minute. After 1 minute, a timeout sentinel value of 3
+    minutes is reported.
+  </summary>
+</histogram>
+
 <histogram name="Browser.Responsiveness.JankyIntervalsPerThirtySeconds"
     units="janks" expires_after="never">
 <!-- expires-never: guiding metric (internal: go/chrome-browser-guiding-metrics) -->
@@ -155837,6 +155850,33 @@
   </summary>
 </histogram>
 
+<histogram name="Variations.AppSeedFreshness" units="minutes"
+    expires_after="2020-11-01">
+  <owner>rmcelrath@chromium.org</owner>
+  <owner>ntfschr@chromium.org</owner>
+  <owner>src/android_webview/OWNERS</owner>
+  <summary>
+    The time interval between when a WebView-using app's copy of the variations
+    seed was written to its local app storage and when it was loaded for use.
+    This is different from Variations.SeedFreshness because it measures
+    freshness from when the app received its copy of the seed, not when the seed
+    was originally downloaded. Written every time the browser process
+    initializes, but not if there was an error reading the seed, or no seed
+    existed.
+  </summary>
+</histogram>
+
+<histogram name="Variations.AppSeedRequestState" enum="AppSeedRequestState"
+    expires_after="2020-11-01">
+  <owner>rmcelrath@chromium.org</owner>
+  <owner>ntfschr@chromium.org</owner>
+  <owner>src/android_webview/OWNERS</owner>
+  <summary>
+    The result of checking if a WebView-using app's copy of the variations seed
+    is still fresh, or if a new seed should be requested.
+  </summary>
+</histogram>
+
 <histogram name="Variations.CreateTrials.SeedExpiry"
     enum="VariationsSeedExpiry" expires_after="M90">
   <owner>asvitkine@chromium.org</owner>
diff --git a/tools/perf/contrib/vr_benchmarks/vr_benchmarks.py b/tools/perf/contrib/vr_benchmarks/vr_benchmarks.py
index e4b2e2a1..bc73735 100644
--- a/tools/perf/contrib/vr_benchmarks/vr_benchmarks.py
+++ b/tools/perf/contrib/vr_benchmarks/vr_benchmarks.py
@@ -2,8 +2,6 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
-import logging
-
 from benchmarks import memory
 from core import perf_benchmark
 from telemetry import benchmark
@@ -13,8 +11,6 @@
 from telemetry.web_perf import timeline_based_measurement
 from contrib.vr_benchmarks import shared_vr_page_state as vr_state
 from contrib.vr_benchmarks import vr_browsing_mode_pages
-from contrib.vr_benchmarks import webvr_sample_pages
-from contrib.vr_benchmarks import webvr_wpr_pages
 from contrib.vr_benchmarks import webxr_sample_pages
 
 
@@ -118,14 +114,6 @@
     return options
 
 
-class _BaseWebVRBenchmark(_BaseWebVRWebXRBenchmark):
-
-  def SetExtraBrowserOptions(self, options):
-    memory.SetExtraBrowserOptionsForMemoryMeasurement(options)
-    options.AppendExtraBrowserArgs([
-        '--enable-blink-features=WebVR',
-    ])
-
 
 class _BaseWebXRBenchmark(_BaseWebVRWebXRBenchmark):
 
@@ -136,20 +124,6 @@
     ])
 
 
-@benchmark.Info(emails=['bsheedy@chromium.org', 'leilei@chromium.org'])
-# pylint: disable=too-many-ancestors
-class XrWebVrStatic(_BaseWebVRBenchmark):
-  """Measures WebVR performance with synthetic sample pages."""
-
-  def CreateStorySet(self, options):
-    del options
-    return webvr_sample_pages.WebVrSamplePageSet()
-
-  @classmethod
-  def Name(cls):
-    return 'xr.webvr.static'
-
-
 @benchmark.Info(emails=['bsheedy@chromium.org', 'tiborg@chromium.org'])
 # pylint: disable=too-many-ancestors
 class XrWebXrStatic(_BaseWebXRBenchmark):
@@ -164,43 +138,6 @@
     return 'xr.webxr.static'
 
 
-@benchmark.Info(emails=['bsheedy@chromium.org', 'tiborg@chromium.org'])
-# pylint: disable=too-many-ancestors
-class XrWebVrWprStatic(_BaseWebVRBenchmark):
-  """Measures WebVR performance with WPR copies of live websites."""
-
-  def CreateStorySet(self, options):
-    del options
-    return webvr_wpr_pages.WebVrWprPageSet()
-
-  @classmethod
-  def Name(cls):
-    return 'xr.webvr.wpr.static'
-
-
-@benchmark.Info(emails=['bsheedy@chromium.org', 'tiborg@chromium.org'])
-# pylint: disable=too-many-ancestors
-class XrWebVrLiveStatic(_BaseWebVRBenchmark):
-  """Measures WebVR performance with live websites.
-
-  This is a superset of xr.webvr.wpr.static, containing all the pages that it
-  uses plus some that we would like to test with WPR, but behave differently
-  when using WPR compared to the live version.
-  """
-
-  def CreateStorySet(self, options):
-    if not hasattr(options, 'use_live_sites') or not options.use_live_sites:
-      # We log an error instead of raising an exception here because the
-      # Telemetry presubmit unittests fail if we raise.
-      logging.error('Running the live sites benchmark without using live '
-          'sites. Results will likely be incorrect for some sites.')
-    return webvr_wpr_pages.WebVrLivePageSet()
-
-  @classmethod
-  def Name(cls):
-    return 'xr.webvr.live.static'
-
-
 class _BaseBrowsingBenchmark(_BaseVRBenchmark):
 
   SUPPORTED_PLATFORMS = [story.expectations.ALL_ANDROID]
diff --git a/ui/accessibility/platform/ax_platform_node_auralinux.cc b/ui/accessibility/platform/ax_platform_node_auralinux.cc
index 0311329..167c8de9 100644
--- a/ui/accessibility/platform/ax_platform_node_auralinux.cc
+++ b/ui/accessibility/platform/ax_platform_node_auralinux.cc
@@ -764,31 +764,11 @@
                                  value);
 }
 
-#if defined(ATK_212)
-void SetValue(AtkValue* atk_value, const double new_value) {
-  g_return_if_fail(ATK_VALUE(atk_value));
-
-  AtkObject* atk_object = ATK_OBJECT(atk_value);
-  AXPlatformNodeAuraLinux* obj = AtkObjectToAXPlatformNodeAuraLinux(atk_object);
-  if (!obj)
-    return;
-
-  AXActionData data;
-  data.action = ax::mojom::Action::kSetValue;
-  data.value = base::NumberToString(new_value);
-  obj->GetDelegate()->AccessibilityPerformAction(data);
-}
-#endif  // defined(ATK_212)
-
 void Init(AtkValueIface* iface) {
   iface->get_current_value = GetCurrentValue;
   iface->get_maximum_value = GetMaximumValue;
   iface->get_minimum_value = GetMinimumValue;
   iface->get_minimum_increment = GetMinimumIncrement;
-
-#if defined(ATK_212)
-  iface->set_value = SetValue;
-#endif  // defined(ATK_212)
 }
 
 const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
@@ -3428,8 +3408,10 @@
   // If this is a non-web-content text entry, then we need to trigger text
   // change signals when the value changes. This is handled by browser
   // accessibility for web content.
-  if (IsPlainTextField() && !GetDelegate()->IsWebContent())
+  if (IsPlainTextField() || !GetDelegate()->IsWebContent()) {
     UpdateHypertext();
+    return;
+  }
 
   if (!IsRangeValueSupported(GetData()))
     return;
diff --git a/ui/accessibility/platform/ax_platform_node_auralinux_unittest.cc b/ui/accessibility/platform/ax_platform_node_auralinux_unittest.cc
index bb19deb..a8739b71 100644
--- a/ui/accessibility/platform/ax_platform_node_auralinux_unittest.cc
+++ b/ui/accessibility/platform/ax_platform_node_auralinux_unittest.cc
@@ -973,53 +973,6 @@
   g_object_unref(root_obj);
 }
 
-#if ATK_CHECK_VERSION(2, 12, 0)
-TEST_F(AXPlatformNodeAuraLinuxTest, TestAtkValueChangedSignal) {
-  AXNodeData root;
-  root.id = 1;
-  root.role = ax::mojom::Role::kSlider;
-  root.AddFloatAttribute(ax::mojom::FloatAttribute::kMaxValueForRange, 5.0);
-  Init(root);
-
-  AtkObject* root_object(GetRootAtkObject());
-  ASSERT_TRUE(ATK_IS_OBJECT(root_object));
-  ASSERT_TRUE(ATK_IS_VALUE(root_object));
-  g_object_ref(root_object);
-
-  bool saw_value_change = false;
-  g_signal_connect(
-      root_object, "property-change::accessible-value",
-      G_CALLBACK(+[](AtkObject*, void* property, bool* saw_value_change) {
-        *saw_value_change = true;
-      }),
-      &saw_value_change);
-
-  atk_value_set_value(ATK_VALUE(root_object), 24.0);
-  GetRootPlatformNode()->NotifyAccessibilityEvent(
-      ax::mojom::Event::kValueChanged);
-
-  GValue current_value = G_VALUE_INIT;
-  atk_value_get_current_value(ATK_VALUE(root_object), &current_value);
-  EXPECT_EQ(G_TYPE_FLOAT, G_VALUE_TYPE(&current_value));
-  EXPECT_EQ(24.0, g_value_get_float(&current_value));
-  EXPECT_TRUE(saw_value_change);
-
-  saw_value_change = false;
-  atk_value_set_value(ATK_VALUE(root_object), 100.0);
-  GetRootPlatformNode()->NotifyAccessibilityEvent(
-      ax::mojom::Event::kValueChanged);
-
-  g_value_unset(&current_value);
-  atk_value_get_current_value(ATK_VALUE(root_object), &current_value);
-  EXPECT_EQ(G_TYPE_FLOAT, G_VALUE_TYPE(&current_value));
-  EXPECT_EQ(100.0, g_value_get_float(&current_value));
-  EXPECT_TRUE(saw_value_change);
-
-  g_value_unset(&current_value);
-  g_object_unref(root_object);
-}
-#endif  // ATK_CHECK_VERSION(2, 12, 0)
-
 //
 // AtkHyperlinkImpl interface
 //
diff --git a/ui/events/ozone/evdev/touch_event_converter_evdev.cc b/ui/events/ozone/evdev/touch_event_converter_evdev.cc
index 1f3c7b1..3052b8c78 100644
--- a/ui/events/ozone/evdev/touch_event_converter_evdev.cc
+++ b/ui/events/ozone/evdev/touch_event_converter_evdev.cc
@@ -694,4 +694,5 @@
     "Ozone.TouchEventConverterEvdev.HoldCountAtCancel";
 const char TouchEventConverterEvdev::kPalmFilterTimerEventName[] =
     "Ozone.TouchEventConverterEvdev.PalmDetectionFilterTime";
+
 }  // namespace ui
diff --git a/ui/events/ozone/evdev/touch_event_converter_evdev.h b/ui/events/ozone/evdev/touch_event_converter_evdev.h
index d900fe5f..9482892 100644
--- a/ui/events/ozone/evdev/touch_event_converter_evdev.h
+++ b/ui/events/ozone/evdev/touch_event_converter_evdev.h
@@ -37,7 +37,7 @@
 class FalseTouchFinder;
 struct InProgressTouchEvdev;
 
-extern const EVENTS_OZONE_EVDEV_EXPORT base::Feature kEnableSingleCancelTouch;
+EVENTS_OZONE_EVDEV_EXPORT extern const base::Feature kEnableSingleCancelTouch;
 
 class EVENTS_OZONE_EVDEV_EXPORT TouchEventConverterEvdev
     : public EventConverterEvdev {
@@ -102,9 +102,11 @@
 
   void UpdateTrackingId(int slot, int tracking_id);
   void ReleaseTouches();
+
   // Returns true if all touches were marked cancelled. Otherwise false.
   bool MaybeCancelAllTouches();
   bool IsPalm(const InProgressTouchEvdev& touch);
+
   // Normalize pressure value to [0, 1].
   float ScalePressure(int32_t value) const;
 
@@ -186,6 +188,7 @@
 
   // Callback to enable/disable palm suppression.
   base::RepeatingCallback<void(bool)> enable_palm_suppression_callback_;
+
   DISALLOW_COPY_AND_ASSIGN(TouchEventConverterEvdev);
 };
 
diff --git a/ui/events/ozone/evdev/touch_filter/edge_touch_filter.cc b/ui/events/ozone/evdev/touch_filter/edge_touch_filter.cc
index b2295e9..981e817 100644
--- a/ui/events/ozone/evdev/touch_filter/edge_touch_filter.cc
+++ b/ui/events/ozone/evdev/touch_filter/edge_touch_filter.cc
@@ -16,7 +16,6 @@
 
 namespace ui {
 
-
 namespace {
 
 // The maximum distance from the border to be considered for filtering
@@ -30,9 +29,9 @@
 
 }  // namespace
 
-EdgeTouchFilter::EdgeTouchFilter(gfx::Size& touchscreen_size)
-    : touchscreen_size_(touchscreen_size) {
-}
+EdgeTouchFilter::EdgeTouchFilter(const gfx::Size& touchscreen_size)
+    : touchscreen_size_(touchscreen_size) {}
+
 EdgeTouchFilter::~EdgeTouchFilter() {}
 
 void EdgeTouchFilter::Filter(
diff --git a/ui/events/ozone/evdev/touch_filter/edge_touch_filter.h b/ui/events/ozone/evdev/touch_filter/edge_touch_filter.h
index 9fb3f03..40da27e8 100644
--- a/ui/events/ozone/evdev/touch_filter/edge_touch_filter.h
+++ b/ui/events/ozone/evdev/touch_filter/edge_touch_filter.h
@@ -14,7 +14,7 @@
 
 class EdgeTouchFilter : public TouchFilter {
  public:
-  EdgeTouchFilter(gfx::Size& touchscreen_size);
+  EdgeTouchFilter(const gfx::Size& touchscreen_size);
   ~EdgeTouchFilter() override;
 
   // TouchFilter:
@@ -27,7 +27,7 @@
   gfx::Point start_positions_[kNumTouchEvdevSlots];
   std::bitset<kNumTouchEvdevSlots> slots_filtered_;
 
-  gfx::Size touchscreen_size_;
+  const gfx::Size touchscreen_size_;
 
   DISALLOW_COPY_AND_ASSIGN(EdgeTouchFilter);
 };
diff --git a/ui/events/ozone/evdev/touch_filter/false_touch_finder_unittest.cc b/ui/events/ozone/evdev/touch_filter/false_touch_finder_unittest.cc
index 8c9fec6..ab1cbea 100644
--- a/ui/events/ozone/evdev/touch_filter/false_touch_finder_unittest.cc
+++ b/ui/events/ozone/evdev/touch_filter/false_touch_finder_unittest.cc
@@ -17,6 +17,7 @@
 #include "ui/events/event_switches.h"
 #include "ui/events/ozone/evdev/touch_evdev_types.h"
 #include "ui/gfx/geometry/point_f.h"
+#include "ui/gfx/geometry/size.h"
 
 namespace ui {
 
@@ -32,6 +33,8 @@
     bool expect_delay;
   };
 
+  static constexpr gfx::Size kTouchscreenSize = gfx::Size(4000, 4000);
+
   FalseTouchFinderTest() {}
   ~FalseTouchFinderTest() override {}
 
@@ -79,8 +82,6 @@
     return true;
   }
 
- gfx::Size touchscreen_size = gfx::Size(4000,4000);
-
  private:
   // testing::Test:
   void SetUp() override {
@@ -90,7 +91,7 @@
         switches::kEdgeTouchFiltering);
     base::CommandLine::ForCurrentProcess()->AppendSwitch(
         switches::kLowPressureTouchFiltering);
-    false_touch_finder_ = FalseTouchFinder::Create(touchscreen_size);
+    false_touch_finder_ = FalseTouchFinder::Create(kTouchscreenSize);
   }
 
   std::unique_ptr<FalseTouchFinder> false_touch_finder_;
@@ -98,6 +99,8 @@
   DISALLOW_COPY_AND_ASSIGN(FalseTouchFinderTest);
 };
 
+constexpr gfx::Size FalseTouchFinderTest::kTouchscreenSize;
+
 // Test that taps which are far apart in quick succession are considered noise.
 TEST_F(FalseTouchFinderTest, FarApartTaps) {
   const TouchEntry kTestData[] = {
@@ -172,21 +175,25 @@
 // Test that a touch on the edge which never leaves is delayed and never
 // released.
 TEST_F(FalseTouchFinderTest, EdgeTap) {
-  int ts_width = touchscreen_size.width();
-  int ts_height = touchscreen_size.height();
+  int touchscreen_width = kTouchscreenSize.width();
+  int touchscreen_height = kTouchscreenSize.height();
   const TouchEntry kTestData[] = {
       {10, 1, true, gfx::PointF(0, 100), 0.35, false, true},
       {20, 1, true, gfx::PointF(0, 100), 0.35, false, true},
       {30, 1, false, gfx::PointF(0, 100), 0.35, false, true},
-      {40, 2, true, gfx::PointF(ts_width - 1, 100), 0.35, false, true},
-      {50, 2, true, gfx::PointF(ts_width - 1, 100), 0.35, false, true},
-      {60, 2, false, gfx::PointF(ts_width - 1, 100), 0.35, false, true},
+      {40, 2, true, gfx::PointF(touchscreen_width - 1, 100), 0.35, false, true},
+      {50, 2, true, gfx::PointF(touchscreen_width - 1, 100), 0.35, false, true},
+      {60, 2, false, gfx::PointF(touchscreen_width - 1, 100), 0.35, false,
+       true},
       {70, 3, true, gfx::PointF(100, 0), 0.35, false, true},
       {80, 3, true, gfx::PointF(100, 0), 0.35, false, true},
       {90, 3, false, gfx::PointF(100, 0), 0.35, false, true},
-      {100, 4, true, gfx::PointF(100, ts_height - 1), 0.35, false, true},
-      {110, 4, true, gfx::PointF(100, ts_height - 1), 0.35, false, true},
-      {120, 4, false, gfx::PointF(100, ts_height - 1), 0.35, false, true}};
+      {100, 4, true, gfx::PointF(100, touchscreen_height - 1), 0.35, false,
+       true},
+      {110, 4, true, gfx::PointF(100, touchscreen_height - 1), 0.35, false,
+       true},
+      {120, 4, false, gfx::PointF(100, touchscreen_height - 1), 0.35, false,
+       true}};
   EXPECT_TRUE(FilterAndCheck(kTestData, base::size(kTestData)));
 }
 
diff --git a/ui/events/ozone/evdev/touch_filter/heuristic_stylus_palm_detection_filter.cc b/ui/events/ozone/evdev/touch_filter/heuristic_stylus_palm_detection_filter.cc
index a1cac14..0b318e84 100644
--- a/ui/events/ozone/evdev/touch_filter/heuristic_stylus_palm_detection_filter.cc
+++ b/ui/events/ozone/evdev/touch_filter/heuristic_stylus_palm_detection_filter.cc
@@ -60,17 +60,21 @@
   DCHECK(hold >= cancel) << "Expected hold time to be longer than cancel time.";
 }
 
+HeuristicStylusPalmDetectionFilter::~HeuristicStylusPalmDetectionFilter() {}
+
 const char HeuristicStylusPalmDetectionFilter::kFilterName[] =
     "HeuristicStylusPalmDetectionFilter";
+
 std::string HeuristicStylusPalmDetectionFilter::FilterNameForTesting() const {
   return kFilterName;
 }
-HeuristicStylusPalmDetectionFilter::~HeuristicStylusPalmDetectionFilter() {}
 
 base::TimeDelta HeuristicStylusPalmDetectionFilter::HoldTime() const {
   return time_after_stylus_to_hold_;
 }
+
 base::TimeDelta HeuristicStylusPalmDetectionFilter::CancelTime() const {
   return time_after_stylus_to_cancel_;
 }
+
 }  // namespace ui
diff --git a/ui/events/ozone/evdev/touch_filter/heuristic_stylus_palm_detection_filter.h b/ui/events/ozone/evdev/touch_filter/heuristic_stylus_palm_detection_filter.h
index 7006172..b3e931b 100644
--- a/ui/events/ozone/evdev/touch_filter/heuristic_stylus_palm_detection_filter.h
+++ b/ui/events/ozone/evdev/touch_filter/heuristic_stylus_palm_detection_filter.h
@@ -12,6 +12,7 @@
 #include "ui/events/ozone/evdev/touch_evdev_types.h"
 #include "ui/events/ozone/evdev/touch_filter/palm_detection_filter.h"
 #include "ui/events/ozone/evdev/touch_filter/shared_palm_detection_filter_state.h"
+
 namespace ui {
 
 // A heuristic implementation of PalmDetectionFilter.
@@ -40,12 +41,13 @@
       base::TimeDelta hold,
       base::TimeDelta cancel);
   ~HeuristicStylusPalmDetectionFilter() override;
+
   void Filter(const std::vector<InProgressTouchEvdev>& touches,
               base::TimeTicks time,
               std::bitset<kNumTouchEvdevSlots>* slots_to_hold,
               std::bitset<kNumTouchEvdevSlots>* slots_to_suppress) override;
 
-  const static char kFilterName[];
+  static const char kFilterName[];
   std::string FilterNameForTesting() const override;
 
   base::TimeDelta HoldTime() const;
@@ -57,10 +59,13 @@
   const base::TimeDelta time_after_stylus_to_cancel_;
 
   std::vector<base::TimeTicks> touch_started_time_;
+
   // How many items have we seen in this stroke so far?
   std::vector<int> stroke_length_;
+
   DISALLOW_COPY_AND_ASSIGN(HeuristicStylusPalmDetectionFilter);
 };
+
 }  // namespace ui
 
 #endif  // UI_EVENTS_OZONE_EVDEV_TOUCH_FILTER_HEURISTIC_STYLUS_PALM_DETECTION_FILTER_H_
diff --git a/ui/events/ozone/evdev/touch_filter/heuristic_stylus_palm_detection_filter_unittest.cc b/ui/events/ozone/evdev/touch_filter/heuristic_stylus_palm_detection_filter_unittest.cc
index ec224d0..c6d657c 100644
--- a/ui/events/ozone/evdev/touch_filter/heuristic_stylus_palm_detection_filter_unittest.cc
+++ b/ui/events/ozone/evdev/touch_filter/heuristic_stylus_palm_detection_filter_unittest.cc
@@ -12,6 +12,7 @@
 #include "ui/events/ozone/evdev/touch_filter/shared_palm_detection_filter_state.h"
 
 namespace ui {
+
 class HeuristicStylusPalmDetectionFilterTest : public testing::Test {
  public:
   HeuristicStylusPalmDetectionFilterTest() = default;
@@ -32,10 +33,12 @@
 
   const base::TimeDelta sample_interval =
       base::TimeDelta::FromMillisecondsD(7.5);
+
   std::unique_ptr<SharedPalmDetectionFilterState> shared_palm_state;
   std::unique_ptr<PalmDetectionFilter> palm_detection_filter_;
   std::vector<InProgressTouchEvdev> touches_;
   base::TimeTicks test_start_time_;
+
   DISALLOW_COPY_AND_ASSIGN(HeuristicStylusPalmDetectionFilterTest);
 };
 
@@ -174,4 +177,5 @@
   hold.reset(0);
   EXPECT_TRUE(hold.none());
 }
+
 }  // namespace ui
diff --git a/ui/events/ozone/evdev/touch_filter/neural_stylus_palm_detection_filter_util.cc b/ui/events/ozone/evdev/touch_filter/neural_stylus_palm_detection_filter_util.cc
index e63a4c1..180b71a 100644
--- a/ui/events/ozone/evdev/touch_filter/neural_stylus_palm_detection_filter_util.cc
+++ b/ui/events/ozone/evdev/touch_filter/neural_stylus_palm_detection_filter_util.cc
@@ -5,55 +5,59 @@
 #include "ui/events/ozone/evdev/touch_filter/neural_stylus_palm_detection_filter_util.h"
 
 namespace ui {
-DistilledDevInfo::DistilledDevInfo(const EventDeviceInfo& devinfo) {
-  max_x = devinfo.GetAbsMaximum(ABS_MT_POSITION_X);
-  x_res = devinfo.GetAbsResolution(ABS_MT_POSITION_X);
-  max_y = devinfo.GetAbsMaximum(ABS_MT_POSITION_Y);
-  y_res = devinfo.GetAbsResolution(ABS_MT_POSITION_Y);
-  if (x_res == 0) {
-    x_res = 1;
+
+PalmFilterDeviceInfo CreatePalmFilterDeviceInfo(
+    const EventDeviceInfo& devinfo) {
+  PalmFilterDeviceInfo info;
+
+  info.max_x = devinfo.GetAbsMaximum(ABS_MT_POSITION_X);
+  info.x_res = devinfo.GetAbsResolution(ABS_MT_POSITION_X);
+  info.max_y = devinfo.GetAbsMaximum(ABS_MT_POSITION_Y);
+  info.y_res = devinfo.GetAbsResolution(ABS_MT_POSITION_Y);
+  if (info.x_res == 0) {
+    info.x_res = 1;
   }
-  if (y_res == 0) {
-    y_res = 1;
+  if (info.y_res == 0) {
+    info.y_res = 1;
   }
 
-  major_radius_res = devinfo.GetAbsResolution(ABS_MT_TOUCH_MAJOR);
-  if (major_radius_res == 0) {
+  info.major_radius_res = devinfo.GetAbsResolution(ABS_MT_TOUCH_MAJOR);
+  if (info.major_radius_res == 0) {
     // Device does not report major res: set to 1.
-    major_radius_res = 1;
+    info.major_radius_res = 1;
   }
   if (devinfo.HasAbsEvent(ABS_MT_TOUCH_MINOR)) {
-    minor_radius_supported = true;
-    minor_radius_res = devinfo.GetAbsResolution(ABS_MT_TOUCH_MINOR);
+    info.minor_radius_supported = true;
+    info.minor_radius_res = devinfo.GetAbsResolution(ABS_MT_TOUCH_MINOR);
   } else {
-    minor_radius_supported = false;
-    minor_radius_res = major_radius_res;
+    info.minor_radius_supported = false;
+    info.minor_radius_res = info.major_radius_res;
   }
-  if (minor_radius_res == 0) {
+  if (info.minor_radius_res == 0) {
     // Device does not report minor res: set to 1.
-    minor_radius_res = 1;
+    info.minor_radius_res = 1;
   }
+
+  return info;
 }
 
-const DistilledDevInfo DistilledDevInfo::Create(
-    const EventDeviceInfo& devinfo) {
-  return DistilledDevInfo(devinfo);
-}
+PalmFilterSample CreatePalmFilterSample(const InProgressTouchEvdev& touch,
+                                        const base::TimeTicks& time,
+                                        const PalmFilterDeviceInfo& dev_info) {
+  // radius_x and radius_y have been
+  // scaled by resolution already.
 
-Sample::Sample(const InProgressTouchEvdev& touch,
-               const base::TimeTicks& time,
-               const DistilledDevInfo& dev_info)
-    : time(time) {  // radius_x and radius_y have been
-                    // scaled by resolution.already.
+  PalmFilterSample sample;
+  sample.time = time;
 
   // Original model here is not normalized appropriately, so we divide by 40.
-  major_radius = std::max(touch.major, touch.minor) * dev_info.x_res / 40.0 *
-                 dev_info.major_radius_res;
+  sample.major_radius = std::max(touch.major, touch.minor) * dev_info.x_res /
+                        40.0 * dev_info.major_radius_res;
   if (dev_info.minor_radius_supported) {
-    minor_radius = std::min(touch.major, touch.minor) * dev_info.x_res / 40.0 *
-                   dev_info.minor_radius_res;
+    sample.minor_radius = std::min(touch.major, touch.minor) * dev_info.x_res /
+                          40.0 * dev_info.minor_radius_res;
   } else {
-    minor_radius = major_radius;
+    sample.minor_radius = sample.major_radius;
   }
 
   // Nearest edge distance, in cm.
@@ -61,33 +65,38 @@
   float nearest_y_edge = std::min(touch.y, dev_info.max_y - touch.y);
   float normalized_x_edge = nearest_x_edge / dev_info.x_res;
   float normalized_y_edge = nearest_y_edge / dev_info.y_res;
-  edge = std::min(normalized_x_edge, normalized_y_edge);
-  point = gfx::PointF(touch.x / dev_info.x_res, touch.y / dev_info.y_res);
-  tracking_id = touch.tracking_id;
-  pressure = touch.pressure;
+  sample.edge = std::min(normalized_x_edge, normalized_y_edge);
+  sample.point =
+      gfx::PointF(touch.x / dev_info.x_res, touch.y / dev_info.y_res);
+  sample.tracking_id = touch.tracking_id;
+  sample.pressure = touch.pressure;
+
+  return sample;
 }
 
-Sample::Sample(const Sample& other) = default;
-Sample& Sample::operator=(const Sample& other) = default;
+PalmFilterStroke::PalmFilterStroke(size_t max_length)
+    : max_length_(max_length) {}
+PalmFilterStroke::PalmFilterStroke(const PalmFilterStroke& other) = default;
+PalmFilterStroke::PalmFilterStroke(PalmFilterStroke&& other) = default;
+PalmFilterStroke& PalmFilterStroke::operator=(const PalmFilterStroke& other) =
+    default;
+PalmFilterStroke& PalmFilterStroke::operator=(PalmFilterStroke&& other) =
+    default;
+PalmFilterStroke::~PalmFilterStroke() {}
 
-Stroke::Stroke(const Stroke& other) = default;
-Stroke::Stroke(Stroke&& other) = default;
-Stroke::Stroke(int max_length) : max_length_(max_length) {}
-Stroke::~Stroke() {}
-
-void Stroke::AddSample(const Sample& samp) {
+void PalmFilterStroke::AddSample(const PalmFilterSample& sample) {
   samples_seen_++;
   if (samples_.empty()) {
-    tracking_id_ = samp.tracking_id;
+    tracking_id_ = sample.tracking_id;
   }
-  DCHECK_EQ(tracking_id_, samp.tracking_id);
-  samples_.push_back(samp);
+  DCHECK_EQ(tracking_id_, sample.tracking_id);
+  samples_.push_back(sample);
   while (samples_.size() > max_length_) {
     samples_.pop_front();
   }
 }
 
-gfx::PointF Stroke::GetCentroid() const {
+gfx::PointF PalmFilterStroke::GetCentroid() const {
   // TODO(robsc): Implement a Kahan sum to accurately track running sum instead
   // of brute force.
   if (samples_.size() == 0) {
@@ -100,23 +109,23 @@
   return gfx::ScalePoint(unscaled_centroid, 1.f / samples_.size());
 }
 
-const std::deque<Sample>& Stroke::samples() const {
+const std::deque<PalmFilterSample>& PalmFilterStroke::samples() const {
   return samples_;
 }
 
-int Stroke::tracking_id() const {
+int PalmFilterStroke::tracking_id() const {
   return tracking_id_;
 }
 
-uint64_t Stroke::samples_seen() const {
+uint64_t PalmFilterStroke::samples_seen() const {
   return samples_seen_;
 }
 
-void Stroke::SetTrackingId(int tracking_id) {
+void PalmFilterStroke::SetTrackingId(int tracking_id) {
   tracking_id_ = tracking_id;
 }
 
-float Stroke::MaxMajorRadius() const {
+float PalmFilterStroke::MaxMajorRadius() const {
   float maximum = 0.0;
   for (const auto& sample : samples_) {
     maximum = std::max(maximum, sample.major_radius);
@@ -124,7 +133,7 @@
   return maximum;
 }
 
-float Stroke::BiggestSize() const {
+float PalmFilterStroke::BiggestSize() const {
   float biggest = 0;
   for (const auto& sample : samples_) {
     float size;
diff --git a/ui/events/ozone/evdev/touch_filter/neural_stylus_palm_detection_filter_util.h b/ui/events/ozone/evdev/touch_filter/neural_stylus_palm_detection_filter_util.h
index fe4962d..b6c5488 100644
--- a/ui/events/ozone/evdev/touch_filter/neural_stylus_palm_detection_filter_util.h
+++ b/ui/events/ozone/evdev/touch_filter/neural_stylus_palm_detection_filter_util.h
@@ -4,6 +4,7 @@
 
 #ifndef UI_EVENTS_OZONE_EVDEV_TOUCH_FILTER_NEURAL_STYLUS_PALM_DETECTION_FILTER_UTIL_H_
 #define UI_EVENTS_OZONE_EVDEV_TOUCH_FILTER_NEURAL_STYLUS_PALM_DETECTION_FILTER_UTIL_H_
+
 #include <cstdint>
 #include <deque>
 #include <vector>
@@ -14,13 +15,8 @@
 #include "ui/gfx/geometry/point_f.h"
 
 namespace ui {
-struct EVENTS_OZONE_EVDEV_EXPORT DistilledDevInfo {
- private:
-  explicit DistilledDevInfo(const EventDeviceInfo& devinfo);
 
- public:
-  static const DistilledDevInfo Create(const EventDeviceInfo& devinfo);
-  DistilledDevInfo() = delete;
+struct EVENTS_OZONE_EVDEV_EXPORT PalmFilterDeviceInfo {
   float max_x = 0.f;
   float max_y = 0.f;
   float x_res = 1.f;
@@ -30,48 +26,51 @@
   bool minor_radius_supported = false;
 };
 
-// Data for a single touch event.
-class EVENTS_OZONE_EVDEV_EXPORT Sample {
- public:
-  Sample(const InProgressTouchEvdev& touch,
-         const base::TimeTicks& time,
-         const DistilledDevInfo& dev_info);
-  Sample(const Sample& other);
-  Sample() = delete;
-  Sample& operator=(const Sample& other);
+EVENTS_OZONE_EVDEV_EXPORT
+PalmFilterDeviceInfo CreatePalmFilterDeviceInfo(const EventDeviceInfo& devinfo);
 
+// Data for a single touch event.
+struct EVENTS_OZONE_EVDEV_EXPORT PalmFilterSample {
   float major_radius = 0;
   float minor_radius = 0;
   float pressure = 0;
   float edge = 0;
   int tracking_id = 0;
   gfx::PointF point;
-  base::TimeTicks time = base::TimeTicks::UnixEpoch();
+  base::TimeTicks time;
 };
 
-class EVENTS_OZONE_EVDEV_EXPORT Stroke {
- public:
-  explicit Stroke(int max_length);
-  Stroke(const Stroke& other);
-  Stroke(Stroke&& other);
-  virtual ~Stroke();
+EVENTS_OZONE_EVDEV_EXPORT
+PalmFilterSample CreatePalmFilterSample(const InProgressTouchEvdev& touch,
+                                        const base::TimeTicks& time,
+                                        const PalmFilterDeviceInfo& dev_info);
 
-  void AddSample(const Sample& sample);
+class EVENTS_OZONE_EVDEV_EXPORT PalmFilterStroke {
+ public:
+  explicit PalmFilterStroke(size_t max_length);
+  PalmFilterStroke(const PalmFilterStroke& other);
+  PalmFilterStroke(PalmFilterStroke&& other);
+  PalmFilterStroke& operator=(const PalmFilterStroke& other);
+  PalmFilterStroke& operator=(PalmFilterStroke&& other);
+  ~PalmFilterStroke();
+
+  void AddSample(const PalmFilterSample& sample);
   gfx::PointF GetCentroid() const;
   float BiggestSize() const;
   // If no elements in stroke, returns 0.0;
   float MaxMajorRadius() const;
   void SetTrackingId(int tracking_id);
-  const std::deque<Sample>& samples() const;
+  const std::deque<PalmFilterSample>& samples() const;
   uint64_t samples_seen() const;
   int tracking_id() const;
 
  private:
-  std::deque<Sample> samples_;
+  std::deque<PalmFilterSample> samples_;
   int tracking_id_ = 0;
   uint64_t samples_seen_ = 0;
   uint64_t max_length_;
 };
 
 }  // namespace ui
+
 #endif  // UI_EVENTS_OZONE_EVDEV_TOUCH_FILTER_NEURAL_STYLUS_PALM_DETECTION_FILTER_UTIL_H_
diff --git a/ui/events/ozone/evdev/touch_filter/neural_stylus_palm_detection_filter_util_unittest.cc b/ui/events/ozone/evdev/touch_filter/neural_stylus_palm_detection_filter_util_unittest.cc
index fde33e6..bcb6d82 100644
--- a/ui/events/ozone/evdev/touch_filter/neural_stylus_palm_detection_filter_util_unittest.cc
+++ b/ui/events/ozone/evdev/touch_filter/neural_stylus_palm_detection_filter_util_unittest.cc
@@ -1,6 +1,7 @@
 // Copyright 2019 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.
+
 #include "ui/events/ozone/evdev/touch_filter/neural_stylus_palm_detection_filter_util.h"
 
 #include <algorithm>
@@ -13,10 +14,13 @@
 #include "ui/events/ozone/evdev/touch_evdev_types.h"
 #include "ui/events/ozone/evdev/touch_filter/palm_detection_filter.h"
 #include "ui/events/ozone/evdev/touch_filter/shared_palm_detection_filter_state.h"
+
 namespace ui {
+
 class NeuralStylusPalmDetectionFilterUtilTest : public testing::Test {
  public:
   NeuralStylusPalmDetectionFilterUtilTest() = default;
+
   void SetUp() override {
     EXPECT_TRUE(
         CapabilitiesToDeviceInfo(kNocturneTouchScreen, &nocturne_touchscreen_));
@@ -31,12 +35,13 @@
  protected:
   InProgressTouchEvdev touch_;
   EventDeviceInfo nocturne_touchscreen_;
+
   DISALLOW_COPY_AND_ASSIGN(NeuralStylusPalmDetectionFilterUtilTest);
 };
 
 TEST_F(NeuralStylusPalmDetectionFilterUtilTest, DistilledNocturneTest) {
-  const DistilledDevInfo nocturne_distilled =
-      DistilledDevInfo::Create(nocturne_touchscreen_);
+  const PalmFilterDeviceInfo nocturne_distilled =
+      CreatePalmFilterDeviceInfo(nocturne_touchscreen_);
   EXPECT_FLOAT_EQ(nocturne_distilled.max_x,
                   nocturne_touchscreen_.GetAbsMaximum(ABS_MT_POSITION_X));
   EXPECT_FLOAT_EQ(nocturne_distilled.max_y,
@@ -58,8 +63,8 @@
   auto abs_info = nocturne_touchscreen_.GetAbsInfoByCode(ABS_MT_TOUCH_MINOR);
   abs_info.resolution = 0;
   nocturne_touchscreen_.SetAbsInfo(ABS_MT_TOUCH_MINOR, abs_info);
-  const DistilledDevInfo nocturne_distilled =
-      DistilledDevInfo::Create(nocturne_touchscreen_);
+  const PalmFilterDeviceInfo nocturne_distilled =
+      CreatePalmFilterDeviceInfo(nocturne_touchscreen_);
   EXPECT_EQ(1, nocturne_distilled.minor_radius_res);
   EXPECT_EQ(1, nocturne_distilled.major_radius_res);
 }
@@ -68,8 +73,8 @@
   EventDeviceInfo kohaku_touchscreen;
   ASSERT_TRUE(
       CapabilitiesToDeviceInfo(kKohakuTouchscreen, &kohaku_touchscreen));
-  const DistilledDevInfo kohaku_distilled =
-      DistilledDevInfo::Create(kohaku_touchscreen);
+  const PalmFilterDeviceInfo kohaku_distilled =
+      CreatePalmFilterDeviceInfo(kohaku_touchscreen);
   EXPECT_FALSE(kohaku_distilled.minor_radius_supported);
   EXPECT_EQ(1, kohaku_distilled.x_res);
   EXPECT_EQ(1, kohaku_distilled.y_res);
@@ -78,57 +83,57 @@
 TEST_F(NeuralStylusPalmDetectionFilterUtilTest, DistilledLinkTest) {
   EventDeviceInfo link_touchscreen;
   ASSERT_TRUE(CapabilitiesToDeviceInfo(kLinkTouchscreen, &link_touchscreen));
-  const DistilledDevInfo link_distilled =
-      DistilledDevInfo::Create(link_touchscreen);
+  const PalmFilterDeviceInfo link_distilled =
+      CreatePalmFilterDeviceInfo(link_touchscreen);
   EXPECT_FALSE(link_distilled.minor_radius_supported);
   EXPECT_FLOAT_EQ(1.f, link_distilled.major_radius_res);
   EXPECT_FLOAT_EQ(link_distilled.major_radius_res,
                   link_distilled.minor_radius_res);
 }
 
-TEST_F(NeuralStylusPalmDetectionFilterUtilTest, SampleTest) {
-  base::TimeTicks t =
-      base::TimeTicks::UnixEpoch() + base::TimeDelta::FromSeconds(30);
-  const DistilledDevInfo nocturne_distilled =
-      DistilledDevInfo::Create(nocturne_touchscreen_);
-  const Sample s(touch_, t, nocturne_distilled);
-  EXPECT_EQ(t, s.time);
-  EXPECT_EQ(25, s.major_radius);
-  EXPECT_EQ(24, s.minor_radius);
-  EXPECT_EQ(23, s.pressure);
-  EXPECT_EQ(22, s.tracking_id);
-  EXPECT_EQ(gfx::PointF(21 / 40.f, 20 / 40.f), s.point);
-  EXPECT_EQ(0.5, s.edge);
+TEST_F(NeuralStylusPalmDetectionFilterUtilTest, PalmFilterSampleTest) {
+  base::TimeTicks time = base::TimeTicks() + base::TimeDelta::FromSeconds(30);
+  const PalmFilterDeviceInfo nocturne_distilled =
+      CreatePalmFilterDeviceInfo(nocturne_touchscreen_);
+  const PalmFilterSample sample =
+      CreatePalmFilterSample(touch_, time, nocturne_distilled);
+  EXPECT_EQ(time, sample.time);
+  EXPECT_EQ(25, sample.major_radius);
+  EXPECT_EQ(24, sample.minor_radius);
+  EXPECT_EQ(23, sample.pressure);
+  EXPECT_EQ(22, sample.tracking_id);
+  EXPECT_EQ(gfx::PointF(21 / 40.f, 20 / 40.f), sample.point);
+  EXPECT_EQ(0.5, sample.edge);
 }
 
 TEST_F(NeuralStylusPalmDetectionFilterUtilTest, LinkTouchscreenSampleTest) {
   EventDeviceInfo link_touchscreen;
-  base::TimeTicks t =
-      base::TimeTicks::UnixEpoch() + base::TimeDelta::FromSeconds(30);
+  base::TimeTicks time = base::TimeTicks() + base::TimeDelta::FromSeconds(30);
   ASSERT_TRUE(CapabilitiesToDeviceInfo(kLinkTouchscreen, &link_touchscreen));
-  const DistilledDevInfo link_distilled =
-      DistilledDevInfo::Create(link_touchscreen);
+  const PalmFilterDeviceInfo link_distilled =
+      CreatePalmFilterDeviceInfo(link_touchscreen);
   touch_.minor = 0;  // no minor from link.
-  const Sample s(touch_, t, link_distilled);
-  EXPECT_FLOAT_EQ(12.5, s.major_radius);
-  EXPECT_FLOAT_EQ(12.5, s.minor_radius);
+  const PalmFilterSample sample =
+      CreatePalmFilterSample(touch_, time, link_distilled);
+  EXPECT_FLOAT_EQ(12.5, sample.major_radius);
+  EXPECT_FLOAT_EQ(12.5, sample.minor_radius);
 }
 
-TEST_F(NeuralStylusPalmDetectionFilterUtilTest, StrokeTest) {
-  Stroke stroke(3);  // maxsize: 3.
+TEST_F(NeuralStylusPalmDetectionFilterUtilTest, PalmFilterStrokeTest) {
+  PalmFilterStroke stroke(3);  // maxsize: 3.
   EXPECT_EQ(0, stroke.tracking_id());
   // With no points, center is 0.
   EXPECT_EQ(gfx::PointF(0., 0.), stroke.GetCentroid());
 
-  base::TimeTicks t =
-      base::TimeTicks::UnixEpoch() + base::TimeDelta::FromSeconds(30);
-  const DistilledDevInfo nocturne_distilled =
-      DistilledDevInfo::Create(nocturne_touchscreen_);
+  base::TimeTicks time = base::TimeTicks() + base::TimeDelta::FromSeconds(30);
+  const PalmFilterDeviceInfo nocturne_distilled =
+      CreatePalmFilterDeviceInfo(nocturne_touchscreen_);
   // Deliberately long test to ensure floating point continued accuracy.
   for (int i = 0; i < 500000; ++i) {
     touch_.x = 15 + i;
-    Sample s(touch_, t, nocturne_distilled);
-    stroke.AddSample(std::move(s));
+    PalmFilterSample sample =
+        CreatePalmFilterSample(touch_, time, nocturne_distilled);
+    stroke.AddSample(std::move(sample));
     EXPECT_EQ(touch_.tracking_id, stroke.tracking_id());
     if (i < 3) {
       if (i == 0) {
@@ -152,44 +157,48 @@
   EXPECT_EQ(55, stroke.tracking_id());
 }
 
-TEST_F(NeuralStylusPalmDetectionFilterUtilTest, StrokeBiggestSizeTest) {
-  Stroke stroke(3), no_minor_stroke(3);  // maxsize: 3.
+TEST_F(NeuralStylusPalmDetectionFilterUtilTest,
+       PalmFilterStrokeBiggestSizeTest) {
+  PalmFilterStroke stroke(3);
+  PalmFilterStroke no_minor_stroke(3);  // maxsize: 3.
   EXPECT_EQ(0, stroke.BiggestSize());
 
-  base::TimeTicks t =
-      base::TimeTicks::UnixEpoch() + base::TimeDelta::FromSeconds(30);
-  const DistilledDevInfo nocturne_distilled =
-      DistilledDevInfo::Create(nocturne_touchscreen_);
+  base::TimeTicks time = base::TimeTicks() + base::TimeDelta::FromSeconds(30);
+  const PalmFilterDeviceInfo nocturne_distilled =
+      CreatePalmFilterDeviceInfo(nocturne_touchscreen_);
   for (int i = 0; i < 500; ++i) {
     touch_.major = 2 + i;
     touch_.minor = 1 + i;
-    Sample s(touch_, t, nocturne_distilled);
+    PalmFilterSample sample =
+        CreatePalmFilterSample(touch_, time, nocturne_distilled);
     EXPECT_EQ(static_cast<uint64_t>(i), stroke.samples_seen());
-    stroke.AddSample(std::move(s));
+    stroke.AddSample(sample);
     EXPECT_FLOAT_EQ((1 + i) * (2 + i), stroke.BiggestSize());
 
-    Sample second_s(touch_, t, nocturne_distilled);
-    second_s.minor_radius = 0;
-    no_minor_stroke.AddSample(std::move(second_s));
+    PalmFilterSample second_sample =
+        CreatePalmFilterSample(touch_, time, nocturne_distilled);
+    second_sample.minor_radius = 0;
+    no_minor_stroke.AddSample(std::move(second_sample));
     EXPECT_FLOAT_EQ((2 + i) * (2 + i), no_minor_stroke.BiggestSize());
     EXPECT_EQ(std::min(3ul, 1ul + i), stroke.samples().size());
   }
 }
 
 TEST_F(NeuralStylusPalmDetectionFilterUtilTest, StrokeGetMaxMajorTest) {
-  Stroke stroke(3);
+  PalmFilterStroke stroke(3);
   EXPECT_FLOAT_EQ(0, stroke.MaxMajorRadius());
-  base::TimeTicks t =
+  base::TimeTicks time =
       base::TimeTicks::UnixEpoch() + base::TimeDelta::FromSeconds(30);
-  const DistilledDevInfo nocturne_distilled =
-      DistilledDevInfo::Create(nocturne_touchscreen_);
+  const PalmFilterDeviceInfo nocturne_distilled =
+      CreatePalmFilterDeviceInfo(nocturne_touchscreen_);
   for (int i = 1; i < 50; ++i) {
     touch_.major = i;
     touch_.minor = i - 1;
-    Sample s(touch_, t, nocturne_distilled);
-    t += base::TimeDelta::FromMilliseconds(8);
+    PalmFilterSample sample =
+        CreatePalmFilterSample(touch_, time, nocturne_distilled);
+    time += base::TimeDelta::FromMilliseconds(8);
     EXPECT_EQ(static_cast<uint64_t>(i - 1), stroke.samples_seen());
-    stroke.AddSample(s);
+    stroke.AddSample(sample);
     EXPECT_FLOAT_EQ(i, stroke.MaxMajorRadius());
   }
 }
diff --git a/ui/events/ozone/evdev/touch_filter/open_palm_detection_filter.cc b/ui/events/ozone/evdev/touch_filter/open_palm_detection_filter.cc
index b7246ac..698710d 100644
--- a/ui/events/ozone/evdev/touch_filter/open_palm_detection_filter.cc
+++ b/ui/events/ozone/evdev/touch_filter/open_palm_detection_filter.cc
@@ -5,10 +5,13 @@
 #include "ui/events/ozone/evdev/touch_filter/open_palm_detection_filter.h"
 
 namespace ui {
+
 OpenPalmDetectionFilter::OpenPalmDetectionFilter(
     SharedPalmDetectionFilterState* shared_palm_state)
     : PalmDetectionFilter(shared_palm_state) {}
 
+OpenPalmDetectionFilter::~OpenPalmDetectionFilter() {}
+
 void OpenPalmDetectionFilter::Filter(
     const std::vector<InProgressTouchEvdev>& touches,
     base::TimeTicks time,
@@ -19,9 +22,9 @@
 }
 
 const char OpenPalmDetectionFilter::kFilterName[] = "OpenPalmDetectionFilter";
+
 std::string OpenPalmDetectionFilter::FilterNameForTesting() const {
   return kFilterName;
 }
 
-OpenPalmDetectionFilter::~OpenPalmDetectionFilter() {}
 }  // namespace ui
diff --git a/ui/events/ozone/evdev/touch_filter/open_palm_detection_filter.h b/ui/events/ozone/evdev/touch_filter/open_palm_detection_filter.h
index 07697ea..04d52e01 100644
--- a/ui/events/ozone/evdev/touch_filter/open_palm_detection_filter.h
+++ b/ui/events/ozone/evdev/touch_filter/open_palm_detection_filter.h
@@ -12,6 +12,7 @@
 #include "ui/events/ozone/evdev/touch_evdev_types.h"
 #include "ui/events/ozone/evdev/touch_filter/palm_detection_filter.h"
 #include "ui/events/ozone/evdev/touch_filter/shared_palm_detection_filter_state.h"
+
 namespace ui {
 
 // A simple implementation of PalmDetectionFilter.
@@ -22,17 +23,19 @@
   explicit OpenPalmDetectionFilter(
       SharedPalmDetectionFilterState* shared_palm_state);
   ~OpenPalmDetectionFilter() override;
+
   void Filter(const std::vector<InProgressTouchEvdev>& touches,
               base::TimeTicks time,
               std::bitset<kNumTouchEvdevSlots>* slots_to_hold,
               std::bitset<kNumTouchEvdevSlots>* slots_to_suppress) override;
 
-  const static char kFilterName[];
+  static const char kFilterName[];
   std::string FilterNameForTesting() const override;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(OpenPalmDetectionFilter);
 };
+
 }  // namespace ui
 
 #endif  // UI_EVENTS_OZONE_EVDEV_TOUCH_FILTER_OPEN_PALM_DETECTION_FILTER_H_
diff --git a/ui/events/ozone/evdev/touch_filter/open_palm_detection_filter_unittest.cc b/ui/events/ozone/evdev/touch_filter/open_palm_detection_filter_unittest.cc
index 1aeda196..30b479d 100644
--- a/ui/events/ozone/evdev/touch_filter/open_palm_detection_filter_unittest.cc
+++ b/ui/events/ozone/evdev/touch_filter/open_palm_detection_filter_unittest.cc
@@ -7,10 +7,13 @@
 #include "testing/gtest/include/gtest/gtest.h"
 #include "ui/events/ozone/evdev/touch_filter/palm_detection_filter.h"
 #include "ui/events/ozone/evdev/touch_filter/shared_palm_detection_filter_state.h"
+
 namespace ui {
+
 class OpenPalmDetectionFilterTest : public testing::Test {
  public:
   OpenPalmDetectionFilterTest() = default;
+
   void SetUp() override {
     shared_palm_state = std::make_unique<SharedPalmDetectionFilterState>();
     palm_detection_filter_.reset(
@@ -19,8 +22,8 @@
 
  protected:
   std::unique_ptr<SharedPalmDetectionFilterState> shared_palm_state;
-
   std::unique_ptr<PalmDetectionFilter> palm_detection_filter_;
+
   DISALLOW_COPY_AND_ASSIGN(OpenPalmDetectionFilterTest);
 };
 
@@ -35,4 +38,5 @@
   EXPECT_TRUE(hold.none());
   EXPECT_TRUE(suppress.none());
 }
+
 }  // namespace ui
diff --git a/ui/events/ozone/evdev/touch_filter/palm_detection_filter.cc b/ui/events/ozone/evdev/touch_filter/palm_detection_filter.cc
index f3b30a96..c25b6823 100644
--- a/ui/events/ozone/evdev/touch_filter/palm_detection_filter.cc
+++ b/ui/events/ozone/evdev/touch_filter/palm_detection_filter.cc
@@ -5,10 +5,13 @@
 #include "ui/events/ozone/evdev/touch_filter/palm_detection_filter.h"
 
 namespace ui {
+
 PalmDetectionFilter::PalmDetectionFilter(
     SharedPalmDetectionFilterState* shared_palm_state)
     : shared_palm_state_(shared_palm_state) {
   DCHECK(shared_palm_state != nullptr);
 }
+
 PalmDetectionFilter::~PalmDetectionFilter() {}
+
 }  // namespace ui
diff --git a/ui/events/ozone/evdev/touch_filter/palm_detection_filter.h b/ui/events/ozone/evdev/touch_filter/palm_detection_filter.h
index a5db46f..0325140 100644
--- a/ui/events/ozone/evdev/touch_filter/palm_detection_filter.h
+++ b/ui/events/ozone/evdev/touch_filter/palm_detection_filter.h
@@ -24,6 +24,7 @@
   // shared_palm_state is not owned!
   explicit PalmDetectionFilter(
       SharedPalmDetectionFilterState* shared_palm_state);
+  virtual ~PalmDetectionFilter();
 
   // Execute a filter event. Expected to be executed on every update to touches.
   // Arguments are:
@@ -43,12 +44,11 @@
   // The name of this filter, for testing purposes.
   virtual std::string FilterNameForTesting() const = 0;
 
-  virtual ~PalmDetectionFilter();
-
  protected:
   // Not owned!
-  SharedPalmDetectionFilterState* shared_palm_state_;
+  SharedPalmDetectionFilterState* const shared_palm_state_;
 };
+
 }  // namespace ui
 
 #endif  // UI_EVENTS_OZONE_EVDEV_TOUCH_FILTER_PALM_DETECTION_FILTER_H_
diff --git a/ui/events/ozone/evdev/touch_filter/palm_detection_filter_factory.cc b/ui/events/ozone/evdev/touch_filter/palm_detection_filter_factory.cc
index 5d29bf53..8c9f618 100644
--- a/ui/events/ozone/evdev/touch_filter/palm_detection_filter_factory.cc
+++ b/ui/events/ozone/evdev/touch_filter/palm_detection_filter_factory.cc
@@ -14,6 +14,7 @@
 #include "ui/events/ozone/evdev/touch_filter/palm_detection_filter.h"
 
 namespace ui {
+
 const base::Feature kEnableHeuristicPalmDetectionFilter{
     "EnableHeuristicPalmDetectionFilter", base::FEATURE_DISABLED_BY_DEFAULT};
 
diff --git a/ui/events/ozone/evdev/touch_filter/palm_detection_filter_factory.h b/ui/events/ozone/evdev/touch_filter/palm_detection_filter_factory.h
index d6b4b77..6a3f330b 100644
--- a/ui/events/ozone/evdev/touch_filter/palm_detection_filter_factory.h
+++ b/ui/events/ozone/evdev/touch_filter/palm_detection_filter_factory.h
@@ -1,6 +1,7 @@
 // Copyright 2019 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 UI_EVENTS_OZONE_EVDEV_TOUCH_FILTER_PALM_DETECTION_FILTER_FACTORY_H_
 #define UI_EVENTS_OZONE_EVDEV_TOUCH_FILTER_PALM_DETECTION_FILTER_FACTORY_H_
 
@@ -10,27 +11,29 @@
 
 #include "base/feature_list.h"
 #include "base/metrics/field_trial_params.h"
-#include "base/time/time.h"
 #include "ui/events/ozone/evdev/event_device_info.h"
 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h"
-#include "ui/events/ozone/evdev/touch_filter/heuristic_stylus_palm_detection_filter.h"
-#include "ui/events/ozone/evdev/touch_filter/open_palm_detection_filter.h"
 #include "ui/events/ozone/evdev/touch_filter/palm_detection_filter.h"
 #include "ui/events/ozone/evdev/touch_filter/shared_palm_detection_filter_state.h"
+
 namespace ui {
 
-extern const EVENTS_OZONE_EVDEV_EXPORT base::Feature
-    kEnableHeuristicPalmDetectionFilter;
+EVENTS_OZONE_EVDEV_EXPORT
+extern const base::Feature kEnableHeuristicPalmDetectionFilter;
 
-extern const EVENTS_OZONE_EVDEV_EXPORT base::FeatureParam<double>
-    kHeuristicCancelThresholdSeconds;
-extern const EVENTS_OZONE_EVDEV_EXPORT base::FeatureParam<double>
-    kHeuristicHoldThresholdSeconds;
-extern const EVENTS_OZONE_EVDEV_EXPORT base::FeatureParam<int>
-    kHeuristicStrokeCount;
-std::unique_ptr<PalmDetectionFilter> EVENTS_OZONE_EVDEV_EXPORT
+EVENTS_OZONE_EVDEV_EXPORT
+extern const base::FeatureParam<double> kHeuristicCancelThresholdSeconds;
+
+EVENTS_OZONE_EVDEV_EXPORT
+extern const base::FeatureParam<double> kHeuristicHoldThresholdSeconds;
+
+EVENTS_OZONE_EVDEV_EXPORT
+extern const base::FeatureParam<int> kHeuristicStrokeCount;
+
+EVENTS_OZONE_EVDEV_EXPORT std::unique_ptr<PalmDetectionFilter>
 CreatePalmDetectionFilter(const EventDeviceInfo& devinfo,
                           SharedPalmDetectionFilterState* shared_palm_state);
+
 }  // namespace ui
 
 #endif  // UI_EVENTS_OZONE_EVDEV_TOUCH_FILTER_PALM_DETECTION_FILTER_FACTORY_H_
diff --git a/ui/events/ozone/evdev/touch_filter/palm_detection_filter_factory_unittest.cc b/ui/events/ozone/evdev/touch_filter/palm_detection_filter_factory_unittest.cc
index 46d39849..c1fc0dd 100644
--- a/ui/events/ozone/evdev/touch_filter/palm_detection_filter_factory_unittest.cc
+++ b/ui/events/ozone/evdev/touch_filter/palm_detection_filter_factory_unittest.cc
@@ -10,14 +10,17 @@
 #include "testing/gtest/include/gtest/gtest.h"
 #include "ui/events/ozone/evdev/event_device_info.h"
 #include "ui/events/ozone/evdev/event_device_test_util.h"
+#include "ui/events/ozone/evdev/touch_filter/heuristic_stylus_palm_detection_filter.h"
 #include "ui/events/ozone/evdev/touch_filter/open_palm_detection_filter.h"
 #include "ui/events/ozone/evdev/touch_filter/palm_detection_filter.h"
 #include "ui/events/ozone/evdev/touch_filter/shared_palm_detection_filter_state.h"
 
 namespace ui {
+
 class PalmDetectionFilterFactoryTest : public testing::Test {
  public:
   PalmDetectionFilterFactoryTest() = default;
+
   void SetUp() override {
     EXPECT_TRUE(
         CapabilitiesToDeviceInfo(kEveTouchScreen, &eve_touchscreen_info_));
@@ -34,6 +37,7 @@
   EventDeviceInfo eve_touchscreen_info_, eve_stylus_info_,
       nocturne_touchscreen_info_, nocturne_stylus_info_;
   SharedPalmDetectionFilterState shared_palm_state_;
+
   DISALLOW_COPY_AND_ASSIGN(PalmDetectionFilterFactoryTest);
 };
 
diff --git a/ui/events/ozone/evdev/touch_filter/shared_palm_detection_filter_state.h b/ui/events/ozone/evdev/touch_filter/shared_palm_detection_filter_state.h
index 2763870..670ca9f0 100644
--- a/ui/events/ozone/evdev/touch_filter/shared_palm_detection_filter_state.h
+++ b/ui/events/ozone/evdev/touch_filter/shared_palm_detection_filter_state.h
@@ -4,13 +4,16 @@
 
 #ifndef UI_EVENTS_OZONE_EVDEV_TOUCH_FILTER_SHARED_PALM_DETECTION_FILTER_STATE_H_
 #define UI_EVENTS_OZONE_EVDEV_TOUCH_FILTER_SHARED_PALM_DETECTION_FILTER_STATE_H_
+
 #include "base/time/time.h"
 
 namespace ui {
+
 struct SharedPalmDetectionFilterState {
   // The latest stylus touch time. Note that this can include "hover".
-  base::TimeTicks latest_stylus_touch_time_ = base::TimeTicks::UnixEpoch();
+  base::TimeTicks latest_stylus_touch_time_;
 };
+
 }  // namespace ui
 
 #endif
diff --git a/ui/file_manager/audio_player/assets/100/player_button_next.png b/ui/file_manager/audio_player/assets/100/player_button_next.png
index ed4d407e..0dd7709 100644
--- a/ui/file_manager/audio_player/assets/100/player_button_next.png
+++ b/ui/file_manager/audio_player/assets/100/player_button_next.png
Binary files differ
diff --git a/ui/file_manager/audio_player/assets/100/player_button_pause.png b/ui/file_manager/audio_player/assets/100/player_button_pause.png
index 5225482..c070a25 100644
--- a/ui/file_manager/audio_player/assets/100/player_button_pause.png
+++ b/ui/file_manager/audio_player/assets/100/player_button_pause.png
Binary files differ
diff --git a/ui/file_manager/audio_player/assets/100/player_button_play.png b/ui/file_manager/audio_player/assets/100/player_button_play.png
index 1174fd6..6f05107 100644
--- a/ui/file_manager/audio_player/assets/100/player_button_play.png
+++ b/ui/file_manager/audio_player/assets/100/player_button_play.png
Binary files differ
diff --git a/ui/file_manager/audio_player/assets/100/player_button_playlist.png b/ui/file_manager/audio_player/assets/100/player_button_playlist.png
index 9be8e7bf..4c8370d 100644
--- a/ui/file_manager/audio_player/assets/100/player_button_playlist.png
+++ b/ui/file_manager/audio_player/assets/100/player_button_playlist.png
Binary files differ
diff --git a/ui/file_manager/audio_player/assets/100/player_button_previous.png b/ui/file_manager/audio_player/assets/100/player_button_previous.png
index c562d5c..46bf7e1 100644
--- a/ui/file_manager/audio_player/assets/100/player_button_previous.png
+++ b/ui/file_manager/audio_player/assets/100/player_button_previous.png
Binary files differ
diff --git a/ui/file_manager/audio_player/assets/100/player_button_repeat.png b/ui/file_manager/audio_player/assets/100/player_button_repeat.png
index d3b87379..63f60d7 100644
--- a/ui/file_manager/audio_player/assets/100/player_button_repeat.png
+++ b/ui/file_manager/audio_player/assets/100/player_button_repeat.png
Binary files differ
diff --git a/ui/file_manager/audio_player/assets/100/player_button_repeat_one.png b/ui/file_manager/audio_player/assets/100/player_button_repeat_one.png
index f0aec47c..6372eb0c 100644
--- a/ui/file_manager/audio_player/assets/100/player_button_repeat_one.png
+++ b/ui/file_manager/audio_player/assets/100/player_button_repeat_one.png
Binary files differ
diff --git a/ui/file_manager/audio_player/assets/100/player_button_shuffle.png b/ui/file_manager/audio_player/assets/100/player_button_shuffle.png
index 862f66a..f1d54f4 100644
--- a/ui/file_manager/audio_player/assets/100/player_button_shuffle.png
+++ b/ui/file_manager/audio_player/assets/100/player_button_shuffle.png
Binary files differ
diff --git a/ui/file_manager/audio_player/assets/100/player_button_volume.png b/ui/file_manager/audio_player/assets/100/player_button_volume.png
index aa716ff..ce60e626 100644
--- a/ui/file_manager/audio_player/assets/100/player_button_volume.png
+++ b/ui/file_manager/audio_player/assets/100/player_button_volume.png
Binary files differ
diff --git a/ui/file_manager/audio_player/assets/100/player_button_volume_muted.png b/ui/file_manager/audio_player/assets/100/player_button_volume_muted.png
index 72db204a3..c9fd787 100644
--- a/ui/file_manager/audio_player/assets/100/player_button_volume_muted.png
+++ b/ui/file_manager/audio_player/assets/100/player_button_volume_muted.png
Binary files differ
diff --git a/ui/file_manager/audio_player/assets/100/player_cover_close.png b/ui/file_manager/audio_player/assets/100/player_cover_close.png
index 57af8d0..00042f2 100644
--- a/ui/file_manager/audio_player/assets/100/player_cover_close.png
+++ b/ui/file_manager/audio_player/assets/100/player_cover_close.png
Binary files differ
diff --git a/ui/file_manager/audio_player/assets/100/player_cover_open.png b/ui/file_manager/audio_player/assets/100/player_cover_open.png
index b8b7960..8524c1e 100644
--- a/ui/file_manager/audio_player/assets/100/player_cover_open.png
+++ b/ui/file_manager/audio_player/assets/100/player_cover_open.png
Binary files differ
diff --git a/ui/file_manager/audio_player/assets/100/playlist_now_playing.png b/ui/file_manager/audio_player/assets/100/playlist_now_playing.png
index a4588679..9082e99 100644
--- a/ui/file_manager/audio_player/assets/100/playlist_now_playing.png
+++ b/ui/file_manager/audio_player/assets/100/playlist_now_playing.png
Binary files differ
diff --git a/ui/file_manager/audio_player/assets/100/playlist_play.png b/ui/file_manager/audio_player/assets/100/playlist_play.png
index 416c85a..0df434c0 100644
--- a/ui/file_manager/audio_player/assets/100/playlist_play.png
+++ b/ui/file_manager/audio_player/assets/100/playlist_play.png
Binary files differ
diff --git a/ui/file_manager/audio_player/assets/200/player_button_next.png b/ui/file_manager/audio_player/assets/200/player_button_next.png
index c65f059..9c1129c 100644
--- a/ui/file_manager/audio_player/assets/200/player_button_next.png
+++ b/ui/file_manager/audio_player/assets/200/player_button_next.png
Binary files differ
diff --git a/ui/file_manager/audio_player/assets/200/player_button_pause.png b/ui/file_manager/audio_player/assets/200/player_button_pause.png
index 883ca6e..5e71f9ac 100644
--- a/ui/file_manager/audio_player/assets/200/player_button_pause.png
+++ b/ui/file_manager/audio_player/assets/200/player_button_pause.png
Binary files differ
diff --git a/ui/file_manager/audio_player/assets/200/player_button_play.png b/ui/file_manager/audio_player/assets/200/player_button_play.png
index d2413af..b848dc9 100644
--- a/ui/file_manager/audio_player/assets/200/player_button_play.png
+++ b/ui/file_manager/audio_player/assets/200/player_button_play.png
Binary files differ
diff --git a/ui/file_manager/audio_player/assets/200/player_button_playlist.png b/ui/file_manager/audio_player/assets/200/player_button_playlist.png
index bc5576b2..f6bb0bd 100644
--- a/ui/file_manager/audio_player/assets/200/player_button_playlist.png
+++ b/ui/file_manager/audio_player/assets/200/player_button_playlist.png
Binary files differ
diff --git a/ui/file_manager/audio_player/assets/200/player_button_previous.png b/ui/file_manager/audio_player/assets/200/player_button_previous.png
index 001c1f7..621c1f6a 100644
--- a/ui/file_manager/audio_player/assets/200/player_button_previous.png
+++ b/ui/file_manager/audio_player/assets/200/player_button_previous.png
Binary files differ
diff --git a/ui/file_manager/audio_player/assets/200/player_button_repeat.png b/ui/file_manager/audio_player/assets/200/player_button_repeat.png
index c448f2b2..468d5ed 100644
--- a/ui/file_manager/audio_player/assets/200/player_button_repeat.png
+++ b/ui/file_manager/audio_player/assets/200/player_button_repeat.png
Binary files differ
diff --git a/ui/file_manager/audio_player/assets/200/player_button_repeat_one.png b/ui/file_manager/audio_player/assets/200/player_button_repeat_one.png
index 7ccc7bf..306ffe8 100644
--- a/ui/file_manager/audio_player/assets/200/player_button_repeat_one.png
+++ b/ui/file_manager/audio_player/assets/200/player_button_repeat_one.png
Binary files differ
diff --git a/ui/file_manager/audio_player/assets/200/player_button_shuffle.png b/ui/file_manager/audio_player/assets/200/player_button_shuffle.png
index 61958e78..8a25deb 100644
--- a/ui/file_manager/audio_player/assets/200/player_button_shuffle.png
+++ b/ui/file_manager/audio_player/assets/200/player_button_shuffle.png
Binary files differ
diff --git a/ui/file_manager/audio_player/assets/200/player_button_volume.png b/ui/file_manager/audio_player/assets/200/player_button_volume.png
index 27edb81..5b837b5 100644
--- a/ui/file_manager/audio_player/assets/200/player_button_volume.png
+++ b/ui/file_manager/audio_player/assets/200/player_button_volume.png
Binary files differ
diff --git a/ui/file_manager/audio_player/assets/200/player_button_volume_muted.png b/ui/file_manager/audio_player/assets/200/player_button_volume_muted.png
index 211d1c9..e0a5326a 100644
--- a/ui/file_manager/audio_player/assets/200/player_button_volume_muted.png
+++ b/ui/file_manager/audio_player/assets/200/player_button_volume_muted.png
Binary files differ
diff --git a/ui/file_manager/audio_player/assets/200/player_cover_close.png b/ui/file_manager/audio_player/assets/200/player_cover_close.png
index 1a5d1380..794064d 100644
--- a/ui/file_manager/audio_player/assets/200/player_cover_close.png
+++ b/ui/file_manager/audio_player/assets/200/player_cover_close.png
Binary files differ
diff --git a/ui/file_manager/audio_player/assets/200/player_cover_open.png b/ui/file_manager/audio_player/assets/200/player_cover_open.png
index a2034f4..404e3b27 100644
--- a/ui/file_manager/audio_player/assets/200/player_cover_open.png
+++ b/ui/file_manager/audio_player/assets/200/player_cover_open.png
Binary files differ
diff --git a/ui/file_manager/audio_player/assets/200/player_no_artwork.png b/ui/file_manager/audio_player/assets/200/player_no_artwork.png
index 5bbdc80..17fe370 100644
--- a/ui/file_manager/audio_player/assets/200/player_no_artwork.png
+++ b/ui/file_manager/audio_player/assets/200/player_no_artwork.png
Binary files differ
diff --git a/ui/file_manager/audio_player/assets/200/playlist_now_playing.png b/ui/file_manager/audio_player/assets/200/playlist_now_playing.png
index 72e87bf..079bab8e 100644
--- a/ui/file_manager/audio_player/assets/200/playlist_now_playing.png
+++ b/ui/file_manager/audio_player/assets/200/playlist_now_playing.png
Binary files differ
diff --git a/ui/file_manager/audio_player/assets/200/playlist_play.png b/ui/file_manager/audio_player/assets/200/playlist_play.png
index 1ae3fb51..7249181 100644
--- a/ui/file_manager/audio_player/assets/200/playlist_play.png
+++ b/ui/file_manager/audio_player/assets/200/playlist_play.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/common/2x/check_no_box.png b/ui/file_manager/file_manager/foreground/images/common/2x/check_no_box.png
index 436b5f3..284d93d 100644
--- a/ui/file_manager/file_manager/foreground/images/common/2x/check_no_box.png
+++ b/ui/file_manager/file_manager/foreground/images/common/2x/check_no_box.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/common/2x/disclosure_arrow_dk_grey_down.png b/ui/file_manager/file_manager/foreground/images/common/2x/disclosure_arrow_dk_grey_down.png
index e37ee476..fa16bc9 100644
--- a/ui/file_manager/file_manager/foreground/images/common/2x/disclosure_arrow_dk_grey_down.png
+++ b/ui/file_manager/file_manager/foreground/images/common/2x/disclosure_arrow_dk_grey_down.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/common/check_no_box.png b/ui/file_manager/file_manager/foreground/images/common/check_no_box.png
index 3c52cc5e..ab43376 100644
--- a/ui/file_manager/file_manager/foreground/images/common/check_no_box.png
+++ b/ui/file_manager/file_manager/foreground/images/common/check_no_box.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/common/disclosure_arrow_dk_grey_down.png b/ui/file_manager/file_manager/foreground/images/common/disclosure_arrow_dk_grey_down.png
index a8e5c6a..1d269f20 100644
--- a/ui/file_manager/file_manager/foreground/images/common/disclosure_arrow_dk_grey_down.png
+++ b/ui/file_manager/file_manager/foreground/images/common/disclosure_arrow_dk_grey_down.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/arrow_right_white.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/arrow_right_white.png
index c22fd8a1..b45977f 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/arrow_right_white.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/arrow_right_white.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/back.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/back.png
index b817685..66d2b85 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/back.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/back.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/cancel.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/cancel.png
index 6cd849f2..accd9bf 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/cancel.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/cancel.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/close_button.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/close_button.png
index da50f68..64e9752 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/close_button.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/close_button.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/close_button_white.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/close_button_white.png
index 64c8570..28b05fe1 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/close_button_white.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/close_button_white.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/cloud_import_syncing.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/cloud_import_syncing.png
index e502153..136bedf2 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/cloud_import_syncing.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/cloud_import_syncing.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/delete.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/delete.png
index da30e833..fe83c1d8 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/delete.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/delete.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/delete_white.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/delete_white.png
index b3e9036..6d1aafb 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/delete_white.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/delete_white.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/drive_banner_clouds.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/drive_banner_clouds.png
index 9d52af3..226abc0 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/drive_banner_clouds.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/drive_banner_clouds.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/drive_banner_people.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/drive_banner_people.png
index 25251d3..f2af0c1 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/drive_banner_people.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/drive_banner_people.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/eject.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/eject.png
index 182c21e..2f4a1c2 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/eject.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/eject.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/eject_active.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/eject_active.png
index aef7051..c361e1b5 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/eject_active.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/eject_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/empty_folder.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/empty_folder.png
index 3d54e4f..6aef93a 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/empty_folder.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/empty_folder.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/expand_less.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/expand_less.png
index b90ff2f..2650576 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/expand_less.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/expand_less.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/expand_less_active.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/expand_less_active.png
index 94003dc..430391c 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/expand_less_active.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/expand_less_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/expand_more.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/expand_more.png
index f7b8376b..f63383a 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/expand_more.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/expand_more.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/expand_more_active.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/expand_more_active.png
index 1b40a32..a4a737a 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/expand_more_active.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/expand_more_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/filetype_placeholder_audio.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/filetype_placeholder_audio.png
index d89e57d..df491a9 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/filetype_placeholder_audio.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/filetype_placeholder_audio.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/filetype_placeholder_generic.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/filetype_placeholder_generic.png
index b3929f9..c24bb37 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/filetype_placeholder_generic.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/filetype_placeholder_generic.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/filetype_placeholder_image.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/filetype_placeholder_image.png
index 4bc9cf0..a2c3d953 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/filetype_placeholder_image.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/filetype_placeholder_image.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/filetype_placeholder_video.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/filetype_placeholder_video.png
index 93ffe41..03af2fe9 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/filetype_placeholder_video.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/filetype_placeholder_video.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/grid_folder_check.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/grid_folder_check.png
index 9b1b446..7ab5a98a 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/grid_folder_check.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/grid_folder_check.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/grid_image_check.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/grid_image_check.png
index bdaf44e9..93d14364a 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/grid_image_check.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/grid_image_check.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/grid_image_check_active.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/grid_image_check_active.png
index 9b654ce..3c8600a 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/grid_image_check_active.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/grid_image_check_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/icon_search.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/icon_search.png
index 7f2ff27..44f02178 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/icon_search.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/icon_search.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/info_white.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/info_white.png
index 3042628..cdfe1c15 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/info_white.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/info_white.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/list_check.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/list_check.png
index a5ba8cdb..925e66d 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/list_check.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/list_check.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/menu.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/menu.png
index 2b34db4..83694a7 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/menu.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/menu.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/menu_white.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/menu_white.png
index 2d7100a..4781d01 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/menu_white.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/menu_white.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/person_add.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/person_add.png
index 1553940..428b660 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/person_add.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/person_add.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/refresh_white.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/refresh_white.png
index 26f26d4..04a5580d 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/refresh_white.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/refresh_white.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/search.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/search.png
index 3690568..71b947803 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/search.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/search.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/search_clear.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/search_clear.png
index 923d294..e9f9e4e 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/search_clear.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/search_clear.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/search_white.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/search_white.png
index a49ba37..9ea2864 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/search_white.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/search_white.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/service_drive.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/service_drive.png
index 199629b..4b55d2c 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/service_drive.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/service_drive.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/share.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/share.png
index 1502efe8..ebfff91c4 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/share.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/share.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/share_white.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/share_white.png
index fc26f3c..91c1fb93 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/share_white.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/share_white.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/sorting_white.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/sorting_white.png
index 0d6e54d..d6a36ef0 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/sorting_white.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/sorting_white.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/store.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/store.png
index e52a5d42..659efde 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/store.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/store.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/vertical_separator.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/vertical_separator.png
index 9d14b688..c251cb5b 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/vertical_separator.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/vertical_separator.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/view_list_white.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/view_list_white.png
index 6309052e..cb17b41 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/view_list_white.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/view_list_white.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/view_thumbnail_white.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/view_thumbnail_white.png
index d5e77783..04f11fb 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/view_thumbnail_white.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/view_thumbnail_white.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/2x/warning_white.png b/ui/file_manager/file_manager/foreground/images/files/ui/2x/warning_white.png
index cead8469..9fc24d1 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/2x/warning_white.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/2x/warning_white.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/arrow_right_white.png b/ui/file_manager/file_manager/foreground/images/files/ui/arrow_right_white.png
index cf4628cf..cff83f12 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/arrow_right_white.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/arrow_right_white.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/back.png b/ui/file_manager/file_manager/foreground/images/files/ui/back.png
index 747aee7..677902d0 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/back.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/back.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/cancel.png b/ui/file_manager/file_manager/foreground/images/files/ui/cancel.png
index 218379c..f898dbca 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/cancel.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/cancel.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/close_button.png b/ui/file_manager/file_manager/foreground/images/files/ui/close_button.png
index db13e12..08f2516 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/close_button.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/close_button.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/close_button_white.png b/ui/file_manager/file_manager/foreground/images/files/ui/close_button_white.png
index ceba1375..676e3423 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/close_button_white.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/close_button_white.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/cloud_import_syncing.png b/ui/file_manager/file_manager/foreground/images/files/ui/cloud_import_syncing.png
index 2bd6c7b..a48c94e 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/cloud_import_syncing.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/cloud_import_syncing.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/delete.png b/ui/file_manager/file_manager/foreground/images/files/ui/delete.png
index 1692938..4bd1ac23 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/delete.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/delete.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/delete_white.png b/ui/file_manager/file_manager/foreground/images/files/ui/delete_white.png
index 247f2d1..32889c7 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/delete_white.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/delete_white.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/drive_banner_clouds.png b/ui/file_manager/file_manager/foreground/images/files/ui/drive_banner_clouds.png
index 19c99cb6..95d7bf0 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/drive_banner_clouds.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/drive_banner_clouds.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/drive_banner_people.png b/ui/file_manager/file_manager/foreground/images/files/ui/drive_banner_people.png
index 3b5756b..bbeb0df1 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/drive_banner_people.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/drive_banner_people.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/drive_logo.png b/ui/file_manager/file_manager/foreground/images/files/ui/drive_logo.png
index 74183730..3e17d94 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/drive_logo.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/drive_logo.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/eject.png b/ui/file_manager/file_manager/foreground/images/files/ui/eject.png
index 373290f6..bbf159f 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/eject.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/eject.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/eject_active.png b/ui/file_manager/file_manager/foreground/images/files/ui/eject_active.png
index 865b87ac..f436d34 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/eject_active.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/eject_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/empty_folder.png b/ui/file_manager/file_manager/foreground/images/files/ui/empty_folder.png
index f169d0c..f53d186f 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/empty_folder.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/empty_folder.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/expand_less.png b/ui/file_manager/file_manager/foreground/images/files/ui/expand_less.png
index 5baf9d3..48677d8 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/expand_less.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/expand_less.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/expand_less_active.png b/ui/file_manager/file_manager/foreground/images/files/ui/expand_less_active.png
index 7790758..e871d02 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/expand_less_active.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/expand_less_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/expand_more.png b/ui/file_manager/file_manager/foreground/images/files/ui/expand_more.png
index 774752ff..44de1691 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/expand_more.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/expand_more.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/expand_more_active.png b/ui/file_manager/file_manager/foreground/images/files/ui/expand_more_active.png
index bc13bd2f..95d724c9 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/expand_more_active.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/expand_more_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/filetype_placeholder_audio.png b/ui/file_manager/file_manager/foreground/images/files/ui/filetype_placeholder_audio.png
index ab804e8..d3986cb 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/filetype_placeholder_audio.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/filetype_placeholder_audio.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/filetype_placeholder_generic.png b/ui/file_manager/file_manager/foreground/images/files/ui/filetype_placeholder_generic.png
index 26e51167a..54997bbe 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/filetype_placeholder_generic.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/filetype_placeholder_generic.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/filetype_placeholder_image.png b/ui/file_manager/file_manager/foreground/images/files/ui/filetype_placeholder_image.png
index 9f55645..62f6c8b 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/filetype_placeholder_image.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/filetype_placeholder_image.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/filetype_placeholder_video.png b/ui/file_manager/file_manager/foreground/images/files/ui/filetype_placeholder_video.png
index 2287cefaf..fadda62 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/filetype_placeholder_video.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/filetype_placeholder_video.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/grid_folder_check.png b/ui/file_manager/file_manager/foreground/images/files/ui/grid_folder_check.png
index f4a4803..4311b1e 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/grid_folder_check.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/grid_folder_check.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/grid_image_check.png b/ui/file_manager/file_manager/foreground/images/files/ui/grid_image_check.png
index 86b26448d..45026a2 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/grid_image_check.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/grid_image_check.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/grid_image_check_active.png b/ui/file_manager/file_manager/foreground/images/files/ui/grid_image_check_active.png
index 56a2f5cd..8652ebfd 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/grid_image_check_active.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/grid_image_check_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/info_white.png b/ui/file_manager/file_manager/foreground/images/files/ui/info_white.png
index d1f807d..4daa71fb 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/info_white.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/info_white.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/list_check.png b/ui/file_manager/file_manager/foreground/images/files/ui/list_check.png
index 1c84120..4b313c4 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/list_check.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/list_check.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/menu.png b/ui/file_manager/file_manager/foreground/images/files/ui/menu.png
index 5fe650f..db9918f 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/menu.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/menu.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/menu_white.png b/ui/file_manager/file_manager/foreground/images/files/ui/menu_white.png
index cda0ea0b..13346f0 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/menu_white.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/menu_white.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/person_add.png b/ui/file_manager/file_manager/foreground/images/files/ui/person_add.png
index 370baf7..623e20f 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/person_add.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/person_add.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/2x/filetype_audio.png b/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/2x/filetype_audio.png
index f6da59a..07144bbc 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/2x/filetype_audio.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/2x/filetype_audio.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/2x/filetype_folder.png b/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/2x/filetype_folder.png
index b1566af..f51f09b0 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/2x/filetype_folder.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/2x/filetype_folder.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/2x/filetype_generic.png b/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/2x/filetype_generic.png
index 99e72de..95816db7 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/2x/filetype_generic.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/2x/filetype_generic.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/2x/filetype_image.png b/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/2x/filetype_image.png
index 4693c6753..a7babfa 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/2x/filetype_image.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/2x/filetype_image.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/2x/filetype_video.png b/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/2x/filetype_video.png
index a493cd5..4801f96 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/2x/filetype_video.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/2x/filetype_video.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/2x/info_outline.png b/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/2x/info_outline.png
index ae3a8a0..c00e8ba2 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/2x/info_outline.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/2x/info_outline.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/filetype_audio.png b/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/filetype_audio.png
index 8f4c37c..0a7475a 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/filetype_audio.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/filetype_audio.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/filetype_folder.png b/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/filetype_folder.png
index 7a2b8142..0bd363c2 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/filetype_folder.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/filetype_folder.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/filetype_generic.png b/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/filetype_generic.png
index 2b8d44ef..84af4545 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/filetype_generic.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/filetype_generic.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/filetype_image.png b/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/filetype_image.png
index 747eaaaa..2872723 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/filetype_image.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/filetype_image.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/filetype_video.png b/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/filetype_video.png
index 4bee21f..b85d6d3 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/filetype_video.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/filetype_video.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/info_outline.png b/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/info_outline.png
index e57733f8..6b8b9a005 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/info_outline.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/quick_view/info_outline.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/refresh_white.png b/ui/file_manager/file_manager/foreground/images/files/ui/refresh_white.png
index 9dd8b2b..2c55e43b 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/refresh_white.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/refresh_white.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/search.png b/ui/file_manager/file_manager/foreground/images/files/ui/search.png
index e9e5da7..b38c40b9 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/search.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/search.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/search_clear.png b/ui/file_manager/file_manager/foreground/images/files/ui/search_clear.png
index 400a4130..3c9a00e 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/search_clear.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/search_clear.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/search_white.png b/ui/file_manager/file_manager/foreground/images/files/ui/search_white.png
index 44967de..fa0688a 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/search_white.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/search_white.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/service_drive.png b/ui/file_manager/file_manager/foreground/images/files/ui/service_drive.png
index e54508bd..0d0eb58 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/service_drive.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/service_drive.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/share.png b/ui/file_manager/file_manager/foreground/images/files/ui/share.png
index bef8677..fe80bebf 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/share.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/share.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/share_white.png b/ui/file_manager/file_manager/foreground/images/files/ui/share_white.png
index 81b7d5e..ce6bf55 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/share_white.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/share_white.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/sort_asc.png b/ui/file_manager/file_manager/foreground/images/files/ui/sort_asc.png
index ed8c7d5..b120ed8 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/sort_asc.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/sort_asc.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/sort_desc.png b/ui/file_manager/file_manager/foreground/images/files/ui/sort_desc.png
index f0b2af0..1da6d017f 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/sort_desc.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/sort_desc.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/store.png b/ui/file_manager/file_manager/foreground/images/files/ui/store.png
index 7a8ad4c..61115d4 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/store.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/store.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/view_list_white.png b/ui/file_manager/file_manager/foreground/images/files/ui/view_list_white.png
index 7a79f86..722593f3 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/view_list_white.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/view_list_white.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/view_thumbnail_white.png b/ui/file_manager/file_manager/foreground/images/files/ui/view_thumbnail_white.png
index 115cee02..7d11864 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/view_thumbnail_white.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/view_thumbnail_white.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/files/ui/warning_white.png b/ui/file_manager/file_manager/foreground/images/files/ui/warning_white.png
index b2efa0d..244e77a7 100644
--- a/ui/file_manager/file_manager/foreground/images/files/ui/warning_white.png
+++ b/ui/file_manager/file_manager/foreground/images/files/ui/warning_white.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_archive.png b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_archive.png
index eacd06e..2da5bd0c 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_archive.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_archive.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_audio.png b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_audio.png
index fb28e22..9312c8e 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_audio.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_audio.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_chart.png b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_chart.png
index e3e8d52..4685927 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_chart.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_chart.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_excel.png b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_excel.png
index b95db329..2983c428 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_excel.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_excel.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_folder.png b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_folder.png
index b15e38b..6528b77b 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_folder.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_folder.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_folder_active.png b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_folder_active.png
index 89be77a9..38a5b08 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_folder_active.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_folder_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_folder_shared.png b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_folder_shared.png
index 567a1972..54b4187d 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_folder_shared.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_folder_shared.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_folder_shared_active.png b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_folder_shared_active.png
index 07d660b3..603eed4 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_folder_shared_active.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_folder_shared_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_form.png b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_form.png
index 6cbd3e6..bac390a 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_form.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_form.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_gdoc.png b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_gdoc.png
index 00355c50..ada3bf3 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_gdoc.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_gdoc.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_gdraw.png b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_gdraw.png
index 355c7ff..8ec1198 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_gdraw.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_gdraw.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_generic.png b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_generic.png
index 47752d5..47451b6 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_generic.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_generic.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_gsheet.png b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_gsheet.png
index d895503..49d2acc 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_gsheet.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_gsheet.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_gsite.png b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_gsite.png
index 593ba0e..43440f7 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_gsite.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_gsite.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_gslides.png b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_gslides.png
index 1315e79c..28001511f 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_gslides.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_gslides.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_gtable.png b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_gtable.png
index c213623c..a1cd251 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_gtable.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_gtable.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_image.png b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_image.png
index 86f727cb..3fb4845 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_image.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_image.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_map.png b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_map.png
index 14bba4f..b3f3bc1 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_map.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_map.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_pdf.png b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_pdf.png
index 5e6d911..568a387b 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_pdf.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_pdf.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_ppt.png b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_ppt.png
index 7e15c0a..ed3e901 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_ppt.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_ppt.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_script.png b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_script.png
index 26bf6b2..cb4ff5a 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_script.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_script.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_sites.png b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_sites.png
index a8e89f1..01ad2c7 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_sites.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_sites.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_team_drive.png b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_team_drive.png
index a51620d..1fa54ff1 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_team_drive.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_team_drive.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_team_drive_active.png b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_team_drive_active.png
index e14cb7a..c744788f 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_team_drive_active.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_team_drive_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_video.png b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_video.png
index de8847e8..f0638fd 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_video.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_video.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_word.png b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_word.png
index ddb77c4..581c664 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_word.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/2x/filetype_word.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/filetype_archive.png b/ui/file_manager/file_manager/foreground/images/filetype/filetype_archive.png
index 6fb4998..69740e4 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/filetype_archive.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/filetype_archive.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/filetype_audio.png b/ui/file_manager/file_manager/foreground/images/filetype/filetype_audio.png
index 31aa4c7..7d72bc3 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/filetype_audio.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/filetype_audio.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/filetype_chart.png b/ui/file_manager/file_manager/foreground/images/filetype/filetype_chart.png
index cdd05c4..44373cea 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/filetype_chart.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/filetype_chart.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/filetype_excel.png b/ui/file_manager/file_manager/foreground/images/filetype/filetype_excel.png
index 8df1935e..668b1bd2 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/filetype_excel.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/filetype_excel.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/filetype_folder.png b/ui/file_manager/file_manager/foreground/images/filetype/filetype_folder.png
index 831263f4..ea141ee2 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/filetype_folder.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/filetype_folder.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/filetype_folder_active.png b/ui/file_manager/file_manager/foreground/images/filetype/filetype_folder_active.png
index b08d493..7ddc7d9 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/filetype_folder_active.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/filetype_folder_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/filetype_folder_shared.png b/ui/file_manager/file_manager/foreground/images/filetype/filetype_folder_shared.png
index fea60e6d..4c253a2 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/filetype_folder_shared.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/filetype_folder_shared.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/filetype_folder_shared_active.png b/ui/file_manager/file_manager/foreground/images/filetype/filetype_folder_shared_active.png
index 0589a97..a1a2b27 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/filetype_folder_shared_active.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/filetype_folder_shared_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/filetype_form.png b/ui/file_manager/file_manager/foreground/images/filetype/filetype_form.png
index c01a3443..25faebe 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/filetype_form.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/filetype_form.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/filetype_gdoc.png b/ui/file_manager/file_manager/foreground/images/filetype/filetype_gdoc.png
index da9d8c4..9a1d1c99 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/filetype_gdoc.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/filetype_gdoc.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/filetype_gdraw.png b/ui/file_manager/file_manager/foreground/images/filetype/filetype_gdraw.png
index 448e4b9..e7d5b2a 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/filetype_gdraw.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/filetype_gdraw.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/filetype_generic.png b/ui/file_manager/file_manager/foreground/images/filetype/filetype_generic.png
index 9ff4caf..9453b87 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/filetype_generic.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/filetype_generic.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/filetype_gsheet.png b/ui/file_manager/file_manager/foreground/images/filetype/filetype_gsheet.png
index daa23e510..7c35302 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/filetype_gsheet.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/filetype_gsheet.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/filetype_gsite.png b/ui/file_manager/file_manager/foreground/images/filetype/filetype_gsite.png
index 10a93bb..8333cf2 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/filetype_gsite.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/filetype_gsite.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/filetype_gslides.png b/ui/file_manager/file_manager/foreground/images/filetype/filetype_gslides.png
index b1235439..7878a5f 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/filetype_gslides.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/filetype_gslides.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/filetype_gtable.png b/ui/file_manager/file_manager/foreground/images/filetype/filetype_gtable.png
index ff6188f1..cfbefa44f 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/filetype_gtable.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/filetype_gtable.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/filetype_image.png b/ui/file_manager/file_manager/foreground/images/filetype/filetype_image.png
index bfc26bb3..04ddbce2 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/filetype_image.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/filetype_image.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/filetype_map.png b/ui/file_manager/file_manager/foreground/images/filetype/filetype_map.png
index 09af631..e3e10c5 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/filetype_map.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/filetype_map.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/filetype_pdf.png b/ui/file_manager/file_manager/foreground/images/filetype/filetype_pdf.png
index cea5a41..8de8f8f8 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/filetype_pdf.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/filetype_pdf.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/filetype_ppt.png b/ui/file_manager/file_manager/foreground/images/filetype/filetype_ppt.png
index 0d03aea..596660e 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/filetype_ppt.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/filetype_ppt.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/filetype_script.png b/ui/file_manager/file_manager/foreground/images/filetype/filetype_script.png
index 8d77c40..6b57b369e 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/filetype_script.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/filetype_script.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/filetype_sites.png b/ui/file_manager/file_manager/foreground/images/filetype/filetype_sites.png
index a2e49c2..1f42004 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/filetype_sites.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/filetype_sites.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/filetype_team_drive.png b/ui/file_manager/file_manager/foreground/images/filetype/filetype_team_drive.png
index e42804fd..a192032 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/filetype_team_drive.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/filetype_team_drive.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/filetype_team_drive_active.png b/ui/file_manager/file_manager/foreground/images/filetype/filetype_team_drive_active.png
index f292ade..c7ad618 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/filetype_team_drive_active.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/filetype_team_drive_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/filetype_video.png b/ui/file_manager/file_manager/foreground/images/filetype/filetype_video.png
index 4dbe2e0..0afea5e 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/filetype_video.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/filetype_video.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/filetype/filetype_word.png b/ui/file_manager/file_manager/foreground/images/filetype/filetype_word.png
index 390d09d4..715fce4c 100644
--- a/ui/file_manager/file_manager/foreground/images/filetype/filetype_word.png
+++ b/ui/file_manager/file_manager/foreground/images/filetype/filetype_word.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_archive.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_archive.png
index eacd06e..2da5bd0c 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_archive.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_archive.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_audio.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_audio.png
index 1f904f0..a69d8ec 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_audio.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_audio.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_chart.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_chart.png
index 9184c43b..e9034288 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_chart.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_chart.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_excel.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_excel.png
index 5c88525..c26d512 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_excel.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_excel.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_folder.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_folder.png
index e270776..cd62332 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_folder.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_folder.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_form.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_form.png
index 5c1bbad1..c00f523f 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_form.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_form.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_gdoc.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_gdoc.png
index 13773d4..2e87535 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_gdoc.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_gdoc.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_gdraw.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_gdraw.png
index 57a783b..66835a3f 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_gdraw.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_gdraw.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_generic.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_generic.png
index e13ca09..bd48ff0 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_generic.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_generic.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_gsheet.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_gsheet.png
index c2e929a..f052329 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_gsheet.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_gsheet.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_gsite.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_gsite.png
index 593ba0e..43440f7 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_gsite.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_gsite.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_gslides.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_gslides.png
index 4fc3d297..c8089b5 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_gslides.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_gslides.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_gtable.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_gtable.png
index c5522789..a30b41f 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_gtable.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_gtable.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_image.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_image.png
index 864d718..e13b6eb 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_image.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_image.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_map.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_map.png
index b7eee942..697a289b 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_map.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_map.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_pdf.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_pdf.png
index e94ea5c..08c35ee 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_pdf.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_pdf.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_ppt.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_ppt.png
index b1ed30b..9360184f 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_ppt.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_ppt.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_script.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_script.png
index d191cda3..c883d424 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_script.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_script.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_shared.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_shared.png
index 8db0c5a1..6b04c946 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_shared.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_shared.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_sites.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_sites.png
index 06a7b31..e565042 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_sites.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_sites.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_tini.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_tini.png
index 020c786..d27d9516 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_tini.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_tini.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_video.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_video.png
index 4618011..5f65006 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_video.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_video.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_word.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_word.png
index 3cd89479..a6bffbd 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_word.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/2x/launcher_filetype_word.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_archive.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_archive.png
index 6fb4998..69740e4 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_archive.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_archive.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_audio.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_audio.png
index cdec77b..871ceac 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_audio.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_audio.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_chart.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_chart.png
index 2dc4d064..e1349e41 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_chart.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_chart.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_excel.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_excel.png
index e734419b..f69391a 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_excel.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_excel.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_folder.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_folder.png
index 49c41935..705eea5 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_folder.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_folder.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_form.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_form.png
index e849e9da1..c9d7bed0 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_form.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_form.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_gdoc.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_gdoc.png
index ef49d881..01de01d3 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_gdoc.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_gdoc.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_gdraw.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_gdraw.png
index ace9613..a63b4182 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_gdraw.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_gdraw.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_generic.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_generic.png
index a46c66c8..c056a4a 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_generic.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_generic.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_gsheet.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_gsheet.png
index 803cc24..554ea60 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_gsheet.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_gsheet.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_gsite.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_gsite.png
index 10a93bb..8333cf2 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_gsite.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_gsite.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_gslides.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_gslides.png
index b2253ad8..7d88ead 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_gslides.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_gslides.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_gtable.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_gtable.png
index 4458d466..ef94e5a 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_gtable.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_gtable.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_image.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_image.png
index f7ba01b4..3094ad8b 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_image.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_image.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_map.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_map.png
index eada3fe..a0406a8b 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_map.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_map.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_pdf.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_pdf.png
index e0262be..3e05663 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_pdf.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_pdf.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_ppt.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_ppt.png
index 849a592..05256a4 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_ppt.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_ppt.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_script.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_script.png
index 425fb90..d6c076e 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_script.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_script.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_shared.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_shared.png
index d41286c..1ea89b2 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_shared.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_shared.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_sites.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_sites.png
index 5141e9d..f63e43ff 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_sites.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_sites.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_tini.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_tini.png
index c4a76e8..b105f05a 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_tini.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_tini.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_video.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_video.png
index 1a15d01..0fb0040 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_video.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_video.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_word.png b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_word.png
index e3106f01..178214e 100644
--- a/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_word.png
+++ b/ui/file_manager/file_manager/foreground/images/launcher_filetypes/launcher_filetype_word.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/android.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/android.png
index ec56561..ec72af6 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/android.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/android.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/android_active.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/android_active.png
index d76b02ec..5547298 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/android_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/android_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/archive.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/archive.png
index eacd06e..2da5bd0c 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/archive.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/archive.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/archive_active.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/archive_active.png
index 51f2fb7..ecf1f5f8 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/archive_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/archive_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/audio.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/audio.png
index 94f018f..2b89c4e3 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/audio.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/audio.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/audio_active.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/audio_active.png
index e4f9d4d..06dbbb0 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/audio_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/audio_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/cd.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/cd.png
index a498489d..2b9a368 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/cd.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/cd.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/cd_active.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/cd_active.png
index 63a088a0..de89ab1 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/cd_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/cd_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/computer.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/computer.png
index 862c253..d62cdda 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/computer.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/computer.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/computer_active.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/computer_active.png
index fe31bf1..789d9fc 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/computer_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/computer_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/devices.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/devices.png
index 192f620..33b93ea 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/devices.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/devices.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/devices_active.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/devices_active.png
index 4320b39f..a810be7 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/devices_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/devices_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/downloads.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/downloads.png
index 734d724..5b8cfe57 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/downloads.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/downloads.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/downloads_active.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/downloads_active.png
index d75134d..b8a057e 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/downloads_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/downloads_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/drive.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/drive.png
index dd34400d..bb086fc 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/drive.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/drive.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/drive_active.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/drive_active.png
index 4bb66df..d9a6764 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/drive_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/drive_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/hard_drive.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/hard_drive.png
index e1642f8..482ec04 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/hard_drive.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/hard_drive.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/hard_drive_active.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/hard_drive_active.png
index 5c0679c5..8fc711af 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/hard_drive_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/hard_drive_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/images.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/images.png
index 685ed43..78b23a0 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/images.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/images.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/images_active.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/images_active.png
index f0a9a84..0910951b 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/images_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/images_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/linux_files.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/linux_files.png
index 020c786..d27d9516 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/linux_files.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/linux_files.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/linux_files_active.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/linux_files_active.png
index ed90b384..05eaca65 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/linux_files_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/linux_files_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/my_files.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/my_files.png
index f437d63..d37949d 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/my_files.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/my_files.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/my_files_active.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/my_files_active.png
index c1ac0418..0c4db82 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/my_files_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/my_files_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/offline.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/offline.png
index 7884d86..3858ce2 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/offline.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/offline.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/offline_active.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/offline_active.png
index faf60be..3ab55acd 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/offline_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/offline_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/phone.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/phone.png
index c9ce8d8..5626bb2a3 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/phone.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/phone.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/phone_active.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/phone_active.png
index a2b7241..170f78b 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/phone_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/phone_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/recent.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/recent.png
index 950a302..46837bf 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/recent.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/recent.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/recent_active.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/recent_active.png
index 8ff878e..4f82b40c 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/recent_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/recent_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/sd.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/sd.png
index 8aaea79..b8b17eb 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/sd.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/sd.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/sd_active.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/sd_active.png
index 00bceb2..7c758ac 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/sd_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/sd_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/service_drive.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/service_drive.png
index 199629b..4b55d2c 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/service_drive.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/service_drive.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/service_drive_active.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/service_drive_active.png
index b7d87d55..003dd93c 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/service_drive_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/service_drive_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/shared.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/shared.png
index 2fb81dd..ad2986a9 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/shared.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/shared.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/shared_active.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/shared_active.png
index 5b2f201..4f89d83 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/shared_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/shared_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/shortcut.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/shortcut.png
index 9974120e..7624712 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/shortcut.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/shortcut.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/shortcut_active.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/shortcut_active.png
index 9737774..5f3b010 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/shortcut_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/shortcut_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/team_drive.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/team_drive.png
index a51620d..1fa54ff1 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/team_drive.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/team_drive.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/team_drive_active.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/team_drive_active.png
index e14cb7a..c744788f 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/team_drive_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/team_drive_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/usb.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/usb.png
index f749bcd..985ecac 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/usb.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/usb.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/usb_active.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/usb_active.png
index 36834e9..e1b9ccf 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/usb_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/usb_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/videos.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/videos.png
index 3c23e32f..c5fe4e5 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/videos.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/videos.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/2x/videos_active.png b/ui/file_manager/file_manager/foreground/images/volumes/2x/videos_active.png
index e774fc15..272498c 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/2x/videos_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/2x/videos_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/android.png b/ui/file_manager/file_manager/foreground/images/volumes/android.png
index 75daced..854d18bd 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/android.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/android.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/android_active.png b/ui/file_manager/file_manager/foreground/images/volumes/android_active.png
index 2e4f990..a9d40c5 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/android_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/android_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/archive.png b/ui/file_manager/file_manager/foreground/images/volumes/archive.png
index 745e78b61..eaa55296 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/archive.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/archive.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/archive_active.png b/ui/file_manager/file_manager/foreground/images/volumes/archive_active.png
index 1ab9c0df..aecf342 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/archive_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/archive_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/audio.png b/ui/file_manager/file_manager/foreground/images/volumes/audio.png
index 7ad30ec..81a1423 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/audio.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/audio.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/audio_active.png b/ui/file_manager/file_manager/foreground/images/volumes/audio_active.png
index 1e4ea54..35bd6fa 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/audio_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/audio_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/cd.png b/ui/file_manager/file_manager/foreground/images/volumes/cd.png
index 76fbe68..8677a90 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/cd.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/cd.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/cd_active.png b/ui/file_manager/file_manager/foreground/images/volumes/cd_active.png
index 37aea8a..27244eb 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/cd_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/cd_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/computer.png b/ui/file_manager/file_manager/foreground/images/volumes/computer.png
index c22dcab..c0c7039f 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/computer.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/computer.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/computer_active.png b/ui/file_manager/file_manager/foreground/images/volumes/computer_active.png
index fa9080a..22c9a213 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/computer_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/computer_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/devices.png b/ui/file_manager/file_manager/foreground/images/volumes/devices.png
index ecd72c7..cd34d57 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/devices.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/devices.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/devices_active.png b/ui/file_manager/file_manager/foreground/images/volumes/devices_active.png
index 0c4eb5e3..1048210a 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/devices_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/devices_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/downloads.png b/ui/file_manager/file_manager/foreground/images/volumes/downloads.png
index 8580ab29..3043558 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/downloads.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/downloads.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/downloads_active.png b/ui/file_manager/file_manager/foreground/images/volumes/downloads_active.png
index e11efe6..48660af0 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/downloads_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/downloads_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/drive.png b/ui/file_manager/file_manager/foreground/images/volumes/drive.png
index 7cc37971..39f375e 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/drive.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/drive.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/drive_active.png b/ui/file_manager/file_manager/foreground/images/volumes/drive_active.png
index 18bdcf3f..7ef629f 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/drive_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/drive_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/hard_drive.png b/ui/file_manager/file_manager/foreground/images/volumes/hard_drive.png
index 1ab253c..24fab8f 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/hard_drive.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/hard_drive.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/hard_drive_active.png b/ui/file_manager/file_manager/foreground/images/volumes/hard_drive_active.png
index 5792b56..ebb68221 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/hard_drive_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/hard_drive_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/images.png b/ui/file_manager/file_manager/foreground/images/volumes/images.png
index 7bb644f5..2d2d9fa 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/images.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/images.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/images_active.png b/ui/file_manager/file_manager/foreground/images/volumes/images_active.png
index 92a67cf..c60b9107 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/images_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/images_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/linux_files.png b/ui/file_manager/file_manager/foreground/images/volumes/linux_files.png
index c4a76e8..b105f05a 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/linux_files.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/linux_files.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/linux_files_active.png b/ui/file_manager/file_manager/foreground/images/volumes/linux_files_active.png
index cf67c13..e29a786 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/linux_files_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/linux_files_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/my_files.png b/ui/file_manager/file_manager/foreground/images/volumes/my_files.png
index 5533feb..6ce8b72 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/my_files.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/my_files.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/my_files_active.png b/ui/file_manager/file_manager/foreground/images/volumes/my_files_active.png
index 65cca4e..b8a0506 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/my_files_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/my_files_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/offline.png b/ui/file_manager/file_manager/foreground/images/volumes/offline.png
index fde23ba..a3a59ee 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/offline.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/offline.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/offline_active.png b/ui/file_manager/file_manager/foreground/images/volumes/offline_active.png
index 357d3f1e..5ac8595 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/offline_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/offline_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/phone.png b/ui/file_manager/file_manager/foreground/images/volumes/phone.png
index 59ccc05..2febbcf 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/phone.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/phone.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/phone_active.png b/ui/file_manager/file_manager/foreground/images/volumes/phone_active.png
index d8a55df5..59371214 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/phone_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/phone_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/recent.png b/ui/file_manager/file_manager/foreground/images/volumes/recent.png
index 0bc542c2..206867d 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/recent.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/recent.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/recent_active.png b/ui/file_manager/file_manager/foreground/images/volumes/recent_active.png
index cf22671..480855d 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/recent_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/recent_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/sd.png b/ui/file_manager/file_manager/foreground/images/volumes/sd.png
index a6e1ccf..2482c91 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/sd.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/sd.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/sd_active.png b/ui/file_manager/file_manager/foreground/images/volumes/sd_active.png
index 81e3323..6110ab5 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/sd_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/sd_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/service_drive.png b/ui/file_manager/file_manager/foreground/images/volumes/service_drive.png
index e54508bd..0d0eb58 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/service_drive.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/service_drive.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/service_drive_active.png b/ui/file_manager/file_manager/foreground/images/volumes/service_drive_active.png
index b351cbb4..498c77a6 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/service_drive_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/service_drive_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/shared.png b/ui/file_manager/file_manager/foreground/images/volumes/shared.png
index f91b744..c55eb90 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/shared.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/shared.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/shared_active.png b/ui/file_manager/file_manager/foreground/images/volumes/shared_active.png
index 70140865..20b0d52a 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/shared_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/shared_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/shortcut.png b/ui/file_manager/file_manager/foreground/images/volumes/shortcut.png
index c50218ab..471c49f 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/shortcut.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/shortcut.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/shortcut_active.png b/ui/file_manager/file_manager/foreground/images/volumes/shortcut_active.png
index 46df6a9a..18a83cc 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/shortcut_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/shortcut_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/team_drive.png b/ui/file_manager/file_manager/foreground/images/volumes/team_drive.png
index e42804fd..a192032 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/team_drive.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/team_drive.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/team_drive_active.png b/ui/file_manager/file_manager/foreground/images/volumes/team_drive_active.png
index f292ade..c7ad618 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/team_drive_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/team_drive_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/usb.png b/ui/file_manager/file_manager/foreground/images/volumes/usb.png
index e725e9f..97e42c5 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/usb.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/usb.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/usb_active.png b/ui/file_manager/file_manager/foreground/images/volumes/usb_active.png
index cbf6007..c867ae8 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/usb_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/usb_active.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/videos.png b/ui/file_manager/file_manager/foreground/images/volumes/videos.png
index bef8132..a796951 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/videos.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/videos.png
Binary files differ
diff --git a/ui/file_manager/file_manager/foreground/images/volumes/videos_active.png b/ui/file_manager/file_manager/foreground/images/volumes/videos_active.png
index 3bc025d..cdf5e5df 100644
--- a/ui/file_manager/file_manager/foreground/images/volumes/videos_active.png
+++ b/ui/file_manager/file_manager/foreground/images/volumes/videos_active.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/100/auto_fix.png b/ui/file_manager/gallery/images/100/auto_fix.png
index 73a8210..c6a5df9b 100644
--- a/ui/file_manager/gallery/images/100/auto_fix.png
+++ b/ui/file_manager/gallery/images/100/auto_fix.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/100/brightness.png b/ui/file_manager/gallery/images/100/brightness.png
index 9a1b95c..b187b00 100644
--- a/ui/file_manager/gallery/images/100/brightness.png
+++ b/ui/file_manager/gallery/images/100/brightness.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/100/contrast.png b/ui/file_manager/gallery/images/100/contrast.png
index 3d637375..eb3a157 100644
--- a/ui/file_manager/gallery/images/100/contrast.png
+++ b/ui/file_manager/gallery/images/100/contrast.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/100/crop.png b/ui/file_manager/gallery/images/100/crop.png
index df7e8f3..7a484b10 100644
--- a/ui/file_manager/gallery/images/100/crop.png
+++ b/ui/file_manager/gallery/images/100/crop.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/100/delete.png b/ui/file_manager/gallery/images/100/delete.png
index 0d251bfe..dba537da 100644
--- a/ui/file_manager/gallery/images/100/delete.png
+++ b/ui/file_manager/gallery/images/100/delete.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/100/edit.png b/ui/file_manager/gallery/images/100/edit.png
index 175cde6..1aa1df9b 100644
--- a/ui/file_manager/gallery/images/100/edit.png
+++ b/ui/file_manager/gallery/images/100/edit.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/100/error.png b/ui/file_manager/gallery/images/100/error.png
index 125c0b7..bfae452 100644
--- a/ui/file_manager/gallery/images/100/error.png
+++ b/ui/file_manager/gallery/images/100/error.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/100/mosaic_view.png b/ui/file_manager/gallery/images/100/mosaic_view.png
index 115cee02..7d11864 100644
--- a/ui/file_manager/gallery/images/100/mosaic_view.png
+++ b/ui/file_manager/gallery/images/100/mosaic_view.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/100/print.png b/ui/file_manager/gallery/images/100/print.png
index c31be896..d081b58 100644
--- a/ui/file_manager/gallery/images/100/print.png
+++ b/ui/file_manager/gallery/images/100/print.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/100/ratio_locked.png b/ui/file_manager/gallery/images/100/ratio_locked.png
index ec539b9..f4e75f7 100644
--- a/ui/file_manager/gallery/images/100/ratio_locked.png
+++ b/ui/file_manager/gallery/images/100/ratio_locked.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/100/ratio_unlocked.png b/ui/file_manager/gallery/images/100/ratio_unlocked.png
index 25242b7..b0bc2fa78 100644
--- a/ui/file_manager/gallery/images/100/ratio_unlocked.png
+++ b/ui/file_manager/gallery/images/100/ratio_unlocked.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/100/redo.png b/ui/file_manager/gallery/images/100/redo.png
index dc3ea0e..d1881e47 100644
--- a/ui/file_manager/gallery/images/100/redo.png
+++ b/ui/file_manager/gallery/images/100/redo.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/100/resize.png b/ui/file_manager/gallery/images/100/resize.png
index 7ebc15c..49289189 100644
--- a/ui/file_manager/gallery/images/100/resize.png
+++ b/ui/file_manager/gallery/images/100/resize.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/100/rotate_left.png b/ui/file_manager/gallery/images/100/rotate_left.png
index c8853b7..ae04831 100644
--- a/ui/file_manager/gallery/images/100/rotate_left.png
+++ b/ui/file_manager/gallery/images/100/rotate_left.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/100/rotate_right.png b/ui/file_manager/gallery/images/100/rotate_right.png
index 39dd272..e1f7c5a 100644
--- a/ui/file_manager/gallery/images/100/rotate_right.png
+++ b/ui/file_manager/gallery/images/100/rotate_right.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/100/share.png b/ui/file_manager/gallery/images/100/share.png
index 73434ac..e7032a63 100644
--- a/ui/file_manager/gallery/images/100/share.png
+++ b/ui/file_manager/gallery/images/100/share.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/100/slide_view.png b/ui/file_manager/gallery/images/100/slide_view.png
index b033319..0820889 100644
--- a/ui/file_manager/gallery/images/100/slide_view.png
+++ b/ui/file_manager/gallery/images/100/slide_view.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/100/slideshow.png b/ui/file_manager/gallery/images/100/slideshow.png
index 72434a86..90affd6 100644
--- a/ui/file_manager/gallery/images/100/slideshow.png
+++ b/ui/file_manager/gallery/images/100/slideshow.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/100/slideshow_close.png b/ui/file_manager/gallery/images/100/slideshow_close.png
index 5192684..89fa710 100644
--- a/ui/file_manager/gallery/images/100/slideshow_close.png
+++ b/ui/file_manager/gallery/images/100/slideshow_close.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/100/slideshow_next.png b/ui/file_manager/gallery/images/100/slideshow_next.png
index 02e06c3..30b0b5a 100644
--- a/ui/file_manager/gallery/images/100/slideshow_next.png
+++ b/ui/file_manager/gallery/images/100/slideshow_next.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/100/slideshow_pause.png b/ui/file_manager/gallery/images/100/slideshow_pause.png
index bf42fd22..d5ad8b5 100644
--- a/ui/file_manager/gallery/images/100/slideshow_pause.png
+++ b/ui/file_manager/gallery/images/100/slideshow_pause.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/100/slideshow_play.png b/ui/file_manager/gallery/images/100/slideshow_play.png
index cec9a38..e19071ad 100644
--- a/ui/file_manager/gallery/images/100/slideshow_play.png
+++ b/ui/file_manager/gallery/images/100/slideshow_play.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/100/slideshow_previous.png b/ui/file_manager/gallery/images/100/slideshow_previous.png
index a77d17a..35e2d4d 100644
--- a/ui/file_manager/gallery/images/100/slideshow_previous.png
+++ b/ui/file_manager/gallery/images/100/slideshow_previous.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/100/undo.png b/ui/file_manager/gallery/images/100/undo.png
index fa8b2ce..3c8bd33a 100644
--- a/ui/file_manager/gallery/images/100/undo.png
+++ b/ui/file_manager/gallery/images/100/undo.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/200/auto_fix.png b/ui/file_manager/gallery/images/200/auto_fix.png
index 9254f43..4e93aff 100644
--- a/ui/file_manager/gallery/images/200/auto_fix.png
+++ b/ui/file_manager/gallery/images/200/auto_fix.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/200/brightness.png b/ui/file_manager/gallery/images/200/brightness.png
index 5307651..54e3d9ad 100644
--- a/ui/file_manager/gallery/images/200/brightness.png
+++ b/ui/file_manager/gallery/images/200/brightness.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/200/contrast.png b/ui/file_manager/gallery/images/200/contrast.png
index e40b8392..cc9ad25 100644
--- a/ui/file_manager/gallery/images/200/contrast.png
+++ b/ui/file_manager/gallery/images/200/contrast.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/200/crop.png b/ui/file_manager/gallery/images/200/crop.png
index 138815b..e9c2e95 100644
--- a/ui/file_manager/gallery/images/200/crop.png
+++ b/ui/file_manager/gallery/images/200/crop.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/200/delete.png b/ui/file_manager/gallery/images/200/delete.png
index b3e9036..6d1aafb 100644
--- a/ui/file_manager/gallery/images/200/delete.png
+++ b/ui/file_manager/gallery/images/200/delete.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/200/edit.png b/ui/file_manager/gallery/images/200/edit.png
index 7444fc4..4570fe71 100644
--- a/ui/file_manager/gallery/images/200/edit.png
+++ b/ui/file_manager/gallery/images/200/edit.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/200/mosaic_view.png b/ui/file_manager/gallery/images/200/mosaic_view.png
index d5e77783..04f11fb 100644
--- a/ui/file_manager/gallery/images/200/mosaic_view.png
+++ b/ui/file_manager/gallery/images/200/mosaic_view.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/200/print.png b/ui/file_manager/gallery/images/200/print.png
index ce9aee8..5f2e0f9 100644
--- a/ui/file_manager/gallery/images/200/print.png
+++ b/ui/file_manager/gallery/images/200/print.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/200/ratio_locked.png b/ui/file_manager/gallery/images/200/ratio_locked.png
index cd73dae..024f417 100644
--- a/ui/file_manager/gallery/images/200/ratio_locked.png
+++ b/ui/file_manager/gallery/images/200/ratio_locked.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/200/ratio_unlocked.png b/ui/file_manager/gallery/images/200/ratio_unlocked.png
index a1e888a..bf3f2ddd 100644
--- a/ui/file_manager/gallery/images/200/ratio_unlocked.png
+++ b/ui/file_manager/gallery/images/200/ratio_unlocked.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/200/redo.png b/ui/file_manager/gallery/images/200/redo.png
index 9b00ae9c..fe8f1af 100644
--- a/ui/file_manager/gallery/images/200/redo.png
+++ b/ui/file_manager/gallery/images/200/redo.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/200/resize.png b/ui/file_manager/gallery/images/200/resize.png
index b333b02..6992b6a 100644
--- a/ui/file_manager/gallery/images/200/resize.png
+++ b/ui/file_manager/gallery/images/200/resize.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/200/rotate_left.png b/ui/file_manager/gallery/images/200/rotate_left.png
index 54a8d7d..4164fed 100644
--- a/ui/file_manager/gallery/images/200/rotate_left.png
+++ b/ui/file_manager/gallery/images/200/rotate_left.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/200/rotate_right.png b/ui/file_manager/gallery/images/200/rotate_right.png
index e6ac23e..cc2850b56 100644
--- a/ui/file_manager/gallery/images/200/rotate_right.png
+++ b/ui/file_manager/gallery/images/200/rotate_right.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/200/share.png b/ui/file_manager/gallery/images/200/share.png
index 734f566..8cfa9c6 100644
--- a/ui/file_manager/gallery/images/200/share.png
+++ b/ui/file_manager/gallery/images/200/share.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/200/slide_view.png b/ui/file_manager/gallery/images/200/slide_view.png
index acd2f8f2..1acaebb 100644
--- a/ui/file_manager/gallery/images/200/slide_view.png
+++ b/ui/file_manager/gallery/images/200/slide_view.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/200/slideshow.png b/ui/file_manager/gallery/images/200/slideshow.png
index ffa67ad..88f3d387 100644
--- a/ui/file_manager/gallery/images/200/slideshow.png
+++ b/ui/file_manager/gallery/images/200/slideshow.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/200/slideshow_close.png b/ui/file_manager/gallery/images/200/slideshow_close.png
index e668f03..72c9bba 100644
--- a/ui/file_manager/gallery/images/200/slideshow_close.png
+++ b/ui/file_manager/gallery/images/200/slideshow_close.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/200/slideshow_next.png b/ui/file_manager/gallery/images/200/slideshow_next.png
index c666fd5..a75aa463 100644
--- a/ui/file_manager/gallery/images/200/slideshow_next.png
+++ b/ui/file_manager/gallery/images/200/slideshow_next.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/200/slideshow_pause.png b/ui/file_manager/gallery/images/200/slideshow_pause.png
index 362e993..faadb613 100644
--- a/ui/file_manager/gallery/images/200/slideshow_pause.png
+++ b/ui/file_manager/gallery/images/200/slideshow_pause.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/200/slideshow_play.png b/ui/file_manager/gallery/images/200/slideshow_play.png
index 0d89f0ba..a5689d7 100644
--- a/ui/file_manager/gallery/images/200/slideshow_play.png
+++ b/ui/file_manager/gallery/images/200/slideshow_play.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/200/slideshow_previous.png b/ui/file_manager/gallery/images/200/slideshow_previous.png
index caf02a61..a369a59 100644
--- a/ui/file_manager/gallery/images/200/slideshow_previous.png
+++ b/ui/file_manager/gallery/images/200/slideshow_previous.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/200/undo.png b/ui/file_manager/gallery/images/200/undo.png
index f56b790..9ba6c0e1 100644
--- a/ui/file_manager/gallery/images/200/undo.png
+++ b/ui/file_manager/gallery/images/200/undo.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/icon128.png b/ui/file_manager/gallery/images/icon128.png
index 5a78096..a52584e 100644
--- a/ui/file_manager/gallery/images/icon128.png
+++ b/ui/file_manager/gallery/images/icon128.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/icon16.png b/ui/file_manager/gallery/images/icon16.png
index d153978..dc7226d6 100644
--- a/ui/file_manager/gallery/images/icon16.png
+++ b/ui/file_manager/gallery/images/icon16.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/icon192.png b/ui/file_manager/gallery/images/icon192.png
index 991d3f3..6b0cf10 100644
--- a/ui/file_manager/gallery/images/icon192.png
+++ b/ui/file_manager/gallery/images/icon192.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/icon256.png b/ui/file_manager/gallery/images/icon256.png
index b641602f..fb7714a 100644
--- a/ui/file_manager/gallery/images/icon256.png
+++ b/ui/file_manager/gallery/images/icon256.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/icon32.png b/ui/file_manager/gallery/images/icon32.png
index 849062c4c..341bbb325 100644
--- a/ui/file_manager/gallery/images/icon32.png
+++ b/ui/file_manager/gallery/images/icon32.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/icon48.png b/ui/file_manager/gallery/images/icon48.png
index 5fc01d92..a51016f 100644
--- a/ui/file_manager/gallery/images/icon48.png
+++ b/ui/file_manager/gallery/images/icon48.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/icon64.png b/ui/file_manager/gallery/images/icon64.png
index cde916bc..8b12ee6 100644
--- a/ui/file_manager/gallery/images/icon64.png
+++ b/ui/file_manager/gallery/images/icon64.png
Binary files differ
diff --git a/ui/file_manager/gallery/images/icon96.png b/ui/file_manager/gallery/images/icon96.png
index 53d5fc6..34f8dc33 100644
--- a/ui/file_manager/gallery/images/icon96.png
+++ b/ui/file_manager/gallery/images/icon96.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/100/arrow_left.png b/ui/file_manager/video_player/images/100/arrow_left.png
index f5b1ef3b..e20629d 100644
--- a/ui/file_manager/video_player/images/100/arrow_left.png
+++ b/ui/file_manager/video_player/images/100/arrow_left.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/100/arrow_right.png b/ui/file_manager/video_player/images/100/arrow_right.png
index 100342d..3d84170 100644
--- a/ui/file_manager/video_player/images/100/arrow_right.png
+++ b/ui/file_manager/video_player/images/100/arrow_right.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/100/cast_big.png b/ui/file_manager/video_player/images/100/cast_big.png
index 7703e20..8c16398 100644
--- a/ui/file_manager/video_player/images/100/cast_big.png
+++ b/ui/file_manager/video_player/images/100/cast_big.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/100/error.png b/ui/file_manager/video_player/images/100/error.png
index 125c0b7..bfae452 100644
--- a/ui/file_manager/video_player/images/100/error.png
+++ b/ui/file_manager/video_player/images/100/error.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/200/arrow_left.png b/ui/file_manager/video_player/images/200/arrow_left.png
index 9f79a6e3b2..9268e21 100644
--- a/ui/file_manager/video_player/images/200/arrow_left.png
+++ b/ui/file_manager/video_player/images/200/arrow_left.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/200/arrow_right.png b/ui/file_manager/video_player/images/200/arrow_right.png
index 39e6b8b..d7c2616 100644
--- a/ui/file_manager/video_player/images/200/arrow_right.png
+++ b/ui/file_manager/video_player/images/200/arrow_right.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/200/cast_big.png b/ui/file_manager/video_player/images/200/cast_big.png
index 8c52382..6521d4a 100644
--- a/ui/file_manager/video_player/images/200/cast_big.png
+++ b/ui/file_manager/video_player/images/200/cast_big.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/icon/video-player-128.png b/ui/file_manager/video_player/images/icon/video-player-128.png
index e1c081c..914dafb5 100644
--- a/ui/file_manager/video_player/images/icon/video-player-128.png
+++ b/ui/file_manager/video_player/images/icon/video-player-128.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/icon/video-player-16.png b/ui/file_manager/video_player/images/icon/video-player-16.png
index 9e070a3..47ec955 100644
--- a/ui/file_manager/video_player/images/icon/video-player-16.png
+++ b/ui/file_manager/video_player/images/icon/video-player-16.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/icon/video-player-192.png b/ui/file_manager/video_player/images/icon/video-player-192.png
index f93b2be..93fee294 100644
--- a/ui/file_manager/video_player/images/icon/video-player-192.png
+++ b/ui/file_manager/video_player/images/icon/video-player-192.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/icon/video-player-256.png b/ui/file_manager/video_player/images/icon/video-player-256.png
index 2ca2b13..8b6175a 100644
--- a/ui/file_manager/video_player/images/icon/video-player-256.png
+++ b/ui/file_manager/video_player/images/icon/video-player-256.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/icon/video-player-32.png b/ui/file_manager/video_player/images/icon/video-player-32.png
index ad396a0..440fe28c 100644
--- a/ui/file_manager/video_player/images/icon/video-player-32.png
+++ b/ui/file_manager/video_player/images/icon/video-player-32.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/icon/video-player-48.png b/ui/file_manager/video_player/images/icon/video-player-48.png
index d6b8e4d7..e5d1208 100644
--- a/ui/file_manager/video_player/images/icon/video-player-48.png
+++ b/ui/file_manager/video_player/images/icon/video-player-48.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/icon/video-player-64.png b/ui/file_manager/video_player/images/icon/video-player-64.png
index 1ff59fbe..2358f02 100644
--- a/ui/file_manager/video_player/images/icon/video-player-64.png
+++ b/ui/file_manager/video_player/images/icon/video-player-64.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/icon/video-player-96.png b/ui/file_manager/video_player/images/icon/video-player-96.png
index 7e767d61..85766c4 100644
--- a/ui/file_manager/video_player/images/icon/video-player-96.png
+++ b/ui/file_manager/video_player/images/icon/video-player-96.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/icon/video-player-favicon-16.png b/ui/file_manager/video_player/images/icon/video-player-favicon-16.png
index f686584..7bbeb90 100644
--- a/ui/file_manager/video_player/images/icon/video-player-favicon-16.png
+++ b/ui/file_manager/video_player/images/icon/video-player-favicon-16.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/icon/video-player-favicon-32.png b/ui/file_manager/video_player/images/icon/video-player-favicon-32.png
index 61bb7c6..6f13b868 100644
--- a/ui/file_manager/video_player/images/icon/video-player-favicon-32.png
+++ b/ui/file_manager/video_player/images/icon/video-player-favicon-32.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/media/2x/media_check.png b/ui/file_manager/video_player/images/media/2x/media_check.png
index 436b5f3..284d93d 100644
--- a/ui/file_manager/video_player/images/media/2x/media_check.png
+++ b/ui/file_manager/video_player/images/media/2x/media_check.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/media/2x/media_chromecast.png b/ui/file_manager/video_player/images/media/2x/media_chromecast.png
index 0cfc6b27..6a1ff85 100644
--- a/ui/file_manager/video_player/images/media/2x/media_chromecast.png
+++ b/ui/file_manager/video_player/images/media/2x/media_chromecast.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/media/2x/media_chromecast_casting.png b/ui/file_manager/video_player/images/media/2x/media_chromecast_casting.png
index bdb44db..d30ee6c4 100644
--- a/ui/file_manager/video_player/images/media/2x/media_chromecast_casting.png
+++ b/ui/file_manager/video_player/images/media/2x/media_chromecast_casting.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/media/2x/media_fullscreen.png b/ui/file_manager/video_player/images/media/2x/media_fullscreen.png
index 59f1d77..e0ac7b55 100644
--- a/ui/file_manager/video_player/images/media/2x/media_fullscreen.png
+++ b/ui/file_manager/video_player/images/media/2x/media_fullscreen.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/media/2x/media_fullscreen_exit.png b/ui/file_manager/video_player/images/media/2x/media_fullscreen_exit.png
index 3960331..c517513 100644
--- a/ui/file_manager/video_player/images/media/2x/media_fullscreen_exit.png
+++ b/ui/file_manager/video_player/images/media/2x/media_fullscreen_exit.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/media/2x/media_pause.png b/ui/file_manager/video_player/images/media/2x/media_pause.png
index 883ca6e..5e71f9ac 100644
--- a/ui/file_manager/video_player/images/media/2x/media_pause.png
+++ b/ui/file_manager/video_player/images/media/2x/media_pause.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/media/2x/media_pause_onscreen.png b/ui/file_manager/video_player/images/media/2x/media_pause_onscreen.png
index a23d64d..bd33792 100644
--- a/ui/file_manager/video_player/images/media/2x/media_pause_onscreen.png
+++ b/ui/file_manager/video_player/images/media/2x/media_pause_onscreen.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/media/2x/media_play.png b/ui/file_manager/video_player/images/media/2x/media_play.png
index d2413af..b848dc9 100644
--- a/ui/file_manager/video_player/images/media/2x/media_play.png
+++ b/ui/file_manager/video_player/images/media/2x/media_play.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/media/2x/media_play_onscreen.png b/ui/file_manager/video_player/images/media/2x/media_play_onscreen.png
index fcc9937..7faa7f5 100644
--- a/ui/file_manager/video_player/images/media/2x/media_play_onscreen.png
+++ b/ui/file_manager/video_player/images/media/2x/media_play_onscreen.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/media/2x/media_subtitles.png b/ui/file_manager/video_player/images/media/2x/media_subtitles.png
index 73cb8ef..f5c80de0 100644
--- a/ui/file_manager/video_player/images/media/2x/media_subtitles.png
+++ b/ui/file_manager/video_player/images/media/2x/media_subtitles.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/media/2x/media_volume.png b/ui/file_manager/video_player/images/media/2x/media_volume.png
index 27edb81..5b837b5 100644
--- a/ui/file_manager/video_player/images/media/2x/media_volume.png
+++ b/ui/file_manager/video_player/images/media/2x/media_volume.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/media/2x/media_volume_mute.png b/ui/file_manager/video_player/images/media/2x/media_volume_mute.png
index 211d1c9..e0a5326a 100644
--- a/ui/file_manager/video_player/images/media/2x/media_volume_mute.png
+++ b/ui/file_manager/video_player/images/media/2x/media_volume_mute.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/media/media_check.png b/ui/file_manager/video_player/images/media/media_check.png
index 3c52cc5e..ab43376 100644
--- a/ui/file_manager/video_player/images/media/media_check.png
+++ b/ui/file_manager/video_player/images/media/media_check.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/media/media_chromecast.png b/ui/file_manager/video_player/images/media/media_chromecast.png
index c6b57dc..29590689 100644
--- a/ui/file_manager/video_player/images/media/media_chromecast.png
+++ b/ui/file_manager/video_player/images/media/media_chromecast.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/media/media_chromecast_casting.png b/ui/file_manager/video_player/images/media/media_chromecast_casting.png
index c3555a1..4b3ebf1b 100644
--- a/ui/file_manager/video_player/images/media/media_chromecast_casting.png
+++ b/ui/file_manager/video_player/images/media/media_chromecast_casting.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/media/media_fullscreen.png b/ui/file_manager/video_player/images/media/media_fullscreen.png
index ec987d4..4156ee4 100644
--- a/ui/file_manager/video_player/images/media/media_fullscreen.png
+++ b/ui/file_manager/video_player/images/media/media_fullscreen.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/media/media_fullscreen_exit.png b/ui/file_manager/video_player/images/media/media_fullscreen_exit.png
index bb1c1cef..1acd504 100644
--- a/ui/file_manager/video_player/images/media/media_fullscreen_exit.png
+++ b/ui/file_manager/video_player/images/media/media_fullscreen_exit.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/media/media_pause.png b/ui/file_manager/video_player/images/media/media_pause.png
index 5225482..c070a25 100644
--- a/ui/file_manager/video_player/images/media/media_pause.png
+++ b/ui/file_manager/video_player/images/media/media_pause.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/media/media_pause_onscreen.png b/ui/file_manager/video_player/images/media/media_pause_onscreen.png
index dda3841..ce1ad173 100644
--- a/ui/file_manager/video_player/images/media/media_pause_onscreen.png
+++ b/ui/file_manager/video_player/images/media/media_pause_onscreen.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/media/media_play.png b/ui/file_manager/video_player/images/media/media_play.png
index 1174fd6..6f05107 100644
--- a/ui/file_manager/video_player/images/media/media_play.png
+++ b/ui/file_manager/video_player/images/media/media_play.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/media/media_play_onscreen.png b/ui/file_manager/video_player/images/media/media_play_onscreen.png
index be29eff..f5a92d2 100644
--- a/ui/file_manager/video_player/images/media/media_play_onscreen.png
+++ b/ui/file_manager/video_player/images/media/media_play_onscreen.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/media/media_subtitles.png b/ui/file_manager/video_player/images/media/media_subtitles.png
index 2f7d8bdd..46ddbccd 100644
--- a/ui/file_manager/video_player/images/media/media_subtitles.png
+++ b/ui/file_manager/video_player/images/media/media_subtitles.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/media/media_volume.png b/ui/file_manager/video_player/images/media/media_volume.png
index aa716ff..ce60e626 100644
--- a/ui/file_manager/video_player/images/media/media_volume.png
+++ b/ui/file_manager/video_player/images/media/media_volume.png
Binary files differ
diff --git a/ui/file_manager/video_player/images/media/media_volume_mute.png b/ui/file_manager/video_player/images/media/media_volume_mute.png
index 72db204a3..c9fd787 100644
--- a/ui/file_manager/video_player/images/media/media_volume_mute.png
+++ b/ui/file_manager/video_player/images/media/media_volume_mute.png
Binary files differ
diff --git a/ui/views/controls/styled_label.cc b/ui/views/controls/styled_label.cc
index 8fb7002..a28edc2 100644
--- a/ui/views/controls/styled_label.cc
+++ b/ui/views/controls/styled_label.cc
@@ -8,8 +8,6 @@
 
 #include <algorithm>
 #include <limits>
-#include <memory>
-#include <vector>
 
 #include "base/i18n/rtl.h"
 #include "base/strings/string_util.h"
@@ -25,24 +23,6 @@
 
 namespace views {
 
-// Helpers --------------------------------------------------------------------
-
-namespace {
-
-// Returns the horizontal offset to align views in a line.
-int HorizontalAdjustment(int used_width,
-                         int width,
-                         gfx::HorizontalAlignment alignment) {
-  const int space = width - used_width;
-  return alignment == gfx::ALIGN_LEFT
-             ? 0
-             : alignment == gfx::ALIGN_CENTER ? space / 2 : space;
-}
-
-}  // namespace
-
-// StyledLabel::TestApi ------------------------------------------------
-
 StyledLabel::TestApi::TestApi(StyledLabel* view) : view_(view) {}
 
 StyledLabel::TestApi::~TestApi() = default;
@@ -51,8 +31,6 @@
   return view_->link_targets_;
 }
 
-// StyledLabel::RangeStyleInfo ------------------------------------------------
-
 StyledLabel::RangeStyleInfo::RangeStyleInfo() = default;
 StyledLabel::RangeStyleInfo::RangeStyleInfo(const RangeStyleInfo& copy) =
     default;
@@ -71,25 +49,14 @@
   return text_style && text_style.value() == style::STYLE_LINK;
 }
 
-// StyledLabel::StyleRange ----------------------------------------------------
-
 bool StyledLabel::StyleRange::operator<(
     const StyledLabel::StyleRange& other) const {
   return range.start() < other.range.start();
 }
 
-
-// StyledLabel ----------------------------------------------------------------
-
 StyledLabel::StyledLabel(const base::string16& text,
                          StyledLabelListener* listener)
-    : specified_line_height_(0),
-      listener_(listener),
-      width_at_last_size_calculation_(0),
-      width_at_last_layout_(0),
-      displayed_on_background_color_(SkColorSetRGB(0xFF, 0xFF, 0xFF)),
-      displayed_on_background_color_set_(false),
-      auto_color_readability_enabled_(true) {
+    : listener_(listener) {
   base::TrimWhitespace(text, base::TRIM_TRAILING, &text_);
 }
 
@@ -218,6 +185,8 @@
 }
 
 gfx::Size StyledLabel::CalculatePreferredSize() const {
+  // TODO(pkasting): This seems suspicious; shouldn't there be a call to
+  // CalculateLayout(std::numeric_limits<int>::max()) here?
   return calculated_size_;
 }
 
@@ -235,7 +204,7 @@
 
 void StyledLabel::PreferredSizeChanged() {
   calculated_size_ = gfx::Size();
-  width_at_last_size_calculation_ = 0;
+  width_at_last_calculation_ = 0;
   width_at_last_layout_ = 0;
   View::PreferredSizeChanged();
 }
@@ -261,6 +230,14 @@
   PreferredSizeChanged();
 }
 
+int StyledLabel::StartX(int excess_space) const {
+  int x = GetInsets().left();
+  if (horizontal_alignment_ == gfx::ALIGN_LEFT)
+    return x;
+  return x + ((horizontal_alignment_ == gfx::ALIGN_CENTER) ? (excess_space / 2)
+                                                           : excess_space);
+}
+
 int StyledLabel::GetDefaultLineHeight() const {
   return specified_line_height_ > 0
              ? specified_line_height_
@@ -282,46 +259,38 @@
 }
 
 gfx::Size StyledLabel::CalculateAndDoLayout(int width, bool dry_run) {
-  if (width == width_at_last_size_calculation_ &&
+  if (width == width_at_last_calculation_ &&
       (dry_run || width == width_at_last_layout_))
     return calculated_size_;
 
-  width_at_last_size_calculation_ = width;
+  width_at_last_calculation_ = width;
   if (!dry_run)
     width_at_last_layout_ = width;
 
-  width -= GetInsets().width();
+  const gfx::Insets insets = GetInsets();
+  width -= insets.width();
 
   if (!dry_run) {
     RemoveAllChildViews(true);
     link_targets_.clear();
   }
 
-  if (width <= 0 || text_.empty())
-    return gfx::Size();
-
   const int default_line_height = GetDefaultLineHeight();
 
-  // The index of the line we're on.
-  int line = 0;
-  const gfx::Insets insets = GetInsets();
   // The current child view's position, relative to content bounds, in pixels.
   gfx::Point offset(0, insets.top());
   int total_height = 0;
-  // The width that was actually used. Guaranteed to be no larger than |width|.
-  int used_width = 0;
+  // The max width of all lines. Guaranteed to be no larger than |width|.
+  int max_width = 0;
 
   RangeStyleInfo default_style;
   default_style.text_style = default_text_style_;
 
-  base::string16 remaining_string = text_;
+  // Try to preserve leading whitespace on the first line.
+  bool can_trim_leading_whitespace = false;
   StyleRanges::const_iterator current_range = style_ranges_.begin();
-
-  bool first_loop_iteration = true;
-
-  // Iterate over the text, creating a bunch of labels and links and laying them
-  // out in the appropriate positions.
-  while (!remaining_string.empty()) {
+  for (base::string16 remaining_string = text_;
+       width > 0 && !remaining_string.empty();) {
     // Max height of the views in a line.
     int line_height = default_line_height;
 
@@ -329,10 +298,10 @@
     std::vector<View*> views_in_a_line;
 
     while (!remaining_string.empty()) {
-      if (offset.x() == 0 && !first_loop_iteration) {
+      if (offset.x() == 0 && can_trim_leading_whitespace) {
         if (remaining_string.front() == L'\n') {
           // Wrapped to the next line on \n, remove it. Other whitespace,
-          // eg, spaces to indent next line, are preserved.
+          // e.g. spaces to indent the next line, are preserved.
           remaining_string.erase(0, 1);
         } else {
           // Wrapped on whitespace character or characters in the middle of the
@@ -341,18 +310,17 @@
                                &remaining_string);
         }
       }
-      first_loop_iteration = false;
 
-      gfx::Range range(gfx::Range::InvalidRange());
+      gfx::Range range = gfx::Range::InvalidRange();
       if (current_range != style_ranges_.end())
         range = current_range->range;
 
       const size_t position = text_.size() - remaining_string.size();
       std::vector<base::string16> substrings;
       // If the current range is not a custom_view, then we use
-      // ElideRectangleText to determine the line wrapping. Note: if it is a
-      // custom_view, then the |position| should equal |range.start()| because
-      // the custom_view is treated as one unit.
+      // ElideRectangleText() to determine the line wrapping. Note: if it is a
+      // custom_view, then the |position| should equal range.start() because the
+      // custom_view is treated as one unit.
       if (position != range.start() ||
           (current_range != style_ranges_.end() &&
            !current_range->style_info.custom_view)) {
@@ -392,12 +360,13 @@
             offset.x() != 0 &&
             (elide_result & gfx::INSUFFICIENT_SPACE_FOR_FIRST_WORD) != 0;
         if (substrings[0].empty() || truncated_chunk) {
-          // The entire line is \n, or nothing fits on this line. Start a new
-          // line. As for the first line, don't advance line number so that it
-          // will be handled again at the beginning of the loop.
-          if (offset.x() != 0 || line > 0)
+          // The entire line is \n, or nothing else fits on this line.  Wrap,
+          // unless this is the first line, in which case we strip leading
+          // whitespace and try again.
+          if (offset.x() != 0 || offset.y() > insets.top())
             break;
           DCHECK(views_in_a_line.empty());
+          can_trim_leading_whitespace = true;
           continue;
         }
       }
@@ -411,11 +380,10 @@
         if (style_info.custom_view) {
           custom_view = style_info.custom_view;
           // Ownership of the custom view must be passed to StyledLabel.
-          DCHECK(std::find_if(
-                     custom_views_.cbegin(), custom_views_.cend(),
-                     [custom_view](const std::unique_ptr<View>& view_ptr) {
-                       return view_ptr.get() == custom_view;
-                     }) != custom_views_.cend());
+          DCHECK(std::find_if(custom_views_.cbegin(), custom_views_.cend(),
+                              [custom_view](const auto& view) {
+                                return view.get() == custom_view;
+                              }) != custom_views_.cend());
           // Do not allow wrap in custom view.
           DCHECK_EQ(position, range.start());
           chunk = remaining_string.substr(0, range.end() - position);
@@ -448,30 +416,21 @@
           ++current_range;
       } else {
         chunk = substrings[0];
-
-        // This chunk is normal text.
         if (position + chunk.size() > range.start())
           chunk = chunk.substr(0, range.start() - position);
+
+        // This chunk is normal text.
         label = CreateLabel(chunk, default_style);
       }
 
       View* child_view = custom_view ? custom_view : label.get();
-      gfx::Size view_size = child_view->GetPreferredSize();
-      // |offset.y()| already contains |insets.top()|.
-      gfx::Point view_origin(insets.left() + offset.x(), offset.y());
-      // The custom view could be wider than the available width; clamp as
-      // needed.
-      if (custom_view)
-        view_size.set_width(std::min(view_size.width(), width - offset.x()));
+      gfx::Size size = child_view->GetPreferredSize();
+      // A custom view could be wider than the available width.
+      size.set_width(std::min(size.width(), width - offset.x()));
 
-      child_view->SetBoundsRect(gfx::Rect(view_origin, view_size));
-      offset.set_x(offset.x() + view_size.width());
-      total_height =
-          std::max(total_height, std::max(child_view->bounds().bottom(),
-                                          offset.y() + default_line_height) +
-                                     insets.bottom());
-      used_width = std::max(used_width, offset.x());
-      line_height = std::max(line_height, view_size.height());
+      child_view->SetBoundsRect(gfx::Rect(offset, size));
+      offset.set_x(offset.x() + size.width());
+      line_height = std::max(line_height, size.height());
 
       if (!dry_run) {
         views_in_a_line.push_back(child_view);
@@ -493,22 +452,27 @@
         break;
       }
     }
+    total_height += line_height;
+    max_width = std::max(max_width, offset.x());
+    // Trim whitespace at the start of the next line.
+    can_trim_leading_whitespace = true;
 
     // Adjust the positions of the views in the line.
-    const int x_delta =
-        HorizontalAdjustment(offset.x(), width, horizontal_alignment_);
+    const int start_x = StartX(width - offset.x());
     for (auto* view : views_in_a_line) {
-      view->SetPosition({view->x() + x_delta,
+      view->SetPosition({start_x + view->x(),
                          offset.y() + (line_height - view->height()) / 2.0f});
     }
 
     // Move to the next line.
-    ++line;
     offset = gfx::Point(0, offset.y() + line_height);
   }
 
-  DCHECK_LE(used_width, width);
-  calculated_size_ = gfx::Size(used_width + GetInsets().width(), total_height);
+  // |width| may be negative if the value passed in was smaller than
+  // insets.width().
+  DCHECK_LE(max_width, std::max(width, 0));
+  calculated_size_ =
+      gfx::Size(max_width + insets.width(), total_height + insets.height());
   return calculated_size_;
 }
 
@@ -520,7 +484,7 @@
     // Nothing should (and nothing does) use a custom font for links.
     DCHECK(!style_info.custom_font);
 
-    // Note this ignores |default_style|, in favor of style::STYLE_LINK.
+    // Note this ignores |default_text_style_|, in favor of style::STYLE_LINK.
     auto link = std::make_unique<Link>(text, text_context_);
 
     // Links in a StyledLabel do not get underlines.
diff --git a/ui/views/controls/styled_label.h b/ui/views/controls/styled_label.h
index d8f4d06..0800444 100644
--- a/ui/views/controls/styled_label.h
+++ b/ui/views/controls/styled_label.h
@@ -9,6 +9,7 @@
 #include <map>
 #include <memory>
 #include <set>
+#include <vector>
 
 #include "base/macros.h"
 #include "base/optional.h"
@@ -169,6 +170,11 @@
   };
   using StyleRanges = std::list<StyleRange>;
 
+  // Returns the starting X coordinate for the views in a line, based on the
+  // current |horizontal_alignment_| and insets and given the amount of excess
+  // space available on that line.
+  int StartX(int excess_space) const;
+
   // Returns the default line height, based on the default style.
   int GetDefaultLineHeight() const;
 
@@ -194,7 +200,7 @@
   int default_text_style_ = style::STYLE_PRIMARY;
 
   // Line height. If zero, style::GetLineHeight() is used.
-  int specified_line_height_;
+  int specified_line_height_ = 0;
 
   // The listener that will be informed of link clicks.
   StyledLabelListener* listener_;
@@ -212,16 +218,16 @@
   // This variable saves the result of the last GetHeightForWidth call in order
   // to avoid repeated calculation.
   mutable gfx::Size calculated_size_;
-  mutable int width_at_last_size_calculation_;
-  int width_at_last_layout_;
+  mutable int width_at_last_calculation_ = 0;
+  int width_at_last_layout_ = 0;
 
   // Background color on which the label is drawn, for auto color readability.
-  SkColor displayed_on_background_color_;
-  bool displayed_on_background_color_set_;
+  SkColor displayed_on_background_color_ = SK_ColorWHITE;
+  bool displayed_on_background_color_set_ = false;
 
   // Controls whether the text is automatically re-colored to be readable on the
   // background.
-  bool auto_color_readability_enabled_;
+  bool auto_color_readability_enabled_ = true;
 
   // The horizontal alignment. This value is flipped for RTL. The default
   // behavior is to align left in LTR UI and right in RTL UI.