diff --git a/BUILD.gn b/BUILD.gn
index d7058700..1fdb3ab 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -21,6 +21,7 @@
 import("//third_party/openh264/openh264_args.gni")
 import("//tools/ipc_fuzzer/ipc_fuzzer.gni")
 import("//ui/base/ui_features.gni")
+import("//ui/webui/webui_features.gni")
 import("//ui/ozone/ozone.gni")
 import("//v8/gni/v8.gni")
 import("//v8/snapshot_toolchain.gni")
@@ -89,6 +90,10 @@
     ]
   }
 
+  if (closure_compile) {
+    deps += [ ":webui_closure_compile" ]
+  }
+
   if (!is_ios && !is_android && !is_chromecast && !is_fuchsia) {
     deps += [
       "//chrome",
@@ -1153,7 +1158,7 @@
       "Do not use a platform name in your output directory (found \"$root_build_dir\"). http://crbug.com/548283")
 }
 
-if (!is_win) {
+if (closure_compile) {
   group("webui_closure_compile") {
     data_deps = [
       "chrome/browser/resources/engagement:closure_compile",
diff --git a/DEPS b/DEPS
index fa80627..2567385 100644
--- a/DEPS
+++ b/DEPS
@@ -79,11 +79,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': '33f02edb14bb2ad802324daa99886709990893a1',
+  'skia_revision': '6cf20044d88d45e05f6c6d583254022a87074750',
   # 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': 'd8f4d70144792c65d45e560f999d17407e8bed65',
+  'v8_revision': 'f337a51b7f5d0b5f9ae84d949663916fe0c94f30',
   # 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.
@@ -91,7 +91,7 @@
   # 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': 'e858cb1db3c266f67adf998dc14bb17eccec084b',
+  'angle_revision': 'c7575da546a49152db47811416c62029f7c266ab',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling build tools
   # and whatever else without interference from each other.
@@ -139,7 +139,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': 'db4e76da5b52a157f43e3bf97231c08015218d58',
+  'catapult_revision': 'ee08c7a421eb5d7e3a1ea96f490e0a1fdb310c6a',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling libFuzzer
   # and whatever else without interference from each other.
@@ -408,7 +408,7 @@
 
   # Build tools for Chrome OS. Note: This depends on third_party/pyelftools.
   'src/third_party/chromite': {
-      'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + '44e40f3f36712c6ba20055407e05b5f6d7f807bc',
+      'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + '9912024a6e9017f907010db9edc738940a3bc23e',
       'condition': 'checkout_linux',
   },
 
@@ -433,7 +433,7 @@
   },
 
   'src/third_party/depot_tools':
-    Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + 'fe68c91e470adcb5b2e8b20f35e1ac0b1999b27f',
+    Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '96fc33383b6d11e2c21cad26d131873ea67fb1ad',
 
   'src/third_party/devtools-node-modules':
     Var('chromium_git') + '/external/github.com/ChromeDevTools/devtools-node-modules' + '@' + Var('devtools_node_modules_revision'),
@@ -873,7 +873,7 @@
     Var('chromium_git') + '/external/khronosgroup/webgl.git' + '@' + '3c1cb0203b6cfc10389e85a350b2ea6ca29d01ce',
 
   'src/third_party/webrtc':
-    Var('webrtc_git') + '/src.git' + '@' + 'bb50ce5bb6d580b243b0fde532c596d6f4248083', # commit position 21742
+    Var('webrtc_git') + '/src.git' + '@' + '903dc861e7296c9b64114612966450eb3c0d72c1', # commit position 21742
 
   'src/third_party/xdg-utils': {
       'url': Var('chromium_git') + '/chromium/deps/xdg-utils.git' + '@' + 'd80274d5869b17b8c9067a1022e4416ee7ed5e0d',
@@ -907,7 +907,7 @@
     Var('chromium_git') + '/v8/v8.git' + '@' +  Var('v8_revision'),
 
   'src-internal': {
-    'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@48c82919be0ec44223941341bf2f8c199649df89',
+    'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@df968af499231536509b6e218abd2a76df50769e',
     'condition': 'checkout_src_internal',
   },
 
diff --git a/ash/BUILD.gn b/ash/BUILD.gn
index bb6fa6ef..16737d3 100644
--- a/ash/BUILD.gn
+++ b/ash/BUILD.gn
@@ -555,12 +555,16 @@
     "system/locale/locale_notification_controller.h",
     "system/media_security/multi_profile_media_tray_item.cc",
     "system/media_security/multi_profile_media_tray_item.h",
+    "system/model/clock_model.cc",
+    "system/model/clock_model.h",
     "system/model/enterprise_domain_model.cc",
     "system/model/enterprise_domain_model.h",
     "system/model/system_tray_model.cc",
     "system/model/system_tray_model.h",
     "system/model/tracing_model.cc",
     "system/model/tracing_model.h",
+    "system/model/update_model.cc",
+    "system/model/update_model.h",
     "system/network/network_feature_pod_button.cc",
     "system/network/network_feature_pod_button.h",
     "system/network/network_feature_pod_controller.cc",
@@ -696,8 +700,6 @@
     "system/status_area_widget_delegate.h",
     "system/supervised/tray_supervised_user.cc",
     "system/supervised/tray_supervised_user.h",
-    "system/system_clock_observer.cc",
-    "system/system_clock_observer.h",
     "system/system_tray_focus_observer.h",
     "system/tiles/tiles_default_view.cc",
     "system/tiles/tiles_default_view.h",
diff --git a/ash/public/cpp/shelf_prefs.cc b/ash/public/cpp/shelf_prefs.cc
index c64d89e6..0ff2ccf 100644
--- a/ash/public/cpp/shelf_prefs.cc
+++ b/ash/public/cpp/shelf_prefs.cc
@@ -196,14 +196,6 @@
   }
 }
 
-bool AreShelfPrefsAvailable(PrefService* prefs) {
-  return prefs->FindPreference(prefs::kShelfAlignmentLocal) &&
-         prefs->FindPreference(prefs::kShelfAlignment) &&
-         prefs->FindPreference(prefs::kShelfAutoHideBehaviorLocal) &&
-         prefs->FindPreference(prefs::kShelfAutoHideBehavior) &&
-         prefs->FindPreference(prefs::kShelfPreferences);
-}
-
 ShelfAlignment GetShelfAlignmentPref(PrefService* prefs, int64_t display_id) {
   DCHECK_NE(display_id, display::kInvalidDisplayId);
 
diff --git a/ash/public/cpp/shelf_prefs.h b/ash/public/cpp/shelf_prefs.h
index 714dbad..8c97913 100644
--- a/ash/public/cpp/shelf_prefs.h
+++ b/ash/public/cpp/shelf_prefs.h
@@ -31,10 +31,6 @@
     int64_t display_id,
     ShelfAutoHideBehavior behavior);
 
-// Returns whether Ash's shelf preferences have been registered with Chrome yet.
-// Prefs owned by Ash are registered asynchronously after |prefs| init.
-ASH_PUBLIC_EXPORT bool AreShelfPrefsAvailable(PrefService* prefs);
-
 // Get the shelf alignment preference for a particular display.
 ASH_PUBLIC_EXPORT ShelfAlignment GetShelfAlignmentPref(PrefService* prefs,
                                                        int64_t display_id);
diff --git a/ash/shelf/shelf_controller.cc b/ash/shelf/shelf_controller.cc
index 0ca5a4f..042c9f2 100644
--- a/ash/shelf/shelf_controller.cc
+++ b/ash/shelf/shelf_controller.cc
@@ -139,9 +139,9 @@
 
 // static
 void ShelfController::RegisterProfilePrefs(PrefRegistrySimple* registry) {
-  // These prefs are public for ChromeLauncherController's OnIsSyncingChanged
-  // and ShelfBoundsChangesProbablyWithUser. See the pref names definitions for
-  // explanations of the synced, local, and per-display behaviors.
+  // These prefs are public for ChromeLauncherController's OnIsSyncingChanged.
+  // See the pref names definitions for explanations of the synced, local, and
+  // per-display behaviors.
   registry->RegisterStringPref(
       prefs::kShelfAutoHideBehavior, kShelfAutoHideBehaviorNever,
       user_prefs::PrefRegistrySyncable::SYNCABLE_PREF | PrefRegistry::PUBLIC);
diff --git a/ash/system/date/date_view.cc b/ash/system/date/date_view.cc
index b176927..834dc17 100644
--- a/ash/system/date/date_view.cc
+++ b/ash/system/date/date_view.cc
@@ -6,6 +6,8 @@
 
 #include "ash/shell.h"
 #include "ash/strings/grit/ash_strings.h"
+#include "ash/system/model/clock_model.h"
+#include "ash/system/model/system_tray_model.h"
 #include "ash/system/tray/system_tray_controller.h"
 #include "ash/system/tray/tray_constants.h"
 #include "ash/system/tray/tray_popup_item_style.h"
@@ -83,7 +85,8 @@
 
 BaseDateTimeView::BaseDateTimeView(SystemTrayItem* owner)
     : ActionableView(owner, TrayPopupInkDropStyle::INSET_BOUNDS),
-      hour_type_(Shell::Get()->system_tray_controller()->hour_clock_type()) {
+      hour_type_(
+          Shell::Get()->system_tray_model()->clock()->hour_clock_type()) {
   SetTimer(base::Time::Now());
   SetFocusBehavior(FocusBehavior::NEVER);
 }
@@ -158,7 +161,7 @@
 }
 
 void DateView::UpdateTimeFormat() {
-  hour_type_ = Shell::Get()->system_tray_controller()->hour_clock_type();
+  hour_type_ = Shell::Get()->system_tray_model()->clock()->hour_clock_type();
   UpdateText();
 }
 
@@ -198,7 +201,7 @@
 TimeView::~TimeView() = default;
 
 void TimeView::UpdateTimeFormat() {
-  hour_type_ = Shell::Get()->system_tray_controller()->hour_clock_type();
+  hour_type_ = Shell::Get()->system_tray_model()->clock()->hour_clock_type();
   UpdateText();
 }
 
diff --git a/ash/system/date/tray_system_info.cc b/ash/system/date/tray_system_info.cc
index a5f814f..c5163c4 100644
--- a/ash/system/date/tray_system_info.cc
+++ b/ash/system/date/tray_system_info.cc
@@ -8,7 +8,8 @@
 #include "ash/shell.h"
 #include "ash/system/date/date_view.h"
 #include "ash/system/date/system_info_default_view.h"
-#include "ash/system/system_clock_observer.h"
+#include "ash/system/model/clock_model.h"
+#include "ash/system/model/system_tray_model.h"
 #include "ash/system/tray/system_tray.h"
 #include "ash/system/tray/system_tray_notifier.h"
 #include "ash/system/tray/tray_item_view.h"
@@ -19,13 +20,12 @@
     : SystemTrayItem(system_tray, UMA_DATE),
       tray_view_(nullptr),
       default_view_(nullptr),
-      login_status_(LoginStatus::NOT_LOGGED_IN),
-      system_clock_observer_(new SystemClockObserver()) {
-  Shell::Get()->system_tray_notifier()->AddClockObserver(this);
+      login_status_(LoginStatus::NOT_LOGGED_IN) {
+  Shell::Get()->system_tray_model()->clock()->AddObserver(this);
 }
 
 TraySystemInfo::~TraySystemInfo() {
-  Shell::Get()->system_tray_notifier()->RemoveClockObserver(this);
+  Shell::Get()->system_tray_model()->clock()->RemoveObserver(this);
 }
 
 const tray::TimeView* TraySystemInfo::GetTimeTrayForTesting() const {
@@ -58,7 +58,8 @@
   // Save the login status we created the view with.
   login_status_ = status;
 
-  OnSystemClockCanSetTimeChanged(system_clock_observer_->can_set_time());
+  OnSystemClockCanSetTimeChanged(
+      Shell::Get()->system_tray_model()->clock()->can_set_time());
   return default_view_;
 }
 
diff --git a/ash/system/date/tray_system_info.h b/ash/system/date/tray_system_info.h
index f39a5da..20583f6 100644
--- a/ash/system/date/tray_system_info.h
+++ b/ash/system/date/tray_system_info.h
@@ -18,7 +18,6 @@
 }
 
 namespace ash {
-class SystemClockObserver;
 class SystemInfoDefaultView;
 
 namespace tray {
@@ -57,8 +56,6 @@
   SystemInfoDefaultView* default_view_;
   LoginStatus login_status_;
 
-  std::unique_ptr<SystemClockObserver> system_clock_observer_;
-
   DISALLOW_COPY_AND_ASSIGN(TraySystemInfo);
 };
 
diff --git a/ash/system/model/clock_model.cc b/ash/system/model/clock_model.cc
new file mode 100644
index 0000000..094704f
--- /dev/null
+++ b/ash/system/model/clock_model.cc
@@ -0,0 +1,71 @@
+// Copyright 2013 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 "ash/system/model/clock_model.h"
+
+#include "ash/system/date/clock_observer.h"
+#include "chromeos/dbus/dbus_thread_manager.h"
+
+namespace ash {
+
+ClockModel::ClockModel() : hour_clock_type_(base::GetHourClockType()) {
+  chromeos::DBusThreadManager::Get()->GetSystemClockClient()->AddObserver(this);
+  chromeos::system::TimezoneSettings::GetInstance()->AddObserver(this);
+  can_set_time_ =
+      chromeos::DBusThreadManager::Get()->GetSystemClockClient()->CanSetTime();
+}
+
+ClockModel::~ClockModel() {
+  chromeos::DBusThreadManager::Get()->GetSystemClockClient()->RemoveObserver(
+      this);
+  chromeos::system::TimezoneSettings::GetInstance()->RemoveObserver(this);
+}
+
+void ClockModel::AddObserver(ClockObserver* observer) {
+  observers_.AddObserver(observer);
+}
+
+void ClockModel::RemoveObserver(ClockObserver* observer) {
+  observers_.RemoveObserver(observer);
+}
+
+void ClockModel::SetUse24HourClock(bool use_24_hour) {
+  hour_clock_type_ = use_24_hour ? base::k24HourClock : base::k12HourClock;
+  NotifyDateFormatChanged();
+}
+
+void ClockModel::NotifyRefreshClock() {
+  for (auto& observer : observers_)
+    observer.Refresh();
+}
+
+void ClockModel::NotifyDateFormatChanged() {
+  for (auto& observer : observers_)
+    observer.OnDateFormatChanged();
+}
+
+void ClockModel::NotifySystemClockTimeUpdated() {
+  for (auto& observer : observers_)
+    observer.OnSystemClockTimeUpdated();
+}
+
+void ClockModel::NotifySystemClockCanSetTimeChanged(bool can_set_time) {
+  for (auto& observer : observers_)
+    observer.OnSystemClockCanSetTimeChanged(can_set_time);
+}
+
+void ClockModel::SystemClockUpdated() {
+  NotifySystemClockTimeUpdated();
+}
+
+void ClockModel::SystemClockCanSetTimeChanged(bool can_set_time) {
+  can_set_time_ = can_set_time;
+  NotifySystemClockCanSetTimeChanged(can_set_time_);
+}
+
+void ClockModel::TimezoneChanged(const icu::TimeZone& timezone) {
+  NotifyRefreshClock();
+}
+
+}  // namespace ash
diff --git a/ash/system/model/clock_model.h b/ash/system/model/clock_model.h
new file mode 100644
index 0000000..5170d09
--- /dev/null
+++ b/ash/system/model/clock_model.h
@@ -0,0 +1,63 @@
+// Copyright 2013 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 ASH_SYSTEM_MODEL_CLOCK_MODEL_H_
+#define ASH_SYSTEM_MODEL_CLOCK_MODEL_H_
+
+#include "base/i18n/time_formatting.h"
+#include "base/macros.h"
+#include "base/observer_list.h"
+#include "chromeos/dbus/system_clock_client.h"
+#include "chromeos/settings/timezone_settings.h"
+
+namespace ash {
+
+class ClockObserver;
+
+// Model to notify system clock and related configuration change.
+class ClockModel : public chromeos::SystemClockClient::Observer,
+                   public chromeos::system::TimezoneSettings::Observer {
+ public:
+  ClockModel();
+  ~ClockModel() override;
+
+  void AddObserver(ClockObserver* observer);
+  void RemoveObserver(ClockObserver* observer);
+
+  void SetUse24HourClock(bool use_24_hour);
+
+  // Force observers to refresh clock views e.g. system is resumed or timezone
+  // is changed.
+  void NotifyRefreshClock();
+
+  // chromeos::SystemClockClient::Observer:
+  void SystemClockUpdated() override;
+  void SystemClockCanSetTimeChanged(bool can_set_time) override;
+
+  // chromeos::system::TimezoneSettings::Observer:
+  void TimezoneChanged(const icu::TimeZone& timezone) override;
+
+  base::HourClockType hour_clock_type() const { return hour_clock_type_; }
+
+  bool can_set_time() { return can_set_time_; }
+
+ private:
+  void NotifyDateFormatChanged();
+  void NotifySystemClockTimeUpdated();
+  void NotifySystemClockCanSetTimeChanged(bool can_set_time);
+
+  // The type of clock hour display: 12 or 24 hour.
+  base::HourClockType hour_clock_type_;
+
+  // If system clock can be configured by user through SetTimeDialog.
+  bool can_set_time_;
+
+  base::ObserverList<ClockObserver> observers_;
+
+  DISALLOW_COPY_AND_ASSIGN(ClockModel);
+};
+
+}  // namespace ash
+
+#endif  // ASH_SYSTEM_MODEL_CLOCK_MODEL_H_
diff --git a/ash/system/model/system_tray_model.cc b/ash/system/model/system_tray_model.cc
index 626d0f6e..785f495 100644
--- a/ash/system/model/system_tray_model.cc
+++ b/ash/system/model/system_tray_model.cc
@@ -4,15 +4,19 @@
 
 #include "ash/system/model/system_tray_model.h"
 
+#include "ash/system/model/clock_model.h"
 #include "ash/system/model/enterprise_domain_model.h"
 #include "ash/system/model/tracing_model.h"
+#include "ash/system/model/update_model.h"
 #include "base/logging.h"
 
 namespace ash {
 
 SystemTrayModel::SystemTrayModel()
-    : enterprise_domain_(std::make_unique<EnterpriseDomainModel>()),
-      tracing_(std::make_unique<TracingModel>()) {}
+    : clock_(std::make_unique<ClockModel>()),
+      enterprise_domain_(std::make_unique<EnterpriseDomainModel>()),
+      tracing_(std::make_unique<TracingModel>()),
+      update_model_(std::make_unique<UpdateModel>()) {}
 
 SystemTrayModel::~SystemTrayModel() = default;
 
@@ -29,7 +33,7 @@
 }
 
 void SystemTrayModel::SetUse24HourClock(bool use_24_hour) {
-  NOTIMPLEMENTED();
+  clock()->SetUse24HourClock(use_24_hour);
 }
 
 void SystemTrayModel::SetEnterpriseDisplayDomain(
@@ -46,11 +50,12 @@
 void SystemTrayModel::ShowUpdateIcon(mojom::UpdateSeverity severity,
                                      bool factory_reset_required,
                                      mojom::UpdateType update_type) {
-  NOTIMPLEMENTED();
+  update_model()->SetUpdateAvailable(severity, factory_reset_required,
+                                     update_type);
 }
 
 void SystemTrayModel::SetUpdateOverCellularAvailableIconVisible(bool visible) {
-  NOTIMPLEMENTED();
+  update_model()->SetUpdateOverCellularAvailable(visible);
 }
 
 }  // namespace ash
diff --git a/ash/system/model/system_tray_model.h b/ash/system/model/system_tray_model.h
index 222ca41..5afd481 100644
--- a/ash/system/model/system_tray_model.h
+++ b/ash/system/model/system_tray_model.h
@@ -12,8 +12,10 @@
 
 namespace ash {
 
+class ClockModel;
 class EnterpriseDomainModel;
 class TracingModel;
+class UpdateModel;
 
 // Top level model of SystemTray.
 // TODO(tetsui): Eventually migrate all of the mojom::SystemTray implementation
@@ -36,19 +38,21 @@
                       mojom::UpdateType update_type) override;
   void SetUpdateOverCellularAvailableIconVisible(bool visible) override;
 
+  ClockModel* clock() { return clock_.get(); }
   EnterpriseDomainModel* enterprise_domain() {
     return enterprise_domain_.get();
   }
-
   TracingModel* tracing() { return tracing_.get(); }
+  UpdateModel* update_model() { return update_model_.get(); }
 
  private:
+  std::unique_ptr<ClockModel> clock_;
   std::unique_ptr<EnterpriseDomainModel> enterprise_domain_;
   std::unique_ptr<TracingModel> tracing_;
+  std::unique_ptr<UpdateModel> update_model_;
 
   // TODO(tetsui): Add following as a sub-model of SystemTrayModel:
   // * BluetoothModel
-  // * ClockModel
 
   DISALLOW_COPY_AND_ASSIGN(SystemTrayModel);
 };
diff --git a/ash/system/model/update_model.cc b/ash/system/model/update_model.cc
new file mode 100644
index 0000000..caf6c33
--- /dev/null
+++ b/ash/system/model/update_model.cc
@@ -0,0 +1,48 @@
+// 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 "ash/system/model/update_model.h"
+
+namespace ash {
+
+UpdateModel::UpdateModel() = default;
+UpdateModel::~UpdateModel() = default;
+
+void UpdateModel::AddObserver(UpdateObserver* observer) {
+  observers_.AddObserver(observer);
+}
+
+void UpdateModel::RemoveObserver(UpdateObserver* observer) {
+  observers_.RemoveObserver(observer);
+}
+
+void UpdateModel::SetUpdateAvailable(mojom::UpdateSeverity severity,
+                                     bool factory_reset_required,
+                                     mojom::UpdateType update_type) {
+  update_required_ = true;
+  severity_ = severity;
+  factory_reset_required_ = factory_reset_required;
+  update_type_ = update_type;
+  NotifyUpdateAvailable();
+}
+
+void UpdateModel::SetUpdateOverCellularAvailable(bool available) {
+  update_over_cellular_available_ = available;
+  NotifyUpdateAvailable();
+}
+
+mojom::UpdateSeverity UpdateModel::GetSeverity() const {
+  // TODO(weidongg/691108): adjust severity according the amount of time
+  // passing after update is available over cellular connection. Use low
+  // severity for update available over cellular connection.
+  return update_over_cellular_available_ ? mojom::UpdateSeverity::LOW
+                                         : severity_;
+}
+
+void UpdateModel::NotifyUpdateAvailable() {
+  for (auto& observer : observers_)
+    observer.OnUpdateAvailable();
+}
+
+}  // namespace ash
diff --git a/ash/system/model/update_model.h b/ash/system/model/update_model.h
new file mode 100644
index 0000000..b7255446
--- /dev/null
+++ b/ash/system/model/update_model.h
@@ -0,0 +1,69 @@
+// 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 ASH_SYSTEM_MODEL_UPDATE_MODEL_H_
+#define ASH_SYSTEM_MODEL_UPDATE_MODEL_H_
+
+#include "ash/public/interfaces/update.mojom.h"
+#include "base/macros.h"
+#include "base/observer_list.h"
+
+namespace ash {
+
+class UpdateObserver {
+ public:
+  virtual ~UpdateObserver() {}
+
+  virtual void OnUpdateAvailable() = 0;
+};
+
+// Model to store system update availability.
+class UpdateModel {
+ public:
+  UpdateModel();
+  ~UpdateModel();
+
+  void AddObserver(UpdateObserver* observer);
+  void RemoveObserver(UpdateObserver* observer);
+
+  // Store the state that a software update is available. The state persists
+  // until reboot. Based on |severity| and |factory_reset_required|, the
+  // observer views can indicate the severity of the update to users by changing
+  // the icon, color, and tooltip.
+  void SetUpdateAvailable(mojom::UpdateSeverity severity,
+                          bool factory_reset_required,
+                          mojom::UpdateType update_type);
+
+  // If |available| is true, a software update is available but user's agreement
+  // is required as current connection is cellular. If |available| is false, the
+  // user's one time permission on update over cellular connection has been
+  // granted.
+  void SetUpdateOverCellularAvailable(bool available);
+
+  mojom::UpdateSeverity GetSeverity() const;
+
+  bool update_required() const { return update_required_; }
+  bool factory_reset_required() const { return factory_reset_required_; }
+  mojom::UpdateType update_type() const { return update_type_; }
+  bool update_over_cellular_available() const {
+    return update_over_cellular_available_;
+  }
+
+ private:
+  void NotifyUpdateAvailable();
+
+  bool update_required_ = false;
+  mojom::UpdateSeverity severity_ = mojom::UpdateSeverity::NONE;
+  bool factory_reset_required_ = false;
+  mojom::UpdateType update_type_ = mojom::UpdateType::SYSTEM;
+  bool update_over_cellular_available_ = false;
+
+  base::ObserverList<UpdateObserver> observers_;
+
+  DISALLOW_COPY_AND_ASSIGN(UpdateModel);
+};
+
+}  // namespace ash
+
+#endif  // ASH_SYSTEM_MODEL_UPDATE_MODEL_H_
diff --git a/ash/system/power/power_event_observer.cc b/ash/system/power/power_event_observer.cc
index 9000845..328928e 100644
--- a/ash/system/power/power_event_observer.cc
+++ b/ash/system/power/power_event_observer.cc
@@ -11,7 +11,8 @@
 #include "ash/root_window_controller.h"
 #include "ash/session/session_controller.h"
 #include "ash/shell.h"
-#include "ash/system/tray/system_tray_notifier.h"
+#include "ash/system/model/clock_model.h"
+#include "ash/system/model/system_tray_model.h"
 #include "ash/wallpaper/wallpaper_widget_controller.h"
 #include "ash/wm/lock_state_controller.h"
 #include "ash/wm/lock_state_observer.h"
@@ -286,7 +287,7 @@
   // here: http://crbug.com/692193
   if (Shell::GetAshConfig() != Config::MASH)
     Shell::Get()->display_configurator()->ResumeDisplays();
-  Shell::Get()->system_tray_notifier()->NotifyRefreshClock();
+  Shell::Get()->system_tray_model()->clock()->NotifyRefreshClock();
 
   // If the suspend request was being blocked while waiting for the lock
   // animation to complete, clear the blocker since the suspend has already
diff --git a/ash/system/status_area_widget.cc b/ash/system/status_area_widget.cc
index ee441053..3db767db 100644
--- a/ash/system/status_area_widget.cc
+++ b/ash/system/status_area_widget.cc
@@ -191,10 +191,12 @@
   return ui::NativeThemeDarkAura::instance();
 }
 
-void StatusAreaWidget::OnNativeWidgetActivationChanged(bool active) {
-  Widget::OnNativeWidgetActivationChanged(active);
+bool StatusAreaWidget::OnNativeWidgetActivationChanged(bool active) {
+  if (!Widget::OnNativeWidgetActivationChanged(active))
+    return false;
   if (active)
     status_area_widget_delegate_->SetPaneFocusAndFocusDefault();
+  return true;
 }
 
 void StatusAreaWidget::UpdateShelfItemBackground(SkColor color) {
diff --git a/ash/system/status_area_widget.h b/ash/system/status_area_widget.h
index fc86c16..54fcdc6 100644
--- a/ash/system/status_area_widget.h
+++ b/ash/system/status_area_widget.h
@@ -96,7 +96,7 @@
 
   // Overridden from views::Widget:
   const ui::NativeTheme* GetNativeTheme() const override;
-  void OnNativeWidgetActivationChanged(bool active) override;
+  bool OnNativeWidgetActivationChanged(bool active) override;
 
   // ShelfBackgroundAnimatorObserver:
   void UpdateShelfItemBackground(SkColor color) override;
diff --git a/ash/system/system_clock_observer.cc b/ash/system/system_clock_observer.cc
deleted file mode 100644
index bbbfa85..0000000
--- a/ash/system/system_clock_observer.cc
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2013 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 "ash/system/system_clock_observer.h"
-
-#include "ash/shell.h"
-#include "ash/system/tray/system_tray_notifier.h"
-#include "chromeos/dbus/dbus_thread_manager.h"
-
-namespace ash {
-
-SystemClockObserver::SystemClockObserver() {
-  chromeos::DBusThreadManager::Get()->GetSystemClockClient()->AddObserver(this);
-  chromeos::system::TimezoneSettings::GetInstance()->AddObserver(this);
-  can_set_time_ =
-      chromeos::DBusThreadManager::Get()->GetSystemClockClient()->CanSetTime();
-}
-
-SystemClockObserver::~SystemClockObserver() {
-  chromeos::DBusThreadManager::Get()->GetSystemClockClient()->RemoveObserver(
-      this);
-  chromeos::system::TimezoneSettings::GetInstance()->RemoveObserver(this);
-}
-
-void SystemClockObserver::SystemClockUpdated() {
-  Shell::Get()->system_tray_notifier()->NotifySystemClockTimeUpdated();
-}
-
-void SystemClockObserver::SystemClockCanSetTimeChanged(bool can_set_time) {
-  can_set_time_ = can_set_time;
-  Shell::Get()->system_tray_notifier()->NotifySystemClockCanSetTimeChanged(
-      can_set_time_);
-}
-
-void SystemClockObserver::TimezoneChanged(const icu::TimeZone& timezone) {
-  Shell::Get()->system_tray_notifier()->NotifyRefreshClock();
-}
-
-}  // namespace ash
diff --git a/ash/system/system_clock_observer.h b/ash/system/system_clock_observer.h
deleted file mode 100644
index 5d8a866..0000000
--- a/ash/system/system_clock_observer.h
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2013 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 ASH_SYSTEM_SYSTEM_CLOCK_OBSERVER_H_
-#define ASH_SYSTEM_SYSTEM_CLOCK_OBSERVER_H_
-
-#include "base/macros.h"
-#include "chromeos/dbus/system_clock_client.h"
-#include "chromeos/settings/timezone_settings.h"
-
-namespace ash {
-
-class SystemClockObserver
-    : public chromeos::SystemClockClient::Observer,
-      public chromeos::system::TimezoneSettings::Observer {
- public:
-  SystemClockObserver();
-  ~SystemClockObserver() override;
-
-  // chromeos::SystemClockClient::Observer
-  void SystemClockUpdated() override;
-  void SystemClockCanSetTimeChanged(bool can_set_time) override;
-
-  // chromeos::system::TimezoneSettings::Observer
-  void TimezoneChanged(const icu::TimeZone& timezone) override;
-
-  bool can_set_time() { return can_set_time_; }
-
- private:
-  bool can_set_time_;
-
-  DISALLOW_COPY_AND_ASSIGN(SystemClockObserver);
-};
-
-}  // namespace ash
-
-#endif  // ASH_SYSTEM_SYSTEM_CLOCK_OBSERVER_H_
diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc
index a1e255f..847d6a29 100644
--- a/ash/system/tray/system_tray.cc
+++ b/ash/system/tray/system_tray.cc
@@ -32,6 +32,8 @@
 #include "ash/system/ime/tray_ime_chromeos.h"
 #include "ash/system/keyboard_brightness/tray_keyboard_brightness.h"
 #include "ash/system/media_security/multi_profile_media_tray_item.h"
+#include "ash/system/model/clock_model.h"
+#include "ash/system/model/system_tray_model.h"
 #include "ash/system/network/tray_network.h"
 #include "ash/system/network/tray_vpn.h"
 #include "ash/system/night_light/tray_night_light.h"
@@ -554,7 +556,7 @@
 base::string16 SystemTray::GetAccessibleTimeString(
     const base::Time& now) const {
   base::HourClockType hour_type =
-      Shell::Get()->system_tray_controller()->hour_clock_type();
+      Shell::Get()->system_tray_model()->clock()->hour_clock_type();
   return base::TimeFormatTimeOfDayWithHourClockType(now, hour_type,
                                                     base::kKeepAmPm);
 }
diff --git a/ash/system/tray/system_tray_controller.cc b/ash/system/tray/system_tray_controller.cc
index 82010e4e..e5356c2 100644
--- a/ash/system/tray/system_tray_controller.cc
+++ b/ash/system/tray/system_tray_controller.cc
@@ -6,6 +6,7 @@
 
 #include "ash/root_window_controller.h"
 #include "ash/shell.h"
+#include "ash/system/model/clock_model.h"
 #include "ash/system/model/enterprise_domain_model.h"
 #include "ash/system/model/system_tray_model.h"
 #include "ash/system/model/tracing_model.h"
@@ -16,8 +17,7 @@
 
 namespace ash {
 
-SystemTrayController::SystemTrayController()
-    : hour_clock_type_(base::GetHourClockType()) {}
+SystemTrayController::SystemTrayController() {}
 
 SystemTrayController::~SystemTrayController() = default;
 
@@ -183,8 +183,7 @@
 }
 
 void SystemTrayController::SetUse24HourClock(bool use_24_hour) {
-  hour_clock_type_ = use_24_hour ? base::k24HourClock : base::k12HourClock;
-  Shell::Get()->system_tray_notifier()->NotifyDateFormatChanged();
+  Shell::Get()->system_tray_model()->SetUse24HourClock(use_24_hour);
 }
 
 void SystemTrayController::SetEnterpriseDisplayDomain(
@@ -203,27 +202,14 @@
 void SystemTrayController::ShowUpdateIcon(mojom::UpdateSeverity severity,
                                           bool factory_reset_required,
                                           mojom::UpdateType update_type) {
-  // Show the icon on all displays.
-  for (RootWindowController* root : Shell::GetAllRootWindowControllers()) {
-    ash::SystemTray* tray = root->GetSystemTray();
-    // External monitors might not have a tray yet.
-    if (!tray)
-      continue;
-    tray->tray_update()->ShowUpdateIcon(severity, factory_reset_required,
-                                        update_type);
-  }
+  Shell::Get()->system_tray_model()->ShowUpdateIcon(
+      severity, factory_reset_required, update_type);
 }
 
 void SystemTrayController::SetUpdateOverCellularAvailableIconVisible(
     bool visible) {
-  // Show the icon on all displays.
-  for (auto* root_window_controller : Shell::GetAllRootWindowControllers()) {
-    ash::SystemTray* tray = root_window_controller->GetSystemTray();
-    // External monitors might not have a tray yet.
-    if (!tray)
-      continue;
-    tray->tray_update()->SetUpdateOverCellularAvailableIconVisible(visible);
-  }
+  Shell::Get()->system_tray_model()->SetUpdateOverCellularAvailableIconVisible(
+      visible);
 }
 
 }  // namespace ash
diff --git a/ash/system/tray/system_tray_controller.h b/ash/system/tray/system_tray_controller.h
index 9dd3e59..c49fdd1 100644
--- a/ash/system/tray/system_tray_controller.h
+++ b/ash/system/tray/system_tray_controller.h
@@ -23,8 +23,6 @@
   SystemTrayController();
   ~SystemTrayController() override;
 
-  base::HourClockType hour_clock_type() const { return hour_clock_type_; }
-
   // Wrappers around the mojom::SystemTrayClient interface.
   void ShowSettings();
   void ShowBluetoothSettings();
@@ -77,9 +75,6 @@
   // Bindings for users of the mojo interface.
   mojo::BindingSet<mojom::SystemTray> bindings_;
 
-  // The type of clock hour display: 12 or 24 hour.
-  base::HourClockType hour_clock_type_;
-
   DISALLOW_COPY_AND_ASSIGN(SystemTrayController);
 };
 
diff --git a/ash/system/tray/system_tray_notifier.cc b/ash/system/tray/system_tray_notifier.cc
index 07183dc..7e995d4 100644
--- a/ash/system/tray/system_tray_notifier.cc
+++ b/ash/system/tray/system_tray_notifier.cc
@@ -5,7 +5,6 @@
 #include "ash/system/tray/system_tray_notifier.h"
 
 #include "ash/system/bluetooth/bluetooth_observer.h"
-#include "ash/system/date/clock_observer.h"
 #include "ash/system/ime/ime_observer.h"
 #include "ash/system/network/network_observer.h"
 #include "ash/system/network/network_portal_detector_observer.h"
@@ -39,34 +38,6 @@
     observer.OnBluetoothDiscoveringChanged();
 }
 
-void SystemTrayNotifier::AddClockObserver(ClockObserver* observer) {
-  clock_observers_.AddObserver(observer);
-}
-
-void SystemTrayNotifier::RemoveClockObserver(ClockObserver* observer) {
-  clock_observers_.RemoveObserver(observer);
-}
-
-void SystemTrayNotifier::NotifyRefreshClock() {
-  for (auto& observer : clock_observers_)
-    observer.Refresh();
-}
-
-void SystemTrayNotifier::NotifyDateFormatChanged() {
-  for (auto& observer : clock_observers_)
-    observer.OnDateFormatChanged();
-}
-
-void SystemTrayNotifier::NotifySystemClockTimeUpdated() {
-  for (auto& observer : clock_observers_)
-    observer.OnSystemClockTimeUpdated();
-}
-
-void SystemTrayNotifier::NotifySystemClockCanSetTimeChanged(bool can_set_time) {
-  for (auto& observer : clock_observers_)
-    observer.OnSystemClockCanSetTimeChanged(can_set_time);
-}
-
 void SystemTrayNotifier::AddIMEObserver(IMEObserver* observer) {
   ime_observers_.AddObserver(observer);
 }
diff --git a/ash/system/tray/system_tray_notifier.h b/ash/system/tray/system_tray_notifier.h
index 11ffd2a..9b8cf88 100644
--- a/ash/system/tray/system_tray_notifier.h
+++ b/ash/system/tray/system_tray_notifier.h
@@ -17,7 +17,6 @@
 namespace ash {
 
 class BluetoothObserver;
-class ClockObserver;
 class IMEObserver;
 class NetworkObserver;
 class NetworkPortalDetectorObserver;
@@ -42,14 +41,6 @@
   void NotifyRefreshBluetooth();
   void NotifyBluetoothDiscoveringChanged();
 
-  // Date and time.
-  void AddClockObserver(ClockObserver* observer);
-  void RemoveClockObserver(ClockObserver* observer);
-  void NotifyRefreshClock();
-  void NotifyDateFormatChanged();
-  void NotifySystemClockTimeUpdated();
-  void NotifySystemClockCanSetTimeChanged(bool can_set_time);
-
   // Input methods.
   void AddIMEObserver(IMEObserver* observer);
   void RemoveIMEObserver(IMEObserver* observer);
@@ -94,7 +85,6 @@
 
  private:
   base::ObserverList<BluetoothObserver> bluetooth_observers_;
-  base::ObserverList<ClockObserver> clock_observers_;
   base::ObserverList<IMEObserver> ime_observers_;
   base::ObserverList<NetworkObserver> network_observers_;
   base::ObserverList<NetworkPortalDetectorObserver>
diff --git a/ash/system/unified/unified_system_info_view.cc b/ash/system/unified/unified_system_info_view.cc
index b5047a5..0ae6b4f 100644
--- a/ash/system/unified/unified_system_info_view.cc
+++ b/ash/system/unified/unified_system_info_view.cc
@@ -9,6 +9,7 @@
 #include "ash/strings/grit/ash_strings.h"
 #include "ash/system/date/clock_observer.h"
 #include "ash/system/enterprise/enterprise_domain_observer.h"
+#include "ash/system/model/clock_model.h"
 #include "ash/system/model/enterprise_domain_model.h"
 #include "ash/system/model/system_tray_model.h"
 #include "ash/system/power/power_status.h"
@@ -70,11 +71,11 @@
   label_->SetEnabledColor(kUnifiedMenuTextColor);
   Update();
 
-  Shell::Get()->system_tray_notifier()->AddClockObserver(this);
+  Shell::Get()->system_tray_model()->clock()->AddObserver(this);
 }
 
 DateView::~DateView() {
-  Shell::Get()->system_tray_notifier()->RemoveClockObserver(this);
+  Shell::Get()->system_tray_model()->clock()->RemoveObserver(this);
 }
 
 void DateView::Update() {
diff --git a/ash/system/update/tray_update.cc b/ash/system/update/tray_update.cc
index 3b4acc5a..848ec36 100644
--- a/ash/system/update/tray_update.cc
+++ b/ash/system/update/tray_update.cc
@@ -7,11 +7,11 @@
 #include "ash/ash_view_ids.h"
 #include "ash/metrics/user_metrics_action.h"
 #include "ash/metrics/user_metrics_recorder.h"
-#include "ash/public/interfaces/update.mojom.h"
 #include "ash/resources/vector_icons/vector_icons.h"
 #include "ash/session/session_controller.h"
 #include "ash/shell.h"
 #include "ash/strings/grit/ash_strings.h"
+#include "ash/system/model/system_tray_model.h"
 #include "ash/system/tray/system_tray.h"
 #include "ash/system/tray/system_tray_controller.h"
 #include "ash/system/tray/tray_constants.h"
@@ -54,22 +54,12 @@
 
 }  // namespace
 
-// static
-bool TrayUpdate::update_required_ = false;
-// static
-mojom::UpdateSeverity TrayUpdate::severity_ = mojom::UpdateSeverity::NONE;
-// static
-bool TrayUpdate::factory_reset_required_ = false;
-// static
-bool TrayUpdate::update_over_cellular_available_ = false;
-
-mojom::UpdateType TrayUpdate::update_type_ = mojom::UpdateType::SYSTEM;
-
 // The "restart to update" item in the system tray menu.
 class TrayUpdate::UpdateView : public ActionableView {
  public:
   explicit UpdateView(TrayUpdate* owner)
       : ActionableView(owner, TrayPopupInkDropStyle::FILL_BOUNDS),
+        model_(owner->model_),
         update_label_(nullptr) {
     SetLayoutManager(std::make_unique<views::FillLayout>());
 
@@ -79,20 +69,20 @@
     views::ImageView* image = TrayPopupUtils::CreateMainImageView();
     image->SetImage(gfx::CreateVectorIcon(
         kSystemMenuUpdateIcon,
-        IconColorForUpdateSeverity(owner->severity_, true)));
+        IconColorForUpdateSeverity(model_->GetSeverity(), true)));
     tri_view->AddView(TriView::Container::START, image);
 
     base::string16 label_text;
     update_label_ = TrayPopupUtils::CreateDefaultLabel();
     update_label_->set_id(VIEW_ID_TRAY_UPDATE_MENU_LABEL);
     update_label_->SetMultiLine(true);
-    if (owner->factory_reset_required_) {
+    if (model_->factory_reset_required()) {
       label_text = bundle.GetLocalizedString(
           IDS_ASH_STATUS_TRAY_RESTART_AND_POWERWASH_TO_UPDATE);
-    } else if (owner->update_type_ == mojom::UpdateType::FLASH) {
+    } else if (model_->update_type() == mojom::UpdateType::FLASH) {
       label_text = bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_UPDATE_FLASH);
-    } else if (!owner->update_required_ &&
-               owner->update_over_cellular_available_) {
+    } else if (!model_->update_required() &&
+               model_->update_over_cellular_available()) {
       label_text = bundle.GetLocalizedString(
           IDS_ASH_STATUS_TRAY_UPDATE_OVER_CELLULAR_AVAILABLE);
       if (!Shell::Get()->session_controller()->ShouldEnableSettings()) {
@@ -116,13 +106,15 @@
 
   ~UpdateView() override = default;
 
+  UpdateModel* const model_;
   views::Label* update_label_;
 
  private:
   // Overridden from ActionableView.
   bool PerformAction(const ui::Event& /* event */) override {
-    DCHECK(update_required_ || update_over_cellular_available_);
-    if (update_required_) {
+    DCHECK(model_->update_required() ||
+           model_->update_over_cellular_available());
+    if (model_->update_required()) {
       Shell::Get()->system_tray_controller()->RequestRestartForUpdate();
       Shell::Get()->metrics()->RecordUserMetricsAction(
           UMA_STATUS_AREA_OS_UPDATE_DEFAULT_SELECTED);
@@ -139,14 +131,17 @@
 };
 
 TrayUpdate::TrayUpdate(SystemTray* system_tray)
-    : TrayImageItem(system_tray, kSystemTrayUpdateIcon, UMA_UPDATE) {}
+    : TrayImageItem(system_tray, kSystemTrayUpdateIcon, UMA_UPDATE),
+      model_(Shell::Get()->system_tray_model()->update_model()) {
+  model_->AddObserver(this);
+}
 
-TrayUpdate::~TrayUpdate() = default;
+TrayUpdate::~TrayUpdate() {
+  model_->RemoveObserver(this);
+}
 
 bool TrayUpdate::GetInitialVisibility() {
-  // If chrome tells ash there is an update available before this item's system
-  // tray is constructed then show the icon.
-  return update_required_ || update_over_cellular_available_;
+  return ShouldShowUpdate();
 }
 
 views::View* TrayUpdate::CreateTrayView(LoginStatus status) {
@@ -156,7 +151,7 @@
 }
 
 views::View* TrayUpdate::CreateDefaultView(LoginStatus status) {
-  if (update_required_ || update_over_cellular_available_) {
+  if (ShouldShowUpdate()) {
     update_view_ = new UpdateView(this);
     return update_view_;
   }
@@ -167,41 +162,18 @@
   update_view_ = nullptr;
 }
 
-void TrayUpdate::ShowUpdateIcon(mojom::UpdateSeverity severity,
-                                bool factory_reset_required,
-                                mojom::UpdateType update_type) {
-  // Cache update info so we can create the default view when the menu opens.
-  update_required_ = true;
-  severity_ = severity;
-  factory_reset_required_ = factory_reset_required;
-  update_type_ = update_type;
-
-  // Show the icon in the tray.
-  SetIconColor(IconColorForUpdateSeverity(severity_, false));
-  tray_view()->SetVisible(true);
-}
-
 views::Label* TrayUpdate::GetLabelForTesting() {
   return update_view_ ? update_view_->update_label_ : nullptr;
 }
 
-void TrayUpdate::SetUpdateOverCellularAvailableIconVisible(bool visible) {
-  // TODO(weidongg/691108): adjust severity according the amount of time
-  // passing after update is available over cellular connection. Use low
-  // severity for update available over cellular connection.
-  if (visible)
-    SetIconColor(IconColorForUpdateSeverity(mojom::UpdateSeverity::LOW, false));
-  update_over_cellular_available_ = visible;
-  tray_view()->SetVisible(visible);
+void TrayUpdate::OnUpdateAvailable() {
+  // Show the icon in the tray.
+  SetIconColor(IconColorForUpdateSeverity(model_->GetSeverity(), false));
+  tray_view()->SetVisible(ShouldShowUpdate());
 }
 
-// static
-void TrayUpdate::ResetForTesting() {
-  update_required_ = false;
-  severity_ = mojom::UpdateSeverity::NONE;
-  factory_reset_required_ = false;
-  update_over_cellular_available_ = false;
-  update_type_ = mojom::UpdateType::SYSTEM;
+bool TrayUpdate::ShouldShowUpdate() const {
+  return model_->update_required() || model_->update_over_cellular_available();
 }
 
 }  // namespace ash
diff --git a/ash/system/update/tray_update.h b/ash/system/update/tray_update.h
index 2b5ba7e..5376d64 100644
--- a/ash/system/update/tray_update.h
+++ b/ash/system/update/tray_update.h
@@ -6,6 +6,7 @@
 #define ASH_SYSTEM_UPDATE_TRAY_UPDATE_H_
 
 #include "ash/ash_export.h"
+#include "ash/system/model/update_model.h"
 #include "ash/system/tray/tray_image_item.h"
 #include "base/macros.h"
 #include "base/strings/string16.h"
@@ -17,58 +18,34 @@
 
 namespace ash {
 
-namespace mojom {
-enum class UpdateSeverity;
-enum class UpdateType;
-}
-
 // The system update tray item. The tray icon stays visible once an update
 // notification is received. The icon only disappears after a reboot to apply
 // the update. Exported for test.
-class ASH_EXPORT TrayUpdate : public TrayImageItem {
+class ASH_EXPORT TrayUpdate : public TrayImageItem, public UpdateObserver {
  public:
   explicit TrayUpdate(SystemTray* system_tray);
   ~TrayUpdate() override;
 
-  // Shows an icon in the system tray indicating that a software update is
-  // available. Once shown the icon persists until reboot. |severity| and
-  // |factory_reset_required| are used to set the icon, color, and tooltip.
-  void ShowUpdateIcon(mojom::UpdateSeverity severity,
-                      bool factory_reset_required,
-                      mojom::UpdateType update_type);
-
-  // If |visible| is true, shows an icon in the system tray which indicates that
-  // a software update is available but user's agreement is required as current
-  // connection is cellular. If |visible| is false, hides the icon because the
-  // user's one time permission on update over cellular connection has been
-  // granted.
-  void SetUpdateOverCellularAvailableIconVisible(bool visible);
-
   // Expose label information for testing.
   views::Label* GetLabelForTesting();
 
-  // Resets everything for testing.
-  static void ResetForTesting();
+  // Overridden from UpdateObserver.
+  void OnUpdateAvailable() override;
 
  private:
   class UpdateView;
 
+  // Returns true if the tray view and default view should be visible.
+  bool ShouldShowUpdate() const;
+
   // Overridden from TrayImageItem.
   bool GetInitialVisibility() override;
   views::View* CreateTrayView(LoginStatus status) override;
   views::View* CreateDefaultView(LoginStatus status) override;
   void OnDefaultViewDestroyed() override;
 
-  UpdateView* update_view_;
-
-  // If an external monitor is connected then the system tray may be created
-  // after the update data is sent from chrome, so share the update info between
-  // all instances.
-  static bool update_required_;
-  static mojom::UpdateSeverity severity_;
-  static bool factory_reset_required_;
-  static mojom::UpdateType update_type_;
-  static bool update_over_cellular_available_;
+  UpdateModel* const model_;
+  UpdateView* update_view_ = nullptr;
 
   DISALLOW_COPY_AND_ASSIGN(TrayUpdate);
 };
diff --git a/ash/system/update/tray_update_unittest.cc b/ash/system/update/tray_update_unittest.cc
index afe8414..0a1e14c 100644
--- a/ash/system/update/tray_update_unittest.cc
+++ b/ash/system/update/tray_update_unittest.cc
@@ -15,20 +15,7 @@
 
 namespace ash {
 
-class TrayUpdateTest : public AshTestBase {
- public:
-  TrayUpdateTest() = default;
-  ~TrayUpdateTest() override = default;
-
-  // testing::Test:
-  void TearDown() override {
-    AshTestBase::TearDown();
-    TrayUpdate::ResetForTesting();
-  }
-
- private:
-  DISALLOW_COPY_AND_ASSIGN(TrayUpdateTest);
-};
+using TrayUpdateTest = AshTestBase;
 
 // Tests that the update icon becomes visible when an update becomes
 // available.
diff --git a/base/BUILD.gn b/base/BUILD.gn
index f2cf35f..33c99aed 100644
--- a/base/BUILD.gn
+++ b/base/BUILD.gn
@@ -1274,13 +1274,6 @@
     # Needs to be a public config so that dependent targets link against it as
     # well when doing a component build.
     public_configs = [ ":android_system_libs" ]
-
-    if (can_unwind_with_cfi_table) {
-      sources += [
-        "trace_event/cfi_backtrace_android.cc",
-        "trace_event/cfi_backtrace_android.h",
-      ]
-    }
   }
 
   # Chromeos.
@@ -2469,20 +2462,6 @@
   }
 
   if (is_android) {
-    # Add unwind tables in base_unittests_apk test apk. The unwind tables are
-    # generated from debug info in the binary. Removing "default_symbols" and
-    # adding symbols config removes the "strip_debug" config that strips the
-    # debug info, on base unittests apk.
-    if (can_unwind_with_cfi_table) {
-      configs -= [ "//build/config/compiler:default_symbols" ]
-      if (symbol_level == 2) {
-        configs += [ "//build/config/compiler:symbols" ]
-      } else {
-        configs += [ "//build/config/compiler:minimal_symbols" ]
-      }
-      add_unwind_tables_in_apk = true
-      sources += [ "trace_event/cfi_backtrace_android_unittest.cc" ]
-    }
     sources -= [
       "process/process_unittest.cc",
       "process/process_util_unittest.cc",
diff --git a/base/memory/platform_shared_memory_region.cc b/base/memory/platform_shared_memory_region.cc
index ae2e110a..c145336 100644
--- a/base/memory/platform_shared_memory_region.cc
+++ b/base/memory/platform_shared_memory_region.cc
@@ -33,14 +33,5 @@
   return std::move(handle_);
 }
 
-// static
-bool PlatformSharedMemoryRegion::CheckPlatformHandlePermissionsCorrespondToMode(
-    PlatformHandle handle,
-    Mode mode,
-    size_t size) {
-  // TODO(https://crbug.com/825177): implement this in platform-specific way.
-  return true;
-}
-
 }  // namespace subtle
 }  // namespace base
diff --git a/base/memory/platform_shared_memory_region_android.cc b/base/memory/platform_shared_memory_region_android.cc
index f8c13aa..351ade62 100644
--- a/base/memory/platform_shared_memory_region_android.cc
+++ b/base/memory/platform_shared_memory_region_android.cc
@@ -137,7 +137,6 @@
   if (size > static_cast<size_t>(std::numeric_limits<int>::max()))
     return {};
 
-  LOG(ERROR) << "Before CHECK";
   CHECK_NE(mode, Mode::kReadOnly) << "Creating a region in read-only mode will "
                                      "lead to this region being non-modifiable";
 
@@ -159,6 +158,27 @@
   return PlatformSharedMemoryRegion(std::move(fd), mode, size, guid);
 }
 
+bool PlatformSharedMemoryRegion::CheckPlatformHandlePermissionsCorrespondToMode(
+    PlatformHandle handle,
+    Mode mode,
+    size_t size) {
+  int prot = GetAshmemRegionProtectionMask(handle);
+  if (prot < 0)
+    return false;
+
+  bool is_read_only = (prot & PROT_WRITE) == 0;
+  bool expected_read_only = mode == Mode::kReadOnly;
+
+  if (is_read_only != expected_read_only) {
+    DLOG(ERROR) << "Ashmem region has a wrong protection mask: it is"
+                << (is_read_only ? " " : " not ") << "read-only but it should"
+                << (expected_read_only ? " " : " not ") << "be";
+    return false;
+  }
+
+  return true;
+}
+
 PlatformSharedMemoryRegion::PlatformSharedMemoryRegion(
     ScopedFD fd,
     Mode mode,
diff --git a/base/memory/platform_shared_memory_region_fuchsia.cc b/base/memory/platform_shared_memory_region_fuchsia.cc
index f5113e8..95d7e3e5 100644
--- a/base/memory/platform_shared_memory_region_fuchsia.cc
+++ b/base/memory/platform_shared_memory_region_fuchsia.cc
@@ -152,6 +152,15 @@
                                     UnguessableToken::Create());
 }
 
+// static
+bool PlatformSharedMemoryRegion::CheckPlatformHandlePermissionsCorrespondToMode(
+    PlatformHandle handle,
+    Mode mode,
+    size_t size) {
+  // TODO(https://crbug.com/825177): implement this.
+  return true;
+}
+
 PlatformSharedMemoryRegion::PlatformSharedMemoryRegion(
     ScopedZxHandle handle,
     Mode mode,
diff --git a/base/memory/platform_shared_memory_region_mac.cc b/base/memory/platform_shared_memory_region_mac.cc
index a6ac91e..23e8565 100644
--- a/base/memory/platform_shared_memory_region_mac.cc
+++ b/base/memory/platform_shared_memory_region_mac.cc
@@ -175,6 +175,15 @@
                                     UnguessableToken::Create());
 }
 
+// static
+bool PlatformSharedMemoryRegion::CheckPlatformHandlePermissionsCorrespondToMode(
+    PlatformHandle handle,
+    Mode mode,
+    size_t size) {
+  // TODO(https://crbug.com/825177): implement this.
+  return true;
+}
+
 PlatformSharedMemoryRegion::PlatformSharedMemoryRegion(
     mac::ScopedMachSendRight handle,
     Mode mode,
diff --git a/base/memory/platform_shared_memory_region_posix.cc b/base/memory/platform_shared_memory_region_posix.cc
index f99d42a..709f776 100644
--- a/base/memory/platform_shared_memory_region_posix.cc
+++ b/base/memory/platform_shared_memory_region_posix.cc
@@ -31,6 +31,23 @@
 using ScopedPathUnlinker =
     ScopedGeneric<const FilePath*, ScopedPathUnlinkerTraits>;
 
+bool CheckFDAccessMode(int fd, int expected_mode) {
+  int fd_status = fcntl(fd, F_GETFL);
+  if (fd_status == -1) {
+    DPLOG(ERROR) << "fcntl(" << fd << ", F_GETFL) failed";
+    return false;
+  }
+
+  int mode = fd_status & O_ACCMODE;
+  if (mode != expected_mode) {
+    DLOG(ERROR) << "Descriptor access mode (" << mode
+                << ") differs from expected (" << expected_mode << ")";
+    return false;
+  }
+
+  return true;
+}
+
 }  // namespace
 
 ScopedFDPair::ScopedFDPair() = default;
@@ -242,6 +259,27 @@
 #endif  // !defined(OS_NACL)
 }
 
+bool PlatformSharedMemoryRegion::CheckPlatformHandlePermissionsCorrespondToMode(
+    PlatformHandle handle,
+    Mode mode,
+    size_t size) {
+  if (!CheckFDAccessMode(handle.fd,
+                         mode == Mode::kReadOnly ? O_RDONLY : O_RDWR)) {
+    return false;
+  }
+
+  if (mode == Mode::kWritable)
+    return CheckFDAccessMode(handle.readonly_fd, O_RDONLY);
+
+  // The second descriptor must be invalid in kReadOnly and kUnsafe modes.
+  if (handle.readonly_fd != -1) {
+    DLOG(ERROR) << "The second descriptor must be invalid";
+    return false;
+  }
+
+  return true;
+}
+
 PlatformSharedMemoryRegion::PlatformSharedMemoryRegion(
     ScopedFDPair handle,
     Mode mode,
diff --git a/base/memory/platform_shared_memory_region_unittest.cc b/base/memory/platform_shared_memory_region_unittest.cc
index 025840d..36d3d5e8 100644
--- a/base/memory/platform_shared_memory_region_unittest.cc
+++ b/base/memory/platform_shared_memory_region_unittest.cc
@@ -192,6 +192,37 @@
 }
 #endif
 
+// Tests that platform handle permissions are checked correctly.
+TEST_F(PlatformSharedMemoryRegionTest,
+       CheckPlatformHandlePermissionsCorrespondToMode) {
+  using Mode = PlatformSharedMemoryRegion::Mode;
+  auto check = [](const PlatformSharedMemoryRegion& region,
+                  PlatformSharedMemoryRegion::Mode mode) {
+    return PlatformSharedMemoryRegion::
+        CheckPlatformHandlePermissionsCorrespondToMode(
+            region.GetPlatformHandle(), mode, region.GetSize());
+  };
+
+  // Check kWritable region.
+  PlatformSharedMemoryRegion region =
+      PlatformSharedMemoryRegion::CreateWritable(kRegionSize);
+  ASSERT_TRUE(region.IsValid());
+  EXPECT_TRUE(check(region, Mode::kWritable));
+
+  // Check kReadOnly region.
+  ASSERT_TRUE(region.ConvertToReadOnly());
+  EXPECT_TRUE(check(region, Mode::kReadOnly));
+
+  // Check kUnsafe region.
+  PlatformSharedMemoryRegion region2 =
+      PlatformSharedMemoryRegion::CreateUnsafe(kRegionSize);
+  ASSERT_TRUE(region2.IsValid());
+  EXPECT_TRUE(check(region2, Mode::kUnsafe));
+
+  // TODO(https://crbug.com/825177): add negative expectations once all
+  // platforms implement this check.
+}
+
 // Tests that it's impossible to create read-only platform shared memory region.
 TEST_F(PlatformSharedMemoryRegionTest, CreateReadOnlyRegionDeathTest) {
 #ifdef OFFICIAL_BUILD
diff --git a/base/memory/platform_shared_memory_region_win.cc b/base/memory/platform_shared_memory_region_win.cc
index 629e187..297093d 100644
--- a/base/memory/platform_shared_memory_region_win.cc
+++ b/base/memory/platform_shared_memory_region_win.cc
@@ -305,6 +305,15 @@
                                     UnguessableToken::Create());
 }
 
+// static
+bool PlatformSharedMemoryRegion::CheckPlatformHandlePermissionsCorrespondToMode(
+    PlatformHandle handle,
+    Mode mode,
+    size_t size) {
+  // TODO(https://crbug.com/825177): implement this.
+  return true;
+}
+
 PlatformSharedMemoryRegion::PlatformSharedMemoryRegion(
     win::ScopedHandle handle,
     Mode mode,
diff --git a/base/trace_event/cfi_backtrace_android.cc b/base/trace_event/cfi_backtrace_android.cc
deleted file mode 100644
index fa26c58..0000000
--- a/base/trace_event/cfi_backtrace_android.cc
+++ /dev/null
@@ -1,277 +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 "base/trace_event/cfi_backtrace_android.h"
-
-#include <sys/mman.h>
-#include <sys/types.h>
-
-#include "base/android/apk_assets.h"
-#include "base/debug/stack_trace.h"
-
-#if !defined(ARCH_CPU_ARMEL)
-#error This file should not be built for this architecture.
-#endif
-
-/*
-Basics of unwinding:
-For each instruction in a function we need to know what is the offset of SP
-(Stack Pointer) to reach the previous function's stack frame. To know which
-function is being invoked, we need the return address of the next function. The
-CFI information for an instruction is made up of 2 offsets, CFA (Call Frame
-Address) offset and RA (Return Address) offset. The CFA offset is the change in
-SP made by the function till the current instruction. This depends on amount of
-memory allocated on stack by the function plus some registers that the function
-stores that needs to be restored at the end of function. So, at each instruction
-the CFA offset tells the offset from original SP before the function call. The
-RA offset tells us the offset from the previous SP into the current function
-where the return address is stored.
-
-The unwind table contains rows of 64 bits each.
-We have 2 types of rows, FUNCTION and CFI.
-Each function with CFI info has a single FUNCTION row, followed by one or more
-CFI rows. All the addresses of the CFI rows will be within the function.
-1. FUNCTION. Bits in order of high to low represent:
-    31 bits: specifies function address, without the last bit (always 0).
-     1 bit : always 1. Last bit of the address, specifies the row type is
-             FUNCTION.
-    32 bits: length of the current function.
-
-2. CFI. Bits in order of high to low represent:
-    31 bits: instruction address in the current function.
-     1 bit : always 0. Last bit of the address, specifies the row type is CFI.
-    30 bits: CFA offset / 4.
-     2 bits: RA offset / 4.
-If the RA offset of a row is 0, then use the offset of the previous rows in the
-same function.
-TODO(ssid): Make sure RA offset is always present.
-
-See extract_unwind_tables.py for details about how this data is extracted from
-breakpad symbol files.
-*/
-
-extern "C" {
-extern char __executable_start;
-extern char _etext;
-}
-
-namespace base {
-namespace trace_event {
-
-namespace {
-
-// The bit of the address that is used to specify the type of the row is
-// FUNCTION or CFI type.
-constexpr uint32_t kFunctionTypeMask = 0x1;
-
-// The mask on the CFI row data that is used to get the high 30 bits and
-// multiply it by 4 to get CFA offset. Since the last 2 bits are masked out, a
-// shift is not necessary.
-constexpr uint32_t kCFAMask = 0xfffffffc;
-
-// The mask on the CFI row data that is used to get the low 2 bits and multiply
-// it by 4 to get the RA offset.
-constexpr uint32_t kRAMask = 0x3;
-constexpr uint32_t kRAShift = 2;
-
-// The code in this file assumes we are running in 32-bit builds since all the
-// addresses in the unwind table are specified in 32 bits.
-static_assert(sizeof(uintptr_t) == 4,
-              "The unwind table format is only valid for 32 bit builds.");
-
-// The struct that corresponds to each row in the unwind table. The row can be
-// of any type, CFI or FUNCTION. The first 4 bytes in the row represents the
-// address and the next 4 bytes have data. The members of this struct is in
-// order of the input format. We cast the memory map of the unwind table as an
-// array of CFIUnwindInfo and use it to read data and search. So, the size of
-// this struct should be 8 bytes and the order of the members is fixed according
-// to the given format.
-struct CFIUnwindInfo {
-  // The address is either the start address of the function or the instruction
-  // address where the CFI information changes in a function. If the last bit of
-  // the address is 1 then it specifies that the row is of type FUNCTION and if
-  // the last bit is 0 then it specifies the row is of type CFI.
-  uintptr_t addr;
-
-  // If the row type is function, |data| is |function_length|. If the row type
-  // is CFI, |data| is |cfi_data|.
-  union {
-    // Represents the total length of the function that start with the |addr|.
-    uintptr_t function_length;
-    // Represents the CFA and RA offsets to get information about next stack
-    // frame.
-    uintptr_t cfi_data;
-  } data;
-
-  bool is_function_type() const { return !!(addr & kFunctionTypeMask); }
-
-  // Returns the address of the current row, CFI or FUNCTION type.
-  uintptr_t address() const {
-    return is_function_type() ? (addr & ~kFunctionTypeMask) : addr;
-  }
-
-  // Return the RA offset when the current row is CFI type.
-  uintptr_t ra_offset() const {
-    DCHECK(!is_function_type());
-    return (data.cfi_data & kRAMask) << kRAShift;
-  }
-
-  // Returns the CFA offset if the current row is CFI type.
-  uintptr_t cfa_offset() const {
-    DCHECK(!is_function_type());
-    return data.cfi_data & kCFAMask;
-  }
-
-  // Returns true if the instruction is within the function address range, given
-  // that the current row is FUNCTION type and the |instruction_addr| is offset
-  // address of instruction from the start of the binary.
-  bool is_instruction_in_function(uintptr_t instruction_addr) const {
-    DCHECK(is_function_type());
-    return (instruction_addr >= address()) &&
-           (instruction_addr <= address() + data.function_length);
-  }
-};
-
-static_assert(
-    sizeof(CFIUnwindInfo) == 8,
-    "The CFIUnwindInfo struct must be exactly 8 bytes for searching.");
-
-}  // namespace
-
-// static
-CFIBacktraceAndroid* CFIBacktraceAndroid::GetInstance() {
-  static CFIBacktraceAndroid* instance = new CFIBacktraceAndroid();
-  return instance;
-}
-
-CFIBacktraceAndroid::CFIBacktraceAndroid() {
-  Initialize();
-}
-
-CFIBacktraceAndroid::~CFIBacktraceAndroid() {}
-
-void CFIBacktraceAndroid::Initialize() {
-  // The address |_etext| gives the end of the .text section in the binary. This
-  // value is more accurate than parsing the memory map since the mapped
-  // regions are usualy larger than the .text section.
-  executable_end_addr_ = reinterpret_cast<uintptr_t>(&_etext);
-  // The address of |__executable_start| gives the start address of the
-  // executable. This value is used to find the offset address of the
-  // instruction in binary from PC.
-  executable_start_addr_ = reinterpret_cast<uintptr_t>(&__executable_start);
-
-  // This file name is defined by extract_unwind_tables.gni.
-  static constexpr char kCfiFileName[] = "assets/unwind_cfi";
-  MemoryMappedFile::Region cfi_region;
-  int fd = base::android::OpenApkAsset(kCfiFileName, &cfi_region);
-  if (fd < 0)
-    return;
-  cfi_mmap_ = std::make_unique<MemoryMappedFile>();
-  // The CFI region starts at |cfi_region.offset|.
-  if (!cfi_mmap_->Initialize(base::File(fd), cfi_region))
-    return;
-  // The CFI file should contain rows of 8 bytes each.
-  DCHECK_EQ(0u, cfi_region.size % sizeof(CFIUnwindInfo));
-  unwind_table_row_count_ = cfi_region.size / sizeof(CFIUnwindInfo);
-  can_unwind_stack_frames_ = true;
-}
-
-size_t CFIBacktraceAndroid::Unwind(const void** out_trace,
-                                   size_t max_depth) const {
-  // This function walks the stack using the call frame information to find the
-  // return addresses of all the functions that belong to current binary in call
-  // stack. For each function the CFI table defines the offset of the previous
-  // call frame and offset where the return address is stored.
-  if (!can_unwind_stack_frames())
-    return 0;
-
-  // Get the current register state. This register state can be taken at any
-  // point in the function and the unwind information would be for this point.
-  // Define local variables before trying to get the current PC and SP to make
-  // sure the register state obtained is consistent with each other.
-  uintptr_t pc = 0, sp = 0;
-  asm volatile("mov %0, pc" : "=r"(pc));
-  asm volatile("mov %0, sp" : "=r"(sp));
-
-  // We can only unwind as long as the pc is within the chrome.so.
-  size_t depth = 0;
-  while (pc > executable_start_addr_ && pc <= executable_end_addr_ &&
-         depth < max_depth) {
-    out_trace[depth++] = reinterpret_cast<void*>(pc);
-    // The offset of function from the start of the chrome.so binary:
-    uintptr_t func_addr = pc - executable_start_addr_;
-    CFIRow cfi{};
-    if (!FindCFIRowForPC(func_addr, &cfi))
-      break;
-
-    // The rules for unwinding using the CFI information are:
-    // SP_prev = SP_cur + cfa_offset and
-    // PC_prev = * (SP_prev - ra_offset).
-    sp = sp + cfi.cfa_offset;
-    memcpy(&pc, reinterpret_cast<uintptr_t*>(sp - cfi.ra_offset),
-           sizeof(uintptr_t));
-  }
-  return depth;
-}
-
-bool CFIBacktraceAndroid::FindCFIRowForPC(
-    uintptr_t func_addr,
-    CFIBacktraceAndroid::CFIRow* cfi) const {
-  // Consider the CFI mapped region as an array of CFIUnwindInfo since each row
-  // is 8 bytes long and it contains |cfi_region_size_| / 8 rows. We define
-  // start and end iterator on this array and use std::lower_bound() to binary
-  // search on this array. std::lower_bound() returns the row that corresponds
-  // to the first row that has address greater than the current value, since
-  // address is used in compartor.
-  const CFIUnwindInfo* start =
-      reinterpret_cast<const CFIUnwindInfo*>(cfi_mmap_->data());
-  const CFIUnwindInfo* end = start + unwind_table_row_count_;
-  const CFIUnwindInfo to_find = {func_addr, {0}};
-  const CFIUnwindInfo* found = std::lower_bound(
-      start, end, to_find,
-      [](const auto& a, const auto& b) { return a.addr < b.addr; });
-  *cfi = {0};
-
-  // The given address is less than the start address in the CFI table if
-  // lower_bound() returns start.
-  if (found == start)
-    return false;
-  // If the given address is equal to the found address, then use the found row.
-  // Otherwise the required row is always one less than the value returned by
-  // std::lower_bound().
-  if (found == end || found->address() != func_addr)
-    found--;
-
-  DCHECK_LE(found->address(), func_addr);
-  DCHECK(!found->is_function_type())
-      << "Current PC cannot be start of a function";
-
-  // The CFIUnwindInfo::data field hold the CFI information since the row
-  // found should not correspond to function start address. So, interpret the
-  // data in the found row as CFI data which contains the CFA and RA offsets.
-  *cfi = {found->cfa_offset(), found->ra_offset()};
-  DCHECK(cfi->cfa_offset);
-
-  // Find the function data for the current row by iterating till we reach the a
-  // row of type FUNCTION, to check if the unwind information is valid. Also
-  // find the RA offset if we do not have it in the CFI row found.
-  const CFIUnwindInfo* it = found;
-  for (; !it->is_function_type() && it >= start; it--) {
-    // If ra offset of the last specified row should be used, if unspecified.
-    // TODO(ssid): This should be fixed in the format and we should always
-    // output ra offset.
-    if (!cfi->ra_offset)
-      cfi->ra_offset = it->ra_offset();
-  }
-  // If the given function adddress does not belong to the function found, then
-  // the unwind info is invalid.
-  if (!it->is_instruction_in_function(func_addr))
-    return false;
-
-  DCHECK(cfi->ra_offset);
-  return true;
-}
-
-}  // namespace trace_event
-}  // namespace base
diff --git a/base/trace_event/cfi_backtrace_android.h b/base/trace_event/cfi_backtrace_android.h
deleted file mode 100644
index bad7290..0000000
--- a/base/trace_event/cfi_backtrace_android.h
+++ /dev/null
@@ -1,103 +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 BASE_TRACE_EVENT_CFI_BACKTRACE_ANDROID_H_
-#define BASE_TRACE_EVENT_CFI_BACKTRACE_ANDROID_H_
-
-#include <stddef.h>
-#include <stdint.h>
-
-#include <memory>
-
-#include "base/base_export.h"
-#include "base/debug/debugging_buildflags.h"
-#include "base/files/memory_mapped_file.h"
-#include "base/gtest_prod_util.h"
-
-namespace base {
-namespace trace_event {
-
-// This class is used to unwind stack frames in the current thread. The unwind
-// information (dwarf debug info) is stripped from the chrome binary and we do
-// not build with exception tables (ARM EHABI) in release builds. So, we use a
-// custom unwind table which is generated and added to specific android builds,
-// when add_unwind_tables_in_apk build option is specified. This unwind table
-// contains information for unwinding stack frames when the functions calls are
-// from lib[mono]chrome.so. The file is added as an asset to the apk and the
-// table is used to unwind stack frames for profiling. This class implements
-// methods to read and parse the unwind table and unwind stack frames using this
-// data.
-class BASE_EXPORT CFIBacktraceAndroid {
- public:
-  // Creates and initializes the unwinder on first call.
-  static CFIBacktraceAndroid* GetInstance();
-
-  // Returns true if stack unwinding is possible using CFI unwind tables in apk.
-  // There is no need to check this before each unwind call. Will always return
-  // the same value based on CFI tables being present in the binary.
-  bool can_unwind_stack_frames() const { return can_unwind_stack_frames_; }
-
-  // Returns the program counters by unwinding stack in the current thread in
-  // order of latest call frame first. Unwinding works only if
-  // can_unwind_stack_frames() returns true. This function does not allocate
-  // memory from heap. For each stack frame, this method searches through the
-  // unwind table mapped in memory to find the unwind information for function
-  // and walks the stack to find all the return address. This only works until
-  // the last function call from the chrome.so. We do not have unwind
-  // information to unwind beyond any frame outside of chrome.so. Calls to
-  // Unwind() are thread safe and lock free, once Initialize() returns success.
-  size_t Unwind(const void** out_trace, size_t max_depth) const;
-
- private:
-  FRIEND_TEST_ALL_PREFIXES(CFIBacktraceAndroidTest, TestFindCFIRow);
-  FRIEND_TEST_ALL_PREFIXES(CFIBacktraceAndroidTest, TestUnwinding);
-
-  // The CFI information that correspond to an instruction.
-  struct CFIRow {
-    bool operator==(const CFIBacktraceAndroid::CFIRow& o) const {
-      return cfa_offset == o.cfa_offset && ra_offset == o.ra_offset;
-    }
-
-    // The offset of the call frame address of previous function from the
-    // current stack pointer. Rule for unwinding SP: SP_prev = SP_cur +
-    // cfa_offset.
-    size_t cfa_offset = 0;
-    // The offset of location of return address from the previous call frame
-    // address. Rule for unwinding PC: PC_prev = * (SP_prev - ra_offset).
-    size_t ra_offset = 0;
-  };
-
-  CFIBacktraceAndroid();
-  ~CFIBacktraceAndroid();
-
-  // Initializes unwind tables using the CFI asset file in the apk if present.
-  // Also stores the limits of mapped region of the lib[mono]chrome.so binary,
-  // since the unwind is only feasible for addresses within the .so file. Once
-  // initialized, the memory map of the unwind table is never cleared since we
-  // cannot guarantee that all the threads are done using the memory map when
-  // heap profiling is turned off. But since we keep the memory map is clean,
-  // the system can choose to evict the unused pages when needed. This would
-  // still reduce the total amount of address space available in process.
-  void Initialize();
-
-  // Finds the CFI row for the given |func_addr| in terms of offset from
-  // the start of the current binary.
-  bool FindCFIRowForPC(uintptr_t func_addr, CFIRow* out) const;
-
-  // Details about the memory mapped region which contains the libchrome.so
-  // library file.
-  uintptr_t executable_start_addr_ = 0;
-  uintptr_t executable_end_addr_ = 0;
-
-  // The start address of the memory mapped unwind table asset file. Unique ptr
-  // because it is replaced in tests.
-  std::unique_ptr<MemoryMappedFile> cfi_mmap_;
-  size_t unwind_table_row_count_ = 0;
-  bool can_unwind_stack_frames_ = false;
-};
-
-}  // namespace trace_event
-}  // namespace base
-
-#endif  // BASE_TRACE_EVENT_CFI_BACKTRACE_ANDROID_H_
diff --git a/base/trace_event/cfi_backtrace_android_unittest.cc b/base/trace_event/cfi_backtrace_android_unittest.cc
deleted file mode 100644
index 0a25d37..0000000
--- a/base/trace_event/cfi_backtrace_android_unittest.cc
+++ /dev/null
@@ -1,117 +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 "base/trace_event/cfi_backtrace_android.h"
-
-#include "base/files/file_util.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace base {
-namespace trace_event {
-
-namespace {
-
-void* GetPC() {
-  return __builtin_return_address(0);
-}
-
-}  // namespace
-
-TEST(CFIBacktraceAndroidTest, TestUnwinding) {
-  auto* unwinder = CFIBacktraceAndroid::GetInstance();
-  EXPECT_TRUE(unwinder->can_unwind_stack_frames());
-  EXPECT_GT(unwinder->executable_start_addr_, 0u);
-  EXPECT_GT(unwinder->executable_end_addr_, unwinder->executable_start_addr_);
-  EXPECT_GT(unwinder->cfi_mmap_->length(), 0u);
-
-  const size_t kMaxFrames = 100;
-  const void* frames[kMaxFrames];
-  size_t unwind_count = unwinder->Unwind(frames, kMaxFrames);
-  // Expect at least 2 frames in the result.
-  ASSERT_GT(unwind_count, 2u);
-  EXPECT_LE(unwind_count, kMaxFrames);
-
-  const size_t kMaxCurrentFuncCodeSize = 50;
-  const uintptr_t current_pc = reinterpret_cast<uintptr_t>(GetPC());
-  const uintptr_t actual_frame = reinterpret_cast<uintptr_t>(frames[2]);
-  EXPECT_NEAR(current_pc, actual_frame, kMaxCurrentFuncCodeSize);
-
-  for (size_t i = 0; i < unwind_count; ++i) {
-    EXPECT_GT(reinterpret_cast<uintptr_t>(frames[i]),
-              unwinder->executable_start_addr_);
-    EXPECT_LT(reinterpret_cast<uintptr_t>(frames[i]),
-              unwinder->executable_end_addr_);
-  }
-}
-
-TEST(CFIBacktraceAndroidTest, TestFindCFIRow) {
-  auto* unwinder = CFIBacktraceAndroid::GetInstance();
-  size_t input[] = {// Function 1 - 0x1000
-                    0x1001, 0x500,
-                    0x1002, 0x111,
-                    0x1008, 0x220,
-                    0x1040, 0x330,
-                    0x1050, 0x332,
-                    0x1080, 0x330,
-
-                    // Function 2 - 0x2000
-                    0x2001, 0x22,
-                    0x2004, 0x13,
-                    0x2008, 0x23,
-
-                    // Function 3 - 0x2024
-                    0x2025, 0x100,
-                    0x2030, 0x33,
-                    0x2100, 0x40,
-
-                    // Function 4 - 0x2200
-                    0x2201, 0x10,
-                    0x2204, 0x2e};
-  FilePath temp_path;
-  CreateTemporaryFile(&temp_path);
-  EXPECT_EQ(
-      static_cast<int>(sizeof(input)),
-      WriteFile(temp_path, reinterpret_cast<char*>(input), sizeof(input)));
-
-  unwinder->cfi_mmap_.reset(new MemoryMappedFile());
-  ASSERT_TRUE(unwinder->cfi_mmap_->Initialize(temp_path));
-  unwinder->unwind_table_row_count_ = sizeof(input) / (2 * sizeof(size_t));
-
-  CFIBacktraceAndroid::CFIRow cfi_row = {0};
-  EXPECT_FALSE(unwinder->FindCFIRowForPC(0x00, &cfi_row));
-  EXPECT_FALSE(unwinder->FindCFIRowForPC(0x100, &cfi_row));
-  EXPECT_FALSE(unwinder->FindCFIRowForPC(0x1501, &cfi_row));
-  EXPECT_FALSE(unwinder->FindCFIRowForPC(0x3000, &cfi_row));
-  EXPECT_FALSE(unwinder->FindCFIRowForPC(0x2023, &cfi_row));
-  EXPECT_FALSE(unwinder->FindCFIRowForPC(0x2215, &cfi_row));
-
-  const CFIBacktraceAndroid::CFIRow kRow1 = {0x110, 0x4};
-  const CFIBacktraceAndroid::CFIRow kRow2 = {0x220, 0x4};
-  const CFIBacktraceAndroid::CFIRow kRow3 = {0x330, 0x8};
-  const CFIBacktraceAndroid::CFIRow kRow4 = {0x30, 0xc};
-  const CFIBacktraceAndroid::CFIRow kRow5 = {0x2c, 0x8};
-  EXPECT_TRUE(unwinder->FindCFIRowForPC(0x1002, &cfi_row));
-  EXPECT_EQ(kRow1, cfi_row);
-  EXPECT_TRUE(unwinder->FindCFIRowForPC(0x1003, &cfi_row));
-  EXPECT_EQ(kRow1, cfi_row);
-  EXPECT_TRUE(unwinder->FindCFIRowForPC(0x1008, &cfi_row));
-  EXPECT_EQ(kRow2, cfi_row);
-  EXPECT_TRUE(unwinder->FindCFIRowForPC(0x1009, &cfi_row));
-  EXPECT_EQ(kRow2, cfi_row);
-  EXPECT_TRUE(unwinder->FindCFIRowForPC(0x1039, &cfi_row));
-  EXPECT_EQ(kRow2, cfi_row);
-  EXPECT_TRUE(unwinder->FindCFIRowForPC(0x1080, &cfi_row));
-  EXPECT_EQ(kRow3, cfi_row);
-  EXPECT_TRUE(unwinder->FindCFIRowForPC(0x1100, &cfi_row));
-  EXPECT_EQ(kRow3, cfi_row);
-  EXPECT_TRUE(unwinder->FindCFIRowForPC(0x2050, &cfi_row));
-  EXPECT_EQ(kRow4, cfi_row);
-  EXPECT_TRUE(unwinder->FindCFIRowForPC(0x2208, &cfi_row));
-  EXPECT_EQ(kRow5, cfi_row);
-  EXPECT_TRUE(unwinder->FindCFIRowForPC(0x2210, &cfi_row));
-  EXPECT_EQ(kRow5, cfi_row);
-}
-
-}  // namespace trace_event
-}  // namespace base
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index e018349..23b7971 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -2096,6 +2096,9 @@
       # TODO(thakis): Consider making clang emit DW_AT_linkage_name in -g1 mode;
       #               failing that consider doing this on non-Android too.
       cflags += [ "-fdebug-info-for-profiling" ]
+      if (strip_debug_info) {
+        ldflags += [ "-Wl,--strip-debug" ]
+      }
     }
 
     # Note: -gsplit-dwarf implicitly turns on -g2 with clang, so don't pass it.
@@ -2122,18 +2125,6 @@
   } else {
     assert(false)
   }
-
-  # This config is removed by base unittests apk.
-  if (is_android && is_clang && strip_debug_info) {
-    configs += [ ":strip_debug" ]
-  }
-}
-
-config("strip_debug") {
-  if (!defined(ldflags)) {
-    ldflags = []
-  }
-  ldflags += [ "-Wl,--strip-debug" ]
 }
 
 if (is_ios || is_mac) {
diff --git a/build/config/compiler/compiler.gni b/build/config/compiler/compiler.gni
index accd5691..5fb5a3c 100644
--- a/build/config/compiler/compiler.gni
+++ b/build/config/compiler/compiler.gni
@@ -141,12 +141,6 @@
 
 assert(!can_unwind_with_frame_pointers || enable_frame_pointers)
 
-# Unwinding with CFI table is only possible on static library builds and
-# requried only when frame pointers are not enabled.
-can_unwind_with_cfi_table =
-    is_android && !is_component_build && !can_unwind_with_frame_pointers &&
-    current_cpu == "arm"
-
 declare_args() {
   # Whether or not the official builds should be built with full WPO. Enabled by
   # default for the PGO and the x64 builds.
diff --git a/chrome/VERSION b/chrome/VERSION
index 6a4e3bc..76d36aa 100644
--- a/chrome/VERSION
+++ b/chrome/VERSION
@@ -1,4 +1,4 @@
 MAJOR=67
 MINOR=0
-BUILD=3382
+BUILD=3383
 PATCH=0
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java b/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java
index 1728e45..cd978d6d 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java
@@ -1076,12 +1076,11 @@
         } else if (mMediaNotificationInfo.notificationLargeIcon != null) {
             builder.setLargeIcon(mMediaNotificationInfo.notificationLargeIcon);
         } else if (!isRunningAtLeastN()) {
-            if (mDefaultNotificationLargeIcon == null) {
-                int resourceId = (mMediaNotificationInfo.defaultNotificationLargeIcon != 0)
-                        ? mMediaNotificationInfo.defaultNotificationLargeIcon
-                        : R.drawable.audio_playing_square;
+            if (mDefaultNotificationLargeIcon == null
+                    && mMediaNotificationInfo.defaultNotificationLargeIcon != 0) {
                 mDefaultNotificationLargeIcon = downscaleIconToIdealSize(
-                        BitmapFactory.decodeResource(getContext().getResources(), resourceId));
+                        BitmapFactory.decodeResource(getContext().getResources(),
+                                mMediaNotificationInfo.defaultNotificationLargeIcon));
             }
             builder.setLargeIcon(mDefaultNotificationLargeIcon);
         }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaSessionTabHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaSessionTabHelper.java
index 5b497a26..f6ebde3 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaSessionTabHelper.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaSessionTabHelper.java
@@ -213,8 +213,9 @@
                 }
 
                 if (mFallbackTitle == null) mFallbackTitle = sanitizeMediaTitle(mTab.getTitle());
+
                 mCurrentMetadata = getMetadata();
-                mCurrentMediaImage = getNotificationImage();
+                mCurrentMediaImage = getCachedNotificationImage();
                 mNotificationInfoBuilder =
                         new MediaNotificationInfo.Builder()
                                 .setMetadata(mCurrentMetadata)
@@ -224,7 +225,6 @@
                                 .setPrivate(mTab.isIncognito())
                                 .setNotificationSmallIcon(R.drawable.audio_playing)
                                 .setNotificationLargeIcon(mCurrentMediaImage)
-                                .setDefaultNotificationLargeIcon(R.drawable.audio_playing_square)
                                 .setMediaSessionImage(mPageMediaImage)
                                 .setActions(MediaNotificationInfo.ACTION_PLAY_PAUSE
                                         | MediaNotificationInfo.ACTION_SWIPEAWAY)
@@ -233,6 +233,14 @@
                                 .setListener(mControlsListener)
                                 .setMediaSessionActions(mMediaSessionActions);
 
+                // Do not show notification icon till we get the favicon from the LargeIconBridge
+                // since we do not need to show default icon then change it to favicon. It is ok to
+                // wait here since the favicon is loaded from local cache in favicon service sql
+                // database.
+                if (mCurrentMediaImage == null && !fetchFaviconImage()) {
+                    mNotificationInfoBuilder.setDefaultNotificationLargeIcon(
+                            R.drawable.audio_playing_square);
+                }
                 showNotification();
                 Activity activity = getActivityFromTab(mTab);
                 if (activity != null) {
@@ -518,14 +526,20 @@
         showNotification();
     }
 
-    private Bitmap getNotificationImage() {
+    private Bitmap getCachedNotificationImage() {
         if (mPageMediaImage != null) return mPageMediaImage;
         if (mFavicon != null) return mFavicon;
+        return null;
+    }
 
-        // Fetch favicon image and update the notification when available.
-        if (mTab == null) return null;
+    /**
+     * Fetch favicon image and update the notification when available.
+     * @return if the favicon will be updated.
+     */
+    private boolean fetchFaviconImage() {
+        if (mTab == null) return false;
         WebContents webContents = mTab.getWebContents();
-        if (webContents == null) return null;
+        if (webContents == null) return false;
         String pageUrl = webContents.getLastCommittedUrl();
         int size = MediaNotificationManager.MINIMAL_MEDIA_IMAGE_SIZE_PX;
         if (mLargeIconBridge == null) {
@@ -535,12 +549,19 @@
             @Override
             public void onLargeIconAvailable(
                     Bitmap icon, int fallbackColor, boolean isFallbackColorDefault, int iconType) {
-                updateFavicon(icon);
+                if (icon == null) {
+                    // If we do not have any favicon then make sure we show default sound icon. This
+                    // icon is used by notification manager only if we do not show any icon.
+                    mNotificationInfoBuilder.setDefaultNotificationLargeIcon(
+                            R.drawable.audio_playing_square);
+                    showNotification();
+                } else {
+                    updateFavicon(icon);
+                }
             }
         };
-        mLargeIconBridge.getLargeIconForUrl(pageUrl, size, callback);
 
-        return null;
+        return mLargeIconBridge.getLargeIconForUrl(pageUrl, size, callback);
     }
 
     private boolean isNotificationHiddingOrHidden() {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/photo_picker/DecoderServiceHost.java b/chrome/android/java/src/org/chromium/chrome/browser/photo_picker/DecoderServiceHost.java
index 8b92d07..fe8fa7b 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/photo_picker/DecoderServiceHost.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/photo_picker/DecoderServiceHost.java
@@ -39,6 +39,12 @@
     // A tag for logging error messages.
     private static final String TAG = "ImageDecoderHost";
 
+    // The number of successful decodes, per batch.
+    private int mSuccessfulDecodes = 0;
+
+    // The number of failed decodes, per batch.
+    private int mFailedDecodes = 0;
+
     // A callback to use for testing to see if decoder is ready.
     static ServiceReadyCallback sReadyCallbackForTesting;
 
@@ -174,6 +180,15 @@
             DecoderServiceParams params = mRequests.entrySet().iterator().next().getValue();
             params.mTimestamp = SystemClock.elapsedRealtime();
             dispatchDecodeImageRequest(params.mFilePath, params.mSize);
+        } else {
+            int totalRequests = mSuccessfulDecodes + mFailedDecodes;
+            if (totalRequests > 0) {
+                int successPercentage = 100 * mSuccessfulDecodes / totalRequests;
+                RecordHistogram.recordPercentageHistogram(
+                        "Android.PhotoPicker.DecoderHostSuccess", successPercentage);
+                mSuccessfulDecodes = 0;
+                mFailedDecodes = 0;
+            }
         }
     }
 
@@ -185,14 +200,19 @@
         ThreadUtils.runOnUiThread(new Runnable() {
             @Override
             public void run() {
-                // Read the reply back from the service.
-                String filePath = payload.getString(DecoderService.KEY_FILE_PATH);
-                Boolean success = payload.getBoolean(DecoderService.KEY_SUCCESS);
-                Bitmap bitmap = success
-                        ? (Bitmap) payload.getParcelable(DecoderService.KEY_IMAGE_BITMAP)
-                        : null;
-                long decodeTime = payload.getLong(DecoderService.KEY_DECODE_TIME);
-                closeRequest(filePath, bitmap, decodeTime);
+                try {
+                    // Read the reply back from the service.
+                    String filePath = payload.getString(DecoderService.KEY_FILE_PATH);
+                    Boolean success = payload.getBoolean(DecoderService.KEY_SUCCESS);
+                    Bitmap bitmap = success
+                            ? (Bitmap) payload.getParcelable(DecoderService.KEY_IMAGE_BITMAP)
+                            : null;
+                    long decodeTime = payload.getLong(DecoderService.KEY_DECODE_TIME);
+                    mSuccessfulDecodes++;
+                    closeRequest(filePath, bitmap, decodeTime);
+                } catch (RuntimeException e) {
+                    mFailedDecodes++;
+                }
             }
         });
     }
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/media/ui/MediaNotificationManagerNotificationTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/media/ui/MediaNotificationManagerNotificationTest.java
index ff283b9..7bab118 100644
--- a/chrome/android/junit/src/org/chromium/chrome/browser/media/ui/MediaNotificationManagerNotificationTest.java
+++ b/chrome/android/junit/src/org/chromium/chrome/browser/media/ui/MediaNotificationManagerNotificationTest.java
@@ -23,6 +23,7 @@
 import org.robolectric.shadows.ShadowNotification;
 
 import org.chromium.base.test.BaseRobolectricTestRunner;
+import org.chromium.chrome.R;
 import org.chromium.content_public.common.MediaMetadata;
 
 /**
@@ -126,7 +127,10 @@
 
         mMediaNotificationInfoBuilder.setNotificationLargeIcon(null);
 
-        MediaNotificationInfo info = mMediaNotificationInfoBuilder.build();
+        MediaNotificationInfo info =
+                mMediaNotificationInfoBuilder
+                        .setDefaultNotificationLargeIcon(R.drawable.audio_playing_square)
+                        .build();
         Notification notification = updateNotificationBuilderAndBuild(info);
 
         assertNotNull(getManager().mDefaultNotificationLargeIcon);
diff --git a/chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/OpenTabsTest.java b/chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/OpenTabsTest.java
index 33c2fa4..7b2a80d 100644
--- a/chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/OpenTabsTest.java
+++ b/chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/OpenTabsTest.java
@@ -244,9 +244,9 @@
 
     private SessionWindow makeSessionWindow(int numTabs) {
         SessionWindow.Builder windowBuilder =
-                SessionWindow.newBuilder().setWindowId(0).setSelectedTabIndex(0);
+                SessionWindow.newBuilder().setWindowId(1).setSelectedTabIndex(0);
         for (int i = 0; i < numTabs; i++) {
-            windowBuilder.addTab(i); // Updates |windowBuilder| internal state.
+            windowBuilder.addTab(i + 1); // Updates |windowBuilder| internal state.
         }
         return windowBuilder.build();
     }
@@ -270,7 +270,7 @@
                         .setSessionTag(tag)
                         .setTabNodeId(id)
                         .setTab(SessionTab.newBuilder()
-                                        .setTabId(id)
+                                        .setTabId(id + 1)
                                         .setCurrentNavigationIndex(0)
                                         .addNavigation(TabNavigation.newBuilder()
                                                                .setVirtualUrl(url)
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index a59001a..a17d267e 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -1923,18 +1923,18 @@
       </if>
       <!-- Bookmark app bubble -->
       <if expr="chromeos">
-        <message name="IDS_ADD_TO_OS_LAUNCH_SURFACE_BUBBLE_TITLE" desc="Title of the bubble for adding a bookmark app to the shelf.">
-          Add to shelf
+        <message name="IDS_ADD_TO_OS_LAUNCH_SURFACE_BUBBLE_TITLE" desc="Title of the bubble for creating a shortcut to this website, and adding it to the shelf.">
+          Add shortcut to shelf
         </message>
       </if>
       <if expr="is_macosx">
-        <message name="IDS_ADD_TO_OS_LAUNCH_SURFACE_BUBBLE_TITLE" desc="In Title Case: Title of the bubble adding a bookmark app to the Applications Folder on Mac. Note `Applications` should match the name that appears under Favourites in Finder on macOS.">
-          Add to Applications
+        <message name="IDS_ADD_TO_OS_LAUNCH_SURFACE_BUBBLE_TITLE" desc="In Title Case: Title of the bubble creating a shortcut to this website, and adding it to the Applications Folder on Mac. Note `Applications` should match the name that appears under Favourites in Finder on macOS.">
+          Add Shortcut to Applications
         </message>
       </if>
       <if expr="not chromeos and not is_macosx">
-        <message name="IDS_ADD_TO_OS_LAUNCH_SURFACE_BUBBLE_TITLE" desc="Title of the bubble for adding a bookmark app to the desktop.">
-          Add to desktop
+        <message name="IDS_ADD_TO_OS_LAUNCH_SURFACE_BUBBLE_TITLE" desc="Title of the bubble for creating a shortcut to this website, and adding it to the desktop.">
+          Add shortcut to desktop
         </message>
       </if>
 
@@ -1980,18 +1980,18 @@
 
       <!-- "Create application shortcuts" menu item -->
       <if expr="chromeos">
-        <message name="IDS_ADD_TO_OS_LAUNCH_SURFACE" desc="Button text for adding a bookmark app to the shelf.">
-          Add to shelf...
+        <message name="IDS_ADD_TO_OS_LAUNCH_SURFACE" desc="Button text for creating a shortcut to this website, and adding it to the shelf.">
+          Add shortcut to shelf...
         </message>
       </if>
       <if expr="is_macosx">
-        <message name="IDS_ADD_TO_OS_LAUNCH_SURFACE" desc="In Title Case: Button text for adding a bookmark app to the Applications Folder. Note `Applications` should match the name that appears under Favourites in Finder on macOS">
-          Add to Applications...
+        <message name="IDS_ADD_TO_OS_LAUNCH_SURFACE" desc="In Title Case: Button text for creating a shortcut to this website, and adding it to the Applications Folder. Note `Applications` should match the name that appears under Favourites in Finder on macOS">
+          Add Shortcut to Applications...
         </message>
       </if>
       <if expr="not chromeos and not is_macosx">
-        <message name="IDS_ADD_TO_OS_LAUNCH_SURFACE" desc="Button text for adding a bookmark app to the desktop.">
-          Add to desktop...
+        <message name="IDS_ADD_TO_OS_LAUNCH_SURFACE" desc="Button text for creating a shortcut to this website, and adding it to the desktop.">
+          Add shortcut to desktop...
         </message>
       </if>
 
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index c51e39f..047df70d 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -3265,6 +3265,10 @@
      flag_descriptions::kEnableFloatingVirtualKeyboardName,
      flag_descriptions::kEnableFloatingVirtualKeyboardDescription, kOsCrOS,
      FEATURE_VALUE_TYPE(features::kEnableFloatingVirtualKeyboard)},
+    {"enable-stylus-virtual-keyboard",
+     flag_descriptions::kEnableStylusVirtualKeyboardName,
+     flag_descriptions::kEnableStylusVirtualKeyboardDescription, kOsCrOS,
+     FEATURE_VALUE_TYPE(features::kEnableStylusVirtualKeyboard)},
     {"enable-per-user-timezone", flag_descriptions::kEnablePerUserTimezoneName,
      flag_descriptions::kEnablePerUserTimezoneDescription, kOsCrOS,
      SINGLE_DISABLE_VALUE_TYPE(chromeos::switches::kDisablePerUserTimezone)},
diff --git a/chrome/browser/android/foreign_session_helper.cc b/chrome/browser/android/foreign_session_helper.cc
index 9d07929..3ed8093 100644
--- a/chrome/browser/android/foreign_session_helper.cc
+++ b/chrome/browser/android/foreign_session_helper.cc
@@ -287,7 +287,7 @@
   const sessions::SessionTab* session_tab;
 
   if (!open_tabs->GetForeignTab(ConvertJavaStringToUTF8(env, session_tag),
-                                session_tab_id,
+                                SessionID::FromSerializedValue(session_tab_id),
                                 &session_tab)) {
     LOG(ERROR) << "Failed to load foreign tab.";
     return false;
diff --git a/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_async_file_util.cc b/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_async_file_util.cc
index 33e2b5f6..d86bd58 100644
--- a/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_async_file_util.cc
+++ b/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_async_file_util.cc
@@ -14,11 +14,11 @@
 #include "chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_map.h"
 #include "chrome/browser/chromeos/arc/fileapi/arc_documents_provider_util.h"
 #include "chrome/browser/profiles/profile.h"
+#include "components/services/filesystem/public/interfaces/types.mojom.h"
 #include "content/public/browser/browser_thread.h"
 #include "storage/browser/blob/shareable_file_reference.h"
 #include "storage/browser/fileapi/file_system_operation_context.h"
 #include "storage/browser/fileapi/file_system_url.h"
-#include "storage/common/fileapi/directory_entry.h"
 
 using content::BrowserThread;
 
@@ -43,10 +43,12 @@
 
   storage::AsyncFileUtil::EntryList entries;
   entries.reserve(files.size());
-  for (const auto& file : files)
-    entries.emplace_back(file.name, file.is_directory
-                                        ? storage::DirectoryEntry::DIRECTORY
-                                        : storage::DirectoryEntry::FILE);
+  for (const auto& file : files) {
+    entries.emplace_back(base::FilePath(file.name),
+                         file.is_directory
+                             ? filesystem::mojom::FsFileType::DIRECTORY
+                             : filesystem::mojom::FsFileType::REGULAR_FILE);
+  }
 
   BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
                           base::BindOnce(std::move(callback), result, entries,
diff --git a/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc b/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc
index f036efe..23f907f 100644
--- a/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc
+++ b/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc
@@ -22,12 +22,10 @@
 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
 #include "content/public/test/test_browser_thread_bundle.h"
 #include "storage/browser/fileapi/watcher_manager.h"
-#include "storage/common/fileapi/directory_entry.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "url/gurl.h"
 
 using ChangeType = arc::ArcDocumentsProviderRoot::ChangeType;
-using storage::DirectoryEntry;
 using Document = arc::FakeFileSystemInstance::Document;
 using EntryList = storage::AsyncFileUtil::EntryList;
 
diff --git a/chrome/browser/chromeos/drive/fileapi/fileapi_worker.cc b/chrome/browser/chromeos/drive/fileapi/fileapi_worker.cc
index 033d62d..07f2978 100644
--- a/chrome/browser/chromeos/drive/fileapi/fileapi_worker.cc
+++ b/chrome/browser/chromeos/drive/fileapi/fileapi_worker.cc
@@ -5,6 +5,8 @@
 #include "chrome/browser/chromeos/drive/fileapi/fileapi_worker.h"
 
 #include <stddef.h>
+#include <memory>
+#include <string>
 #include <utility>
 
 #include "base/files/file_path.h"
@@ -16,9 +18,9 @@
 #include "components/drive/drive.pb.h"
 #include "components/drive/file_errors.h"
 #include "components/drive/resource_entry_conversion.h"
+#include "components/services/filesystem/public/interfaces/types.mojom.h"
 #include "content/public/browser/browser_thread.h"
 #include "storage/browser/fileapi/file_system_url.h"
-#include "storage/common/fileapi/directory_entry.h"
 
 using content::BrowserThread;
 
@@ -74,17 +76,15 @@
     std::unique_ptr<ResourceEntryVector> resource_entries) {
   DCHECK(resource_entries);
 
-  std::vector<storage::DirectoryEntry> entries;
+  std::vector<filesystem::mojom::DirectoryEntry> entries;
   // Convert drive files to File API's directory entry.
   entries.reserve(resource_entries->size());
   for (size_t i = 0; i < resource_entries->size(); ++i) {
     const ResourceEntry& resource_entry = (*resource_entries)[i];
-    storage::DirectoryEntry entry;
-    entry.name = resource_entry.base_name();
-
-    const PlatformFileInfoProto& file_info = resource_entry.file_info();
-    entry.is_directory = file_info.is_directory();
-    entries.push_back(entry);
+    entries.emplace_back(base::FilePath(resource_entry.base_name()),
+                         resource_entry.file_info().is_directory()
+                             ? filesystem::mojom::FsFileType::DIRECTORY
+                             : filesystem::mojom::FsFileType::REGULAR_FILE);
   }
 
   callback.Run(base::File::FILE_OK, entries, true /*has_more*/);
@@ -94,7 +94,7 @@
 void RunReadDirectoryCallbackOnCompletion(const ReadDirectoryCallback& callback,
                                           FileError error) {
   callback.Run(FileErrorToBaseFileError(error),
-               std::vector<storage::DirectoryEntry>(),
+               std::vector<filesystem::mojom::DirectoryEntry>(),
                false /*has_more*/);
 }
 
@@ -361,7 +361,6 @@
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   file_system->TouchFile(file_path, last_access_time, last_modified_time,
                          base::Bind(&RunStatusCallbackByFileError, callback));
-
 }
 
 }  // namespace fileapi_internal
diff --git a/chrome/browser/chromeos/drive/fileapi/fileapi_worker.h b/chrome/browser/chromeos/drive/fileapi/fileapi_worker.h
index 9bfc4bfc..2828bec 100644
--- a/chrome/browser/chromeos/drive/fileapi/fileapi_worker.h
+++ b/chrome/browser/chromeos/drive/fileapi/fileapi_worker.h
@@ -26,6 +26,7 @@
 #include "base/callback_forward.h"
 #include "base/memory/weak_ptr.h"
 #include "components/drive/file_errors.h"
+#include "components/services/filesystem/public/interfaces/types.mojom.h"
 #include "storage/browser/blob/scoped_file.h"
 
 namespace base {
@@ -52,7 +53,7 @@
          const base::File::Info& file_info)> GetFileInfoCallback;
 typedef base::RepeatingCallback<void(
     base::File::Error result,
-    std::vector<storage::DirectoryEntry> file_list,
+    std::vector<filesystem::mojom::DirectoryEntry> file_list,
     bool has_more)>
     ReadDirectoryCallback;
 typedef base::Callback<void(base::File::Error result,
diff --git a/chrome/browser/chromeos/file_system_provider/fake_provided_file_system.cc b/chrome/browser/chromeos/file_system_provider/fake_provided_file_system.cc
index 5803c13f..2f33cbb 100644
--- a/chrome/browser/chromeos/file_system_provider/fake_provided_file_system.cc
+++ b/chrome/browser/chromeos/file_system_provider/fake_provided_file_system.cc
@@ -6,10 +6,12 @@
 
 #include <stddef.h>
 
+#include <memory>
 #include <utility>
 
 #include "base/memory/ptr_util.h"
 #include "base/threading/thread_task_runner_handle.h"
+#include "components/services/filesystem/public/interfaces/types.mojom.h"
 #include "net/base/io_buffer.h"
 
 namespace chromeos {
@@ -158,10 +160,11 @@
     const base::FilePath file_path = it->first;
     if (file_path == directory_path || directory_path.IsParent(file_path)) {
       const EntryMetadata* const metadata = it->second->metadata.get();
-      entry_list.push_back(storage::DirectoryEntry(
-          *metadata->name, *metadata->is_directory
-                               ? storage::DirectoryEntry::DIRECTORY
-                               : storage::DirectoryEntry::FILE));
+      entry_list.emplace_back(
+          base::FilePath(*metadata->name),
+          *metadata->is_directory
+              ? filesystem::mojom::FsFileType::DIRECTORY
+              : filesystem::mojom::FsFileType::REGULAR_FILE);
     }
   }
 
diff --git a/chrome/browser/chromeos/file_system_provider/operations/read_directory.cc b/chrome/browser/chromeos/file_system_provider/operations/read_directory.cc
index da5ba65..1ef05d1 100644
--- a/chrome/browser/chromeos/file_system_provider/operations/read_directory.cc
+++ b/chrome/browser/chromeos/file_system_provider/operations/read_directory.cc
@@ -12,6 +12,7 @@
 #include "chrome/browser/chromeos/file_system_provider/operations/get_metadata.h"
 #include "chrome/common/extensions/api/file_system_provider.h"
 #include "chrome/common/extensions/api/file_system_provider_internal.h"
+#include "components/services/filesystem/public/interfaces/types.mojom.h"
 
 namespace chromeos {
 namespace file_system_provider {
@@ -38,11 +39,10 @@
       return false;
     }
 
-    storage::DirectoryEntry output_entry;
-    output_entry.is_directory = *entry_metadata.is_directory;
-    output_entry.name = *entry_metadata.name;
-
-    output->push_back(output_entry);
+    output->emplace_back(base::FilePath(*entry_metadata.name),
+                         *entry_metadata.is_directory
+                             ? filesystem::mojom::FsFileType::DIRECTORY
+                             : filesystem::mojom::FsFileType::REGULAR_FILE);
   }
 
   return true;
diff --git a/chrome/browser/chromeos/file_system_provider/operations/read_directory_unittest.cc b/chrome/browser/chromeos/file_system_provider/operations/read_directory_unittest.cc
index 3d9fd057..ac71eb5 100644
--- a/chrome/browser/chromeos/file_system_provider/operations/read_directory_unittest.cc
+++ b/chrome/browser/chromeos/file_system_provider/operations/read_directory_unittest.cc
@@ -20,6 +20,7 @@
 #include "chrome/common/extensions/api/file_system_provider.h"
 #include "chrome/common/extensions/api/file_system_provider_capabilities/file_system_provider_capabilities_handler.h"
 #include "chrome/common/extensions/api/file_system_provider_internal.h"
+#include "components/services/filesystem/public/interfaces/types.mojom.h"
 #include "extensions/browser/event_router.h"
 #include "storage/browser/fileapi/async_file_util.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -208,9 +209,9 @@
   EXPECT_EQ(base::File::FILE_OK, event->result());
 
   ASSERT_EQ(1u, event->entry_list().size());
-  const storage::DirectoryEntry entry = event->entry_list()[0];
-  EXPECT_FALSE(entry.is_directory);
-  EXPECT_EQ("blueberries.txt", entry.name);
+  const filesystem::mojom::DirectoryEntry entry = event->entry_list()[0];
+  EXPECT_EQ(entry.type, filesystem::mojom::FsFileType::REGULAR_FILE);
+  EXPECT_EQ("blueberries.txt", entry.name.value());
 }
 
 TEST_F(FileSystemProviderOperationsReadDirectoryTest,
diff --git a/chrome/browser/chromeos/file_system_provider/service.cc b/chrome/browser/chromeos/file_system_provider/service.cc
index f9c5e84..5bce52c 100644
--- a/chrome/browser/chromeos/file_system_provider/service.cc
+++ b/chrome/browser/chromeos/file_system_provider/service.cc
@@ -181,8 +181,10 @@
   mount_point_name_to_key_map_[mount_point_name] =
       FileSystemKey(provider_id.ToString(), options.file_system_id);
   if (options.persistent) {
-    registry_->RememberFileSystem(file_system_info,
-                                  *file_system_ptr->GetWatchers());
+    const Watchers& watchers = file_system_info.watchable()
+                                   ? *file_system_ptr->GetWatchers()
+                                   : Watchers();
+    registry_->RememberFileSystem(file_system_info, watchers);
   }
 
   for (auto& observer : observers_) {
@@ -376,8 +378,11 @@
         GetProvidedFileSystem(restored_file_system.provider_id,
                               restored_file_system.options.file_system_id);
     DCHECK(file_system);
-    file_system->GetWatchers()->insert(restored_file_system.watchers.begin(),
-                                       restored_file_system.watchers.end());
+
+    if (file_system->GetFileSystemInfo().watchable()) {
+      file_system->GetWatchers()->insert(restored_file_system.watchers.begin(),
+                                         restored_file_system.watchers.end());
+    }
   }
 }
 
diff --git a/chrome/browser/chromeos/file_system_provider/service_unittest.cc b/chrome/browser/chromeos/file_system_provider/service_unittest.cc
index aaed2ea..064452b4c 100644
--- a/chrome/browser/chromeos/file_system_provider/service_unittest.cc
+++ b/chrome/browser/chromeos/file_system_provider/service_unittest.cc
@@ -72,6 +72,7 @@
   std::unique_ptr<base::DictionaryValue> capabilities(
       new base::DictionaryValue);
   capabilities->SetString("source", "network");
+  capabilities->SetBoolean("watchable", true);
   manifest.Set(extensions::manifest_keys::kFileSystemProviderCapabilities,
                std::move(capabilities));
 
@@ -333,7 +334,7 @@
   options.supports_notify_tag = true;
   ProvidedFileSystemInfo file_system_info(
       kProviderId, options, base::FilePath(FILE_PATH_LITERAL("/a/b/c")),
-      false /* configurable */, false /* watchable */, extensions::SOURCE_FILE,
+      false /* configurable */, true /* watchable */, extensions::SOURCE_FILE,
       IconSet());
   Watchers fake_watchers;
   fake_watchers[WatcherKey(fake_watcher_.entry_path, fake_watcher_.recursive)] =
@@ -358,6 +359,8 @@
   EXPECT_EQ(file_system_info.file_system_id(),
             observer.mounts[0].file_system_info().file_system_id());
   EXPECT_EQ(file_system_info.writable(),
+            observer.mounts[0].file_system_info().writable());
+  EXPECT_EQ(file_system_info.watchable(),
             observer.mounts[0].file_system_info().watchable());
   EXPECT_EQ(file_system_info.supports_notify_tag(),
             observer.mounts[0].file_system_info().supports_notify_tag());
diff --git a/chrome/browser/chromeos/fileapi/recent_download_source.cc b/chrome/browser/chromeos/fileapi/recent_download_source.cc
index c3088b9e..1d1b808 100644
--- a/chrome/browser/chromeos/fileapi/recent_download_source.cc
+++ b/chrome/browser/chromeos/fileapi/recent_download_source.cc
@@ -126,7 +126,7 @@
 
   for (const auto& entry : entries) {
     base::FilePath subpath = path.Append(entry.name);
-    if (entry.is_directory) {
+    if (entry.type == filesystem::mojom::FsFileType::DIRECTORY) {
       ScanDirectory(subpath);
     } else {
       storage::FileSystemURL url = BuildDownloadsURL(subpath);
diff --git a/chrome/browser/chromeos/smb_client/smb_file_system.cc b/chrome/browser/chromeos/smb_client/smb_file_system.cc
index 2b1a0ec..8969a17 100644
--- a/chrome/browser/chromeos/smb_client/smb_file_system.cc
+++ b/chrome/browser/chromeos/smb_client/smb_file_system.cc
@@ -5,6 +5,8 @@
 #include "chrome/browser/chromeos/smb_client/smb_file_system.h"
 
 #include <algorithm>
+#include <memory>
+#include <utility>
 
 #include "base/memory/ptr_util.h"
 #include "base/posix/eintr_wrapper.h"
@@ -12,6 +14,7 @@
 #include "chrome/browser/chromeos/file_system_provider/service.h"
 #include "chromeos/dbus/dbus_thread_manager.h"
 #include "chromeos/dbus/smb_provider_client.h"
+#include "components/services/filesystem/public/interfaces/types.mojom.h"
 #include "net/base/io_buffer.h"
 
 namespace chromeos {
@@ -68,9 +71,9 @@
 
 namespace {
 
-storage::DirectoryEntry::DirectoryEntryType MapEntryType(bool is_directory) {
-  return is_directory ? storage::DirectoryEntry::DIRECTORY
-                      : storage::DirectoryEntry::FILE;
+filesystem::mojom::FsFileType MapEntryType(bool is_directory) {
+  return is_directory ? filesystem::mojom::FsFileType::DIRECTORY
+                      : filesystem::mojom::FsFileType::REGULAR_FILE;
 }
 
 constexpr size_t kTaskQueueCapacity = 2;
@@ -481,7 +484,8 @@
 
   // Loop through the entries and send when the desired batch size is hit.
   for (const smbprovider::DirectoryEntryProto& entry : entries.entries()) {
-    entry_list.emplace_back(entry.name(), MapEntryType(entry.is_directory()));
+    entry_list.emplace_back(base::FilePath(entry.name()),
+                            MapEntryType(entry.is_directory()));
 
     if (entry_list.size() == batch_size) {
       callback.Run(base::File::FILE_OK, entry_list, true /* has_more */);
diff --git a/chrome/browser/extensions/BUILD.gn b/chrome/browser/extensions/BUILD.gn
index 4d6fd0b..db00b72 100644
--- a/chrome/browser/extensions/BUILD.gn
+++ b/chrome/browser/extensions/BUILD.gn
@@ -163,10 +163,6 @@
     "api/developer_private/inspectable_views_finder.h",
     "api/developer_private/show_permissions_dialog_helper.cc",
     "api/developer_private/show_permissions_dialog_helper.h",
-    "api/dial/dial_api.cc",
-    "api/dial/dial_api.h",
-    "api/dial/dial_api_factory.cc",
-    "api/dial/dial_api_factory.h",
     "api/downloads/downloads_api.cc",
     "api/downloads/downloads_api.h",
     "api/downloads_internal/downloads_internal_api.cc",
diff --git a/chrome/browser/extensions/api/developer_private/developer_private_api.cc b/chrome/browser/extensions/api/developer_private/developer_private_api.cc
index fd8a929..a395be0d 100644
--- a/chrome/browser/extensions/api/developer_private/developer_private_api.cc
+++ b/chrome/browser/extensions/api/developer_private/developer_private_api.cc
@@ -6,7 +6,9 @@
 
 #include <stddef.h>
 #include <memory>
+#include <string>
 #include <utility>
+#include <vector>
 
 #include "base/bind.h"
 #include "base/files/file_util.h"
@@ -1381,7 +1383,7 @@
   pending_copy_operations_count_ += file_list.size();
 
   for (size_t i = 0; i < file_list.size(); ++i) {
-    if (file_list[i].is_directory) {
+    if (file_list[i].type == filesystem::mojom::FsFileType::DIRECTORY) {
       ReadDirectoryByFileSystemAPI(project_path.Append(file_list[i].name),
                                    destination_path.Append(file_list[i].name));
       continue;
diff --git a/chrome/browser/extensions/api/dial/OWNERS b/chrome/browser/extensions/api/dial/OWNERS
deleted file mode 100644
index 0fbf5128..0000000
--- a/chrome/browser/extensions/api/dial/OWNERS
+++ /dev/null
@@ -1,5 +0,0 @@
-mfoltz@chromium.org
-imcheng@chromium.org
-wez@chromium.org
-
-# COMPONENT: Internals>Cast>API
diff --git a/chrome/browser/extensions/api/dial/dial_api.cc b/chrome/browser/extensions/api/dial/dial_api.cc
deleted file mode 100644
index 04c086f8..0000000
--- a/chrome/browser/extensions/api/dial/dial_api.cc
+++ /dev/null
@@ -1,288 +0,0 @@
-// Copyright (c) 2012 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/extensions/api/dial/dial_api.h"
-
-#include <stddef.h>
-#include <utility>
-#include <vector>
-
-#include "base/bind.h"
-#include "base/time/time.h"
-#include "chrome/browser/browser_process.h"
-#include "chrome/browser/extensions/api/dial/dial_api_factory.h"
-#include "chrome/browser/media/router/discovery/dial/device_description_fetcher.h"
-#include "chrome/browser/media/router/discovery/dial/dial_registry.h"
-#include "chrome/browser/profiles/profile.h"
-#include "chrome/common/extensions/api/dial.h"
-#include "content/public/browser/browser_thread.h"
-#include "extensions/browser/event_router.h"
-#include "extensions/browser/extension_system.h"
-#include "net/url_request/url_request_context.h"
-#include "url/gurl.h"
-
-using base::TimeDelta;
-using content::BrowserThread;
-using media_router::DeviceDescriptionFetcher;
-using media_router::DialDeviceData;
-using media_router::DialDeviceDescriptionData;
-using media_router::DialRegistry;
-
-namespace extensions {
-
-DialAPI::DialAPI(Profile* profile)
-    : RefcountedKeyedService(
-          BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)),
-      profile_(profile),
-      system_request_context_(g_browser_process->system_request_context()),
-      dial_registry_(nullptr),
-      num_on_device_list_listeners_(0) {
-  EventRouter::Get(profile)->RegisterObserver(
-      this, api::dial::OnDeviceList::kEventName);
-}
-
-DialAPI::~DialAPI() {
-  if (!dial_registry_)
-    return;
-
-  // Remove pending listeners from dial registry.
-  for (int i = 0; i < num_on_device_list_listeners_; i++)
-    dial_registry_->OnListenerRemoved();
-}
-
-DialRegistry* DialAPI::dial_registry() {
-  DCHECK_CURRENTLY_ON(BrowserThread::IO);
-  if (!dial_registry_) {
-    dial_registry_ = media_router::DialRegistry::GetInstance();
-    dial_registry_->SetNetLog(
-        system_request_context_->GetURLRequestContext()->net_log());
-    dial_registry_->RegisterObserver(this);
-    if (test_device_data_) {
-      dial_registry_->AddDeviceForTest(*test_device_data_);
-    }
-  }
-  return dial_registry_;
-}
-
-void DialAPI::OnListenerAdded(const EventListenerInfo& details) {
-  DCHECK_CURRENTLY_ON(BrowserThread::UI);
-  BrowserThread::PostTask(
-      BrowserThread::IO, FROM_HERE,
-      base::BindOnce(&DialAPI::NotifyListenerAddedOnIOThread, this));
-}
-
-void DialAPI::OnListenerRemoved(const EventListenerInfo& details) {
-  DCHECK_CURRENTLY_ON(BrowserThread::UI);
-  BrowserThread::PostTask(
-      BrowserThread::IO, FROM_HERE,
-      base::BindOnce(&DialAPI::NotifyListenerRemovedOnIOThread, this));
-}
-
-void DialAPI::NotifyListenerAddedOnIOThread() {
-  DCHECK_CURRENTLY_ON(BrowserThread::IO);
-  VLOG(2) << "DIAL device event listener added.";
-  ++num_on_device_list_listeners_;
-  dial_registry()->OnListenerAdded();
-}
-
-void DialAPI::NotifyListenerRemovedOnIOThread() {
-  DCHECK_CURRENTLY_ON(BrowserThread::IO);
-  VLOG(2) << "DIAL device event listener removed";
-  --num_on_device_list_listeners_;
-  dial_registry()->OnListenerRemoved();
-}
-
-void DialAPI::FillDialDevice(const media_router::DialDeviceData& device_data,
-                             api::dial::DialDevice* device) const {
-  DCHECK(!device_data.device_id().empty());
-  DCHECK(media_router::DialDeviceData::IsDeviceDescriptionUrl(
-      device_data.device_description_url()));
-  device->device_label = device_data.label();
-  device->device_description_url = device_data.device_description_url().spec();
-  if (device_data.has_config_id())
-    device->config_id.reset(new int(device_data.config_id()));
-}
-
-void DialAPI::OnDialDeviceEvent(const DialRegistry::DeviceList& devices) {
-  DCHECK_CURRENTLY_ON(BrowserThread::IO);
-  BrowserThread::PostTask(
-      BrowserThread::UI, FROM_HERE,
-      base::BindOnce(&DialAPI::SendEventOnUIThread, this, devices));
-}
-
-void DialAPI::OnDialError(const DialRegistry::DialErrorCode code) {
-  DCHECK_CURRENTLY_ON(BrowserThread::IO);
-  BrowserThread::PostTask(
-      BrowserThread::UI, FROM_HERE,
-      base::BindOnce(&DialAPI::SendErrorOnUIThread, this, code));
-}
-
-void DialAPI::SendEventOnUIThread(const DialRegistry::DeviceList& devices) {
-  DCHECK_CURRENTLY_ON(BrowserThread::UI);
-
-  std::vector<api::dial::DialDevice> args;
-  for (const DialDeviceData& device : devices) {
-    api::dial::DialDevice api_device;
-    FillDialDevice(device, &api_device);
-    args.push_back(std::move(api_device));
-  }
-  std::unique_ptr<base::ListValue> results =
-      api::dial::OnDeviceList::Create(args);
-  std::unique_ptr<Event> event(new Event(events::DIAL_ON_DEVICE_LIST,
-                                         api::dial::OnDeviceList::kEventName,
-                                         std::move(results)));
-  EventRouter::Get(profile_)->BroadcastEvent(std::move(event));
-}
-
-void DialAPI::SendErrorOnUIThread(const DialRegistry::DialErrorCode code) {
-  DCHECK_CURRENTLY_ON(BrowserThread::UI);
-
-  api::dial::DialError dial_error;
-  switch (code) {
-    case DialRegistry::DIAL_NO_LISTENERS:
-      dial_error.code = api::dial::DIAL_ERROR_CODE_NO_LISTENERS;
-      break;
-    case DialRegistry::DIAL_NO_INTERFACES:
-      dial_error.code = api::dial::DIAL_ERROR_CODE_NO_VALID_NETWORK_INTERFACES;
-      break;
-    case DialRegistry::DIAL_CELLULAR_NETWORK:
-      dial_error.code = api::dial::DIAL_ERROR_CODE_CELLULAR_NETWORK;
-      break;
-    case DialRegistry::DIAL_NETWORK_DISCONNECTED:
-      dial_error.code = api::dial::DIAL_ERROR_CODE_NETWORK_DISCONNECTED;
-      break;
-    case DialRegistry::DIAL_SOCKET_ERROR:
-      dial_error.code = api::dial::DIAL_ERROR_CODE_SOCKET_ERROR;
-      break;
-    default:
-      dial_error.code = api::dial::DIAL_ERROR_CODE_UNKNOWN;
-      break;
-  }
-
-  std::unique_ptr<base::ListValue> results =
-      api::dial::OnError::Create(dial_error);
-  std::unique_ptr<Event> event(new Event(events::DIAL_ON_ERROR,
-                                         api::dial::OnError::kEventName,
-                                         std::move(results)));
-  EventRouter::Get(profile_)->BroadcastEvent(std::move(event));
-}
-
-void DialAPI::ShutdownOnUIThread() {
-  EventRouter::Get(profile_)->UnregisterObserver(this);
-
-  if (!dial_registry_)
-    return;
-
-  BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
-                          base::BindOnce(&DialRegistry::UnregisterObserver,
-                                         base::Unretained(dial_registry_),
-                                         base::RetainedRef(this)));
-}
-
-void DialAPI::SetDeviceForTest(
-    const media_router::DialDeviceData& device_data,
-    const media_router::DialDeviceDescriptionData& device_description) {
-  test_device_data_ = std::make_unique<DialDeviceData>(device_data);
-  test_device_description_ =
-      std::make_unique<DialDeviceDescriptionData>(device_description);
-}
-
-DialDiscoverNowFunction::DialDiscoverNowFunction()
-    : dial_(NULL), result_(false) {
-}
-
-bool DialDiscoverNowFunction::Prepare() {
-  DCHECK_CURRENTLY_ON(BrowserThread::UI);
-  DCHECK(browser_context());
-  dial_ = DialAPIFactory::GetForBrowserContext(browser_context()).get();
-  return true;
-}
-
-void DialDiscoverNowFunction::Work() {
-  DCHECK_CURRENTLY_ON(BrowserThread::IO);
-  result_ = dial_->dial_registry()->DiscoverNow();
-}
-
-bool DialDiscoverNowFunction::Respond() {
-  DCHECK_CURRENTLY_ON(BrowserThread::UI);
-  SetResult(std::make_unique<base::Value>(result_));
-  return true;
-}
-
-DialFetchDeviceDescriptionFunction::DialFetchDeviceDescriptionFunction()
-    : dial_(nullptr) {}
-
-DialFetchDeviceDescriptionFunction::~DialFetchDeviceDescriptionFunction() {}
-
-bool DialFetchDeviceDescriptionFunction::RunAsync() {
-  dial_ = DialAPIFactory::GetForBrowserContext(browser_context()).get();
-  params_ = api::dial::FetchDeviceDescription::Params::Create(*args_);
-  EXTENSION_FUNCTION_VALIDATE(params_.get());
-
-  // DialRegistry lives on the IO thread.  Hop on over there to get the URL to
-  // fetch.
-  BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
-                          base::BindOnce(&DialFetchDeviceDescriptionFunction::
-                                             GetDeviceDescriptionUrlOnIOThread,
-                                         this, params_->device_label));
-  return true;
-}
-
-void DialFetchDeviceDescriptionFunction::GetDeviceDescriptionUrlOnIOThread(
-    const std::string& label) {
-  DCHECK_CURRENTLY_ON(BrowserThread::IO);
-  const GURL& device_description_url =
-      dial_->dial_registry()->GetDeviceDescriptionURL(label);
-  BrowserThread::PostTask(
-      BrowserThread::UI, FROM_HERE,
-      base::BindOnce(&DialFetchDeviceDescriptionFunction::MaybeStartFetch, this,
-                     device_description_url));
-}
-
-void DialFetchDeviceDescriptionFunction::MaybeStartFetch(const GURL& url) {
-  DCHECK_CURRENTLY_ON(BrowserThread::UI);
-  if (url.is_empty()) {
-    SetError("Device not found");
-    SendResponse(false);
-    return;
-  }
-
-  if (dial_->test_device_data_ && dial_->test_device_description_ &&
-      dial_->test_device_data_->device_description_url() == url) {
-    OnFetchComplete(*(dial_->test_device_description_));
-    return;
-  }
-
-  device_description_fetcher_ = std::make_unique<DeviceDescriptionFetcher>(
-      url,
-      base::BindOnce(&DialFetchDeviceDescriptionFunction::OnFetchComplete,
-                     this),
-      base::BindOnce(&DialFetchDeviceDescriptionFunction::OnFetchError, this));
-
-  device_description_fetcher_->Start();
-}
-
-void DialFetchDeviceDescriptionFunction::OnFetchComplete(
-    const media_router::DialDeviceDescriptionData& result) {
-  // Destroy the DeviceDescriptionFetcher since it still contains a reference
-  // to |this| in its un-invoked callback.
-  device_description_fetcher_.reset();
-  api::dial::DialDeviceDescription device_description;
-  device_description.device_label = params_->device_label;
-  device_description.app_url = result.app_url.spec();
-  device_description.device_description = result.device_description;
-  SetResult(device_description.ToValue());
-  SendResponse(true);
-}
-
-void DialFetchDeviceDescriptionFunction::OnFetchError(
-    const std::string& message) {
-  // Destroy the DeviceDescriptionFetcher since it still contains a reference
-  // to |this| in its un-invoked callback.
-  device_description_fetcher_.reset();
-  SetError(message);
-  SendResponse(false);
-}
-
-}  // namespace extensions
diff --git a/chrome/browser/extensions/api/dial/dial_api.h b/chrome/browser/extensions/api/dial/dial_api.h
deleted file mode 100644
index e81ec17..0000000
--- a/chrome/browser/extensions/api/dial/dial_api.h
+++ /dev/null
@@ -1,177 +0,0 @@
-// Copyright (c) 2012 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_EXTENSIONS_API_DIAL_DIAL_API_H_
-#define CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_API_H_
-
-#include <memory>
-
-#include "base/macros.h"
-#include "base/memory/ref_counted.h"
-#include "chrome/browser/media/router/discovery/dial/dial_device_data.h"
-#include "chrome/browser/media/router/discovery/dial/dial_registry.h"
-#include "chrome/common/extensions/api/dial.h"
-#include "components/keyed_service/core/refcounted_keyed_service.h"
-#include "extensions/browser/api/async_api_function.h"
-#include "extensions/browser/event_router.h"
-#include "net/url_request/url_request_context_getter.h"
-
-namespace media_router {
-class DeviceDescriptionFetcher;
-}  // namespace media_router
-
-namespace extensions {
-
-class DialFetchDeviceDescriptionFunction;
-
-// Dial API which is a ref-counted KeyedService that manages
-// the DIAL registry. It takes care of creating the registry on the IO thread
-// and is an observer of the registry. It makes sure devices events are sent out
-// to extension listeners on the right thread.
-//
-// TODO(mfoltz): This should probably inherit from BrowserContextKeyedAPI
-// instead; ShutdownOnUIThread below is a no-op, which is the whole point of
-// RefcountedKeyedService.
-//
-// TODO(mfoltz): The threading model for this API needs to be rethought.  At a
-// minimum, DialRegistry should move to the UI thread to avoid extra thread hops
-// here.  This would also allow a straightforward GetDeviceList implementation
-// (crbug.com/576817), cleanup some long-tail crashes (crbug.com/640011) that
-// are likely due to lifetime issues, and simplify unit tests
-// (crbug.com/661457).
-//
-// Also, DialRegistry should be an interface that can be mocked and injected for
-// tests; this would allow us to remove code that injects test data into the
-// real DialRegsitry.
-class DialAPI : public RefcountedKeyedService,
-                public EventRouter::Observer,
-                public media_router::DialRegistry::Observer {
- public:
-  explicit DialAPI(Profile* profile);
-
-  // The DialRegistry for the API. This must always be used only from the IO
-  // thread.
-  media_router::DialRegistry* dial_registry();
-
-  // Called by the DialRegistry on the IO thread so that the DialAPI dispatches
-  // the event to listeners on the UI thread.
-  void SendEventOnUIThread(
-      const media_router::DialRegistry::DeviceList& devices);
-  void SendErrorOnUIThread(
-      const media_router::DialRegistry::DialErrorCode type);
-
-  // Sets test device data.
-  void SetDeviceForTest(
-      const media_router::DialDeviceData& device_data,
-      const media_router::DialDeviceDescriptionData& device_description);
-
- private:
-  ~DialAPI() override;
-
-  friend class DialFetchDeviceDescriptionFunction;
-
-  // RefcountedKeyedService:
-  void ShutdownOnUIThread() override;
-
-  // EventRouter::Observer:
-  void OnListenerAdded(const EventListenerInfo& details) override;
-  void OnListenerRemoved(const EventListenerInfo& details) override;
-
-  // DialRegistry::Observer:
-  void OnDialDeviceEvent(
-      const media_router::DialRegistry::DeviceList& devices) override;
-  void OnDialError(media_router::DialRegistry::DialErrorCode type) override;
-
-  // Methods to notify the DialRegistry on the correct thread of new/removed
-  // listeners.
-  void NotifyListenerAddedOnIOThread();
-  void NotifyListenerRemovedOnIOThread();
-
-  // Fills the |device| API struct from |device_data|.
-  void FillDialDevice(const media_router::DialDeviceData& device_data,
-                      api::dial::DialDevice* device) const;
-
-  Profile* profile_;
-
-  // Used to get its NetLog on the IOThread. It uses the same NetLog as the
-  // Profile, but the Profile's URLRequestContextGetter isn't ready when DialAPI
-  // is created.
-  scoped_refptr<net::URLRequestContextGetter> system_request_context_;
-
-  // Created lazily on first access on the IO thread. Does not take ownership of
-  // |dial_registry_|.
-  media_router::DialRegistry* dial_registry_;
-
-  // Number of dial.onDeviceList event listeners.
-  int num_on_device_list_listeners_;
-
-  // Device data for testing.
-  std::unique_ptr<media_router::DialDeviceData> test_device_data_;
-  std::unique_ptr<media_router::DialDeviceDescriptionData>
-      test_device_description_;
-
-  DISALLOW_COPY_AND_ASSIGN(DialAPI);
-};
-
-// DiscoverNow function. This function needs a round-trip from the IO thread
-// because it needs to grab a pointer to the DIAL API in order to get a
-// reference to the DialRegistry while on the IO thread. Then, the result
-// must be returned on the UI thread.
-class DialDiscoverNowFunction : public AsyncApiFunction {
- public:
-  DialDiscoverNowFunction();
-
- protected:
-  ~DialDiscoverNowFunction() override {}
-
-  // AsyncApiFunction:
-  bool Prepare() override;
-  void Work() override;
-  bool Respond() override;
-
- private:
-  DECLARE_EXTENSION_FUNCTION("dial.discoverNow", DIAL_DISCOVERNOW)
-
-  // Pointer to the DIAL API for this profile. We get this on the UI thread.
-  DialAPI* dial_;
-
-  // Result of the discoverNow call to the DIAL registry. This result is
-  // retrieved on the IO thread but the function result is returned on the UI
-  // thread.
-  bool result_;
-
-  DISALLOW_COPY_AND_ASSIGN(DialDiscoverNowFunction);
-};
-
-class DialFetchDeviceDescriptionFunction : public AsyncExtensionFunction {
- public:
-  DialFetchDeviceDescriptionFunction();
-
- protected:
-  ~DialFetchDeviceDescriptionFunction() override;
-
-  // AsyncExtensionFunction:
-  bool RunAsync() override;
-
- private:
-  DECLARE_EXTENSION_FUNCTION("dial.fetchDeviceDescription",
-                             DIAL_FETCHDEVICEDESCRIPTION)
-
-  void GetDeviceDescriptionUrlOnIOThread(const std::string& label);
-  void MaybeStartFetch(const GURL& url);
-  void OnFetchComplete(const media_router::DialDeviceDescriptionData& result);
-  void OnFetchError(const std::string& result);
-
-  std::unique_ptr<api::dial::FetchDeviceDescription::Params> params_;
-  std::unique_ptr<media_router::DeviceDescriptionFetcher>
-      device_description_fetcher_;
-
-  DialAPI* dial_;
-
-  DISALLOW_COPY_AND_ASSIGN(DialFetchDeviceDescriptionFunction);
-};
-
-}  // namespace extensions
-
-#endif  // CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_API_H_
diff --git a/chrome/browser/extensions/api/dial/dial_api_factory.cc b/chrome/browser/extensions/api/dial/dial_api_factory.cc
deleted file mode 100644
index 3acbe8b7..0000000
--- a/chrome/browser/extensions/api/dial/dial_api_factory.cc
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) 2012 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/extensions/api/dial/dial_api_factory.h"
-
-#include "chrome/browser/extensions/api/dial/dial_api.h"
-#include "components/keyed_service/content/browser_context_dependency_manager.h"
-#include "extensions/browser/extension_system_provider.h"
-#include "extensions/browser/extensions_browser_client.h"
-
-namespace extensions {
-
-// static
-scoped_refptr<DialAPI> DialAPIFactory::GetForBrowserContext(
-    content::BrowserContext* context) {
-  return static_cast<DialAPI*>(
-      GetInstance()->GetServiceForBrowserContext(context, true).get());
-}
-
-// static
-DialAPIFactory* DialAPIFactory::GetInstance() {
-  return base::Singleton<DialAPIFactory>::get();
-}
-
-DialAPIFactory::DialAPIFactory() : RefcountedBrowserContextKeyedServiceFactory(
-    "DialAPI", BrowserContextDependencyManager::GetInstance()) {
-  DependsOn(ExtensionsBrowserClient::Get()->GetExtensionSystemFactory());
-}
-
-DialAPIFactory::~DialAPIFactory() {
-}
-
-scoped_refptr<RefcountedKeyedService> DialAPIFactory::BuildServiceInstanceFor(
-    content::BrowserContext* profile) const {
-  return scoped_refptr<DialAPI>(new DialAPI(static_cast<Profile*>(profile)));
-}
-
-bool DialAPIFactory::ServiceIsCreatedWithBrowserContext() const {
-  return true;
-}
-
-bool DialAPIFactory::ServiceIsNULLWhileTesting() const {
-  return true;
-}
-
-}  // namespace extensions
diff --git a/chrome/browser/extensions/api/dial/dial_api_factory.h b/chrome/browser/extensions/api/dial/dial_api_factory.h
deleted file mode 100644
index 1a51f25..0000000
--- a/chrome/browser/extensions/api/dial/dial_api_factory.h
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) 2012 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_EXTENSIONS_API_DIAL_DIAL_API_FACTORY_H_
-#define CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_API_FACTORY_H_
-
-#include "base/macros.h"
-#include "base/memory/singleton.h"
-#include "components/keyed_service/content/refcounted_browser_context_keyed_service_factory.h"
-
-namespace extensions {
-
-class DialAPI;
-
-class DialAPIFactory : public RefcountedBrowserContextKeyedServiceFactory {
- public:
-  static scoped_refptr<DialAPI> GetForBrowserContext(
-      content::BrowserContext* context);
-
-  static DialAPIFactory* GetInstance();
-
- private:
-  friend struct base::DefaultSingletonTraits<DialAPIFactory>;
-
-  DialAPIFactory();
-  ~DialAPIFactory() override;
-
-  // BrowserContextKeyedServiceFactory:
-  scoped_refptr<RefcountedKeyedService> BuildServiceInstanceFor(
-      content::BrowserContext* profile) const override;
-  bool ServiceIsCreatedWithBrowserContext() const override;
-  bool ServiceIsNULLWhileTesting() const override;
-
-  DISALLOW_COPY_AND_ASSIGN(DialAPIFactory);
-};
-
-}  // namespace extensions
-
-#endif  // CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_API_FACTORY_H_
diff --git a/chrome/browser/extensions/api/dial/dial_apitest.cc b/chrome/browser/extensions/api/dial/dial_apitest.cc
deleted file mode 100644
index 1a8413a..0000000
--- a/chrome/browser/extensions/api/dial/dial_apitest.cc
+++ /dev/null
@@ -1,146 +0,0 @@
-// Copyright (c) 2012 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 "base/command_line.h"
-#include "build/build_config.h"
-#include "chrome/browser/extensions/api/dial/dial_api.h"
-#include "chrome/browser/extensions/api/dial/dial_api_factory.h"
-#include "chrome/browser/extensions/extension_apitest.h"
-#include "chrome/browser/extensions/extension_service.h"
-#include "chrome/browser/media/router/discovery/dial/dial_registry.h"
-#include "chrome/browser/media/router/providers/cast/dual_media_sink_service.h"
-#include "chrome/browser/media/router/test/noop_dual_media_sink_service.h"
-#include "extensions/common/switches.h"
-#include "extensions/test/extension_test_message_listener.h"
-#include "extensions/test/result_catcher.h"
-#include "testing/gmock/include/gmock/gmock.h"
-#include "url/gurl.h"
-
-using extensions::Extension;
-using extensions::ResultCatcher;
-using media_router::DialDeviceData;
-using media_router::DialDeviceDescriptionData;
-using media_router::DialRegistry;
-
-namespace {
-
-class DialAPITest : public ExtensionApiTest {
- public:
-  DialAPITest() {}
-
-  void SetUpCommandLine(base::CommandLine* command_line) override {
-    ExtensionApiTest::SetUpCommandLine(command_line);
-    command_line->AppendSwitchASCII(
-        extensions::switches::kWhitelistedExtensionID,
-        "ddchlicdkolnonkihahngkmmmjnjlkkf");
-  }
-
-  void SetUp() override {
-    // Stub out DualMediaSinkService so it does not interfere with the test.
-    media_router::DualMediaSinkService::SetInstanceForTest(
-        new media_router::NoopDualMediaSinkService());
-    ExtensionApiTest::SetUp();
-  }
-};
-
-}  // namespace
-
-// http://crbug.com/177163
-#if defined(OS_WIN) && !defined(NDEBUG)
-#define MAYBE_DeviceListEvents DISABLED_DeviceListEvents
-#else
-#define MAYBE_DeviceListEvents DeviceListEvents
-#endif
-// Test receiving DIAL API events.
-IN_PROC_BROWSER_TEST_F(DialAPITest, MAYBE_DeviceListEvents) {
-  // Setup the test.
-  ASSERT_TRUE(RunExtensionSubtest("dial/experimental", "device_list.html"));
-
-  // Send three device list updates.
-  scoped_refptr<extensions::DialAPI> api =
-      extensions::DialAPIFactory::GetInstance()->GetForBrowserContext(
-          profile());
-  ASSERT_TRUE(api.get());
-  DialRegistry::DeviceList devices;
-
-  ResultCatcher catcher;
-
-  DialDeviceData device1;
-  device1.set_device_id("1");
-  device1.set_label("1");
-  device1.set_device_description_url(GURL("http://127.0.0.1/dd.xml"));
-
-  devices.push_back(device1);
-  api->SendEventOnUIThread(devices);
-
-  DialDeviceData device2;
-  device2.set_device_id("2");
-  device2.set_label("2");
-  device2.set_device_description_url(GURL("http://127.0.0.2/dd.xml"));
-
-  devices.push_back(device2);
-  api->SendEventOnUIThread(devices);
-
-  DialDeviceData device3;
-  device3.set_device_id("3");
-  device3.set_label("3");
-  device3.set_device_description_url(GURL("http://127.0.0.3/dd.xml"));
-
-  devices.push_back(device3);
-  api->SendEventOnUIThread(devices);
-
-  EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
-}
-
-IN_PROC_BROWSER_TEST_F(DialAPITest, Discovery) {
-  ASSERT_TRUE(RunExtensionSubtest("dial/experimental", "discovery.html"));
-}
-
-// discoverNow does not do discovery when there are no listeners; in that case
-// the DIAL service will not be active.
-IN_PROC_BROWSER_TEST_F(DialAPITest, DiscoveryNoListeners) {
-  ASSERT_TRUE(RunExtensionSubtest("dial/experimental",
-                                  "discovery_no_listeners.html"));
-}
-
-// Make sure this API is only accessible to whitelisted extensions.
-IN_PROC_BROWSER_TEST_F(DialAPITest, NonWhitelistedExtension) {
-  ResultCatcher catcher;
-  catcher.RestrictToBrowserContext(browser()->profile());
-
-  ExtensionTestMessageListener listener("ready", true);
-  const Extension* extension =
-      LoadExtensionWithFlags(test_data_dir_.AppendASCII("dial/whitelist"),
-                             ExtensionBrowserTest::kFlagIgnoreManifestWarnings);
-  // We should have a DIAL API not available warning.
-  ASSERT_FALSE(extension->install_warnings().empty());
-
-  EXPECT_TRUE(listener.WaitUntilSatisfied());
-
-  listener.Reply("go");
-  EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
-}
-
-IN_PROC_BROWSER_TEST_F(DialAPITest, OnError) {
-  ASSERT_TRUE(RunExtensionSubtest("dial/experimental", "on_error.html"));
-}
-
-IN_PROC_BROWSER_TEST_F(DialAPITest, FetchDeviceDescription) {
-  scoped_refptr<extensions::DialAPI> api =
-      extensions::DialAPIFactory::GetInstance()->GetForBrowserContext(
-          profile());
-  ASSERT_TRUE(api);
-
-  DialDeviceData test_device("testDeviceId",
-                             GURL("http://127.0.0.1/description.xml"),
-                             base::Time::Now());
-  test_device.set_label("testDevice");
-
-  DialDeviceDescriptionData test_description("<xml>testDescription</xml>",
-                                             GURL("http://127.0.0.1/apps"));
-  api->SetDeviceForTest(test_device, test_description);
-
-  ASSERT_TRUE(RunExtensionSubtest("dial/experimental",
-                                  "fetch_device_description.html"));
-}
diff --git a/chrome/browser/extensions/api/sessions/sessions_api.cc b/chrome/browser/extensions/api/sessions/sessions_api.cc
index 872c24eb..cc0b280 100644
--- a/chrome/browser/extensions/api/sessions/sessions_api.cc
+++ b/chrome/browser/extensions/api/sessions/sessions_api.cc
@@ -496,7 +496,7 @@
 
   const sessions::SessionTab* tab = NULL;
   if (open_tabs->GetForeignTab(session_id.session_tag(),
-                               session_id.id(),
+                               SessionID::FromSerializedValue(session_id.id()),
                                &tab)) {
     TabStripModel* tab_strip = browser->tab_strip_model();
     content::WebContents* contents = tab_strip->GetActiveWebContents();
diff --git a/chrome/browser/extensions/browser_context_keyed_service_factories.cc b/chrome/browser/extensions/browser_context_keyed_service_factories.cc
index 776733e7..631489e 100644
--- a/chrome/browser/extensions/browser_context_keyed_service_factories.cc
+++ b/chrome/browser/extensions/browser_context_keyed_service_factories.cc
@@ -15,7 +15,6 @@
 #include "chrome/browser/extensions/api/content_settings/content_settings_service.h"
 #include "chrome/browser/extensions/api/cookies/cookies_api.h"
 #include "chrome/browser/extensions/api/developer_private/developer_private_api.h"
-#include "chrome/browser/extensions/api/dial/dial_api_factory.h"
 #include "chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.h"
 #include "chrome/browser/extensions/api/extension_action/extension_action_api.h"
 #include "chrome/browser/extensions/api/font_settings/font_settings_api.h"
@@ -84,7 +83,6 @@
   extensions::ContentSettingsService::GetFactoryInstance();
   extensions::CookiesAPI::GetFactoryInstance();
   extensions::DeveloperPrivateAPI::GetFactoryInstance();
-  extensions::DialAPIFactory::GetInstance();
 #if defined(OS_CHROMEOS)
   extensions::EasyUnlockPrivateAPI::GetFactoryInstance();
 #endif
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
index 5dde829..d6979d9 100644
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -2631,6 +2631,12 @@
 const char kEnableImeMenuDescription[] =
     "Enable access to the new IME menu in the Language Settings page.";
 
+const char kEnableStylusVirtualKeyboardName[] =
+    "Enable stylus virtual keyboard";
+const char kEnableStylusVirtualKeyboardDescription[] =
+    "If enabled, tapping with a stylus will show the handwriting virtual "
+    "keyboard.";
+
 const char kEnableUnifiedMultiDeviceSettingsName[] =
     "Enable unified MultiDevice settings";
 const char kEnableUnifiedMultiDeviceSettingsDescription[] =
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
index 40ec81f..060cde9 100644
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -1622,6 +1622,9 @@
 extern const char kEnableImeMenuName[];
 extern const char kEnableImeMenuDescription[];
 
+extern const char kEnableStylusVirtualKeyboardName[];
+extern const char kEnableStylusVirtualKeyboardDescription[];
+
 extern const char kEnableUnifiedMultiDeviceSettingsName[];
 extern const char kEnableUnifiedMultiDeviceSettingsDescription[];
 
diff --git a/chrome/browser/media/media_engagement_autoplay_browsertest.cc b/chrome/browser/media/media_engagement_autoplay_browsertest.cc
index 254e351..eecb5e1 100644
--- a/chrome/browser/media/media_engagement_autoplay_browsertest.cc
+++ b/chrome/browser/media/media_engagement_autoplay_browsertest.cc
@@ -354,6 +354,15 @@
   ExpectAutoplayDenied();
 }
 
+IN_PROC_BROWSER_TEST_P(MediaEngagementAutoplayBrowserTest, TopFrameNavigation) {
+  SetScores(SecondaryOrigin(), 20, 20);
+  LoadTestPage("engagement_autoplay_test.html");
+  ExpectAutoplayDenied();
+
+  LoadTestPageSecondaryOrigin("engagement_autoplay_test.html");
+  ExpectAutoplayAllowedIfEnabled();
+}
+
 INSTANTIATE_TEST_CASE_P(/* no prefix */,
                         MediaEngagementAutoplayBrowserTest,
                         testing::Bool());
diff --git a/chrome/browser/media/media_engagement_contents_observer.cc b/chrome/browser/media/media_engagement_contents_observer.cc
index 1369963..281db3d 100644
--- a/chrome/browser/media/media_engagement_contents_observer.cc
+++ b/chrome/browser/media/media_engagement_contents_observer.cc
@@ -503,7 +503,12 @@
 void MediaEngagementContentsObserver::ReadyToCommitNavigation(
     content::NavigationHandle* handle) {
   // TODO(beccahughes): Convert MEI API to using origin.
-  GURL url = handle->GetWebContents()->GetURL();
+  // If the navigation is occuring in the main frame we should use the URL
+  // provided by |handle| as the navigation has not committed yet. If the
+  // navigation is in a sub frame then use the URL from the main frame.
+  GURL url = handle->IsInMainFrame()
+                 ? handle->GetURL()
+                 : handle->GetWebContents()->GetLastCommittedURL();
   MediaEngagementScore score = service_->CreateEngagementScore(url);
   bool has_high_engagement = score.high_score();
 
diff --git a/chrome/browser/media/webrtc/webrtc_event_log_uploader.cc b/chrome/browser/media/webrtc/webrtc_event_log_uploader.cc
index 23de6b61..154dfda 100644
--- a/chrome/browser/media/webrtc/webrtc_event_log_uploader.cc
+++ b/chrome/browser/media/webrtc/webrtc_event_log_uploader.cc
@@ -142,6 +142,28 @@
     WebRtcEventLogUploaderImpl* owner)
     : owner_(owner) {}
 
+#if DCHECK_IS_ON()
+void WebRtcEventLogUploaderImpl::Delegate::OnURLFetchUploadProgress(
+    const net::URLFetcher* source,
+    int64_t current,
+    int64_t total) {
+  std::string unit;
+  if (total <= 1000) {
+    unit = "bytes";
+  } else if (total <= 1000 * 1000) {
+    unit = "KBs";
+    current /= 1000;
+    total /= 1000;
+  } else {
+    unit = "MBs";
+    current /= 1000 * 1000;
+    total /= 1000 * 1000;
+  }
+  VLOG(1) << "WebRTC event log upload progress: " << current << " / " << total
+          << " " << unit << ".";
+}
+#endif
+
 void WebRtcEventLogUploaderImpl::Delegate::OnURLFetchComplete(
     const net::URLFetcher* source) {
   owner_->OnURLFetchComplete(source);
diff --git a/chrome/browser/media/webrtc/webrtc_event_log_uploader.h b/chrome/browser/media/webrtc/webrtc_event_log_uploader.h
index 7e5a109..f240d2f 100644
--- a/chrome/browser/media/webrtc/webrtc_event_log_uploader.h
+++ b/chrome/browser/media/webrtc/webrtc_event_log_uploader.h
@@ -121,6 +121,11 @@
     ~Delegate() override = default;
 
     // net::URLFetcherDelegate implementation.
+#if DCHECK_IS_ON()
+    void OnURLFetchUploadProgress(const net::URLFetcher* source,
+                                  int64_t current,
+                                  int64_t total) override;
+#endif
     void OnURLFetchComplete(const net::URLFetcher* source) override;
 
    private:
diff --git a/chrome/browser/media_galleries/chromeos/mtp_device_delegate_impl_chromeos.cc b/chrome/browser/media_galleries/chromeos/mtp_device_delegate_impl_chromeos.cc
index f7dd21f..e3a539f 100644
--- a/chrome/browser/media_galleries/chromeos/mtp_device_delegate_impl_chromeos.cc
+++ b/chrome/browser/media_galleries/chromeos/mtp_device_delegate_impl_chromeos.cc
@@ -29,6 +29,7 @@
 #include "base/threading/thread_restrictions.h"
 #include "chrome/browser/media_galleries/chromeos/mtp_device_task_helper_map_service.h"
 #include "chrome/browser/media_galleries/chromeos/snapshot_file_details.h"
+#include "components/services/filesystem/public/interfaces/types.mojom.h"
 #include "net/base/io_buffer.h"
 #include "third_party/cros_system_api/dbus/service_constants.h"
 
@@ -1589,14 +1590,16 @@
 
   storage::AsyncFileUtil::EntryList file_list;
   for (const auto& mtp_entry : mtp_entries) {
-    storage::DirectoryEntry entry;
-    entry.name = mtp_entry.name;
-    entry.is_directory = mtp_entry.file_info.is_directory;
+    filesystem::mojom::DirectoryEntry entry;
+    entry.name = base::FilePath(mtp_entry.name);
+    entry.type = mtp_entry.file_info.is_directory
+                     ? filesystem::mojom::FsFileType::DIRECTORY
+                     : filesystem::mojom::FsFileType::REGULAR_FILE;
     file_list.push_back(entry);
 
     // Refresh the in memory tree.
-    dir_node->EnsureChildExists(entry.name, mtp_entry.file_id);
-    child_nodes_seen_.insert(entry.name);
+    dir_node->EnsureChildExists(entry.name.value(), mtp_entry.file_id);
+    child_nodes_seen_.insert(entry.name.value());
 
     // Add to |file_info_cache_|.
     file_info_cache_[dir_path.Append(entry.name)] = mtp_entry;
diff --git a/chrome/browser/media_galleries/fileapi/device_media_async_file_util.cc b/chrome/browser/media_galleries/fileapi/device_media_async_file_util.cc
index e42ad56..3fb5411 100644
--- a/chrome/browser/media_galleries/fileapi/device_media_async_file_util.cc
+++ b/chrome/browser/media_galleries/fileapi/device_media_async_file_util.cc
@@ -20,6 +20,7 @@
 #include "chrome/browser/media_galleries/fileapi/mtp_file_stream_reader.h"
 #include "chrome/browser/media_galleries/fileapi/native_media_file_util.h"
 #include "chrome/browser/media_galleries/fileapi/readahead_file_stream_reader.h"
+#include "components/services/filesystem/public/interfaces/types.mojom.h"
 #include "content/public/browser/browser_thread.h"
 #include "storage/browser/blob/shareable_file_reference.h"
 #include "storage/browser/fileapi/file_stream_reader.h"
@@ -261,8 +262,9 @@
     const AsyncFileUtil::EntryList& file_list) {
   AsyncFileUtil::EntryList results;
   for (size_t i = 0; i < file_list.size(); ++i) {
-    const storage::DirectoryEntry& entry = file_list[i];
-    if (entry.is_directory || CheckFilePath(base::FilePath(entry.name))) {
+    const filesystem::mojom::DirectoryEntry& entry = file_list[i];
+    if (entry.type == filesystem::mojom::FsFileType::DIRECTORY ||
+        CheckFilePath(entry.name)) {
       results.push_back(entry);
     }
   }
diff --git a/chrome/browser/media_galleries/fileapi/native_media_file_util.cc b/chrome/browser/media_galleries/fileapi/native_media_file_util.cc
index 33acd4c..296ff380 100644
--- a/chrome/browser/media_galleries/fileapi/native_media_file_util.cc
+++ b/chrome/browser/media_galleries/fileapi/native_media_file_util.cc
@@ -15,6 +15,7 @@
 #include "base/strings/string_util.h"
 #include "base/task_runner_util.h"
 #include "chrome/browser/media_galleries/fileapi/media_path_filter.h"
+#include "components/services/filesystem/public/interfaces/types.mojom.h"
 #include "content/public/browser/browser_thread.h"
 #include "net/base/io_buffer.h"
 #include "net/base/mime_sniffer.h"
@@ -567,11 +568,10 @@
     if (!info.IsDirectory() && !media_path_filter_->Match(enum_path))
       continue;
 
-    storage::DirectoryEntry entry;
-    entry.is_directory = info.IsDirectory();
-    entry.name = enum_path.BaseName().value();
-
-    file_list->push_back(entry);
+    file_list->emplace_back(enum_path.BaseName(),
+                            info.IsDirectory()
+                                ? filesystem::mojom::FsFileType::DIRECTORY
+                                : filesystem::mojom::FsFileType::REGULAR_FILE);
   }
 
   return base::File::FILE_OK;
diff --git a/chrome/browser/media_galleries/fileapi/native_media_file_util_unittest.cc b/chrome/browser/media_galleries/fileapi/native_media_file_util_unittest.cc
index 9c3222d..6455dd8 100644
--- a/chrome/browser/media_galleries/fileapi/native_media_file_util_unittest.cc
+++ b/chrome/browser/media_galleries/fileapi/native_media_file_util_unittest.cc
@@ -8,6 +8,7 @@
 #include <set>
 #include <string>
 #include <utility>
+#include <vector>
 
 #include "base/bind.h"
 #include "base/files/file_util.h"
@@ -94,9 +95,8 @@
                       bool has_more) {
   EXPECT_TRUE(!*completed);
   *completed = !has_more;
-  for (FileEntryList::const_iterator itr = file_list.begin();
-       itr != file_list.end(); ++itr)
-    EXPECT_TRUE(content->insert(itr->name).second);
+  for (const auto& entry : file_list)
+    EXPECT_TRUE(content->insert(entry.name.value()).second);
 }
 
 void PopulateDirectoryWithTestCases(const base::FilePath& dir,
diff --git a/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.mm b/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.mm
index 3aaa0410..63294d2 100644
--- a/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.mm
+++ b/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.mm
@@ -10,6 +10,7 @@
 
 #include "base/mac/scoped_nsobject.h"
 #include "base/macros.h"
+#include "components/services/filesystem/public/interfaces/types.mojom.h"
 #include "components/storage_monitor/image_capture_device.h"
 #include "components/storage_monitor/image_capture_device_manager.h"
 #include "content/public/browser/browser_thread.h"
@@ -464,10 +465,10 @@
       base::FilePath relative_path;
       read_path.AppendRelativePath(file_paths_[i], &relative_path);
       base::File::Info info = file_info_[file_paths_[i].value()];
-      storage::DirectoryEntry entry;
-      entry.name = relative_path.value();
-      entry.is_directory = info.is_directory;
-      entry_list.push_back(entry);
+      entry_list.emplace_back(
+          std::move(relative_path),
+          info.is_directory ? filesystem::mojom::FsFileType::DIRECTORY
+                            : filesystem::mojom::FsFileType::REGULAR_FILE);
     }
 
     if (found_path) {
diff --git a/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac_unittest.mm b/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac_unittest.mm
index 08429aef..0fa1af0 100644
--- a/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac_unittest.mm
+++ b/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac_unittest.mm
@@ -381,11 +381,11 @@
   EXPECT_EQ(base::File::FILE_OK, ReadDir(base::FilePath(kDevicePath)));
 
   ASSERT_EQ(2U, file_list_.size());
-  EXPECT_FALSE(file_list_[0].is_directory);
-  EXPECT_EQ("name1", file_list_[0].name);
+  EXPECT_EQ(filesystem::mojom::FsFileType::REGULAR_FILE, file_list_[0].type);
+  EXPECT_EQ("name1", file_list_[0].name.value());
 
-  EXPECT_FALSE(file_list_[1].is_directory);
-  EXPECT_EQ("name2", file_list_[1].name);
+  EXPECT_EQ(filesystem::mojom::FsFileType::REGULAR_FILE, file_list_[1].type);
+  EXPECT_EQ("name2", file_list_[1].name.value());
 }
 
 TEST_F(MTPDeviceDelegateImplMacTest, TestDirectoriesAndSorting) {
@@ -410,13 +410,13 @@
   EXPECT_EQ(base::File::FILE_OK, ReadDir(base::FilePath(kDevicePath)));
 
   ASSERT_EQ(4U, file_list_.size());
-  EXPECT_EQ("dir1", file_list_[0].name);
-  EXPECT_EQ("dir2", file_list_[1].name);
-  EXPECT_FALSE(file_list_[2].is_directory);
-  EXPECT_EQ("name1", file_list_[2].name);
+  EXPECT_EQ("dir1", file_list_[0].name.value());
+  EXPECT_EQ("dir2", file_list_[1].name.value());
+  EXPECT_EQ(filesystem::mojom::FsFileType::REGULAR_FILE, file_list_[2].type);
+  EXPECT_EQ("name1", file_list_[2].name.value());
 
-  EXPECT_FALSE(file_list_[3].is_directory);
-  EXPECT_EQ("name2", file_list_[3].name);
+  EXPECT_EQ(filesystem::mojom::FsFileType::REGULAR_FILE, file_list_[3].type);
+  EXPECT_EQ("name2", file_list_[3].name.value());
 }
 
 TEST_F(MTPDeviceDelegateImplMacTest, SubDirectories) {
@@ -459,33 +459,33 @@
 
   EXPECT_EQ(base::File::FILE_OK, ReadDir(base::FilePath(kDevicePath)));
   ASSERT_EQ(3U, file_list_.size());
-  EXPECT_TRUE(file_list_[0].is_directory);
-  EXPECT_EQ("dir1", file_list_[0].name);
-  EXPECT_TRUE(file_list_[1].is_directory);
-  EXPECT_EQ("dir2", file_list_[1].name);
-  EXPECT_FALSE(file_list_[2].is_directory);
-  EXPECT_EQ("name4", file_list_[2].name);
+  EXPECT_EQ(filesystem::mojom::FsFileType::DIRECTORY, file_list_[0].type);
+  EXPECT_EQ("dir1", file_list_[0].name.value());
+  EXPECT_EQ(filesystem::mojom::FsFileType::DIRECTORY, file_list_[1].type);
+  EXPECT_EQ("dir2", file_list_[1].name.value());
+  EXPECT_EQ(filesystem::mojom::FsFileType::REGULAR_FILE, file_list_[2].type);
+  EXPECT_EQ("name4", file_list_[2].name.value());
 
   EXPECT_EQ(base::File::FILE_OK,
             ReadDir(base::FilePath(kDevicePath).Append("dir1")));
   ASSERT_EQ(1U, file_list_.size());
-  EXPECT_FALSE(file_list_[0].is_directory);
-  EXPECT_EQ("name1", file_list_[0].name);
+  EXPECT_EQ(filesystem::mojom::FsFileType::REGULAR_FILE, file_list_[0].type);
+  EXPECT_EQ("name1", file_list_[0].name.value());
 
   EXPECT_EQ(base::File::FILE_OK,
             ReadDir(base::FilePath(kDevicePath).Append("dir2")));
   ASSERT_EQ(2U, file_list_.size());
-  EXPECT_FALSE(file_list_[0].is_directory);
-  EXPECT_EQ("name2", file_list_[0].name);
-  EXPECT_TRUE(file_list_[1].is_directory);
-  EXPECT_EQ("subdir", file_list_[1].name);
+  EXPECT_EQ(filesystem::mojom::FsFileType::REGULAR_FILE, file_list_[0].type);
+  EXPECT_EQ("name2", file_list_[0].name.value());
+  EXPECT_EQ(filesystem::mojom::FsFileType::DIRECTORY, file_list_[1].type);
+  EXPECT_EQ("subdir", file_list_[1].name.value());
 
   EXPECT_EQ(base::File::FILE_OK,
             ReadDir(base::FilePath(kDevicePath)
                     .Append("dir2").Append("subdir")));
   ASSERT_EQ(1U, file_list_.size());
-  EXPECT_FALSE(file_list_[0].is_directory);
-  EXPECT_EQ("name3", file_list_[0].name);
+  EXPECT_EQ(filesystem::mojom::FsFileType::REGULAR_FILE, file_list_[0].type);
+  EXPECT_EQ("name3", file_list_[0].name.value());
 
   EXPECT_EQ(base::File::FILE_ERROR_NOT_FOUND,
             ReadDir(base::FilePath(kDevicePath)
@@ -517,7 +517,7 @@
 
   EXPECT_EQ(base::File::FILE_OK, ReadDir(base::FilePath(kDevicePath)));
   ASSERT_EQ(1U, file_list_.size());
-  ASSERT_EQ("filename", file_list_[0].name);
+  ASSERT_EQ("filename", file_list_[0].name.value());
 
   EXPECT_EQ(base::File::FILE_ERROR_NOT_FOUND,
             DownloadFile(base::FilePath("/ic:id/nonexist"),
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 0648936..b66bc56 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
@@ -29,6 +29,7 @@
 #include "chrome/browser/media_galleries/win/mtp_device_operations_util.h"
 #include "chrome/browser/media_galleries/win/portable_device_map_service.h"
 #include "chrome/browser/media_galleries/win/snapshot_file_details.h"
+#include "components/services/filesystem/public/interfaces/types.mojom.h"
 #include "components/storage_monitor/storage_monitor.h"
 #include "content/public/browser/browser_thread.h"
 #include "storage/common/fileapi/file_system_util.h"
@@ -202,10 +203,10 @@
     return error;
 
   while (!(current = file_enum->Next()).empty()) {
-    storage::DirectoryEntry entry;
-    entry.is_directory = file_enum->IsDirectory();
-    entry.name = storage::VirtualPath::BaseName(current).value();
-    entries->push_back(entry);
+    entries->emplace_back(storage::VirtualPath::BaseName(current),
+                          file_enum->IsDirectory()
+                              ? filesystem::mojom::FsFileType::DIRECTORY
+                              : filesystem::mojom::FsFileType::REGULAR_FILE);
   }
   return error;
 }
diff --git a/chrome/browser/page_load_metrics/page_load_metrics_browsertest.cc b/chrome/browser/page_load_metrics/page_load_metrics_browsertest.cc
index 4d70aaa..4c28a06 100644
--- a/chrome/browser/page_load_metrics/page_load_metrics_browsertest.cc
+++ b/chrome/browser/page_load_metrics/page_load_metrics_browsertest.cc
@@ -1078,36 +1078,6 @@
       "Prerender.none_PrefetchTTFCP.Reference.Cacheable.Visible", 0);
 }
 
-// Flaky on Linux; see https://crbug.com/788651.
-#if defined(OS_LINUX)
-#define MAYBE_CSSTiming DISABLED_CSSTiming
-#else
-#define MAYBE_CSSTiming CSSTiming
-#endif
-IN_PROC_BROWSER_TEST_F(PageLoadMetricsBrowserTest, MAYBE_CSSTiming) {
-  ASSERT_TRUE(embedded_test_server()->Start());
-
-  auto waiter = CreatePageLoadMetricsWaiter();
-  waiter->AddPageExpectation(TimingField::FIRST_CONTENTFUL_PAINT);
-
-  // Careful: Blink code clamps timestamps to 5us, so any CSS parsing we do here
-  // must take >> 5us, otherwise we'll log 0 for the value and it will remain
-  // unset here.
-  ui_test_utils::NavigateToURL(
-      browser(),
-      embedded_test_server()->GetURL("/page_load_metrics/page_with_css.html"));
-  waiter->Wait();
-
-  histogram_tester_.ExpectTotalCount(internal::kHistogramFirstContentfulPaint,
-                                     1);
-  histogram_tester_.ExpectTotalCount(
-      "PageLoad.CSSTiming.Parse.BeforeFirstContentfulPaint", 1);
-  histogram_tester_.ExpectTotalCount(
-      "PageLoad.CSSTiming.Update.BeforeFirstContentfulPaint", 1);
-  histogram_tester_.ExpectTotalCount(
-      "PageLoad.CSSTiming.ParseAndUpdate.BeforeFirstContentfulPaint", 1);
-}
-
 IN_PROC_BROWSER_TEST_F(PageLoadMetricsBrowserTest, PayloadSize) {
   ASSERT_TRUE(embedded_test_server()->Start());
 
diff --git a/chrome/browser/password_manager/password_manager_browsertest.cc b/chrome/browser/password_manager/password_manager_browsertest.cc
index 5d2a85fd..af14c81 100644
--- a/chrome/browser/password_manager/password_manager_browsertest.cc
+++ b/chrome/browser/password_manager/password_manager_browsertest.cc
@@ -3038,10 +3038,8 @@
                       "mypassword");
 }
 
-// TODO(crbug.com/804398): Flaky.
 // Check that the internals page contains logs from the renderer.
-IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTestBase,
-                       DISABLED_InternalsPage_Renderer) {
+IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTestBase, InternalsPage_Renderer) {
   // Open the internals page.
   ui_test_utils::NavigateToURLWithDisposition(
       browser(), GURL("chrome://password-manager-internals"),
@@ -3049,22 +3047,27 @@
       ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
   content::WebContents* internals_web_contents = WebContents();
 
-  // Open some page with a HTML form.
+  // The renderer is supposed to ask whether logging is available. To avoid
+  // race conditions between the answer "Logging is available" arriving from
+  // the browser and actual logging callsites reached in the renderer, open
+  // first an arbitrary page to ensure that the renderer queries the
+  // availability of logging and has enough time to receive the answer.
   ui_test_utils::NavigateToURLWithDisposition(
-      browser(), embedded_test_server()->GetURL("/password/password_form.html"),
+      browser(), embedded_test_server()->GetURL("/password/done.html"),
       WindowOpenDisposition::NEW_FOREGROUND_TAB,
       ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
   content::WebContents* forms_web_contents =
       browser()->tab_strip_model()->GetActiveWebContents();
 
-  // The renderer queries the availability of logging on start-up. However, it
-  // can take too long to propagate that message from the browser back to the
-  // renderer. The renderer might have attempted logging in the meantime.
-  // Therefore the page with the form is reloaded to increase the likelihood
-  // that the availability query was answered before the logging during page
-  // load.
+  // Now navigate to another page, containing some forms, so that the renderer
+  // attempts to log. It should be a different page than the current one,
+  // because just reloading the current one sometimes confused the Wait() call
+  // and lead to timeouts (https://crbug.com/804398).
   NavigationObserver observer(forms_web_contents);
-  forms_web_contents->ReloadFocusedFrame(false);
+  ui_test_utils::NavigateToURLWithDisposition(
+      browser(), embedded_test_server()->GetURL("/password/password_form.html"),
+      WindowOpenDisposition::CURRENT_TAB,
+      ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
   observer.Wait();
 
   std::string find_logs =
diff --git a/chrome/browser/resources/engagement/BUILD.gn b/chrome/browser/resources/engagement/BUILD.gn
index 93c8c3a1..84ee3210 100644
--- a/chrome/browser/resources/engagement/BUILD.gn
+++ b/chrome/browser/resources/engagement/BUILD.gn
@@ -4,13 +4,13 @@
 
 import("//third_party/closure_compiler/compile_js.gni")
 
-group("closure_compile") {
+js_type_check("closure_compile") {
   deps = [
     ":site_engagement",
   ]
 }
 
-js_binary("site_engagement") {
+js_library("site_engagement") {
   deps = [
     "//ui/webui/resources/js:assert",
     "//ui/webui/resources/js:util",
diff --git a/chrome/browser/resources/media_router/extension/manifest.yaml b/chrome/browser/resources/media_router/extension/manifest.yaml
index 5e27745..4ec3bc8 100644
--- a/chrome/browser/resources/media_router/extension/manifest.yaml
+++ b/chrome/browser/resources/media_router/extension/manifest.yaml
@@ -17,7 +17,6 @@
     "alarms",
     "declarativeWebRequest",
     "desktopCapture",
-    "dial",
     "http://*/*",
     "mediaRouterPrivate",
     "metricsPrivate",
diff --git a/chrome/browser/sync/glue/synced_tab_delegate_android.cc b/chrome/browser/sync/glue/synced_tab_delegate_android.cc
index bd16757..fbabe432 100644
--- a/chrome/browser/sync/glue/synced_tab_delegate_android.cc
+++ b/chrome/browser/sync/glue/synced_tab_delegate_android.cc
@@ -25,19 +25,19 @@
 
 SyncedTabDelegateAndroid::~SyncedTabDelegateAndroid() {}
 
-SessionID::id_type SyncedTabDelegateAndroid::GetWindowId() const {
+SessionID SyncedTabDelegateAndroid::GetWindowId() const {
   return tab_contents_delegate_->GetWindowId();
 }
 
-SessionID::id_type SyncedTabDelegateAndroid::GetSessionId() const {
-  return tab_android_->session_id().id();
+SessionID SyncedTabDelegateAndroid::GetSessionId() const {
+  return tab_android_->session_id();
 }
 
 bool SyncedTabDelegateAndroid::IsBeingDestroyed() const {
   return tab_contents_delegate_->IsBeingDestroyed();
 }
 
-SessionID::id_type SyncedTabDelegateAndroid::GetSourceTabID() const {
+SessionID SyncedTabDelegateAndroid::GetSourceTabID() const {
   return tab_contents_delegate_->GetSourceTabID();
 }
 
diff --git a/chrome/browser/sync/glue/synced_tab_delegate_android.h b/chrome/browser/sync/glue/synced_tab_delegate_android.h
index c6c1f9f..ddce125 100644
--- a/chrome/browser/sync/glue/synced_tab_delegate_android.h
+++ b/chrome/browser/sync/glue/synced_tab_delegate_android.h
@@ -32,10 +32,10 @@
   ~SyncedTabDelegateAndroid() override;
 
   // SyncedTabDelegate:
-  SessionID::id_type GetWindowId() const override;
-  SessionID::id_type GetSessionId() const override;
+  SessionID GetWindowId() const override;
+  SessionID GetSessionId() const override;
   bool IsBeingDestroyed() const override;
-  SessionID::id_type GetSourceTabID() const override;
+  SessionID GetSourceTabID() const override;
   std::string GetExtensionAppId() const override;
   bool IsInitialBlankNavigation() const override;
   int GetCurrentEntryIndex() const override;
diff --git a/chrome/browser/sync/glue/synced_window_delegate_android.cc b/chrome/browser/sync/glue/synced_window_delegate_android.cc
index 57183ba3..8fc1987 100644
--- a/chrome/browser/sync/glue/synced_window_delegate_android.cc
+++ b/chrome/browser/sync/glue/synced_window_delegate_android.cc
@@ -28,7 +28,7 @@
   return !tab_model_->IsOffTheRecord();
 }
 
-SessionID::id_type SyncedWindowDelegateAndroid::GetSessionId() const {
+SessionID SyncedWindowDelegateAndroid::GetSessionId() const {
   return tab_model_->GetSessionId();
 }
 
@@ -63,9 +63,9 @@
   return tab ? tab->GetSyncedTabDelegate() : nullptr;
 }
 
-SessionID::id_type SyncedWindowDelegateAndroid::GetTabIdAt(int index) const {
+SessionID SyncedWindowDelegateAndroid::GetTabIdAt(int index) const {
   SyncedTabDelegate* tab = GetTabAt(index);
-  return tab ? tab->GetSessionId() : -1;
+  return tab ? tab->GetSessionId() : SessionID::InvalidValue();
 }
 
 bool SyncedWindowDelegateAndroid::IsSessionRestoreInProgress() const {
diff --git a/chrome/browser/sync/glue/synced_window_delegate_android.h b/chrome/browser/sync/glue/synced_window_delegate_android.h
index 0d31d12..d7e094e5 100644
--- a/chrome/browser/sync/glue/synced_window_delegate_android.h
+++ b/chrome/browser/sync/glue/synced_window_delegate_android.h
@@ -25,7 +25,7 @@
 
   // sync_sessions::SyncedWindowDelegate implementation.
   bool HasWindow() const override;
-  SessionID::id_type GetSessionId() const override;
+  SessionID GetSessionId() const override;
   int GetTabCount() const override;
   int GetActiveIndex() const override;
   bool IsApp() const override;
@@ -33,7 +33,7 @@
   bool IsTypePopup() const override;
   bool IsTabPinned(const sync_sessions::SyncedTabDelegate* tab) const override;
   sync_sessions::SyncedTabDelegate* GetTabAt(int index) const override;
-  SessionID::id_type GetTabIdAt(int index) const override;
+  SessionID GetTabIdAt(int index) const override;
   bool IsSessionRestoreInProgress() const override;
   bool ShouldSync() const override;
 
diff --git a/chrome/browser/sync/glue/synced_window_delegates_getter_android.cc b/chrome/browser/sync/glue/synced_window_delegates_getter_android.cc
index 22382a9..18591fb 100644
--- a/chrome/browser/sync/glue/synced_window_delegates_getter_android.cc
+++ b/chrome/browser/sync/glue/synced_window_delegates_getter_android.cc
@@ -26,8 +26,8 @@
 }
 
 const SyncedWindowDelegate* SyncedWindowDelegatesGetterAndroid::FindById(
-    SessionID::id_type session_id) {
-  TabModel* tab_model = TabModelList::FindTabModelWithId(session_id);
+    SessionID session_id) {
+  TabModel* tab_model = TabModelList::FindTabModelWithId(session_id.id());
 
   // In case we don't find the browser (e.g. for Developer Tools).
   return tab_model ? tab_model->GetSyncedWindowDelegate() : nullptr;
diff --git a/chrome/browser/sync/glue/synced_window_delegates_getter_android.h b/chrome/browser/sync/glue/synced_window_delegates_getter_android.h
index 74b5ca1..c97afbe9 100644
--- a/chrome/browser/sync/glue/synced_window_delegates_getter_android.h
+++ b/chrome/browser/sync/glue/synced_window_delegates_getter_android.h
@@ -25,8 +25,7 @@
 
   // SyncedWindowDelegatesGetter implementation
   SyncedWindowDelegateMap GetSyncedWindowDelegates() override;
-  const sync_sessions::SyncedWindowDelegate* FindById(
-      SessionID::id_type id) override;
+  const sync_sessions::SyncedWindowDelegate* FindById(SessionID id) override;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(SyncedWindowDelegatesGetterAndroid);
diff --git a/chrome/browser/sync/sessions/browser_list_router_helper_unittest.cc b/chrome/browser/sync/sessions/browser_list_router_helper_unittest.cc
index f366640..a292de5 100644
--- a/chrome/browser/sync/sessions/browser_list_router_helper_unittest.cc
+++ b/chrome/browser/sync/sessions/browser_list_router_helper_unittest.cc
@@ -33,11 +33,11 @@
                          const GURL& icon_url) override {}
 
   std::vector<GURL>* seen_urls() { return &seen_urls_; }
-  std::vector<SessionID::id_type>* seen_ids() { return &seen_ids_; }
+  std::vector<SessionID>* seen_ids() { return &seen_ids_; }
 
  private:
   std::vector<GURL> seen_urls_;
-  std::vector<SessionID::id_type> seen_ids_;
+  std::vector<SessionID> seen_ids_;
 };
 
 class BrowserListRouterHelperTest : public BrowserWithTestWindowTest {
@@ -130,7 +130,7 @@
   BrowserList::GetInstance()->SetLastActive(browser());
 
   EXPECT_EQ(gurl_1, *handler_1.seen_urls()->rbegin());
-  SessionID::id_type old_id = *handler_1.seen_ids()->rbegin();
+  SessionID old_id = *handler_1.seen_ids()->rbegin();
 
   // Remove previous any observations from setup to make checking expectations
   // easier below.
diff --git a/chrome/browser/sync/sessions/sync_sessions_router_tab_helper.cc b/chrome/browser/sync/sessions/sync_sessions_router_tab_helper.cc
index 474b964..62fc3f1 100644
--- a/chrome/browser/sync/sessions/sync_sessions_router_tab_helper.cc
+++ b/chrome/browser/sync/sessions/sync_sessions_router_tab_helper.cc
@@ -33,7 +33,7 @@
     SyncSessionsWebContentsRouter* router)
     : content::WebContentsObserver(web_contents),
       router_(router),
-      source_tab_id_(kInvalidTabID) {}
+      source_tab_id_(SessionID::InvalidValue()) {}
 
 SyncSessionsRouterTabHelper::~SyncSessionsRouterTabHelper() {}
 
@@ -74,10 +74,11 @@
 
 void SyncSessionsRouterTabHelper::SetSourceTabIdForChild(
     content::WebContents* child_contents) {
-  SessionID::id_type source_tab_id = SessionTabHelper::IdForTab(web_contents());
+  SessionID source_tab_id = SessionID::FromSerializedValue(
+      SessionTabHelper::IdForTab(web_contents()));
   if (child_contents &&
       SyncSessionsRouterTabHelper::FromWebContents(child_contents) &&
-      child_contents != web_contents() && source_tab_id != kInvalidTabID) {
+      child_contents != web_contents() && source_tab_id.is_valid()) {
     SyncSessionsRouterTabHelper::FromWebContents(child_contents)
         ->set_source_tab_id(source_tab_id);
   }
diff --git a/chrome/browser/sync/sessions/sync_sessions_router_tab_helper.h b/chrome/browser/sync/sessions/sync_sessions_router_tab_helper.h
index aeb8aa7..a82b345b 100644
--- a/chrome/browser/sync/sessions/sync_sessions_router_tab_helper.h
+++ b/chrome/browser/sync/sessions/sync_sessions_router_tab_helper.h
@@ -51,8 +51,8 @@
   void SetSourceTabIdForChild(content::WebContents* child_contents);
 
   // Get the tab id of the tab responsible for creating the tab this helper
-  // corresponds to. Returns -1 if there is no such tab.
-  SessionID::id_type source_tab_id() const { return source_tab_id_; }
+  // corresponds to. Returns an invalid ID if there is no such tab.
+  SessionID source_tab_id() const { return source_tab_id_; }
 
  private:
   friend class content::WebContentsUserData<SyncSessionsRouterTabHelper>;
@@ -62,7 +62,7 @@
 
   // Set the tab id of the tab reponsible for creating the tab this helper
   // corresponds to.
-  void set_source_tab_id(const SessionID::id_type id) { source_tab_id_ = id; }
+  void set_source_tab_id(SessionID id) { source_tab_id_ = id; }
 
   void NotifyRouter(bool page_load_completed = false);
 
@@ -74,7 +74,7 @@
   // * From context menu, "Open link in new window".
   // * Ctrl-click.
   // * Click on a link with target='_blank'.
-  SessionID::id_type source_tab_id_;
+  SessionID source_tab_id_;
 
   DISALLOW_COPY_AND_ASSIGN(SyncSessionsRouterTabHelper);
 };
diff --git a/chrome/browser/sync/test/integration/sessions_helper.cc b/chrome/browser/sync/test/integration/sessions_helper.cc
index 3dfce0e..b78e14480 100644
--- a/chrome/browser/sync/test/integration/sessions_helper.cc
+++ b/chrome/browser/sync/test/integration/sessions_helper.cc
@@ -242,7 +242,7 @@
                 new_tab->navigations.begin());
       new_window->wrapped_window.tabs.push_back(std::move(new_tab));
     }
-    auto id = new_window->wrapped_window.window_id.id();
+    auto id = new_window->wrapped_window.window_id;
     (*local_windows)[id] = std::move(new_window);
   }
 
diff --git a/chrome/browser/sync/test/integration/sessions_helper.h b/chrome/browser/sync/test/integration/sessions_helper.h
index 1e99bea..c28391a 100644
--- a/chrome/browser/sync/test/integration/sessions_helper.h
+++ b/chrome/browser/sync/test/integration/sessions_helper.h
@@ -24,10 +24,9 @@
 
 using SyncedSessionVector = std::vector<const sync_sessions::SyncedSession*>;
 using SessionWindowMap =
-    std::map<SessionID::id_type, sync_sessions::SyncedSessionWindow*>;
+    std::map<SessionID, sync_sessions::SyncedSessionWindow*>;
 using ScopedWindowMap =
-    std::map<SessionID::id_type,
-             std::unique_ptr<sync_sessions::SyncedSessionWindow>>;
+    std::map<SessionID, std::unique_ptr<sync_sessions::SyncedSessionWindow>>;
 
 // Copies the local session windows of profile at |index| to |local_windows|.
 // Returns true if successful.
diff --git a/chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc b/chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc
index f4ecb6dc..3872aeac 100644
--- a/chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc
+++ b/chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc
@@ -375,7 +375,7 @@
   sync_sessions::SyncSessionsRouterTabHelper* new_tab_helper =
       sync_sessions::SyncSessionsRouterTabHelper::FromWebContents(
           new_tab_contents);
-  EXPECT_EQ(new_tab_helper->source_tab_id(), source_tab_id);
+  EXPECT_EQ(new_tab_helper->source_tab_id().id(), source_tab_id);
 }
 
 void DumpSessionsOnServer(fake_server::FakeServer* fake_server) {
diff --git a/chrome/browser/sync_file_system/drive_backend/drive_backend_sync_unittest.cc b/chrome/browser/sync_file_system/drive_backend/drive_backend_sync_unittest.cc
index 6ef1b42..9a9d7c3d 100644
--- a/chrome/browser/sync_file_system/drive_backend/drive_backend_sync_unittest.cc
+++ b/chrome/browser/sync_file_system/drive_backend/drive_backend_sync_unittest.cc
@@ -35,6 +35,7 @@
 #include "components/drive/drive_uploader.h"
 #include "components/drive/service/fake_drive_service.h"
 #include "components/drive/service/test_util.h"
+#include "components/services/filesystem/public/interfaces/types.mojom.h"
 #include "content/public/test/test_browser_thread.h"
 #include "content/public/test/test_browser_thread_bundle.h"
 #include "content/public/test/test_utils.h"
@@ -457,10 +458,7 @@
     FileEntryList local_entries;
     EXPECT_EQ(base::File::FILE_OK,
               file_system->ReadDirectory(url, &local_entries));
-    for (FileEntryList::iterator itr = local_entries.begin();
-         itr != local_entries.end();
-         ++itr) {
-      const storage::DirectoryEntry& local_entry = *itr;
+    for (const auto& local_entry : local_entries) {
       storage::FileSystemURL entry_url(
           CreateURL(app_id, path.Append(local_entry.name)));
       std::string title =
@@ -470,7 +468,7 @@
       ASSERT_TRUE(base::ContainsKey(remote_entry_by_title, title));
       const google_apis::FileResource& remote_entry =
           *remote_entry_by_title[title];
-      if (local_entry.is_directory) {
+      if (local_entry.type == filesystem::mojom::FsFileType::DIRECTORY) {
         ASSERT_TRUE(remote_entry.IsDirectory());
         VerifyConsistencyForFolder(app_id, entry_url.path(),
                                    remote_entry.file_id(),
@@ -519,11 +517,10 @@
       FileEntryList entries;
       EXPECT_EQ(base::File::FILE_OK,
                 file_system->ReadDirectory(url, &entries));
-      for (FileEntryList::iterator itr = entries.begin();
-           itr != entries.end(); ++itr) {
+      for (const auto& entry : entries) {
         ++result;
-        if (itr->is_directory)
-          folders.push(url.path().Append(itr->name));
+        if (entry.type == filesystem::mojom::FsFileType::DIRECTORY)
+          folders.push(url.path().Append(entry.name));
       }
     }
 
diff --git a/chrome/browser/ui/android/tab_model/android_live_tab_context.cc b/chrome/browser/ui/android/tab_model/android_live_tab_context.cc
index 37c849f2..fd30458 100644
--- a/chrome/browser/ui/android/tab_model/android_live_tab_context.cc
+++ b/chrome/browser/ui/android/tab_model/android_live_tab_context.cc
@@ -20,8 +20,8 @@
 void AndroidLiveTabContext::ShowBrowserWindow() {
 }
 
-const SessionID& AndroidLiveTabContext::GetSessionID() const {
-  return tab_model_->SessionId();
+SessionID AndroidLiveTabContext::GetSessionID() const {
+  return tab_model_->GetSessionId();
 }
 
 int AndroidLiveTabContext::GetTabCount() const {
diff --git a/chrome/browser/ui/android/tab_model/android_live_tab_context.h b/chrome/browser/ui/android/tab_model/android_live_tab_context.h
index a166dff..50d844e1 100644
--- a/chrome/browser/ui/android/tab_model/android_live_tab_context.h
+++ b/chrome/browser/ui/android/tab_model/android_live_tab_context.h
@@ -26,7 +26,7 @@
 
   // Overridden from LiveTabContext:
   void ShowBrowserWindow() override;
-  const SessionID& GetSessionID() const override;
+  SessionID GetSessionID() const override;
   int GetTabCount() const override;
   int GetSelectedIndex() const override;
   std::string GetAppName() const override;
diff --git a/chrome/browser/ui/android/tab_model/tab_model.cc b/chrome/browser/ui/android/tab_model/tab_model.cc
index f4c5e392..b435c4fb 100644
--- a/chrome/browser/ui/android/tab_model/tab_model.cc
+++ b/chrome/browser/ui/android/tab_model/tab_model.cc
@@ -61,11 +61,7 @@
   return synced_window_delegate_.get();
 }
 
-SessionID::id_type TabModel::GetSessionId() const {
-  return session_id_.id();
-}
-
-const SessionID& TabModel::SessionId() const {
+SessionID TabModel::GetSessionId() const {
   return session_id_;
 }
 
diff --git a/chrome/browser/ui/android/tab_model/tab_model.h b/chrome/browser/ui/android/tab_model/tab_model.h
index 4dc93e83..80ef5c0 100644
--- a/chrome/browser/ui/android/tab_model/tab_model.h
+++ b/chrome/browser/ui/android/tab_model/tab_model.h
@@ -39,8 +39,7 @@
   virtual Profile* GetProfile() const;
   virtual bool IsOffTheRecord() const;
   virtual sync_sessions::SyncedWindowDelegate* GetSyncedWindowDelegate() const;
-  virtual SessionID::id_type GetSessionId() const;
-  virtual const SessionID& SessionId() const;
+  virtual SessionID GetSessionId() const;
   virtual sessions::LiveTabContext* GetLiveTabContext() const;
 
   virtual int GetTabCount() const = 0;
diff --git a/chrome/browser/ui/android/tab_model/tab_model_jni_bridge.cc b/chrome/browser/ui/android/tab_model/tab_model_jni_bridge.cc
index af04609..5bb7320c 100644
--- a/chrome/browser/ui/android/tab_model/tab_model_jni_bridge.cc
+++ b/chrome/browser/ui/android/tab_model/tab_model_jni_bridge.cc
@@ -71,7 +71,8 @@
   // Tab#initialize() should have been called by now otherwise we can't push
   // the window id.
   TabAndroid* tab = TabAndroid::GetNativeTab(env, jtab);
-  if (tab) tab->SetWindowSessionID(GetSessionId());
+  if (tab)
+    tab->SetWindowSessionID(GetSessionId().id());
 }
 
 int TabModelJniBridge::GetTabCount() const {
diff --git a/chrome/browser/ui/android/tab_model/tab_model_list.cc b/chrome/browser/ui/android/tab_model/tab_model_list.cc
index f60b966..7e02839 100644
--- a/chrome/browser/ui/android/tab_model/tab_model_list.cc
+++ b/chrome/browser/ui/android/tab_model/tab_model_list.cc
@@ -83,7 +83,7 @@
     SessionID::id_type desired_id) {
   for (TabModelList::const_iterator i = TabModelList::begin();
       i != TabModelList::end(); i++) {
-    if ((*i)->GetSessionId() == desired_id)
+    if ((*i)->GetSessionId().id() == desired_id)
       return *i;
   }
 
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
index aa37cab..f7aa203 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
@@ -16,7 +16,6 @@
 #include "ash/public/cpp/shelf_prefs.h"
 #include "ash/public/interfaces/constants.mojom.h"
 #include "ash/resources/grit/ash_resources.h"
-#include "ash/shelf/shelf.h"
 #include "ash/shell.h"
 #include "ash/strings/grit/ash_strings.h"
 #include "base/strings/pattern.h"
@@ -78,8 +77,6 @@
 #include "ui/aura/window.h"
 #include "ui/base/l10n/l10n_util.h"
 #include "ui/base/resource/resource_bundle.h"
-#include "ui/display/display.h"
-#include "ui/display/screen.h"
 #include "ui/display/types/display_constants.h"
 #include "ui/keyboard/keyboard_util.h"
 #include "ui/resources/grit/ui_resources.h"
@@ -89,13 +86,6 @@
 
 namespace {
 
-int64_t GetDisplayIDForShelf(ash::Shelf* shelf) {
-  display::Display display =
-      display::Screen::GetScreen()->GetDisplayNearestWindow(shelf->GetWindow());
-  DCHECK(display.is_valid());
-  return display.id();
-}
-
 // Calls ItemSelected with |source|, default arguments, and no callback.
 void SelectItemWithSource(ash::ShelfItemDelegate* delegate,
                           ash::ShelfLaunchSource source) {
@@ -671,37 +661,6 @@
   return static_cast<BrowserShortcutLauncherItemController*>(delegate);
 }
 
-bool ChromeLauncherController::ShelfBoundsChangesProbablyWithUser(
-    ash::Shelf* shelf,
-    const AccountId& account_id) const {
-  Profile* other_profile = multi_user_util::GetProfileFromAccountId(account_id);
-  if (!other_profile || other_profile == profile())
-    return false;
-
-  // Note: The Auto hide state from preferences is not the same as the actual
-  // visibility of the shelf. Depending on all the various states (full screen,
-  // no window on desktop, multi user, ..) the shelf could be shown - or not.
-  PrefService* prefs = profile()->GetPrefs();
-  PrefService* other_prefs = other_profile->GetPrefs();
-  // If ash prefs have not been registered with Chrome yet, Chrome cannot know
-  // whether the shelf bounds will change; err on the side of false positives.
-  if (!ash::AreShelfPrefsAvailable(prefs) ||
-      !ash::AreShelfPrefsAvailable(other_prefs)) {
-    return true;
-  }
-  const int64_t display = GetDisplayIDForShelf(shelf);
-  const bool currently_shown =
-      ash::SHELF_AUTO_HIDE_BEHAVIOR_NEVER ==
-      ash::GetShelfAutoHideBehaviorPref(prefs, display);
-  const bool other_shown =
-      ash::SHELF_AUTO_HIDE_BEHAVIOR_NEVER ==
-      ash::GetShelfAutoHideBehaviorPref(other_prefs, display);
-
-  return currently_shown != other_shown ||
-         ash::GetShelfAlignmentPref(prefs, display) !=
-             ash::GetShelfAlignmentPref(other_prefs, display);
-}
-
 void ChromeLauncherController::OnUserProfileReadyToSwitch(Profile* profile) {
   if (user_switch_observer_.get())
     user_switch_observer_->OnUserProfileReadyToSwitch(profile);
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.h b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.h
index 543a15f..430f641 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.h
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.h
@@ -27,7 +27,6 @@
 #include "mojo/public/cpp/bindings/binding.h"
 #include "mojo/public/cpp/bindings/interface_ptr_set.h"
 
-class AccountId;
 class AppIconLoader;
 class AppSyncUIState;
 class AppWindowLauncherController;
@@ -40,7 +39,6 @@
 class LauncherControllerHelper;
 
 namespace ash {
-class Shelf;
 class ShelfModel;
 }  // namespace ash
 
@@ -204,13 +202,6 @@
   BrowserShortcutLauncherItemController*
   GetBrowserShortcutLauncherItemController();
 
-  // Check if the shelf visibility (location, visibility) will change with a new
-  // user profile or not. However, since the full visibility calculation of the
-  // shelf cannot be performed here, this is only a probability used for
-  // animation predictions.
-  bool ShelfBoundsChangesProbablyWithUser(ash::Shelf* shelf,
-                                          const AccountId& account_id) const;
-
   // Called when the user profile is fully loaded and ready to switch to.
   void OnUserProfileReadyToSwitch(Profile* profile);
 
diff --git a/chrome/browser/ui/browser_live_tab_context.cc b/chrome/browser/ui/browser_live_tab_context.cc
index 26dc280..6268760e 100644
--- a/chrome/browser/ui/browser_live_tab_context.cc
+++ b/chrome/browser/ui/browser_live_tab_context.cc
@@ -29,7 +29,7 @@
   browser_->window()->Show();
 }
 
-const SessionID& BrowserLiveTabContext::GetSessionID() const {
+SessionID BrowserLiveTabContext::GetSessionID() const {
   return browser_->session_id();
 }
 
diff --git a/chrome/browser/ui/browser_live_tab_context.h b/chrome/browser/ui/browser_live_tab_context.h
index 8e7bf16..6d5b5ec 100644
--- a/chrome/browser/ui/browser_live_tab_context.h
+++ b/chrome/browser/ui/browser_live_tab_context.h
@@ -33,7 +33,7 @@
 
   // Overridden from LiveTabContext:
   void ShowBrowserWindow() override;
-  const SessionID& GetSessionID() const override;
+  SessionID GetSessionID() const override;
   int GetTabCount() const override;
   int GetSelectedIndex() const override;
   std::string GetAppName() const override;
diff --git a/chrome/browser/ui/sync/browser_synced_window_delegate.cc b/chrome/browser/ui/sync/browser_synced_window_delegate.cc
index 26f812a..d88aa37 100644
--- a/chrome/browser/ui/sync/browser_synced_window_delegate.cc
+++ b/chrome/browser/ui/sync/browser_synced_window_delegate.cc
@@ -34,7 +34,7 @@
       browser_->tab_strip_model()->GetWebContentsAt(index));
 }
 
-SessionID::id_type BrowserSyncedWindowDelegate::GetTabIdAt(int index) const {
+SessionID BrowserSyncedWindowDelegate::GetTabIdAt(int index) const {
   return GetTabAt(index)->GetSessionId();
 }
 
@@ -42,8 +42,8 @@
   return browser_->window() != NULL;
 }
 
-SessionID::id_type BrowserSyncedWindowDelegate::GetSessionId() const {
-  return browser_->session_id().id();
+SessionID BrowserSyncedWindowDelegate::GetSessionId() const {
+  return browser_->session_id();
 }
 
 int BrowserSyncedWindowDelegate::GetTabCount() const {
diff --git a/chrome/browser/ui/sync/browser_synced_window_delegate.h b/chrome/browser/ui/sync/browser_synced_window_delegate.h
index a75a817..ad68a11 100644
--- a/chrome/browser/ui/sync/browser_synced_window_delegate.h
+++ b/chrome/browser/ui/sync/browser_synced_window_delegate.h
@@ -25,7 +25,7 @@
 
   // SyncedWindowDelegate:
   bool HasWindow() const override;
-  SessionID::id_type GetSessionId() const override;
+  SessionID GetSessionId() const override;
   int GetTabCount() const override;
   int GetActiveIndex() const override;
   bool IsApp() const override;
@@ -33,7 +33,7 @@
   bool IsTypePopup() const override;
   bool IsTabPinned(const sync_sessions::SyncedTabDelegate* tab) const override;
   sync_sessions::SyncedTabDelegate* GetTabAt(int index) const override;
-  SessionID::id_type GetTabIdAt(int index) const override;
+  SessionID GetTabIdAt(int index) const override;
   bool IsSessionRestoreInProgress() const override;
   bool ShouldSync() const override;
 
diff --git a/chrome/browser/ui/sync/browser_synced_window_delegates_getter.cc b/chrome/browser/ui/sync/browser_synced_window_delegates_getter.cc
index b43e07b..0963c3b 100644
--- a/chrome/browser/ui/sync/browser_synced_window_delegates_getter.cc
+++ b/chrome/browser/ui/sync/browser_synced_window_delegates_getter.cc
@@ -30,8 +30,8 @@
 }
 
 const sync_sessions::SyncedWindowDelegate*
-BrowserSyncedWindowDelegatesGetter::FindById(SessionID::id_type id) {
-  Browser* browser = chrome::FindBrowserWithID(id);
+BrowserSyncedWindowDelegatesGetter::FindById(SessionID id) {
+  Browser* browser = chrome::FindBrowserWithID(id.id());
   return (browser != nullptr) ? browser->synced_window_delegate() : nullptr;
 }
 
diff --git a/chrome/browser/ui/sync/browser_synced_window_delegates_getter.h b/chrome/browser/ui/sync/browser_synced_window_delegates_getter.h
index a8fcbdf..c10a94f 100644
--- a/chrome/browser/ui/sync/browser_synced_window_delegates_getter.h
+++ b/chrome/browser/ui/sync/browser_synced_window_delegates_getter.h
@@ -24,8 +24,7 @@
 
   // SyncedWindowDelegatesGetter implementation
   SyncedWindowDelegateMap GetSyncedWindowDelegates() override;
-  const sync_sessions::SyncedWindowDelegate* FindById(
-      SessionID::id_type id) override;
+  const sync_sessions::SyncedWindowDelegate* FindById(SessionID id) override;
 
  private:
   Profile* const profile_;
diff --git a/chrome/browser/ui/sync/tab_contents_synced_tab_delegate.cc b/chrome/browser/ui/sync/tab_contents_synced_tab_delegate.cc
index 3a7ec5e..d375597 100644
--- a/chrome/browser/ui/sync/tab_contents_synced_tab_delegate.cc
+++ b/chrome/browser/ui/sync/tab_contents_synced_tab_delegate.cc
@@ -54,12 +54,12 @@
 
 TabContentsSyncedTabDelegate::~TabContentsSyncedTabDelegate() {}
 
-SessionID::id_type TabContentsSyncedTabDelegate::GetWindowId() const {
-  return SessionTabHelper::FromWebContents(web_contents_)->window_id().id();
+SessionID TabContentsSyncedTabDelegate::GetWindowId() const {
+  return SessionTabHelper::FromWebContents(web_contents_)->window_id();
 }
 
-SessionID::id_type TabContentsSyncedTabDelegate::GetSessionId() const {
-  return SessionTabHelper::FromWebContents(web_contents_)->session_id().id();
+SessionID TabContentsSyncedTabDelegate::GetSessionId() const {
+  return SessionTabHelper::FromWebContents(web_contents_)->session_id();
 }
 
 bool TabContentsSyncedTabDelegate::IsBeingDestroyed() const {
@@ -179,7 +179,7 @@
   return false;
 }
 
-SessionID::id_type TabContentsSyncedTabDelegate::GetSourceTabID() const {
+SessionID TabContentsSyncedTabDelegate::GetSourceTabID() const {
   sync_sessions::SyncSessionsRouterTabHelper* helper =
       sync_sessions::SyncSessionsRouterTabHelper::FromWebContents(
           web_contents_);
diff --git a/chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h b/chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h
index 79ddf689..053e949 100644
--- a/chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h
+++ b/chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h
@@ -26,8 +26,8 @@
   ~TabContentsSyncedTabDelegate() override;
 
   // SyncedTabDelegate:
-  SessionID::id_type GetWindowId() const override;
-  SessionID::id_type GetSessionId() const override;
+  SessionID GetWindowId() const override;
+  SessionID GetSessionId() const override;
   bool IsBeingDestroyed() const override;
   std::string GetExtensionAppId() const override;
   bool IsInitialBlankNavigation() const override;
@@ -46,7 +46,7 @@
   int GetSyncId() const override;
   void SetSyncId(int sync_id) override;
   bool ShouldSync(sync_sessions::SyncSessionsClient* sessions_client) override;
-  SessionID::id_type GetSourceTabID() const override;
+  SessionID GetSourceTabID() const override;
 
  private:
   explicit TabContentsSyncedTabDelegate(content::WebContents* web_contents);
diff --git a/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc b/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc
index d016e94e..06a4baf 100644
--- a/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc
+++ b/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc
@@ -328,7 +328,9 @@
       if (!open_tabs)
         return;
       const sessions::SessionTab* tab;
-      if (!open_tabs->GetForeignTab(item.session_tag, item.tab_id, &tab))
+      if (!open_tabs->GetForeignTab(item.session_tag,
+                                    SessionID::FromSerializedValue(item.tab_id),
+                                    &tab))
         return;
       if (tab->navigations.empty())
         return;
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash_browsertest.cc b/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash_browsertest.cc
index 67f14a4..1be9397 100644
--- a/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash_browsertest.cc
+++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash_browsertest.cc
@@ -119,11 +119,10 @@
   ~TouchOptimizedUiParamTest() override = default;
 
   void SetUpCommandLine(base::CommandLine* command_line) override {
-    if (GetParam()) {
-      command_line->AppendSwitchASCII(
-          switches::kTopChromeMD, switches::kTopChromeMDMaterialTouchOptimized);
-    }
-
+    command_line->AppendSwitchASCII(
+        switches::kTopChromeMD,
+        GetParam() ? switches::kTopChromeMDMaterialTouchOptimized
+                   : switches::kTopChromeMDMaterial);
     BaseTest::SetUpCommandLine(command_line);
   }
 
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index a41b43846..c21ec76 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -157,7 +157,8 @@
       browser_(browser),
       delegate_(delegate),
       is_popup_mode_(is_popup_mode),
-      tint_(GetTintForProfile(profile)) {
+      tint_(GetTintForProfile(profile)),
+      popup_observer_(this) {
   edit_bookmarks_enabled_.Init(
       bookmarks::prefs::kEditBookmarksEnabled, profile->GetPrefs(),
       base::Bind(&LocationBarView::UpdateWithoutTabRestore,
@@ -201,6 +202,9 @@
   omnibox_view_->Init();
   AddChildView(omnibox_view_);
 
+  RefreshBackground();
+  popup_observer_.Add(omnibox_view_->model()->popup_model());
+
   // Initialize the inline autocomplete view which is visible only when IME is
   // turned on.  Use the same font with the omnibox and highlighted background.
   ime_inline_autocomplete_view_ =
@@ -589,17 +593,14 @@
 }
 
 void LocationBarView::OnNativeThemeChanged(const ui::NativeTheme* theme) {
+  // ToolbarView::Init() adds |this| to the view hierarchy before initializing,
+  // which will trigger an early theme change.
+  if (!IsInitialized())
+    return;
+
+  RefreshBackground();
   RefreshLocationIcon();
   RefreshClearAllButtonIcon();
-  if (is_popup_mode_) {
-    SetBackground(views::CreateSolidBackground(
-        GetColor(OmniboxPart::LOCATION_BAR_BACKGROUND)));
-  } else {
-    // This border color will be blended on top of the toolbar (which may use an
-    // image in the case of themes).
-    SetBackground(std::make_unique<BackgroundWith1PxBorder>(
-        GetColor(OmniboxPart::LOCATION_BAR_BACKGROUND), GetBorderColor()));
-  }
   SchedulePaint();
 }
 
@@ -733,12 +734,29 @@
              : BackgroundWith1PxBorder::kLocationBarBorderThicknessDip;
 }
 
-void LocationBarView::RefreshLocationIcon() {
-  // |omnibox_view_| may not be ready yet if Init() has not been called. The
-  // icon will be set soon by OnChanged().
-  if (!omnibox_view_)
-    return;
+void LocationBarView::RefreshBackground() {
+  SkColor background_color = GetColor(OmniboxPart::LOCATION_BAR_BACKGROUND);
+  SkColor border_color = GetBorderColor();
 
+  // When the omnibox dropdown is open, match its color.
+  if (InTouchableMode() && GetOmniboxPopupView()->IsOpen()) {
+    background_color = border_color = GetColor(OmniboxPart::RESULTS_BACKGROUND);
+  }
+
+  if (is_popup_mode_) {
+    SetBackground(views::CreateSolidBackground(background_color));
+  } else {
+    SetBackground(std::make_unique<BackgroundWith1PxBorder>(background_color,
+                                                            border_color));
+  }
+
+  // Keep the views::Textfield in sync. It needs an opaque background to
+  // correctly enable subpixel AA.
+  omnibox_view_->SetBackgroundColor(background_color);
+  omnibox_view_->EmphasizeURLComponents();
+}
+
+void LocationBarView::RefreshLocationIcon() {
   security_state::SecurityLevel security_level =
       GetToolbarModel()->GetSecurityLevel(false);
   location_icon_view_->SetImage(gfx::CreateVectorIcon(
@@ -822,9 +840,6 @@
 }
 
 void LocationBarView::RefreshClearAllButtonIcon() {
-  if (!clear_all_button_)
-    return;
-
   const gfx::VectorIcon& icon =
       InTouchableMode() ? omnibox::kTouchableClearIcon : kTabCloseNormalIcon;
   SetImageFromVectorIcon(clear_all_button_, icon,
@@ -880,6 +895,11 @@
          level == SecurityLevel::HTTP_SHOW_WARNING;
 }
 
+OmniboxPopupView* LocationBarView::GetOmniboxPopupView() {
+  DCHECK(IsInitialized());
+  return omnibox_view_->model()->popup_model()->view();
+}
+
 ////////////////////////////////////////////////////////////////////////////////
 // LocationBarView, private LocationBar implementation:
 
@@ -1008,7 +1028,7 @@
 }
 
 void LocationBarView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
-  OmniboxPopupView* popup = omnibox_view_->model()->popup_model()->view();
+  OmniboxPopupView* popup = GetOmniboxPopupView();
   if (popup->IsOpen())
     popup->UpdatePopupAppearance();
 }
@@ -1106,6 +1126,13 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
+// LocationBarView, private OmniboxPopupModelObserver implementation:
+
+void LocationBarView::OnOmniboxPopupShownOrHidden() {
+  RefreshBackground();
+}
+
+////////////////////////////////////////////////////////////////////////////////
 // LocationBarView, private static methods:
 
 // static
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.h b/chrome/browser/ui/views/location_bar/location_bar_view.h
index 0ea3a232..5cb47b66 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.h
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.h
@@ -13,6 +13,7 @@
 #include "base/compiler_specific.h"
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
+#include "base/scoped_observer.h"
 #include "chrome/browser/extensions/extension_context_menu_model.h"
 #include "chrome/browser/ui/location_bar/location_bar.h"
 #include "chrome/browser/ui/omnibox/chrome_omnibox_edit_controller.h"
@@ -22,6 +23,7 @@
 #include "chrome/browser/ui/views/location_bar/bubble_icon_view.h"
 #include "chrome/browser/ui/views/location_bar/content_setting_image_view.h"
 #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h"
+#include "components/omnibox/browser/omnibox_popup_model_observer.h"
 #include "components/prefs/pref_member.h"
 #include "components/security_state/core/security_state.h"
 #include "components/zoom/zoom_event_manager_observer.h"
@@ -41,6 +43,8 @@
 class LocationIconView;
 class ManagePasswordsIconViews;
 enum class OmniboxPart;
+class OmniboxPopupModel;
+class OmniboxPopupView;
 enum class OmniboxTint;
 class Profile;
 class SelectedKeywordView;
@@ -75,7 +79,8 @@
                         public zoom::ZoomEventManagerObserver,
                         public views::ButtonListener,
                         public ContentSettingImageView::Delegate,
-                        public BubbleIconView::Delegate {
+                        public BubbleIconView::Delegate,
+                        public OmniboxPopupModelObserver {
  public:
   class Delegate {
    public:
@@ -266,6 +271,9 @@
   // Returns the thickness of any visible edge, in pixels.
   int GetHorizontalEdgeThickness() const;
 
+  // Updates the background on a theme change, or dropdown state change.
+  void RefreshBackground();
+
   // Updates |location_icon_view_| based on the current state and theme.
   void RefreshLocationIcon();
 
@@ -307,6 +315,9 @@
   // Returns true if the location icon text should be animated.
   bool ShouldAnimateLocationIconTextVisibilityChange() const;
 
+  // Gets the OmniboxPopupView associated with the model in |omnibox_view_|.
+  OmniboxPopupView* GetOmniboxPopupView();
+
   // LocationBar:
   GURL GetDestinationURL() const override;
   WindowOpenDisposition GetWindowOpenDisposition() const override;
@@ -356,6 +367,9 @@
   // DropdownBarHostDelegate:
   void SetFocusAndSelection(bool select_all) override;
 
+  // OmniboxPopupModelObserver:
+  void OnOmniboxPopupShownOrHidden() override;
+
   // Returns the total amount of space reserved above or below the content,
   // which is the vertical edge thickness plus the padding next to it.
   static int GetTotalVerticalPadding();
@@ -448,6 +462,8 @@
   security_state::SecurityLevel last_update_security_level_ =
       security_state::NONE;
 
+  ScopedObserver<OmniboxPopupModel, LocationBarView> popup_observer_;
+
   DISALLOW_COPY_AND_ASSIGN(LocationBarView);
 };
 
diff --git a/chrome/browser/ui/views/omnibox/omnibox_popup_contents_view_browsertest.cc b/chrome/browser/ui/views/omnibox/omnibox_popup_contents_view_browsertest.cc
index 4c9cb43..744f137 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_popup_contents_view_browsertest.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_popup_contents_view_browsertest.cc
@@ -114,6 +114,8 @@
   void SetUpCommandLine(base::CommandLine* command_line) override {
     switch (GetParam()) {
       case ROUNDED:
+        // Set --top-chrome-md=material-touch-optimized to enable the ROUNDED
+        // style (which is the only supported style in that mode).
         command_line->AppendSwitchASCII(
             switches::kTopChromeMD,
             switches::kTopChromeMDMaterialTouchOptimized);
@@ -121,8 +123,12 @@
       case NARROW:
         feature_list_.InitAndEnableFeature(
             omnibox::kUIExperimentNarrowDropdown);
-        break;
+        FALLTHROUGH;
       default:
+        // Cater for the touch-optimized UI being enabled by default by always
+        // setting --top-chrome-md=material (the current default).
+        command_line->AppendSwitchASCII(switches::kTopChromeMD,
+                                        switches::kTopChromeMDMaterial);
         break;
     }
   }
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
index 18a35fe..cbce85f 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
@@ -214,6 +214,20 @@
   web_contents->SetUserData(OmniboxState::kKey, nullptr);
 }
 
+void OmniboxViewViews::EmphasizeURLComponents() {
+  if (!location_bar_view_)
+    return;
+
+  // If the current contents is a URL, turn on special URL rendering mode in
+  // RenderText.
+  bool text_is_url = model()->CurrentTextIsURL();
+  GetRenderText()->SetDirectionalityMode(
+      text_is_url ? gfx::DIRECTIONALITY_AS_URL : gfx::DIRECTIONALITY_FROM_TEXT);
+  SetStyle(gfx::STRIKE, false);
+  UpdateTextStyle(text(), text_is_url,
+                  model()->client()->GetSchemeClassifier());
+}
+
 void OmniboxViewViews::Update() {
   const security_state::SecurityLevel old_security_level = security_level_;
   UpdateSecurityLevel();
@@ -297,15 +311,6 @@
       GetPreferredSize().height());
 }
 
-void OmniboxViewViews::OnNativeThemeChanged(const ui::NativeTheme* theme) {
-  views::Textfield::OnNativeThemeChanged(theme);
-  if (location_bar_view_) {
-    SetBackgroundColor(
-        location_bar_view_->GetColor(OmniboxPart::LOCATION_BAR_BACKGROUND));
-  }
-  EmphasizeURLComponents();
-}
-
 void OmniboxViewViews::OnPaint(gfx::Canvas* canvas) {
   if (latency_histogram_state_ == CHAR_TYPED) {
     DCHECK(!insert_char_time_.is_null());
@@ -659,20 +664,6 @@
     ApplyStyle(gfx::STRIKE, true, range);
 }
 
-void OmniboxViewViews::EmphasizeURLComponents() {
-  if (!location_bar_view_)
-    return;
-
-  // If the current contents is a URL, turn on special URL rendering mode in
-  // RenderText.
-  bool text_is_url = model()->CurrentTextIsURL();
-  GetRenderText()->SetDirectionalityMode(
-      text_is_url ? gfx::DIRECTIONALITY_AS_URL : gfx::DIRECTIONALITY_FROM_TEXT);
-  SetStyle(gfx::STRIKE, false);
-  UpdateTextStyle(text(), text_is_url,
-                  model()->client()->GetSchemeClassifier());
-}
-
 bool OmniboxViewViews::IsItemForCommandIdDynamic(int command_id) const {
   return command_id == IDS_PASTE_AND_GO;
 }
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.h b/chrome/browser/ui/views/omnibox/omnibox_view_views.h
index 4319ffc..ab4c220 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.h
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.h
@@ -85,6 +85,7 @@
   void ResetTabState(content::WebContents* web_contents);
 
   // OmniboxView:
+  void EmphasizeURLComponents() override;
   void Update() override;
   base::string16 GetText() const override;
   using OmniboxView::SetUserText;
@@ -102,7 +103,6 @@
   // views::Textfield:
   gfx::Size GetMinimumSize() const override;
   void OnPaint(gfx::Canvas* canvas) override;
-  void OnNativeThemeChanged(const ui::NativeTheme* theme) override;
   void ExecuteCommand(int command_id, int event_flags) override;
   ui::TextInputType GetTextInputType() const override;
   void AddedToWidget() override;
@@ -174,7 +174,6 @@
   bool IsImeShowingPopup() const override;
   void ShowImeIfNeeded() override;
   int GetOmniboxTextLength() const override;
-  void EmphasizeURLComponents() override;
   void SetEmphasis(bool emphasize, const gfx::Range& range) override;
   void UpdateSchemeStyle(const gfx::Range& range) override;
 
diff --git a/chrome/browser/ui/views/profiles/user_manager_view.cc b/chrome/browser/ui/views/profiles/user_manager_view.cc
index 674bdb2..5d42f49 100644
--- a/chrome/browser/ui/views/profiles/user_manager_view.cc
+++ b/chrome/browser/ui/views/profiles/user_manager_view.cc
@@ -50,9 +50,9 @@
 
 // An open User Manager window. There can only be one open at a time. This
 // is reset to NULL when the window is closed.
-UserManagerView* instance_ = nullptr;
-base::Closure* user_manager_shown_callback_for_testing_ = nullptr;
-bool instance_under_construction_ = false;
+UserManagerView* g_user_manager_view = nullptr;
+base::Closure* g_user_manager_shown_callback_for_testing = nullptr;
+bool g_is_user_manager_view_under_construction = false;
 }  // namespace
 
 // Delegate---------------------------------------------------------------
@@ -146,16 +146,16 @@
   DCHECK(profile_path_to_focus != ProfileManager::GetGuestProfilePath());
 
   ProfileMetrics::LogProfileOpenMethod(ProfileMetrics::OPEN_USER_MANAGER);
-  if (instance_) {
+  if (g_user_manager_view) {
     // If we are showing the User Manager after locking a profile, change the
     // active profile to Guest.
     profiles::SetActiveProfileToGuestIfLocked();
 
     // Note the time we started opening the User Manager.
-    instance_->set_user_manager_started_showing(base::Time::Now());
+    g_user_manager_view->set_user_manager_started_showing(base::Time::Now());
 
     // If there's a user manager window open already, just activate it.
-    instance_->GetWidget()->Activate();
+    g_user_manager_view->GetWidget()->Activate();
     return;
   }
 
@@ -163,7 +163,7 @@
   // Because creating the System profile is asynchronous, it's possible for
   // there to then be multiple pending operations and eventually multiple
   // User Managers.
-  if (instance_under_construction_)
+  if (g_is_user_manager_view_under_construction)
     return;
 
   // Create the system profile, if necessary, and open the user manager
@@ -175,7 +175,7 @@
       base::Bind(&UserManagerView::OnSystemProfileCreated,
                  base::Passed(base::WrapUnique(user_manager)),
                  base::Owned(new base::AutoReset<bool>(
-                     &instance_under_construction_, true))));
+                     &g_is_user_manager_view_under_construction, true))));
 }
 
 // static
@@ -185,8 +185,8 @@
     return UserManager::HideCocoa();
   }
 #endif
-  if (instance_)
-    instance_->GetWidget()->Close();
+  if (g_user_manager_view)
+    g_user_manager_view->GetWidget()->Close();
 }
 
 // static
@@ -197,7 +197,8 @@
   }
 #endif
 
-  return instance_ ? instance_->GetWidget()->IsActive() : false;
+  return g_user_manager_view ? g_user_manager_view->GetWidget()->IsActive()
+                             : false;
 }
 
 // static
@@ -208,14 +209,14 @@
   }
 #endif
 
-  if (instance_) {
-    instance_->LogTimeToOpen();
-    if (user_manager_shown_callback_for_testing_) {
-      if (!user_manager_shown_callback_for_testing_->is_null())
-        user_manager_shown_callback_for_testing_->Run();
+  if (g_user_manager_view) {
+    g_user_manager_view->LogTimeToOpen();
+    if (g_user_manager_shown_callback_for_testing) {
+      if (!g_user_manager_shown_callback_for_testing->is_null())
+        g_user_manager_shown_callback_for_testing->Run();
 
-      delete user_manager_shown_callback_for_testing_;
-      user_manager_shown_callback_for_testing_ = nullptr;
+      delete g_user_manager_shown_callback_for_testing;
+      g_user_manager_shown_callback_for_testing = nullptr;
     }
   }
 }
@@ -228,8 +229,8 @@
     return UserManager::AddOnUserManagerShownCallbackForTestingCocoa(callback);
   }
 #endif
-  DCHECK(!user_manager_shown_callback_for_testing_);
-  user_manager_shown_callback_for_testing_ = new base::Closure(callback);
+  DCHECK(!g_user_manager_shown_callback_for_testing);
+  g_user_manager_shown_callback_for_testing = new base::Closure(callback);
 }
 
 // static
@@ -240,7 +241,7 @@
   }
 #endif
 
-  return instance_->GetSigninProfilePath();
+  return g_user_manager_view->GetSigninProfilePath();
 }
 
 // UserManagerProfileDialog
@@ -275,8 +276,8 @@
   // knows which profile to load and update the credentials.
   GURL url = signin::GetReauthURLWithEmailForDialog(
       signin_metrics::AccessPoint::ACCESS_POINT_USER_MANAGER, reason, email);
-  instance_->SetSigninProfilePath(profile_path);
-  instance_->ShowDialog(browser_context, email, url);
+  g_user_manager_view->SetSigninProfilePath(profile_path);
+  g_user_manager_view->ShowDialog(browser_context, email, url);
 }
 
 // static
@@ -296,10 +297,10 @@
   DCHECK(reason ==
              signin_metrics::Reason::REASON_FORCED_SIGNIN_PRIMARY_ACCOUNT ||
          reason == signin_metrics::Reason::REASON_SIGNIN_PRIMARY_ACCOUNT);
-  instance_->SetSigninProfilePath(profile_path);
+  g_user_manager_view->SetSigninProfilePath(profile_path);
   GURL url = signin::GetPromoURLForDialog(
       signin_metrics::AccessPoint::ACCESS_POINT_USER_MANAGER, reason, true);
-  instance_->ShowDialog(browser_context, std::string(), url);
+  g_user_manager_view->ShowDialog(browser_context, std::string(), url);
 }
 
 void UserManagerProfileDialog::ShowDialogAndDisplayErrorMessage(
@@ -316,9 +317,9 @@
   // The error occurred before sign in happened, reset |signin_profile_path_|
   // so that the error page will show the error message that is assoicated with
   // the system profile.
-  instance_->SetSigninProfilePath(base::FilePath());
-  instance_->ShowDialog(browser_context, std::string(),
-                        GURL(chrome::kChromeUISigninErrorURL));
+  g_user_manager_view->SetSigninProfilePath(base::FilePath());
+  g_user_manager_view->ShowDialog(browser_context, std::string(),
+                                  GURL(chrome::kChromeUISigninErrorURL));
 }
 
 // static
@@ -330,8 +331,8 @@
 #endif
 
   // This method should only be called if the user manager is already showing.
-  DCHECK(instance_);
-  instance_->DisplayErrorMessage();
+  DCHECK(g_user_manager_view);
+  g_user_manager_view->DisplayErrorMessage();
 }
 
 // static
@@ -342,8 +343,8 @@
   }
 #endif
 
-  if (instance_ && instance_->GetWidget()->IsVisible())
-    instance_->HideDialog();
+  if (g_user_manager_view && g_user_manager_view->GetWidget()->IsVisible())
+    g_user_manager_view->HideDialog();
 }
 
 // UserManagerView -------------------------------------------------------------
@@ -371,9 +372,10 @@
   // active profile to Guest.
   profiles::SetActiveProfileToGuestIfLocked();
 
-  DCHECK(!instance_);
-  instance_ = instance.release();  // |instance_| takes over ownership.
-  instance_->Init(system_profile, GURL(url));
+  DCHECK(!g_user_manager_view);
+  g_user_manager_view =
+      instance.release();  // |g_user_manager_view| takes over ownership.
+  g_user_manager_view->Init(system_profile, GURL(url));
 }
 
 void UserManagerView::ShowDialog(content::BrowserContext* browser_context,
@@ -384,7 +386,7 @@
   // WebView's lifetime is managed by the delegate.
   delegate_ = new UserManagerProfileDialogDelegate(
       this, new views::WebView(browser_context), email, url);
-  gfx::NativeView parent = instance_->GetWidget()->GetNativeView();
+  gfx::NativeView parent = g_user_manager_view->GetWidget()->GetNativeView();
   views::DialogDelegate::CreateDialogWidget(delegate_, nullptr, parent);
   delegate_->GetWidget()->Show();
 }
@@ -516,8 +518,8 @@
   // Now that the window is closed, we can allow a new one to be opened.
   // (WindowClosing comes in asynchronously from the call to Close() and we
   // may have already opened a new instance).
-  if (instance_ == this)
-    instance_ = NULL;
+  if (g_user_manager_view == this)
+    g_user_manager_view = NULL;
 }
 
 bool UserManagerView::ShouldUseCustomFrame() const {
diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller.cc b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
index 2d0c9af..5dfbeb0 100644
--- a/chrome/browser/ui/views/tabs/tab_drag_controller.cc
+++ b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
@@ -59,7 +59,7 @@
 using content::WebContents;
 
 // If non-null there is a drag underway.
-static TabDragController* instance_ = NULL;
+static TabDragController* g_tab_drag_controller = NULL;
 
 namespace {
 
@@ -219,12 +219,12 @@
       attach_index_(-1),
       window_finder_(std::make_unique<WindowFinder>()),
       weak_factory_(this) {
-  instance_ = this;
+  g_tab_drag_controller = this;
 }
 
 TabDragController::~TabDragController() {
-  if (instance_ == this)
-    instance_ = NULL;
+  if (g_tab_drag_controller == this)
+    g_tab_drag_controller = NULL;
 
   if (move_loop_widget_) {
     if (added_observer_to_move_loop_widget_)
@@ -308,13 +308,13 @@
 
 // static
 bool TabDragController::IsAttachedTo(const TabStrip* tab_strip) {
-  return (instance_ && instance_->active() &&
-          instance_->attached_tabstrip() == tab_strip);
+  return (g_tab_drag_controller && g_tab_drag_controller->active() &&
+          g_tab_drag_controller->attached_tabstrip() == tab_strip);
 }
 
 // static
 bool TabDragController::IsActive() {
-  return instance_ && instance_->active();
+  return g_tab_drag_controller && g_tab_drag_controller->active();
 }
 
 void TabDragController::SetMoveBehavior(MoveBehavior behavior) {
diff --git a/chrome/browser/ui/webui/foreign_session_handler.cc b/chrome/browser/ui/webui/foreign_session_handler.cc
index 94585185d..f42df1d 100644
--- a/chrome/browser/ui/webui/foreign_session_handler.cc
+++ b/chrome/browser/ui/webui/foreign_session_handler.cc
@@ -178,7 +178,8 @@
   // We don't actually care about |window_num|, this is just a sanity check.
   DCHECK_LT(kInvalidId, window_num);
   const ::sessions::SessionTab* tab;
-  if (!open_tabs->GetForeignTab(session_string_value, tab_id, &tab)) {
+  if (!open_tabs->GetForeignTab(session_string_value,
+                                SessionID::FromSerializedValue(tab_id), &tab)) {
     LOG(ERROR) << "Failed to load foreign tab.";
     return;
   }
diff --git a/chrome/common/extensions/api/BUILD.gn b/chrome/common/extensions/api/BUILD.gn
index 2be0fae7..7714a887 100644
--- a/chrome/common/extensions/api/BUILD.gn
+++ b/chrome/common/extensions/api/BUILD.gn
@@ -36,7 +36,6 @@
   "debugger.json",
   "desktop_capture.json",
   "developer_private.idl",
-  "dial.idl",
   "downloads.idl",
   "downloads_internal.idl",
   "font_settings.json",
diff --git a/chrome/common/extensions/api/_api_features.json b/chrome/common/extensions/api/_api_features.json
index 48602ef..7081605 100644
--- a/chrome/common/extensions/api/_api_features.json
+++ b/chrome/common/extensions/api/_api_features.json
@@ -348,10 +348,6 @@
     "dependencies": ["manifest:devtools_page"],
     "contexts": ["blessed_extension"]
   },
-  "dial": {
-    "dependencies": ["permission:dial"],
-    "contexts": ["blessed_extension"]
-  },
   "downloads": {
     "dependencies": ["permission:downloads"],
     "contexts": ["blessed_extension"]
diff --git a/chrome/common/extensions/api/_permission_features.json b/chrome/common/extensions/api/_permission_features.json
index 59d13d4..c2167a0 100644
--- a/chrome/common/extensions/api/_permission_features.json
+++ b/chrome/common/extensions/api/_permission_features.json
@@ -256,14 +256,6 @@
     "channel": "stable",
     "extension_types": ["extension"]
   },
-  "dial": {
-    "channel": "stable",
-    "extension_types": ["extension"],
-    "whitelist": [
-      "63ED55E43214C211F82122ED56407FF1A807F2A3",  // Media Router Dev
-      "226CF815E39A363090A1E547D53063472B8279FA"   // Media Router Stable
-    ]
-  },
   "easyUnlockPrivate": {
     "channel": "stable",
     "extension_types": ["platform_app"],
diff --git a/chrome/common/extensions/api/dial.idl b/chrome/common/extensions/api/dial.idl
deleted file mode 100644
index 3df796f..0000000
--- a/chrome/common/extensions/api/dial.idl
+++ /dev/null
@@ -1,91 +0,0 @@
-// Copyright (c) 2012 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.
-
-// Use the <code>chrome.dial</code> API to discover devices that support DIAL.
-// Protocol specification: http://www.dial-multiscreen.org/
-namespace dial {
-
-  // Represents a unique device that responded to a DIAL discovery request.
-  dictionary DialDevice {
-
-    // A label identifying the device within this instance of the browser.
-    // Not guaranteed to persist beyond browser instances.
-    DOMString deviceLabel;
-
-    // A URL pointing to the device description resource for the device.
-    DOMString deviceDescriptionUrl;
-
-    // The uPnP configuration ID reported by the device.  Corresponds to the
-    // CONFIGID.UPNP.ORG header in the M-SEARCH response.
-    long? configId;
-  };
-
-  // Represents a device description resource successfully fetched from a
-  // DIAL device.
-  dictionary DialDeviceDescription {
-
-    // The label of the device that the description was fetched for.
-    DOMString deviceLabel;
-
-    // The contents of the Application-URL header in the response.
-    DOMString appUrl;
-
-    // The content of the response body.  This will be an XML document
-    // (hopefully) conforming to section 2.3 of the UPnP spec.
-    DOMString deviceDescription;
-  };
-
-  enum DialErrorCode {
-    no_listeners,
-    no_valid_network_interfaces,
-    network_disconnected,
-    cellular_network,
-    socket_error,
-    unknown
-  };
-
-  dictionary DialError {
-    DialErrorCode code;
-  };
-
-  callback BooleanCallback = void (boolean result);
-  callback DeviceDescriptionCallback = void (DialDeviceDescription result);
-
-  interface Functions {
-
-    // Requests that DIAL discovery happen immediately.  The request may not be
-    // honored as discovery may already be happening in the background.  The
-    // callback is invoked with |true| if discovery was initiated or |false|
-    // otherwise.
-    static void discoverNow(BooleanCallback callback);
-
-    // Fetches the device description for the DIAL device identified by
-    // |deviceLabel|.  If successful, the callback is invoked with a
-    // DialDeviceDescription containing the content of the device description.
-    //
-    // If unsuccessful, callback is invoked with |null| and lastError is set to
-    // an error message.  If the error occurred during the HTTP fetch itself,
-    // the message will begin with "HTTP XXX:" where XXX is the HTTP result
-    // code.
-    static void fetchDeviceDescription(DOMString deviceLabel,
-                                       DeviceDescriptionCallback callback);
-  };
-
-  interface Events {
-
-    // Event fired to inform clients of the current, complete set of responsive
-    // devices.  Clients should only need to store the list from the most recent
-    // event.  May be fired in response to multiple circumstances:
-    //
-    // (1) The DIAL service refreshed its device list through periodic polling.
-    // (2) A client invoked discoverNow().
-    // (3) An event happened that should invalidate the device list
-    //     (e.g., a network interface went offline), in which case it is fired
-    //     with an empty array.
-    static void onDeviceList(DialDevice[] result);
-
-    // Event fired to inform clients on errors during device discovery.
-    static void onError(DialError error);
-  };
-};
diff --git a/chrome/common/extensions/permissions/chrome_api_permissions.cc b/chrome/common/extensions/permissions/chrome_api_permissions.cc
index 59cc7e1e..dab82ec5 100644
--- a/chrome/common/extensions/permissions/chrome_api_permissions.cc
+++ b/chrome/common/extensions/permissions/chrome_api_permissions.cc
@@ -117,7 +117,6 @@
        APIPermissionInfo::kFlagCannotBeOptional},
       {APIPermission::kDeveloperPrivate, "developerPrivate",
        APIPermissionInfo::kFlagCannotBeOptional},
-      {APIPermission::kDial, "dial", APIPermissionInfo::kFlagCannotBeOptional},
       {APIPermission::kDownloadsInternal, "downloadsInternal"},
       {APIPermission::kFileBrowserHandlerInternal, "fileBrowserHandlerInternal",
        APIPermissionInfo::kFlagCannotBeOptional},
diff --git a/chrome/common/extensions/permissions/permission_set_unittest.cc b/chrome/common/extensions/permissions/permission_set_unittest.cc
index e4f01497..410a845 100644
--- a/chrome/common/extensions/permissions/permission_set_unittest.cc
+++ b/chrome/common/extensions/permissions/permission_set_unittest.cc
@@ -812,7 +812,6 @@
   skip.insert(APIPermission::kCloudPrintPrivate);
   skip.insert(APIPermission::kCommandLinePrivate);
   skip.insert(APIPermission::kDeveloperPrivate);
-  skip.insert(APIPermission::kDial);
   skip.insert(APIPermission::kDownloadsInternal);
   skip.insert(APIPermission::kEasyUnlockPrivate);
   skip.insert(APIPermission::kEchoPrivate);
diff --git a/chrome/common/features.gni b/chrome/common/features.gni
index bfdee74e..2c6bb35 100644
--- a/chrome/common/features.gni
+++ b/chrome/common/features.gni
@@ -14,6 +14,7 @@
 import("//ppapi/buildflags/buildflags.gni")
 import("//printing/features/features.gni")
 import("//ui/base/ui_features.gni")
+import("//ui/webui/webui_features.gni")
 
 assert(!is_ios, "Chromium/iOS shouldn't use anything in //chrome")
 
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index 5e6ab026..a4a8fe3 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -1150,7 +1150,6 @@
         "../browser/extensions/api/declarative_net_request/declarative_net_request_browsertest.cc",
         "../browser/extensions/api/desktop_capture/desktop_capture_apitest.cc",
         "../browser/extensions/api/developer_private/developer_private_apitest.cc",
-        "../browser/extensions/api/dial/dial_apitest.cc",
         "../browser/extensions/api/downloads/downloads_api_browsertest.cc",
         "../browser/extensions/api/enterprise_device_attributes/enterprise_device_attributes_apitest.cc",
         "../browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_apitest_nss.cc",
diff --git a/chrome/test/chromedriver/logging.cc b/chrome/test/chromedriver/logging.cc
index b974ace..3f6b5d4 100644
--- a/chrome/test/chromedriver/logging.cc
+++ b/chrome/test/chromedriver/logging.cc
@@ -281,7 +281,8 @@
   }
 
   // Turn on VLOG for chromedriver. This is parsed during logging::InitLogging.
-  cmd_line->AppendSwitchASCII("vmodule", "*/chrome/test/chromedriver/*=3");
+  if (!cmd_line->HasSwitch("vmodule"))
+    cmd_line->AppendSwitchASCII("vmodule", "*/chrome/test/chromedriver/*=3");
 
   logging::SetMinLogLevel(logging::LOG_WARNING);
   logging::SetLogItems(false,   // enable_process_id
diff --git a/chrome/test/chromedriver/net/websocket.cc b/chrome/test/chromedriver/net/websocket.cc
index b24b43c..99de9c4f 100644
--- a/chrome/test/chromedriver/net/websocket.cc
+++ b/chrome/test/chromedriver/net/websocket.cc
@@ -99,11 +99,13 @@
   connect_callback_ = callback;
   int code = socket_->Connect(base::Bind(
       &WebSocket::OnSocketConnect, base::Unretained(this)));
+  VLOG(4) << "WebSocket::Connect code=" << net::ErrorToShortString(code);
   if (code != net::ERR_IO_PENDING)
     OnSocketConnect(code);
 }
 
 bool WebSocket::Send(const std::string& message) {
+  VLOG(4) << "WebSocket::Send " << message;
   CHECK(thread_checker_.CalledOnValidThread());
   if (state_ != OPEN)
     return false;
@@ -127,6 +129,9 @@
 }
 
 void WebSocket::OnSocketConnect(int code) {
+  VLOG(4) << "WebSocket::OnSocketConnect code="
+          << net::ErrorToShortString(code);
+
   if (code != net::OK) {
     VLOG(1) << "failed to connect to " << url_.HostNoBracketsPiece()
             << " (error " << code << ")";
@@ -148,6 +153,7 @@
       url_.path().c_str(),
       url_.host().c_str(),
       sec_key_.c_str());
+  VLOG(4) << "WebSocket::OnSocketConnect handshake\n" << handshake;
   Write(handshake);
   Read();
 }
@@ -201,6 +207,7 @@
 
 void WebSocket::OnRead(int code) {
   if (code <= 0) {
+    VLOG(4) << "WebSocket::OnRead error " << net::ErrorToShortString(code);
     Close(code ? code : net::ERR_FAILED);
     return;
   }
@@ -215,6 +222,7 @@
 }
 
 void WebSocket::OnReadDuringHandshake(const char* data, int len) {
+  VLOG(4) << "WebSocket::OnReadDuringHandshake\n" << std::string(data, len);
   handshake_response_ += std::string(data, len);
   int headers_end = net::HttpUtil::LocateEndOfHeaders(
       handshake_response_.data(), handshake_response_.size(), 0);
@@ -253,6 +261,7 @@
     if (buffer.get())
       next_message_ += std::string(buffer->data(), buffer->size());
     if (frame_chunks[i]->final_chunk) {
+      VLOG(4) << "WebSocket::OnReadDuringOpen " << next_message_;
       listener_->OnMessageReceived(next_message_);
       next_message_.clear();
     }
diff --git a/chrome/test/chromedriver/server/server.py b/chrome/test/chromedriver/server/server.py
index dc953962..51a1058 100644
--- a/chrome/test/chromedriver/server/server.py
+++ b/chrome/test/chromedriver/server/server.py
@@ -30,7 +30,8 @@
     if log_path:
       chromedriver_args.extend(['--log-path=%s' %log_path])
       if verbose:
-        chromedriver_args.extend(['--verbose'])
+        chromedriver_args.extend(['--verbose',
+                                  '--vmodule=*/chrome/test/chromedriver/*=4'])
     self._process = subprocess.Popen(chromedriver_args)
     self._url = 'http://127.0.0.1:%d' % port
     if self._process is None:
diff --git a/chrome/test/data/extensions/api_test/dial/experimental/device_list.html b/chrome/test/data/extensions/api_test/dial/experimental/device_list.html
deleted file mode 100644
index acde0f2..0000000
--- a/chrome/test/data/extensions/api_test/dial/experimental/device_list.html
+++ /dev/null
@@ -1 +0,0 @@
-<script src="device_list.js"></script>
\ No newline at end of file
diff --git a/chrome/test/data/extensions/api_test/dial/experimental/device_list.js b/chrome/test/data/extensions/api_test/dial/experimental/device_list.js
deleted file mode 100644
index b951b34..0000000
--- a/chrome/test/data/extensions/api_test/dial/experimental/device_list.js
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) 2012 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.
-
-// Array of each device list update.
-var devices = [];
-
-chrome.dial.onDeviceList.addListener(function(deviceList) {
-  if (deviceList.length == 0) {
-    // Empty list event fired by the registry when the listener is added
-    // (not by DialAPITest).
-    return;
-  }
-
-  var newDevices = [];
-  for (var i = 0; i < deviceList.length; ++i) {
-    newDevices.push(deviceList[i]);
-  }
-  devices.push(newDevices);
-
-  // After 3 events, let's verify if we have the right devices in each update.
-  if (devices.length == 3) {
-    // Make sure each update contained 1 more device than the previous.
-    for (var i = 0; i < devices.length; ++i) {
-      chrome.test.assertEq(i + 1, devices[i].length);
-    }
-
-    // Just check the first device in the first update and the last
-    // device in the last update.
-    // Not exposing the device id right now.
-    chrome.test.assertTrue(!('deviceId' in devices[0][0]));
-    chrome.test.assertEq("1", devices[0][0].deviceLabel);
-    chrome.test.assertEq("http://127.0.0.1/dd.xml",
-                         devices[0][0].deviceDescriptionUrl);
-
-    chrome.test.assertTrue(!('deviceId' in devices[2][2]));
-    chrome.test.assertEq("3", devices[2][2].deviceLabel);
-    chrome.test.assertEq("http://127.0.0.3/dd.xml",
-                         devices[2][2].deviceDescriptionUrl);
-
-    chrome.test.succeed();
-    return;
-  }
-});
-
-chrome.test.notifyPass();
\ No newline at end of file
diff --git a/chrome/test/data/extensions/api_test/dial/experimental/discovery.html b/chrome/test/data/extensions/api_test/dial/experimental/discovery.html
deleted file mode 100644
index 1b8a39a..0000000
--- a/chrome/test/data/extensions/api_test/dial/experimental/discovery.html
+++ /dev/null
@@ -1 +0,0 @@
-<script src="discovery.js"></script>
\ No newline at end of file
diff --git a/chrome/test/data/extensions/api_test/dial/experimental/discovery.js b/chrome/test/data/extensions/api_test/dial/experimental/discovery.js
deleted file mode 100644
index 429b9d1c..0000000
--- a/chrome/test/data/extensions/api_test/dial/experimental/discovery.js
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-onload = function() {
-  chrome.test.runTests([
-    function discoverySucceeds() {
-      var discoverNowCallback = function(result) {
-        chrome.test.assertNoLastError();
-        // The result may be true or false depending on whether periodic
-        // discovery is running at the same time.
-        // TODO(mfoltz): We may want to update the API to distinguish error cases
-        // from simultaneous discovery.
-        chrome.test.assertTrue(typeof(result) == 'boolean');
-        chrome.test.succeed();
-      };
-      chrome.dial.onDeviceList.addListener(function(deviceList) {});
-      chrome.dial.discoverNow(discoverNowCallback);
-    }
-  ]);
-};
\ No newline at end of file
diff --git a/chrome/test/data/extensions/api_test/dial/experimental/discovery_no_listeners.html b/chrome/test/data/extensions/api_test/dial/experimental/discovery_no_listeners.html
deleted file mode 100644
index 69751f4..0000000
--- a/chrome/test/data/extensions/api_test/dial/experimental/discovery_no_listeners.html
+++ /dev/null
@@ -1 +0,0 @@
-<script src="discovery_no_listeners.js"></script>
\ No newline at end of file
diff --git a/chrome/test/data/extensions/api_test/dial/experimental/discovery_no_listeners.js b/chrome/test/data/extensions/api_test/dial/experimental/discovery_no_listeners.js
deleted file mode 100644
index b0ad2ae..0000000
--- a/chrome/test/data/extensions/api_test/dial/experimental/discovery_no_listeners.js
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright (c) 2012 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.
-
-onload = function() {
-  chrome.test.runTests([
-    function discoverNowWithoutListeners() {
-      var discoverNowCallback = function(result) {
-        chrome.test.assertNoLastError();
-        chrome.test.assertTrue(typeof(result) == 'boolean');
-        if (!result) {
-          chrome.test.succeed();
-        } else {
-          chrome.test.fail();
-        }
-      };
-      chrome.dial.discoverNow(discoverNowCallback);
-    }
-  ]);
-};
\ No newline at end of file
diff --git a/chrome/test/data/extensions/api_test/dial/experimental/fetch_device_description.html b/chrome/test/data/extensions/api_test/dial/experimental/fetch_device_description.html
deleted file mode 100644
index 4df6187b..0000000
--- a/chrome/test/data/extensions/api_test/dial/experimental/fetch_device_description.html
+++ /dev/null
@@ -1 +0,0 @@
-<script src="fetch_device_description.js"></script>
diff --git a/chrome/test/data/extensions/api_test/dial/experimental/fetch_device_description.js b/chrome/test/data/extensions/api_test/dial/experimental/fetch_device_description.js
deleted file mode 100644
index 60792e2..0000000
--- a/chrome/test/data/extensions/api_test/dial/experimental/fetch_device_description.js
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) 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.
-
-onload = function() {
-  chrome.test.runTests([
-    function fetchDeviceDecription() {
-      const fetchDeviceDescriptionCallback = result => {
-        chrome.test.assertNoLastError();
-        chrome.test.assertEq('object', typeof(result));
-        chrome.test.assertEq('http://127.0.0.1/apps', result.appUrl);
-        chrome.test.assertEq('<xml>testDescription</xml>',
-                             result.deviceDescription);
-        chrome.test.succeed();
-      };
-      chrome.dial.fetchDeviceDescription('testDevice',
-                                         fetchDeviceDescriptionCallback);
-    },
-    function fetchDeviceDecriptionFails() {
-      const fetchDeviceDescriptionCallbackFails = result => {
-        chrome.test.assertEq(undefined, result);
-        chrome.test.assertLastError('Device not found');
-        chrome.test.succeed();
-      };
-      chrome.dial.fetchDeviceDescription('unknownDevice',
-                                         fetchDeviceDescriptionCallbackFails);
-    }
-    // TODO(mfoltz): Test other fetch errors
-  ]);
-};
diff --git a/chrome/test/data/extensions/api_test/dial/experimental/manifest.json b/chrome/test/data/extensions/api_test/dial/experimental/manifest.json
deleted file mode 100644
index e25979ea..0000000
--- a/chrome/test/data/extensions/api_test/dial/experimental/manifest.json
+++ /dev/null
@@ -1,8 +0,0 @@
- {
-  "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC8xv6iO+j4kzj1HiBL93+XVJH/CRyAQMUHS/Z0l8nCAzaAFkW/JsNwxJqQhrZspnxLqbQxNncXs6g6bsXAwKHiEs+LSs+bIv0Gc/2ycZdhXJ8GhEsSMakog5dpQd1681c2gLK/8CrAoewE/0GIKhaFcp7a2iZlGh4Am6fgMKy0iQIDAQAB",
-  "manifest_version": 2,
-  "name": "Test DIAL Extension",
-  "version": "1.0",
-  "description": "Test DIAL Extension",
-  "permissions": ["dial"]
-}
diff --git a/chrome/test/data/extensions/api_test/dial/experimental/on_error.html b/chrome/test/data/extensions/api_test/dial/experimental/on_error.html
deleted file mode 100644
index d376d61f..0000000
--- a/chrome/test/data/extensions/api_test/dial/experimental/on_error.html
+++ /dev/null
@@ -1 +0,0 @@
-<script src="on_error.js"></script>
\ No newline at end of file
diff --git a/chrome/test/data/extensions/api_test/dial/experimental/on_error.js b/chrome/test/data/extensions/api_test/dial/experimental/on_error.js
deleted file mode 100644
index acf8317..0000000
--- a/chrome/test/data/extensions/api_test/dial/experimental/on_error.js
+++ /dev/null
@@ -1,11 +0,0 @@
-chrome.test.runTests([
-  function noListeners() {
-    chrome.test.listenOnce(chrome.dial.onError, function(error) {
-      chrome.test.assertTrue(error.code == "no_listeners");
-    });
-    chrome.dial.discoverNow(function(result) {
-      chrome.test.assertTrue(!result);
-    });
-  }
-  // TODO(justinlin): Test other errors.
-]);
\ No newline at end of file
diff --git a/chrome/test/data/extensions/api_test/dial/whitelist/manifest.json b/chrome/test/data/extensions/api_test/dial/whitelist/manifest.json
deleted file mode 100644
index 82c7d2c2..0000000
--- a/chrome/test/data/extensions/api_test/dial/whitelist/manifest.json
+++ /dev/null
@@ -1,10 +0,0 @@
- {
-  "manifest_version": 2,
-  "name": "Test DIAL Whitelist",
-  "version": "1.0",
-  "description": "Tests DIAL Whitelist",
-  "background": {
-    "scripts": ["runtest.js"]
-  },
-  "permissions": ["dial"]
-}
diff --git a/chrome/test/data/extensions/api_test/dial/whitelist/runtest.js b/chrome/test/data/extensions/api_test/dial/whitelist/runtest.js
deleted file mode 100644
index 2b3b40d..0000000
--- a/chrome/test/data/extensions/api_test/dial/whitelist/runtest.js
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright (c) 2012 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.
-
-chrome.test.sendMessage('ready', function(message) {
-  chrome.test.runTests([
-    function testPermission() {
-      if (chrome.dial)
-        chrome.test.fail();
-      else
-        chrome.test.succeed();
-    }
-  ]);
-});
diff --git a/chrome/test/data/page_load_metrics/page_with_css.html b/chrome/test/data/page_load_metrics/page_with_css.html
deleted file mode 100644
index e7ee7a8..0000000
--- a/chrome/test/data/page_load_metrics/page_with_css.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<!DOCTYPE html>
-<title>Page with some CSS</title>
-<!--
-  Load a bunch of stylesheets to ensure that we spent more than 1ms of time
-  parsing.
--->
-<script>
-  for (var i = 0; i < 50; i++) {
-    document.write('<link rel="stylesheet" href="/page_load_metrics/simple.css?' + i + '">');
-    document.write('<div><p><a>Mark me up! We need a few of these tags to cause a long enough aggregate UpdateStyle');
-  }
-</script>
diff --git a/chrome/test/data/page_load_metrics/simple.css b/chrome/test/data/page_load_metrics/simple.css
deleted file mode 100644
index 4a2e0feb..0000000
--- a/chrome/test/data/page_load_metrics/simple.css
+++ /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.
- */
-body {
-  background-color: red;
-  color: red;
-}
-form {
-  background-color: red;
-  color: red;
-}
-a {
-  background-color: red;
-  color: red;
-  float: left;
-  font-size: 14px;
-  line-height: 1.43;
-  margin: 0 20px 0 0;
-  padding: 6px 0;
-}
-p {
-  color: red;
-  background-color: red;
-  padding: 0 15px;
-  background: #eee;
-}
-div {
-  background-color: red;
-  color: #333;
-  padding: 0 15px;
-  background: #eee;
-}
diff --git a/chrome/test/data/page_load_metrics/simple.css.mock-http-headers b/chrome/test/data/page_load_metrics/simple.css.mock-http-headers
deleted file mode 100644
index 71442bdb..0000000
--- a/chrome/test/data/page_load_metrics/simple.css.mock-http-headers
+++ /dev/null
@@ -1,2 +0,0 @@
-HTTP/1.1 200 OK
-Content-Type: text/css
diff --git a/components/arc/common/notifications.mojom b/components/arc/common/notifications.mojom
index 92588d4..1284886 100644
--- a/components/arc/common/notifications.mojom
+++ b/components/arc/common/notifications.mojom
@@ -139,21 +139,6 @@
   string? package_name;
 };
 
-[MinVersion=2]
-struct ArcToastData {
-  // Unique identifier
-  string id;
-  // Toast text.
-  string? text;
-  // Toast duration in milliseconds. If -1, the toast will be displayed until
-  // the dismiss button is clicked.
-  int32 duration;
-  // Toast dismiss button label, if set. Otherwise, default label is used for
-  // the dismiss button.
-  [MinVersion=4]
-  string? dismiss_text;
-};
-
 // Next Method ID: 6
 interface NotificationsHost {
   // Tells the Chrome that a notification is posted (created or updated) on
@@ -166,14 +151,6 @@
   // |key| is the identifier of the notification.
   OnNotificationRemoved@1(string key);
 
-  [MinVersion=2]
-  // Shows a toast, or queues it if another toast is visible.
-  OnToastPosted@2(ArcToastData data);
-
-  [MinVersion=2]
-  // Hides the visible toast immediately, or cancels the scheduled one.
-  OnToastCancelled@3(ArcToastData data);
-
   [MinVersion=13]
   // Notifies that an existing notiication is updated on Android.
   OnNotificationUpdated@5(ArcNotificationData notification_data);
diff --git a/components/mirroring/service/BUILD.gn b/components/mirroring/service/BUILD.gn
index 786b7ba4b..e2aca69 100644
--- a/components/mirroring/service/BUILD.gn
+++ b/components/mirroring/service/BUILD.gn
@@ -6,8 +6,6 @@
 
 source_set("service") {
   sources = [
-    "rtp_stream.cc",
-    "rtp_stream.h",
     "video_capture_client.cc",
     "video_capture_client.h",
   ]
@@ -17,20 +15,15 @@
   ]
 
   deps = [
-    "//media",
     "//media/capture/mojom:video_capture",
-    "//media/cast:common",
-    "//media/cast:sender",
     "//media/mojo/common:common",
     "//mojo/public/cpp/bindings",
-    "//ui/gfx",
   ]
 }
 
 source_set("unittests") {
   testonly = true
   sources = [
-    "rtp_stream_unittest.cc",
     "video_capture_client_unittest.cc",
   ]
 
@@ -38,11 +31,7 @@
     ":service",
     "//base",
     "//base/test:test_support",
-    "//media",
     "//media/capture/mojom:video_capture",
-    "//media/cast:common",
-    "//media/cast:sender",
-    "//media/cast:test_support",
     "//mojo/public/cpp/bindings",
     "//testing/gmock",
     "//testing/gtest",
diff --git a/components/mirroring/service/rtp_stream.cc b/components/mirroring/service/rtp_stream.cc
deleted file mode 100644
index d892b186..0000000
--- a/components/mirroring/service/rtp_stream.cc
+++ /dev/null
@@ -1,214 +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/mirroring/service/rtp_stream.h"
-
-#include "base/bind.h"
-#include "base/logging.h"
-#include "base/macros.h"
-#include "base/values.h"
-#include "build/build_config.h"
-#include "media/base/video_frame.h"
-#include "media/cast/cast_config.h"
-#include "media/cast/sender/audio_sender.h"
-#include "media/cast/sender/video_sender.h"
-
-using media::cast::FrameSenderConfig;
-using media::cast::RtpPayloadType;
-
-namespace mirroring {
-
-namespace {
-
-// The maximum time since the last video frame was received from the video
-// source, before requesting refresh frames.
-constexpr base::TimeDelta kRefreshInterval =
-    base::TimeDelta::FromMilliseconds(250);
-
-// The maximum number of refresh video frames to request/receive.  After this
-// limit (60 * 250ms = 15 seconds), refresh frame requests will stop being made.
-constexpr int kMaxConsecutiveRefreshFrames = 60;
-
-FrameSenderConfig DefaultOpusConfig() {
-  FrameSenderConfig config;
-  config.rtp_payload_type = RtpPayloadType::AUDIO_OPUS;
-  config.sender_ssrc = 1;
-  config.receiver_ssrc = 2;
-  config.rtp_timebase = media::cast::kDefaultAudioSamplingRate;
-  config.channels = 2;
-  config.min_bitrate = config.max_bitrate = config.start_bitrate =
-      media::cast::kDefaultAudioEncoderBitrate;
-  config.max_frame_rate = 100;  // 10 ms audio frames
-  config.codec = media::cast::CODEC_AUDIO_OPUS;
-  return config;
-}
-
-FrameSenderConfig DefaultVp8Config() {
-  FrameSenderConfig config;
-  config.rtp_payload_type = RtpPayloadType::VIDEO_VP8;
-  config.sender_ssrc = 11;
-  config.receiver_ssrc = 12;
-  config.rtp_timebase = media::cast::kVideoFrequency;
-  config.channels = 1;
-  config.max_bitrate = media::cast::kDefaultMaxVideoBitrate;
-  config.min_bitrate = media::cast::kDefaultMinVideoBitrate;
-  config.max_frame_rate = media::cast::kDefaultMaxFrameRate;
-  config.codec = media::cast::CODEC_VIDEO_VP8;
-  return config;
-}
-
-FrameSenderConfig DefaultH264Config() {
-  FrameSenderConfig config;
-  config.rtp_payload_type = RtpPayloadType::VIDEO_H264;
-  config.sender_ssrc = 11;
-  config.receiver_ssrc = 12;
-  config.rtp_timebase = media::cast::kVideoFrequency;
-  config.channels = 1;
-  config.max_bitrate = media::cast::kDefaultMaxVideoBitrate;
-  config.min_bitrate = media::cast::kDefaultMinVideoBitrate;
-  config.max_frame_rate = media::cast::kDefaultMaxFrameRate;
-  config.codec = media::cast::CODEC_VIDEO_H264;
-  return config;
-}
-
-bool IsHardwareVP8EncodingSupported(RtpStreamClient* client) {
-  // Query for hardware VP8 encoder support.
-  const std::vector<media::VideoEncodeAccelerator::SupportedProfile>
-      vea_profiles = client->GetSupportedVideoEncodeAcceleratorProfiles();
-  for (const auto& vea_profile : vea_profiles) {
-    if (vea_profile.profile >= media::VP8PROFILE_MIN &&
-        vea_profile.profile <= media::VP8PROFILE_MAX) {
-      return true;
-    }
-  }
-  return false;
-}
-
-bool IsHardwareH264EncodingSupported(RtpStreamClient* client) {
-// Query for hardware H.264 encoder support.
-//
-// TODO(miu): Look into why H.264 hardware encoder on MacOS is broken.
-// http://crbug.com/596674
-// TODO(emircan): Look into HW encoder initialization issues on Win.
-// https://crbug.com/636064
-#if !defined(OS_MACOSX) && !defined(OS_WIN)
-  const std::vector<media::VideoEncodeAccelerator::SupportedProfile>
-      vea_profiles = client->GetSupportedVideoEncodeAcceleratorProfiles();
-  for (const auto& vea_profile : vea_profiles) {
-    if (vea_profile.profile >= media::H264PROFILE_MIN &&
-        vea_profile.profile <= media::H264PROFILE_MAX) {
-      return true;
-    }
-  }
-#endif  // !defined(OS_MACOSX) && !defined(OS_WIN)
-  return false;
-}
-
-}  // namespace
-
-VideoRtpStream::VideoRtpStream(
-    std::unique_ptr<media::cast::VideoSender> video_sender,
-    base::WeakPtr<RtpStreamClient> client)
-    : video_sender_(std::move(video_sender)),
-      client_(client),
-      consecutive_refresh_count_(0),
-      expecting_a_refresh_frame_(false),
-      weak_factory_(this) {
-  DCHECK(video_sender_);
-  DCHECK(client);
-
-  refresh_timer_.Start(FROM_HERE, kRefreshInterval,
-                       base::BindRepeating(&VideoRtpStream::OnRefreshTimerFired,
-                                           weak_factory_.GetWeakPtr()));
-}
-
-VideoRtpStream::~VideoRtpStream() {}
-
-// static
-std::vector<FrameSenderConfig> VideoRtpStream::GetSupportedConfigs(
-    RtpStreamClient* client) {
-  std::vector<FrameSenderConfig> supported_configs;
-  // Prefer VP8 over H.264 for hardware encoder.
-  if (IsHardwareVP8EncodingSupported(client))
-    supported_configs.push_back(DefaultVp8Config());
-  if (IsHardwareH264EncodingSupported(client))
-    supported_configs.push_back(DefaultH264Config());
-
-  // Propose the default software VP8 encoder, if no hardware encoders are
-  // available.
-  if (supported_configs.empty())
-    supported_configs.push_back(DefaultVp8Config());
-
-  return supported_configs;
-}
-
-void VideoRtpStream::InsertVideoFrame(
-    scoped_refptr<media::VideoFrame> video_frame) {
-  DCHECK(client_);
-  base::TimeTicks reference_time;
-  if (!video_frame->metadata()->GetTimeTicks(
-          media::VideoFrameMetadata::REFERENCE_TIME, &reference_time)) {
-    client_->OnError("Missing REFERENCE_TIME.");
-    return;
-  }
-  DCHECK(!reference_time.is_null());
-  if (expecting_a_refresh_frame_) {
-    // There is uncertainty as to whether the video frame was in response to a
-    // refresh request.  However, if it was not, more video frames will soon
-    // follow, and before the refresh timer can fire again.  Thus, the
-    // behavior resulting from this logic will be correct.
-    expecting_a_refresh_frame_ = false;
-  } else {
-    consecutive_refresh_count_ = 0;
-    // The following re-starts the timer, scheduling it to fire at
-    // kRefreshInterval from now.
-    refresh_timer_.Reset();
-  }
-
-  if (!(video_frame->format() == media::PIXEL_FORMAT_I420 ||
-        video_frame->format() == media::PIXEL_FORMAT_YV12 ||
-        video_frame->format() == media::PIXEL_FORMAT_I420A)) {
-    client_->OnError("Incompatible video frame format.");
-    return;
-  }
-  video_sender_->InsertRawVideoFrame(std::move(video_frame), reference_time);
-}
-
-void VideoRtpStream::OnRefreshTimerFired() {
-  ++consecutive_refresh_count_;
-  if (consecutive_refresh_count_ >= kMaxConsecutiveRefreshFrames)
-    refresh_timer_.Stop();  // Stop timer until receiving a non-refresh frame.
-
-  DVLOG(1) << "CastVideoSink is requesting another refresh frame "
-              "(consecutive count="
-           << consecutive_refresh_count_ << ").";
-  expecting_a_refresh_frame_ = true;
-  client_->RequestRefreshFrame();
-}
-
-//------------------------------------------------------------------
-// AudioRtpStream
-//------------------------------------------------------------------
-
-AudioRtpStream::AudioRtpStream(
-    std::unique_ptr<media::cast::AudioSender> audio_sender,
-    base::WeakPtr<RtpStreamClient> client)
-    : audio_sender_(std::move(audio_sender)), client_(std::move(client)) {
-  DCHECK(audio_sender_);
-  DCHECK(client_);
-}
-
-AudioRtpStream::~AudioRtpStream() {}
-
-// static
-std::vector<FrameSenderConfig> AudioRtpStream::GetSupportedConfigs() {
-  return {DefaultOpusConfig()};
-}
-
-void AudioRtpStream::InsertAudio(std::unique_ptr<media::AudioBus> audio_bus,
-                                 base::TimeTicks capture_time) {
-  audio_sender_->InsertAudio(std::move(audio_bus), capture_time);
-}
-
-}  // namespace mirroring
diff --git a/components/mirroring/service/rtp_stream.h b/components/mirroring/service/rtp_stream.h
deleted file mode 100644
index 919e298..0000000
--- a/components/mirroring/service/rtp_stream.h
+++ /dev/null
@@ -1,127 +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_MIRRORING_SERVICE_RTP_STREAM_H_
-#define COMPONENTS_MIRRORING_SERVICE_RTP_STREAM_H_
-
-#include <memory>
-#include <string>
-#include <vector>
-
-#include "base/callback.h"
-#include "base/macros.h"
-#include "base/memory/ref_counted.h"
-#include "base/memory/weak_ptr.h"
-#include "base/timer/timer.h"
-#include "media/base/audio_bus.h"
-#include "media/cast/cast_config.h"
-#include "media/cast/constants.h"
-#include "media/video/video_encode_accelerator.h"
-
-namespace media {
-
-class VideoFrame;
-
-namespace cast {
-class VideoSender;
-class AudioSender;
-}  // namespace cast
-
-}  // namespace media
-
-namespace mirroring {
-
-class RtpStreamClient {
- public:
-  virtual ~RtpStreamClient() {}
-
-  // Called when error happened during streaming.
-  virtual void OnError(const std::string& message) = 0;
-
-  // Request a fresh video frame from the capturer.
-  virtual void RequestRefreshFrame() = 0;
-
-  // The following are for hardware video encoding.
-
-  // Query the supported hardware encoding profiles.
-  virtual media::VideoEncodeAccelerator::SupportedProfiles
-  GetSupportedVideoEncodeAcceleratorProfiles() = 0;
-
-  virtual void CreateVideoEncodeAccelerator(
-      const media::cast::ReceiveVideoEncodeAcceleratorCallback& callback) = 0;
-
-  // TODO(xjz): Remove this interface. Instead, create the shared memory in
-  // external video encoder through mojo::ScopedSharedBufferHandle.
-  virtual void CreateVideoEncodeMemory(
-      size_t size,
-      const media::cast::ReceiveVideoEncodeMemoryCallback& callback) = 0;
-};
-
-// Receives video frames and submits the data to media::cast::VideoSender. It
-// also includes a timer to request refresh frames when the source halts (e.g.,
-// a screen capturer stops delivering frames because the screen is not being
-// updated). When a halt is detected, refresh frames will be requested at
-// regular intervals for a short period of time. This provides the video
-// encoder, downstream, several copies of the last frame so that it may clear up
-// lossy encoding artifacts.
-class VideoRtpStream {
- public:
-  VideoRtpStream(std::unique_ptr<media::cast::VideoSender> video_sender,
-                 base::WeakPtr<RtpStreamClient> client);
-  ~VideoRtpStream();
-
-  static std::vector<media::cast::FrameSenderConfig> GetSupportedConfigs(
-      RtpStreamClient* client);
-
-  // Called by VideoCaptureClient when a video frame is received.
-  // |video_frame| is required to provide REFERENCE_TIME in the metadata.
-  void InsertVideoFrame(scoped_refptr<media::VideoFrame> video_frame);
-
- private:
-  void OnRefreshTimerFired();
-
-  const std::unique_ptr<media::cast::VideoSender> video_sender_;
-  const base::WeakPtr<RtpStreamClient> client_;
-
-  // Requests refresh frames at a constant rate while the source is paused, up
-  // to a consecutive maximum.
-  base::RepeatingTimer refresh_timer_;
-
-  // Counter for the number of consecutive "refresh frames" requested.
-  int consecutive_refresh_count_;
-
-  // Set to true when a request for a refresh frame has been made.  This is
-  // cleared once the next frame is received.
-  bool expecting_a_refresh_frame_;
-
-  base::WeakPtrFactory<VideoRtpStream> weak_factory_;
-
-  DISALLOW_COPY_AND_ASSIGN(VideoRtpStream);
-};
-
-// Receives audio data and submits the data to media::cast::AudioSender.
-// TODO(xjz): Complete implementation after Audio Service mirroring refactoring
-// is landed.
-class AudioRtpStream {
- public:
-  AudioRtpStream(std::unique_ptr<media::cast::AudioSender> audio_sender,
-                 base::WeakPtr<RtpStreamClient> client);
-  ~AudioRtpStream();
-
-  static std::vector<media::cast::FrameSenderConfig> GetSupportedConfigs();
-
-  // Called by AudioCaptureClient when new audio data is available.
-  void InsertAudio(std::unique_ptr<media::AudioBus> audio_bus,
-                   base::TimeTicks estimated_capture_time);
-
- private:
-  const std::unique_ptr<media::cast::AudioSender> audio_sender_;
-  const base::WeakPtr<RtpStreamClient> client_;
-
-  DISALLOW_COPY_AND_ASSIGN(AudioRtpStream);
-};
-
-}  // namespace mirroring
-
-#endif  // COMPONENTS_MIRRORING_SERVICE_RTP_STREAM_H_
diff --git a/components/mirroring/service/rtp_stream_unittest.cc b/components/mirroring/service/rtp_stream_unittest.cc
deleted file mode 100644
index 4342568..0000000
--- a/components/mirroring/service/rtp_stream_unittest.cc
+++ /dev/null
@@ -1,140 +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/mirroring/service/rtp_stream.h"
-
-#include "base/bind_helpers.h"
-#include "base/run_loop.h"
-#include "base/test/mock_callback.h"
-#include "base/test/scoped_task_environment.h"
-#include "base/test/simple_test_tick_clock.h"
-#include "media/base/video_frame.h"
-#include "media/cast/cast_config.h"
-#include "media/cast/cast_environment.h"
-#include "media/cast/sender/audio_sender.h"
-#include "media/cast/sender/video_sender.h"
-#include "media/cast/test/mock_cast_transport.h"
-#include "media/cast/test/utility/audio_utility.h"
-#include "media/cast/test/utility/default_config.h"
-#include "media/cast/test/utility/video_utility.h"
-#include "testing/gmock/include/gmock/gmock.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-using ::testing::InvokeWithoutArgs;
-using ::testing::_;
-using media::cast::TestAudioBusFactory;
-
-namespace mirroring {
-
-namespace {
-
-class DummyClient final : public RtpStreamClient {
- public:
-  DummyClient() : weak_factory_(this) {}
-  ~DummyClient() override {}
-
-  // RtpStreamClient implementation.
-  void OnError(const std::string& message) override {}
-  void RequestRefreshFrame() override {}
-  void CreateVideoEncodeAccelerator(
-      const media::cast::ReceiveVideoEncodeAcceleratorCallback& callback)
-      override {}
-  void CreateVideoEncodeMemory(
-      size_t size,
-      const media::cast::ReceiveVideoEncodeMemoryCallback& callback) override {}
-  media::VideoEncodeAccelerator::SupportedProfiles
-  GetSupportedVideoEncodeAcceleratorProfiles() override {
-    return media::VideoEncodeAccelerator::SupportedProfiles();
-  }
-
-  base::WeakPtr<RtpStreamClient> GetWeakPtr() {
-    return weak_factory_.GetWeakPtr();
-  }
-
- private:
-  base::WeakPtrFactory<DummyClient> weak_factory_;
-
-  DISALLOW_COPY_AND_ASSIGN(DummyClient);
-};
-
-}  // namespace
-
-class RtpStreamTest : public ::testing::Test {
- public:
-  RtpStreamTest()
-      : cast_environment_(new media::cast::CastEnvironment(
-            &testing_clock_,
-            scoped_task_environment_.GetMainThreadTaskRunner(),
-            scoped_task_environment_.GetMainThreadTaskRunner(),
-            scoped_task_environment_.GetMainThreadTaskRunner())) {
-    testing_clock_.Advance(base::TimeTicks::Now() - base::TimeTicks());
-  }
-
-  ~RtpStreamTest() override { scoped_task_environment_.RunUntilIdle(); }
-
- protected:
-  base::test::ScopedTaskEnvironment scoped_task_environment_;
-  base::SimpleTestTickClock testing_clock_;
-  const scoped_refptr<media::cast::CastEnvironment> cast_environment_;
-  DummyClient client_;
-  media::cast::MockCastTransport transport_;
-
- private:
-  DISALLOW_COPY_AND_ASSIGN(RtpStreamTest);
-};
-
-// Test the video streaming pipeline.
-TEST_F(RtpStreamTest, VideoStreaming) {
-  // Create one video frame.
-  gfx::Size size(64, 32);
-  scoped_refptr<media::VideoFrame> video_frame = media::VideoFrame::CreateFrame(
-      media::PIXEL_FORMAT_I420, size, gfx::Rect(size), size, base::TimeDelta());
-  video_frame->metadata()->SetTimeTicks(
-      media::VideoFrameMetadata::REFERENCE_TIME, testing_clock_.NowTicks());
-
-  auto video_sender = std::make_unique<media::cast::VideoSender>(
-      cast_environment_, media::cast::GetDefaultVideoSenderConfig(),
-      base::DoNothing(), base::DoNothing(), base::DoNothing(), &transport_,
-      base::DoNothing());
-  VideoRtpStream video_stream(std::move(video_sender), client_.GetWeakPtr());
-  {
-    base::RunLoop run_loop;
-    // Expect the video frame is sent to video sender for encoding, and the
-    // encoded frame is sent to the transport.
-    EXPECT_CALL(transport_, InsertFrame(_, _))
-        .WillOnce(InvokeWithoutArgs(&run_loop, &base::RunLoop::Quit));
-    video_stream.InsertVideoFrame(std::move(video_frame));
-    run_loop.Run();
-  }
-
-  scoped_task_environment_.RunUntilIdle();
-}
-
-// Test the audio streaming pipeline.
-TEST_F(RtpStreamTest, AudioStreaming) {
-  // Create audio data.
-  const base::TimeDelta kDuration = base::TimeDelta::FromMilliseconds(10);
-  media::cast::FrameSenderConfig audio_config =
-      media::cast::GetDefaultAudioSenderConfig();
-  std::unique_ptr<media::AudioBus> audio_bus =
-      TestAudioBusFactory(audio_config.channels, audio_config.rtp_timebase,
-                          TestAudioBusFactory::kMiddleANoteFreq, 0.5f)
-          .NextAudioBus(kDuration);
-  auto audio_sender = std::make_unique<media::cast::AudioSender>(
-      cast_environment_, audio_config, base::DoNothing(), &transport_);
-  AudioRtpStream audio_stream(std::move(audio_sender), client_.GetWeakPtr());
-  {
-    base::RunLoop run_loop;
-    // Expect the audio data is sent to audio sender for encoding, and the
-    // encoded frame is sent to the transport.
-    EXPECT_CALL(transport_, InsertFrame(_, _))
-        .WillOnce(InvokeWithoutArgs(&run_loop, &base::RunLoop::Quit));
-    audio_stream.InsertAudio(std::move(audio_bus), testing_clock_.NowTicks());
-    run_loop.Run();
-  }
-
-  scoped_task_environment_.RunUntilIdle();
-}
-
-}  // namespace mirroring
diff --git a/components/ntp_snippets/sessions/foreign_sessions_suggestions_provider_unittest.cc b/components/ntp_snippets/sessions/foreign_sessions_suggestions_provider_unittest.cc
index aad3fdb..586aba80 100644
--- a/components/ntp_snippets/sessions/foreign_sessions_suggestions_provider_unittest.cc
+++ b/components/ntp_snippets/sessions/foreign_sessions_suggestions_provider_unittest.cc
@@ -50,11 +50,12 @@
 const char kTitle[] = "title is ignored";
 
 SessionWindow* GetOrCreateWindow(SyncedSession* session, int window_id) {
-  if (session->windows.find(window_id) == session->windows.end()) {
-    session->windows[window_id] = std::make_unique<SyncedSessionWindow>();
+  SessionID id = SessionID::FromSerializedValue(window_id);
+  if (session->windows.find(id) == session->windows.end()) {
+    session->windows[id] = std::make_unique<SyncedSessionWindow>();
   }
 
-  return &session->windows[window_id]->wrapped_window;
+  return &session->windows[id]->wrapped_window;
 }
 
 void AddTabToSession(SyncedSession* session,
diff --git a/components/ntp_snippets/sessions/tab_delegate_sync_adapter_unittest.cc b/components/ntp_snippets/sessions/tab_delegate_sync_adapter_unittest.cc
index bcdf618f..cf6fe74 100644
--- a/components/ntp_snippets/sessions/tab_delegate_sync_adapter_unittest.cc
+++ b/components/ntp_snippets/sessions/tab_delegate_sync_adapter_unittest.cc
@@ -41,9 +41,7 @@
                           scoped_refptr<RefCountedMemory>*));
   MOCK_METHOD1(GetAllForeignSessions, bool(std::vector<const SyncedSession*>*));
   MOCK_METHOD3(GetForeignTab,
-               bool(const std::string&,
-                    SessionID::id_type,
-                    const SessionTab**));
+               bool(const std::string&, SessionID, const SessionTab**));
   MOCK_METHOD1(DeleteForeignSession, void(const std::string&));
   MOCK_METHOD2(GetForeignSession,
                bool(const std::string&, std::vector<const SessionWindow*>*));
diff --git a/components/payments/core/payment_details.cc b/components/payments/core/payment_details.cc
index fc000ff..8716ce0 100644
--- a/components/payments/core/payment_details.cc
+++ b/components/payments/core/payment_details.cc
@@ -136,7 +136,7 @@
           const base::DictionaryValue* additional_display_item_dict = nullptr;
           PaymentItem additional_display_item;
           if (!additional_display_items_list->GetDictionary(
-                  i, &additional_display_item_dict) ||
+                  j, &additional_display_item_dict) ||
               !additional_display_item.FromDictionaryValue(
                   *additional_display_item_dict)) {
             return false;
diff --git a/components/payments/core/payment_details_validation_unittest.cc b/components/payments/core/payment_details_validation_unittest.cc
index c8f69e06..dddfe16d 100644
--- a/components/payments/core/payment_details_validation_unittest.cc
+++ b/components/payments/core/payment_details_validation_unittest.cc
@@ -277,6 +277,19 @@
         "label": "Debit card discount",
         "amount": {"currency": "USD", "value": "-0.20"}
       }]
+    }, {
+      "supportedMethods": ["basic-card"],
+      "data": {
+        "supportedTypes": ["mastercard"]
+      },
+      "total": {
+        "label": "MasterCard discounted total",
+        "amount": {"currency": "USD", "value": "0.80"}
+      },
+      "additionalDisplayItems": [{
+        "label": "MasterCard discount",
+        "amount": {"currency": "USD", "value": "-0.20"}
+      }]
     }]
 })",
                                                    DO_NOT_REQUIRE_TOTAL,
diff --git a/components/services/filesystem/directory_impl.cc b/components/services/filesystem/directory_impl.cc
index 7c0b898..2c3e3d5b 100644
--- a/components/services/filesystem/directory_impl.cc
+++ b/components/services/filesystem/directory_impl.cc
@@ -42,7 +42,7 @@
     mojom::DirectoryEntryPtr entry = mojom::DirectoryEntry::New();
     entry->type = info.IsDirectory() ? mojom::FsFileType::DIRECTORY
                                      : mojom::FsFileType::REGULAR_FILE;
-    entry->name = info.GetName().AsUTF8Unsafe();
+    entry->name = info.GetName();
     entries.push_back(std::move(entry));
   }
 
diff --git a/components/services/filesystem/directory_impl_unittest.cc b/components/services/filesystem/directory_impl_unittest.cc
index 0a051df608..83c590ae 100644
--- a/components/services/filesystem/directory_impl_unittest.cc
+++ b/components/services/filesystem/directory_impl_unittest.cc
@@ -65,7 +65,7 @@
   for (size_t i = 0; i < directory_contents->size(); i++) {
     auto& item = directory_contents.value()[i];
     ASSERT_TRUE(item);
-    auto it = expected_contents.find(item->name);
+    auto it = expected_contents.find(item->name.AsUTF8Unsafe());
     ASSERT_TRUE(it != expected_contents.end());
     EXPECT_EQ(it->second, item->type);
     expected_contents.erase(it);
diff --git a/components/services/filesystem/public/interfaces/types.mojom b/components/services/filesystem/public/interfaces/types.mojom
index 0fa96d6..5303fc2 100644
--- a/components/services/filesystem/public/interfaces/types.mojom
+++ b/components/services/filesystem/public/interfaces/types.mojom
@@ -4,6 +4,8 @@
 
 module filesystem.mojom;
 
+import "mojo/public/mojom/base/file_path.mojom";
+
 // Used to explain the meaning of an offset within a file. These values line up
 // exactly with base::File.
 enum Whence {
@@ -72,8 +74,12 @@
 
 // Describes a directory entry (i.e., a single member of a directory).
 struct DirectoryEntry {
+  // It contains only the entry name, i.e.: /path/to/a/file would be just
+  // "file". TODO(https://crbug/779196): Use Basename type when available.
+  mojo_base.mojom.FilePath name;
+
+  // Type of a given entry.
   FsFileType type;
-  string name;
 };
 
 // Deletion flags:
diff --git a/components/services/leveldb/leveldb_mojo_proxy.cc b/components/services/leveldb/leveldb_mojo_proxy.cc
index 5ff7895..fb579ae7 100644
--- a/components/services/leveldb/leveldb_mojo_proxy.cc
+++ b/components/services/leveldb/leveldb_mojo_proxy.cc
@@ -8,6 +8,7 @@
 
 #include "base/bind.h"
 #include "base/callback.h"
+#include "base/files/file_path.h"
 #include "base/threading/thread_restrictions.h"
 #include "mojo/public/cpp/bindings/interface_request.h"
 #include "mojo/public/cpp/bindings/sync_call_restrictions.h"
@@ -238,7 +239,8 @@
 
   if (directory_contents.has_value()) {
     for (size_t i = 0; i < directory_contents->size(); ++i)
-      out_contents->push_back(directory_contents.value()[i]->name);
+      out_contents->push_back(
+          directory_contents.value()[i]->name.AsUTF8Unsafe());
   }
 }
 
diff --git a/components/sessions/core/live_tab_context.h b/components/sessions/core/live_tab_context.h
index 0efb779..9ba4f1c 100644
--- a/components/sessions/core/live_tab_context.h
+++ b/components/sessions/core/live_tab_context.h
@@ -29,7 +29,7 @@
  public:
   // TODO(blundell): Rename.
   virtual void ShowBrowserWindow() = 0;
-  virtual const SessionID& GetSessionID() const = 0;
+  virtual SessionID GetSessionID() const = 0;
   virtual int GetTabCount() const = 0;
   virtual int GetSelectedIndex() const = 0;
   virtual std::string GetAppName() const = 0;
diff --git a/components/sessions/core/session_id.cc b/components/sessions/core/session_id.cc
index 1ab9753..22fbff13 100644
--- a/components/sessions/core/session_id.cc
+++ b/components/sessions/core/session_id.cc
@@ -4,8 +4,20 @@
 
 #include "components/sessions/core/session_id.h"
 
+#include <ostream>
+
 static SessionID::id_type next_id = 1;
 
+// static
+SessionID SessionID::NewUnique() {
+  return SessionID();
+}
+
 SessionID::SessionID() {
   id_ = next_id++;
 }
+
+std::ostream& operator<<(std::ostream& out, SessionID id) {
+  out << id.id();
+  return out;
+}
diff --git a/components/sessions/core/session_id.h b/components/sessions/core/session_id.h
index d4c2645..f31f206 100644
--- a/components/sessions/core/session_id.h
+++ b/components/sessions/core/session_id.h
@@ -6,23 +6,65 @@
 #define COMPONENTS_SESSIONS_CORE_SESSION_ID_H_
 
 #include <stdint.h>
+#include <functional>
+#include <iosfwd>
 
 #include "components/sessions/core/sessions_export.h"
 
-// Uniquely identifies a tab or window for the duration of a session.
+// Uniquely identifies a tab or window for the duration of a session. Pass by
+// value.
 class SESSIONS_EXPORT SessionID {
  public:
   typedef int32_t id_type;
 
+  // Creates a new instance representing an ID that has never been used in the
+  // current session. The same value may be instantiated in future sessions.
+  static SessionID NewUnique();
+
+  // Special value representing a null-like, invalid ID. It's the only value
+  // that returns false for is_valid().
+  static constexpr SessionID InvalidValue() { return SessionID(-1); }
+
+  // Should be used rarely because it can lead to collisions.
+  static constexpr SessionID FromSerializedValue(id_type value) {
+    return IsValidValue(value) ? SessionID(value) : InvalidValue();
+  }
+
+  // Returns whether a certain underlying ID value would represent a valid
+  // SessionID instance. Note that zero is also considered invalid.
+  static constexpr bool IsValidValue(id_type value) { return value > 0; }
+
+  // Generates a new unique ID (deprecated: use NewUnique() instead).
   SessionID();
-  ~SessionID() {}
+
+  // All IDs are valid except InvalidValue() above.
+  bool is_valid() const { return IsValidValue(id_); }
 
   // Returns the underlying id.
-  void set_id(id_type id) { id_ = id; }
   id_type id() const { return id_; }
 
+  // Sets underlying type (deprecated: use FromSerializedValue() instead).
+  void set_id(id_type id) { id_ = id; }
+
  private:
+  explicit constexpr SessionID(id_type id) : id_(id) {}
+
   id_type id_;
 };
 
+inline bool operator==(SessionID lhs, SessionID rhs) {
+  return lhs.id() == rhs.id();
+}
+
+inline bool operator!=(SessionID lhs, SessionID rhs) {
+  return lhs.id() != rhs.id();
+}
+
+inline bool operator<(SessionID lhs, SessionID rhs) {
+  return lhs.id() < rhs.id();
+}
+
+// For use in gtest-based unit tests.
+SESSIONS_EXPORT std::ostream& operator<<(std::ostream& out, SessionID id);
+
 #endif  // COMPONENTS_SESSIONS_CORE_SESSION_ID_H_
diff --git a/components/signin/core/browser/account_reconcilor.cc b/components/signin/core/browser/account_reconcilor.cc
index 285977a2..c971963 100644
--- a/components/signin/core/browser/account_reconcilor.cc
+++ b/components/signin/core/browser/account_reconcilor.cc
@@ -312,11 +312,10 @@
                             base::Unretained(this)));
   }
 
-  primary_account_ = signin_manager_->GetAuthenticatedAccountId();
-  if (token_service_->GetDelegate()->RefreshTokenHasError(primary_account_) &&
+  if (token_service_->GetDelegate()->RefreshTokenHasError(
+          signin_manager_->GetAuthenticatedAccountId()) &&
       delegate_->ShouldAbortReconcileIfPrimaryHasError()) {
     VLOG(1) << "AccountReconcilor::StartReconcile: primary has error, abort.";
-    primary_account_.clear();
     return;
   }
 
@@ -353,6 +352,7 @@
       return;
     }
 
+    std::string primary_account = signin_manager_->GetAuthenticatedAccountId();
     std::vector<gaia::ListedAccount> verified_gaia_accounts =
         FilterUnverifiedAccounts(accounts);
     VLOG_IF(1, verified_gaia_accounts.size() < accounts.size())
@@ -362,20 +362,19 @@
     if (delegate_->ShouldRevokeAllSecondaryTokensBeforeReconcile(
             verified_gaia_accounts)) {
       for (const std::string& account : token_service_->GetAccounts()) {
-        if (account != primary_account_)
+        if (account != primary_account)
           token_service_->RevokeCredentials(account);
       }
     }
 
     if (delegate_->ShouldAbortReconcileIfPrimaryHasError() &&
-        token_service_->GetDelegate()->RefreshTokenHasError(primary_account_)) {
+        token_service_->GetDelegate()->RefreshTokenHasError(primary_account)) {
       VLOG(1) << "Primary account has error, abort.";
-      primary_account_.clear();
       is_reconcile_started_ = false;
       return;
     }
 
-    FinishReconcile(LoadValidAccountsFromTokenService(),
+    FinishReconcile(primary_account, LoadValidAccountsFromTokenService(),
                     std::move(verified_gaia_accounts));
   } else {
     if (is_reconcile_started_)
@@ -417,13 +416,14 @@
 }
 
 void AccountReconcilor::FinishReconcile(
+    const std::string& primary_account,
     const std::vector<std::string>& chrome_accounts,
     std::vector<gaia::ListedAccount>&& gaia_accounts) {
   VLOG(1) << "AccountReconcilor::FinishReconcile";
   DCHECK(add_to_cookie_.empty());
 
   std::string first_account = delegate_->GetFirstGaiaAccountForReconcile(
-      chrome_accounts, gaia_accounts, primary_account_, first_execution_);
+      chrome_accounts, gaia_accounts, primary_account, first_execution_);
   // |first_account| must be in |chrome_accounts|.
   DCHECK(first_account.empty() ||
          (std::find(chrome_accounts.begin(), chrome_accounts.end(),
@@ -461,7 +461,7 @@
     // Gaia cookie has been cleared or was already empty.
     DCHECK((first_account_mismatch && rebuild_cookie) ||
            (number_gaia_accounts == 0));
-    RevokeAllSecondaryTokens(chrome_accounts);
+    RevokeAllSecondaryTokens(primary_account, chrome_accounts);
   } else {
     // Create a list of accounts that need to be added to the Gaia cookie.
     add_to_cookie_.push_back(first_account);
@@ -540,9 +540,10 @@
 }
 
 void AccountReconcilor::RevokeAllSecondaryTokens(
+    const std::string& primary_account,
     const std::vector<std::string>& chrome_accounts) {
   for (const std::string& account : chrome_accounts) {
-    if (account != primary_account_) {
+    if (account != primary_account) {
       reconcile_is_noop_ = false;
       if (delegate_->IsAccountConsistencyEnforced()) {
         VLOG(1) << "Revoking token for " << account;
diff --git a/components/signin/core/browser/account_reconcilor.h b/components/signin/core/browser/account_reconcilor.h
index db4adb51..2ae00e8 100644
--- a/components/signin/core/browser/account_reconcilor.h
+++ b/components/signin/core/browser/account_reconcilor.h
@@ -121,6 +121,7 @@
   FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, DiceLastKnownFirstAccount);
   FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, UnverifiedAccountNoop);
   FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, UnverifiedAccountMerge);
+  FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, HandleSigninDuringReconcile);
   FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, DiceMigrationAfterNoop);
   FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest,
                            DiceNoMigrationWhenTokensNotReady);
@@ -192,13 +193,15 @@
   // Used during periodic reconciliation.
   void StartReconcile();
   // |gaia_accounts| are the accounts in the Gaia cookie.
-  void FinishReconcile(const std::vector<std::string>& chrome_accounts,
+  void FinishReconcile(const std::string& primary_account,
+                       const std::vector<std::string>& chrome_accounts,
                        std::vector<gaia::ListedAccount>&& gaia_accounts);
   void AbortReconcile();
   void CalculateIfReconcileIsDone();
   void ScheduleStartReconcileIfChromeAccountsChanged();
-  // Revokes tokens for all accounts in chrome_accounts but primary_account_.
+  // Revokes tokens for all accounts in chrome_accounts but the primary account.
   void RevokeAllSecondaryTokens(
+      const std::string& primary_account,
       const std::vector<std::string>& chrome_accounts);
 
   // Returns the list of valid accounts from the TokenService.
@@ -274,7 +277,6 @@
 
   // Used during reconcile action.
   // These members are used to validate the tokens in OAuth2TokenService.
-  std::string primary_account_;
   std::vector<std::string> add_to_cookie_;
   bool chrome_accounts_changed_;
 
diff --git a/components/signin/core/browser/account_reconcilor_unittest.cc b/components/signin/core/browser/account_reconcilor_unittest.cc
index 5c43db8..16464c4 100644
--- a/components/signin/core/browser/account_reconcilor_unittest.cc
+++ b/components/signin/core/browser/account_reconcilor_unittest.cc
@@ -1014,6 +1014,34 @@
   ASSERT_EQ(signin_metrics::ACCOUNT_RECONCILOR_OK, reconcilor->GetState());
 }
 
+// Regression test for https://crbug.com/825143
+// Checks that the primary account is not signed out when it changes during the
+// reconcile.
+TEST_F(AccountReconcilorTest, HandleSigninDuringReconcile) {
+  SetAccountConsistency(
+      signin::AccountConsistencyMethod::kDicePrepareMigration);
+
+  cookie_manager_service()->SetListAccountsResponseNoAccounts();
+  AccountReconcilor* reconcilor = GetMockReconcilor();
+  ASSERT_TRUE(
+      reconcilor->delegate_->ShouldRevokeAllSecondaryTokensBeforeReconcile(
+          std::vector<gaia::ListedAccount>()));
+
+  // Signin during reconcile.
+  reconcilor->StartReconcile();
+  ASSERT_TRUE(reconcilor->is_reconcile_started_);
+  const std::string account_id =
+      ConnectProfileToAccount("12345", "user@gmail.com");
+  EXPECT_CALL(*GetMockReconcilor(), PerformMergeAction(account_id)).Times(1);
+  base::RunLoop().RunUntilIdle();
+  SimulateAddAccountToCookieCompleted(reconcilor, account_id,
+                                      GoogleServiceAuthError::AuthErrorNone());
+  ASSERT_FALSE(reconcilor->is_reconcile_started_);
+
+  // The account has not been deleted.
+  EXPECT_TRUE(token_service()->RefreshTokenIsAvailable(account_id));
+}
+
 // Tests that the Dice migration happens after a no-op reconcile.
 TEST_F(AccountReconcilorTest, DiceMigrationAfterNoop) {
   // Enable Dice migration.
diff --git a/components/sync_sessions/local_session_event_handler_impl.cc b/components/sync_sessions/local_session_event_handler_impl.cc
index cce4816..cda59c7 100644
--- a/components/sync_sessions/local_session_event_handler_impl.cc
+++ b/components/sync_sessions/local_session_event_handler_impl.cc
@@ -27,14 +27,6 @@
 // The maximum number of navigations in each direction we care to sync.
 const int kMaxSyncNavigationCount = 6;
 
-// Ensure that the tab id is not invalid.
-bool ShouldSyncTabId(SessionID::id_type tab_id) {
-  if (tab_id == kInvalidTabID) {
-    return false;
-  }
-  return true;
-}
-
 bool IsWindowSyncable(const SyncedWindowDelegate& window_delegate) {
   return window_delegate.ShouldSync() && window_delegate.GetTabCount() &&
          window_delegate.HasWindow();
@@ -170,7 +162,7 @@
     for (auto& win_iter : current_session->windows) {
       for (auto& tab : win_iter.second->wrapped_window.tabs) {
         int sync_id = TabNodePool::kInvalidTabNodeID;
-        if (!session_tracker_->GetTabNodeFromLocalTabId(tab->tab_id.id(),
+        if (!session_tracker_->GetTabNodeFromLocalTabId(tab->tab_id,
                                                         &sync_id) ||
             sync_id == TabNodePool::kInvalidTabNodeID) {
           continue;
@@ -199,18 +191,18 @@
       continue;
     }
 
-    SessionID::id_type window_id = window_delegate->GetSessionId();
+    SessionID window_id = window_delegate->GetSessionId();
     DVLOG(1) << "Associating window " << window_id << " with "
              << window_delegate->GetTabCount() << " tabs.";
 
     bool found_tabs = false;
     for (int j = 0; j < window_delegate->GetTabCount(); ++j) {
-      SessionID::id_type tab_id = window_delegate->GetTabIdAt(j);
+      SessionID tab_id = window_delegate->GetTabIdAt(j);
       SyncedTabDelegate* synced_tab = window_delegate->GetTabAt(j);
 
       // GetTabAt can return a null tab; in that case just skip it. Similarly,
       // if for some reason the tab id is invalid, skip it.
-      if (!synced_tab || !ShouldSyncTabId(tab_id)) {
+      if (!synced_tab || !tab_id.is_valid()) {
         continue;
       }
 
@@ -321,7 +313,7 @@
     return;
   }
 
-  SessionID::id_type tab_id = tab_delegate->GetSessionId();
+  SessionID tab_id = tab_delegate->GetSessionId();
   DVLOG(1) << "Syncing tab " << tab_id << " from window "
            << tab_delegate->GetWindowId();
 
@@ -400,8 +392,9 @@
 
 void LocalSessionEventHandlerImpl::WriteTasksIntoSpecifics(
     sync_pb::SessionTab* tab_specifics) {
-  TabTasks* tab_tasks =
-      task_tracker_.GetTabTasks(tab_specifics->tab_id(), kInvalidTabID);
+  TabTasks* tab_tasks = task_tracker_.GetTabTasks(
+      SessionID::FromSerializedValue(tab_specifics->tab_id()),
+      /*parent_tab_id=*/SessionID::InvalidValue());
   for (int i = 0; i < tab_specifics->navigation_size(); i++) {
     // Excluding blocked navigations, which are appended at tail.
     if (tab_specifics->navigation(i).blocked_state() ==
@@ -458,8 +451,8 @@
 
 void LocalSessionEventHandlerImpl::AssociateRestoredPlaceholderTab(
     const SyncedTabDelegate& tab_delegate,
-    SessionID::id_type new_tab_id,
-    SessionID::id_type new_window_id,
+    SessionID new_tab_id,
+    SessionID new_window_id,
     WriteBatch* batch) {
   DCHECK_NE(tab_delegate.GetSyncId(), TabNodePool::kInvalidTabNodeID);
 
@@ -479,7 +472,7 @@
   // Update the window id on the SessionTab itself.
   sessions::SessionTab* local_tab =
       session_tracker_->GetTab(current_session_tag_, new_tab_id);
-  local_tab->window_id.set_id(new_window_id);
+  local_tab->window_id = new_window_id;
 
   AppendChangeForExistingTab(tab_delegate.GetSyncId(), *local_tab, batch);
 }
@@ -501,8 +494,8 @@
     base::Time mtime,
     sessions::SessionTab* session_tab) const {
   DCHECK(session_tab);
-  session_tab->window_id.set_id(tab_delegate.GetWindowId());
-  session_tab->tab_id.set_id(tab_delegate.GetSessionId());
+  session_tab->window_id = tab_delegate.GetWindowId();
+  session_tab->tab_id = tab_delegate.GetSessionId();
   session_tab->tab_visual_index = 0;
   // Use -1 to indicate that the index hasn't been set properly yet.
   session_tab->current_navigation_index = -1;
diff --git a/components/sync_sessions/local_session_event_handler_impl.h b/components/sync_sessions/local_session_event_handler_impl.h
index 3f03490..584b211 100644
--- a/components/sync_sessions/local_session_event_handler_impl.h
+++ b/components/sync_sessions/local_session_event_handler_impl.h
@@ -102,8 +102,8 @@
   // compares new_tab_id and new_window_id against the previously persisted tab
   // ID and window ID (from our TabNodePool) and updates them if either differs.
   void AssociateRestoredPlaceholderTab(const SyncedTabDelegate& tab_delegate,
-                                       SessionID::id_type new_tab_id,
-                                       SessionID::id_type new_window_id,
+                                       SessionID new_tab_id,
+                                       SessionID new_window_id,
                                        WriteBatch* batch);
 
   // Appends an ACTION_UPDATE for a sync tab entity onto |batch| to
diff --git a/components/sync_sessions/local_session_event_handler_impl_unittest.cc b/components/sync_sessions/local_session_event_handler_impl_unittest.cc
index 80defe3..68de3e5 100644
--- a/components/sync_sessions/local_session_event_handler_impl_unittest.cc
+++ b/components/sync_sessions/local_session_event_handler_impl_unittest.cc
@@ -48,11 +48,11 @@
 const base::Time kTime5 = base::Time::FromInternalValue(150);
 const base::Time kTime6 = base::Time::FromInternalValue(190);
 
-const SessionID::id_type kWindowId1 = 1000001;
-const SessionID::id_type kWindowId2 = 1000002;
-const SessionID::id_type kTabId1 = 1000003;
-const SessionID::id_type kTabId2 = 1000004;
-const SessionID::id_type kTabId3 = 1000005;
+const SessionID kWindowId1 = SessionID::FromSerializedValue(1000001);
+const SessionID kWindowId2 = SessionID::FromSerializedValue(1000002);
+const SessionID kTabId1 = SessionID::FromSerializedValue(1000003);
+const SessionID kTabId2 = SessionID::FromSerializedValue(1000004);
+const SessionID kTabId3 = SessionID::FromSerializedValue(1000005);
 
 MATCHER_P3(MatchesHeader, session_tag, num_windows, num_tabs, "") {
   if (arg == nullptr) {
@@ -102,11 +102,11 @@
     *result_listener << "which contains an unexpected session tag";
     return false;
   }
-  if (specifics.tab().window_id() != window_id) {
+  if (specifics.tab().window_id() != window_id.id()) {
     *result_listener << "which contains an unexpected window ID";
     return false;
   }
-  if (specifics.tab().tab_id() != tab_id) {
+  if (specifics.tab().tab_id() != tab_id.id()) {
     *result_listener << "which contains an unexpected tab ID";
     return false;
   }
@@ -181,20 +181,20 @@
   }
 
   TestSyncedWindowDelegate* AddWindow(
-      SessionID::id_type window_id = SessionID().id()) {
+      SessionID window_id = SessionID::NewUnique()) {
     return window_getter_.AddWindow(
         sync_pb::SessionWindow_BrowserType_TYPE_TABBED, window_id);
   }
 
-  TestSyncedTabDelegate* AddTab(SessionID::id_type window_id,
+  TestSyncedTabDelegate* AddTab(SessionID window_id,
                                 const std::string& url,
-                                SessionID::id_type tab_id = SessionID().id()) {
+                                SessionID tab_id = SessionID::NewUnique()) {
     TestSyncedTabDelegate* tab = window_getter_.AddTab(window_id, tab_id);
     tab->Navigate(url, base::Time::Now());
     return tab;
   }
 
-  TestSyncedTabDelegate* AddTabWithTime(SessionID::id_type window_id,
+  TestSyncedTabDelegate* AddTabWithTime(SessionID window_id,
                                         const std::string& url,
                                         base::Time time = base::Time::Now()) {
     TestSyncedTabDelegate* tab = window_getter_.AddTab(window_id);
@@ -236,8 +236,8 @@
   InitHandler();
   handler_->SetSessionTabFromDelegateForTest(*tab, kTime4, &session_tab);
 
-  EXPECT_EQ(tab->GetWindowId(), session_tab.window_id.id());
-  EXPECT_EQ(tab->GetSessionId(), session_tab.tab_id.id());
+  EXPECT_EQ(tab->GetWindowId(), session_tab.window_id);
+  EXPECT_EQ(tab->GetSessionId(), session_tab.tab_id);
   EXPECT_EQ(0, session_tab.tab_visual_index);
   EXPECT_EQ(tab->GetCurrentEntryIndex(), session_tab.current_navigation_index);
   EXPECT_FALSE(session_tab.pinned);
@@ -347,8 +347,8 @@
   InitHandler();
   handler_->SetSessionTabFromDelegateForTest(*tab, kTime4, &session_tab);
 
-  EXPECT_EQ(tab->GetWindowId(), session_tab.window_id.id());
-  EXPECT_EQ(tab->GetSessionId(), session_tab.tab_id.id());
+  EXPECT_EQ(tab->GetWindowId(), session_tab.window_id);
+  EXPECT_EQ(tab->GetSessionId(), session_tab.tab_id);
   EXPECT_EQ(0, session_tab.tab_visual_index);
   EXPECT_EQ(0, session_tab.current_navigation_index);
   EXPECT_FALSE(session_tab.pinned);
diff --git a/components/sync_sessions/lost_navigations_recorder.cc b/components/sync_sessions/lost_navigations_recorder.cc
index c3dab185..78af9306 100644
--- a/components/sync_sessions/lost_navigations_recorder.cc
+++ b/components/sync_sessions/lost_navigations_recorder.cc
@@ -39,7 +39,7 @@
     return;
   }
   sync_pb::SessionTab tab = session_specifics.tab();
-  id_type tab_id = tab.tab_id();
+  SessionID tab_id = SessionID::FromSerializedValue(tab.tab_id());
 
   IdSet& latest = latest_navigation_ids_[tab_id];
   latest.clear();
@@ -58,12 +58,12 @@
 }
 
 void LostNavigationsRecorder::DeleteTabs(const sync_pb::SessionHeader& header) {
-  IdSet new_tab_ids;
-  IdSet current_tab_ids;
+  std::set<SessionID> new_tab_ids;
+  std::set<SessionID> current_tab_ids;
   // Find the set of tab ids that are still there after the deletion.
   for (sync_pb::SessionWindow window : header.window()) {
-    for (id_type tab_id : window.tab()) {
-      new_tab_ids.insert(tab_id);
+    for (auto tab_id : window.tab()) {
+      new_tab_ids.insert(SessionID::FromSerializedValue(tab_id));
     }
   }
   for (auto pair : recorded_navigation_ids_) {
@@ -71,9 +71,9 @@
   }
   // The set of deleted tabs is the difference between the set of tabs before
   // the pending change and the set of tabs following the pending change.
-  IdSet deleted_tabs =
-      base::STLSetDifference<IdSet>(current_tab_ids, new_tab_ids);
-  for (id_type tab_id : deleted_tabs) {
+  auto deleted_tabs =
+      base::STLSetDifference<std::set<SessionID>>(current_tab_ids, new_tab_ids);
+  for (SessionID tab_id : deleted_tabs) {
     recorded_navigation_ids_.erase(tab_id);
     latest_navigation_ids_.erase(tab_id);
     max_recorded_for_tab_.erase(tab_id);
@@ -118,7 +118,7 @@
 // recorded against what was actually synced.
 void LostNavigationsRecorder::ReconcileLostNavs() {
   for (auto pair : recorded_navigation_ids_) {
-    id_type tab_id = pair.first;
+    SessionID tab_id = pair.first;
     IdSet& latest = latest_navigation_ids_[tab_id];
     IdSet& recorded = recorded_navigation_ids_[tab_id];
     if (recorded.size() < 1) {
diff --git a/components/sync_sessions/lost_navigations_recorder.h b/components/sync_sessions/lost_navigations_recorder.h
index e56b424..a9c314ad 100644
--- a/components/sync_sessions/lost_navigations_recorder.h
+++ b/components/sync_sessions/lost_navigations_recorder.h
@@ -23,7 +23,7 @@
 // being reflected in the history page.
 class LostNavigationsRecorder : public syncer::LocalChangeObserver {
  public:
-  using id_type = SessionID::id_type;
+  using id_type = int32_t;
   using IdSet = std::set<id_type>;
   enum RecorderState { RECORDER_STATE_NOT_SYNCING, RECORDER_STATE_SYNCING };
 
@@ -46,11 +46,11 @@
 
   // The set of all navigation ids we've observed for each tab_id since the last
   // sync.
-  std::map<id_type, IdSet> recorded_navigation_ids_;
+  std::map<SessionID, IdSet> recorded_navigation_ids_;
   // The set of navigation ids most recently recorded for each tab_id.
-  std::map<id_type, IdSet> latest_navigation_ids_;
+  std::map<SessionID, IdSet> latest_navigation_ids_;
   // The maximum navigation_id recorded for each tab_id.
-  std::map<id_type, id_type> max_recorded_for_tab_;
+  std::map<SessionID, id_type> max_recorded_for_tab_;
   DISALLOW_COPY_AND_ASSIGN(LostNavigationsRecorder);
 };
 };  // namespace sync_sessions
diff --git a/components/sync_sessions/lost_navigations_recorder_unittest.cc b/components/sync_sessions/lost_navigations_recorder_unittest.cc
index 8516236..1a673fae 100644
--- a/components/sync_sessions/lost_navigations_recorder_unittest.cc
+++ b/components/sync_sessions/lost_navigations_recorder_unittest.cc
@@ -26,7 +26,6 @@
 
 namespace sync_sessions {
 namespace {
-using id_type = SessionID::id_type;
 
 const char kTab1SyncTag[] = "tab-YWRkcjHvv74=";
 const char kTab2SyncTag[] = "tab-2FyZDHvv74=";
@@ -45,7 +44,7 @@
   LostNavigationsRecorder* recorder() { return &recorder_; }
 
   void AddNavigation(sync_pb::SessionSpecifics* tab_base,
-                     id_type id_override = -1) {
+                     int id_override = -1) {
     sync_pb::SessionTab* tab = tab_base->mutable_tab();
     sync_pb::TabNavigation* navigation = tab->add_navigation();
     navigation->set_page_transition(sync_pb::SyncEnums_PageTransition_TYPED);
@@ -124,7 +123,7 @@
 
  private:
   base::MessageLoop message_loop;
-  id_type _id;
+  int _id;
   LostNavigationsRecorder recorder_;
   syncer::TestDirectorySetterUpper dir_maker_;
 };
diff --git a/components/sync_sessions/open_tabs_ui_delegate.h b/components/sync_sessions/open_tabs_ui_delegate.h
index 66b11d4..de915e1 100644
--- a/components/sync_sessions/open_tabs_ui_delegate.h
+++ b/components/sync_sessions/open_tabs_ui_delegate.h
@@ -34,7 +34,7 @@
   // session |tag|. Caller does NOT own the SessionTab object.
   // Returns true if the foreign session and tab were found, false otherwise.
   virtual bool GetForeignTab(const std::string& tag,
-                             SessionID::id_type tab_id,
+                             SessionID tab_id,
                              const sessions::SessionTab** tab) = 0;
 
   // Delete a foreign session and all its sync data.
diff --git a/components/sync_sessions/open_tabs_ui_delegate_impl.cc b/components/sync_sessions/open_tabs_ui_delegate_impl.cc
index 8295bbe8..4868309 100644
--- a/components/sync_sessions/open_tabs_ui_delegate_impl.cc
+++ b/components/sync_sessions/open_tabs_ui_delegate_impl.cc
@@ -64,7 +64,7 @@
 }
 
 bool OpenTabsUIDelegateImpl::GetForeignTab(const std::string& tag,
-                                           const SessionID::id_type tab_id,
+                                           const SessionID tab_id,
                                            const sessions::SessionTab** tab) {
   const sessions::SessionTab* synced_tab = nullptr;
   bool success = session_tracker_->LookupSessionTab(tag, tab_id, &synced_tab);
diff --git a/components/sync_sessions/open_tabs_ui_delegate_impl.h b/components/sync_sessions/open_tabs_ui_delegate_impl.h
index 3c69844..e8b1d9d 100644
--- a/components/sync_sessions/open_tabs_ui_delegate_impl.h
+++ b/components/sync_sessions/open_tabs_ui_delegate_impl.h
@@ -41,7 +41,7 @@
       const std::string& tag,
       std::vector<const sessions::SessionWindow*>* windows) override;
   bool GetForeignTab(const std::string& tag,
-                     SessionID::id_type tab_id,
+                     SessionID tab_id,
                      const sessions::SessionTab** tab) override;
   bool GetForeignSessionTabs(
       const std::string& tag,
diff --git a/components/sync_sessions/open_tabs_ui_delegate_impl_unittest.cc b/components/sync_sessions/open_tabs_ui_delegate_impl_unittest.cc
index 6859f26..3f924a3 100644
--- a/components/sync_sessions/open_tabs_ui_delegate_impl_unittest.cc
+++ b/components/sync_sessions/open_tabs_ui_delegate_impl_unittest.cc
@@ -25,12 +25,12 @@
 const char kSessionTag1[] = "foreign1";
 const char kSessionTag2[] = "foreign2";
 const char kSessionTag3[] = "foreign3";
-const SessionID::id_type kWindowId1 = 1;
-const SessionID::id_type kWindowId2 = 2;
-const SessionID::id_type kWindowId3 = 3;
-const SessionID::id_type kTabId1 = 111;
-const SessionID::id_type kTabId2 = 222;
-const SessionID::id_type kTabId3 = 333;
+const SessionID kWindowId1 = SessionID::FromSerializedValue(1);
+const SessionID kWindowId2 = SessionID::FromSerializedValue(2);
+const SessionID kWindowId3 = SessionID::FromSerializedValue(3);
+const SessionID kTabId1 = SessionID::FromSerializedValue(111);
+const SessionID kTabId2 = SessionID::FromSerializedValue(222);
+const SessionID kTabId3 = SessionID::FromSerializedValue(333);
 
 void IngnoreForeignSessionDeletion(const std::string& session_tag) {}
 
@@ -115,13 +115,14 @@
 
   std::vector<const SessionTab*> tabs;
   EXPECT_TRUE(delegate_.GetForeignSessionTabs(kSessionTag1, &tabs));
-  EXPECT_THAT(tabs,
-              ElementsAre(Pointee(Field(&SessionTab::tab_id,
-                                        Property(&SessionID::id, kTabId1))),
-                          Pointee(Field(&SessionTab::tab_id,
-                                        Property(&SessionID::id, kTabId3))),
-                          Pointee(Field(&SessionTab::tab_id,
-                                        Property(&SessionID::id, kTabId2)))));
+  EXPECT_THAT(
+      tabs,
+      ElementsAre(Pointee(Field(&SessionTab::tab_id,
+                                Property(&SessionID::id, kTabId1.id()))),
+                  Pointee(Field(&SessionTab::tab_id,
+                                Property(&SessionID::id, kTabId3.id()))),
+                  Pointee(Field(&SessionTab::tab_id,
+                                Property(&SessionID::id, kTabId2.id())))));
 }
 
 TEST_F(OpenTabsUIDelegateImplTest, ShouldSkipNonPresentable) {
diff --git a/components/sync_sessions/session_data_type_controller_unittest.cc b/components/sync_sessions/session_data_type_controller_unittest.cc
index 31aca02..8a286eba 100644
--- a/components/sync_sessions/session_data_type_controller_unittest.cc
+++ b/components/sync_sessions/session_data_type_controller_unittest.cc
@@ -38,7 +38,7 @@
   ~MockSyncedWindowDelegate() override {}
 
   bool HasWindow() const override { return false; }
-  SessionID::id_type GetSessionId() const override { return 0; }
+  SessionID GetSessionId() const override { return SessionID::InvalidValue(); }
   int GetTabCount() const override { return 0; }
   int GetActiveIndex() const override { return 0; }
   bool IsApp() const override { return false; }
@@ -48,7 +48,9 @@
     return false;
   }
   SyncedTabDelegate* GetTabAt(int index) const override { return nullptr; }
-  SessionID::id_type GetTabIdAt(int index) const override { return 0; }
+  SessionID GetTabIdAt(int index) const override {
+    return SessionID::InvalidValue();
+  }
 
   bool IsSessionRestoreInProgress() const override {
     return is_restore_in_progress_;
@@ -70,7 +72,7 @@
     return delegates_;
   }
 
-  const SyncedWindowDelegate* FindById(SessionID::id_type id) override {
+  const SyncedWindowDelegate* FindById(SessionID id) override {
     return nullptr;
   }
 
diff --git a/components/sync_sessions/session_sync_test_helper.cc b/components/sync_sessions/session_sync_test_helper.cc
index d7734a9..205364e 100644
--- a/components/sync_sessions/session_sync_test_helper.cc
+++ b/components/sync_sessions/session_sync_test_helper.cc
@@ -32,23 +32,23 @@
 
 // static
 void SessionSyncTestHelper::AddWindowSpecifics(
-    int window_id,
-    const std::vector<int>& tab_list,
+    SessionID window_id,
+    const std::vector<SessionID>& tab_list,
     sync_pb::SessionSpecifics* meta) {
   sync_pb::SessionHeader* header = meta->mutable_header();
   sync_pb::SessionWindow* window = header->add_window();
-  window->set_window_id(window_id);
+  window->set_window_id(window_id.id());
   window->set_selected_tab_index(0);
   window->set_browser_type(sync_pb::SessionWindow_BrowserType_TYPE_TABBED);
   for (auto iter = tab_list.begin(); iter != tab_list.end(); ++iter) {
-    window->add_tab(*iter);
+    window->add_tab(iter->id());
   }
 }
 
 // static
 void SessionSyncTestHelper::VerifySyncedSession(
     const std::string& tag,
-    const std::vector<std::vector<SessionID::id_type>>& windows,
+    const std::vector<std::vector<SessionID>>& windows,
     const SyncedSession& session) {
   ASSERT_EQ(tag, session.session_tag);
   ASSERT_EQ(sync_pb::SyncEnums_DeviceType_TYPE_LINUX, session.device_type);
@@ -56,11 +56,11 @@
   ASSERT_EQ(windows.size(), session.windows.size());
 
   // We assume the window id's are in increasing order.
-  int i = 0;
-  for (std::vector<std::vector<int>>::const_iterator win_iter = windows.begin();
-       win_iter != windows.end(); ++win_iter, ++i) {
+  int i = 1;
+  for (auto win_iter = windows.begin(); win_iter != windows.end();
+       ++win_iter, ++i) {
     sessions::SessionWindow* win_ptr;
-    auto map_iter = session.windows.find(i);
+    auto map_iter = session.windows.find(SessionID::FromSerializedValue(i));
     if (map_iter != session.windows.end())
       win_ptr = &map_iter->second->wrapped_window;
     else
@@ -72,7 +72,7 @@
     for (auto tab_iter = (*win_iter).begin(); tab_iter != (*win_iter).end();
          ++tab_iter, ++j) {
       sessions::SessionTab* tab = win_ptr->tabs[j].get();
-      ASSERT_EQ(*tab_iter, tab->tab_id.id());
+      ASSERT_EQ(*tab_iter, tab->tab_id);
       ASSERT_EQ(1U, tab->navigations.size());
       ASSERT_EQ(1, tab->tab_visual_index);
       ASSERT_EQ(0, tab->current_navigation_index);
@@ -90,22 +90,22 @@
 
 void SessionSyncTestHelper::BuildTabSpecifics(
     const std::string& tag,
-    int window_id,
-    int tab_id,
+    SessionID window_id,
+    SessionID tab_id,
     sync_pb::SessionSpecifics* tab_base) {
   BuildTabSpecifics(tag, window_id, tab_id, ++max_tab_node_id_, tab_base);
 }
 
 void SessionSyncTestHelper::BuildTabSpecifics(
     const std::string& tag,
-    int window_id,
-    int tab_id,
+    SessionID window_id,
+    SessionID tab_id,
     int tab_node_id,
     sync_pb::SessionSpecifics* tab_base) {
   tab_base->set_session_tag(tag);
   tab_base->set_tab_node_id(tab_node_id);
   sync_pb::SessionTab* tab = tab_base->mutable_tab();
-  tab->set_tab_id(tab_id);
+  tab->set_tab_id(tab_id.id());
   tab->set_tab_visual_index(1);
   tab->set_current_navigation_index(0);
   tab->set_pinned(true);
@@ -123,15 +123,16 @@
 
 sync_pb::SessionSpecifics SessionSyncTestHelper::BuildForeignSession(
     const std::string& tag,
-    const std::vector<SessionID::id_type>& tab_list,
+    const std::vector<SessionID>& tab_list,
     std::vector<sync_pb::SessionSpecifics>* tabs) {
   sync_pb::SessionSpecifics meta;
   BuildSessionSpecifics(tag, &meta);
-  AddWindowSpecifics(0, tab_list, &meta);
+  AddWindowSpecifics(SessionID::FromSerializedValue(1), tab_list, &meta);
   std::vector<sync_pb::SessionSpecifics> tabs1;
   tabs1.resize(tab_list.size());
   for (size_t i = 0; i < tab_list.size(); ++i) {
-    BuildTabSpecifics(tag, 0, tab_list[i], &tabs1[i]);
+    BuildTabSpecifics(tag, SessionID::FromSerializedValue(1), tab_list[i],
+                      &tabs1[i]);
   }
 
   if (tabs)
diff --git a/components/sync_sessions/session_sync_test_helper.h b/components/sync_sessions/session_sync_test_helper.h
index ce6dd790..97360aa 100644
--- a/components/sync_sessions/session_sync_test_helper.h
+++ b/components/sync_sessions/session_sync_test_helper.h
@@ -26,34 +26,34 @@
   static void BuildSessionSpecifics(const std::string& tag,
                                     sync_pb::SessionSpecifics* meta);
 
-  static void AddWindowSpecifics(int window_id,
-                                 const std::vector<int>& tab_list,
+  static void AddWindowSpecifics(SessionID window_id,
+                                 const std::vector<SessionID>& tab_list,
                                  sync_pb::SessionSpecifics* meta);
 
   static void VerifySyncedSession(
       const std::string& tag,
-      const std::vector<std::vector<SessionID::id_type>>& windows,
+      const std::vector<std::vector<SessionID>>& windows,
       const SyncedSession& session);
 
   // Build a SessionSpecifics object with a tab and sample data. Uses a
   // monotonically increasing variable to generate tab_node_ids and avoid
   // conflicts.
   void BuildTabSpecifics(const std::string& tag,
-                         int window_id,
-                         int tab_id,
+                         SessionID window_id,
+                         SessionID tab_id,
                          sync_pb::SessionSpecifics* tab_base);
 
   // Overload of BuildTabSpecifics to allow forcing a specific tab_node_id.
   // Typically only useful to test reusing tab_node_ids.
   void BuildTabSpecifics(const std::string& tag,
-                         int window_id,
-                         int tab_id,
+                         SessionID window_id,
+                         SessionID tab_id,
                          int tab_node_id,
                          sync_pb::SessionSpecifics* tab_base);
 
   sync_pb::SessionSpecifics BuildForeignSession(
       const std::string& tag,
-      const std::vector<SessionID::id_type>& tab_list,
+      const std::vector<SessionID>& tab_list,
       std::vector<sync_pb::SessionSpecifics>* tabs);
 
   void Reset();
diff --git a/components/sync_sessions/sessions_sync_manager.cc b/components/sync_sessions/sessions_sync_manager.cc
index b52b075..48ad833 100644
--- a/components/sync_sessions/sessions_sync_manager.cc
+++ b/components/sync_sessions/sessions_sync_manager.cc
@@ -403,7 +403,7 @@
   // and id generation happens outside of Sync, all ids from a previous local
   // session must be rewritten in order to be valid.
   // Key: previous session id. Value: new session id.
-  std::map<SessionID::id_type, SessionID::id_type> session_id_map;
+  std::map<int32_t, SessionID> session_id_map;
 
   bool found_current_header = false;
   int bad_foreign_hash_count = 0;
@@ -456,8 +456,8 @@
         // the specifics in place.
         for (auto& window :
              *rewritten_specifics.mutable_header()->mutable_window()) {
-          session_id_map[window.window_id()] = SessionID().id();
-          window.set_window_id(session_id_map[window.window_id()]);
+          session_id_map[window.window_id()] = SessionID::NewUnique();
+          window.set_window_id(session_id_map[window.window_id()].id());
 
           google::protobuf::RepeatedField<int>* tab_ids = window.mutable_tab();
           for (int i = 0; i < tab_ids->size(); i++) {
@@ -465,9 +465,9 @@
             if (tab_iter == session_id_map.end()) {
               // SessionID::SessionID() automatically increments a static
               // variable, forcing a new id to be generated each time.
-              session_id_map[tab_ids->Get(i)] = SessionID().id();
+              session_id_map[tab_ids->Get(i)] = SessionID::NewUnique();
             }
-            *(tab_ids->Mutable(i)) = session_id_map[tab_ids->Get(i)];
+            *(tab_ids->Mutable(i)) = session_id_map[tab_ids->Get(i)].id();
             // Note: the tab id of the SessionTab will be updated when the tab
             // node itself is processed.
           }
@@ -486,7 +486,7 @@
           syncer::SyncChange tombstone(TombstoneTab(specifics));
           if (tombstone.IsValid())
             new_changes->push_back(tombstone);
-        } else if (specifics.tab().tab_id() == kInvalidTabID) {
+        } else if (specifics.tab().tab_id() <= 0) {
           LOG(WARNING) << "Found tab node with invalid tab id.";
           syncer::SyncChange tombstone(TombstoneTab(specifics));
           if (tombstone.IsValid())
@@ -498,13 +498,13 @@
                    << " with node " << specifics.tab_node_id();
 
           // Now file the tab under the new tab id.
-          SessionID::id_type new_tab_id = kInvalidTabID;
+          SessionID new_tab_id = SessionID::InvalidValue();
           auto iter = session_id_map.find(specifics.tab().tab_id());
           if (iter != session_id_map.end()) {
             new_tab_id = iter->second;
           } else {
-            session_id_map[specifics.tab().tab_id()] = SessionID().id();
-            new_tab_id = session_id_map[specifics.tab().tab_id()];
+            new_tab_id = SessionID::NewUnique();
+            session_id_map.emplace(specifics.tab().tab_id(), new_tab_id);
           }
           DVLOG(1) << "Remapping tab " << specifics.tab().tab_id() << " to "
                    << new_tab_id;
@@ -512,7 +512,7 @@
           // The specifics from the SyncData are immutable. Create a mutable
           // copy to hold the rewritten ids.
           sync_pb::SessionSpecifics rewritten_specifics(specifics);
-          rewritten_specifics.mutable_tab()->set_tab_id(new_tab_id);
+          rewritten_specifics.mutable_tab()->set_tab_id(new_tab_id.id());
           session_tracker_.ReassociateLocalTab(
               rewritten_specifics.tab_node_id(), new_tab_id);
           UpdateTrackerWithSpecifics(
diff --git a/components/sync_sessions/sessions_sync_manager_unittest.cc b/components/sync_sessions/sessions_sync_manager_unittest.cc
index 300a6fa..035bb990 100644
--- a/components/sync_sessions/sessions_sync_manager_unittest.cc
+++ b/components/sync_sessions/sessions_sync_manager_unittest.cc
@@ -29,6 +29,7 @@
 using syncer::SyncDataList;
 using syncer::SyncDataLocal;
 using syncer::SyncError;
+using testing::Eq;
 
 namespace sync_sessions {
 
@@ -42,8 +43,14 @@
 const char kBaz2[] = "http://baz2/";
 const char kTag1[] = "tag1";
 const char kTag2[] = "tag2";
-const int kTabIds1[] = {5, 10, 13, 17};
-const int kTabIds2[] = {7, 15, 18, 20};
+
+std::vector<SessionID> SessionIDs(const std::vector<SessionID::id_type>& ids) {
+  std::vector<SessionID> result;
+  for (SessionID::id_type id : ids) {
+    result.push_back(SessionID::FromSerializedValue(id));
+  }
+  return result;
+}
 
 std::string TabNodeIdToTag(const std::string& machine_tag, int tab_node_id) {
   return base::StringPrintf("%s %d", machine_tag.c_str(), tab_node_id);
@@ -170,6 +177,11 @@
 
 class SessionsSyncManagerTest : public testing::Test {
  protected:
+  const SessionID kWindowId1 = SessionID::FromSerializedValue(1);
+  const SessionID kWindowId2 = SessionID::FromSerializedValue(2);
+  const std::vector<SessionID> kTabIds1 = SessionIDs({5, 10, 13, 17});
+  const std::vector<SessionID> kTabIds2 = SessionIDs({7, 15, 18, 20});
+
   void SetUp() override {
     ON_CALL(mock_sync_sessions_client_, GetSyncedWindowDelegatesGetter())
         .WillByDefault(testing::Return(&window_getter_));
@@ -365,8 +377,7 @@
     return window_getter_.AddWindow(type);
   }
 
-  TestSyncedTabDelegate* AddTab(SessionID::id_type window_id,
-                                const std::string& url) {
+  TestSyncedTabDelegate* AddTab(SessionID window_id, const std::string& url) {
     TestSyncedTabDelegate* tab = window_getter_.AddTab(window_id);
     tab->Navigate(url);
     return tab;
@@ -445,7 +456,7 @@
   int restored_tab_id =
       out[0].sync_data().GetSpecifics().session().tab().tab_id();
   // SessionId should be rewritten on restore.
-  ASSERT_NE(tab->GetSessionId(), restored_tab_id);
+  ASSERT_NE(tab->GetSessionId().id(), restored_tab_id);
   ASSERT_EQ(
       restored_tab_id,
       out[1].sync_data().GetSpecifics().session().header().window(0).tab(0));
@@ -543,7 +554,7 @@
   // for the custom tab. They should both have their tab ids reset, but the
   // placeholder cannot be fixed, and will be dropped. Only the custom tab will
   // show up now.
-  PlaceholderTabDelegate tab2(SessionID().id(), conflicting_sync_id);
+  PlaceholderTabDelegate tab2(SessionID::NewUnique(), conflicting_sync_id);
   window->OverrideTabAt(0, &tab2);
 
   TestSyncedWindowDelegate* window2 =
@@ -599,23 +610,20 @@
 
 // Tests MergeDataAndStartSyncing with sync data but no local data.
 TEST_F(SessionsSyncManagerTest, MergeWithInitialForeignSession) {
-  std::vector<SessionID::id_type> tab_list1(std::begin(kTabIds1),
-                                            std::end(kTabIds1));
   std::vector<sync_pb::SessionSpecifics> tabs1;
   sync_pb::SessionSpecifics meta(
-      helper()->BuildForeignSession(kTag1, tab_list1, &tabs1));
+      helper()->BuildForeignSession(kTag1, kTabIds1, &tabs1));
   // Add a second window.
-  std::vector<SessionID::id_type> tab_list2(std::begin(kTabIds2),
-                                            std::end(kTabIds2));
-  helper()->AddWindowSpecifics(1, tab_list2, &meta);
+  helper()->AddWindowSpecifics(kWindowId2, kTabIds2, &meta);
 
   // Set up initial data.
   SyncDataList initial_data;
   initial_data.push_back(CreateRemoteData(meta));
   AddTabsToSyncDataList(tabs1, &initial_data);
-  for (auto tab_id : tab_list2) {
+  for (auto tab_id : kTabIds2) {
     sync_pb::EntitySpecifics entity;
-    helper()->BuildTabSpecifics(kTag1, 0, tab_id, entity.mutable_session());
+    helper()->BuildTabSpecifics(kTag1, kWindowId1, tab_id,
+                                entity.mutable_session());
     initial_data.push_back(CreateRemoteData(entity));
   }
 
@@ -627,9 +635,9 @@
   ASSERT_TRUE(manager()->GetOpenTabsUIDelegate()->GetAllForeignSessions(
       &foreign_sessions));
   ASSERT_EQ(1U, foreign_sessions.size());
-  std::vector<std::vector<SessionID::id_type>> session_reference;
-  session_reference.push_back(tab_list1);
-  session_reference.push_back(tab_list2);
+  std::vector<std::vector<SessionID>> session_reference;
+  session_reference.push_back(kTabIds1);
+  session_reference.push_back(kTabIds2);
   helper()->VerifySyncedSession(kTag1, session_reference,
                                 *(foreign_sessions[0]));
 }
@@ -637,7 +645,7 @@
 // Ensure model association associates the pre-existing tabs.
 TEST_F(SessionsSyncManagerTest, MergeLocalSessionExistingTabs) {
   TestSyncedWindowDelegate* window = AddWindow();
-  SessionID::id_type window_id = window->GetSessionId();
+  SessionID window_id = window->GetSessionId();
   TestSyncedTabDelegate* tab = AddTab(window_id, kFoo1);
   tab->Navigate(kBar1);  // Adds back entry.
   tab->Navigate(kBaz1);  // Adds back entry.
@@ -678,11 +686,9 @@
   tab->Navigate(kFoo2);
 
   // Foreign.
-  std::vector<SessionID::id_type> tab_list1(std::begin(kTabIds1),
-                                            std::end(kTabIds1));
   std::vector<sync_pb::SessionSpecifics> tabs1;
   sync_pb::SessionSpecifics meta(
-      helper()->BuildForeignSession(kTag1, tab_list1, &tabs1));
+      helper()->BuildForeignSession(kTag1, kTabIds1, &tabs1));
   SyncDataList foreign_data;
   foreign_data.push_back(CreateRemoteData(meta));
   AddTabsToSyncDataList(tabs1, &foreign_data);
@@ -706,8 +712,8 @@
   std::vector<const SyncedSession*> foreign_sessions;
   ASSERT_TRUE(manager()->GetOpenTabsUIDelegate()->GetAllForeignSessions(
       &foreign_sessions));
-  std::vector<std::vector<SessionID::id_type>> session_reference;
-  session_reference.push_back(tab_list1);
+  std::vector<std::vector<SessionID>> session_reference;
+  session_reference.push_back(kTabIds1);
   helper()->VerifySyncedSession(kTag1, session_reference,
                                 *(foreign_sessions[0]));
   // There should be one and only one foreign session. If VerifySyncedSession
@@ -725,14 +731,12 @@
   AddTab(AddWindow()->GetSessionId(), kBar1);
 
   SyncDataList foreign_data1;
-  std::vector<std::vector<SessionID::id_type>> meta1_reference;
+  std::vector<std::vector<SessionID>> meta1_reference;
   sync_pb::SessionSpecifics meta1;
 
-  std::vector<SessionID::id_type> tab_list1(std::begin(kTabIds1),
-                                            std::end(kTabIds1));
-  meta1_reference.push_back(tab_list1);
+  meta1_reference.push_back(kTabIds1);
   std::vector<sync_pb::SessionSpecifics> tabs1;
-  meta1 = helper()->BuildForeignSession(kTag1, tab_list1, &tabs1);
+  meta1 = helper()->BuildForeignSession(kTag1, kTabIds1, &tabs1);
   foreign_data1.push_back(CreateRemoteData(meta1));
   AddTabsToSyncDataList(tabs1, &foreign_data1);
 
@@ -749,14 +753,12 @@
   VerifyLocalHeaderChange(out[3], 2, 2);
 
   // Add a second window to the foreign session.
-  std::vector<SessionID::id_type> tab_list2(std::begin(kTabIds2),
-                                            std::end(kTabIds2));
-  meta1_reference.push_back(tab_list2);
-  helper()->AddWindowSpecifics(1, tab_list2, &meta1);
+  meta1_reference.push_back(kTabIds2);
+  helper()->AddWindowSpecifics(kWindowId2, kTabIds2, &meta1);
   std::vector<sync_pb::SessionSpecifics> tabs2;
-  tabs2.resize(tab_list2.size());
-  for (size_t i = 0; i < tab_list2.size(); ++i) {
-    helper()->BuildTabSpecifics(kTag1, 0, tab_list2[i], &tabs2[i]);
+  tabs2.resize(kTabIds2.size());
+  for (size_t i = 0; i < kTabIds2.size(); ++i) {
+    helper()->BuildTabSpecifics(kTag1, kWindowId2, kTabIds2[i], &tabs2[i]);
   }
 
   SyncChangeList changes;
@@ -770,16 +772,16 @@
   ASSERT_TRUE(manager()->GetOpenTabsUIDelegate()->GetAllForeignSessions(
       &foreign_sessions));
   ASSERT_EQ(1U, foreign_sessions.size());
-  ASSERT_EQ(
-      4U,
-      foreign_sessions[0]->windows.find(0)->second->wrapped_window.tabs.size());
-  ASSERT_EQ(
-      4U,
-      foreign_sessions[0]->windows.find(1)->second->wrapped_window.tabs.size());
+  ASSERT_EQ(4U, foreign_sessions[0]
+                    ->windows.find(kWindowId1)
+                    ->second->wrapped_window.tabs.size());
+  ASSERT_EQ(4U, foreign_sessions[0]
+                    ->windows.find(kWindowId2)
+                    ->second->wrapped_window.tabs.size());
   helper()->VerifySyncedSession(kTag1, meta1_reference, *(foreign_sessions[0]));
 
   // Add a new foreign session.
-  std::vector<SessionID::id_type> tag2_tab_list = {107, 115};
+  const std::vector<SessionID> tag2_tab_list = SessionIDs({107, 115});
   std::vector<sync_pb::SessionSpecifics> tag2_tabs;
   sync_pb::SessionSpecifics meta2(
       helper()->BuildForeignSession(kTag2, tag2_tab_list, &tag2_tabs));
@@ -791,23 +793,22 @@
 
   ASSERT_TRUE(manager()->GetOpenTabsUIDelegate()->GetAllForeignSessions(
       &foreign_sessions));
-  std::vector<std::vector<SessionID::id_type>> meta2_reference;
+  std::vector<std::vector<SessionID>> meta2_reference;
   meta2_reference.push_back(tag2_tab_list);
   ASSERT_EQ(2U, foreign_sessions.size());
-  ASSERT_EQ(
-      2U,
-      foreign_sessions[1]->windows.find(0)->second->wrapped_window.tabs.size());
+  ASSERT_EQ(2U, foreign_sessions[1]
+                    ->windows.find(kWindowId1)
+                    ->second->wrapped_window.tabs.size());
   helper()->VerifySyncedSession(kTag2, meta2_reference, *(foreign_sessions[1]));
   foreign_sessions.clear();
 
   // Remove a tab from a window.
   meta1_reference[0].pop_back();
-  tab_list1.pop_back();
   sync_pb::SessionWindow* win = meta1.mutable_header()->mutable_window(0);
   win->clear_tab();
-  for (std::vector<int>::const_iterator iter = tab_list1.begin();
-       iter != tab_list1.end(); ++iter) {
-    win->add_tab(*iter);
+  for (std::vector<SessionID>::const_iterator iter = kTabIds1.begin();
+       iter + 1 != kTabIds1.end(); ++iter) {
+    win->add_tab(iter->id());
   }
   SyncChangeList removal;
   removal.push_back(MakeRemoteChange(meta1, SyncChange::ACTION_UPDATE));
@@ -817,9 +818,9 @@
   ASSERT_TRUE(manager()->GetOpenTabsUIDelegate()->GetAllForeignSessions(
       &foreign_sessions));
   ASSERT_EQ(2U, foreign_sessions.size());
-  ASSERT_EQ(
-      3U,
-      foreign_sessions[0]->windows.find(0)->second->wrapped_window.tabs.size());
+  ASSERT_EQ(3U, foreign_sessions[0]
+                    ->windows.find(kWindowId1)
+                    ->second->wrapped_window.tabs.size());
   helper()->VerifySyncedSession(kTag1, meta1_reference, *(foreign_sessions[0]));
 }
 
@@ -839,10 +840,8 @@
 
   // Fill an instance of session specifics with a foreign session's data.
   std::vector<sync_pb::SessionSpecifics> tabs;
-  std::vector<SessionID::id_type> tab_list1(std::begin(kTabIds1),
-                                            std::end(kTabIds1));
   sync_pb::SessionSpecifics meta(
-      helper()->BuildForeignSession(kTag1, tab_list1, &tabs));
+      helper()->BuildForeignSession(kTag1, kTabIds1, &tabs));
 
   // Update associator with the session's meta node, window, and tabs.
   UpdateTrackerWithSpecifics(meta, base::Time(), &manager()->session_tracker_);
@@ -883,10 +882,8 @@
   // Fill an instance of session specifics with a foreign session's data.
   std::string tag = "tag1";
   std::vector<sync_pb::SessionSpecifics> tabs1;
-  std::vector<SessionID::id_type> tab_list1(std::begin(kTabIds1),
-                                            std::end(kTabIds1));
   sync_pb::SessionSpecifics meta(
-      helper()->BuildForeignSession(tag, tab_list1, &tabs1));
+      helper()->BuildForeignSession(tag, kTabIds1, &tabs1));
 
   SyncChangeList adds;
   // Add tabs for first window, then the meta node.
@@ -899,8 +896,8 @@
   ASSERT_TRUE(manager()->GetOpenTabsUIDelegate()->GetAllForeignSessions(
       &foreign_sessions));
   ASSERT_EQ(1U, foreign_sessions.size());
-  std::vector<std::vector<SessionID::id_type>> session_reference;
-  session_reference.push_back(tab_list1);
+  std::vector<std::vector<SessionID>> session_reference;
+  session_reference.push_back(kTabIds1);
   helper()->VerifySyncedSession(tag, session_reference, *(foreign_sessions[0]));
 }
 
@@ -911,19 +908,15 @@
   // Fill an instance of session specifics with a foreign session's data.
   std::string tag = "tag1";
   std::vector<sync_pb::SessionSpecifics> tabs1;
-  std::vector<SessionID::id_type> tab_list1(std::begin(kTabIds1),
-                                            std::end(kTabIds1));
   sync_pb::SessionSpecifics meta(
-      helper()->BuildForeignSession(tag, tab_list1, &tabs1));
+      helper()->BuildForeignSession(tag, kTabIds1, &tabs1));
   // Add a second window, but this time only create two tab nodes, despite the
   // window expecting four tabs.
-  std::vector<SessionID::id_type> tab_list2(std::begin(kTabIds2),
-                                            std::end(kTabIds2));
-  helper()->AddWindowSpecifics(1, tab_list2, &meta);
+  helper()->AddWindowSpecifics(kWindowId2, kTabIds2, &meta);
   std::vector<sync_pb::SessionSpecifics> tabs2;
   tabs2.resize(2);
   for (size_t i = 0; i < 2; ++i) {
-    helper()->BuildTabSpecifics(tag, 0, tab_list2[i], &tabs2[i]);
+    helper()->BuildTabSpecifics(tag, kWindowId1, kTabIds2[i], &tabs2[i]);
   }
 
   SyncChangeList changes;
@@ -939,16 +932,16 @@
       &foreign_sessions));
   ASSERT_EQ(1U, foreign_sessions.size());
   ASSERT_EQ(2U, foreign_sessions[0]->windows.size());
-  ASSERT_EQ(
-      4U,
-      foreign_sessions[0]->windows.find(0)->second->wrapped_window.tabs.size());
-  ASSERT_EQ(
-      4U,
-      foreign_sessions[0]->windows.find(1)->second->wrapped_window.tabs.size());
+  ASSERT_EQ(4U, foreign_sessions[0]
+                    ->windows.find(kWindowId1)
+                    ->second->wrapped_window.tabs.size());
+  ASSERT_EQ(4U, foreign_sessions[0]
+                    ->windows.find(kWindowId2)
+                    ->second->wrapped_window.tabs.size());
 
   // Close the second window.
   meta.mutable_header()->clear_window();
-  helper()->AddWindowSpecifics(0, tab_list1, &meta);
+  helper()->AddWindowSpecifics(kWindowId1, kTabIds1, &meta);
   changes.push_back(MakeRemoteChange(meta, SyncChange::ACTION_UPDATE));
   // Update associator with the session's meta node containing one window.
   manager()->ProcessSyncChanges(FROM_HERE, changes);
@@ -959,15 +952,15 @@
       &foreign_sessions));
   ASSERT_EQ(1U, foreign_sessions.size());
   ASSERT_EQ(1U, foreign_sessions[0]->windows.size());
-  std::vector<std::vector<SessionID::id_type>> session_reference;
-  session_reference.push_back(tab_list1);
+  std::vector<std::vector<SessionID>> session_reference;
+  session_reference.push_back(kTabIds1);
   helper()->VerifySyncedSession(tag, session_reference, *(foreign_sessions[0]));
 }
 
 // Tests that the SessionsSyncManager can handle a remote client deleting
 // sync nodes that belong to this local session.
 TEST_F(SessionsSyncManagerTest, ProcessRemoteDeleteOfLocalSession) {
-  SessionID::id_type window_id = AddWindow()->GetSessionId();
+  SessionID window_id = AddWindow()->GetSessionId();
   SyncChangeList out;
   InitWithSyncDataTakeOutput(SyncDataList(), &out);
   ASSERT_EQ(2U, out.size());
@@ -1001,7 +994,7 @@
   EXPECT_TRUE(GetTabPool()->Empty());
   int tab_node_id = out[2].sync_data().GetSpecifics().session().tab_node_id();
   int tab_id = out[2].sync_data().GetSpecifics().session().tab().tab_id();
-  EXPECT_EQ(tab_id, GetTabPool()->GetTabIdFromTabNodeId(tab_node_id));
+  EXPECT_EQ(tab_id, GetTabPool()->GetTabIdFromTabNodeId(tab_node_id).id());
 }
 
 // Test that receiving a session delete from sync removes the session
@@ -1009,10 +1002,8 @@
 TEST_F(SessionsSyncManagerTest, ProcessForeignDelete) {
   InitWithNoSyncData();
   std::vector<sync_pb::SessionSpecifics> tabs1;
-  std::vector<SessionID::id_type> tab_list1(std::begin(kTabIds1),
-                                            std::end(kTabIds1));
   sync_pb::SessionSpecifics meta(
-      helper()->BuildForeignSession("tag1", tab_list1, &tabs1));
+      helper()->BuildForeignSession("tag1", kTabIds1, &tabs1));
 
   SyncChangeList changes;
   changes.push_back(MakeRemoteChange(meta, SyncChange::ACTION_ADD));
@@ -1038,25 +1029,27 @@
   base::Time stale_mtime = base::Time::Now() - base::TimeDelta::FromDays(15);
   std::string session_tag = "tag1";
 
-  // 0 will not have ownership changed.
-  // 1 will not be updated, but header will stop owning.
-  // 2 will be deleted before header stops owning.
-  // 3 will be deleted after header stops owning.
-  // 4 will be deleted before header update, but header will still try to own.
-  // 5 will be deleted after header update, but header will still try to own.
-  // 6 starts orphaned and then deleted before header update.
-  // 7 starts orphaned and then deleted after header update.
-  std::vector<SessionID::id_type> tab_list = {0, 1, 2, 3, 4, 5};
+  // 1 will not have ownership changed.
+  // 2 will not be updated, but header will stop owning.
+  // 3 will be deleted before header stops owning.
+  // 4 will be deleted after header stops owning.
+  // 5 will be deleted before header update, but header will still try to own.
+  // 6 will be deleted after header update, but header will still try to own.
+  // 7 starts orphaned and then deleted before header update.
+  // 8 starts orphaned and then deleted after header update.
+  const std::vector<SessionID> tab_list = SessionIDs({1, 2, 3, 4, 5, 6});
   std::vector<sync_pb::SessionSpecifics> tabs;
   sync_pb::SessionSpecifics meta(
       helper()->BuildForeignSession(session_tag, tab_list, &tabs));
   AddToSyncDataList(meta, &foreign_data, stale_mtime);
   AddTabsToSyncDataList(tabs, &foreign_data);
   sync_pb::SessionSpecifics orphan6;
-  helper()->BuildTabSpecifics(session_tag, 0, 6, &orphan6);
+  helper()->BuildTabSpecifics(session_tag, kWindowId1,
+                              SessionID::FromSerializedValue(6), &orphan6);
   AddToSyncDataList(orphan6, &foreign_data, stale_mtime);
   sync_pb::SessionSpecifics orphan7;
-  helper()->BuildTabSpecifics(session_tag, 0, 7, &orphan7);
+  helper()->BuildTabSpecifics(session_tag, kWindowId1,
+                              SessionID::FromSerializedValue(7), &orphan7);
   AddToSyncDataList(orphan7, &foreign_data, stale_mtime);
 
   AddWindow();
@@ -1065,13 +1058,11 @@
   ASSERT_EQ(2U, output.size());
   output.clear();
 
-  SessionID::id_type update_ids[] = {0, 4, 5};
-  std::vector<SessionID::id_type> update_list(
-      update_ids, update_ids + arraysize(update_ids));
+  const std::vector<SessionID> update_list = SessionIDs({1, 5, 6});
   sync_pb::SessionWindow* window = meta.mutable_header()->mutable_window(0);
   window->clear_tab();
-  for (int i : update_ids) {
-    window->add_tab(i);
+  for (SessionID i : update_list) {
+    window->add_tab(i.id());
   }
 
   SyncChangeList changes;
@@ -1088,7 +1079,7 @@
   ASSERT_TRUE(manager()->GetOpenTabsUIDelegate()->GetAllForeignSessions(
       &foreign_sessions));
   ASSERT_EQ(1U, foreign_sessions.size());
-  std::vector<std::vector<SessionID::id_type>> session_reference;
+  std::vector<std::vector<SessionID>> session_reference;
   session_reference.push_back(update_list);
   helper()->VerifySyncedSession(session_tag, session_reference,
                                 *(foreign_sessions[0]));
@@ -1107,31 +1098,31 @@
   // Add several tabs that shadow eachother, in that they share tab_ids. They
   // will, thanks to the helper, have unique tab_node_ids.
   sync_pb::SessionSpecifics tab1A;
-  helper()->BuildTabSpecifics(session_tag, 0, 1, &tab1A);
+  helper()->BuildTabSpecifics(session_tag, kWindowId1, kTabIds1[0], &tab1A);
   AddToSyncDataList(tab1A, &foreign_data,
                     stale_mtime + base::TimeDelta::FromMinutes(1));
 
   sync_pb::SessionSpecifics tab1B;
-  helper()->BuildTabSpecifics(session_tag, 0, 1, &tab1B);
+  helper()->BuildTabSpecifics(session_tag, kWindowId1, kTabIds1[0], &tab1B);
   AddToSyncDataList(tab1B, &foreign_data,
                     stale_mtime + base::TimeDelta::FromMinutes(2));
 
   sync_pb::SessionSpecifics tab1C;
-  helper()->BuildTabSpecifics(session_tag, 0, 1, &tab1C);
+  helper()->BuildTabSpecifics(session_tag, kWindowId1, kTabIds1[0], &tab1C);
   AddToSyncDataList(tab1C, &foreign_data, stale_mtime);
 
   sync_pb::SessionSpecifics tab2A;
-  helper()->BuildTabSpecifics(session_tag, 0, 2, &tab2A);
+  helper()->BuildTabSpecifics(session_tag, kWindowId1, kTabIds1[1], &tab2A);
   AddToSyncDataList(tab2A, &foreign_data,
                     stale_mtime + base::TimeDelta::FromMinutes(1));
 
   sync_pb::SessionSpecifics tab2B;
-  helper()->BuildTabSpecifics(session_tag, 0, 2, &tab2B);
+  helper()->BuildTabSpecifics(session_tag, kWindowId1, kTabIds1[1], &tab2B);
   AddToSyncDataList(tab2B, &foreign_data,
                     stale_mtime + base::TimeDelta::FromMinutes(2));
 
   sync_pb::SessionSpecifics tab2C;
-  helper()->BuildTabSpecifics(session_tag, 0, 2, &tab2C);
+  helper()->BuildTabSpecifics(session_tag, kWindowId1, kTabIds1[1], &tab2C);
   AddToSyncDataList(tab2C, &foreign_data, stale_mtime);
 
   AddWindow();
@@ -1142,10 +1133,10 @@
 
   // Verify that cleanup post-merge cleanup correctly removes all tabs objects.
   const sessions::SessionTab* tab;
-  ASSERT_FALSE(
-      manager()->session_tracker_.LookupSessionTab(session_tag, 1, &tab));
-  ASSERT_FALSE(
-      manager()->session_tracker_.LookupSessionTab(session_tag, 2, &tab));
+  ASSERT_FALSE(manager()->session_tracker_.LookupSessionTab(session_tag,
+                                                            kTabIds1[0], &tab));
+  ASSERT_FALSE(manager()->session_tracker_.LookupSessionTab(session_tag,
+                                                            kTabIds1[1], &tab));
 
   std::set<int> tab_node_ids;
   manager()->session_tracker_.LookupForeignTabNodeIds(session_tag,
@@ -1184,17 +1175,20 @@
   int tab_node_id_unique = 14;
 
   sync_pb::SessionSpecifics tab1A;
-  helper()->BuildTabSpecifics(session_tag, 0, 1, tab_node_id_shared, &tab1A);
+  helper()->BuildTabSpecifics(session_tag, kWindowId1, kTabIds1[1],
+                              tab_node_id_shared, &tab1A);
   AddToSyncDataList(tab1A, &foreign_data,
                     stale_mtime + base::TimeDelta::FromMinutes(1));
 
   sync_pb::SessionSpecifics tab1B;
-  helper()->BuildTabSpecifics(session_tag, 0, 1, tab_node_id_unique, &tab1B);
+  helper()->BuildTabSpecifics(session_tag, kWindowId1, kTabIds1[1],
+                              tab_node_id_unique, &tab1B);
   AddToSyncDataList(tab1B, &foreign_data,
                     stale_mtime + base::TimeDelta::FromMinutes(2));
 
   sync_pb::SessionSpecifics tab2A;
-  helper()->BuildTabSpecifics(session_tag, 0, 2, tab_node_id_shared, &tab2A);
+  helper()->BuildTabSpecifics(session_tag, kWindowId1, kTabIds1[2],
+                              tab_node_id_shared, &tab2A);
   AddToSyncDataList(tab2A, &foreign_data,
                     stale_mtime + base::TimeDelta::FromMinutes(1));
 
@@ -1304,7 +1298,7 @@
 // while cleaning up bad foreign data, see https://crbug.com/604657.
 TEST_F(SessionsSyncManagerTest, MergeDeletesBadHash) {
   SyncDataList foreign_data;
-  std::vector<SessionID::id_type> empty_ids;
+  std::vector<SessionID> empty_ids;
   std::vector<sync_pb::SessionSpecifics> empty_tabs;
   sync_pb::EntitySpecifics entity;
 
@@ -1322,12 +1316,12 @@
 
   const std::string good_tag_tab = "good_tag_tab";
   sync_pb::SessionSpecifics good_tab;
-  helper()->BuildTabSpecifics(good_tag_tab, 0, 1, &good_tab);
+  helper()->BuildTabSpecifics(good_tag_tab, kWindowId1, kTabIds1[0], &good_tab);
   foreign_data.push_back(CreateRemoteData(good_tab));
 
   const std::string bad_tab_tag = "bad_tab_tag";
   sync_pb::SessionSpecifics bad_tab;
-  helper()->BuildTabSpecifics(bad_tab_tag, 0, 2, &bad_tab);
+  helper()->BuildTabSpecifics(bad_tab_tag, kWindowId1, kTabIds1[1], &bad_tab);
   entity.mutable_session()->CopyFrom(bad_tab);
   foreign_data.push_back(
       SyncData::CreateRemoteData(1, entity, base::Time(), "bad_tab_tag_hash"));
@@ -1374,7 +1368,7 @@
   SyncChangeList out;
   // Init with no local data, relies on MergeLocalSessionNoTabs.
   TestSyncedWindowDelegate* window = AddWindow();
-  SessionID::id_type window_id = window->GetSessionId();
+  SessionID window_id = window->GetSessionId();
   InitWithSyncDataTakeOutput(SyncDataList(), &out);
   ASSERT_FALSE(manager()->current_machine_tag().empty());
   ASSERT_EQ(2U, out.size());
@@ -1459,11 +1453,9 @@
 
   {
     std::string session_tag = "tag1";
-    SessionID::id_type n[] = {1, 2};
-    std::vector<SessionID::id_type> tab_list(n, n + arraysize(n));
     std::vector<sync_pb::SessionSpecifics> tabs;
     sync_pb::SessionSpecifics meta(
-        helper()->BuildForeignSession(session_tag, tab_list, &tabs));
+        helper()->BuildForeignSession(session_tag, SessionIDs({1, 2}), &tabs));
     AddToSyncDataList(tabs[0], &foreign_data, newest_time);
     AddToSyncDataList(meta, &foreign_data, middle_time);
     AddToSyncDataList(tabs[1], &foreign_data, oldest_time);
@@ -1471,11 +1463,9 @@
 
   {
     std::string session_tag = "tag2";
-    SessionID::id_type n[] = {3, 4};
-    std::vector<SessionID::id_type> tab_list(n, n + arraysize(n));
     std::vector<sync_pb::SessionSpecifics> tabs;
     sync_pb::SessionSpecifics meta(
-        helper()->BuildForeignSession(session_tag, tab_list, &tabs));
+        helper()->BuildForeignSession(session_tag, SessionIDs({3, 4}), &tabs));
     AddToSyncDataList(tabs[0], &foreign_data, middle_time);
     AddToSyncDataList(meta, &foreign_data, newest_time);
     AddToSyncDataList(tabs[1], &foreign_data, oldest_time);
@@ -1483,11 +1473,9 @@
 
   {
     std::string session_tag = "tag3";
-    SessionID::id_type n[] = {5, 6};
-    std::vector<SessionID::id_type> tab_list(n, n + arraysize(n));
     std::vector<sync_pb::SessionSpecifics> tabs;
     sync_pb::SessionSpecifics meta(
-        helper()->BuildForeignSession(session_tag, tab_list, &tabs));
+        helper()->BuildForeignSession(session_tag, SessionIDs({5, 6}), &tabs));
     AddToSyncDataList(tabs[0], &foreign_data, oldest_time);
     AddToSyncDataList(meta, &foreign_data, middle_time);
     AddToSyncDataList(tabs[1], &foreign_data, newest_time);
@@ -1511,16 +1499,12 @@
 // Test garbage collection of stale foreign sessions.
 TEST_F(SessionsSyncManagerTest, DoGarbageCollection) {
   // Fill two instances of session specifics with a foreign session's data.
-  std::vector<SessionID::id_type> tab_list1(std::begin(kTabIds1),
-                                            std::end(kTabIds1));
   std::vector<sync_pb::SessionSpecifics> tabs1;
   sync_pb::SessionSpecifics meta(
-      helper()->BuildForeignSession(kTag1, tab_list1, &tabs1));
-  std::vector<SessionID::id_type> tab_list2(std::begin(kTabIds2),
-                                            std::end(kTabIds2));
+      helper()->BuildForeignSession(kTag1, kTabIds1, &tabs1));
   std::vector<sync_pb::SessionSpecifics> tabs2;
   sync_pb::SessionSpecifics meta2(
-      helper()->BuildForeignSession(kTag2, tab_list2, &tabs2));
+      helper()->BuildForeignSession(kTag2, kTabIds2, &tabs2));
   // Set the modification time for tag1 to be 21 days ago, tag2 to 5 days ago.
   base::Time tag1_time = base::Time::Now() - base::TimeDelta::FromDays(21);
   base::Time tag2_time = base::Time::Now() - base::TimeDelta::FromDays(5);
@@ -1557,8 +1541,8 @@
   ASSERT_TRUE(manager()->GetOpenTabsUIDelegate()->GetAllForeignSessions(
       &foreign_sessions));
   ASSERT_EQ(1U, foreign_sessions.size());
-  std::vector<std::vector<SessionID::id_type>> session_reference;
-  session_reference.push_back(tab_list2);
+  std::vector<std::vector<SessionID>> session_reference;
+  session_reference.push_back(kTabIds2);
   helper()->VerifySyncedSession(kTag2, session_reference,
                                 *(foreign_sessions[0]));
 }
@@ -1570,10 +1554,9 @@
   {
     // A stale session with empty header
     std::string session_tag = "tag1";
-    std::vector<SessionID::id_type> tab_list;
     std::vector<sync_pb::SessionSpecifics> tabs;
     sync_pb::SessionSpecifics meta(
-        helper()->BuildForeignSession(session_tag, tab_list, &tabs));
+        helper()->BuildForeignSession(session_tag, {}, &tabs));
     AddToSyncDataList(meta, &foreign_data, stale_mtime);
   }
 
@@ -1581,18 +1564,16 @@
     // A stale session with orphans w/o header
     std::string session_tag = "tag2";
     sync_pb::SessionSpecifics orphan;
-    helper()->BuildTabSpecifics(session_tag, 0, 1, &orphan);
+    helper()->BuildTabSpecifics(session_tag, kWindowId1, kTabIds1[1], &orphan);
     AddToSyncDataList(orphan, &foreign_data, stale_mtime);
   }
 
   {
     // A stale session with valid header/tab and an orphaned tab.
     std::string session_tag = "tag3";
-    SessionID::id_type n[] = {2};
-    std::vector<SessionID::id_type> tab_list(n, n + arraysize(n));
     std::vector<sync_pb::SessionSpecifics> tabs;
     sync_pb::SessionSpecifics meta(
-        helper()->BuildForeignSession(session_tag, tab_list, &tabs));
+        helper()->BuildForeignSession(session_tag, SessionIDs({2}), &tabs));
 
     // BuildForeignSession(...) will use a window id of 0, and we're also
     // passing a window id of 0 to BuildTabSpecifics(...) here.  It doesn't
@@ -1600,7 +1581,7 @@
     // world orphans often reference real/still valid windows, but they're
     // orphans because the window/header doesn't reference back to them.
     sync_pb::SessionSpecifics orphan;
-    helper()->BuildTabSpecifics(session_tag, 0, 1, &orphan);
+    helper()->BuildTabSpecifics(session_tag, kWindowId1, kTabIds1[1], &orphan);
     AddToSyncDataList(orphan, &foreign_data, stale_mtime);
 
     AddToSyncDataList(tabs[0], &foreign_data, stale_mtime);
@@ -1631,11 +1612,9 @@
 // Test that an update to a previously considered "stale" session,
 // prior to garbage collection, will save the session from deletion.
 TEST_F(SessionsSyncManagerTest, GarbageCollectionHonoursUpdate) {
-  std::vector<SessionID::id_type> tab_list1(std::begin(kTabIds1),
-                                            std::end(kTabIds1));
   std::vector<sync_pb::SessionSpecifics> tabs1;
   sync_pb::SessionSpecifics meta(
-      helper()->BuildForeignSession(kTag1, tab_list1, &tabs1));
+      helper()->BuildForeignSession(kTag1, kTabIds1, &tabs1));
   SyncDataList foreign_data;
   base::Time tag1_time = base::Time::Now() - base::TimeDelta::FromDays(21);
   foreign_data.push_back(CreateRemoteData(meta, tag1_time));
@@ -1665,8 +1644,8 @@
   ASSERT_TRUE(manager()->GetOpenTabsUIDelegate()->GetAllForeignSessions(
       &foreign_sessions));
   ASSERT_EQ(1U, foreign_sessions.size());
-  std::vector<std::vector<SessionID::id_type>> session_reference;
-  session_reference.push_back(tab_list1);
+  std::vector<std::vector<SessionID>> session_reference;
+  session_reference.push_back(kTabIds1);
   helper()->VerifySyncedSession(kTag1, session_reference,
                                 *(foreign_sessions[0]));
 }
@@ -1677,11 +1656,9 @@
   ASSERT_FALSE(observer()->notified_of_update());
   InitWithNoSyncData();
 
-  SessionID::id_type n[] = {5};
   std::vector<sync_pb::SessionSpecifics> tabs1;
-  std::vector<SessionID::id_type> tab_list(n, n + arraysize(n));
   sync_pb::SessionSpecifics meta(
-      helper()->BuildForeignSession("tag1", tab_list, &tabs1));
+      helper()->BuildForeignSession("tag1", SessionIDs({5}), &tabs1));
 
   SyncChangeList changes;
   changes.push_back(MakeRemoteChange(meta, SyncChange::ACTION_ADD));
@@ -1706,11 +1683,9 @@
 TEST_F(SessionsSyncManagerTest, NotifiedOfLocalRemovalOfForeignSession) {
   InitWithNoSyncData();
   const std::string tag("tag1");
-  SessionID::id_type n[] = {5};
   std::vector<sync_pb::SessionSpecifics> tabs1;
-  std::vector<SessionID::id_type> tab_list(n, n + arraysize(n));
   sync_pb::SessionSpecifics meta(
-      helper()->BuildForeignSession(tag, tab_list, &tabs1));
+      helper()->BuildForeignSession(tag, SessionIDs({5}), &tabs1));
 
   SyncChangeList changes;
   changes.push_back(MakeRemoteChange(meta, SyncChange::ACTION_ADD));
@@ -1729,11 +1704,9 @@
   std::string tag = "tag1";
 
   // Reuse tab ID 10 in an attempt to trigger bad behavior.
-  std::vector<SessionID::id_type> tab_list1(std::begin(kTabIds1),
-                                            std::end(kTabIds1));
   std::vector<sync_pb::SessionSpecifics> tabs1;
   sync_pb::SessionSpecifics meta(
-      helper()->BuildForeignSession(tag, tab_list1, &tabs1));
+      helper()->BuildForeignSession(tag, kTabIds1, &tabs1));
 
   // Set up initial data.
   SyncDataList initial_data;
@@ -1751,16 +1724,16 @@
 // anything reasonable with this input, but we can expect that it doesn't
 // crash.
 TEST_F(SessionsSyncManagerTest, ReceiveDuplicateTabInOtherWindow) {
-  std::vector<SessionID::id_type> tab_list1(std::begin(kTabIds1),
-                                            std::end(kTabIds1));
+  // Tab ID 10 is a duplicate.
+  const std::vector<SessionID> tab_list1 = SessionIDs({5, 10, 15});
+  const std::vector<SessionID> tab_list2 = SessionIDs({7, 10, 17});
+
   std::vector<sync_pb::SessionSpecifics> tabs1;
   sync_pb::SessionSpecifics meta(
       helper()->BuildForeignSession(kTag1, tab_list1, &tabs1));
 
   // Add a second window.  Tab ID 10 is a duplicate.
-  std::vector<SessionID::id_type> tab_list2(std::begin(kTabIds2),
-                                            std::end(kTabIds2));
-  helper()->AddWindowSpecifics(1, tab_list2, &meta);
+  helper()->AddWindowSpecifics(kWindowId2, tab_list2, &meta);
 
   // Set up initial data.
   SyncDataList initial_data;
@@ -1769,9 +1742,9 @@
   initial_data.push_back(CreateRemoteData(entity));
   AddTabsToSyncDataList(tabs1, &initial_data);
 
-  for (size_t i = 0; i < tab_list2.size(); ++i) {
+  for (SessionID tab_id : tab_list2) {
     sync_pb::EntitySpecifics entity;
-    helper()->BuildTabSpecifics(kTag1, 0, tab_list2[i],
+    helper()->BuildTabSpecifics(kTag1, kWindowId1, tab_id,
                                 entity.mutable_session());
     initial_data.push_back(CreateRemoteData(entity));
   }
@@ -1783,11 +1756,9 @@
 // Tests receipt of multiple unassociated tabs and makes sure that
 // the ones with later timestamp win
 TEST_F(SessionsSyncManagerTest, ReceiveDuplicateUnassociatedTabs) {
-  std::vector<SessionID::id_type> tab_list1(std::begin(kTabIds1),
-                                            std::end(kTabIds1));
   std::vector<sync_pb::SessionSpecifics> tabs1;
   sync_pb::SessionSpecifics meta(
-      helper()->BuildForeignSession(kTag1, tab_list1, &tabs1));
+      helper()->BuildForeignSession(kTag1, kTabIds1, &tabs1));
 
   // Set up initial data.
   SyncDataList initial_data;
@@ -1806,14 +1777,16 @@
   // These two tabs get a different visual indices to distinguish them from the
   // tabs above that get visual index 1 by default.
   sync_pb::SessionSpecifics duplicating_tab1;
-  helper()->BuildTabSpecifics(kTag1, 0, kTabIds1[1], &duplicating_tab1);
+  helper()->BuildTabSpecifics(kTag1, kWindowId1, kTabIds1[1],
+                              &duplicating_tab1);
   duplicating_tab1.mutable_tab()->set_tab_visual_index(2);
   entity.mutable_session()->CopyFrom(duplicating_tab1);
   initial_data.push_back(
       CreateRemoteData(entity, base::Time::FromDoubleT(1000)));
 
   sync_pb::SessionSpecifics duplicating_tab2;
-  helper()->BuildTabSpecifics(kTag1, 0, kTabIds1[2], &duplicating_tab2);
+  helper()->BuildTabSpecifics(kTag1, kWindowId1, kTabIds1[2],
+                              &duplicating_tab2);
   duplicating_tab2.mutable_tab()->set_tab_visual_index(3);
   entity.mutable_session()->CopyFrom(duplicating_tab2);
   initial_data.push_back(
@@ -1827,7 +1800,9 @@
       &foreign_sessions));
 
   const std::vector<std::unique_ptr<sessions::SessionTab>>& window_tabs =
-      foreign_sessions[0]->windows.find(0)->second->wrapped_window.tabs;
+      foreign_sessions[0]
+          ->windows.find(kWindowId1)
+          ->second->wrapped_window.tabs;
   ASSERT_EQ(4U, window_tabs.size());
   // The first one is from the original set of tabs.
   ASSERT_EQ(1, window_tabs[0]->tab_visual_index);
@@ -1839,16 +1814,13 @@
 
 // Verify that GetAllForeignSessions returns all sessions sorted by recency.
 TEST_F(SessionsSyncManagerTest, GetAllForeignSessions) {
-  std::vector<SessionID::id_type> tab_list(std::begin(kTabIds1),
-                                           std::end(kTabIds1));
-
   std::vector<sync_pb::SessionSpecifics> tabs1;
   sync_pb::SessionSpecifics meta1(
-      helper()->BuildForeignSession(kTag1, tab_list, &tabs1));
+      helper()->BuildForeignSession(kTag1, kTabIds1, &tabs1));
 
   std::vector<sync_pb::SessionSpecifics> tabs2;
   sync_pb::SessionSpecifics meta2(
-      helper()->BuildForeignSession(kTag2, tab_list, &tabs2));
+      helper()->BuildForeignSession(kTag2, kTabIds1, &tabs2));
 
   SyncDataList initial_data;
   initial_data.push_back(
@@ -1872,15 +1844,11 @@
 // Verify that GetForeignSessionTabs returns all tabs for a session sorted
 // by recency.
 TEST_F(SessionsSyncManagerTest, GetForeignSessionTabs) {
-  std::vector<SessionID::id_type> tab_list1(std::begin(kTabIds1),
-                                            std::end(kTabIds1));
   std::vector<sync_pb::SessionSpecifics> tabs1;
   sync_pb::SessionSpecifics meta(
-      helper()->BuildForeignSession(kTag1, tab_list1, &tabs1));
+      helper()->BuildForeignSession(kTag1, kTabIds1, &tabs1));
   // Add a second window.
-  std::vector<SessionID::id_type> tab_list2(std::begin(kTabIds2),
-                                            std::end(kTabIds2));
-  helper()->AddWindowSpecifics(1, tab_list2, &meta);
+  helper()->AddWindowSpecifics(kWindowId2, kTabIds2, &meta);
 
   // Set up initial data.
   SyncDataList initial_data;
@@ -1890,9 +1858,9 @@
   AddTabsToSyncDataList(tabs1, &initial_data);
 
   // Add the second window's tabs.
-  for (size_t i = 0; i < tab_list2.size(); ++i) {
+  for (size_t i = 0; i < kTabIds2.size(); ++i) {
     sync_pb::EntitySpecifics entity;
-    helper()->BuildTabSpecifics(kTag1, 0, tab_list2[i],
+    helper()->BuildTabSpecifics(kTag1, kWindowId1, kTabIds2[i],
                                 entity.mutable_session());
     // Order the tabs oldest to most recent and left to right visually.
     initial_data.push_back(
@@ -1907,7 +1875,7 @@
       manager()->GetOpenTabsUIDelegate()->GetForeignSessionTabs(kTag1, &tabs));
   // Assert that the size matches the total number of tabs and that the order
   // is from most recent to least.
-  ASSERT_EQ(tab_list1.size() + tab_list2.size(), tabs.size());
+  ASSERT_EQ(kTabIds1.size() + kTabIds2.size(), tabs.size());
   base::Time last_time;
   for (size_t i = 0; i < tabs.size(); ++i) {
     base::Time this_time = tabs[i]->timestamp;
@@ -1920,7 +1888,7 @@
 // Ensure model association associates the pre-existing tabs.
 TEST_F(SessionsSyncManagerTest, SwappedOutOnRestore) {
   const int kRestoredTabId = 1337;
-  const int kNewTabId = 2468;
+  const SessionID kNewTabId = SessionID::FromSerializedValue(2468);
 
   // Start with three tabs in a window.
   TestSyncedWindowDelegate* window = AddWindow();
@@ -1953,7 +1921,8 @@
   manager()->StopSyncing(syncer::SESSIONS);
 
   PlaceholderTabDelegate t1_override(kNewTabId, 1);
-  PlaceholderTabDelegate t2_override(t2_entity.session().tab().tab_id(), 2);
+  PlaceholderTabDelegate t2_override(
+      SessionID::FromSerializedValue(t2_entity.session().tab().tab_id()), 2);
   window->OverrideTabAt(1, &t1_override);
   window->OverrideTabAt(2, &t2_override);
   InitWithSyncDataTakeOutput(in, &out);
@@ -1994,8 +1963,9 @@
   ResetWindows();
 
   // Override the tab with a placeholder tab delegate.
-  PlaceholderTabDelegate t0_override(t0_entity.session().tab().tab_id(),
-                                     t0_entity.session().tab_node_id());
+  PlaceholderTabDelegate t0_override(
+      SessionID::FromSerializedValue(t0_entity.session().tab().tab_id()),
+      t0_entity.session().tab_node_id());
 
   // Set up the window with the new window ID and placeholder tab.
   window = AddWindow();
@@ -2005,7 +1975,7 @@
   // There should be one change for t0's window ID update.
   ASSERT_EQ(1U, FilterOutLocalHeaderChanges(&out)->size());
   VerifyLocalTabChange(out[0], 1, kFoo1);
-  EXPECT_EQ(window->GetSessionId(),
+  EXPECT_EQ(window->GetSessionId().id(),
             out[0].sync_data().GetSpecifics().session().tab().window_id());
 }
 
@@ -2029,8 +1999,9 @@
   manager()->StopSyncing(syncer::SESSIONS);
 
   // Override the tab with a placeholder tab delegate.
-  PlaceholderTabDelegate t0_override(t0_entity.session().tab().tab_id(),
-                                     t0_entity.session().tab_node_id());
+  PlaceholderTabDelegate t0_override(
+      SessionID::FromSerializedValue(t0_entity.session().tab().tab_id()),
+      t0_entity.session().tab_node_id());
 
   // Override the tab with a placeholder whose sync entity won't exist.
   window->OverrideTabAt(0, &t0_override);
@@ -2061,7 +2032,7 @@
   // but a different tab id.
   TestSyncedWindowDelegate* window2 = AddWindow();
   int sync_id = out[1].sync_data().GetSpecifics().session().tab_node_id();
-  PlaceholderTabDelegate tab2(SessionID().id(), sync_id);
+  PlaceholderTabDelegate tab2(SessionID::NewUnique(), sync_id);
   window2->OverrideTabAt(0, &tab2);
 
   // Resync, reusing the old sync data.
@@ -2078,7 +2049,7 @@
       out, {SyncChange::ACTION_ADD, SyncChange::ACTION_UPDATE}));
   VerifyLocalHeaderChange(out[1], 1, 1);
   VerifyLocalTabChange(out[0], 1, kFoo1);
-  EXPECT_EQ(tab1->GetSessionId(),
+  EXPECT_EQ(tab1->GetSessionId().id(),
             out[0].sync_data().GetSpecifics().session().tab().tab_id());
   EXPECT_EQ(tab1->GetSyncId(),
             out[0].sync_data().GetSpecifics().session().tab_node_id());
@@ -2089,7 +2060,7 @@
   SyncChangeList changes;
   TestSyncedWindowDelegate* window = AddWindow();
   InitWithSyncDataTakeOutput(SyncDataList(), &changes);
-  SessionID::id_type window_id = window->GetSessionId();
+  SessionID window_id = window->GetSessionId();
   ASSERT_FALSE(manager()->current_machine_tag().empty());
   changes.clear();
 
diff --git a/components/sync_sessions/synced_session.h b/components/sync_sessions/synced_session.h
index f6c37f4..293a43b 100644
--- a/components/sync_sessions/synced_session.h
+++ b/components/sync_sessions/synced_session.h
@@ -57,7 +57,7 @@
   base::Time modified_time;
 
   // Map of windows that make up this session.
-  std::map<SessionID::id_type, std::unique_ptr<SyncedSessionWindow>> windows;
+  std::map<SessionID, std::unique_ptr<SyncedSessionWindow>> windows;
 
   // A tab node id is part of the identifier for the sync tab objects. Tab node
   // ids are not used for interacting with the model/browser tabs. However, when
diff --git a/components/sync_sessions/synced_session_tracker.cc b/components/sync_sessions/synced_session_tracker.cc
index 173ebd16..00e82f8 100644
--- a/components/sync_sessions/synced_session_tracker.cc
+++ b/components/sync_sessions/synced_session_tracker.cc
@@ -70,8 +70,10 @@
     SyncedSessionTracker* tracker) {
   sessions::SessionWindow* session_window =
       &synced_session_window->wrapped_window;
-  if (specifics.has_window_id())
-    session_window->window_id.set_id(specifics.window_id());
+  if (specifics.has_window_id()) {
+    session_window->window_id =
+        SessionID::FromSerializedValue(specifics.window_id());
+  }
   if (specifics.has_selected_tab_index())
     session_window->selected_tab_index = specifics.selected_tab_index();
   synced_session_window->window_type = specifics.browser_type();
@@ -88,9 +90,8 @@
   session_window->timestamp = mtime;
   session_window->tabs.clear();
   for (int i = 0; i < specifics.tab_size(); i++) {
-    SessionID::id_type tab_id = specifics.tab(i);
-    tracker->PutTabInWindow(session_tag, session_window->window_id.id(),
-                            tab_id);
+    SessionID tab_id = SessionID::FromSerializedValue(specifics.tab(i));
+    tracker->PutTabInWindow(session_tag, session_window->window_id, tab_id);
   }
 }
 
@@ -115,7 +116,7 @@
 
   for (int i = 0; i < num_windows; ++i) {
     const sync_pb::SessionWindow& window_s = header_specifics.window(i);
-    SessionID::id_type window_id = window_s.window_id();
+    SessionID window_id = SessionID::FromSerializedValue(window_s.window_id());
     tracker->PutWindowInSession(session_tag, window_id);
     PopulateSyncedSessionWindowFromSpecifics(
         session_tag, window_s, synced_session->modified_time,
@@ -182,9 +183,9 @@
 
 bool SyncedSessionTracker::LookupSessionTab(
     const std::string& tag,
-    SessionID::id_type tab_id,
+    SessionID tab_id,
     const sessions::SessionTab** tab) const {
-  if (tab_id == kInvalidTabID)
+  if (!tab_id.is_valid())
     return false;
 
   DCHECK(tab);
@@ -274,7 +275,7 @@
   for (auto& window_pair : session->windows) {
     // First unmap the tabs in the window.
     for (auto& tab : window_pair.second->wrapped_window.tabs) {
-      SessionID::id_type tab_id = tab->tab_id.id();
+      SessionID tab_id = tab->tab_id;
       unmapped_tabs_[session_tag][tab_id] = std::move(tab);
     }
     window_pair.second->wrapped_window.tabs.clear();
@@ -305,13 +306,13 @@
   unmapped_tabs_[session_tag].clear();
 }
 
-bool SyncedSessionTracker::IsTabUnmappedForTesting(SessionID::id_type tab_id) {
+bool SyncedSessionTracker::IsTabUnmappedForTesting(SessionID tab_id) {
   auto it = unmapped_tabs_[local_session_tag_].find(tab_id);
   return it != unmapped_tabs_[local_session_tag_].end();
 }
 
 void SyncedSessionTracker::PutWindowInSession(const std::string& session_tag,
-                                              SessionID::id_type window_id) {
+                                              SessionID window_id) {
   if (GetSession(session_tag)->windows.find(window_id) !=
       GetSession(session_tag)->windows.end()) {
     DVLOG(1) << "Window " << window_id << " already added to session "
@@ -331,21 +332,21 @@
   } else {
     // Create the window.
     window = std::make_unique<SyncedSessionWindow>();
-    window->wrapped_window.window_id.set_id(window_id);
+    window->wrapped_window.window_id = window_id;
     synced_window_map_[session_tag][window_id] = window.get();
     DVLOG(1) << "Putting new window " << window_id << " at " << window.get()
              << "in " << (session_tag == local_session_tag_ ? "local session"
                                                             : session_tag);
   }
-  DCHECK_EQ(window->wrapped_window.window_id.id(), window_id);
+  DCHECK_EQ(window->wrapped_window.window_id, window_id);
   DCHECK(GetSession(session_tag)->windows.end() ==
          GetSession(session_tag)->windows.find(window_id));
   GetSession(session_tag)->windows[window_id] = std::move(window);
 }
 
 void SyncedSessionTracker::PutTabInWindow(const std::string& session_tag,
-                                          SessionID::id_type window_id,
-                                          SessionID::id_type tab_id) {
+                                          SessionID window_id,
+                                          SessionID tab_id) {
   // We're called here for two reasons. 1) We've received an update to the
   // SessionWindow information of a SessionHeader node for a session,
   // and 2) The SessionHeader node for our local session changed. In both cases
@@ -391,7 +392,7 @@
                << " https://crbug.com/639009";
   }
 
-  tab->window_id.set_id(window_id);
+  tab->window_id = window_id;
   DVLOG(1) << "  - tab " << tab_id << " added to window " << window_id;
   DCHECK(GetSession(session_tag)->windows.find(window_id) !=
          GetSession(session_tag)->windows.end());
@@ -407,9 +408,8 @@
 
 sessions::SessionTab* SyncedSessionTracker::GetTab(
     const std::string& session_tag,
-    SessionID::id_type tab_id) {
-  CHECK_NE(TabNodePool::kInvalidTabNodeID, tab_id)
-      << "https://crbug.com/639009";
+    SessionID tab_id) {
+  CHECK(tab_id.is_valid()) << "https://crbug.com/639009";
   sessions::SessionTab* tab_ptr = nullptr;
   auto iter = synced_tab_map_[session_tag].find(tab_id);
   if (iter != synced_tab_map_[session_tag].end()) {
@@ -429,7 +429,7 @@
   } else {
     auto tab = std::make_unique<sessions::SessionTab>();
     tab_ptr = tab.get();
-    tab->tab_id.set_id(tab_id);
+    tab->tab_id = tab_id;
     synced_tab_map_[session_tag][tab_id] = tab_ptr;
     unmapped_tabs_[session_tag][tab_id] = std::move(tab);
     DVLOG(1) << "Getting "
@@ -438,7 +438,7 @@
              << "'s new tab " << tab_id << " at " << tab_ptr;
   }
   DCHECK(tab_ptr);
-  DCHECK_EQ(tab_ptr->tab_id.id(), tab_id);
+  DCHECK_EQ(tab_ptr->tab_id, tab_id);
   return tab_ptr;
 }
 
@@ -457,7 +457,7 @@
   }
 }
 
-bool SyncedSessionTracker::GetTabNodeFromLocalTabId(SessionID::id_type tab_id,
+bool SyncedSessionTracker::GetTabNodeFromLocalTabId(SessionID tab_id,
                                                     int* tab_node_id) {
   DCHECK(!local_session_tag_.empty());
   // Ensure a placeholder SessionTab is in place, if not already. Although we
@@ -477,17 +477,16 @@
 bool SyncedSessionTracker::IsLocalTabNodeAssociated(int tab_node_id) {
   if (tab_node_id == TabNodePool::kInvalidTabNodeID)
     return false;
-  return local_tab_pool_.GetTabIdFromTabNodeId(tab_node_id) != kInvalidTabID;
+  return local_tab_pool_.GetTabIdFromTabNodeId(tab_node_id).is_valid();
 }
 
 void SyncedSessionTracker::ReassociateLocalTab(int tab_node_id,
-                                               SessionID::id_type new_tab_id) {
+                                               SessionID new_tab_id) {
   DCHECK(!local_session_tag_.empty());
   DCHECK_NE(TabNodePool::kInvalidTabNodeID, tab_node_id);
-  DCHECK_NE(kInvalidTabID, new_tab_id);
+  DCHECK(new_tab_id.is_valid());
 
-  SessionID::id_type old_tab_id =
-      local_tab_pool_.GetTabIdFromTabNodeId(tab_node_id);
+  SessionID old_tab_id = local_tab_pool_.GetTabIdFromTabNodeId(tab_node_id);
   if (new_tab_id == old_tab_id) {
     return;
   }
@@ -498,7 +497,7 @@
 
   auto new_tab_iter = synced_tab_map_[local_session_tag_].find(new_tab_id);
   auto old_tab_iter = synced_tab_map_[local_session_tag_].find(old_tab_id);
-  if (old_tab_id != kInvalidTabID &&
+  if (old_tab_id.is_valid() &&
       old_tab_iter != synced_tab_map_[local_session_tag_].end()) {
     tab_ptr = old_tab_iter->second;
     DCHECK(tab_ptr);
@@ -536,7 +535,7 @@
     // indexed.
     auto unmapped_tabs_iter =
         unmapped_tabs_[local_session_tag_].find(old_tab_id);
-    if (old_tab_id != kInvalidTabID &&
+    if (old_tab_id.is_valid() &&
         unmapped_tabs_iter != unmapped_tabs_[local_session_tag_].end()) {
       std::unique_ptr<sessions::SessionTab> tab =
           std::move(unmapped_tabs_iter->second);
@@ -553,14 +552,14 @@
   }
 
   // Update the tab id.
-  if (old_tab_id != kInvalidTabID) {
+  if (old_tab_id.is_valid()) {
     DVLOG(1) << "Remapped tab " << old_tab_id << " with node " << tab_node_id
              << " to tab " << new_tab_id;
   } else {
     DVLOG(1) << "Mapped new tab node " << tab_node_id << " to tab "
              << new_tab_id;
   }
-  tab_ptr->tab_id.set_id(new_tab_id);
+  tab_ptr->tab_id = new_tab_id;
 
   // Add the tab back into the tab map with the new id.
   synced_tab_map_[local_session_tag_][new_tab_id] = tab_ptr;
@@ -615,7 +614,7 @@
     tracker->CleanupSession(session_tag);
   } else if (specifics.has_tab()) {
     const sync_pb::SessionTab& tab_s = specifics.tab();
-    SessionID::id_type tab_id = tab_s.tab_id();
+    SessionID tab_id = SessionID::FromSerializedValue(tab_s.tab_id());
     DVLOG(1) << "Populating " << session_tag << "'s tab id " << tab_id
              << " from node " << specifics.tab_node_id();
 
diff --git a/components/sync_sessions/synced_session_tracker.h b/components/sync_sessions/synced_session_tracker.h
index 86c988bd2..db9d6224 100644
--- a/components/sync_sessions/synced_session_tracker.h
+++ b/components/sync_sessions/synced_session_tracker.h
@@ -77,7 +77,7 @@
   // Else
   // - Returns false, tab is set to null.
   bool LookupSessionTab(const std::string& session_tag,
-                        SessionID::id_type tab_id,
+                        SessionID tab_id,
                         const sessions::SessionTab** tab) const;
 
   // Allows retrieval of existing data for the local session. Unlike GetSession
@@ -109,8 +109,7 @@
   // the session did not exist yet, creates it. Ownership of the SessionWindow
   // remains within the SyncedSessionTracker.
   // Attempting to add a window to a session multiple times will have no effect.
-  void PutWindowInSession(const std::string& session_tag,
-                          SessionID::id_type window_id);
+  void PutWindowInSession(const std::string& session_tag, SessionID window_id);
 
   // Adds the tab with id |tab_id| to the window |window_id|. If none existed
   // for that session, creates one. Ownership of the SessionTab remains within
@@ -119,8 +118,8 @@
   // Note: GetSession(..) must have already been called with |session_tag| to
   // ensure we having mapping information for this session.
   void PutTabInWindow(const std::string& session_tag,
-                      SessionID::id_type window_id,
-                      SessionID::id_type tab_id);
+                      SessionID window_id,
+                      SessionID tab_id);
 
   // Adds |tab_node_id| to the session specified by |session_tag|, creating that
   // session if necessary. This is necessary to ensure that each session has an
@@ -137,7 +136,7 @@
   // TODO(zea): Replace SessionTab with a Sync specific wrapper.
   // https://crbug.com/662597
   sessions::SessionTab* GetTab(const std::string& session_tag,
-                               SessionID::id_type tab_id);
+                               SessionID tab_id);
 
   // **** Methods specific to foreign sessions. ****
 
@@ -173,7 +172,7 @@
   // Fills |tab_node_id| with a tab node for |tab_id|. Returns true if an
   // existing tab node was found, false if there was none and one had to be
   // created.
-  bool GetTabNodeFromLocalTabId(SessionID::id_type tab_id, int* tab_node_id);
+  bool GetTabNodeFromLocalTabId(SessionID tab_id, int* tab_node_id);
 
   // Returns whether |tab_node_id| refers to a valid tab node that is associated
   // with a tab.
@@ -186,7 +185,7 @@
   // If |new_tab_id| is already associated with a tab object, that tab will be
   // overwritten. Reassociating a tab with a node it is already mapped to will
   // have no effect.
-  void ReassociateLocalTab(int tab_node_id, SessionID::id_type new_tab_id);
+  void ReassociateLocalTab(int tab_node_id, SessionID new_tab_id);
 
   // **** Methods for querying/manipulating overall state ****.
 
@@ -212,7 +211,7 @@
   }
 
   // Returns whether a tab is unmapped or not.
-  bool IsTabUnmappedForTesting(SessionID::id_type tab_id);
+  bool IsTabUnmappedForTesting(SessionID tab_id);
 
  private:
   friend class SessionsSyncManagerTest;
@@ -230,9 +229,9 @@
   // the |unmapped_tabs_|/|unmapped_windows_| collections.
   //
   // Map: session tag -> (tab/window -> SessionTab*/SessionWindow*)
-  std::map<std::string, std::map<SessionID::id_type, sessions::SessionTab*>>
+  std::map<std::string, std::map<SessionID, sessions::SessionTab*>>
       synced_tab_map_;
-  std::map<std::string, std::map<SessionID::id_type, SyncedSessionWindow*>>
+  std::map<std::string, std::map<SessionID, SyncedSessionWindow*>>
       synced_window_map_;
 
   // The collection that owns the SyncedSessions, and transitively, all of the
@@ -248,10 +247,10 @@
   //
   // Map: session tag -> (tab/window id -> owned SessionTab/SessionWindow)
   std::map<std::string,
-           std::map<SessionID::id_type, std::unique_ptr<sessions::SessionTab>>>
+           std::map<SessionID, std::unique_ptr<sessions::SessionTab>>>
       unmapped_tabs_;
   std::map<std::string,
-           std::map<SessionID::id_type, std::unique_ptr<SyncedSessionWindow>>>
+           std::map<SessionID, std::unique_ptr<SyncedSessionWindow>>>
       unmapped_windows_;
 
   // The tag for this machine's local session, so we can distinguish the foreign
diff --git a/components/sync_sessions/synced_session_tracker_unittest.cc b/components/sync_sessions/synced_session_tracker_unittest.cc
index 69d99a5..c32ceb3 100644
--- a/components/sync_sessions/synced_session_tracker_unittest.cc
+++ b/components/sync_sessions/synced_session_tracker_unittest.cc
@@ -28,13 +28,19 @@
 const char kTag2[] = "tag2";
 const char kTag3[] = "tag3";
 const char kTitle[] = "title";
-const int kWindow1 = 1;
 const int kTabNode1 = 1;
 const int kTabNode2 = 2;
 const int kTabNode3 = 3;
-const int kTab1 = 15;
-const int kTab2 = 25;
-const int kTab3 = 35;
+const SessionID kWindow1 = SessionID::FromSerializedValue(1);
+const SessionID kWindow2 = SessionID::FromSerializedValue(2);
+const SessionID kWindow3 = SessionID::FromSerializedValue(3);
+const SessionID kTab1 = SessionID::FromSerializedValue(15);
+const SessionID kTab2 = SessionID::FromSerializedValue(25);
+const SessionID kTab3 = SessionID::FromSerializedValue(35);
+const SessionID kTab4 = SessionID::FromSerializedValue(45);
+const SessionID kTab5 = SessionID::FromSerializedValue(55);
+const SessionID kTab6 = SessionID::FromSerializedValue(65);
+const SessionID kTab7 = SessionID::FromSerializedValue(75);
 
 }  // namespace
 
@@ -65,7 +71,7 @@
       for (auto& window_pair : session->windows) {
         mapped_tab_count += window_pair.second->wrapped_window.tabs.size();
         for (auto& tab : window_pair.second->wrapped_window.tabs) {
-          if (tab_map_iter->second[tab->tab_id.id()] != tab.get()) {
+          if (tab_map_iter->second[tab->tab_id] != tab.get()) {
             return AssertionFailure()
                    << "Mapped tab " << tab->tab_id.id()
                    << " does not match synced tab map " << tab->tab_id.id();
@@ -80,12 +86,12 @@
         tracker_.unmapped_tabs_.end()) {
       unmapped_tab_count = tracker_.unmapped_tabs_[session_tag].size();
       for (const auto& tab_pair : tracker_.unmapped_tabs_[session_tag]) {
-        if (tab_pair.first != tab_pair.second->tab_id.id()) {
+        if (tab_pair.first != tab_pair.second->tab_id) {
           return AssertionFailure()
                  << "Unmapped tab " << tab_pair.second->tab_id.id()
                  << " associated with wrong tab " << tab_pair.first;
         }
-        if (tab_map_iter->second[tab_pair.second->tab_id.id()] !=
+        if (tab_map_iter->second[tab_pair.second->tab_id] !=
             tab_pair.second.get()) {
           return AssertionFailure()
                  << "Unmapped tab " << tab_pair.second->tab_id.id()
@@ -119,30 +125,30 @@
 }
 
 TEST_F(SyncedSessionTrackerTest, GetTabUnmapped) {
-  sessions::SessionTab* tab = GetTracker()->GetTab(kTag, 0);
-  ASSERT_EQ(tab, GetTracker()->GetTab(kTag, 0));
+  sessions::SessionTab* tab = GetTracker()->GetTab(kTag, kTab1);
+  ASSERT_EQ(tab, GetTracker()->GetTab(kTag, kTab1));
   // Should clean up memory on its own.
 }
 
 TEST_F(SyncedSessionTrackerTest, PutWindowInSession) {
-  GetTracker()->PutWindowInSession(kTag, 0);
+  GetTracker()->PutWindowInSession(kTag, kWindow1);
   SyncedSession* session = GetTracker()->GetSession(kTag);
   ASSERT_EQ(1U, session->windows.size());
 
   // Doing it again should have no effect.
-  GetTracker()->PutWindowInSession(kTag, 0);
+  GetTracker()->PutWindowInSession(kTag, kWindow1);
   ASSERT_EQ(1U, session->windows.size());
   // Should clean up memory on its own.
 }
 
 TEST_F(SyncedSessionTrackerTest, PutTabInWindow) {
-  GetTracker()->PutWindowInSession(kTag, 10);
-  GetTracker()->PutTabInWindow(kTag, 10, 15);  // win id 10, tab id 15
+  GetTracker()->PutWindowInSession(kTag, kWindow1);
+  GetTracker()->PutTabInWindow(kTag, kWindow1, kTab1);
   SyncedSession* session = GetTracker()->GetSession(kTag);
   ASSERT_EQ(1U, session->windows.size());
-  ASSERT_EQ(1U, session->windows[10]->wrapped_window.tabs.size());
-  ASSERT_EQ(GetTracker()->GetTab(kTag, 15),
-            session->windows[10]->wrapped_window.tabs[0].get());
+  ASSERT_EQ(1U, session->windows[kWindow1]->wrapped_window.tabs.size());
+  ASSERT_EQ(GetTracker()->GetTab(kTag, kTab1),
+            session->windows[kWindow1]->wrapped_window.tabs[0].get());
   ASSERT_TRUE(VerifyTabIntegrity(kTag));
   // Should clean up memory on its own.
 }
@@ -156,18 +162,18 @@
   ASSERT_FALSE(GetTracker()->LookupAllForeignSessions(
       &sessions, SyncedSessionTracker::PRESENTABLE));
   GetTracker()->GetSession(kTag);
-  GetTracker()->PutWindowInSession(kTag, 0);
-  GetTracker()->PutTabInWindow(kTag, 0, 15);
-  sessions::SessionTab* tab = GetTracker()->GetTab(kTag, 15);
+  GetTracker()->PutWindowInSession(kTag, kWindow1);
+  GetTracker()->PutTabInWindow(kTag, kWindow1, kTab1);
+  sessions::SessionTab* tab = GetTracker()->GetTab(kTag, kTab1);
   ASSERT_TRUE(tab);
   tab->navigations.push_back(
       sessions::SerializedNavigationEntryTestHelper::CreateNavigation(kValidUrl,
                                                                       kTitle));
   GetTracker()->GetSession(kTag2);
   GetTracker()->GetSession(kTag3);
-  GetTracker()->PutWindowInSession(kTag3, 0);
-  GetTracker()->PutTabInWindow(kTag3, 0, 15);
-  tab = GetTracker()->GetTab(kTag3, 15);
+  GetTracker()->PutWindowInSession(kTag3, kWindow1);
+  GetTracker()->PutTabInWindow(kTag3, kWindow1, kTab1);
+  tab = GetTracker()->GetTab(kTag3, kTab1);
   ASSERT_TRUE(tab);
   tab->navigations.push_back(
       sessions::SerializedNavigationEntryTestHelper::CreateNavigation(
@@ -187,11 +193,11 @@
   std::vector<const sessions::SessionWindow*> windows;
   ASSERT_FALSE(GetTracker()->LookupSessionWindows(kTag, &windows));
   GetTracker()->GetSession(kTag);
-  GetTracker()->PutWindowInSession(kTag, 0);
-  GetTracker()->PutWindowInSession(kTag, 2);
+  GetTracker()->PutWindowInSession(kTag, kWindow1);
+  GetTracker()->PutWindowInSession(kTag, kWindow2);
   GetTracker()->GetSession(kTag2);
-  GetTracker()->PutWindowInSession(kTag2, 0);
-  GetTracker()->PutWindowInSession(kTag2, 2);
+  GetTracker()->PutWindowInSession(kTag2, kWindow1);
+  GetTracker()->PutWindowInSession(kTag2, kWindow2);
   ASSERT_TRUE(GetTracker()->LookupSessionWindows(kTag, &windows));
   ASSERT_EQ(2U, windows.size());  // Only windows from kTag session.
   ASSERT_NE((sessions::SessionWindow*)nullptr, windows[0]);
@@ -201,12 +207,13 @@
 
 TEST_F(SyncedSessionTrackerTest, LookupSessionTab) {
   const sessions::SessionTab* tab;
-  ASSERT_FALSE(GetTracker()->LookupSessionTab(kTag, kInvalidTabID, &tab));
-  ASSERT_FALSE(GetTracker()->LookupSessionTab(kTag, 5, &tab));
+  ASSERT_FALSE(
+      GetTracker()->LookupSessionTab(kTag, SessionID::InvalidValue(), &tab));
+  ASSERT_FALSE(GetTracker()->LookupSessionTab(kTag, kTab1, &tab));
   GetTracker()->GetSession(kTag);
-  GetTracker()->PutWindowInSession(kTag, 0);
-  GetTracker()->PutTabInWindow(kTag, 0, 5);
-  ASSERT_TRUE(GetTracker()->LookupSessionTab(kTag, 5, &tab));
+  GetTracker()->PutWindowInSession(kTag, kWindow1);
+  GetTracker()->PutTabInWindow(kTag, kWindow1, kTab1);
+  ASSERT_TRUE(GetTracker()->LookupSessionTab(kTag, kTab1, &tab));
   ASSERT_NE((sessions::SessionTab*)nullptr, tab);
 }
 
@@ -216,16 +223,16 @@
   ASSERT_TRUE(GetTracker()->Empty());
   ASSERT_EQ(0U, GetTracker()->num_synced_sessions());
   ASSERT_EQ(0U, GetTracker()->num_synced_tabs(kTag));
-  tabs1.push_back(GetTracker()->GetTab(kTag, 0));
-  tabs1.push_back(GetTracker()->GetTab(kTag, 1));
-  tabs1.push_back(GetTracker()->GetTab(kTag, 2));
+  tabs1.push_back(GetTracker()->GetTab(kTag, kTab1));
+  tabs1.push_back(GetTracker()->GetTab(kTag, kTab2));
+  tabs1.push_back(GetTracker()->GetTab(kTag, kTab3));
   ASSERT_EQ(3U, GetTracker()->num_synced_tabs(kTag));
   ASSERT_EQ(0U, GetTracker()->num_synced_sessions());
-  temp_tab = GetTracker()->GetTab(kTag, 0);  // Already created.
+  temp_tab = GetTracker()->GetTab(kTag, kTab1);  // Already created.
   ASSERT_EQ(3U, GetTracker()->num_synced_tabs(kTag));
   ASSERT_EQ(0U, GetTracker()->num_synced_sessions());
   ASSERT_EQ(tabs1[0], temp_tab);
-  tabs2.push_back(GetTracker()->GetTab(kTag2, 0));
+  tabs2.push_back(GetTracker()->GetTab(kTag2, kTab1));
   ASSERT_EQ(1U, GetTracker()->num_synced_tabs(kTag2));
   ASSERT_EQ(0U, GetTracker()->num_synced_sessions());
   ASSERT_FALSE(GetTracker()->DeleteForeignSession(kTag3));
@@ -244,16 +251,16 @@
   ASSERT_TRUE(GetTracker()->DeleteForeignSession(kTag3));
   ASSERT_EQ(2U, GetTracker()->num_synced_sessions());
 
-  GetTracker()->PutWindowInSession(kTag, 0);           // Create a window.
-  GetTracker()->PutTabInWindow(kTag, 0, 2);            // No longer unmapped.
+  GetTracker()->PutWindowInSession(kTag, kWindow1);     // Create a window.
+  GetTracker()->PutTabInWindow(kTag, kWindow1, kTab3);  // No longer unmapped.
   ASSERT_EQ(3U, GetTracker()->num_synced_tabs(kTag));  // Has not changed.
 
   const sessions::SessionTab* tab_ptr;
-  ASSERT_TRUE(GetTracker()->LookupSessionTab(kTag, 0, &tab_ptr));
+  ASSERT_TRUE(GetTracker()->LookupSessionTab(kTag, kTab1, &tab_ptr));
   ASSERT_EQ(tab_ptr, tabs1[0]);
-  ASSERT_TRUE(GetTracker()->LookupSessionTab(kTag, 2, &tab_ptr));
+  ASSERT_TRUE(GetTracker()->LookupSessionTab(kTag, kTab3, &tab_ptr));
   ASSERT_EQ(tab_ptr, tabs1[2]);
-  ASSERT_FALSE(GetTracker()->LookupSessionTab(kTag, 3, &tab_ptr));
+  ASSERT_FALSE(GetTracker()->LookupSessionTab(kTag, kTab4, &tab_ptr));
   ASSERT_FALSE(tab_ptr);
 
   std::vector<const sessions::SessionWindow*> windows;
@@ -288,7 +295,8 @@
       // More attempts than tabs means we'll sometimes get the same tabs,
       // sometimes have to allocate new tabs.
       int rand_tab_num = base::RandInt(0, kMaxTabs);
-      sessions::SessionTab* tab = GetTracker()->GetTab(tag, rand_tab_num + 1);
+      sessions::SessionTab* tab = GetTracker()->GetTab(
+          tag, SessionID::FromSerializedValue(rand_tab_num + 1));
       ASSERT_TRUE(tab);
     }
   }
@@ -306,8 +314,8 @@
   GetTracker()->LookupForeignTabNodeIds(kTag2, &result);
   EXPECT_TRUE(result.empty());
 
-  GetTracker()->PutWindowInSession(kTag, 0);
-  GetTracker()->PutTabInWindow(kTag, 0, 3);
+  GetTracker()->PutWindowInSession(kTag, kWindow1);
+  GetTracker()->PutTabInWindow(kTag, kWindow1, kTab1);
   GetTracker()->LookupForeignTabNodeIds(kTag, &result);
   EXPECT_EQ(2U, result.size());
 
@@ -329,8 +337,8 @@
 
   GetTracker()->LookupForeignTabNodeIds(kTag3, &result);
   EXPECT_TRUE(result.empty());
-  GetTracker()->PutWindowInSession(kTag3, 1);
-  GetTracker()->PutTabInWindow(kTag3, 1, 5);
+  GetTracker()->PutWindowInSession(kTag3, kWindow2);
+  GetTracker()->PutTabInWindow(kTag3, kWindow2, kTab2);
   GetTracker()->LookupForeignTabNodeIds(kTag3, &result);
   EXPECT_TRUE(result.empty());
   EXPECT_FALSE(GetTracker()->DeleteForeignSession(kTag3));
@@ -363,25 +371,27 @@
 
   // Create some session information that is stale.
   SyncedSession* session1 = GetTracker()->GetSession(kTag);
-  GetTracker()->PutWindowInSession(kTag, 0);
-  GetTracker()->PutTabInWindow(kTag, 0, 0);
-  GetTracker()->PutTabInWindow(kTag, 0, 1);
-  GetTracker()->GetTab(kTag, 2)->window_id.set_id(0);  // Will be unmapped.
-  GetTracker()->GetTab(kTag, 3)->window_id.set_id(0);  // Will be unmapped.
-  GetTracker()->PutWindowInSession(kTag, 1);
-  GetTracker()->PutTabInWindow(kTag, 1, 4);
-  GetTracker()->PutTabInWindow(kTag, 1, 5);
+  GetTracker()->PutWindowInSession(kTag, kWindow1);
+  GetTracker()->PutTabInWindow(kTag, kWindow1, kTab1);
+  GetTracker()->PutTabInWindow(kTag, kWindow1, kTab2);
+  GetTracker()->GetTab(kTag, kTab3)->window_id =
+      SessionID::FromSerializedValue(1);  // Unmapped.
+  GetTracker()->GetTab(kTag, kTab4)->window_id =
+      SessionID::FromSerializedValue(1);  // Unmapped.
+  GetTracker()->PutWindowInSession(kTag, kWindow2);
+  GetTracker()->PutTabInWindow(kTag, kWindow2, kTab5);
+  GetTracker()->PutTabInWindow(kTag, kWindow2, kTab6);
   ASSERT_EQ(2U, session1->windows.size());
-  ASSERT_EQ(2U, session1->windows[0]->wrapped_window.tabs.size());
-  ASSERT_EQ(2U, session1->windows[1]->wrapped_window.tabs.size());
+  ASSERT_EQ(2U, session1->windows[kWindow1]->wrapped_window.tabs.size());
+  ASSERT_EQ(2U, session1->windows[kWindow2]->wrapped_window.tabs.size());
   ASSERT_EQ(6U, GetTracker()->num_synced_tabs(kTag));
 
   // Create a session that should not be affected.
   SyncedSession* session2 = GetTracker()->GetSession(kTag2);
-  GetTracker()->PutWindowInSession(kTag2, 2);
-  GetTracker()->PutTabInWindow(kTag2, 2, 1);
+  GetTracker()->PutWindowInSession(kTag2, kWindow3);
+  GetTracker()->PutTabInWindow(kTag2, kWindow3, kTab2);
   ASSERT_EQ(1U, session2->windows.size());
-  ASSERT_EQ(1U, session2->windows[2]->wrapped_window.tabs.size());
+  ASSERT_EQ(1U, session2->windows[kWindow3]->wrapped_window.tabs.size());
   ASSERT_EQ(1U, GetTracker()->num_synced_tabs(kTag2));
 
   // Reset tracking and get the current windows/tabs.
@@ -390,24 +400,24 @@
   // on the remaining window.
 
   // New tab, arrived before meta node so unmapped.
-  GetTracker()->GetTab(kTag, 6);
+  GetTracker()->GetTab(kTag, kTab7);
   GetTracker()->ResetSessionTracking(kTag);
-  GetTracker()->PutWindowInSession(kTag, 0);
-  GetTracker()->PutTabInWindow(kTag, 0, 0);
+  GetTracker()->PutWindowInSession(kTag, kWindow1);
+  GetTracker()->PutTabInWindow(kTag, kWindow1, kTab1);
   // Tab 1 is closed.
-  GetTracker()->PutTabInWindow(kTag, 0, 2);  // No longer unmapped.
+  GetTracker()->PutTabInWindow(kTag, kWindow1, kTab3);  // No longer unmapped.
   // Tab 3 was unmapped and does not get used.
-  GetTracker()->PutTabInWindow(kTag, 0, 4);  // Moved from window 1.
+  GetTracker()->PutTabInWindow(kTag, kWindow1, kTab5);  // Moved from window 1.
   // Window 1 was closed, along with tab 5.
-  GetTracker()->PutTabInWindow(kTag, 0, 6);  // No longer unmapped.
+  GetTracker()->PutTabInWindow(kTag, kWindow1, kTab7);  // No longer unmapped.
   // Session 2 should not be affected.
   GetTracker()->CleanupSession(kTag);
 
   // Verify that only those parts of the session not owned have been removed.
   ASSERT_EQ(1U, session1->windows.size());
-  ASSERT_EQ(4U, session1->windows[0]->wrapped_window.tabs.size());
+  ASSERT_EQ(4U, session1->windows[kWindow1]->wrapped_window.tabs.size());
   ASSERT_EQ(1U, session2->windows.size());
-  ASSERT_EQ(1U, session2->windows[2]->wrapped_window.tabs.size());
+  ASSERT_EQ(1U, session2->windows[kWindow3]->wrapped_window.tabs.size());
   ASSERT_EQ(2U, GetTracker()->num_synced_sessions());
   ASSERT_EQ(4U, GetTracker()->num_synced_tabs(kTag));
   ASSERT_EQ(1U, GetTracker()->num_synced_tabs(kTag2));
diff --git a/components/sync_sessions/synced_tab_delegate.h b/components/sync_sessions/synced_tab_delegate.h
index c69de875..c5c5a15 100644
--- a/components/sync_sessions/synced_tab_delegate.h
+++ b/components/sync_sessions/synced_tab_delegate.h
@@ -20,8 +20,6 @@
 
 namespace sync_sessions {
 
-enum InvalidTab { kInvalidTabID = -1 };
-
 // A SyncedTabDelegate is used to insulate the sync code from depending
 // directly on WebContents, NavigationController, and the extensions TabHelper.
 class SyncedTabDelegate {
@@ -29,13 +27,13 @@
   virtual ~SyncedTabDelegate();
 
   // Methods from TabContents.
-  virtual SessionID::id_type GetWindowId() const = 0;
-  virtual SessionID::id_type GetSessionId() const = 0;
+  virtual SessionID GetWindowId() const = 0;
+  virtual SessionID GetSessionId() const = 0;
   virtual bool IsBeingDestroyed() const = 0;
 
   // Get the tab id of the tab responsible for opening this tab, if applicable.
-  // Returns kUnknownTabID(-1) if no such tab relationship is known.
-  virtual SessionID::id_type GetSourceTabID() const = 0;
+  // Returns an invalid ID if no such tab relationship is known.
+  virtual SessionID GetSourceTabID() const = 0;
 
   // Method derived from extensions TabHelper.
   virtual std::string GetExtensionAppId() const = 0;
diff --git a/components/sync_sessions/synced_window_delegate.h b/components/sync_sessions/synced_window_delegate.h
index af99cac..28d2d6f5 100644
--- a/components/sync_sessions/synced_window_delegate.h
+++ b/components/sync_sessions/synced_window_delegate.h
@@ -25,7 +25,7 @@
   virtual bool HasWindow() const = 0;
 
   // see Browser::session_id
-  virtual SessionID::id_type GetSessionId() const = 0;
+  virtual SessionID GetSessionId() const = 0;
 
   // see Browser::tab_count
   virtual int GetTabCount() const = 0;
@@ -51,7 +51,7 @@
   virtual SyncedTabDelegate* GetTabAt(int index) const = 0;
 
   // Return the tab id for the tab at |index|.
-  virtual SessionID::id_type GetTabIdAt(int index) const = 0;
+  virtual SessionID GetTabIdAt(int index) const = 0;
 
   // Return true if we are currently restoring sessions asynchronously.
   virtual bool IsSessionRestoreInProgress() const = 0;
diff --git a/components/sync_sessions/synced_window_delegates_getter.h b/components/sync_sessions/synced_window_delegates_getter.h
index 303e4fd..c1834b9f 100644
--- a/components/sync_sessions/synced_window_delegates_getter.h
+++ b/components/sync_sessions/synced_window_delegates_getter.h
@@ -19,7 +19,7 @@
 class SyncedWindowDelegatesGetter {
  public:
   using SyncedWindowDelegateMap =
-      std::map<SessionID::id_type, const SyncedWindowDelegate*>;
+      std::map<SessionID, const SyncedWindowDelegate*>;
 
   SyncedWindowDelegatesGetter();
   virtual ~SyncedWindowDelegatesGetter();
@@ -28,7 +28,7 @@
   virtual SyncedWindowDelegateMap GetSyncedWindowDelegates() = 0;
 
   // Find a SyncedWindowDelegate given its window's id.
-  virtual const SyncedWindowDelegate* FindById(SessionID::id_type id) = 0;
+  virtual const SyncedWindowDelegate* FindById(SessionID id) = 0;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(SyncedWindowDelegatesGetter);
diff --git a/components/sync_sessions/tab_node_pool.cc b/components/sync_sessions/tab_node_pool.cc
index 19bdd43..0810b11 100644
--- a/components/sync_sessions/tab_node_pool.cc
+++ b/components/sync_sessions/tab_node_pool.cc
@@ -33,9 +33,9 @@
   free_nodes_pool_.insert(tab_node_id);
 }
 
-void TabNodePool::AssociateTabNode(int tab_node_id, SessionID::id_type tab_id) {
+void TabNodePool::AssociateTabNode(int tab_node_id, SessionID tab_id) {
   DCHECK_GT(tab_node_id, kInvalidTabNodeID);
-  DCHECK_GT(tab_id, kInvalidTabID);
+  DCHECK(tab_id.is_valid());
 
   // This is a new node association, the sync node should be free.
   // Remove node from free node pool and then associate it with the tab.
@@ -44,13 +44,13 @@
   free_nodes_pool_.erase(it);
 
   DCHECK(nodeid_tabid_map_.find(tab_node_id) == nodeid_tabid_map_.end());
-  DVLOG(1) << "Associating tab node " << tab_node_id << " with tab " << tab_id;
-  nodeid_tabid_map_[tab_node_id] = tab_id;
+  DVLOG(1) << "Associating tab node " << tab_node_id << " with tab "
+           << tab_id.id();
+  nodeid_tabid_map_.emplace(tab_node_id, tab_id);
   tabid_nodeid_map_[tab_id] = tab_node_id;
 }
 
-bool TabNodePool::GetTabNodeForTab(SessionID::id_type tab_id,
-                                   int* tab_node_id) {
+bool TabNodePool::GetTabNodeForTab(SessionID tab_id, int* tab_node_id) {
   if (tabid_nodeid_map_.find(tab_id) != tabid_nodeid_map_.end()) {
     *tab_node_id = tabid_nodeid_map_[tab_id];
     return true;
@@ -71,24 +71,23 @@
   }
 }
 
-void TabNodePool::FreeTab(int tab_id) {
-  DCHECK_GT(tab_id, kInvalidTabID);
+void TabNodePool::FreeTab(SessionID tab_id) {
+  DCHECK(tab_id.is_valid());
   TabIDToTabNodeIDMap::iterator it = tabid_nodeid_map_.find(tab_id);
   if (it == tabid_nodeid_map_.end()) {
     return;  // Already freed.
   }
 
   int tab_node_id = it->second;
-  DVLOG(1) << "Freeing tab " << tab_id << " at node " << tab_node_id;
+  DVLOG(1) << "Freeing tab " << tab_id.id() << " at node " << tab_node_id;
   nodeid_tabid_map_.erase(nodeid_tabid_map_.find(tab_node_id));
   tabid_nodeid_map_.erase(it);
   free_nodes_pool_.insert(tab_node_id);
 }
 
-void TabNodePool::ReassociateTabNode(int tab_node_id,
-                                     SessionID::id_type tab_id) {
+void TabNodePool::ReassociateTabNode(int tab_node_id, SessionID tab_id) {
   DCHECK_GT(tab_node_id, kInvalidTabNodeID);
-  DCHECK_GT(tab_id, kInvalidTabID);
+  DCHECK(tab_id.is_valid());
 
   auto tabid_it = tabid_nodeid_map_.find(tab_id);
   if (tabid_it != tabid_nodeid_map_.end()) {
@@ -112,12 +111,12 @@
   AssociateTabNode(tab_node_id, tab_id);
 }
 
-SessionID::id_type TabNodePool::GetTabIdFromTabNodeId(int tab_node_id) const {
+SessionID TabNodePool::GetTabIdFromTabNodeId(int tab_node_id) const {
   TabNodeIDToTabIDMap::const_iterator it = nodeid_tabid_map_.find(tab_node_id);
   if (it != nodeid_tabid_map_.end()) {
     return it->second;
   }
-  return kInvalidTabID;
+  return SessionID::InvalidValue();
 }
 
 void TabNodePool::CleanupTabNodes(std::set<int>* deleted_node_ids) {
diff --git a/components/sync_sessions/tab_node_pool.h b/components/sync_sessions/tab_node_pool.h
index 84f2c34..424e5a1 100644
--- a/components/sync_sessions/tab_node_pool.h
+++ b/components/sync_sessions/tab_node_pool.h
@@ -49,19 +49,19 @@
   // node.
   // Returns true if a pre-existing tab node could be reused, false if a new one
   // had to be created.
-  bool GetTabNodeForTab(SessionID::id_type tab_id, int* tab_node_id);
+  bool GetTabNodeForTab(SessionID tab_id, int* tab_node_id);
 
-  // Returns the tab_id for |tab_node_id| if it is associated else returns
-  // kInvalidTabID.
-  SessionID::id_type GetTabIdFromTabNodeId(int tab_node_id) const;
+  // Returns the tab_id for |tab_node_id| if it is associated else returns an
+  // invalid ID.
+  SessionID GetTabIdFromTabNodeId(int tab_node_id) const;
 
   // Reassociates |tab_node_id| with |tab_id|. If |tab_node_id| is not already
   // known, it is added to the tab node pool before being associated.
-  void ReassociateTabNode(int tab_node_id, SessionID::id_type tab_id);
+  void ReassociateTabNode(int tab_node_id, SessionID tab_id);
 
   // Removes association for |tab_id| and returns its tab node to the free node
   // pool.
-  void FreeTab(int tab_id);
+  void FreeTab(SessionID tab_id);
 
   // Fills |deleted_node_ids| with any free nodes to be deleted as proscribed
   // by the free node low/high watermarks, in order to ensure the free node pool
@@ -83,8 +83,8 @@
 
  private:
   friend class SyncTabNodePoolTest;
-  using TabNodeIDToTabIDMap = std::map<int, SessionID::id_type>;
-  using TabIDToTabNodeIDMap = std::map<SessionID::id_type, int>;
+  using TabNodeIDToTabIDMap = std::map<int, SessionID>;
+  using TabIDToTabNodeIDMap = std::map<SessionID, int>;
 
   // Adds |tab_node_id| to the tab node pool.
   // Note: this should only be called when we discover tab sync nodes from
@@ -95,7 +95,7 @@
   // Associates |tab_node_id| with |tab_id|. |tab_node_id| must be free. In
   // order to associated a non-free tab node, ReassociateTabNode must be
   // used.
-  void AssociateTabNode(int tab_node_id, SessionID::id_type tab_id);
+  void AssociateTabNode(int tab_node_id, SessionID tab_id);
 
   // Stores mapping of node ids associated with tab_ids, these are the used
   // nodes of tab node pool.
diff --git a/components/sync_sessions/tab_node_pool_unittest.cc b/components/sync_sessions/tab_node_pool_unittest.cc
index 591c8b54..6150cb53 100644
--- a/components/sync_sessions/tab_node_pool_unittest.cc
+++ b/components/sync_sessions/tab_node_pool_unittest.cc
@@ -32,9 +32,9 @@
 const int kTabNodeId1 = 10;
 const int kTabNodeId2 = 5;
 const int kTabNodeId3 = 1000;
-const int kTabId1 = 1;
-const int kTabId2 = 2;
-const int kTabId3 = 3;
+const SessionID kTabId1 = SessionID::FromSerializedValue(1);
+const SessionID kTabId2 = SessionID::FromSerializedValue(2);
+const SessionID kTabId3 = SessionID::FromSerializedValue(3);
 
 TEST_F(SyncTabNodePoolTest, TabNodeIdIncreases) {
   std::set<int> deleted_node_ids;
@@ -58,7 +58,8 @@
   EXPECT_TRUE(deleted_node_ids.empty());
   for (int i = 0; i < 3; ++i) {
     int tab_node_id = -1;
-    EXPECT_TRUE(pool_.GetTabNodeForTab(i + 1, &tab_node_id));
+    EXPECT_TRUE(pool_.GetTabNodeForTab(SessionID::FromSerializedValue(i + 1),
+                                       &tab_node_id));
     EXPECT_EQ(kTabNodeId3, GetMaxUsedTabNodeId());
   }
   pool_.CleanupTabNodes(&deleted_node_ids);
@@ -74,8 +75,7 @@
   EXPECT_TRUE(pool_.Empty());
   EXPECT_FALSE(pool_.Full());
   EXPECT_EQ(kTabId1, pool_.GetTabIdFromTabNodeId(kTabNodeId1));
-  EXPECT_EQ(TabNodePool::kInvalidTabNodeID,
-            pool_.GetTabIdFromTabNodeId(kTabNodeId2));
+  EXPECT_FALSE(pool_.GetTabIdFromTabNodeId(kTabNodeId2).is_valid());
 
   // Introduce a new tab node associated with the same tab. The old tab node
   // should get added to the free pool
@@ -83,8 +83,7 @@
   EXPECT_EQ(2U, pool_.Capacity());
   EXPECT_FALSE(pool_.Empty());
   EXPECT_FALSE(pool_.Full());
-  EXPECT_EQ(TabNodePool::kInvalidTabNodeID,
-            pool_.GetTabIdFromTabNodeId(kTabNodeId1));
+  EXPECT_FALSE(pool_.GetTabIdFromTabNodeId(kTabNodeId1).is_valid());
   EXPECT_EQ(kTabId1, pool_.GetTabIdFromTabNodeId(kTabNodeId2));
 
   // Reassociating the same tab node/tab should have no effect.
@@ -92,8 +91,7 @@
   EXPECT_EQ(2U, pool_.Capacity());
   EXPECT_FALSE(pool_.Empty());
   EXPECT_FALSE(pool_.Full());
-  EXPECT_EQ(TabNodePool::kInvalidTabNodeID,
-            pool_.GetTabIdFromTabNodeId(kTabNodeId1));
+  EXPECT_FALSE(pool_.GetTabIdFromTabNodeId(kTabNodeId1).is_valid());
   EXPECT_EQ(kTabId1, pool_.GetTabIdFromTabNodeId(kTabNodeId2));
 
   // Reassociating the new tab node with a new tab should just update the
@@ -102,8 +100,7 @@
   EXPECT_EQ(2U, pool_.Capacity());
   EXPECT_FALSE(pool_.Empty());
   EXPECT_FALSE(pool_.Full());
-  EXPECT_EQ(TabNodePool::kInvalidTabNodeID,
-            pool_.GetTabIdFromTabNodeId(kTabNodeId1));
+  EXPECT_FALSE(pool_.GetTabIdFromTabNodeId(kTabNodeId1).is_valid());
   EXPECT_EQ(kTabId2, pool_.GetTabIdFromTabNodeId(kTabNodeId2));
 
   // Reassociating the first tab node should make the pool empty.
@@ -139,9 +136,10 @@
   EXPECT_TRUE(deleted_node_ids.empty());
   EXPECT_TRUE(pool_.Full());
   std::set<int> free_sync_ids;
-  for (int i = 0; i < 3; ++i) {
+  for (int i = 1; i <= 3; ++i) {
     int tab_node_id = -1;
-    EXPECT_TRUE(pool_.GetTabNodeForTab(i, &tab_node_id));
+    EXPECT_TRUE(pool_.GetTabNodeForTab(SessionID::FromSerializedValue(i),
+                                       &tab_node_id));
     free_sync_ids.insert(tab_node_id);
   }
 
@@ -163,19 +161,19 @@
 
   EXPECT_EQ(2U, pool_.Capacity());
   int tab_node_id = -1;
-  EXPECT_TRUE(pool_.GetTabNodeForTab(1, &tab_node_id));
+  EXPECT_TRUE(pool_.GetTabNodeForTab(kTabId1, &tab_node_id));
   EXPECT_EQ(5, tab_node_id);
   EXPECT_FALSE(pool_.Empty());
   EXPECT_FALSE(pool_.Full());
   EXPECT_EQ(2U, pool_.Capacity());
   // 5 is now used, should return 10.
-  EXPECT_TRUE(pool_.GetTabNodeForTab(2, &tab_node_id));
+  EXPECT_TRUE(pool_.GetTabNodeForTab(kTabId2, &tab_node_id));
   EXPECT_EQ(10, tab_node_id);
 }
 
 TEST_F(SyncTabNodePoolTest, GetTabNodeForTabCreate) {
   int tab_node_id = -1;
-  EXPECT_FALSE(pool_.GetTabNodeForTab(1, &tab_node_id));
+  EXPECT_FALSE(pool_.GetTabNodeForTab(kTabId1, &tab_node_id));
   EXPECT_EQ(0, tab_node_id);
 }
 
@@ -185,12 +183,11 @@
   // Allocate TabNodePool::kFreeNodesHighWatermark + 1 nodes and verify that
   // freeing the last node reduces the free node pool size to
   // kFreeNodesLowWatermark.
-  SessionID session_id;
   std::vector<int> used_sync_ids;
   for (size_t i = 1; i <= TabNodePool::kFreeNodesHighWatermark + 1; ++i) {
-    session_id.set_id(i);
     int sync_id = -1;
-    EXPECT_FALSE(pool_.GetTabNodeForTab(i, &sync_id));
+    EXPECT_FALSE(
+        pool_.GetTabNodeForTab(SessionID::FromSerializedValue(i), &sync_id));
     used_sync_ids.push_back(sync_id);
   }
 
@@ -198,7 +195,7 @@
   used_sync_ids.pop_back();
 
   for (size_t i = 1; i <= used_sync_ids.size(); ++i) {
-    pool_.FreeTab(i);
+    pool_.FreeTab(SessionID::FromSerializedValue(i));
     pool_.CleanupTabNodes(&deleted_node_ids);
     EXPECT_TRUE(deleted_node_ids.empty());
   }
@@ -211,7 +208,8 @@
 
   // Freeing the last sync node should drop the free nodes to
   // kFreeNodesLowWatermark.
-  pool_.FreeTab(TabNodePool::kFreeNodesHighWatermark + 1);
+  pool_.FreeTab(
+      SessionID::FromSerializedValue(TabNodePool::kFreeNodesHighWatermark + 1));
   pool_.CleanupTabNodes(&deleted_node_ids);
   EXPECT_EQ(TabNodePool::kFreeNodesHighWatermark + 1 -
                 TabNodePool::kFreeNodesLowWatermark,
diff --git a/components/sync_sessions/task_tracker.cc b/components/sync_sessions/task_tracker.cc
index c508cbf..b37250f 100644
--- a/components/sync_sessions/task_tracker.cc
+++ b/components/sync_sessions/task_tracker.cc
@@ -113,8 +113,7 @@
 
 TaskTracker::~TaskTracker() {}
 
-TabTasks* TaskTracker::GetTabTasks(SessionID::id_type tab_id,
-                                   SessionID::id_type parent_tab_id) {
+TabTasks* TaskTracker::GetTabTasks(SessionID tab_id, SessionID parent_tab_id) {
   DVLOG(1) << "Getting tab tasks for " << tab_id << " with parent "
            << parent_tab_id;
   // If an existing TabTasks exists, attempt to reuse it. The caveat is that if
@@ -124,7 +123,7 @@
   // initial GetTabTasks is called, the parent id is not yet known, but it
   // becomes known at a later time.
   if (local_tab_tasks_map_.count(tab_id) > 0 &&
-      (parent_tab_id == kInvalidTabID ||
+      (!parent_tab_id.is_valid() ||
        local_tab_tasks_map_[tab_id]->parent_tab_id() == parent_tab_id)) {
     return local_tab_tasks_map_[tab_id].get();
   }
@@ -144,7 +143,7 @@
   return local_tab_tasks_map_[tab_id].get();
 }
 
-void TaskTracker::CleanTabTasks(SessionID::id_type tab_id) {
+void TaskTracker::CleanTabTasks(SessionID tab_id) {
   auto iter = local_tab_tasks_map_.find(tab_id);
   if (iter != local_tab_tasks_map_.end())
     local_tab_tasks_map_.erase(iter);
diff --git a/components/sync_sessions/task_tracker.h b/components/sync_sessions/task_tracker.h
index b981850f..81db1c2 100644
--- a/components/sync_sessions/task_tracker.h
+++ b/components/sync_sessions/task_tracker.h
@@ -41,8 +41,8 @@
   explicit TabTasks(const TabTasks& rhs);
   virtual ~TabTasks();
 
-  SessionID::id_type parent_tab_id() { return parent_tab_id_; }
-  void set_parent_tab_id(SessionID::id_type parent_tab_id) {
+  SessionID parent_tab_id() { return parent_tab_id_; }
+  void set_parent_tab_id(SessionID parent_tab_id) {
     parent_tab_id_ = parent_tab_id;
   }
 
@@ -96,7 +96,7 @@
   int most_recent_nav_id_ = kInvalidNavID;
 
   // The parent id for this tab (if there is one).
-  SessionID::id_type parent_tab_id_ = kInvalidTabID;
+  SessionID parent_tab_id_ = SessionID::InvalidValue();
 
   DISALLOW_ASSIGN(TabTasks);
 };
@@ -115,16 +115,15 @@
   // from one tab to another (e.g. when opening a navigation in a new tab, the
   // task ids from the original tab are necessary to continue tracking the
   // task chain).
-  TabTasks* GetTabTasks(SessionID::id_type tab_id,
-                        SessionID::id_type parent_tab_id);
+  TabTasks* GetTabTasks(SessionID tab_id, SessionID parent_tab_id);
 
   // Cleans tracked task ids of navigations in the tab of |tab_id|.
-  void CleanTabTasks(SessionID::id_type tab_id);
+  void CleanTabTasks(SessionID tab_id);
 
  private:
   FRIEND_TEST_ALL_PREFIXES(TaskTrackerTest, CleanTabTasks);
 
-  std::map<SessionID::id_type, std::unique_ptr<TabTasks>> local_tab_tasks_map_;
+  std::map<SessionID, std::unique_ptr<TabTasks>> local_tab_tasks_map_;
 
   DISALLOW_COPY_AND_ASSIGN(TaskTracker);
 };
diff --git a/components/sync_sessions/task_tracker_unittest.cc b/components/sync_sessions/task_tracker_unittest.cc
index ba07a83..320fcbbf 100644
--- a/components/sync_sessions/task_tracker_unittest.cc
+++ b/components/sync_sessions/task_tracker_unittest.cc
@@ -17,21 +17,25 @@
 namespace sync_sessions {
 
 namespace {
-const int kTab1 = 15;
-const int kTab2 = 25;
+const SessionID kTab1 = SessionID::FromSerializedValue(15);
+const SessionID kTab2 = SessionID::FromSerializedValue(25);
 }  // namespace
 
 TEST(TaskTrackerTest, GetTabTasks) {
   TaskTracker task_tracker;
-  TabTasks* tab_tasks = task_tracker.GetTabTasks(kTab1, kInvalidTabID);
+  TabTasks* tab_tasks =
+      task_tracker.GetTabTasks(kTab1, SessionID::InvalidValue());
   ASSERT_NE(tab_tasks, nullptr);
-  EXPECT_EQ(task_tracker.GetTabTasks(kTab1, kInvalidTabID), tab_tasks);
-  EXPECT_NE(task_tracker.GetTabTasks(kTab2, kInvalidTabID), tab_tasks);
+  EXPECT_EQ(task_tracker.GetTabTasks(kTab1, SessionID::InvalidValue()),
+            tab_tasks);
+  EXPECT_NE(task_tracker.GetTabTasks(kTab2, SessionID::InvalidValue()),
+            tab_tasks);
 }
 
 TEST(TaskTrackerTest, CleanTabTasks) {
   TaskTracker task_tracker;
-  TabTasks* tab_tasks = task_tracker.GetTabTasks(kTab1, kInvalidTabID);
+  TabTasks* tab_tasks =
+      task_tracker.GetTabTasks(kTab1, SessionID::InvalidValue());
   ASSERT_NE(tab_tasks, nullptr);
   ASSERT_FALSE(task_tracker.local_tab_tasks_map_.empty());
 
@@ -41,7 +45,8 @@
 
 TEST(TaskTrackerTest, UpdateTasksWithMultipleClicks) {
   TaskTracker task_tracker;
-  TabTasks* tab_tasks = task_tracker.GetTabTasks(kTab1, kInvalidTabID);
+  TabTasks* tab_tasks =
+      task_tracker.GetTabTasks(kTab1, SessionID::InvalidValue());
 
   tab_tasks->UpdateWithNavigation(1, ui::PageTransition::PAGE_TRANSITION_TYPED,
                                   100);
@@ -62,7 +67,8 @@
 
 TEST(TaskTrackerTest, UpdateTasksWithMultipleClicksAndTypes) {
   TaskTracker task_tracker;
-  TabTasks* tab_tasks = task_tracker.GetTabTasks(kTab1, kInvalidTabID);
+  TabTasks* tab_tasks =
+      task_tracker.GetTabTasks(kTab1, SessionID::InvalidValue());
 
   tab_tasks->UpdateWithNavigation(1, ui::PAGE_TRANSITION_LINK, 100);
   tab_tasks->UpdateWithNavigation(2, ui::PAGE_TRANSITION_LINK, 200);
@@ -84,7 +90,8 @@
 
 TEST(TaskTrackerTest, UpdateTasksWithBackforwards) {
   TaskTracker task_tracker;
-  TabTasks* tab_tasks = task_tracker.GetTabTasks(kTab1, kInvalidTabID);
+  TabTasks* tab_tasks =
+      task_tracker.GetTabTasks(kTab1, SessionID::InvalidValue());
 
   tab_tasks->UpdateWithNavigation(1, ui::PAGE_TRANSITION_TYPED, 100);
   tab_tasks->UpdateWithNavigation(2, ui::PAGE_TRANSITION_LINK, 200);
@@ -113,7 +120,8 @@
 
 TEST(TaskTrackerTest, UpdateWithNavigationsWithBackAndForkedNavigation) {
   TaskTracker task_tracker;
-  TabTasks* tab_tasks = task_tracker.GetTabTasks(kTab1, kInvalidTabID);
+  TabTasks* tab_tasks =
+      task_tracker.GetTabTasks(kTab1, SessionID::InvalidValue());
   tab_tasks->UpdateWithNavigation(1, ui::PAGE_TRANSITION_LINK, 100);
   tab_tasks->UpdateWithNavigation(2, ui::PAGE_TRANSITION_LINK, 200);
   tab_tasks->UpdateWithNavigation(3, ui::PAGE_TRANSITION_LINK, 300);
@@ -129,7 +137,8 @@
 
 TEST(TaskTrackerTest, LimitMaxNumberOfTasksPerTab) {
   TaskTracker task_tracker;
-  TabTasks* tab_tasks = task_tracker.GetTabTasks(kTab1, kInvalidTabID);
+  TabTasks* tab_tasks =
+      task_tracker.GetTabTasks(kTab1, SessionID::InvalidValue());
 
   // Reaching max number of tasks for a tab.
   for (int i = 1; i <= kMaxNumTasksPerTab; i++) {
@@ -169,7 +178,7 @@
 // navigation doesn't create loop in navigation chain.
 TEST(TaskTrackerTest, LoopInNavigationChain) {
   TaskTracker task_tracker;
-  TabTasks* tasks = task_tracker.GetTabTasks(kTab1, kInvalidTabID);
+  TabTasks* tasks = task_tracker.GetTabTasks(kTab1, SessionID::InvalidValue());
   // Create a few navigations that would later be evicted.
   tasks->UpdateWithNavigation(1, ui::PageTransition::PAGE_TRANSITION_LINK, 1);
   tasks->UpdateWithNavigation(2, ui::PageTransition::PAGE_TRANSITION_LINK, 2);
@@ -192,7 +201,8 @@
 
 TEST(TaskTrackerTest, CreateTabTasksFromSourceTab) {
   TaskTracker task_tracker;
-  TabTasks* source_tab_tasks = task_tracker.GetTabTasks(kTab1, kInvalidTabID);
+  TabTasks* source_tab_tasks =
+      task_tracker.GetTabTasks(kTab1, SessionID::InvalidValue());
   source_tab_tasks->UpdateWithNavigation(1, ui::PAGE_TRANSITION_LINK, 100);
   source_tab_tasks->UpdateWithNavigation(2, ui::PAGE_TRANSITION_LINK, 200);
   source_tab_tasks->UpdateWithNavigation(3, ui::PAGE_TRANSITION_TYPED, 300);
@@ -214,7 +224,8 @@
 
 TEST(TaskTrackerTest, CreateTabTasksFromSourceTabAfterGoingBack) {
   TaskTracker task_tracker;
-  TabTasks* source_tab_tasks = task_tracker.GetTabTasks(kTab1, kInvalidTabID);
+  TabTasks* source_tab_tasks =
+      task_tracker.GetTabTasks(kTab1, SessionID::InvalidValue());
   source_tab_tasks->UpdateWithNavigation(1, ui::PAGE_TRANSITION_LINK, 100);
   source_tab_tasks->UpdateWithNavigation(2, ui::PAGE_TRANSITION_LINK, 200);
   source_tab_tasks->UpdateWithNavigation(3, ui::PAGE_TRANSITION_TYPED, 300);
@@ -239,7 +250,8 @@
 TEST(TaskTrackerTest, CreateTabTasksFromSourceTabWithLimitedTaskNum) {
   TaskTracker task_tracker;
 
-  TabTasks* source_tab_tasks = task_tracker.GetTabTasks(kTab1, kInvalidTabID);
+  TabTasks* source_tab_tasks =
+      task_tracker.GetTabTasks(kTab1, SessionID::InvalidValue());
   // Adding max number of tasks to tab1.
   int nav_id = 1;
   for (; nav_id <= kMaxNumTasksPerTab; nav_id++) {
@@ -264,10 +276,12 @@
 
 TEST(TaskTrackerTest, GetTabTasksWithNewSource) {
   TaskTracker task_tracker;
-  TabTasks* target_tab_tasks = task_tracker.GetTabTasks(kTab2, kInvalidTabID);
-  EXPECT_EQ(kInvalidTabID, target_tab_tasks->parent_tab_id());
+  TabTasks* target_tab_tasks =
+      task_tracker.GetTabTasks(kTab2, SessionID::InvalidValue());
+  EXPECT_EQ(SessionID::InvalidValue(), target_tab_tasks->parent_tab_id());
 
-  TabTasks* source_tab_tasks = task_tracker.GetTabTasks(kTab1, kInvalidTabID);
+  TabTasks* source_tab_tasks =
+      task_tracker.GetTabTasks(kTab1, SessionID::InvalidValue());
   source_tab_tasks->UpdateWithNavigation(1, ui::PAGE_TRANSITION_LINK, 100);
   source_tab_tasks->UpdateWithNavigation(2, ui::PAGE_TRANSITION_LINK, 200);
   source_tab_tasks->UpdateWithNavigation(3, ui::PAGE_TRANSITION_TYPED, 300);
diff --git a/components/sync_sessions/test_synced_window_delegates_getter.cc b/components/sync_sessions/test_synced_window_delegates_getter.cc
index 367e0f93..7a37060 100644
--- a/components/sync_sessions/test_synced_window_delegates_getter.cc
+++ b/components/sync_sessions/test_synced_window_delegates_getter.cc
@@ -18,8 +18,8 @@
 }  // namespace
 
 TestSyncedTabDelegate::TestSyncedTabDelegate(
-    SessionID::id_type window_id,
-    SessionID::id_type tab_id,
+    SessionID window_id,
+    SessionID tab_id,
     const base::RepeatingCallback<void(SyncedTabDelegate*)>& notify_cb)
     : window_id_(window_id), tab_id_(tab_id), notify_cb_(notify_cb) {}
 
@@ -98,11 +98,11 @@
   return entries_.size();
 }
 
-SessionID::id_type TestSyncedTabDelegate::GetWindowId() const {
+SessionID TestSyncedTabDelegate::GetWindowId() const {
   return window_id_;
 }
 
-SessionID::id_type TestSyncedTabDelegate::GetSessionId() const {
+SessionID TestSyncedTabDelegate::GetSessionId() const {
   return tab_id_;
 }
 
@@ -154,17 +154,16 @@
   return http_count > 0;
 }
 
-SessionID::id_type TestSyncedTabDelegate::GetSourceTabID() const {
-  return kInvalidTabID;
+SessionID TestSyncedTabDelegate::GetSourceTabID() const {
+  return SessionID::InvalidValue();
 }
 
-PlaceholderTabDelegate::PlaceholderTabDelegate(SessionID::id_type tab_id,
-                                               int sync_id)
+PlaceholderTabDelegate::PlaceholderTabDelegate(SessionID tab_id, int sync_id)
     : tab_id_(tab_id), sync_id_(sync_id) {}
 
 PlaceholderTabDelegate::~PlaceholderTabDelegate() = default;
 
-SessionID::id_type PlaceholderTabDelegate::GetSessionId() const {
+SessionID PlaceholderTabDelegate::GetSessionId() const {
   return tab_id_;
 }
 
@@ -180,9 +179,9 @@
   return true;
 }
 
-SessionID::id_type PlaceholderTabDelegate::GetWindowId() const {
+SessionID PlaceholderTabDelegate::GetWindowId() const {
   NOTREACHED();
-  return 0;
+  return SessionID::InvalidValue();
 }
 
 bool PlaceholderTabDelegate::IsBeingDestroyed() const {
@@ -247,12 +246,12 @@
   return false;
 }
 
-SessionID::id_type PlaceholderTabDelegate::GetSourceTabID() const {
-  return kInvalidTabID;
+SessionID PlaceholderTabDelegate::GetSourceTabID() const {
+  return SessionID::InvalidValue();
 }
 
 TestSyncedWindowDelegate::TestSyncedWindowDelegate(
-    SessionID::id_type window_id,
+    SessionID window_id,
     sync_pb::SessionWindow_BrowserType type)
     : window_id_(window_id), window_type_(type) {}
 
@@ -267,7 +266,7 @@
   return true;
 }
 
-SessionID::id_type TestSyncedWindowDelegate::GetSessionId() const {
+SessionID TestSyncedWindowDelegate::GetSessionId() const {
   return window_id_;
 }
 
@@ -302,10 +301,10 @@
   return nullptr;
 }
 
-SessionID::id_type TestSyncedWindowDelegate::GetTabIdAt(int index) const {
+SessionID TestSyncedWindowDelegate::GetTabIdAt(int index) const {
   SyncedTabDelegate* delegate = GetTabAt(index);
   if (!delegate)
-    return kInvalidTabID;
+    return SessionID::InvalidValue();
   return delegate->GetSessionId();
 }
 
@@ -328,7 +327,7 @@
 
 TestSyncedWindowDelegate* TestSyncedWindowDelegatesGetter::AddWindow(
     sync_pb::SessionWindow_BrowserType type,
-    SessionID::id_type window_id) {
+    SessionID window_id) {
   windows_.push_back(
       std::make_unique<TestSyncedWindowDelegate>(window_id, type));
   CHECK_EQ(window_id, windows_.back()->GetSessionId());
@@ -337,8 +336,8 @@
 }
 
 TestSyncedTabDelegate* TestSyncedWindowDelegatesGetter::AddTab(
-    SessionID::id_type window_id,
-    SessionID::id_type tab_id) {
+    SessionID window_id,
+    SessionID tab_id) {
   tabs_.push_back(std::make_unique<TestSyncedTabDelegate>(
       window_id, tab_id,
       base::BindRepeating(&DummyRouter::NotifyNav,
@@ -366,7 +365,7 @@
 }
 
 const SyncedWindowDelegate* TestSyncedWindowDelegatesGetter::FindById(
-    SessionID::id_type id) {
+    SessionID id) {
   for (auto window_iter_pair : delegates_) {
     if (window_iter_pair.second->GetSessionId() == id)
       return window_iter_pair.second;
diff --git a/components/sync_sessions/test_synced_window_delegates_getter.h b/components/sync_sessions/test_synced_window_delegates_getter.h
index 7026b38e..adbbd78 100644
--- a/components/sync_sessions/test_synced_window_delegates_getter.h
+++ b/components/sync_sessions/test_synced_window_delegates_getter.h
@@ -26,8 +26,8 @@
 class TestSyncedTabDelegate : public SyncedTabDelegate {
  public:
   TestSyncedTabDelegate(
-      SessionID::id_type window_id,
-      SessionID::id_type tab_id,
+      SessionID window_id,
+      SessionID tab_id,
       const base::RepeatingCallback<void(SyncedTabDelegate*)>& notify_cb);
   ~TestSyncedTabDelegate() override;
 
@@ -49,8 +49,8 @@
       int i,
       sessions::SerializedNavigationEntry* serialized_entry) const override;
   int GetEntryCount() const override;
-  SessionID::id_type GetWindowId() const override;
-  SessionID::id_type GetSessionId() const override;
+  SessionID GetWindowId() const override;
+  SessionID GetSessionId() const override;
   bool IsBeingDestroyed() const override;
   std::string GetExtensionAppId() const override;
   bool ProfileIsSupervised() const override;
@@ -61,16 +61,16 @@
   int GetSyncId() const override;
   void SetSyncId(int sync_id) override;
   bool ShouldSync(SyncSessionsClient* sessions_client) override;
-  SessionID::id_type GetSourceTabID() const override;
+  SessionID GetSourceTabID() const override;
 
  private:
-  const SessionID::id_type window_id_;
-  const SessionID::id_type tab_id_;
+  const SessionID window_id_;
+  const SessionID tab_id_;
   const base::RepeatingCallback<void(SyncedTabDelegate*)> notify_cb_;
 
   int current_entry_index_ = -1;
   bool is_supervised_ = false;
-  int sync_id_ = kInvalidTabID;
+  int sync_id_ = -1;
   std::vector<std::unique_ptr<const sessions::SerializedNavigationEntry>>
       blocked_navigations_;
   std::vector<std::unique_ptr<const sessions::SerializedNavigationEntry>>
@@ -85,16 +85,16 @@
 // memory. See SyncedTabDelegate::IsPlaceHolderTab for more info.
 class PlaceholderTabDelegate : public SyncedTabDelegate {
  public:
-  PlaceholderTabDelegate(SessionID::id_type tab_id, int sync_id);
+  PlaceholderTabDelegate(SessionID tab_id, int sync_id);
   ~PlaceholderTabDelegate() override;
 
   // SyncedTabDelegate overrides.
-  SessionID::id_type GetSessionId() const override;
+  SessionID GetSessionId() const override;
   int GetSyncId() const override;
   void SetSyncId(int sync_id) override;
   bool IsPlaceholderTab() const override;
   // Everything else is invalid to invoke as it depends on a valid WebContents.
-  SessionID::id_type GetWindowId() const override;
+  SessionID GetWindowId() const override;
   bool IsBeingDestroyed() const override;
   std::string GetExtensionAppId() const override;
   bool IsInitialBlankNavigation() const override;
@@ -110,18 +110,18 @@
   const std::vector<std::unique_ptr<const sessions::SerializedNavigationEntry>>*
   GetBlockedNavigations() const override;
   bool ShouldSync(SyncSessionsClient* sessions_client) override;
-  SessionID::id_type GetSourceTabID() const override;
+  SessionID GetSourceTabID() const override;
 
  private:
-  const SessionID::id_type tab_id_;
-  int sync_id_ = kInvalidTabID;
+  const SessionID tab_id_;
+  int sync_id_ = -1;
 
   DISALLOW_COPY_AND_ASSIGN(PlaceholderTabDelegate);
 };
 
 class TestSyncedWindowDelegate : public SyncedWindowDelegate {
  public:
-  explicit TestSyncedWindowDelegate(SessionID::id_type window_id,
+  explicit TestSyncedWindowDelegate(SessionID window_id,
                                     sync_pb::SessionWindow_BrowserType type);
   ~TestSyncedWindowDelegate() override;
 
@@ -130,7 +130,7 @@
 
   // SyncedWindowDelegate overrides.
   bool HasWindow() const override;
-  SessionID::id_type GetSessionId() const override;
+  SessionID GetSessionId() const override;
   int GetTabCount() const override;
   int GetActiveIndex() const override;
   bool IsApp() const override;
@@ -138,17 +138,17 @@
   bool IsTypePopup() const override;
   bool IsTabPinned(const SyncedTabDelegate* tab) const override;
   SyncedTabDelegate* GetTabAt(int index) const override;
-  SessionID::id_type GetTabIdAt(int index) const override;
+  SessionID GetTabIdAt(int index) const override;
   bool IsSessionRestoreInProgress() const override;
   bool ShouldSync() const override;
 
  private:
-  const SessionID::id_type window_id_;
+  const SessionID window_id_;
   const sync_pb::SessionWindow_BrowserType window_type_;
 
   std::map<int, SyncedTabDelegate*> tab_delegates_;
   std::map<int, SyncedTabDelegate*> tab_overrides_;
-  std::map<int, SessionID::id_type> tab_id_overrides_;
+  std::map<int, SessionID> tab_id_overrides_;
 
   DISALLOW_COPY_AND_ASSIGN(TestSyncedWindowDelegate);
 };
@@ -161,17 +161,17 @@
   void ResetWindows();
   TestSyncedWindowDelegate* AddWindow(
       sync_pb::SessionWindow_BrowserType type,
-      SessionID::id_type window_id = SessionID().id());
+      SessionID window_id = SessionID::NewUnique());
   // Creates a new tab within the window specified by |window_id|. The newly
   // created tab's ID can be specified optionally. Returns the newly created
   // TestSyncedTabDelegate (not owned).
-  TestSyncedTabDelegate* AddTab(SessionID::id_type window_id,
-                                SessionID::id_type tab_id = SessionID().id());
+  TestSyncedTabDelegate* AddTab(SessionID window_id,
+                                SessionID tab_id = SessionID::NewUnique());
   LocalSessionEventRouter* router();
 
   // SyncedWindowDelegatesGetter overrides.
   SyncedWindowDelegateMap GetSyncedWindowDelegates() override;
-  const SyncedWindowDelegate* FindById(SessionID::id_type id) override;
+  const SyncedWindowDelegate* FindById(SessionID id) override;
 
  private:
   class DummyRouter : public LocalSessionEventRouter {
diff --git a/components/viz/common/features.cc b/components/viz/common/features.cc
index 0fced8e..0355086 100644
--- a/components/viz/common/features.cc
+++ b/components/viz/common/features.cc
@@ -13,7 +13,7 @@
 // Enables running draw occlusion algorithm to remove Draw Quads that are not
 // shown on screen from CompositorFrame.
 const base::Feature kEnableDrawOcclusion{"DrawOcclusion",
-                                         base::FEATURE_DISABLED_BY_DEFAULT};
+                                         base::FEATURE_ENABLED_BY_DEFAULT};
 
 #if defined(USE_AURA) || defined(OS_MACOSX)
 const base::Feature kEnableSurfaceSynchronization{
diff --git a/content/DEPS b/content/DEPS
index e8cedfb..cdd964d 100644
--- a/content/DEPS
+++ b/content/DEPS
@@ -26,6 +26,8 @@
   # as autofill or extensions, and chrome implementation details such as
   # settings, packaging details, installation or crash reporting.
 
+  "+components/services/filesystem",
+
   "+crypto",
   "+grit/blink_resources.h",
   "+grit/content_strings.h",
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index 6cbca29..19fc3344 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -440,6 +440,8 @@
     "background_fetch/storage/get_registration_task.h",
     "background_fetch/storage/mark_registration_for_deletion_task.cc",
     "background_fetch/storage/mark_registration_for_deletion_task.h",
+    "background_fetch/storage/update_registration_ui_task.cc",
+    "background_fetch/storage/update_registration_ui_task.h",
     "background_sync/background_sync_context.cc",
     "background_sync/background_sync_context.h",
     "background_sync/background_sync_manager.cc",
diff --git a/content/browser/background_fetch/background_fetch.proto b/content/browser/background_fetch/background_fetch.proto
index 01e7c359..ee1c68ec 100644
--- a/content/browser/background_fetch/background_fetch.proto
+++ b/content/browser/background_fetch/background_fetch.proto
@@ -21,4 +21,9 @@
   optional string origin = 3;
 
   optional int64 creation_microseconds_since_unix_epoch = 4;
+
+  // The notification title provided by the developer. Can be updated by
+  // calling `BackgroundFetchUpdateEvent.updateUI`.
+  // https://wicg.github.io/background-fetch/#backgroundfetchupdateevent.
+  optional string title = 5;
 }
diff --git a/content/browser/background_fetch/background_fetch_context.cc b/content/browser/background_fetch/background_fetch_context.cc
index 0653c25..c1a0824 100644
--- a/content/browser/background_fetch/background_fetch_context.cc
+++ b/content/browser/background_fetch/background_fetch_context.cc
@@ -149,6 +149,8 @@
 }
 
 void BackgroundFetchContext::UpdateUI(
+    int64_t service_worker_registration_id,
+    const url::Origin& origin,
     const std::string& unique_id,
     const std::string& title,
     blink::mojom::BackgroundFetchService::UpdateUICallback callback) {
@@ -162,7 +164,7 @@
   }
 
   data_manager_.UpdateRegistrationUI(
-      unique_id, title,
+      service_worker_registration_id, origin, unique_id, title,
       base::BindOnce(&BackgroundFetchContext::DidUpdateStoredUI,
                      weak_factory_.GetWeakPtr(), unique_id, title,
                      std::move(callback)));
diff --git a/content/browser/background_fetch/background_fetch_context.h b/content/browser/background_fetch/background_fetch_context.h
index 0192e53..1714e90 100644
--- a/content/browser/background_fetch/background_fetch_context.h
+++ b/content/browser/background_fetch/background_fetch_context.h
@@ -92,10 +92,13 @@
       const std::string& unique_id,
       blink::mojom::BackgroundFetchRegistrationObserverPtr observer);
 
-  // Updates the title of the Background Fetch identified by |unique_id|. The
-  // |callback| will be invoked when the title has been updated, or an error
-  // occurred that prevents it from doing so.
+  // Updates the title of the Background Fetch identified by |unique_id| and
+  // |service_worker_registration_id| contained. The |callback| will be invoked
+  // when the title has been updated, or an error occurred that prevents it from
+  // doing so.
   void UpdateUI(
+      int64_t service_worker_registration_id,
+      const url::Origin& origin,
       const std::string& unique_id,
       const std::string& title,
       blink::mojom::BackgroundFetchService::UpdateUICallback callback);
diff --git a/content/browser/background_fetch/background_fetch_data_manager.cc b/content/browser/background_fetch/background_fetch_data_manager.cc
index 0a5974c..43af0c4 100644
--- a/content/browser/background_fetch/background_fetch_data_manager.cc
+++ b/content/browser/background_fetch/background_fetch_data_manager.cc
@@ -20,6 +20,7 @@
 #include "content/browser/background_fetch/storage/get_developer_ids_task.h"
 #include "content/browser/background_fetch/storage/get_registration_task.h"
 #include "content/browser/background_fetch/storage/mark_registration_for_deletion_task.h"
+#include "content/browser/background_fetch/storage/update_registration_ui_task.h"
 #include "content/browser/blob_storage/chrome_blob_storage_context.h"
 #include "content/browser/service_worker/service_worker_context_wrapper.h"
 #include "content/public/browser/browser_thread.h"
@@ -269,11 +270,22 @@
 }
 
 void BackgroundFetchDataManager::UpdateRegistrationUI(
+    int64_t service_worker_registration_id,
+    const url::Origin& origin,
     const std::string& unique_id,
     const std::string& title,
     blink::mojom::BackgroundFetchService::UpdateUICallback callback) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
 
+  if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+          switches::kEnableBackgroundFetchPersistence)) {
+    AddDatabaseTask(
+        std::make_unique<background_fetch::UpdateRegistrationUITask>(
+            this, service_worker_registration_id, origin, unique_id, title,
+            std::move(callback)));
+    return;
+  }
+
   auto registrations_iter = registrations_.find(unique_id);
   if (registrations_iter == registrations_.end()) {  // Not found.
     std::move(callback).Run(blink::mojom::BackgroundFetchError::INVALID_ID);
diff --git a/content/browser/background_fetch/background_fetch_data_manager.h b/content/browser/background_fetch/background_fetch_data_manager.h
index 419d459..e0400b63c 100644
--- a/content/browser/background_fetch/background_fetch_data_manager.h
+++ b/content/browser/background_fetch/background_fetch_data_manager.h
@@ -84,6 +84,8 @@
 
   // Updates the UI values for a Background Fetch registration.
   void UpdateRegistrationUI(
+      int64_t service_worker_registration_id,
+      const url::Origin& origin,
       const std::string& unique_id,
       const std::string& title,
       blink::mojom::BackgroundFetchService::UpdateUICallback callback);
diff --git a/content/browser/background_fetch/background_fetch_service_impl.cc b/content/browser/background_fetch/background_fetch_service_impl.cc
index f7dd340..dd63d98 100644
--- a/content/browser/background_fetch/background_fetch_service_impl.cc
+++ b/content/browser/background_fetch/background_fetch_service_impl.cc
@@ -106,9 +106,11 @@
   background_fetch_context_->GetIconDisplaySize(std::move(callback));
 }
 
-void BackgroundFetchServiceImpl::UpdateUI(const std::string& unique_id,
-                                          const std::string& title,
-                                          UpdateUICallback callback) {
+void BackgroundFetchServiceImpl::UpdateUI(
+    int64_t service_worker_registration_id,
+    const std::string& unique_id,
+    const std::string& title,
+    UpdateUICallback callback) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   if (!ValidateUniqueId(unique_id) || !ValidateTitle(title)) {
     std::move(callback).Run(
@@ -116,7 +118,8 @@
     return;
   }
 
-  background_fetch_context_->UpdateUI(unique_id, title, std::move(callback));
+  background_fetch_context_->UpdateUI(service_worker_registration_id, origin_,
+                                      unique_id, title, std::move(callback));
 }
 
 void BackgroundFetchServiceImpl::Abort(int64_t service_worker_registration_id,
diff --git a/content/browser/background_fetch/background_fetch_service_impl.h b/content/browser/background_fetch/background_fetch_service_impl.h
index b38694df..2e19a69 100644
--- a/content/browser/background_fetch/background_fetch_service_impl.h
+++ b/content/browser/background_fetch/background_fetch_service_impl.h
@@ -43,7 +43,8 @@
              const SkBitmap& icon,
              FetchCallback callback) override;
   void GetIconDisplaySize(GetIconDisplaySizeCallback callback) override;
-  void UpdateUI(const std::string& unique_id,
+  void UpdateUI(int64_t service_worker_registration_id,
+                const std::string& unique_id,
                 const std::string& title,
                 UpdateUICallback callback) override;
   void Abort(int64_t service_worker_registration_id,
diff --git a/content/browser/background_fetch/background_fetch_service_unittest.cc b/content/browser/background_fetch/background_fetch_service_unittest.cc
index 123494e..ffed130d 100644
--- a/content/browser/background_fetch/background_fetch_service_unittest.cc
+++ b/content/browser/background_fetch/background_fetch_service_unittest.cc
@@ -117,13 +117,14 @@
   }
 
   // Synchronous wrapper for BackgroundFetchServiceImpl::UpdateUI().
-  void UpdateUI(const std::string& unique_id,
+  void UpdateUI(int64_t service_worker_registration_id,
+                const std::string& unique_id,
                 const std::string& title,
                 blink::mojom::BackgroundFetchError* out_error) {
     DCHECK(out_error);
 
     base::RunLoop run_loop;
-    service_->UpdateUI(unique_id, title,
+    service_->UpdateUI(service_worker_registration_id, unique_id, title,
                        base::BindOnce(&BackgroundFetchServiceTest::DidGetError,
                                       base::Unretained(this),
                                       run_loop.QuitClosure(), out_error));
@@ -586,7 +587,8 @@
   std::string second_title = "2nd title";
 
   // Immediately update the title. This should succeed.
-  UpdateUI(registration_id.unique_id(), second_title, &error);
+  UpdateUI(registration_id.service_worker_registration_id(),
+           registration_id.unique_id(), second_title, &error);
   EXPECT_EQ(blink::mojom::BackgroundFetchError::NONE, error);
 
   BackgroundFetchRegistration second_registration;
@@ -786,7 +788,8 @@
   // Calling UpdateUI for the second registration should succeed, and update the
   // title of the second registration only.
   std::string updated_second_registration_title = "Foo";
-  UpdateUI(second_registration_id.unique_id(),
+  UpdateUI(second_registration_id.service_worker_registration_id(),
+           second_registration_id.unique_id(),
            updated_second_registration_title, &error);
   EXPECT_EQ(blink::mojom::BackgroundFetchError::NONE, error);
 
@@ -794,7 +797,8 @@
   // calling UpdateUI before resolving the waitUntil promise of a
   // backgroundfetched or backgroundfetchfail event, both of which should
   // work even though that registration is no longer active).
-  UpdateUI(aborted_registration_id.unique_id(), "Bar", &error);
+  UpdateUI(aborted_registration_id.service_worker_registration_id(),
+           aborted_registration_id.unique_id(), "Bar", &error);
   EXPECT_EQ(blink::mojom::BackgroundFetchError::INVALID_ID, error);
 
   // Verify that the second registration's title was indeed updated, and that it
diff --git a/content/browser/background_fetch/storage/create_registration_task.cc b/content/browser/background_fetch/storage/create_registration_task.cc
index 20bb337d..87a3b89b 100644
--- a/content/browser/background_fetch/storage/create_registration_task.cc
+++ b/content/browser/background_fetch/storage/create_registration_task.cc
@@ -7,7 +7,6 @@
 #include <utility>
 
 #include "base/strings/string_number_conversions.h"
-#include "content/browser/background_fetch/background_fetch.pb.h"
 #include "content/browser/background_fetch/storage/database_helpers.h"
 #include "content/browser/service_worker/service_worker_context_wrapper.h"
 #include "content/common/service_worker/service_worker_status_code.h"
@@ -69,13 +68,30 @@
   }
 }
 
+proto::BackgroundFetchRegistration
+CreateRegistrationTask::CreateRegistrationProto() const {
+  int64_t registration_creation_microseconds_since_unix_epoch =
+      (base::Time::Now() - base::Time::UnixEpoch()).InMicroseconds();
+
+  // First serialize per-registration (as opposed to per-request) data.
+  // TODO(crbug.com/757760): Serialize BackgroundFetchOptions as part of this.
+  proto::BackgroundFetchRegistration registration_proto;
+  registration_proto.set_unique_id(registration_->unique_id);
+  registration_proto.set_developer_id(registration_->developer_id);
+  registration_proto.set_origin(registration_id_.origin().Serialize());
+  registration_proto.set_creation_microseconds_since_unix_epoch(
+      registration_creation_microseconds_since_unix_epoch);
+
+  // TODO(crbug.com/826257): Write options to the proto.
+  registration_proto.set_title(options_.title);
+
+  return registration_proto;
+}
+
 void CreateRegistrationTask::StoreRegistration() {
   DCHECK(!registration_);
   DCHECK(!registration_id_.origin().unique());
 
-  int64_t registration_creation_microseconds_since_unix_epoch =
-      (base::Time::Now() - base::Time::UnixEpoch()).InMicroseconds();
-
   registration_ = std::make_unique<BackgroundFetchRegistration>();
   registration_->developer_id = registration_id_.developer_id();
   registration_->unique_id = registration_id_.unique_id();
@@ -88,16 +104,10 @@
   std::vector<std::pair<std::string, std::string>> entries;
   entries.reserve(requests_.size() * 2 + 1);
 
-  // First serialize per-registration (as opposed to per-request) data.
-  // TODO(crbug.com/757760): Serialize BackgroundFetchOptions as part of this.
-  proto::BackgroundFetchRegistration registration_proto;
-  registration_proto.set_unique_id(registration_->unique_id);
-  registration_proto.set_developer_id(registration_->developer_id);
-  registration_proto.set_origin(registration_id_.origin().Serialize());
-  registration_proto.set_creation_microseconds_since_unix_epoch(
-      registration_creation_microseconds_since_unix_epoch);
-  // TODO(delphick): Write options to the proto.
+  const proto::BackgroundFetchRegistration registration_proto =
+      CreateRegistrationProto();
   std::string serialized_registration_proto;
+
   if (!registration_proto.SerializeToString(&serialized_registration_proto)) {
     // TODO(crbug.com/780025): Log failures to UMA.
     std::move(callback_).Run(blink::mojom::BackgroundFetchError::STORAGE_ERROR,
@@ -105,6 +115,7 @@
     Finished();  // Destroys |this|.
     return;
   }
+
   entries.emplace_back(
       ActiveRegistrationUniqueIdKey(registration_id_.developer_id()),
       registration_id_.unique_id());
@@ -117,8 +128,9 @@
     entries.emplace_back(RequestKey(registration_id_.unique_id(), i),
                          "TODO: Serialize FetchAPIRequest as value");
     entries.emplace_back(
-        PendingRequestKey(registration_creation_microseconds_since_unix_epoch,
-                          registration_id_.unique_id(), i),
+        PendingRequestKey(
+            registration_proto.creation_microseconds_since_unix_epoch(),
+            registration_id_.unique_id(), i),
         std::string());
   }
 
diff --git a/content/browser/background_fetch/storage/create_registration_task.h b/content/browser/background_fetch/storage/create_registration_task.h
index a045e21..df40618a 100644
--- a/content/browser/background_fetch/storage/create_registration_task.h
+++ b/content/browser/background_fetch/storage/create_registration_task.h
@@ -9,6 +9,7 @@
 #include <string>
 #include <vector>
 
+#include "content/browser/background_fetch/background_fetch.pb.h"
 #include "content/browser/background_fetch/storage/database_task.h"
 #include "content/common/service_worker/service_worker_status_code.h"
 #include "content/common/service_worker/service_worker_types.h"
@@ -43,6 +44,8 @@
 
   void DidStoreRegistration(ServiceWorkerStatusCode status);
 
+  proto::BackgroundFetchRegistration CreateRegistrationProto() const;
+
   BackgroundFetchRegistrationId registration_id_;
   std::vector<ServiceWorkerFetchRequest> requests_;
   BackgroundFetchOptions options_;
diff --git a/content/browser/background_fetch/storage/update_registration_ui_task.cc b/content/browser/background_fetch/storage/update_registration_ui_task.cc
new file mode 100644
index 0000000..2eda0531
--- /dev/null
+++ b/content/browser/background_fetch/storage/update_registration_ui_task.cc
@@ -0,0 +1,98 @@
+// 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 "content/browser/background_fetch/storage/update_registration_ui_task.h"
+
+#include "content/browser/background_fetch/storage/database_helpers.h"
+#include "content/browser/service_worker/service_worker_context_wrapper.h"
+#include "third_party/WebKit/public/platform/modules/background_fetch/background_fetch.mojom.h"
+
+namespace content {
+
+namespace background_fetch {
+
+UpdateRegistrationUITask::UpdateRegistrationUITask(
+    BackgroundFetchDataManager* data_manager,
+    int64_t service_worker_registration_id,
+    const url::Origin& origin,
+    const std::string& unique_id,
+    const std::string& updated_title,
+    UpdateRegistrationUICallback callback)
+    : DatabaseTask(data_manager),
+      service_worker_registration_id_(service_worker_registration_id),
+      origin_(origin),
+      unique_id_(unique_id),
+      updated_title_(updated_title),
+      callback_(std::move(callback)),
+      weak_factory_(this) {}
+
+UpdateRegistrationUITask::~UpdateRegistrationUITask() = default;
+
+void UpdateRegistrationUITask::Start() {
+  service_worker_context()->GetRegistrationUserData(
+      service_worker_registration_id_, {RegistrationKey(unique_id_)},
+      base::BindOnce(&UpdateRegistrationUITask::DidGetUniqueId,
+                     weak_factory_.GetWeakPtr()));
+}
+
+void UpdateRegistrationUITask::DidGetUniqueId(
+    const std::vector<std::string>& data,
+    ServiceWorkerStatusCode status) {
+  switch (ToDatabaseStatus(status)) {
+    case DatabaseStatus::kNotFound:
+    case DatabaseStatus::kFailed:
+      std::move(callback_).Run(
+          blink::mojom::BackgroundFetchError::STORAGE_ERROR);
+      Finished();  // Destroys |this|.
+      return;
+    case DatabaseStatus::kOk:
+      DCHECK_EQ(1u, data.size());
+      if (data.empty()) {
+        std::move(callback_).Run(
+            blink::mojom::BackgroundFetchError::STORAGE_ERROR);
+        Finished();  // Destroys |this|.
+        return;
+      }
+      UpdateUI(data[0]);
+      return;
+  }
+}
+
+void UpdateRegistrationUITask::UpdateUI(
+    const std::string& serialized_registration_proto) {
+  proto::BackgroundFetchRegistration registration_proto;
+  if (!registration_proto.ParseFromString(serialized_registration_proto)) {
+    std::move(callback_).Run(blink::mojom::BackgroundFetchError::STORAGE_ERROR);
+    Finished();  // Destroys |this|.
+    return;
+  }
+
+  registration_proto.set_title(updated_title_);
+
+  service_worker_context()->StoreRegistrationUserData(
+      service_worker_registration_id_, origin_.GetURL(),
+      {{RegistrationKey(unique_id_), registration_proto.SerializeAsString()}},
+      base::BindRepeating(&UpdateRegistrationUITask::DidUpdateUI,
+                          weak_factory_.GetWeakPtr()));
+}
+
+void UpdateRegistrationUITask::DidUpdateUI(ServiceWorkerStatusCode status) {
+  switch (ToDatabaseStatus(status)) {
+    case DatabaseStatus::kOk:
+      break;
+    case DatabaseStatus::kFailed:
+    case DatabaseStatus::kNotFound:
+      std::move(callback_).Run(
+          blink::mojom::BackgroundFetchError::STORAGE_ERROR);
+      Finished();  // Destroys |this|.
+      return;
+  }
+
+  std::move(callback_).Run(blink::mojom::BackgroundFetchError::NONE);
+  Finished();  // Destroys |this|.
+}
+
+}  // namespace background_fetch
+
+}  // namespace content
diff --git a/content/browser/background_fetch/storage/update_registration_ui_task.h b/content/browser/background_fetch/storage/update_registration_ui_task.h
new file mode 100644
index 0000000..9d8f65ce
--- /dev/null
+++ b/content/browser/background_fetch/storage/update_registration_ui_task.h
@@ -0,0 +1,62 @@
+// 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 CONTENT_BROWSER_BACKGROUND_FETCH_STORAGE_UPDATE_REGISTRATION_UI_TASK_H_
+#define CONTENT_BROWSER_BACKGROUND_FETCH_STORAGE_UPDATE_REGISTRATION_UI_TASK_H_
+
+#include <memory>
+#include <string>
+#include <vector>
+
+#include "content/browser/background_fetch/background_fetch.pb.h"
+#include "content/browser/background_fetch/storage/database_task.h"
+#include "content/common/service_worker/service_worker_status_code.h"
+
+namespace content {
+
+namespace background_fetch {
+
+// Updates Background Fetch registration entries in the database.
+class UpdateRegistrationUITask : public DatabaseTask {
+ public:
+  using UpdateRegistrationUICallback =
+      base::OnceCallback<void(blink::mojom::BackgroundFetchError)>;
+
+  UpdateRegistrationUITask(BackgroundFetchDataManager* data_manager,
+                           int64_t service_worker_registration_id,
+                           const url::Origin& origin,
+                           const std::string& unique_id,
+                           const std::string& updated_title,
+                           UpdateRegistrationUICallback callback);
+
+  ~UpdateRegistrationUITask() override;
+
+  void Start() override;
+
+ private:
+  void DidGetUniqueId(const std::vector<std::string>& data,
+                      ServiceWorkerStatusCode status);
+
+  void UpdateUI(const std::string& serialized_registration_proto);
+
+  void DidUpdateUI(ServiceWorkerStatusCode status);
+
+  int64_t service_worker_registration_id_;
+  url::Origin origin_;
+  std::string unique_id_;
+  std::string updated_title_;
+
+  UpdateRegistrationUICallback callback_;
+
+  base::WeakPtrFactory<UpdateRegistrationUITask>
+      weak_factory_;  // Keep as last.
+
+  DISALLOW_COPY_AND_ASSIGN(UpdateRegistrationUITask);
+};
+
+}  // namespace background_fetch
+
+}  // namespace content
+
+#endif  // CONTENT_BROWSER_BACKGROUND_FETCH_STORAGE_UPDATE_REGISTRATION_UI_TASK_H_
diff --git a/content/browser/download/mhtml_generation_manager.cc b/content/browser/download/mhtml_generation_manager.cc
index 102ce72..eddbe5ce 100644
--- a/content/browser/download/mhtml_generation_manager.cc
+++ b/content/browser/download/mhtml_generation_manager.cc
@@ -130,12 +130,6 @@
   // false for failure.
   static bool CloseFileIfValid(base::File& file, int64_t* file_size);
 
-  // Creates a new map with values (content ids) the same as in
-  // |frame_tree_node_to_content_id_| map, but with the keys translated from
-  // frame_tree_node_id into a |site_instance|-specific routing_id.
-  std::map<int, std::string> CreateFrameRoutingIdToContentId(
-      SiteInstance* site_instance);
-
   // Id used to map renderer responses to jobs.
   // See also MHTMLGenerationManager::id_to_job_ map.
   const int job_id_;
@@ -163,10 +157,6 @@
   // The handle to the file the MHTML is saved to for the browser process.
   base::File browser_file_;
 
-  // Map from frames to content ids (see WebFrameSerializer::generateMHTMLParts
-  // for more details about what "content ids" are and how they are used).
-  std::map<int, std::string> frame_tree_node_to_content_id_;
-
   // MIME multipart boundary to use in the MHTML doc.
   const std::string mhtml_boundary_marker_;
 
@@ -226,28 +216,6 @@
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
 }
 
-std::map<int, std::string>
-MHTMLGenerationManager::Job::CreateFrameRoutingIdToContentId(
-    SiteInstance* site_instance) {
-  std::map<int, std::string> result;
-  for (const auto& it : frame_tree_node_to_content_id_) {
-    int ftn_id = it.first;
-    const std::string& content_id = it.second;
-
-    FrameTreeNode* ftn = FrameTreeNode::GloballyFindByID(ftn_id);
-    if (!ftn)
-      continue;
-
-    int routing_id =
-        ftn->render_manager()->GetRoutingIdForSiteInstance(site_instance);
-    if (routing_id == MSG_ROUTING_NONE)
-      continue;
-
-    result[routing_id] = content_id;
-  }
-  return result;
-}
-
 MhtmlSaveStatus MHTMLGenerationManager::Job::SendToNextRenderFrame() {
   DCHECK(browser_file_.IsValid());
   DCHECK(!pending_frame_tree_node_ids_.empty());
@@ -278,8 +246,6 @@
 
   ipc_params.destination_file = IPC::GetPlatformFileForTransit(
       browser_file_.GetPlatformFile(), false);  // |close_source_handle|.
-  ipc_params.frame_routing_id_to_content_id =
-      CreateFrameRoutingIdToContentId(rfh->GetSiteInstance());
 
   // Send the IPC asking the renderer to serialize the frame.
   DCHECK_EQ(FrameTreeNode::kFrameTreeNodeInvalidId,
@@ -357,11 +323,6 @@
   auto* rfhi = static_cast<RenderFrameHostImpl*>(render_frame_host);
   int frame_tree_node_id = rfhi->frame_tree_node()->frame_tree_node_id();
   pending_frame_tree_node_ids_.push(frame_tree_node_id);
-
-  std::string guid = base::GenerateGUID();
-  std::string content_id = base::StringPrintf("<frame-%d-%s@mhtml.blink>",
-                                              frame_tree_node_id, guid.c_str());
-  frame_tree_node_to_content_id_[frame_tree_node_id] = content_id;
 }
 
 void MHTMLGenerationManager::Job::RenderProcessHostDestroyed(
diff --git a/content/browser/fileapi/fileapi_message_filter.cc b/content/browser/fileapi/fileapi_message_filter.cc
index 2783453..1e42768 100644
--- a/content/browser/fileapi/fileapi_message_filter.cc
+++ b/content/browser/fileapi/fileapi_message_filter.cc
@@ -19,6 +19,7 @@
 #include "base/threading/thread.h"
 #include "base/time/time.h"
 #include "build/build_config.h"
+#include "components/services/filesystem/public/interfaces/types.mojom.h"
 #include "content/browser/bad_message.h"
 #include "content/browser/blob_storage/chrome_blob_storage_context.h"
 #include "content/browser/child_process_security_policy_impl.h"
@@ -37,7 +38,6 @@
 #include "storage/browser/fileapi/file_permission_policy.h"
 #include "storage/browser/fileapi/file_system_context.h"
 #include "storage/browser/fileapi/isolated_context.h"
-#include "storage/common/fileapi/directory_entry.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"
@@ -502,7 +502,7 @@
 void FileAPIMessageFilter::DidReadDirectory(
     int request_id,
     base::File::Error result,
-    std::vector<storage::DirectoryEntry> entries,
+    std::vector<filesystem::mojom::DirectoryEntry> entries,
     bool has_more) {
   if (result == base::File::FILE_OK) {
     if (!entries.empty() || !has_more)
diff --git a/content/browser/fileapi/fileapi_message_filter.h b/content/browser/fileapi/fileapi_message_filter.h
index c43d3cc..f699cc7b5 100644
--- a/content/browser/fileapi/fileapi_message_filter.h
+++ b/content/browser/fileapi/fileapi_message_filter.h
@@ -9,8 +9,10 @@
 #include <stdint.h>
 
 #include <map>
+#include <memory>
 #include <set>
 #include <string>
+#include <vector>
 
 #include "base/callback.h"
 #include "base/containers/hash_tables.h"
@@ -18,6 +20,7 @@
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/shared_memory.h"
+#include "components/services/filesystem/public/interfaces/types.mojom.h"
 #include "content/browser/streams/stream.h"
 #include "content/browser/streams/stream_context.h"
 #include "content/common/content_export.h"
@@ -36,7 +39,6 @@
 namespace storage {
 class FileSystemURL;
 class FileSystemOperationRunner;
-struct DirectoryEntry;
 struct FileSystemInfo;
 }
 
@@ -127,7 +129,7 @@
                                   const base::File::Info& info);
   void DidReadDirectory(int request_id,
                         base::File::Error result,
-                        std::vector<storage::DirectoryEntry> entries,
+                        std::vector<filesystem::mojom::DirectoryEntry> entries,
                         bool has_more);
   void DidWrite(int request_id,
                 base::File::Error result,
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index da0ce39..55f9ad5 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -374,6 +374,36 @@
 
 }  // namespace
 
+class RenderFrameHostImpl::DroppedInterfaceRequestLogger
+    : public service_manager::mojom::InterfaceProvider {
+ public:
+  DroppedInterfaceRequestLogger(
+      service_manager::mojom::InterfaceProviderRequest request)
+      : binding_(this) {
+    binding_.Bind(std::move(request));
+  }
+  ~DroppedInterfaceRequestLogger() override {
+    UMA_HISTOGRAM_EXACT_LINEAR("RenderFrameHostImpl.DroppedInterfaceRequests",
+                               num_dropped_requests_, 20);
+  }
+
+ protected:
+  // service_manager::mojom::InterfaceProvider:
+  void GetInterface(const std::string& interface_name,
+                    mojo::ScopedMessagePipeHandle pipe) override {
+    ++num_dropped_requests_;
+    DLOG(WARNING)
+        << "InterfaceRequest was dropped, the document is no longer active: "
+        << interface_name;
+  }
+
+ private:
+  mojo::Binding<service_manager::mojom::InterfaceProvider> binding_;
+  int num_dropped_requests_ = 0;
+
+  DISALLOW_COPY_AND_ASSIGN(DroppedInterfaceRequestLogger);
+};
+
 // static
 RenderFrameHost* RenderFrameHost::FromID(int render_process_id,
                                          int render_frame_id) {
@@ -1568,7 +1598,11 @@
     // request end of a new InterfaceProvider connection that will be used by
     // the new document to issue interface requests to access RenderFrameHost
     // services.
-    document_scoped_interface_provider_binding_.Close();
+    auto interface_provider_request_of_previous_document =
+        document_scoped_interface_provider_binding_.Unbind();
+    dropped_interface_request_logger_ =
+        std::make_unique<DroppedInterfaceRequestLogger>(
+            std::move(interface_provider_request_of_previous_document));
     BindInterfaceProviderRequest(std::move(interface_provider_request));
   } else {
     // If there had already been a real load committed in the frame, and this is
diff --git a/content/browser/frame_host/render_frame_host_impl.h b/content/browser/frame_host/render_frame_host_impl.h
index e21d249..8f095954 100644
--- a/content/browser/frame_host/render_frame_host_impl.h
+++ b/content/browser/frame_host/render_frame_host_impl.h
@@ -766,6 +766,8 @@
   FRIEND_TEST_ALL_PREFIXES(SecurityExploitBrowserTest,
                            AttemptDuplicateRenderViewHost);
 
+  class DroppedInterfaceRequestLogger;
+
   // IPC Message handlers.
   void OnDidAddMessageToConsole(int32_t level,
                                 const base::string16& message,
@@ -1480,6 +1482,14 @@
   mojo::Binding<service_manager::mojom::InterfaceProvider>
       document_scoped_interface_provider_binding_;
 
+  // Logs interface requests that arrive after the frame has already committed a
+  // non-same-document navigation, and has already unbound
+  // |document_scoped_interface_provider_binding_| from the interface connection
+  // that had been used to service RenderFrame::GetRemoteInterface for the
+  // previously active document in the frame.
+  std::unique_ptr<DroppedInterfaceRequestLogger>
+      dropped_interface_request_logger_;
+
   // IPC-friendly token that represents this host for AndroidOverlays, if we
   // have created one yet.
   base::Optional<base::UnguessableToken> overlay_routing_token_;
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 cc4c5b6..66d577f 100644
--- a/content/browser/frame_host/render_frame_host_impl_browsertest.cc
+++ b/content/browser/frame_host/render_frame_host_impl_browsertest.cc
@@ -10,6 +10,7 @@
 #include "base/bind_helpers.h"
 #include "base/run_loop.h"
 #include "base/test/bind_test_util.h"
+#include "base/test/histogram_tester.h"
 #include "base/test/mock_callback.h"
 #include "build/build_config.h"
 #include "content/browser/frame_host/navigation_handle_impl.h"
@@ -275,6 +276,11 @@
   DISALLOW_COPY_AND_ASSIGN(DropBeforeUnloadACKFilter);
 };
 
+mojo::ScopedMessagePipeHandle CreateDisconnectedMessagePipeHandle() {
+  mojo::MessagePipe pipe;
+  return std::move(pipe.handle0);
+}
+
 }  // namespace
 
 // Tests that a beforeunload dialog in an iframe doesn't stop the beforeunload
@@ -1299,4 +1305,84 @@
   EXPECT_EQ(url::Origin::Create(kMainFrameURL), child->current_origin());
 }
 
+// Verify that if the UMA histograms are correctly recording if interface
+// provider requests are getting dropped because they racily arrive from the
+// previously active document (after the next navigation already committed).
+IN_PROC_BROWSER_TEST_F(RenderFrameHostImplBrowserTest,
+                       DroppedInterfaceRequestCounter) {
+  const GURL kUrl1(embedded_test_server()->GetURL("/title1.html"));
+  const GURL kUrl2(embedded_test_server()->GetURL("/title2.html"));
+  const GURL kUrl3(embedded_test_server()->GetURL("/title3.html"));
+  const GURL kUrl4(embedded_test_server()->GetURL("/empty.html"));
+
+  // Client ends of the fake interface provider requests injected for the first
+  // and second navigations.
+  service_manager::mojom::InterfaceProviderPtr interface_provider_1;
+  service_manager::mojom::InterfaceProviderPtr interface_provider_2;
+
+  base::RunLoop wait_until_connection_error_loop_1;
+  base::RunLoop wait_until_connection_error_loop_2;
+
+  {
+    ScopedFakeInterfaceProviderRequestInjector injector(
+        shell()->web_contents());
+    injector.set_fake_request_for_next_commit(
+        mojo::MakeRequest(&interface_provider_1));
+    interface_provider_1.set_connection_error_handler(
+        wait_until_connection_error_loop_1.QuitClosure());
+    ASSERT_TRUE(NavigateToURL(shell(), kUrl1));
+  }
+
+  {
+    ScopedFakeInterfaceProviderRequestInjector injector(
+        shell()->web_contents());
+    injector.set_fake_request_for_next_commit(
+        mojo::MakeRequest(&interface_provider_2));
+    interface_provider_2.set_connection_error_handler(
+        wait_until_connection_error_loop_2.QuitClosure());
+    ASSERT_TRUE(NavigateToURL(shell(), kUrl2));
+  }
+
+  // Simulate two interface requests corresponding to the first navigation
+  // arrived after the second navigation was committed, hence were dropped.
+  interface_provider_1->GetInterface("content::mojom::BrowserTarget",
+                                     CreateDisconnectedMessagePipeHandle());
+  interface_provider_1->GetInterface("content::mojom::BrowserTarget",
+                                     CreateDisconnectedMessagePipeHandle());
+
+  // RFHI destroys the DroppedInterfaceRequestLogger from navigation `n` on
+  // navigation `n+2`. Histrograms are recorded on destruction, there should
+  // be a single sample indicating two requests having been dropped for the
+  // first URL.
+  {
+    base::HistogramTester histogram_tester;
+    ASSERT_TRUE(NavigateToURL(shell(), kUrl3));
+    histogram_tester.ExpectUniqueSample(
+        "RenderFrameHostImpl.DroppedInterfaceRequests", 2, 1);
+  }
+
+  // Simulate one interface request dropped for the second URL.
+  interface_provider_2->GetInterface("content::mojom::BrowserTarget",
+                                     CreateDisconnectedMessagePipeHandle());
+
+  // A final navigation should record the sample from the second URL.
+  {
+    base::HistogramTester histogram_tester;
+    ASSERT_TRUE(NavigateToURL(shell(), kUrl4));
+    histogram_tester.ExpectUniqueSample(
+        "RenderFrameHostImpl.DroppedInterfaceRequests", 1, 1);
+  }
+
+  // Both the DroppedInterfaceRequestLogger for the first and second URLs are
+  // destroyed -- even more interfacerequests should not cause any crashes.
+  interface_provider_1->GetInterface("content::mojom::BrowserTarget",
+                                     CreateDisconnectedMessagePipeHandle());
+  interface_provider_2->GetInterface("content::mojom::BrowserTarget",
+                                     CreateDisconnectedMessagePipeHandle());
+
+  // The interface connections should be broken.
+  wait_until_connection_error_loop_1.Run();
+  wait_until_connection_error_loop_2.Run();
+}
+
 }  // namespace content
diff --git a/content/browser/plugin_private_storage_helper.cc b/content/browser/plugin_private_storage_helper.cc
index 12ee66f..065e213 100644
--- a/content/browser/plugin_private_storage_helper.cc
+++ b/content/browser/plugin_private_storage_helper.cc
@@ -10,6 +10,7 @@
 #include <memory>
 #include <set>
 #include <string>
+#include <utility>
 
 #include "base/bind.h"
 #include "base/compiler_specific.h"
@@ -181,21 +182,23 @@
     storage::AsyncFileUtil* file_util = filesystem_context_->GetAsyncFileUtil(
         storage::kFileSystemTypePluginPrivate);
     for (const auto& file : file_list) {
-      DVLOG(3) << __func__ << " file: " << file.name;
-      DCHECK(!file.is_directory);  // Nested directories not implemented.
+      DVLOG(3) << __func__ << " file: " << file.name.value();
+      // Nested directories not implemented.
+      DCHECK_NE(file.type, filesystem::mojom::FsFileType::DIRECTORY);
 
       std::unique_ptr<storage::FileSystemOperationContext> operation_context =
           std::make_unique<storage::FileSystemOperationContext>(
               filesystem_context_);
       storage::FileSystemURL file_url = filesystem_context_->CrackURL(
-          GURL(root + StringTypeToString(file.name)));
+          GURL(root + StringTypeToString(file.name.value())));
       IncrementTaskCount();
       file_util->GetFileInfo(
           std::move(operation_context), file_url,
           storage::FileSystemOperation::GET_METADATA_FIELD_SIZE |
               storage::FileSystemOperation::GET_METADATA_FIELD_LAST_MODIFIED,
           base::Bind(&PluginPrivateDataByOriginChecker::OnFileInfo,
-                     base::Unretained(this), StringTypeToString(file.name)));
+                     base::Unretained(this),
+                     StringTypeToString(file.name.value())));
     }
   }
 
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 ab1c3fc..ea6cf498 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
@@ -7,6 +7,7 @@
 #include <string.h>
 
 #include <string>
+#include <vector>
 
 #include "base/callback.h"
 #include "base/files/file_util.h"
@@ -236,8 +237,9 @@
       dir_path += '/';
 
     for (const auto& it : *accumulated_file_list) {
-      file_types.push_back(it.is_directory ? PP_FILETYPE_DIRECTORY
-                                           : PP_FILETYPE_REGULAR);
+      file_types.push_back(it.type == filesystem::mojom::FsFileType::DIRECTORY
+                               ? PP_FILETYPE_DIRECTORY
+                               : PP_FILETYPE_REGULAR);
 
       ppapi::FileRefCreateInfo info;
       info.file_system_type = fs_type_;
diff --git a/content/browser/renderer_host/render_process_host_unittest.cc b/content/browser/renderer_host/render_process_host_unittest.cc
index 567ea53..77cbeff 100644
--- a/content/browser/renderer_host/render_process_host_unittest.cc
+++ b/content/browser/renderer_host/render_process_host_unittest.cc
@@ -426,7 +426,8 @@
 }
 
 // Tests that RenderProcessHost reuse considers navigations correctly.
-TEST_F(RenderProcessHostUnitTest, ReuseNavigationProcess) {
+// Disabled for flakiness: see https://crbug.com/826595
+TEST_F(RenderProcessHostUnitTest, DISABLED_ReuseNavigationProcess) {
   const GURL kUrl1("http://foo.com");
   const GURL kUrl2("http://bar.com");
 
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc
index ff5642ea..ce85cd8 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -2011,7 +2011,7 @@
 void RenderWidgetHostViewAndroid::OnAttachCompositor() {
   DCHECK(view_.parent());
   CreateOverscrollControllerIfPossible();
-  if (observing_root_window_) {
+  if (observing_root_window_ && using_browser_compositor_) {
     ui::WindowAndroidCompositor* compositor =
         view_.GetWindowAndroid()->GetCompositor();
     delegated_frame_host_->AttachToCompositor(compositor);
@@ -2020,10 +2020,10 @@
 
 void RenderWidgetHostViewAndroid::OnDetachCompositor() {
   DCHECK(view_.parent());
-  DCHECK(using_browser_compositor_);
   RunAckCallbacks();
   overscroll_controller_.reset();
-  delegated_frame_host_->DetachFromCompositor();
+  if (using_browser_compositor_)
+    delegated_frame_host_->DetachFromCompositor();
 }
 
 void RenderWidgetHostViewAndroid::OnBeginFrame(
diff --git a/content/browser/renderer_host/render_widget_host_view_child_frame.cc b/content/browser/renderer_host/render_widget_host_view_child_frame.cc
index 4836245..293950f 100644
--- a/content/browser/renderer_host/render_widget_host_view_child_frame.cc
+++ b/content/browser/renderer_host/render_widget_host_view_child_frame.cc
@@ -318,6 +318,12 @@
   return GetViewBounds().size();
 }
 
+void RenderWidgetHostViewChildFrame::SetInsets(const gfx::Insets& insets) {
+  // Do nothing here. For subframes, the visual viewport corresponds to the main
+  // frame viewport size, so this request will be handled in SetInsets of the
+  // main frame's RenderWidgetHostView.
+}
+
 gfx::Vector2dF RenderWidgetHostViewChildFrame::GetLastScrollOffset() const {
   return last_scroll_offset_;
 }
diff --git a/content/browser/renderer_host/render_widget_host_view_child_frame.h b/content/browser/renderer_host/render_widget_host_view_child_frame.h
index 7778bca..ee2b012a 100644
--- a/content/browser/renderer_host/render_widget_host_view_child_frame.h
+++ b/content/browser/renderer_host/render_widget_host_view_child_frame.h
@@ -101,6 +101,7 @@
   bool IsShowing() override;
   gfx::Rect GetViewBounds() const override;
   gfx::Size GetVisibleViewportSize() const override;
+  void SetInsets(const gfx::Insets& insets) override;
   gfx::Vector2dF GetLastScrollOffset() const override;
   gfx::NativeView GetNativeView() const override;
   gfx::NativeViewAccessible GetNativeViewAccessible() override;
diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn
index 198e805..a64a25d 100644
--- a/content/common/BUILD.gn
+++ b/content/common/BUILD.gn
@@ -328,6 +328,7 @@
     "//build/util:webkit_version",
     "//cc/ipc",
     "//components/discardable_memory/common",
+    "//components/services/filesystem/public/interfaces",
     "//components/tracing",
     "//components/tracing:startup_tracing",
     "//components/viz/service",
diff --git a/content/common/fileapi/file_system_messages.h b/content/common/fileapi/file_system_messages.h
index dfd43e63..9edd48c 100644
--- a/content/common/fileapi/file_system_messages.h
+++ b/content/common/fileapi/file_system_messages.h
@@ -9,9 +9,12 @@
 
 #include <stdint.h>
 
+#include <string>
+#include <vector>
+
+#include "components/services/filesystem/public/interfaces/types.mojom.h"
 #include "ipc/ipc_message_macros.h"
 #include "ipc/ipc_platform_file.h"
-#include "storage/common/fileapi/directory_entry.h"
 #include "storage/common/fileapi/file_system_info.h"
 #include "storage/common/fileapi/file_system_types.h"
 #include "storage/common/quota/quota_limit_type.h"
@@ -21,9 +24,9 @@
 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
 #define IPC_MESSAGE_START FileSystemMsgStart
 
-IPC_STRUCT_TRAITS_BEGIN(storage::DirectoryEntry)
+IPC_STRUCT_TRAITS_BEGIN(filesystem::mojom::DirectoryEntry)
   IPC_STRUCT_TRAITS_MEMBER(name)
-  IPC_STRUCT_TRAITS_MEMBER(is_directory)
+  IPC_STRUCT_TRAITS_MEMBER(type)
 IPC_STRUCT_TRAITS_END()
 
 IPC_STRUCT_TRAITS_BEGIN(storage::FileSystemInfo)
@@ -32,6 +35,8 @@
   IPC_STRUCT_TRAITS_MEMBER(mount_type)
 IPC_STRUCT_TRAITS_END()
 
+IPC_ENUM_TRAITS_MAX_VALUE(filesystem::mojom::FsFileType,
+                          filesystem::mojom::FsFileType::DIRECTORY)
 IPC_ENUM_TRAITS_MAX_VALUE(storage::FileSystemType,
                           storage::FileSystemType::kFileSystemTypeLast)
 IPC_ENUM_TRAITS_MAX_VALUE(storage::QuotaLimitType, storage::kQuotaLimitTypeLast)
@@ -59,10 +64,11 @@
                      int /* request_id */,
                      base::File::Info,
                      base::FilePath /* true platform path */)
-IPC_MESSAGE_CONTROL3(FileSystemMsg_DidReadDirectory,
-                     int /* request_id */,
-                     std::vector<storage::DirectoryEntry> /* entries */,
-                     bool /* has_more */)
+IPC_MESSAGE_CONTROL3(
+    FileSystemMsg_DidReadDirectory,
+    int /* request_id */,
+    std::vector<filesystem::mojom::DirectoryEntry> /* entries */,
+    bool /* has_more */)
 IPC_MESSAGE_CONTROL3(FileSystemMsg_DidWrite,
                      int /* request_id */,
                      int64_t /* byte count */,
diff --git a/content/common/frame_messages.h b/content/common/frame_messages.h
index de78673..130fbd0a 100644
--- a/content/common/frame_messages.h
+++ b/content/common/frame_messages.h
@@ -88,9 +88,6 @@
 using FrameMsg_GetSerializedHtmlWithLocalLinks_FrameRoutingIdMap =
     std::map<int, base::FilePath>;
 
-using FrameMsg_SerializeAsMHTML_FrameRoutingIdToContentIdMap =
-    std::map<int, std::string>;
-
 #endif  // INTERNAL_CONTENT_COMMON_FRAME_MESSAGES_H_
 
 #undef IPC_MESSAGE_EXPORT
@@ -606,12 +603,6 @@
   // Whether to detect problems while serializing.
   IPC_STRUCT_MEMBER(bool, mhtml_problem_detection)
 
-  // Frame to content-id map.
-  // Keys are routing ids of either RenderFrames or RenderFrameProxies.
-  // Values are MHTML content-ids - see WebFrameSerializer::generateMHTMLParts.
-  IPC_STRUCT_MEMBER(FrameMsg_SerializeAsMHTML_FrameRoutingIdToContentIdMap,
-                    frame_routing_id_to_content_id)
-
   // |digests_of_uris_to_skip| contains digests of uris of MHTML parts that
   // should be skipped.  This helps deduplicate mhtml parts across frames.
   // SECURITY NOTE: Sha256 digests (rather than uris) are used to prevent
diff --git a/content/public/test/DEPS b/content/public/test/DEPS
index 01cbc06a..a212ced 100644
--- a/content/public/test/DEPS
+++ b/content/public/test/DEPS
@@ -23,4 +23,7 @@
     "+third_party/iaccessible2",
     "+ui/base/resource/resource_bundle.h",
   ],
+  "content_browser_test.cc": [
+    "+ui/views/test/widget_test_api.h"
+  ],
 }
diff --git a/content/public/test/content_browser_test.cc b/content/public/test/content_browser_test.cc
index 8e4bd2f..1875bc5 100644
--- a/content/public/test/content_browser_test.cc
+++ b/content/public/test/content_browser_test.cc
@@ -30,6 +30,10 @@
 #include "ui/base/ime/input_method_initializer.h"
 #endif
 
+#if defined(USE_AURA) && defined(TOOLKIT_VIEWS)
+#include "ui/views/test/widget_test_api.h"  // nogncheck
+#endif
+
 namespace content {
 
 ContentBrowserTest::ContentBrowserTest() {
@@ -81,6 +85,13 @@
                                  subprocess_path);
 #endif
 
+#if defined(USE_AURA) && defined(TOOLKIT_VIEWS)
+  // https://crbug.com/695054: Ignore window activation/deactivation to make
+  // the Chrome-internal focus unaffected by OS events caused by running tests
+  // in parallel.
+  views::DisableActivationChangeHandlingForTests();
+#endif
+
   // LinuxInputMethodContextFactory has to be initialized.
 #if !defined(OS_CHROMEOS) && defined(OS_LINUX)
   ui::InitializeInputMethodForTesting();
diff --git a/content/renderer/fileapi/file_system_dispatcher.cc b/content/renderer/fileapi/file_system_dispatcher.cc
index b2f2ad37..77d8e5b 100644
--- a/content/renderer/fileapi/file_system_dispatcher.cc
+++ b/content/renderer/fileapi/file_system_dispatcher.cc
@@ -5,12 +5,14 @@
 #include "content/renderer/fileapi/file_system_dispatcher.h"
 
 #include <memory>
+#include <utility>
 
 #include "base/callback.h"
 #include "base/files/file_util.h"
 #include "base/macros.h"
 #include "base/memory/ptr_util.h"
 #include "base/process/process.h"
+#include "components/services/filesystem/public/interfaces/types.mojom.h"
 #include "content/child/child_thread_impl.h"
 #include "content/common/fileapi/file_system_messages.h"
 #include "storage/common/fileapi/file_system_info.h"
@@ -19,15 +21,6 @@
 
 class FileSystemDispatcher::CallbackDispatcher {
  public:
-  typedef CallbackDispatcher self;
-  typedef FileSystemDispatcher::StatusCallback StatusCallback;
-  typedef FileSystemDispatcher::MetadataCallback MetadataCallback;
-  typedef FileSystemDispatcher::ReadDirectoryCallback ReadDirectoryCallback;
-  typedef FileSystemDispatcher::OpenFileSystemCallback OpenFileSystemCallback;
-  typedef FileSystemDispatcher::ResolveURLCallback ResolveURLCallback;
-  typedef FileSystemDispatcher::WriteCallback WriteCallback;
-  typedef FileSystemDispatcher::OpenFileCallback OpenFileCallback;
-
   static std::unique_ptr<CallbackDispatcher> Create(
       const StatusCallback& callback) {
     auto dispatcher = base::WrapUnique(new CallbackDispatcher);
@@ -86,9 +79,7 @@
 
   ~CallbackDispatcher() {}
 
-  void DidSucceed() {
-    status_callback_.Run(base::File::FILE_OK);
-  }
+  void DidSucceed() { status_callback_.Run(base::File::FILE_OK); }
 
   void DidFail(base::File::Error error_code) {
     error_callback_.Run(error_code);
@@ -106,8 +97,9 @@
     snapshot_callback_.Run(file_info, platform_path, request_id);
   }
 
-  void DidReadDirectory(const std::vector<storage::DirectoryEntry>& entries,
-                        bool has_more) {
+  void DidReadDirectory(
+      const std::vector<filesystem::mojom::DirectoryEntry>& entries,
+      bool has_more) {
     directory_callback_.Run(entries, has_more);
   }
 
@@ -376,7 +368,7 @@
 
 void FileSystemDispatcher::OnDidReadDirectory(
     int request_id,
-    const std::vector<storage::DirectoryEntry>& entries,
+    const std::vector<filesystem::mojom::DirectoryEntry>& entries,
     bool has_more) {
   CallbackDispatcher* dispatcher = dispatchers_.Lookup(request_id);
   DCHECK(dispatcher);
diff --git a/content/renderer/fileapi/file_system_dispatcher.h b/content/renderer/fileapi/file_system_dispatcher.h
index 39ac857..676e471 100644
--- a/content/renderer/fileapi/file_system_dispatcher.h
+++ b/content/renderer/fileapi/file_system_dispatcher.h
@@ -7,6 +7,7 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
@@ -14,6 +15,7 @@
 #include "base/containers/id_map.h"
 #include "base/macros.h"
 #include "base/process/process.h"
+#include "components/services/filesystem/public/interfaces/types.mojom.h"
 #include "ipc/ipc_listener.h"
 #include "ipc/ipc_platform_file.h"
 #include "storage/common/fileapi/file_system_types.h"
@@ -24,7 +26,6 @@
 }
 
 namespace storage {
-struct DirectoryEntry;
 struct FileSystemInfo;
 }
 
@@ -38,21 +39,24 @@
 class FileSystemDispatcher : public IPC::Listener {
  public:
   typedef base::Callback<void(base::File::Error error)> StatusCallback;
+  typedef base::Callback<void(const base::File::Info& file_info)>
+      MetadataCallback;
+  typedef base::Callback<void(const base::File::Info& file_info,
+                              const base::FilePath& platform_path,
+                              int request_id)>
+      CreateSnapshotFileCallback;
+
   typedef base::Callback<void(
-      const base::File::Info& file_info)> MetadataCallback;
-  typedef base::Callback<void(
-      const base::File::Info& file_info,
-      const base::FilePath& platform_path,
-      int request_id)> CreateSnapshotFileCallback;
-  typedef base::Callback<
-      void(const std::vector<storage::DirectoryEntry>& entries, bool has_more)>
+      const std::vector<filesystem::mojom::DirectoryEntry>& entries,
+      bool has_more)>
       ReadDirectoryCallback;
-  typedef base::Callback<void(
-      const std::string& name,
-      const GURL& root)> OpenFileSystemCallback;
+  typedef base::Callback<void(const std::string& name, const GURL& root)>
+      OpenFileSystemCallback;
   typedef base::Callback<void(const storage::FileSystemInfo& info,
                               const base::FilePath& file_path,
-                              bool is_directory)> ResolveURLCallback;
+                              bool is_directory)>
+      ResolveURLCallback;
+
   typedef base::Callback<void(int64_t bytes, bool complete)> WriteCallback;
   typedef base::Callback<void(base::PlatformFile file,
                               int file_open_id,
@@ -78,9 +82,7 @@
   void Copy(const GURL& src_path,
             const GURL& dest_path,
             const StatusCallback& callback);
-  void Remove(const GURL& path,
-              bool recursive,
-              const StatusCallback& callback);
+  void Remove(const GURL& path, bool recursive, const StatusCallback& callback);
   void ReadMetadata(const GURL& path,
                     const MetadataCallback& success_callback,
                     const StatusCallback& error_callback);
@@ -107,8 +109,7 @@
              int* request_id_out,
              const WriteCallback& success_callback,
              const StatusCallback& error_callback);
-  void Cancel(int request_id_to_cancel,
-              const StatusCallback& callback);
+  void Cancel(int request_id_to_cancel, const StatusCallback& callback);
   void TouchFile(const GURL& file_path,
                  const base::Time& last_access_time,
                  const base::Time& last_modified_time,
@@ -138,9 +139,10 @@
   void OnDidCreateSnapshotFile(int request_id,
                                const base::File::Info& file_info,
                                const base::FilePath& platform_path);
-  void OnDidReadDirectory(int request_id,
-                          const std::vector<storage::DirectoryEntry>& entries,
-                          bool has_more);
+  void OnDidReadDirectory(
+      int request_id,
+      const std::vector<filesystem::mojom::DirectoryEntry>& entries,
+      bool has_more);
   void OnDidFail(int request_id, base::File::Error error_code);
   void OnDidWrite(int request_id, int64_t bytes, bool complete);
 
diff --git a/content/renderer/fileapi/webfilesystem_impl.cc b/content/renderer/fileapi/webfilesystem_impl.cc
index 1ec25c92..7d99fda3 100644
--- a/content/renderer/fileapi/webfilesystem_impl.cc
+++ b/content/renderer/fileapi/webfilesystem_impl.cc
@@ -5,7 +5,9 @@
 #include "content/renderer/fileapi/webfilesystem_impl.h"
 
 #include <stddef.h>
+#include <string>
 #include <tuple>
+#include <vector>
 
 #include "base/bind.h"
 #include "base/lazy_instance.h"
@@ -15,12 +17,12 @@
 #include "base/synchronization/waitable_event.h"
 #include "base/threading/thread_local.h"
 #include "base/threading/thread_task_runner_handle.h"
+#include "components/services/filesystem/public/interfaces/types.mojom.h"
 #include "content/common/fileapi/file_system_messages.h"
 #include "content/renderer/file_info_util.h"
 #include "content/renderer/fileapi/file_system_dispatcher.h"
 #include "content/renderer/fileapi/webfilewriter_impl.h"
 #include "content/renderer/render_thread_impl.h"
-#include "storage/common/fileapi/directory_entry.h"
 #include "storage/common/fileapi/file_system_util.h"
 #include "third_party/WebKit/public/platform/FilePathConversion.h"
 #include "third_party/WebKit/public/platform/WebFileInfo.h"
@@ -137,14 +139,16 @@
   callbacks->DidReadMetadata(web_file_info);
 }
 
-void DidReadDirectory(const std::vector<storage::DirectoryEntry>& entries,
-                      bool has_more,
-                      WebFileSystemCallbacks* callbacks) {
+void DidReadDirectory(
+    const std::vector<filesystem::mojom::DirectoryEntry>& entries,
+    bool has_more,
+    WebFileSystemCallbacks* callbacks) {
   WebVector<WebFileSystemEntry> file_system_entries(entries.size());
   for (size_t i = 0; i < entries.size(); ++i) {
     file_system_entries[i].name =
         blink::FilePathToWebString(base::FilePath(entries[i].name));
-    file_system_entries[i].is_directory = entries[i].is_directory;
+    file_system_entries[i].is_directory =
+        entries[i].type == filesystem::mojom::FsFileType::DIRECTORY;
   }
   callbacks->DidReadDirectory(file_system_entries, has_more);
 }
@@ -279,7 +283,7 @@
     const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
     int callbacks_id,
     WaitableCallbackResults* waitable_results,
-    const std::vector<storage::DirectoryEntry>& entries,
+    const std::vector<filesystem::mojom::DirectoryEntry>& entries,
     bool has_more) {
   CallbackFileSystemCallbacks(
       task_runner, callbacks_id, waitable_results,
diff --git a/content/renderer/loader/url_loader_client_impl.cc b/content/renderer/loader/url_loader_client_impl.cc
index 0e7c4b23..acf9e29 100644
--- a/content/renderer/loader/url_loader_client_impl.cc
+++ b/content/renderer/loader/url_loader_client_impl.cc
@@ -225,8 +225,9 @@
 
 void URLLoaderClientImpl::Bind(
     network::mojom::URLLoaderClientEndpointsPtr endpoints) {
-  url_loader_.Bind(std::move(endpoints->url_loader));
-  url_loader_client_binding_.Bind(std::move(endpoints->url_loader_client));
+  url_loader_.Bind(std::move(endpoints->url_loader), task_runner_);
+  url_loader_client_binding_.Bind(std::move(endpoints->url_loader_client),
+                                  task_runner_);
   url_loader_client_binding_.set_connection_error_handler(base::BindOnce(
       &URLLoaderClientImpl::OnConnectionClosed, weak_factory_.GetWeakPtr()));
 }
diff --git a/content/renderer/media/webrtc/rtc_peer_connection_handler.cc b/content/renderer/media/webrtc/rtc_peer_connection_handler.cc
index ecb26c4..508ff40 100644
--- a/content/renderer/media/webrtc/rtc_peer_connection_handler.cc
+++ b/content/renderer/media/webrtc/rtc_peer_connection_handler.cc
@@ -1796,8 +1796,8 @@
     return nullptr;
   DCHECK(FindSender(RTCRtpSender::getId(webrtc_sender)) == rtp_senders_.end());
   rtp_senders_.push_back(std::make_unique<RTCRtpSender>(
-      task_runner_, signaling_thread(), stream_adapter_map_,
-      std::move(webrtc_sender), std::move(track_adapter),
+      native_peer_connection_, task_runner_, signaling_thread(),
+      stream_adapter_map_, std::move(webrtc_sender), std::move(track_adapter),
       std::move(stream_adapters)));
   for (const auto& stream_ref : rtp_senders_.back()->stream_refs()) {
     if (GetLocalStreamUsageCount(rtp_senders_,
diff --git a/content/renderer/media/webrtc/rtc_rtp_sender.cc b/content/renderer/media/webrtc/rtc_rtp_sender.cc
index 28aaa80..f99f1695 100644
--- a/content/renderer/media/webrtc/rtc_rtp_sender.cc
+++ b/content/renderer/media/webrtc/rtc_rtp_sender.cc
@@ -9,6 +9,7 @@
 #include "base/logging.h"
 #include "content/renderer/media/webrtc/rtc_dtmf_sender_handler.h"
 #include "content/renderer/media/webrtc/rtc_rtp_parameters.h"
+#include "content/renderer/media/webrtc/rtc_stats.h"
 
 namespace content {
 
@@ -31,13 +32,15 @@
     : public base::RefCountedThreadSafe<RTCRtpSender::RTCRtpSenderInternal> {
  public:
   RTCRtpSenderInternal(
+      scoped_refptr<webrtc::PeerConnectionInterface> native_peer_connection,
       scoped_refptr<base::SingleThreadTaskRunner> main_thread,
       scoped_refptr<base::SingleThreadTaskRunner> signaling_thread,
       scoped_refptr<WebRtcMediaStreamAdapterMap> stream_map,
       rtc::scoped_refptr<webrtc::RtpSenderInterface> webrtc_sender,
       blink::WebMediaStreamTrack web_track,
       std::vector<blink::WebMediaStream> web_streams)
-      : main_thread_(std::move(main_thread)),
+      : native_peer_connection_(std::move(native_peer_connection)),
+        main_thread_(std::move(main_thread)),
         signaling_thread_(std::move(signaling_thread)),
         stream_map_(std::move(stream_map)),
         webrtc_sender_(std::move(webrtc_sender)) {
@@ -59,6 +62,7 @@
   }
 
   RTCRtpSenderInternal(
+      scoped_refptr<webrtc::PeerConnectionInterface> native_peer_connection,
       scoped_refptr<base::SingleThreadTaskRunner> main_thread,
       scoped_refptr<base::SingleThreadTaskRunner> signaling_thread,
       scoped_refptr<WebRtcMediaStreamAdapterMap> stream_map,
@@ -66,7 +70,8 @@
       std::unique_ptr<WebRtcMediaStreamTrackAdapterMap::AdapterRef> track_ref,
       std::vector<std::unique_ptr<WebRtcMediaStreamAdapterMap::AdapterRef>>
           stream_refs)
-      : main_thread_(std::move(main_thread)),
+      : native_peer_connection_(std::move(native_peer_connection)),
+        main_thread_(std::move(main_thread)),
         signaling_thread_(std::move(signaling_thread)),
         stream_map_(std::move(stream_map)),
         webrtc_sender_(std::move(webrtc_sender)),
@@ -129,6 +134,14 @@
         GetWebRTCRtpParameters(parameters));
   }
 
+  void GetStats(std::unique_ptr<blink::WebRTCStatsReportCallback> callback) {
+    signaling_thread_->PostTask(
+        FROM_HERE,
+        base::BindOnce(
+            &RTCRtpSender::RTCRtpSenderInternal::GetStatsOnSignalingThread,
+            this, std::move(callback)));
+  }
+
   bool RemoveFromPeerConnection(webrtc::PeerConnectionInterface* pc) {
     if (!pc->RemoveTrack(webrtc_sender_))
       return false;
@@ -169,9 +182,17 @@
     std::move(callback).Run(result);
   }
 
+  void GetStatsOnSignalingThread(
+      std::unique_ptr<blink::WebRTCStatsReportCallback> callback) {
+    native_peer_connection_->GetStats(webrtc_sender_,
+                                      RTCStatsCollectorCallbackImpl::Create(
+                                          main_thread_, std::move(callback)));
+  }
+
+  const scoped_refptr<webrtc::PeerConnectionInterface> native_peer_connection_;
   const scoped_refptr<base::SingleThreadTaskRunner> main_thread_;
   const scoped_refptr<base::SingleThreadTaskRunner> signaling_thread_;
-  scoped_refptr<WebRtcMediaStreamAdapterMap> stream_map_;
+  const scoped_refptr<WebRtcMediaStreamAdapterMap> stream_map_;
   const rtc::scoped_refptr<webrtc::RtpSenderInterface> webrtc_sender_;
   // The track adapter is the glue between blink and webrtc layer tracks.
   // Keeping a reference to the adapter ensures it is not disposed, as is
@@ -188,13 +209,15 @@
 }
 
 RTCRtpSender::RTCRtpSender(
+    scoped_refptr<webrtc::PeerConnectionInterface> native_peer_connection,
     scoped_refptr<base::SingleThreadTaskRunner> main_thread,
     scoped_refptr<base::SingleThreadTaskRunner> signaling_thread,
     scoped_refptr<WebRtcMediaStreamAdapterMap> stream_map,
     rtc::scoped_refptr<webrtc::RtpSenderInterface> webrtc_sender,
     blink::WebMediaStreamTrack web_track,
     std::vector<blink::WebMediaStream> web_streams)
-    : internal_(new RTCRtpSenderInternal(std::move(main_thread),
+    : internal_(new RTCRtpSenderInternal(std::move(native_peer_connection),
+                                         std::move(main_thread),
                                          std::move(signaling_thread),
                                          std::move(stream_map),
                                          std::move(webrtc_sender),
@@ -202,6 +225,7 @@
                                          std::move(web_streams))) {}
 
 RTCRtpSender::RTCRtpSender(
+    scoped_refptr<webrtc::PeerConnectionInterface> native_peer_connection,
     scoped_refptr<base::SingleThreadTaskRunner> main_thread,
     scoped_refptr<base::SingleThreadTaskRunner> signaling_thread,
     scoped_refptr<WebRtcMediaStreamAdapterMap> stream_map,
@@ -209,7 +233,8 @@
     std::unique_ptr<WebRtcMediaStreamTrackAdapterMap::AdapterRef> track_ref,
     std::vector<std::unique_ptr<WebRtcMediaStreamAdapterMap::AdapterRef>>
         stream_refs)
-    : internal_(new RTCRtpSenderInternal(std::move(main_thread),
+    : internal_(new RTCRtpSenderInternal(std::move(native_peer_connection),
+                                         std::move(main_thread),
                                          std::move(signaling_thread),
                                          std::move(stream_map),
                                          std::move(webrtc_sender),
@@ -256,6 +281,11 @@
   return internal_->GetParameters();
 }
 
+void RTCRtpSender::GetStats(
+    std::unique_ptr<blink::WebRTCStatsReportCallback> callback) {
+  internal_->GetStats(std::move(callback));
+}
+
 webrtc::RtpSenderInterface* RTCRtpSender::webrtc_sender() const {
   return internal_->webrtc_sender();
 }
diff --git a/content/renderer/media/webrtc/rtc_rtp_sender.h b/content/renderer/media/webrtc/rtc_rtp_sender.h
index 5f79744..9aba12e 100644
--- a/content/renderer/media/webrtc/rtc_rtp_sender.h
+++ b/content/renderer/media/webrtc/rtc_rtp_sender.h
@@ -14,6 +14,7 @@
 #include "content/renderer/media/webrtc/webrtc_media_stream_track_adapter_map.h"
 #include "third_party/WebKit/public/platform/WebMediaStreamTrack.h"
 #include "third_party/WebKit/public/platform/WebRTCRtpSender.h"
+#include "third_party/WebKit/public/platform/WebRTCStats.h"
 #include "third_party/webrtc/api/peerconnectioninterface.h"
 #include "third_party/webrtc/api/rtpsenderinterface.h"
 #include "third_party/webrtc/rtc_base/scoped_ref_ptr.h"
@@ -27,13 +28,16 @@
  public:
   static uintptr_t getId(const webrtc::RtpSenderInterface* webrtc_sender);
 
-  RTCRtpSender(scoped_refptr<base::SingleThreadTaskRunner> main_thread,
-               scoped_refptr<base::SingleThreadTaskRunner> signaling_thread,
-               scoped_refptr<WebRtcMediaStreamAdapterMap> stream_map,
-               rtc::scoped_refptr<webrtc::RtpSenderInterface> webrtc_sender,
-               blink::WebMediaStreamTrack web_track,
-               std::vector<blink::WebMediaStream> web_streams);
   RTCRtpSender(
+      scoped_refptr<webrtc::PeerConnectionInterface> native_peer_connection,
+      scoped_refptr<base::SingleThreadTaskRunner> main_thread,
+      scoped_refptr<base::SingleThreadTaskRunner> signaling_thread,
+      scoped_refptr<WebRtcMediaStreamAdapterMap> stream_map,
+      rtc::scoped_refptr<webrtc::RtpSenderInterface> webrtc_sender,
+      blink::WebMediaStreamTrack web_track,
+      std::vector<blink::WebMediaStream> web_streams);
+  RTCRtpSender(
+      scoped_refptr<webrtc::PeerConnectionInterface> native_peer_connection,
       scoped_refptr<base::SingleThreadTaskRunner> main_thread,
       scoped_refptr<base::SingleThreadTaskRunner> signaling_thread,
       scoped_refptr<WebRtcMediaStreamAdapterMap> stream_map,
@@ -59,6 +63,7 @@
   std::unique_ptr<blink::WebRTCDTMFSenderHandler> GetDtmfSender()
       const override;
   std::unique_ptr<blink::WebRTCRtpParameters> GetParameters() const override;
+  void GetStats(std::unique_ptr<blink::WebRTCStatsReportCallback>) override;
 
   webrtc::RtpSenderInterface* webrtc_sender() const;
   const webrtc::MediaStreamTrackInterface* webrtc_track() const;
diff --git a/content/renderer/media/webrtc/rtc_rtp_sender_unittest.cc b/content/renderer/media/webrtc/rtc_rtp_sender_unittest.cc
index c67040fe..97ca52ec 100644
--- a/content/renderer/media/webrtc/rtc_rtp_sender_unittest.cc
+++ b/content/renderer/media/webrtc/rtc_rtp_sender_unittest.cc
@@ -14,15 +14,20 @@
 #include "content/child/child_process.h"
 #include "content/renderer/media/stream/media_stream_audio_source.h"
 #include "content/renderer/media/webrtc/mock_peer_connection_dependency_factory.h"
+#include "content/renderer/media/webrtc/mock_peer_connection_impl.h"
+#include "content/renderer/media/webrtc/test/webrtc_stats_report_obtainer.h"
 #include "content/renderer/media/webrtc/webrtc_media_stream_adapter_map.h"
 #include "content/renderer/media/webrtc/webrtc_media_stream_track_adapter_map.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/WebKit/public/platform/WebMediaStreamSource.h"
 #include "third_party/WebKit/public/platform/WebMediaStreamTrack.h"
+#include "third_party/WebKit/public/platform/WebRTCStats.h"
 #include "third_party/WebKit/public/platform/WebRTCVoidRequest.h"
 #include "third_party/WebKit/public/platform/WebString.h"
 #include "third_party/WebKit/public/platform/scheduler/test/renderer_scheduler_test_support.h"
 #include "third_party/WebKit/public/web/WebHeap.h"
+#include "third_party/webrtc/api/stats/rtcstats_objects.h"
+#include "third_party/webrtc/api/stats/rtcstatsreport.h"
 #include "third_party/webrtc/api/test/mock_rtpsender.h"
 
 using ::testing::_;
@@ -39,6 +44,8 @@
         dependency_factory_.get(), main_thread_,
         new WebRtcMediaStreamTrackAdapterMap(dependency_factory_.get(),
                                              main_thread_));
+    peer_connection_ = new rtc::RefCountedObject<MockPeerConnectionImpl>(
+        dependency_factory_.get(), nullptr);
     mock_webrtc_sender_ = new rtc::RefCountedObject<webrtc::MockRtpSender>();
   }
 
@@ -61,8 +68,9 @@
   std::unique_ptr<RTCRtpSender> CreateSender(
       blink::WebMediaStreamTrack web_track) {
     return std::make_unique<RTCRtpSender>(
-        main_thread_, dependency_factory_->GetWebRtcSignalingThread(),
-        stream_map_, mock_webrtc_sender_.get(), std::move(web_track),
+        peer_connection_.get(), main_thread_,
+        dependency_factory_->GetWebRtcSignalingThread(), stream_map_,
+        mock_webrtc_sender_.get(), std::move(web_track),
         std::vector<blink::WebMediaStream>());
   }
 
@@ -86,6 +94,13 @@
                           std::move(run_loop));
   }
 
+  scoped_refptr<WebRTCStatsReportObtainer> CallGetStats() {
+    scoped_refptr<WebRTCStatsReportObtainer> obtainer =
+        new WebRTCStatsReportObtainer();
+    sender_->GetStats(obtainer->GetStatsCallbackWrapper());
+    return obtainer;
+  }
+
  protected:
   void CallbackOnComplete(bool* result_out,
                           base::RunLoop* run_loop,
@@ -108,6 +123,7 @@
   std::unique_ptr<MockPeerConnectionDependencyFactory> dependency_factory_;
   scoped_refptr<base::SingleThreadTaskRunner> main_thread_;
   scoped_refptr<WebRtcMediaStreamAdapterMap> stream_map_;
+  rtc::scoped_refptr<MockPeerConnectionImpl> peer_connection_;
   rtc::scoped_refptr<webrtc::MockRtpSender> mock_webrtc_sender_;
   std::unique_ptr<RTCRtpSender> sender_;
 };
@@ -207,6 +223,32 @@
   std::move(replaceTrackRunLoopAndGetResult).Run();
 }
 
+TEST_F(RTCRtpSenderTest, GetStats) {
+  auto web_track = CreateWebTrack("track_id");
+  sender_ = CreateSender(web_track);
+
+  // Make the mock return a blink version of the |webtc_report|. The mock does
+  // not perform any stats filtering, we just set it to a dummy value.
+  rtc::scoped_refptr<webrtc::RTCStatsReport> webrtc_report =
+      webrtc::RTCStatsReport::Create(0u);
+  webrtc_report->AddStats(
+      std::make_unique<webrtc::RTCOutboundRTPStreamStats>("stats-id", 1234u));
+  peer_connection_->SetGetStatsReport(webrtc_report);
+
+  auto obtainer = CallGetStats();
+  // Make sure the operation is async.
+  EXPECT_FALSE(obtainer->report());
+  // Wait for the report, this performs the necessary run-loop.
+  auto* report = obtainer->WaitForReport();
+  EXPECT_TRUE(report);
+
+  // Verify dummy value.
+  EXPECT_EQ(report->Size(), 1u);
+  auto stats = report->GetStats(blink::WebString::FromUTF8("stats-id"));
+  EXPECT_TRUE(stats);
+  EXPECT_EQ(stats->Timestamp(), 1.234);
+}
+
 // TODO(crbug.com/812296): Disabled since flaky.
 TEST_F(RTCRtpSenderTest, DISABLED_CopiedSenderSharesInternalStates) {
   auto web_track = CreateWebTrack("track_id");
diff --git a/content/renderer/media/webrtc/test/webrtc_stats_report_obtainer.cc b/content/renderer/media/webrtc/test/webrtc_stats_report_obtainer.cc
new file mode 100644
index 0000000..c0c8e15
--- /dev/null
+++ b/content/renderer/media/webrtc/test/webrtc_stats_report_obtainer.cc
@@ -0,0 +1,40 @@
+// Copyright (c) 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 "content/renderer/media/webrtc/test/webrtc_stats_report_obtainer.h"
+
+namespace content {
+
+WebRTCStatsReportObtainer::CallbackWrapper::CallbackWrapper(
+    scoped_refptr<WebRTCStatsReportObtainer> obtainer)
+    : obtainer_(std::move(obtainer)) {}
+
+WebRTCStatsReportObtainer::CallbackWrapper::~CallbackWrapper() {}
+
+void WebRTCStatsReportObtainer::CallbackWrapper::OnStatsDelivered(
+    std::unique_ptr<blink::WebRTCStatsReport> report) {
+  obtainer_->report_ = std::move(report);
+  obtainer_->run_loop_.Quit();
+}
+
+WebRTCStatsReportObtainer::WebRTCStatsReportObtainer() {}
+
+WebRTCStatsReportObtainer::~WebRTCStatsReportObtainer() {}
+
+std::unique_ptr<blink::WebRTCStatsReportCallback>
+WebRTCStatsReportObtainer::GetStatsCallbackWrapper() {
+  return std::unique_ptr<blink::WebRTCStatsReportCallback>(
+      new CallbackWrapper(this));
+}
+
+blink::WebRTCStatsReport* WebRTCStatsReportObtainer::report() const {
+  return report_.get();
+}
+
+blink::WebRTCStatsReport* WebRTCStatsReportObtainer::WaitForReport() {
+  run_loop_.Run();
+  return report_.get();
+}
+
+}  // namespace content
diff --git a/content/renderer/media/webrtc/test/webrtc_stats_report_obtainer.h b/content/renderer/media/webrtc/test/webrtc_stats_report_obtainer.h
new file mode 100644
index 0000000..f1c39801
--- /dev/null
+++ b/content/renderer/media/webrtc/test/webrtc_stats_report_obtainer.h
@@ -0,0 +1,58 @@
+// Copyright (c) 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 CONTENT_RENDERER_MEDIA_WEBRTC_TEST_WEBRTC_STATS_REPORT_OBTAINER_H_
+#define CONTENT_RENDERER_MEDIA_WEBRTC_TEST_WEBRTC_STATS_REPORT_OBTAINER_H_
+
+#include <memory>
+
+#include "base/memory/ref_counted.h"
+#include "base/run_loop.h"
+#include "third_party/WebKit/public/platform/WebRTCStats.h"
+
+namespace content {
+
+// The obtainer is a test-only helper class capable of waiting for a GetStats()
+// callback to be called. It takes ownership of and exposes the resulting
+// blink::WebRTCStatsReport.
+// While WaitForReport() is waiting for the report, tasks posted on the current
+// thread are executed (see base::RunLoop::Run()) making it safe to wait on the
+// same thread that the stats report callback occurs on without blocking the
+// callback.
+class WebRTCStatsReportObtainer
+    : public base::RefCountedThreadSafe<WebRTCStatsReportObtainer> {
+ public:
+  WebRTCStatsReportObtainer();
+
+  std::unique_ptr<blink::WebRTCStatsReportCallback> GetStatsCallbackWrapper();
+
+  blink::WebRTCStatsReport* report() const;
+  blink::WebRTCStatsReport* WaitForReport();
+
+ private:
+  friend class base::RefCountedThreadSafe<WebRTCStatsReportObtainer>;
+  friend class CallbackWrapper;
+  virtual ~WebRTCStatsReportObtainer();
+
+  // A separate class is needed for OnStatsDelivered() because ownership of the
+  // callback has to be passed to GetStats().
+  class CallbackWrapper : public blink::WebRTCStatsReportCallback {
+   public:
+    CallbackWrapper(scoped_refptr<WebRTCStatsReportObtainer> obtainer);
+    ~CallbackWrapper() override;
+
+    void OnStatsDelivered(
+        std::unique_ptr<blink::WebRTCStatsReport> report) override;
+
+   private:
+    scoped_refptr<WebRTCStatsReportObtainer> obtainer_;
+  };
+
+  base::RunLoop run_loop_;
+  std::unique_ptr<blink::WebRTCStatsReport> report_;
+};
+
+}  // namespace content
+
+#endif  // CONTENT_RENDERER_MEDIA_WEBRTC_TEST_WEBRTC_STATS_REPORT_OBTAINER_H_
diff --git a/content/renderer/media/webrtc/webrtc_media_stream_track_adapter_map_unittest.cc b/content/renderer/media/webrtc/webrtc_media_stream_track_adapter_map_unittest.cc
index 68d0689f..3b9bf333 100644
--- a/content/renderer/media/webrtc/webrtc_media_stream_track_adapter_map_unittest.cc
+++ b/content/renderer/media/webrtc/webrtc_media_stream_track_adapter_map_unittest.cc
@@ -7,7 +7,6 @@
 #include <memory>
 
 #include "base/memory/ref_counted.h"
-#include "base/rand_util.h"
 #include "base/run_loop.h"
 #include "base/single_thread_task_runner.h"
 #include "base/test/scoped_task_environment.h"
@@ -216,99 +215,4 @@
   EXPECT_EQ(nullptr, map_->GetRemoteTrackAdapter(webrtc_track.get()));
 }
 
-// Continuously calls GetOrCreateLocalTrackAdapter() on the main thread and
-// GetOrCreateRemoteTrackAdapter() on the signaling thread hoping to hit
-// deadlocks if the operations were to synchronize with the other thread while
-// holding the lock.
-//
-// Note that this deadlock has been notoriously difficult to reproduce. This
-// test is added as an attempt to guard against this type of regression, but do
-// not trust that if this test passes there is no risk of deadlock.
-class WebRtcMediaStreamTrackAdapterMapStressTest
-    : public WebRtcMediaStreamTrackAdapterMapTest {
- public:
-  WebRtcMediaStreamTrackAdapterMapStressTest()
-      : WebRtcMediaStreamTrackAdapterMapTest(), remaining_iterations_(0u) {}
-
-  void RunStressTest(size_t iterations) {
-    base::RunLoop run_loop;
-    remaining_iterations_ = iterations;
-    PostSignalingThreadLoop();
-    MainThreadLoop(&run_loop);
-    run_loop.Run();
-    // The run loop ensures all operations have began executing, but does not
-    // guarantee that all of them are complete, i.e. that track adapters have
-    // been fully initialized and subequently disposed. For that we need to run
-    // until idle or else we may tear down the test prematurely.
-    RunMessageLoopsUntilIdle();
-  }
-
-  void MainThreadLoop(base::RunLoop* run_loop) {
-    for (size_t i = 0u; i < 5u; ++i) {
-      map_->GetOrCreateLocalTrackAdapter(CreateLocalTrack("local_track_id"));
-    }
-    if (--remaining_iterations_ > 0) {
-      PostSignalingThreadLoop();
-      PostMainThreadLoop(run_loop);
-    } else {
-      // We are now done, but there may still be operations pending to execute
-      // on signaling thread so we perform Quit() in a post to the signaling
-      // thread. This ensures that Quit() is called after all operations have
-      // began executing (but does not guarantee that all operations have
-      // completed).
-      signaling_thread()->PostTask(
-          FROM_HERE,
-          base::BindOnce(&WebRtcMediaStreamTrackAdapterMapStressTest::
-                             QuitRunLoopOnSignalingThread,
-                         base::Unretained(this), base::Unretained(run_loop)));
-    }
-  }
-
-  void PostMainThreadLoop(base::RunLoop* run_loop) {
-    main_thread_->PostTask(
-        FROM_HERE,
-        base::BindOnce(
-            &WebRtcMediaStreamTrackAdapterMapStressTest::MainThreadLoop,
-            base::Unretained(this), base::Unretained(run_loop)));
-  }
-
-  void SignalingThreadLoop() {
-    std::vector<std::unique_ptr<WebRtcMediaStreamTrackAdapterMap::AdapterRef>>
-        track_refs;
-    for (size_t i = 0u; i < 5u; ++i) {
-      track_refs.push_back(map_->GetOrCreateRemoteTrackAdapter(
-          MockWebRtcAudioTrack::Create("remote_track_id")));
-    }
-    main_thread_->PostTask(
-        FROM_HERE,
-        base::BindOnce(&WebRtcMediaStreamTrackAdapterMapStressTest::
-                           DestroyAdapterRefsOnMainThread,
-                       base::Unretained(this), std::move(track_refs)));
-  }
-
-  void PostSignalingThreadLoop() {
-    signaling_thread()->PostTask(
-        FROM_HERE,
-        base::BindOnce(
-            &WebRtcMediaStreamTrackAdapterMapStressTest::SignalingThreadLoop,
-            base::Unretained(this)));
-  }
-
-  void DestroyAdapterRefsOnMainThread(
-      std::vector<std::unique_ptr<WebRtcMediaStreamTrackAdapterMap::AdapterRef>>
-          track_refs) {}
-
-  void QuitRunLoopOnSignalingThread(base::RunLoop* run_loop) {
-    run_loop->Quit();
-  }
-
- private:
-  size_t remaining_iterations_;
-};
-
-TEST_F(WebRtcMediaStreamTrackAdapterMapStressTest, StressTest) {
-  const size_t kNumStressTestIterations = 1000u;
-  RunStressTest(kNumStressTestIterations);
-}
-
 }  // namespace content
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 0128034..ffb09b0 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -677,17 +677,6 @@
     return false;
   }
 
-  WebString GetContentID(WebFrame* frame) override {
-    int routing_id = RenderFrame::GetRoutingIdForWebFrame(frame);
-
-    auto it = params_.frame_routing_id_to_content_id.find(routing_id);
-    if (it == params_.frame_routing_id_to_content_id.end())
-      return WebString();
-
-    const std::string& content_id = it->second;
-    return WebString::FromUTF8(content_id);
-  }
-
   blink::WebFrameSerializerCacheControlPolicy CacheControlPolicy() override {
     return params_.mhtml_cache_control_policy;
   }
@@ -1877,7 +1866,9 @@
     const service_manager::BindSourceInfo& browser_info,
     mojom::FrameRequest request) {
   browser_info_ = browser_info;
-  frame_binding_.Bind(std::move(request));
+  frame_binding_.Bind(
+      std::move(request),
+      frame_ ? GetTaskRunner(blink::TaskType::kInternalIPC) : nullptr);
 }
 
 void RenderFrameImpl::BindFrameBindingsControl(
@@ -3743,7 +3734,8 @@
   service_manager::mojom::InterfaceProviderPtr child_interface_provider;
   child_interface_provider.Bind(
       service_manager::mojom::InterfaceProviderPtrInfo(
-          mojo::ScopedMessagePipeHandle(child_interface_provider_handle), 0u));
+          mojo::ScopedMessagePipeHandle(child_interface_provider_handle), 0u),
+      GetTaskRunner(blink::TaskType::kInternalIPC));
 
   // This method is always called by local frames, never remote frames.
 
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 ed9bcd7..f13ff6a 100644
--- a/content/renderer/service_worker/service_worker_fetch_context_impl.cc
+++ b/content/renderer/service_worker/service_worker_fetch_context_impl.cc
@@ -25,22 +25,20 @@
     : worker_script_url_(worker_script_url),
       url_loader_factory_info_(std::move(url_loader_factory_info)),
       service_worker_provider_id_(service_worker_provider_id),
-      throttle_provider_(std::move(throttle_provider)),
-      terminate_sync_load_event_(
-          base::WaitableEvent::ResetPolicy::MANUAL,
-          base::WaitableEvent::InitialState::NOT_SIGNALED) {}
+      throttle_provider_(std::move(throttle_provider)) {}
 
 ServiceWorkerFetchContextImpl::~ServiceWorkerFetchContextImpl() {}
 
-base::WaitableEvent*
-ServiceWorkerFetchContextImpl::GetTerminateSyncLoadEvent() {
-  return &terminate_sync_load_event_;
+void ServiceWorkerFetchContextImpl::SetTerminateSyncLoadEvent(
+    base::WaitableEvent* terminate_sync_load_event) {
+  DCHECK(!terminate_sync_load_event_);
+  terminate_sync_load_event_ = terminate_sync_load_event;
 }
 
 void ServiceWorkerFetchContextImpl::InitializeOnWorkerThread() {
   resource_dispatcher_ = std::make_unique<ResourceDispatcher>();
   resource_dispatcher_->set_terminate_sync_load_event(
-      &terminate_sync_load_event_);
+      terminate_sync_load_event_);
 
   url_loader_factory_ = network::SharedURLLoaderFactory::Create(
       std::move(url_loader_factory_info_));
diff --git a/content/renderer/service_worker/service_worker_fetch_context_impl.h b/content/renderer/service_worker/service_worker_fetch_context_impl.h
index 2bf1830..8dafa9c 100644
--- a/content/renderer/service_worker/service_worker_fetch_context_impl.h
+++ b/content/renderer/service_worker/service_worker_fetch_context_impl.h
@@ -24,7 +24,7 @@
   ~ServiceWorkerFetchContextImpl() override;
 
   // blink::WebWorkerFetchContext implementation:
-  base::WaitableEvent* GetTerminateSyncLoadEvent() override;
+  void SetTerminateSyncLoadEvent(base::WaitableEvent*) override;
   void InitializeOnWorkerThread() override;
   std::unique_ptr<blink::WebURLLoaderFactory> CreateURLLoaderFactory() override;
   std::unique_ptr<blink::WebURLLoaderFactory> WrapURLLoaderFactory(
@@ -46,7 +46,8 @@
 
   std::unique_ptr<URLLoaderThrottleProvider> throttle_provider_;
 
-  base::WaitableEvent terminate_sync_load_event_;
+  // This is owned by ThreadedMessagingProxyBase on the main thread.
+  base::WaitableEvent* terminate_sync_load_event_ = nullptr;
 };
 
 }  // namespace content
diff --git a/content/renderer/service_worker/worker_fetch_context_impl.cc b/content/renderer/service_worker/worker_fetch_context_impl.cc
index 3b3a6e40..87b8e59 100644
--- a/content/renderer/service_worker/worker_fetch_context_impl.cc
+++ b/content/renderer/service_worker/worker_fetch_context_impl.cc
@@ -111,9 +111,6 @@
       direct_network_loader_factory_info_(
           std::move(direct_network_factory_info)),
       thread_safe_sender_(ChildThreadImpl::current()->thread_safe_sender()),
-      terminate_sync_load_event_(
-          base::WaitableEvent::ResetPolicy::MANUAL,
-          base::WaitableEvent::InitialState::NOT_SIGNALED),
       throttle_provider_(std::move(throttle_provider)) {
   if (ServiceWorkerUtils::IsServicificationEnabled()) {
     ChildThreadImpl::current()->GetConnector()->BindInterface(
@@ -124,8 +121,10 @@
 
 WorkerFetchContextImpl::~WorkerFetchContextImpl() {}
 
-base::WaitableEvent* WorkerFetchContextImpl::GetTerminateSyncLoadEvent() {
-  return &terminate_sync_load_event_;
+void WorkerFetchContextImpl::SetTerminateSyncLoadEvent(
+    base::WaitableEvent* terminate_sync_load_event) {
+  DCHECK(!terminate_sync_load_event_);
+  terminate_sync_load_event_ = terminate_sync_load_event;
 }
 
 void WorkerFetchContextImpl::InitializeOnWorkerThread() {
@@ -133,7 +132,7 @@
   DCHECK(!binding_.is_bound());
   resource_dispatcher_ = std::make_unique<ResourceDispatcher>();
   resource_dispatcher_->set_terminate_sync_load_event(
-      &terminate_sync_load_event_);
+      terminate_sync_load_event_);
 
   shared_url_loader_factory_ = network::SharedURLLoaderFactory::Create(
       std::move(url_loader_factory_info_));
diff --git a/content/renderer/service_worker/worker_fetch_context_impl.h b/content/renderer/service_worker/worker_fetch_context_impl.h
index 94bed59..ad734fb3 100644
--- a/content/renderer/service_worker/worker_fetch_context_impl.h
+++ b/content/renderer/service_worker/worker_fetch_context_impl.h
@@ -54,7 +54,7 @@
   ~WorkerFetchContextImpl() override;
 
   // blink::WebWorkerFetchContext implementation:
-  base::WaitableEvent* GetTerminateSyncLoadEvent() override;
+  void SetTerminateSyncLoadEvent(base::WaitableEvent*) override;
   void InitializeOnWorkerThread() override;
   std::unique_ptr<blink::WebURLLoaderFactory> CreateURLLoaderFactory() override;
   std::unique_ptr<blink::WebURLLoaderFactory> WrapURLLoaderFactory(
@@ -153,7 +153,8 @@
   GURL origin_url_;
   int appcache_host_id_ = blink::WebApplicationCacheHost::kAppCacheNoHostId;
 
-  base::WaitableEvent terminate_sync_load_event_;
+  // This is owned by ThreadedMessagingProxyBase on the main thread.
+  base::WaitableEvent* terminate_sync_load_event_ = nullptr;
 
   // A weak ptr to blink::WebURLLoaderFactory which was created and passed to
   // Blink by CreateURLLoaderFactory().
diff --git a/content/shell/renderer/layout_test/layout_test_render_frame_observer.cc b/content/shell/renderer/layout_test/layout_test_render_frame_observer.cc
index ef59351..ac36688 100644
--- a/content/shell/renderer/layout_test/layout_test_render_frame_observer.cc
+++ b/content/shell/renderer/layout_test/layout_test_render_frame_observer.cc
@@ -12,6 +12,7 @@
 #include "content/shell/test_runner/web_test_interfaces.h"
 #include "content/shell/test_runner/web_test_runner.h"
 #include "third_party/WebKit/public/common/associated_interfaces/associated_interface_registry.h"
+#include "third_party/WebKit/public/platform/scheduler/test/renderer_scheduler_test_support.h"
 #include "third_party/WebKit/public/web/WebLocalFrame.h"
 
 namespace content {
@@ -35,7 +36,8 @@
 
 void LayoutTestRenderFrameObserver::BindRequest(
     mojom::LayoutTestControlAssociatedRequest request) {
-  binding_.Bind(std::move(request));
+  binding_.Bind(std::move(request),
+                blink::scheduler::GetSingleThreadTaskRunnerForTesting());
 }
 
 void LayoutTestRenderFrameObserver::OnDestruct() {
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn
index 1668b65..e5957cf 100644
--- a/content/test/BUILD.gn
+++ b/content/test/BUILD.gn
@@ -409,6 +409,8 @@
       "../renderer/media/webrtc/mock_peer_connection_impl.h",
       "../renderer/media/webrtc/mock_web_rtc_peer_connection_handler_client.cc",
       "../renderer/media/webrtc/mock_web_rtc_peer_connection_handler_client.h",
+      "../renderer/media/webrtc/test/webrtc_stats_report_obtainer.cc",
+      "../renderer/media/webrtc/test/webrtc_stats_report_obtainer.h",
     ]
 
     deps += [
@@ -544,6 +546,10 @@
     deps += [ "//content/public/browser" ]
   }
 
+  if (use_aura && toolkit_views) {
+    deps += [ "//ui/views" ]
+  }
+
   configs += [ "//v8:external_startup_data" ]
 }
 
diff --git a/content/test/data/fuzzer_dictionaries/appcache_manifest_parser_fuzzer.dict b/content/test/data/fuzzer_dictionaries/appcache_manifest_parser_fuzzer.dict
new file mode 100644
index 0000000..1f8e06c
--- /dev/null
+++ b/content/test/data/fuzzer_dictionaries/appcache_manifest_parser_fuzzer.dict
@@ -0,0 +1,30 @@
+# 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.
+
+"#comment"
+"CACHE MANIFEST"
+"CHROMIUM CACHE MANIFEST"
+"CACHE:"
+"CHROMIUM-INTERCEPT:"
+"FALLBACK:"
+"NETWORK:"
+"return"
+"data"
+"file"
+"ftp"
+"http"
+"https"
+"example.com"
+"http://www.example.com"
+"127.0.0.1"
+"about:blank"
+"does-not-exist.txt"
+"*"
+"/"
+"//"
+":"
+":443"
+":80"
+"="
+"?"
diff --git a/content/test/fuzzer/BUILD.gn b/content/test/fuzzer/BUILD.gn
index 98ddcb9..1a2d2054 100644
--- a/content/test/fuzzer/BUILD.gn
+++ b/content/test/fuzzer/BUILD.gn
@@ -137,3 +137,16 @@
   ]
   seed_corpus = "//content/test/data/fuzzer_corpus/signed_exchange_cert_fetcher_parser_data/"
 }
+
+fuzzer_test("appcache_manifest_parser_fuzzer") {
+  sources = [
+    "appcache_manifest_parser_fuzzer.cc",
+  ]
+  deps = [
+    "//base:i18n",
+    "//content/test:test_support",
+  ]
+  dict = "//content/test/data/fuzzer_dictionaries/appcache_manifest_parser_fuzzer.dict"
+  seed_corpus =
+      "//third_party/WebKit/LayoutTests/http/tests/appcache/resources/"
+}
diff --git a/content/test/fuzzer/appcache_manifest_parser_fuzzer.cc b/content/test/fuzzer/appcache_manifest_parser_fuzzer.cc
new file mode 100644
index 0000000..a41962f
--- /dev/null
+++ b/content/test/fuzzer/appcache_manifest_parser_fuzzer.cc
@@ -0,0 +1,29 @@
+// 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 "base/at_exit.h"
+#include "base/i18n/icu_util.h"
+#include "content/browser/appcache/appcache_manifest_parser.h"  // nogncheck
+#include "url/gurl.h"
+
+namespace content {
+
+struct IcuEnvironment {
+  IcuEnvironment() { CHECK(base::i18n::InitializeICU()); }
+  // used by ICU integration.
+  base::AtExitManager at_exit_manager;
+};
+
+IcuEnvironment* env = new IcuEnvironment();
+
+// Entry point for LibFuzzer.
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
+  AppCacheManifest manifest;
+  const GURL kUrl("http://www.example.com");
+  ParseManifest(kUrl, reinterpret_cast<const char*>(data), size,
+                PARSE_MANIFEST_ALLOWING_DANGEROUS_FEATURES, manifest);
+  return 0;
+}
+
+}  // namespace content
diff --git a/device/BUILD.gn b/device/BUILD.gn
index 954d4dc..614cdf2 100644
--- a/device/BUILD.gn
+++ b/device/BUILD.gn
@@ -73,6 +73,7 @@
     "fido/fido_discovery_unittest.cc",
     "fido/fido_hid_message_unittest.cc",
     "fido/fido_request_handler_unittest.cc",
+    "fido/get_assertion_task_unittest.cc",
     "fido/make_credential_task_unittest.cc",
     "fido/test_callback_receiver_unittest.cc",
     "fido/u2f_parsing_utils_unittest.cc",
diff --git a/device/fido/BUILD.gn b/device/fido/BUILD.gn
index ce4c9c13..a49f894c 100644
--- a/device/fido/BUILD.gn
+++ b/device/fido/BUILD.gn
@@ -63,6 +63,8 @@
     "fido_request_handler.h",
     "fido_task.cc",
     "fido_task.h",
+    "get_assertion_task.cc",
+    "get_assertion_task.h",
     "make_credential_request_handler.cc",
     "make_credential_request_handler.h",
     "make_credential_task.cc",
diff --git a/device/fido/authenticator_data.h b/device/fido/authenticator_data.h
index 5f123cf6..ef7188d 100644
--- a/device/fido/authenticator_data.h
+++ b/device/fido/authenticator_data.h
@@ -11,6 +11,7 @@
 
 #include "base/component_export.h"
 #include "base/macros.h"
+#include "base/numerics/safe_conversions.h"
 #include "base/optional.h"
 #include "device/fido/attested_credential_data.h"
 
@@ -59,6 +60,22 @@
     return attested_data_;
   }
 
+  bool obtained_user_presence() const {
+    return flags_ & base::strict_cast<uint8_t>(Flag::kTestOfUserPresence);
+  }
+
+  bool obtained_user_verification() const {
+    return flags_ & base::strict_cast<uint8_t>(Flag::kTestOfUserVerification);
+  }
+
+  bool attestation_credential_included() const {
+    return flags_ & base::strict_cast<uint8_t>(Flag::kAttestation);
+  }
+
+  bool extension_data_included() const {
+    return flags_ & base::strict_cast<uint8_t>(Flag::kExtensionDataIncluded);
+  }
+
  private:
   // The application parameter: a SHA-256 hash of either the RP ID or the AppID
   // associated with the credential.
diff --git a/device/fido/ctap_get_assertion_request.h b/device/fido/ctap_get_assertion_request.h
index 382b364..ca2a85522 100644
--- a/device/fido/ctap_get_assertion_request.h
+++ b/device/fido/ctap_get_assertion_request.h
@@ -28,6 +28,9 @@
   CtapGetAssertionRequest& operator=(CtapGetAssertionRequest&& other);
   ~CtapGetAssertionRequest();
 
+  // Serializes GetAssertion request parameter into CBOR encoded map with
+  // integer keys and CBOR encoded values as defined by the CTAP spec.
+  // https://drafts.fidoalliance.org/fido-2/latest/fido-client-to-authenticator-protocol-v2.0-wd-20180305.html#authenticatorGetAssertion
   std::vector<uint8_t> EncodeAsCBOR() const;
 
   CtapGetAssertionRequest& SetUserVerificationRequired(
diff --git a/device/fido/ctap_make_credential_request.h b/device/fido/ctap_make_credential_request.h
index 25afa5d..574bd48a 100644
--- a/device/fido/ctap_make_credential_request.h
+++ b/device/fido/ctap_make_credential_request.h
@@ -36,6 +36,9 @@
   CtapMakeCredentialRequest& operator=(CtapMakeCredentialRequest&& that);
   ~CtapMakeCredentialRequest();
 
+  // Serializes MakeCredential request parameter into CBOR encoded map with
+  // integer keys and CBOR encoded values as defined by the CTAP spec.
+  // https://drafts.fidoalliance.org/fido-2/latest/fido-client-to-authenticator-protocol-v2.0-wd-20180305.html#authenticatorMakeCredential
   std::vector<uint8_t> EncodeAsCBOR() const;
 
   CtapMakeCredentialRequest& SetUserVerificationRequired(
diff --git a/device/fido/fido_response_test_data.h b/device/fido/fido_response_test_data.h
index 60db576..ed581bb43 100644
--- a/device/fido/fido_response_test_data.h
+++ b/device/fido/fido_response_test_data.h
@@ -229,6 +229,36 @@
     0xF9, 0xC5, 0xD3, 0x43, 0xCB, 0x2F, 0x11, 0x3D, 0xA2, 0x37, 0x23, 0xF3,
 };
 
+// Credential ID to be used in a request to yield the below
+// kTestGetAssertionResponse.
+constexpr uint8_t kTestGetAssertionCredentialId[] = {
+    0x9C, 0x06, 0x98, 0x05, 0xA7, 0xE9, 0x0C, 0xED, 0xF9, 0x24, 0xAC,
+    0x5A, 0x29, 0x36, 0x95, 0xE0, 0x15, 0x46, 0x95, 0xBF, 0xFF, 0x99,
+    0x1A, 0xA5, 0x40, 0xA8, 0x84, 0xAE, 0xF5, 0x42, 0xF3, 0x17, 0x78,
+    0x51, 0xBE, 0x8A, 0x15, 0x2D, 0x48, 0x45, 0x2C, 0x0F, 0xE4, 0x67,
+    0x29, 0x0C, 0x1B, 0xDA, 0xBE, 0x7C, 0xEB, 0xE5, 0xAD, 0x7A, 0xCA,
+    0x6F, 0x76, 0x89, 0x38, 0x83, 0x2E, 0x65, 0x85, 0x1E};
+
+constexpr uint8_t kTestGetAssertionResponse[] = {
+    0x00, 0xA3, 0x01, 0xA2, 0x62, 0x69, 0x64, 0x58, 0x40, 0x9C, 0x06, 0x98,
+    0x05, 0xA7, 0xE9, 0x0C, 0xED, 0xF9, 0x24, 0xAC, 0x5A, 0x29, 0x36, 0x95,
+    0xE0, 0x15, 0x46, 0x95, 0xBF, 0xFF, 0x99, 0x1A, 0xA5, 0x40, 0xA8, 0x84,
+    0xAE, 0xF5, 0x42, 0xF3, 0x17, 0x78, 0x51, 0xBE, 0x8A, 0x15, 0x2D, 0x48,
+    0x45, 0x2C, 0x0F, 0xE4, 0x67, 0x29, 0x0C, 0x1B, 0xDA, 0xBE, 0x7C, 0xEB,
+    0xE5, 0xAD, 0x7A, 0xCA, 0x6F, 0x76, 0x89, 0x38, 0x83, 0x2E, 0x65, 0x85,
+    0x1E, 0x64, 0x74, 0x79, 0x70, 0x65, 0x6A, 0x70, 0x75, 0x62, 0x6C, 0x69,
+    0x63, 0x2D, 0x6B, 0x65, 0x79, 0x02, 0x58, 0x25, 0x46, 0xCC, 0x7F, 0xB9,
+    0x67, 0x9D, 0x55, 0xB2, 0xDB, 0x90, 0x92, 0xE1, 0xC8, 0xD9, 0xE5, 0xE1,
+    0xD0, 0x2B, 0x75, 0x80, 0xF0, 0xB4, 0x81, 0x2C, 0x77, 0x09, 0x62, 0xE1,
+    0xE4, 0x8F, 0x5A, 0xD8, 0x01, 0x00, 0x00, 0x00, 0x5F, 0x03, 0x58, 0x46,
+    0x30, 0x44, 0x02, 0x20, 0x62, 0xB8, 0xC4, 0x37, 0xB0, 0xB6, 0xFC, 0x89,
+    0x37, 0xF6, 0x45, 0xC0, 0x1E, 0x26, 0xCE, 0x0E, 0x26, 0x58, 0x38, 0xFE,
+    0xC4, 0xA8, 0x74, 0xC5, 0x5D, 0xDD, 0x6D, 0xEC, 0xF0, 0xA0, 0x83, 0xD3,
+    0x02, 0x20, 0x7C, 0xD4, 0x1C, 0xAF, 0x4F, 0xD8, 0x7F, 0x73, 0xBF, 0x01,
+    0x25, 0x06, 0x78, 0x11, 0x45, 0x2B, 0x5F, 0xB8, 0x17, 0xA3, 0xFA, 0x73,
+    0xB2, 0x17, 0x6B, 0xBD, 0x30, 0x36, 0x59, 0xC9, 0xCD, 0x92,
+};
+
 }  // namespace test_data
 
 }  // namespace device
diff --git a/device/fido/get_assertion_task.cc b/device/fido/get_assertion_task.cc
new file mode 100644
index 0000000..bdecd77
--- /dev/null
+++ b/device/fido/get_assertion_task.cc
@@ -0,0 +1,115 @@
+// 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 "device/fido/get_assertion_task.h"
+
+#include <algorithm>
+#include <utility>
+
+#include "base/bind.h"
+#include "device/fido/authenticator_get_assertion_response.h"
+#include "device/fido/ctap_empty_authenticator_request.h"
+#include "device/fido/device_response_converter.h"
+
+namespace device {
+
+GetAssertionTask::GetAssertionTask(FidoDevice* device,
+                                   CtapGetAssertionRequest request,
+                                   GetAssertionTaskCallback callback)
+    : FidoTask(device),
+      request_(std::move(request)),
+      callback_(std::move(callback)),
+      weak_factory_(this) {}
+
+GetAssertionTask::~GetAssertionTask() = default;
+
+void GetAssertionTask::StartTask() {
+  GetAuthenticatorInfo(
+      base::BindOnce(&GetAssertionTask::GetAssertion,
+                     weak_factory_.GetWeakPtr()),
+      base::BindOnce(&GetAssertionTask::U2fSign, weak_factory_.GetWeakPtr()));
+}
+
+void GetAssertionTask::GetAssertion() {
+  device()->DeviceTransact(
+      request_.EncodeAsCBOR(),
+      base::BindOnce(&GetAssertionTask::OnCtapGetAssertionResponseReceived,
+                     weak_factory_.GetWeakPtr()));
+}
+
+void GetAssertionTask::U2fSign() {
+  // TODO(hongjunchoi): Implement U2F sign request logic to support
+  // interoperability with U2F protocol. Currently all requests for U2F devices
+  // are silently dropped.
+  // See: https://www.crbug.com/798573
+  std::move(callback_).Run(CtapDeviceResponseCode::kCtap2ErrOther,
+                           base::nullopt);
+}
+
+bool GetAssertionTask::CheckRequirementsOnReturnedUserEntities(
+    const AuthenticatorGetAssertionResponse& response) {
+  // If assertion has been made without user verification, user entity must not
+  // be included.
+  if (!response.auth_data().obtained_user_verification() &&
+      response.user_entity()) {
+    return false;
+  }
+
+  // For resident key credentials, user id of the user entity is mandatory.
+  if ((!request_.allow_list() || request_.allow_list()->empty()) &&
+      !response.user_entity()) {
+    return false;
+  }
+
+  // When multiple accounts exist for specified RP ID, user entity is mandatory.
+  if (response.num_credentials().value_or(0u) > 1 && !response.user_entity()) {
+    return false;
+  }
+
+  return true;
+}
+
+bool GetAssertionTask::CheckRequirementsOnReturnedCredentialId(
+    const AuthenticatorGetAssertionResponse& response) {
+  if (device()->device_info() &&
+      device()->device_info()->options().supports_resident_key()) {
+    return true;
+  }
+
+  const auto& allow_list = request_.allow_list();
+  return allow_list &&
+         (allow_list->size() == 1 ||
+          std::any_of(allow_list->cbegin(), allow_list->cend(),
+                      [&response](const auto& credential) {
+                        return credential.id() == response.raw_credential_id();
+                      }));
+}
+
+void GetAssertionTask::OnCtapGetAssertionResponseReceived(
+    base::Optional<std::vector<uint8_t>> device_response) {
+  if (!device_response) {
+    std::move(callback_).Run(CtapDeviceResponseCode::kCtap2ErrOther,
+                             base::nullopt);
+    return;
+  }
+
+  auto response_code = GetResponseCode(*device_response);
+  if (response_code != CtapDeviceResponseCode::kSuccess) {
+    std::move(callback_).Run(response_code, base::nullopt);
+    return;
+  }
+
+  auto parsed_response = ReadCTAPGetAssertionResponse(*device_response);
+  if (!parsed_response ||
+      !CheckRequirementsOnReturnedCredentialId(*parsed_response) ||
+      !CheckRequirementsOnReturnedUserEntities(*parsed_response)) {
+    std::move(callback_).Run(CtapDeviceResponseCode::kCtap2ErrInvalidCredential,
+                             base::nullopt);
+    return;
+  }
+
+  std::move(callback_).Run(response_code, std::move(parsed_response));
+}
+
+}  // namespace device
diff --git a/device/fido/get_assertion_task.h b/device/fido/get_assertion_task.h
new file mode 100644
index 0000000..c75578f
--- /dev/null
+++ b/device/fido/get_assertion_task.h
@@ -0,0 +1,78 @@
+// 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 DEVICE_FIDO_GET_ASSERTION_TASK_H_
+#define DEVICE_FIDO_GET_ASSERTION_TASK_H_
+
+#include <stdint.h>
+
+#include <vector>
+
+#include "base/callback.h"
+#include "base/component_export.h"
+#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
+#include "base/optional.h"
+#include "device/fido/ctap_get_assertion_request.h"
+#include "device/fido/fido_constants.h"
+#include "device/fido/fido_task.h"
+
+namespace device {
+
+class AuthenticatorGetAssertionResponse;
+
+// Represents per device sign operation on CTAP1/CTAP2 devices.
+// https://fidoalliance.org/specs/fido-v2.0-rd-20161004/fido-client-to-authenticator-protocol-v2.0-rd-20161004.html#authenticatorgetassertion
+class COMPONENT_EXPORT(DEVICE_FIDO) GetAssertionTask : public FidoTask {
+ public:
+  using GetAssertionTaskCallback = base::OnceCallback<void(
+      CtapDeviceResponseCode return_code,
+      base::Optional<AuthenticatorGetAssertionResponse> response_data)>;
+
+  GetAssertionTask(FidoDevice* device,
+                   CtapGetAssertionRequest request,
+                   GetAssertionTaskCallback callback);
+  ~GetAssertionTask() override;
+
+ private:
+  // FidoTask:
+  void StartTask() override;
+
+  void GetAssertion();
+  void U2fSign();
+
+  // PublicKeyUserEntity field in GetAssertion response is optional with the
+  // following constraints:
+  // - If assertion has been made without user verification, user entity must
+  //   not be included.
+  // - For resident key credentials, user id of the user entity is mandatory.
+  // - When multiple accounts exist for specified RP ID, user entity is
+  //   mandatory.
+  // TODO(hongjunchoi) : Add link to section of the CTAP spec once it is
+  // published.
+  bool CheckRequirementsOnReturnedUserEntities(
+      const AuthenticatorGetAssertionResponse& response);
+
+  // Checks whether credential ID returned from the authenticator was included
+  // in the allowed list for authenticators. If the device has resident key
+  // support, returned credential ID may be resident credential. Thus, returned
+  // credential ID need not be in allowed list.
+  // TODO(hongjunchoi) : Add link to section of the CTAP spec once it is
+  // published.
+  bool CheckRequirementsOnReturnedCredentialId(
+      const AuthenticatorGetAssertionResponse& response);
+
+  void OnCtapGetAssertionResponseReceived(
+      base::Optional<std::vector<uint8_t>> device_response);
+
+  CtapGetAssertionRequest request_;
+  GetAssertionTaskCallback callback_;
+  base::WeakPtrFactory<GetAssertionTask> weak_factory_;
+
+  DISALLOW_COPY_AND_ASSIGN(GetAssertionTask);
+};
+
+}  // namespace device
+
+#endif  // DEVICE_FIDO_GET_ASSERTION_TASK_H_
diff --git a/device/fido/get_assertion_task_unittest.cc b/device/fido/get_assertion_task_unittest.cc
new file mode 100644
index 0000000..65a0472d
--- /dev/null
+++ b/device/fido/get_assertion_task_unittest.cc
@@ -0,0 +1,153 @@
+// 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 "device/fido/get_assertion_task.h"
+
+#include <iterator>
+#include <memory>
+#include <utility>
+#include <vector>
+
+#include "base/bind.h"
+#include "base/test/scoped_task_environment.h"
+#include "device/fido/authenticator_get_assertion_response.h"
+#include "device/fido/ctap_get_assertion_request.h"
+#include "device/fido/fido_constants.h"
+#include "device/fido/fido_response_test_data.h"
+#include "device/fido/mock_fido_device.h"
+#include "device/fido/test_callback_receiver.h"
+#include "device/fido/u2f_parsing_utils.h"
+#include "testing/gmock/include/gmock/gmock.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+using ::testing::_;
+
+namespace device {
+
+namespace {
+
+constexpr uint8_t kClientDataHash[] = {0x01, 0x02, 0x03};
+constexpr char kRpId[] = "google.com";
+
+using TestGetAssertionTaskCallbackReceiver =
+    ::device::test::StatusAndValueCallbackReceiver<
+        CtapDeviceResponseCode,
+        base::Optional<AuthenticatorGetAssertionResponse>>;
+
+}  // namespace
+
+class FidoGetAssertionTaskTest : public testing::Test {
+ public:
+  TestGetAssertionTaskCallbackReceiver& get_assertion_callback_receiver() {
+    return cb_;
+  }
+
+ private:
+  base::test::ScopedTaskEnvironment scoped_task_environment_;
+  TestGetAssertionTaskCallbackReceiver cb_;
+};
+
+TEST_F(FidoGetAssertionTaskTest, TestGetAssertionSuccess) {
+  auto device = std::make_unique<MockFidoDevice>();
+  device->ExpectCtap2CommandAndRespondWith(
+      CtapRequestCommand::kAuthenticatorGetInfo,
+      test_data::kTestAuthenticatorGetInfoResponse);
+  device->ExpectCtap2CommandAndRespondWith(
+      CtapRequestCommand::kAuthenticatorGetAssertion,
+      test_data::kTestGetAssertionResponse);
+
+  CtapGetAssertionRequest request_param(
+      kRpId, u2f_parsing_utils::Materialize(kClientDataHash));
+  request_param.SetAllowList(
+      {{kU2fCredentialType, u2f_parsing_utils::Materialize(
+                                test_data::kTestGetAssertionCredentialId)}});
+
+  auto task = std::make_unique<GetAssertionTask>(
+      device.get(), std::move(request_param),
+      get_assertion_callback_receiver().callback());
+
+  get_assertion_callback_receiver().WaitForCallback();
+  EXPECT_EQ(CtapDeviceResponseCode::kSuccess,
+            get_assertion_callback_receiver().status());
+  EXPECT_TRUE(get_assertion_callback_receiver().value());
+  EXPECT_EQ(device->supported_protocol(), ProtocolVersion::kCtap);
+  EXPECT_TRUE(device->device_info());
+}
+
+// Tests a scenario where the authenticator responds with credential ID that
+// is not included in the allowed list.
+TEST_F(FidoGetAssertionTaskTest, TestGetAssertionInvalidCredential) {
+  auto device = std::make_unique<MockFidoDevice>();
+
+  device->ExpectCtap2CommandAndRespondWith(
+      CtapRequestCommand::kAuthenticatorGetInfo,
+      test_data::kTestAuthenticatorGetInfoResponse);
+  device->ExpectCtap2CommandAndRespondWith(
+      CtapRequestCommand::kAuthenticatorGetAssertion,
+      test_data::kTestGetAssertionResponse);
+
+  auto task = std::make_unique<GetAssertionTask>(
+      device.get(),
+      CtapGetAssertionRequest(kRpId,
+                              u2f_parsing_utils::Materialize(kClientDataHash)),
+      get_assertion_callback_receiver().callback());
+
+  get_assertion_callback_receiver().WaitForCallback();
+  EXPECT_EQ(CtapDeviceResponseCode::kCtap2ErrInvalidCredential,
+            get_assertion_callback_receiver().status());
+  EXPECT_FALSE(get_assertion_callback_receiver().value());
+  EXPECT_EQ(device->supported_protocol(), ProtocolVersion::kCtap);
+  EXPECT_TRUE(device->device_info());
+}
+
+// Tests a scenario where authenticator responds without user entity in its
+// response but client is expecting a resident key credential.
+TEST_F(FidoGetAssertionTaskTest, TestGetAsserionIncorrectUserEntity) {
+  auto device = std::make_unique<MockFidoDevice>();
+
+  device->ExpectCtap2CommandAndRespondWith(
+      CtapRequestCommand::kAuthenticatorGetInfo,
+      test_data::kTestAuthenticatorGetInfoResponse);
+  device->ExpectCtap2CommandAndRespondWith(
+      CtapRequestCommand::kAuthenticatorGetAssertion,
+      test_data::kTestGetAssertionResponse);
+
+  auto task = std::make_unique<GetAssertionTask>(
+      device.get(),
+      CtapGetAssertionRequest(kRpId,
+                              u2f_parsing_utils::Materialize(kClientDataHash)),
+      get_assertion_callback_receiver().callback());
+
+  get_assertion_callback_receiver().WaitForCallback();
+  EXPECT_EQ(device->supported_protocol(), ProtocolVersion::kCtap);
+  EXPECT_TRUE(device->device_info());
+  EXPECT_EQ(CtapDeviceResponseCode::kCtap2ErrInvalidCredential,
+            get_assertion_callback_receiver().status());
+  EXPECT_FALSE(get_assertion_callback_receiver().value());
+}
+
+TEST_F(FidoGetAssertionTaskTest, TestIncorrectGetAssertionResponse) {
+  auto device = std::make_unique<MockFidoDevice>();
+
+  device->ExpectCtap2CommandAndRespondWith(
+      CtapRequestCommand::kAuthenticatorGetInfo,
+      test_data::kTestAuthenticatorGetInfoResponse);
+  device->ExpectCtap2CommandAndRespondWith(
+      CtapRequestCommand::kAuthenticatorGetAssertion, base::nullopt);
+
+  auto task = std::make_unique<GetAssertionTask>(
+      device.get(),
+      CtapGetAssertionRequest(kRpId,
+                              u2f_parsing_utils::Materialize(kClientDataHash)),
+      get_assertion_callback_receiver().callback());
+
+  get_assertion_callback_receiver().WaitForCallback();
+  EXPECT_EQ(device->supported_protocol(), ProtocolVersion::kCtap);
+  EXPECT_TRUE(device->device_info());
+  EXPECT_EQ(CtapDeviceResponseCode::kCtap2ErrOther,
+            get_assertion_callback_receiver().status());
+  EXPECT_FALSE(get_assertion_callback_receiver().value());
+}
+
+}  // namespace device
diff --git a/extensions/common/permissions/api_permission.h b/extensions/common/permissions/api_permission.h
index 74b4842..6e45505 100644
--- a/extensions/common/permissions/api_permission.h
+++ b/extensions/common/permissions/api_permission.h
@@ -81,7 +81,7 @@
     kCryptotokenPrivate,
     kDataReductionProxy,
     kDiagnostics,
-    kDial,
+    kDeleted_Dial,  // API removed.
     kDebugger,
     kDeclarative,
     kDeclarativeContent,
diff --git a/gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc b/gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc
index 4278ce3..0c635456 100644
--- a/gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc
+++ b/gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc
@@ -21,10 +21,24 @@
 #include "gpu/command_buffer/tests/gl_test_utils.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "ui/gfx/buffer_format_util.h"
 #include "ui/gfx/gpu_memory_buffer.h"
 #include "ui/gfx/half_float.h"
 #include "ui/gl/gl_image.h"
 
+#if defined(OS_LINUX)
+#include "gpu/ipc/common/gpu_memory_buffer_impl_native_pixmap.h"
+#include "ui/gfx/linux/client_native_pixmap_factory_dmabuf.h"
+#endif
+
+#define SKIP_TEST_IF(cmd)                        \
+  do {                                           \
+    if (cmd) {                                   \
+      LOG(INFO) << "Skip test because " << #cmd; \
+      return;                                    \
+    }                                            \
+  } while (false)
+
 using testing::_;
 using testing::IgnoreResult;
 using testing::InvokeWithoutArgs;
@@ -55,6 +69,27 @@
   GLManager gl_;
 };
 
+#if defined(OS_LINUX)
+class GpuMemoryBufferTestEGL : public testing::Test,
+                               public gpu::GpuCommandBufferTestEGL {
+ public:
+  GpuMemoryBufferTestEGL()
+      : egl_gles2_initialized_(false),
+        native_pixmap_factory_(gfx::CreateClientNativePixmapFactoryDmabuf()) {}
+
+ protected:
+  void SetUp() override {
+    egl_gles2_initialized_ = InitializeEGLGLES2(kImageWidth, kImageHeight);
+    gl_.set_use_native_pixmap_memory_buffers(true);
+  }
+
+  void TearDown() override { RestoreGLDefault(); }
+
+  bool egl_gles2_initialized_;
+  std::unique_ptr<gfx::ClientNativePixmapFactory> native_pixmap_factory_;
+};
+#endif  // defined(OS_LINUX)
+
 namespace {
 
 #define SHADER(Src) #Src
@@ -103,6 +138,7 @@
       }
       return;
     case gfx::BufferFormat::RGBA_8888:
+    case gfx::BufferFormat::RGBX_8888:
       for (int i = 0; i < width * 4; i += 4) {
         buffer[i + 0] = pixel[0];
         buffer[i + 1] = pixel[1];
@@ -152,7 +188,6 @@
     case gfx::BufferFormat::ETC1:
     case gfx::BufferFormat::R_16:
     case gfx::BufferFormat::RG_88:
-    case gfx::BufferFormat::RGBX_8888:
     case gfx::BufferFormat::UYVY_422:
     case gfx::BufferFormat::YVU_420:
     case gfx::BufferFormat::YUV_420_BIPLANAR:
@@ -297,6 +332,123 @@
   glDeleteTextures(1, &texture_id);
 }
 
+#if defined(OS_LINUX)
+// Test glCreateImageCHROMIUM with gfx::NATIVE_PIXMAP. Basically the test
+// reproduces the situation where some dmabuf fds are available outside the
+// gpu process and the user wants to import them using glCreateImageCHROMIUM.
+// It can be the case when vaapi is setup in a media service hosted in a
+// dedicated process, i.e. not the gpu process.
+TEST_F(GpuMemoryBufferTestEGL, GLCreateImageCHROMIUMFromNativePixmap) {
+  SKIP_TEST_IF(!egl_gles2_initialized_);
+
+  // This extension is required for glCreateImageCHROMIUM on Linux.
+  SKIP_TEST_IF(!HasEGLExtension("EGL_EXT_image_dma_buf_import"));
+
+  // This extension is required for the test to work but not for the real
+  // world, see CreateNativePixmapHandle.
+  SKIP_TEST_IF(!HasEGLExtension("EGL_MESA_image_dma_buf_export"));
+
+  // This extension is required for glCreateImageCHROMIUM on Linux.
+  SKIP_TEST_IF(!HasGLExtension("GL_OES_EGL_image"));
+
+  gfx::BufferFormat format = gfx::BufferFormat::RGBX_8888;
+  gfx::Size size(kImageWidth, kImageHeight);
+  size_t buffer_size = gfx::BufferSizeForBufferFormat(size, format);
+  uint8_t pixel[] = {255u, 0u, 0u, 255u};
+  size_t plane = 0;
+  uint32_t stride = gfx::RowSizeForBufferFormat(size.width(), format, plane);
+
+  std::unique_ptr<uint8_t[]> pixels(new uint8_t[buffer_size]);
+
+  // Assign a value to each pixel.
+  for (int y = 0; y < size.height(); ++y) {
+    SetRow(format, pixels.get() + y * stride, size.width(), pixel);
+  }
+
+  // A real use case would be to export a VAAPI surface as dmabuf fds. But for
+  // simplicity the test gets them from a GL texture.
+  gfx::NativePixmapHandle native_pixmap_handle =
+      CreateNativePixmapHandle(format, size, pixels.get());
+  EXPECT_EQ(1u, native_pixmap_handle.fds.size());
+
+  // Initialize a GpuMemoryBufferHandle to wrap a native pixmap.
+  gfx::GpuMemoryBufferHandle handle;
+  handle.type = gfx::NATIVE_PIXMAP;
+  handle.native_pixmap_handle = native_pixmap_handle;
+  EXPECT_TRUE(handle.id.is_valid());
+
+  // Create a GMB to pass to glCreateImageCHROMIUM.
+  std::unique_ptr<gfx::GpuMemoryBuffer> buffer =
+      gpu::GpuMemoryBufferImplNativePixmap::CreateFromHandle(
+          native_pixmap_factory_.get(), handle, size, format,
+          gfx::BufferUsage::SCANOUT,
+          base::RepeatingCallback<void(const gpu::SyncToken&)>());
+  EXPECT_NE(nullptr, buffer.get());
+  EXPECT_TRUE(buffer->GetId().is_valid());
+
+  // Create the image. This should add the image ID to the ImageManager.
+  GLuint image_id = glCreateImageCHROMIUM(buffer->AsClientBuffer(),
+                                          size.width(), size.height(), GL_RGB);
+  EXPECT_NE(0u, image_id);
+  // In the tests the gl::GLImage is added into the ImageManager when calling
+  // GLManager::CreateImage. In real cases the GpuControl would not own the
+  // ImageManager. I.e. for the tests the ImageManager lives in the client side
+  // so there is no need to call glShallowFinishCHROMIUM().
+  EXPECT_TRUE(gl_.decoder()->GetImageManagerForTest()->LookupImage(image_id) !=
+              NULL);
+  ASSERT_TRUE(glGetError() == GL_NO_ERROR);
+
+  // Need a texture to bind the image.
+  GLuint texture_id = 0;
+  glGenTextures(1, &texture_id);
+  ASSERT_NE(0u, texture_id);
+  glActiveTexture(GL_TEXTURE0);
+  glBindTexture(GL_TEXTURE_2D, texture_id);
+  glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+  glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+
+  // Bind the image.
+  glBindTexImage2DCHROMIUM(GL_TEXTURE_2D, image_id);
+
+  // Build program, buffers and draw the texture.
+  GLuint vertex_shader =
+      GLTestHelper::LoadShader(GL_VERTEX_SHADER, kVertexShader);
+  GLuint fragment_shader =
+      GLTestHelper::LoadShader(GL_FRAGMENT_SHADER, kFragmentShader);
+  GLuint program = GLTestHelper::SetupProgram(vertex_shader, fragment_shader);
+  ASSERT_NE(0u, program);
+  glUseProgram(program);
+
+  GLint sampler_location = glGetUniformLocation(program, "a_texture");
+  ASSERT_NE(-1, sampler_location);
+  glUniform1i(sampler_location, 0);
+
+  GLuint vbo =
+      GLTestHelper::SetupUnitQuad(glGetAttribLocation(program, "a_position"));
+  ASSERT_NE(0u, vbo);
+  glViewport(0, 0, kImageWidth, kImageHeight);
+  glDrawArrays(GL_TRIANGLES, 0, 6);
+  ASSERT_TRUE(glGetError() == GL_NO_ERROR);
+
+  // Check if pixels match the values that were assigned to the mapped buffer.
+  GLTestHelper::CheckPixels(0, 0, kImageWidth, kImageHeight, 0, pixel, nullptr);
+  EXPECT_TRUE(GL_NO_ERROR == glGetError());
+
+  // Release the image.
+  glReleaseTexImage2DCHROMIUM(GL_TEXTURE_2D, image_id);
+
+  // Clean up.
+  glDeleteProgram(program);
+  glDeleteShader(vertex_shader);
+  glDeleteShader(fragment_shader);
+  glDeleteBuffers(1, &vbo);
+  glDestroyImageCHROMIUM(image_id);
+  glDeleteTextures(1, &texture_id);
+}
+#endif  // defined(OS_LINUX)
+
 INSTANTIATE_TEST_CASE_P(GpuMemoryBufferTests,
                         GpuMemoryBufferTest,
                         ::testing::Values(gfx::BufferFormat::R_8,
diff --git a/gpu/command_buffer/tests/gl_manager.cc b/gpu/command_buffer/tests/gl_manager.cc
index b334859..a0fef937 100644
--- a/gpu/command_buffer/tests/gl_manager.cc
+++ b/gpu/command_buffer/tests/gl_manager.cc
@@ -32,9 +32,12 @@
 #include "gpu/command_buffer/service/gl_context_virtual.h"
 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
 #include "gpu/command_buffer/service/gpu_switches.h"
+#include "gpu/command_buffer/service/image_factory.h"
 #include "gpu/command_buffer/service/memory_tracking.h"
 #include "gpu/command_buffer/service/service_utils.h"
 #include "gpu/command_buffer/service/transfer_buffer_manager.h"
+#include "gpu/ipc/in_process_command_buffer.h"
+#include "gpu/ipc/service/gpu_memory_buffer_factory.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "ui/gfx/buffer_format_util.h"
 #include "ui/gfx/gpu_memory_buffer.h"
@@ -207,7 +210,9 @@
 
 GLManager::Options::Options() = default;
 
-GLManager::GLManager() {
+GLManager::GLManager()
+    : gpu_memory_buffer_factory_(
+          gpu::GpuMemoryBufferFactory::CreateNativeType()) {
   SetupBaseContext();
 }
 
@@ -497,6 +502,25 @@
     gl_image = image;
   }
 #endif  // defined(OS_MACOSX)
+
+  if (use_native_pixmap_memory_buffers_) {
+    gfx::GpuMemoryBuffer* gpu_memory_buffer =
+        reinterpret_cast<gfx::GpuMemoryBuffer*>(buffer);
+    DCHECK(gpu_memory_buffer);
+    if (gpu_memory_buffer->GetHandle().type == gfx::NATIVE_PIXMAP) {
+      gfx::GpuMemoryBufferHandle handle =
+          gfx::CloneHandleForIPC(gpu_memory_buffer->GetHandle());
+      gfx::BufferFormat format = gpu_memory_buffer->GetFormat();
+      gl_image = gpu_memory_buffer_factory_->AsImageFactory()
+                     ->CreateImageForGpuMemoryBuffer(
+                         handle, size, format, internalformat,
+                         gpu::InProcessCommandBuffer::kGpuMemoryBufferClientId,
+                         gpu::kNullSurfaceHandle);
+      if (!gl_image)
+        return -1;
+    }
+  }
+
   if (!gl_image) {
     GpuMemoryBufferImpl* gpu_memory_buffer =
         GpuMemoryBufferImpl::FromClientBuffer(buffer);
diff --git a/gpu/command_buffer/tests/gl_manager.h b/gpu/command_buffer/tests/gl_manager.h
index 56b9bf0..f0e2283 100644
--- a/gpu/command_buffer/tests/gl_manager.h
+++ b/gpu/command_buffer/tests/gl_manager.h
@@ -34,6 +34,7 @@
 namespace gpu {
 
 class CommandBufferDirect;
+class GpuMemoryBufferFactory;
 class ImageFactory;
 class MailboxManager;
 class SyncPointManager;
@@ -107,6 +108,11 @@
     use_iosurface_memory_buffers_ = use_iosurface_memory_buffers;
   }
 
+  void set_use_native_pixmap_memory_buffers(
+      bool use_native_pixmap_memory_buffers) {
+    use_native_pixmap_memory_buffers_ = use_native_pixmap_memory_buffers;
+  }
+
   void SetCommandsPaused(bool paused);
 
   gles2::GLES2Decoder* decoder() const {
@@ -181,10 +187,12 @@
   std::unique_ptr<gles2::GLES2CmdHelper> gles2_helper_;
   std::unique_ptr<TransferBuffer> transfer_buffer_;
   std::unique_ptr<gles2::GLES2Implementation> gles2_implementation_;
+  std::unique_ptr<gpu::GpuMemoryBufferFactory> gpu_memory_buffer_factory_;
 
   uint64_t next_fence_sync_release_ = 1;
 
   bool use_iosurface_memory_buffers_ = false;
+  bool use_native_pixmap_memory_buffers_ = false;
 
   Capabilities capabilities_;
 
diff --git a/gpu/command_buffer/tests/gl_test_utils.cc b/gpu/command_buffer/tests/gl_test_utils.cc
index a377b6f9..d08f645a 100644
--- a/gpu/command_buffer/tests/gl_test_utils.cc
+++ b/gpu/command_buffer/tests/gl_test_utils.cc
@@ -467,6 +467,21 @@
 
   return image;
 }
+
+gfx::NativePixmapHandle GpuCommandBufferTestEGL::CreateNativePixmapHandle(
+    gfx::BufferFormat format,
+    gfx::Size size,
+    uint8_t* pixels) {
+  scoped_refptr<gl::GLImageNativePixmap> image =
+      CreateGLImageNativePixmap(format, size, pixels);
+  EXPECT_TRUE(image);
+  EXPECT_EQ(size, image->GetSize());
+
+  // Export the EGLImage as dmabuf fds
+  // The test will own the dmabuf fds so no need to keep a reference on the
+  // EGLImage after returning from this function.
+  return image->ExportHandle();
+}
 #endif
 
 }  // namespace gpu
diff --git a/gpu/command_buffer/tests/gl_test_utils.h b/gpu/command_buffer/tests/gl_test_utils.h
index 0bd40280..0afb8b8 100644
--- a/gpu/command_buffer/tests/gl_test_utils.h
+++ b/gpu/command_buffer/tests/gl_test_utils.h
@@ -118,6 +118,12 @@
       gfx::BufferFormat format,
       gfx::Size size,
       uint8_t* pixels) const;
+
+  // Get some real dmabuf fds for testing by exporting an EGLImage created from
+  // a GL texture.
+  gfx::NativePixmapHandle CreateNativePixmapHandle(gfx::BufferFormat format,
+                                                   gfx::Size size,
+                                                   uint8_t* pixels);
 #endif
 
  protected:
diff --git a/infra/config/global/cr-buildbucket.cfg b/infra/config/global/cr-buildbucket.cfg
index d3d7d92..f8003d25 100644
--- a/infra/config/global/cr-buildbucket.cfg
+++ b/infra/config/global/cr-buildbucket.cfg
@@ -1022,6 +1022,7 @@
     builders { mixins: "mac-try" name: "mac_chromium_10.10_rel_ng" }
     # TODO(tandrii): change to default (8 cores) per crbug/826308.
     builders { mixins: "mac-try" name: "mac_chromium_10.12_rel_ng" dimensions:"cores:4"}
+    builders { mixins: "mac-try" name: "mac_chromium_10.13_rel_ng"}
     builders { mixins: "mac-try" name: "mac_chromium_archive_rel_ng" }
     builders { mixins: "mac-try" name: "mac_chromium_asan_rel_ng" }
     builders { mixins: "mac-try" name: "mac_chromium_asan_variable" }
diff --git a/ios/chrome/app/main_controller.mm b/ios/chrome/app/main_controller.mm
index 8785a39f..d521a3a3 100644
--- a/ios/chrome/app/main_controller.mm
+++ b/ios/chrome/app/main_controller.mm
@@ -236,10 +236,23 @@
   component_updater::DeleteLegacyCRLSet(path);
 }
 
-// Used to update the current BVC mode if a new tab is added while the stack
-// view is being dimissed.  This is different than ApplicationMode in that it
-// can be set to |NONE| when not in use.
-enum class StackViewDismissalMode { NONE, NORMAL, INCOGNITO };
+// Used to update the current BVC mode if a new tab is added while the tab
+// switcher view is being dimissed.  This is different than ApplicationMode in
+// that it can be set to |NONE| when not in use.
+enum class TabSwitcherDismissalMode { NONE, NORMAL, INCOGNITO };
+
+// The style of tab switcher, with a utility function to fetch it.
+enum class TabSwitcherMode { STACK, TABLET_SWITCHER, GRID };
+
+TabSwitcherMode SwitcherMode() {
+  if (IsUIRefreshPhase1Enabled()) {
+    return TabSwitcherMode::GRID;
+  } else if (IsIPadIdiom()) {
+    return TabSwitcherMode::TABLET_SWITCHER;
+  } else {
+    return TabSwitcherMode::STACK;
+  }
+}
 
 // The delay, in seconds, for cleaning external files.
 const int kExternalFilesCleanupDelaySeconds = 60;
@@ -315,12 +328,12 @@
   // TabSwitcher object -- the stack view, tablet switcher, etc.
   id<TabSwitcher> _tabSwitcher;
 
-  // YES while animating the dismissal of stack view.
-  BOOL _dismissingStackView;
+  // YES while animating the dismissal of tab switcher.
+  BOOL _dismissingTabSwitcher;
 
   // If not NONE, the current BVC should be switched to this BVC on completion
-  // of stack view dismissal.
-  StackViewDismissalMode _modeToDisplayOnStackViewDismissal;
+  // of tab switcher dismissal.
+  TabSwitcherDismissalMode _modeToDisplayOnTabSwitcherDismissal;
 
   // If YES, the tab switcher is currently active.
   BOOL _tabSwitcherIsActive;
@@ -431,7 +444,7 @@
 // to the current UI, based on the |dismissModals| flag:
 // - If a modal dialog is showing and |dismissModals| is NO, the selected tab of
 // the main tab model will change in the background, but the view won't change.
-// - Otherwise, any modal view will be dismissed, the stack view will animate
+// - Otherwise, any modal view will be dismissed, the tab switcher will animate
 // out if it is showing, the target BVC will become active, and the new tab will
 // be shown.
 // If the current tab in |targetMode| is a NTP, it can be reused to open URL.
@@ -450,12 +463,13 @@
          tabOpenedCompletion:(ProceduralBlock)tabOpenedCompletion;
 // Returns whether the restore infobar should be displayed.
 - (bool)mustShowRestoreInfobar;
-// Begins the process of dismissing the stack view with the given current model,
-// switching which BVC is suspended if necessary, but not updating the UI.
-- (void)beginDismissingStackViewWithCurrentModel:(TabModel*)tabModel;
-// Completes the process of dismissing the stack view, removing it from the
+// Begins the process of dismissing the tab switcher with the given current
+// model, switching which BVC is suspended if necessary, but not updating the
+// UI.
+- (void)beginDismissingTabSwitcherWithCurrentModel:(TabModel*)tabModel;
+// Completes the process of dismissing the tab switcher, removing it from the
 // screen and showing the appropriate BVC.
-- (void)finishDismissingStackView;
+- (void)finishDismissingTabSwitcher;
 // Sets up self.currentBVC for testing by closing existing tabs.
 - (void)setUpCurrentBVCForTesting;
 // Opens an url from a link in the settings UI.
@@ -843,14 +857,16 @@
 
 - (void)deleteIncognitoBrowserState {
   BOOL otrBVCIsCurrent = (self.currentBVC == self.otrBVC);
+  TabSwitcherMode mode = SwitcherMode();
 
-  // If the current BVC is the otr BVC, then the user should be in the card
-  // stack, this is not true for the iPad tab switcher.
-  DCHECK(IsIPadIdiom() || (!otrBVCIsCurrent || _tabSwitcherIsActive));
+  // If the stack view is in use,and the current BVC is the otr BVC, then the
+  // user should be in the tab switcher (the stack view).
+  DCHECK(mode != TabSwitcherMode::STACK ||
+         (!otrBVCIsCurrent || _tabSwitcherIsActive));
 
-  // We always clear the otr tab model on iPad.
+  // Always clear the OTR tab model for the tablet switcher.
   // Notify the _tabSwitcher that its otrBVC will be destroyed.
-  if (IsIPadIdiom() || _tabSwitcherIsActive)
+  if (mode == TabSwitcherMode::TABLET_SWITCHER || _tabSwitcherIsActive)
     [_tabSwitcher setOtrTabModel:nil];
 
   [_browserViewWrangler deleteIncognitoTabModelState];
@@ -859,9 +875,9 @@
     [self activateBVCAndMakeCurrentBVCPrimary];
   }
 
-  // Always set the new otr tab model on iPad with tab switcher enabled.
+  // Always set the new otr tab model for the tablet switcher.
   // Notify the _tabSwitcher with the new otrBVC.
-  if (IsIPadIdiom() || _tabSwitcherIsActive)
+  if (mode == TabSwitcherMode::TABLET_SWITCHER || _tabSwitcherIsActive)
     [_tabSwitcher setOtrTabModel:self.otrTabModel];
 }
 
@@ -896,7 +912,7 @@
   }
   if (!_mainCoordinator) {
     // Lazily create the main coordinator.
-    if (IsUIRefreshPhase1Enabled()) {
+    if (SwitcherMode() == TabSwitcherMode::GRID) {
       TabGridCoordinator* tabGridCoordinator =
           [[TabGridCoordinator alloc] initWithWindow:self.window
                           applicationCommandEndpoint:self];
@@ -1736,7 +1752,7 @@
   DCHECK(_browserViewWrangler);
   [_browserViewWrangler setCurrentBVC:bvc storageSwitcher:self];
 
-  if (!_dismissingStackView)
+  if (!_dismissingTabSwitcher)
     [self displayCurrentBVC];
 
   // Tell the BVC that was made current that it can use the web.
@@ -1768,7 +1784,7 @@
     return;
   }
 
-  if (IsIPadIdiom()) {
+  if (SwitcherMode() == TabSwitcherMode::TABLET_SWITCHER) {
     [self showTabSwitcher];
   } else {
     self.currentBVC = self.mainBVC;
@@ -1824,9 +1840,6 @@
   return self.currentBVC.browserState;
 }
 
-// NOTE: If you change this function, it may have an effect on the performance
-// of opening the stack view. Please make sure you also change the corresponding
-// code in StackViewControllerPerfTest::MainControllerShowTabSwitcher().
 - (void)showTabSwitcher {
   BrowserViewController* currentBVC = self.currentBVC;
   Tab* currentTab = [[currentBVC tabModel] currentTab];
@@ -1853,25 +1866,31 @@
   if (!_tabSwitcher) {
     _tabSwitcher = [self newTabSwitcher];
   } else {
-    // The StackViewController is kept in memory to avoid the performance hit of
-    // loading from the nib on next showing, but clears out its card models to
-    // release memory.  The tab models are required to rebuild the card stacks.
+    // Tab switcher implementations may need to rebuild state before being
+    // displayed.
     [_tabSwitcher restoreInternalStateWithMainTabModel:self.mainTabModel
                                            otrTabModel:self.otrTabModel
                                         activeTabModel:self.currentTabModel];
   }
   _tabSwitcherIsActive = YES;
   [_tabSwitcher setDelegate:self];
-  if (IsIPadIdiom()) {
-    TabSwitcherTransitionContext* transitionContext =
-        [TabSwitcherTransitionContext
-            tabSwitcherTransitionContextWithCurrent:currentBVC
-                                            mainBVC:self.mainBVC
-                                             otrBVC:self.otrBVC];
-    [_tabSwitcher setTransitionContext:transitionContext];
-  } else {
-    // User interaction is disabled when the stack controller is dismissed.
-    [[_tabSwitcher viewController].view setUserInteractionEnabled:YES];
+  switch (SwitcherMode()) {
+    case TabSwitcherMode::TABLET_SWITCHER: {
+      TabSwitcherTransitionContext* transitionContext =
+          [TabSwitcherTransitionContext
+              tabSwitcherTransitionContextWithCurrent:currentBVC
+                                              mainBVC:self.mainBVC
+                                               otrBVC:self.otrBVC];
+      [_tabSwitcher setTransitionContext:transitionContext];
+      break;
+    }
+    case TabSwitcherMode::STACK:
+      // User interaction is disabled when the stack controller is dismissed.
+      [[_tabSwitcher viewController].view setUserInteractionEnabled:YES];
+      break;
+    case TabSwitcherMode::GRID:
+      // Nothing to do in this case
+      break;
   }
 
   [self.viewControllerSwapper showTabSwitcher:_tabSwitcher completion:nil];
@@ -1922,14 +1941,14 @@
 
 - (void)dismissTabSwitcherWithoutAnimationInModel:(TabModel*)tabModel {
   DCHECK(_tabSwitcherIsActive);
-  DCHECK(!_dismissingStackView);
+  DCHECK(!_dismissingTabSwitcher);
   if ([_tabSwitcher respondsToSelector:@selector
                     (tabSwitcherDismissWithModel:animated:)]) {
     [self dismissModalDialogsWithCompletion:nil dismissOmnibox:YES];
     [_tabSwitcher tabSwitcherDismissWithModel:tabModel animated:NO];
   } else {
-    [self beginDismissingStackViewWithCurrentModel:tabModel];
-    [self finishDismissingStackView];
+    [self beginDismissingTabSwitcherWithCurrentModel:tabModel];
+    [self finishDismissingTabSwitcher];
   }
 }
 
@@ -1937,11 +1956,11 @@
 
 - (void)tabSwitcher:(id<TabSwitcher>)tabSwitcher
     shouldFinishWithActiveModel:(TabModel*)tabModel {
-  [self beginDismissingStackViewWithCurrentModel:tabModel];
+  [self beginDismissingTabSwitcherWithCurrentModel:tabModel];
 }
 
 - (void)tabSwitcherDismissTransitionDidEnd:(id<TabSwitcher>)tabSwitcher {
-  [self finishDismissingStackView];
+  [self finishDismissingTabSwitcher];
 }
 
 - (id<ToolbarOwner>)tabSwitcherTransitionToolbarOwner {
@@ -1953,13 +1972,13 @@
 
 #pragma mark - TabSwitcherDelegate helper methods
 
-- (void)beginDismissingStackViewWithCurrentModel:(TabModel*)tabModel {
+- (void)beginDismissingTabSwitcherWithCurrentModel:(TabModel*)tabModel {
   DCHECK(tabModel == self.mainTabModel || tabModel == self.otrTabModel);
 
-  _dismissingStackView = YES;
+  _dismissingTabSwitcher = YES;
   // Prevent wayward touches from wreaking havoc while the stack view is being
-  // dismissed. Don't do this when the tab grid is used.
-  if (!IsUIRefreshPhase1Enabled()) {
+  // dismissed.
+  if (SwitcherMode() == TabSwitcherMode::STACK) {
     [[_tabSwitcher viewController].view setUserInteractionEnabled:NO];
   }
 
@@ -1968,14 +1987,14 @@
   self.currentBVC = targetBVC;
 
   // The call to set currentBVC above does not actually display the BVC, because
-  // _dismissingStackView is YES.  When the presentation experiment is enabled,
-  // force the BVC transition to start.
+  // _dismissingTabSwitcher is YES.  When the presentation experiment is
+  // enabled, force the BVC transition to start.
   if (TabSwitcherPresentsBVCEnabled()) {
     [self displayCurrentBVC];
   }
 }
 
-- (void)finishDismissingStackView {
+- (void)finishDismissingTabSwitcher {
   // The tab switcher presentation experiment modifies the app's VC hierarchy.
   // As a result, the "active" VC when the animation completes differs based on
   // the experiment state.
@@ -1993,18 +2012,17 @@
               [_tabSwitcher viewController]);
   }
 
-  if (_modeToDisplayOnStackViewDismissal == StackViewDismissalMode::NORMAL) {
+  if (_modeToDisplayOnTabSwitcherDismissal ==
+      TabSwitcherDismissalMode::NORMAL) {
     self.currentBVC = self.mainBVC;
-  } else if (_modeToDisplayOnStackViewDismissal ==
-             StackViewDismissalMode::INCOGNITO) {
+  } else if (_modeToDisplayOnTabSwitcherDismissal ==
+             TabSwitcherDismissalMode::INCOGNITO) {
     self.currentBVC = self.otrBVC;
   }
 
-  _modeToDisplayOnStackViewDismissal = StackViewDismissalMode::NONE;
+  _modeToDisplayOnTabSwitcherDismissal = TabSwitcherDismissalMode::NONE;
 
-  // Displaying the current BVC dismisses the stack view.  When the tabswitcher
-  // presentation experiment is enabled, this call does nothing because the BVC
-  // is already presented.
+  // Displaying the current BVC dismisses the tab switcher.
   [self displayCurrentBVC];
 
   ProceduralBlock action = [self completionBlockForTriggeringAction:
@@ -2014,10 +2032,13 @@
     action();
   }
 
-  [_tabSwitcher setDelegate:nil];
+  // The tab grid is long-lived and its delegate should not be reset.
+  if (!IsUIRefreshPhase1Enabled()) {
+    [_tabSwitcher setDelegate:nil];
+  }
 
   _tabSwitcherIsActive = NO;
-  _dismissingStackView = NO;
+  _dismissingTabSwitcher = NO;
 }
 
 #pragma mark - BrowsingDataCommands
@@ -2227,14 +2248,14 @@
 
   Tab* tab = nil;
   if (_tabSwitcherIsActive) {
-    // If the stack view is already being dismissed, simply add the tab and
-    // note that when the stack view finishes dismissing, the current BVC should
-    // be switched to be the main BVC if necessary.
-    if (_dismissingStackView) {
-      _modeToDisplayOnStackViewDismissal =
+    // If the tab switcher is already being dismissed, simply add the tab and
+    // note that when the tab switcher finishes dismissing, the current BVC
+    // should be switched to be the main BVC if necessary.
+    if (_dismissingTabSwitcher) {
+      _modeToDisplayOnTabSwitcherDismissal =
           targetMode == ApplicationMode::NORMAL
-              ? StackViewDismissalMode::NORMAL
-              : StackViewDismissalMode::INCOGNITO;
+              ? TabSwitcherDismissalMode::NORMAL
+              : TabSwitcherDismissalMode::INCOGNITO;
       tab = [targetBVC addSelectedTabWithURL:url
                                      atIndex:tabIndex
                                   transition:transition
@@ -2474,8 +2495,8 @@
   UIView* lastView = self.viewControllerSwapper.activeViewController.view;
   DCHECK(lastView);
   CGFloat scale = 0.0;
-  // For screenshots of the Stack View we need to use a scale of 1.0 to avoid
-  // spending too much time since the Stack View can have lots of subviews.
+  // For screenshots of the tab switcher we need to use a scale of 1.0 to avoid
+  // spending too much time since the tab switcher can have lots of subviews.
   if (_tabSwitcherIsActive)
     scale = 1.0;
   return CaptureView(lastView, scale);
@@ -2504,40 +2525,35 @@
 
 #pragma mark - Experimental flag
 
-// Creates and returns a tab switcher object according to the current
-// experimental flags and device idioms:
-// - If the UI Refresh phase 1 flag is enabled, the TabGridController's
-//   TabSwitcher is returned.
-// - If the current device is an iPad, a new TabSwitcherController is returned.
-// - Otherwise, a new StackViewController is returned.
+// Creates and returns a tab switcher object according to the tab switcher stye.
 - (id<TabSwitcher>)newTabSwitcher {
-  if (IsUIRefreshPhase1Enabled()) {
-    DCHECK(_mainCoordinator)
-        << " Main coordinator not created when tab switcher needed.";
-    TabGridCoordinator* tabGridCoordinator =
-        base::mac::ObjCCastStrict<TabGridCoordinator>(self.mainCoordinator);
-    // Call -restoreInternalState so that the grid shows the correct panel.
-    [tabGridCoordinator.tabSwitcher
-        restoreInternalStateWithMainTabModel:self.mainTabModel
-                                 otrTabModel:self.otrTabModel
-                              activeTabModel:self.currentTabModel];
-    return tabGridCoordinator.tabSwitcher;
-  } else {
-    if (IsIPadIdiom()) {
+  switch (SwitcherMode()) {
+    case TabSwitcherMode::GRID: {
+      DCHECK(_mainCoordinator)
+          << " Main coordinator not created when tab switcher needed.";
+      TabGridCoordinator* tabGridCoordinator =
+          base::mac::ObjCCastStrict<TabGridCoordinator>(self.mainCoordinator);
+      // Call -restoreInternalState so that the grid shows the correct panel.
+      [tabGridCoordinator.tabSwitcher
+          restoreInternalStateWithMainTabModel:self.mainTabModel
+                                   otrTabModel:self.otrTabModel
+                                activeTabModel:self.currentTabModel];
+      return tabGridCoordinator.tabSwitcher;
+    }
+    case TabSwitcherMode::TABLET_SWITCHER:
       return [[TabSwitcherController alloc]
                 initWithBrowserState:_mainBrowserState
                         mainTabModel:self.mainTabModel
                          otrTabModel:self.otrTabModel
                       activeTabModel:self.currentTabModel
           applicationCommandEndpoint:self];
-    } else {
+    case TabSwitcherMode::STACK:
       return
           [[StackViewController alloc] initWithMainTabModel:self.mainTabModel
                                                 otrTabModel:self.otrTabModel
                                              activeTabModel:self.currentTabModel
                                  applicationCommandEndpoint:self];
     }
-  }
 }
 
 @end
@@ -2570,7 +2586,7 @@
 }
 
 - (BOOL)dismissingTabSwitcher {
-  return _dismissingStackView;
+  return _dismissingTabSwitcher;
 }
 
 - (void)setStartupParametersWithURL:(const GURL&)launchURL {
diff --git a/ios/chrome/browser/passwords/account_select_fill_data.cc b/ios/chrome/browser/passwords/account_select_fill_data.cc
index 086a913..0ec2614 100644
--- a/ios/chrome/browser/passwords/account_select_fill_data.cc
+++ b/ios/chrome/browser/passwords/account_select_fill_data.cc
@@ -27,9 +27,7 @@
 
 void AccountSelectFillData::Add(
     const autofill::PasswordFormFillData& form_data) {
-  std::pair<base::string16, base::string16> key(form_data.name,
-                                                form_data.username_field.name);
-  auto iter_ok = forms_.insert(std::make_pair(key, FormInfo()));
+  auto iter_ok = forms_.insert(std::make_pair(form_data.name, FormInfo()));
   FormInfo& form_info = iter_ok.first->second;
   form_info.origin = form_data.origin;
   form_info.action = form_data.action;
@@ -65,19 +63,26 @@
 
 bool AccountSelectFillData::IsSuggestionsAvailable(
     const base::string16& form_name,
-    const base::string16& field_identifier) const {
-  return GetFormInfo(form_name, field_identifier) != nullptr;
+    const base::string16& field_identifier,
+    bool is_password_field) const {
+  return GetFormInfo(form_name, field_identifier, is_password_field) != nullptr;
 }
 
 std::vector<UsernameAndRealm> AccountSelectFillData::RetrieveSuggestions(
     const base::string16& form_name,
-    const base::string16& field_identifier) const {
-  last_requested_form_ = GetFormInfo(form_name, field_identifier);
+    const base::string16& field_identifier,
+    bool is_password_field) const {
+  last_requested_form_ =
+      GetFormInfo(form_name, field_identifier, is_password_field);
   DCHECK(last_requested_form_);
+  if (is_password_field)
+    last_requested_password_field_ = field_identifier;
+  else
+    last_requested_password_field_.clear();
   std::vector<UsernameAndRealm> result;
-  for (const Credential& credential : credentials_) {
+  for (const Credential& credential : credentials_)
     result.push_back({credential.username, credential.realm});
-  }
+
   return result;
 }
 
@@ -100,17 +105,23 @@
   result->action = last_requested_form_->action;
   result->username_element = last_requested_form_->username_element;
   result->username_value = credential.username;
-  result->password_element = last_requested_form_->password_element;
+  result->password_element = last_requested_password_field_.empty()
+                                 ? last_requested_form_->password_element
+                                 : last_requested_password_field_;
   result->password_value = credential.password;
   return result;
 }
 
 const FormInfo* AccountSelectFillData::GetFormInfo(
     const base::string16& form_name,
-    const base::string16& field_identifier) const {
-  std::pair<base::string16, base::string16> key(form_name, field_identifier);
-  auto it = forms_.find(key);
-  return it == forms_.end() ? nullptr : &it->second;
+    const base::string16& field_identifier,
+    bool is_password_field) const {
+  auto it = forms_.find(form_name);
+  if (it == forms_.end())
+    return nullptr;
+  return is_password_field || it->second.username_element == field_identifier
+             ? &it->second
+             : nullptr;
 }
 
 }  // namespace  password_manager
diff --git a/ios/chrome/browser/passwords/account_select_fill_data.h b/ios/chrome/browser/passwords/account_select_fill_data.h
index fab0c7d2..da27cee 100644
--- a/ios/chrome/browser/passwords/account_select_fill_data.h
+++ b/ios/chrome/browser/passwords/account_select_fill_data.h
@@ -80,13 +80,15 @@
   // Returns whether suggestions are available for field with name
   // |field_name| which is in the form with name |form_name|.
   bool IsSuggestionsAvailable(const base::string16& form_name,
-                              const base::string16& field_identifier) const;
+                              const base::string16& field_identifier,
+                              bool is_password_field) const;
 
   // Returns suggestions for field with name |field_name| which is in the form
   // with name |form_name|.
   std::vector<UsernameAndRealm> RetrieveSuggestions(
       const base::string16& form_name,
-      const base::string16& field_identifier) const;
+      const base::string16& field_identifier,
+      bool is_password_field) const;
 
   // Returns data for password form filling based on |username| chosen by the
   // user.
@@ -97,18 +99,28 @@
  private:
   // Keeps data about all known forms. The key is the pair (form_name, username
   // field_name).
-  std::map<std::pair<base::string16, base::string16>, FormInfo> forms_;
+  std::map<base::string16, FormInfo> forms_;
 
   // Keeps all known credentials.
   std::vector<Credential> credentials_;
 
   // Mutable because it's updated from RetrieveSuggestions, which is logically
   // should be const.
+  // Keeps information about last form that was requested in
+  // RetrieveSuggestions.
   mutable const FormInfo* last_requested_form_ = nullptr;
+  // Keeps id of the last requested field if it was password otherwise the empty
+  // string.
+  mutable base::string16 last_requested_password_field_;
 
-  // Helper method for receiving FormInfo from |forms_| by key lookup.
+  // Returns form information from |forms_| that has form name |form_name|.
+  // If |is_password_field| == false and |field_identifier| is not equal to
+  // form username_element null is returned. If |is_password_field| == true then
+  // |field_identifier| is ignored. That corresponds to the logic, that
+  // suggestions should be shown on any password fields.
   const FormInfo* GetFormInfo(const base::string16& form_name,
-                              const base::string16& field_identifier) const;
+                              const base::string16& field_identifier,
+                              bool is_password_field) const;
 
   DISALLOW_COPY_AND_ASSIGN(AccountSelectFillData);
 };
diff --git a/ios/chrome/browser/passwords/account_select_fill_data_unittest.cc b/ios/chrome/browser/passwords/account_select_fill_data_unittest.cc
index 6d1d7dc..3bee700 100644
--- a/ios/chrome/browser/passwords/account_select_fill_data_unittest.cc
+++ b/ios/chrome/browser/passwords/account_select_fill_data_unittest.cc
@@ -62,16 +62,23 @@
 
   // Suggestions are avaialable for the correct form and field names.
   EXPECT_TRUE(account_select_fill_data.IsSuggestionsAvailable(
-      form_data_[0].name, form_data_[0].username_field.id));
+      form_data_[0].name, form_data_[0].username_field.id, false));
+  // Suggestion should be available to any password field.
+  EXPECT_TRUE(account_select_fill_data.IsSuggestionsAvailable(
+      form_data_[0].name, base::ASCIIToUTF16("password"), true));
+
   // Suggestions are not avaialable for different form name.
   EXPECT_FALSE(account_select_fill_data.IsSuggestionsAvailable(
       form_data_[0].name + base::ASCIIToUTF16("1"),
-      form_data_[0].username_field.id));
+      form_data_[0].username_field.id, false));
+  EXPECT_FALSE(account_select_fill_data.IsSuggestionsAvailable(
+      form_data_[0].name + base::ASCIIToUTF16("1"),
+      form_data_[0].password_field.id, true));
 
   // Suggestions are not avaialable for different field name.
   EXPECT_FALSE(account_select_fill_data.IsSuggestionsAvailable(
       form_data_[0].name,
-      form_data_[0].username_field.id + base::ASCIIToUTF16("1")));
+      form_data_[0].username_field.id + base::ASCIIToUTF16("1"), false));
 }
 
 TEST_F(AccountSelectFillDataTest, IsSuggestionsAvailableTwoForms) {
@@ -81,29 +88,34 @@
 
   // Suggestions are avaialable for the correct form and field names.
   EXPECT_TRUE(account_select_fill_data.IsSuggestionsAvailable(
-      form_data_[0].name, form_data_[0].username_field.id));
+      form_data_[0].name, form_data_[0].username_field.id, false));
   // Suggestions are avaialable for the correct form and field names.
   EXPECT_TRUE(account_select_fill_data.IsSuggestionsAvailable(
-      form_data_[1].name, form_data_[1].username_field.id));
+      form_data_[1].name, form_data_[1].username_field.id, false));
   // Suggestions are not avaialable for different form name.
   EXPECT_FALSE(account_select_fill_data.IsSuggestionsAvailable(
       form_data_[0].name + base::ASCIIToUTF16("1"),
-      form_data_[0].username_field.id));
+      form_data_[0].username_field.id, false));
 }
 
 TEST_F(AccountSelectFillDataTest, RetrieveSuggestionsOneForm) {
   AccountSelectFillData account_select_fill_data;
   account_select_fill_data.Add(form_data_[0]);
 
-  std::vector<UsernameAndRealm> suggestions =
-      account_select_fill_data.RetrieveSuggestions(
-          form_data_[0].name, form_data_[0].username_field.id);
-  EXPECT_EQ(2u, suggestions.size());
-  EXPECT_EQ(base::ASCIIToUTF16(kUsernames[0]), suggestions[0].username);
-  EXPECT_EQ(std::string(), suggestions[0].realm);
-  EXPECT_EQ(base::ASCIIToUTF16(kAdditionalUsernames[0]),
-            suggestions[1].username);
-  EXPECT_EQ(std::string(), suggestions[1].realm);
+  for (bool is_password_field : {false, true}) {
+    const base::string16 field_id = is_password_field
+                                        ? form_data_[0].password_field.id
+                                        : form_data_[0].username_field.id;
+    std::vector<UsernameAndRealm> suggestions =
+        account_select_fill_data.RetrieveSuggestions(
+            form_data_[0].name, field_id, is_password_field);
+    EXPECT_EQ(2u, suggestions.size());
+    EXPECT_EQ(base::ASCIIToUTF16(kUsernames[0]), suggestions[0].username);
+    EXPECT_EQ(std::string(), suggestions[0].realm);
+    EXPECT_EQ(base::ASCIIToUTF16(kAdditionalUsernames[0]),
+              suggestions[1].username);
+    EXPECT_EQ(std::string(), suggestions[1].realm);
+  }
 }
 
 TEST_F(AccountSelectFillDataTest, RetrieveSuggestionsTwoForm) {
@@ -117,12 +129,12 @@
 
   std::vector<UsernameAndRealm> suggestions =
       account_select_fill_data.RetrieveSuggestions(
-          form_data_[0].name, form_data_[0].username_field.id);
+          form_data_[0].name, form_data_[0].username_field.id, false);
   EXPECT_EQ(1u, suggestions.size());
   EXPECT_EQ(base::ASCIIToUTF16(kUsernames[1]), suggestions[0].username);
 
   suggestions = account_select_fill_data.RetrieveSuggestions(
-      form_data_[1].name, form_data_[1].username_field.id);
+      form_data_[1].name, form_data_[1].username_field.id, false);
   EXPECT_EQ(1u, suggestions.size());
   EXPECT_EQ(base::ASCIIToUTF16(kUsernames[1]), suggestions[0].username);
 }
@@ -139,7 +151,7 @@
   account_select_fill_data.Add(form_data_[0]);
   std::vector<UsernameAndRealm> suggestions =
       account_select_fill_data.RetrieveSuggestions(
-          form_data_[0].name, form_data_[0].username_field.id);
+          form_data_[0].name, form_data_[0].username_field.id, false);
   EXPECT_EQ(2u, suggestions.size());
   EXPECT_EQ(base::ASCIIToUTF16(kUsernames[0]), suggestions[0].username);
   EXPECT_EQ(kRealm, suggestions[0].realm);
@@ -153,24 +165,35 @@
   account_select_fill_data.Add(form_data_[0]);
   account_select_fill_data.Add(form_data_[1]);
 
-  for (size_t form_i = 0; form_i < arraysize(form_data_); ++form_i) {
-    const auto& form_data = form_data_[form_i];
-    // GetFillData() doesn't have form identifier in arguments, it should be
-    // provided in RetrieveSuggestions().
-    account_select_fill_data.RetrieveSuggestions(form_data.name,
-                                                 form_data.username_field.id);
-    std::unique_ptr<FillData> fill_data =
-        account_select_fill_data.GetFillData(base::ASCIIToUTF16(kUsernames[1]));
+  for (bool is_password_field : {false, true}) {
+    for (size_t form_i = 0; form_i < arraysize(form_data_); ++form_i) {
+      const auto& form_data = form_data_[form_i];
+      // Suggestions should be shown on any password field on the form. So in
+      // case of clicking on a password field it is taken an id different from
+      // existing field ids.
+      const base::string16 password_field =
+          form_data.password_field.id +
+          (is_password_field ? base::ASCIIToUTF16("1") : base::string16());
+      const base::string16 clicked_field =
+          is_password_field ? password_field : form_data.username_field.id;
 
-    ASSERT_TRUE(fill_data);
-    EXPECT_EQ(form_data.origin, fill_data->origin);
-    EXPECT_EQ(form_data.action, fill_data->action);
-    EXPECT_EQ(base::ASCIIToUTF16(kUsernameElements[form_i]),
-              fill_data->username_element);
-    EXPECT_EQ(base::ASCIIToUTF16(kUsernames[1]), fill_data->username_value);
-    EXPECT_EQ(base::ASCIIToUTF16(kPasswordElements[form_i]),
-              fill_data->password_element);
-    EXPECT_EQ(base::ASCIIToUTF16(kPasswords[1]), fill_data->password_value);
+      // GetFillData() doesn't have form identifier in arguments, it should be
+      // provided in RetrieveSuggestions().
+      account_select_fill_data.RetrieveSuggestions(
+          form_data.name, clicked_field, is_password_field);
+      std::unique_ptr<FillData> fill_data =
+          account_select_fill_data.GetFillData(
+              base::ASCIIToUTF16(kUsernames[1]));
+
+      ASSERT_TRUE(fill_data);
+      EXPECT_EQ(form_data.origin, fill_data->origin);
+      EXPECT_EQ(form_data.action, fill_data->action);
+      EXPECT_EQ(base::ASCIIToUTF16(kUsernameElements[form_i]),
+                fill_data->username_element);
+      EXPECT_EQ(base::ASCIIToUTF16(kUsernames[1]), fill_data->username_value);
+      EXPECT_EQ(password_field, fill_data->password_element);
+      EXPECT_EQ(base::ASCIIToUTF16(kPasswords[1]), fill_data->password_value);
+    }
   }
 }
 
@@ -181,8 +204,8 @@
 
   // GetFillData() doesn't have form identifier in arguments, it should be
   // provided in RetrieveSuggestions().
-  account_select_fill_data.RetrieveSuggestions(form_data_[0].name,
-                                               form_data_[0].username_field.id);
+  account_select_fill_data.RetrieveSuggestions(
+      form_data_[0].name, form_data_[0].username_field.id, false);
 
   // AccountSelectFillData should keep only last credentials. Check that in
   // request of old credentials nothing is returned.
diff --git a/ios/chrome/browser/passwords/password_controller.mm b/ios/chrome/browser/passwords/password_controller.mm
index 561d92d..fb01571 100644
--- a/ios/chrome/browser/passwords/password_controller.mm
+++ b/ios/chrome/browser/passwords/password_controller.mm
@@ -172,14 +172,18 @@
 // password pair in |AccountSelectFillData|. "Show all" item is appended.
 NSArray* BuildSuggestions(const AccountSelectFillData& fillData,
                           NSString* formName,
-                          NSString* fieldIdentifier) {
+                          NSString* fieldIdentifier,
+                          NSString* fieldType) {
   base::string16 form_name = base::SysNSStringToUTF16(formName);
   base::string16 field_identifier = base::SysNSStringToUTF16(fieldIdentifier);
+  bool is_password_field = [fieldType isEqualToString:@"password"];
 
   NSMutableArray* suggestions = [NSMutableArray array];
-  if (fillData.IsSuggestionsAvailable(form_name, field_identifier)) {
+  if (fillData.IsSuggestionsAvailable(form_name, field_identifier,
+                                      is_password_field)) {
     std::vector<password_manager::UsernameAndRealm> username_and_realms_ =
-        fillData.RetrieveSuggestions(form_name, field_identifier);
+        fillData.RetrieveSuggestions(form_name, field_identifier,
+                                     is_password_field);
 
     // Add credentials.
     for (const auto& username_and_realm : username_and_realms_) {
@@ -704,35 +708,31 @@
 
   bool should_send_request_to_store =
       !sentRequestToStore_ && [type isEqual:@"focus"];
-
-  if ([fieldType isEqual:@"password"]) {
-    if (should_send_request_to_store)
-      [self findPasswordFormsAndSendThemToPasswordStore];
-    // Always display "Show all" on the password field.
-    completion(YES);
-    return;
-  }
+  bool is_password_field = [fieldType isEqual:@"password"];
 
   if (should_send_request_to_store) {
     // Save the completion and go look for suggestions.
     suggestionsAvailableCompletion_ =
         [^(const AccountSelectFillData* fill_data) {
-          if (!fill_data)
+          if (is_password_field) {
+            // Always display "Show all" on the password field.
+            completion(YES);
+          } else if (!fill_data) {
             completion(NO);
-          else {
+          } else {
             completion(fill_data->IsSuggestionsAvailable(
                 base::SysNSStringToUTF16(formName),
-                base::SysNSStringToUTF16(fieldIdentifier)));
+                base::SysNSStringToUTF16(fieldIdentifier), false));
           }
         } copy];
     [self findPasswordFormsAndSendThemToPasswordStore];
     return;
   }
 
-  completion(!fillData_.Empty() &&
+  completion(is_password_field ||
              fillData_.IsSuggestionsAvailable(
                  base::SysNSStringToUTF16(formName),
-                 base::SysNSStringToUTF16(fieldIdentifier)));
+                 base::SysNSStringToUTF16(fieldIdentifier), false));
 }
 
 - (void)retrieveSuggestionsForForm:(NSString*)formName
@@ -744,7 +744,8 @@
                           webState:(web::WebState*)webState
                  completionHandler:(SuggestionsReadyCompletion)completion {
   DCHECK(GetPageURLAndCheckTrustLevel(webState, nullptr));
-  completion(BuildSuggestions(fillData_, formName, fieldIdentifier), self);
+  completion(BuildSuggestions(fillData_, formName, fieldIdentifier, fieldType),
+             self);
 }
 
 - (void)didSelectSuggestion:(FormSuggestion*)suggestion
diff --git a/ios/chrome/browser/passwords/password_controller_unittest.mm b/ios/chrome/browser/passwords/password_controller_unittest.mm
index 3c7827d..67cd8c2 100644
--- a/ios/chrome/browser/passwords/password_controller_unittest.mm
+++ b/ios/chrome/browser/passwords/password_controller_unittest.mm
@@ -1183,12 +1183,12 @@
       @"[]=, onkeyup=false, onchange=false"
     },
     {
-      "Should not show password suggestions when focusing password field",
+      "Should show password suggestions when focusing password field",
       @[(@"var evt = document.createEvent('Events');"
           "evt.initEvent('focus', true, true, window, 1);"
           "password_.dispatchEvent(evt);"),
         @""],
-      @[showAll],
+      @[@"user0 ••••••••", @"abc ••••••••", showAll],
       @"[]=, onkeyup=false, onchange=false"
     },
     {
diff --git a/ios/chrome/browser/sessions/ios_chrome_tab_restore_service_client.mm b/ios/chrome/browser/sessions/ios_chrome_tab_restore_service_client.mm
index 49188a38..441c308 100644
--- a/ios/chrome/browser/sessions/ios_chrome_tab_restore_service_client.mm
+++ b/ios/chrome/browser/sessions/ios_chrome_tab_restore_service_client.mm
@@ -102,7 +102,8 @@
   return FindLiveTabContextWithCondition(base::Bind(
       [](SessionID::id_type desired_id, TabModel* tab_model) {
         DCHECK(tab_model.syncedWindowDelegate);
-        return tab_model.syncedWindowDelegate->GetSessionId() == desired_id;
+        return tab_model.syncedWindowDelegate->GetSessionId().id() ==
+               desired_id;
       },
       desired_id));
 }
diff --git a/ios/chrome/browser/sessions/tab_restore_service_delegate_impl_ios.h b/ios/chrome/browser/sessions/tab_restore_service_delegate_impl_ios.h
index f4123b8..2f202ac 100644
--- a/ios/chrome/browser/sessions/tab_restore_service_delegate_impl_ios.h
+++ b/ios/chrome/browser/sessions/tab_restore_service_delegate_impl_ios.h
@@ -32,7 +32,7 @@
 
   // Overridden from sessions::LiveTabContext:
   void ShowBrowserWindow() override;
-  const SessionID& GetSessionID() const override;
+  SessionID GetSessionID() const override;
   int GetTabCount() const override;
   int GetSelectedIndex() const override;
   std::string GetAppName() const override;
diff --git a/ios/chrome/browser/sessions/tab_restore_service_delegate_impl_ios.mm b/ios/chrome/browser/sessions/tab_restore_service_delegate_impl_ios.mm
index 1550729..df3d9eb 100644
--- a/ios/chrome/browser/sessions/tab_restore_service_delegate_impl_ios.mm
+++ b/ios/chrome/browser/sessions/tab_restore_service_delegate_impl_ios.mm
@@ -40,7 +40,7 @@
   // shown.
 }
 
-const SessionID& TabRestoreServiceDelegateImplIOS::GetSessionID() const {
+SessionID TabRestoreServiceDelegateImplIOS::GetSessionID() const {
   return session_id_;
 }
 
diff --git a/ios/chrome/browser/sync/ios_chrome_synced_tab_delegate.h b/ios/chrome/browser/sync/ios_chrome_synced_tab_delegate.h
index 90887103..0f33d60c 100644
--- a/ios/chrome/browser/sync/ios_chrome_synced_tab_delegate.h
+++ b/ios/chrome/browser/sync/ios_chrome_synced_tab_delegate.h
@@ -22,10 +22,10 @@
   ~IOSChromeSyncedTabDelegate() override;
 
   // SyncedTabDelegate:
-  SessionID::id_type GetWindowId() const override;
-  SessionID::id_type GetSessionId() const override;
+  SessionID GetWindowId() const override;
+  SessionID GetSessionId() const override;
   bool IsBeingDestroyed() const override;
-  SessionID::id_type GetSourceTabID() const override;
+  SessionID GetSourceTabID() const override;
   std::string GetExtensionAppId() const override;
   bool IsInitialBlankNavigation() const override;
   int GetCurrentEntryIndex() const override;
diff --git a/ios/chrome/browser/sync/ios_chrome_synced_tab_delegate.mm b/ios/chrome/browser/sync/ios_chrome_synced_tab_delegate.mm
index fc7d83b..10b7313 100644
--- a/ios/chrome/browser/sync/ios_chrome_synced_tab_delegate.mm
+++ b/ios/chrome/browser/sync/ios_chrome_synced_tab_delegate.mm
@@ -42,12 +42,12 @@
 
 IOSChromeSyncedTabDelegate::~IOSChromeSyncedTabDelegate() {}
 
-SessionID::id_type IOSChromeSyncedTabDelegate::GetWindowId() const {
-  return IOSChromeSessionTabHelper::FromWebState(web_state_)->window_id().id();
+SessionID IOSChromeSyncedTabDelegate::GetWindowId() const {
+  return IOSChromeSessionTabHelper::FromWebState(web_state_)->window_id();
 }
 
-SessionID::id_type IOSChromeSyncedTabDelegate::GetSessionId() const {
-  return IOSChromeSessionTabHelper::FromWebState(web_state_)->session_id().id();
+SessionID IOSChromeSyncedTabDelegate::GetSessionId() const {
+  return IOSChromeSessionTabHelper::FromWebState(web_state_)->session_id();
 }
 
 bool IOSChromeSyncedTabDelegate::IsBeingDestroyed() const {
@@ -56,8 +56,8 @@
 
 // todo(pnoland): add logic to store and return the source tab id on ios.
 // http://crbug/695241
-SessionID::id_type IOSChromeSyncedTabDelegate::GetSourceTabID() const {
-  return sync_sessions::kInvalidTabID;
+SessionID IOSChromeSyncedTabDelegate::GetSourceTabID() const {
+  return SessionID::InvalidValue();
 }
 
 std::string IOSChromeSyncedTabDelegate::GetExtensionAppId() const {
diff --git a/ios/chrome/browser/tabs/tab_model_synced_window_delegate.h b/ios/chrome/browser/tabs/tab_model_synced_window_delegate.h
index a6a8581..0c5f53e 100644
--- a/ios/chrome/browser/tabs/tab_model_synced_window_delegate.h
+++ b/ios/chrome/browser/tabs/tab_model_synced_window_delegate.h
@@ -25,13 +25,13 @@
   ~TabModelSyncedWindowDelegate() override;
 
   // Return the tab id for the tab at |index|.
-  SessionID::id_type GetTabIdAt(int index) const override;
+  SessionID GetTabIdAt(int index) const override;
   bool IsSessionRestoreInProgress() const override;
   bool ShouldSync() const override;
 
   // SyncedWindowDelegate:
   bool HasWindow() const override;
-  SessionID::id_type GetSessionId() const override;
+  SessionID GetSessionId() const override;
   int GetTabCount() const override;
   int GetActiveIndex() const override;
   bool IsApp() const override;
diff --git a/ios/chrome/browser/tabs/tab_model_synced_window_delegate.mm b/ios/chrome/browser/tabs/tab_model_synced_window_delegate.mm
index a76754d3..b41202d 100644
--- a/ios/chrome/browser/tabs/tab_model_synced_window_delegate.mm
+++ b/ios/chrome/browser/tabs/tab_model_synced_window_delegate.mm
@@ -28,7 +28,7 @@
   web_state_list_->RemoveObserver(this);
 }
 
-SessionID::id_type TabModelSyncedWindowDelegate::GetTabIdAt(int index) const {
+SessionID TabModelSyncedWindowDelegate::GetTabIdAt(int index) const {
   return GetTabAt(index)->GetSessionId();
 }
 
@@ -44,8 +44,8 @@
   return true;
 }
 
-SessionID::id_type TabModelSyncedWindowDelegate::GetSessionId() const {
-  return session_id_.id();
+SessionID TabModelSyncedWindowDelegate::GetSessionId() const {
+  return session_id_;
 }
 
 int TabModelSyncedWindowDelegate::GetTabCount() const {
diff --git a/ios/chrome/browser/tabs/tab_model_synced_window_delegate_getter.h b/ios/chrome/browser/tabs/tab_model_synced_window_delegate_getter.h
index 75d98d2..3479a2907 100644
--- a/ios/chrome/browser/tabs/tab_model_synced_window_delegate_getter.h
+++ b/ios/chrome/browser/tabs/tab_model_synced_window_delegate_getter.h
@@ -24,7 +24,7 @@
   // sync_sessions::SyncedWindowDelegatesGetter:
   SyncedWindowDelegateMap GetSyncedWindowDelegates() override;
   const sync_sessions::SyncedWindowDelegate* FindById(
-      SessionID::id_type session_id) override;
+      SessionID session_id) override;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(TabModelSyncedWindowDelegatesGetter);
diff --git a/ios/chrome/browser/tabs/tab_model_synced_window_delegate_getter.mm b/ios/chrome/browser/tabs/tab_model_synced_window_delegate_getter.mm
index 58c907cc..b7028d1 100644
--- a/ios/chrome/browser/tabs/tab_model_synced_window_delegate_getter.mm
+++ b/ios/chrome/browser/tabs/tab_model_synced_window_delegate_getter.mm
@@ -47,7 +47,7 @@
 }
 
 const sync_sessions::SyncedWindowDelegate*
-TabModelSyncedWindowDelegatesGetter::FindById(SessionID::id_type session_id) {
+TabModelSyncedWindowDelegatesGetter::FindById(SessionID session_id) {
   for (const auto& iter : GetSyncedWindowDelegates()) {
     if (session_id == iter.second->GetSessionId())
       return iter.second;
diff --git a/ios/chrome/browser/ui/history/BUILD.gn b/ios/chrome/browser/ui/history/BUILD.gn
index d9c4b85..8ec138cc 100644
--- a/ios/chrome/browser/ui/history/BUILD.gn
+++ b/ios/chrome/browser/ui/history/BUILD.gn
@@ -11,14 +11,8 @@
     "favicon_view.mm",
     "favicon_view_provider.h",
     "favicon_view_provider.mm",
-    "history_collection_view_controller.h",
-    "history_collection_view_controller.mm",
-    "history_entries_status_item.h",
-    "history_entries_status_item.mm",
     "history_entry_inserter.h",
     "history_entry_inserter.mm",
-    "history_entry_item.h",
-    "history_entry_item.mm",
     "history_panel_view_controller.h",
     "history_panel_view_controller.mm",
     "history_search_view.h",
@@ -29,6 +23,12 @@
     "history_util.mm",
     "ios_browsing_history_driver.h",
     "ios_browsing_history_driver.mm",
+    "legacy_history_collection_view_controller.h",
+    "legacy_history_collection_view_controller.mm",
+    "legacy_history_entries_status_item.h",
+    "legacy_history_entries_status_item.mm",
+    "legacy_history_entry_item.h",
+    "legacy_history_entry_item.mm",
   ]
   deps = [
     ":history_base_feature",
@@ -99,10 +99,10 @@
   sources = [
     "favicon_view_provider_unittest.mm",
     "history_collection_view_controller_unittest.mm",
-    "history_entries_status_item_unittest.mm",
     "history_entry_inserter_unittest.mm",
-    "history_entry_item_unittest.mm",
     "history_search_view_controller_unittest.mm",
+    "legacy_history_entries_status_item_unittest.mm",
+    "legacy_history_entry_item_unittest.mm",
   ]
   deps = [
     ":history",
diff --git a/ios/chrome/browser/ui/history/history_collection_view_controller_unittest.mm b/ios/chrome/browser/ui/history/history_collection_view_controller_unittest.mm
index d296503..63de7cd8 100644
--- a/ios/chrome/browser/ui/history/history_collection_view_controller_unittest.mm
+++ b/ios/chrome/browser/ui/history/history_collection_view_controller_unittest.mm
@@ -2,7 +2,7 @@
 // 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/history/history_collection_view_controller.h"
+#import "ios/chrome/browser/ui/history/legacy_history_collection_view_controller.h"
 
 #include <memory>
 
@@ -65,15 +65,15 @@
 
 }  // namespace
 
-@interface HistoryCollectionViewController (
+@interface LegacyHistoryCollectionViewController (
     Testing)<BrowsingHistoryDriverDelegate>
 - (void)didPressClearBrowsingBar;
 @end
 
-class HistoryCollectionViewControllerTest : public BlockCleanupTest {
+class LegacyHistoryCollectionViewControllerTest : public BlockCleanupTest {
  public:
-  HistoryCollectionViewControllerTest() {}
-  ~HistoryCollectionViewControllerTest() override {}
+  LegacyHistoryCollectionViewControllerTest() {}
+  ~LegacyHistoryCollectionViewControllerTest() override {}
 
   void SetUp() override {
     BlockCleanupTest::SetUp();
@@ -88,10 +88,11 @@
     sync_setup_service_mock_ = static_cast<SyncSetupServiceMock*>(
         SyncSetupServiceFactory::GetForBrowserState(mock_browser_state_.get()));
     mock_delegate_ = [OCMockObject
-        niceMockForProtocol:@protocol(HistoryCollectionViewControllerDelegate)];
+        niceMockForProtocol:@protocol(
+                                LegacyHistoryCollectionViewControllerDelegate)];
     mock_url_loader_ = [OCMockObject niceMockForProtocol:@protocol(UrlLoader)];
     history_collection_view_controller_ =
-        [[HistoryCollectionViewController alloc]
+        [[LegacyHistoryCollectionViewController alloc]
             initWithLoader:mock_url_loader_
               browserState:mock_browser_state_.get()
                   delegate:mock_delegate_];
@@ -117,15 +118,15 @@
   web::TestWebThreadBundle thread_bundle_;
   id<UrlLoader> mock_url_loader_;
   std::unique_ptr<TestChromeBrowserState> mock_browser_state_;
-  id<HistoryCollectionViewControllerDelegate> mock_delegate_;
-  HistoryCollectionViewController* history_collection_view_controller_;
+  id<LegacyHistoryCollectionViewControllerDelegate> mock_delegate_;
+  LegacyHistoryCollectionViewController* history_collection_view_controller_;
   bool privacy_settings_opened_;
   SyncSetupServiceMock* sync_setup_service_mock_;
-  DISALLOW_COPY_AND_ASSIGN(HistoryCollectionViewControllerTest);
+  DISALLOW_COPY_AND_ASSIGN(LegacyHistoryCollectionViewControllerTest);
 };
 
 // Tests that isEmpty property returns NO after entries have been received.
-TEST_F(HistoryCollectionViewControllerTest, IsEmpty) {
+TEST_F(LegacyHistoryCollectionViewControllerTest, IsEmpty) {
   QueryHistory({{GURL(kTestUrl1), Time::Now()}});
   EXPECT_FALSE([history_collection_view_controller_ isEmpty]);
 }
@@ -134,7 +135,7 @@
 // HISTORY_DELETE_DIRECTIVES is enabled, and sync_returned is false.
 // This ensures that when HISTORY_DELETE_DIRECTIVES is disabled,
 // only local device history items are shown.
-TEST_F(HistoryCollectionViewControllerTest, IsNotEmptyWhenSyncEnabled) {
+TEST_F(LegacyHistoryCollectionViewControllerTest, IsNotEmptyWhenSyncEnabled) {
   EXPECT_CALL(*sync_setup_service_mock_, IsSyncEnabled())
       .WillRepeatedly(testing::Return(true));
   EXPECT_CALL(*sync_setup_service_mock_,
@@ -147,7 +148,7 @@
 
 // Tests adding two entries to history from the same day, then deleting the
 // first of them results in one history entry in the collection.
-TEST_F(HistoryCollectionViewControllerTest, DeleteSingleEntry) {
+TEST_F(LegacyHistoryCollectionViewControllerTest, DeleteSingleEntry) {
   QueryHistory(
       {{GURL(kTestUrl1), Time::Now()}, {GURL(kTestUrl2), Time::Now()}});
 
@@ -166,7 +167,7 @@
 
 // Tests that adding two entries to history from the same day then deleting
 // both of them results in only the header section in the collection.
-TEST_F(HistoryCollectionViewControllerTest, DeleteMultipleEntries) {
+TEST_F(LegacyHistoryCollectionViewControllerTest, DeleteMultipleEntries) {
   QueryHistory(
       {{GURL(kTestUrl1), Time::Now()}, {GURL(kTestUrl2), Time::Now()}});
 
@@ -191,7 +192,7 @@
 
 // Tests that adding two entries to history from different days then deleting
 // both of them results in only the header section in the collection.
-TEST_F(HistoryCollectionViewControllerTest, DeleteMultipleSections) {
+TEST_F(LegacyHistoryCollectionViewControllerTest, DeleteMultipleSections) {
   QueryHistory({{GURL(kTestUrl1), Time::Now() - TimeDelta::FromDays(1)},
                 {GURL(kTestUrl2), Time::Now()}});
 
diff --git a/ios/chrome/browser/ui/history/history_entry_inserter.h b/ios/chrome/browser/ui/history/history_entry_inserter.h
index c7d3346..dd5e7e0 100644
--- a/ios/chrome/browser/ui/history/history_entry_inserter.h
+++ b/ios/chrome/browser/ui/history/history_entry_inserter.h
@@ -14,7 +14,7 @@
 }
 @class CollectionViewModel;
 @class HistoryEntryInserter;
-@class HistoryEntryItem;
+@class LegacyHistoryEntryItem;
 
 // Delegate for HistoryEntryInserter. Provides callbacks for completion of item
 // and section insertion and deletion.
@@ -51,7 +51,7 @@
 // History entries in the model are sorted from most to least recent, and
 // grouped into section by date. Duplicate entries are not inserted. Invokes
 // delegate callback when insertion is complete.
-- (void)insertHistoryEntryItem:(HistoryEntryItem*)item;
+- (void)insertHistoryEntryItem:(LegacyHistoryEntryItem*)item;
 
 // Returns section identifier for provided timestamp. Adds section for date if
 // not found, and invokes delegate callback.
diff --git a/ios/chrome/browser/ui/history/history_entry_inserter.mm b/ios/chrome/browser/ui/history/history_entry_inserter.mm
index a788bce..3f4ce8e0 100644
--- a/ios/chrome/browser/ui/history/history_entry_inserter.mm
+++ b/ios/chrome/browser/ui/history/history_entry_inserter.mm
@@ -9,8 +9,8 @@
 #include "base/time/time.h"
 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_text_item.h"
 #import "ios/chrome/browser/ui/collection_view/collection_view_model.h"
-#import "ios/chrome/browser/ui/history/history_entry_item.h"
 #include "ios/chrome/browser/ui/history/history_util.h"
+#import "ios/chrome/browser/ui/history/legacy_history_entry_item.h"
 #include "url/gurl.h"
 
 #if !defined(__has_feature) || !__has_feature(objc_arc)
@@ -45,16 +45,15 @@
   return self;
 }
 
-
-- (void)insertHistoryEntryItem:(HistoryEntryItem*)item {
+- (void)insertHistoryEntryItem:(LegacyHistoryEntryItem*)item {
   NSInteger sectionIdentifier =
       [self sectionIdentifierForTimestamp:item.timestamp];
 
   NSComparator objectComparator = ^(id obj1, id obj2) {
-    HistoryEntryItem* firstObject =
-        base::mac::ObjCCastStrict<HistoryEntryItem>(obj1);
-    HistoryEntryItem* secondObject =
-        base::mac::ObjCCastStrict<HistoryEntryItem>(obj2);
+    LegacyHistoryEntryItem* firstObject =
+        base::mac::ObjCCastStrict<LegacyHistoryEntryItem>(obj1);
+    LegacyHistoryEntryItem* secondObject =
+        base::mac::ObjCCastStrict<LegacyHistoryEntryItem>(obj2);
     if ([firstObject isEqualToHistoryEntryItem:secondObject])
       return NSOrderedSame;
 
diff --git a/ios/chrome/browser/ui/history/history_entry_inserter_unittest.mm b/ios/chrome/browser/ui/history/history_entry_inserter_unittest.mm
index 0df59900..5c03250e 100644
--- a/ios/chrome/browser/ui/history/history_entry_inserter_unittest.mm
+++ b/ios/chrome/browser/ui/history/history_entry_inserter_unittest.mm
@@ -9,7 +9,7 @@
 #include "base/time/time.h"
 #include "components/history/core/browser/browsing_history_service.h"
 #import "ios/chrome/browser/ui/collection_view/collection_view_model.h"
-#import "ios/chrome/browser/ui/history/history_entry_item.h"
+#import "ios/chrome/browser/ui/history/legacy_history_entry_item.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "testing/gtest_mac.h"
 #include "testing/platform_test.h"
@@ -22,16 +22,16 @@
 
 using history::BrowsingHistoryService;
 
-HistoryEntryItem* TestHistoryEntryItem(base::Time timestamp,
-                                       const std::string& name) {
+LegacyHistoryEntryItem* TestHistoryEntryItem(base::Time timestamp,
+                                             const std::string& name) {
   BrowsingHistoryService::HistoryEntry entry(
       BrowsingHistoryService::HistoryEntry::LOCAL_ENTRY,
       GURL(("http://" + name).c_str()), base::UTF8ToUTF16(name.c_str()),
       timestamp, std::string(), false, base::string16(), false);
-  return [[HistoryEntryItem alloc] initWithType:kItemTypeEnumZero
-                                   historyEntry:entry
-                                   browserState:nil
-                                       delegate:nil];
+  return [[LegacyHistoryEntryItem alloc] initWithType:kItemTypeEnumZero
+                                         historyEntry:entry
+                                         browserState:nil
+                                             delegate:nil];
 }
 
 // Test fixture for HistoryEntryInserter.
@@ -58,9 +58,10 @@
   base::Time today =
       base::Time::Now().LocalMidnight() + base::TimeDelta::FromHours(1);
   base::TimeDelta minute = base::TimeDelta::FromMinutes(1);
-  HistoryEntryItem* entry1 = TestHistoryEntryItem(today, "entry1");
-  HistoryEntryItem* entry2 = TestHistoryEntryItem(today - minute, "entry2");
-  HistoryEntryItem* entry3 =
+  LegacyHistoryEntryItem* entry1 = TestHistoryEntryItem(today, "entry1");
+  LegacyHistoryEntryItem* entry2 =
+      TestHistoryEntryItem(today - minute, "entry2");
+  LegacyHistoryEntryItem* entry3 =
       TestHistoryEntryItem(today - 2 * (minute), "entry3");
 
   OCMockObject* mock_delegate = (OCMockObject*)mock_delegate_;
@@ -88,8 +89,8 @@
   EXPECT_EQ(0, [model_ numberOfItemsInSection:0]);
   EXPECT_EQ(3, [model_ numberOfItemsInSection:1]);
 
-  NSArray<HistoryEntryItem*>* section_1 =
-      base::mac::ObjCCastStrict<NSArray<HistoryEntryItem*>>(
+  NSArray<LegacyHistoryEntryItem*>* section_1 =
+      base::mac::ObjCCastStrict<NSArray<LegacyHistoryEntryItem*>>(
           [model_ itemsInSectionWithIdentifier:kSectionIdentifierEnumZero + 1]);
   EXPECT_NSEQ(@"entry1", section_1[0].text);
   EXPECT_NSEQ(@"entry2", section_1[1].text);
@@ -104,12 +105,12 @@
       base::Time::Now().LocalMidnight() + base::TimeDelta::FromHours(12);
   base::TimeDelta day = base::TimeDelta::FromDays(1);
   base::TimeDelta minute = base::TimeDelta::FromMinutes(1);
-  HistoryEntryItem* day1 = TestHistoryEntryItem(today, "day1");
-  HistoryEntryItem* day2_entry1 =
+  LegacyHistoryEntryItem* day1 = TestHistoryEntryItem(today, "day1");
+  LegacyHistoryEntryItem* day2_entry1 =
       TestHistoryEntryItem(today - day, "day2_entry1");
-  HistoryEntryItem* day2_entry2 =
+  LegacyHistoryEntryItem* day2_entry2 =
       TestHistoryEntryItem(today - day - minute, "day2_entry2");
-  HistoryEntryItem* day3 = TestHistoryEntryItem(today - 2 * day, "day3");
+  LegacyHistoryEntryItem* day3 = TestHistoryEntryItem(today - 2 * day, "day3");
 
   OCMockObject* mock_delegate = (OCMockObject*)mock_delegate_;
 
@@ -123,8 +124,8 @@
   EXPECT_EQ(2, [model_ numberOfSections]);
   EXPECT_EQ(0, [model_ numberOfItemsInSection:0]);
   EXPECT_EQ(1, [model_ numberOfItemsInSection:1]);
-  NSArray<HistoryEntryItem*>* section_1 =
-      base::mac::ObjCCastStrict<NSArray<HistoryEntryItem*>>(
+  NSArray<LegacyHistoryEntryItem*>* section_1 =
+      base::mac::ObjCCastStrict<NSArray<LegacyHistoryEntryItem*>>(
           [model_ itemsInSectionWithIdentifier:day2_identifier]);
   EXPECT_NSEQ(@"day2_entry2", section_1[0].text);
   EXPECT_OCMOCK_VERIFY(mock_delegate);
@@ -140,11 +141,11 @@
   EXPECT_EQ(0, [model_ numberOfItemsInSection:0]);
   EXPECT_EQ(1, [model_ numberOfItemsInSection:1]);
   EXPECT_EQ(1, [model_ numberOfItemsInSection:2]);
-  section_1 = base::mac::ObjCCastStrict<NSArray<HistoryEntryItem*>>(
+  section_1 = base::mac::ObjCCastStrict<NSArray<LegacyHistoryEntryItem*>>(
       [model_ itemsInSectionWithIdentifier:day1_identifier]);
   EXPECT_NSEQ(@"day1", section_1[0].text);
-  NSArray<HistoryEntryItem*>* section_2 =
-      base::mac::ObjCCastStrict<NSArray<HistoryEntryItem*>>(
+  NSArray<LegacyHistoryEntryItem*>* section_2 =
+      base::mac::ObjCCastStrict<NSArray<LegacyHistoryEntryItem*>>(
           [model_ itemsInSectionWithIdentifier:day2_identifier]);
   EXPECT_NSEQ(@"day2_entry2", section_2[0].text);
   EXPECT_OCMOCK_VERIFY(mock_delegate);
@@ -161,14 +162,14 @@
   EXPECT_EQ(1, [model_ numberOfItemsInSection:1]);
   EXPECT_EQ(1, [model_ numberOfItemsInSection:2]);
   EXPECT_EQ(1, [model_ numberOfItemsInSection:3]);
-  section_1 = base::mac::ObjCCastStrict<NSArray<HistoryEntryItem*>>(
+  section_1 = base::mac::ObjCCastStrict<NSArray<LegacyHistoryEntryItem*>>(
       [model_ itemsInSectionWithIdentifier:day1_identifier]);
   EXPECT_NSEQ(@"day1", section_1[0].text);
-  section_2 = base::mac::ObjCCastStrict<NSArray<HistoryEntryItem*>>(
+  section_2 = base::mac::ObjCCastStrict<NSArray<LegacyHistoryEntryItem*>>(
       [model_ itemsInSectionWithIdentifier:day2_identifier]);
   EXPECT_NSEQ(@"day2_entry2", section_2[0].text);
-  NSArray<HistoryEntryItem*>* section_3 =
-      base::mac::ObjCCastStrict<NSArray<HistoryEntryItem*>>(
+  NSArray<LegacyHistoryEntryItem*>* section_3 =
+      base::mac::ObjCCastStrict<NSArray<LegacyHistoryEntryItem*>>(
           [model_ itemsInSectionWithIdentifier:day3_identifier]);
   EXPECT_NSEQ(@"day3", section_3[0].text);
   EXPECT_OCMOCK_VERIFY(mock_delegate);
@@ -182,14 +183,14 @@
   EXPECT_EQ(1, [model_ numberOfItemsInSection:1]);
   EXPECT_EQ(2, [model_ numberOfItemsInSection:2]);
   EXPECT_EQ(1, [model_ numberOfItemsInSection:3]);
-  section_1 = base::mac::ObjCCastStrict<NSArray<HistoryEntryItem*>>(
+  section_1 = base::mac::ObjCCastStrict<NSArray<LegacyHistoryEntryItem*>>(
       [model_ itemsInSectionWithIdentifier:day1_identifier]);
   EXPECT_NSEQ(@"day1", section_1[0].text);
-  section_2 = base::mac::ObjCCastStrict<NSArray<HistoryEntryItem*>>(
+  section_2 = base::mac::ObjCCastStrict<NSArray<LegacyHistoryEntryItem*>>(
       [model_ itemsInSectionWithIdentifier:day2_identifier]);
   EXPECT_NSEQ(@"day2_entry1", section_2[0].text);
   EXPECT_NSEQ(@"day2_entry2", section_2[1].text);
-  section_3 = base::mac::ObjCCastStrict<NSArray<HistoryEntryItem*>>(
+  section_3 = base::mac::ObjCCastStrict<NSArray<LegacyHistoryEntryItem*>>(
       [model_ itemsInSectionWithIdentifier:day3_identifier]);
   EXPECT_NSEQ(@"day3", section_3[0].text);
   EXPECT_OCMOCK_VERIFY(mock_delegate);
@@ -198,8 +199,8 @@
 // Tests that items are only ever added once.
 TEST_F(HistoryEntryInserterTest, AddDuplicateItems) {
   base::Time today = base::Time::Now();
-  HistoryEntryItem* entry1 = TestHistoryEntryItem(today, "entry");
-  HistoryEntryItem* entry2 = TestHistoryEntryItem(today, "entry");
+  LegacyHistoryEntryItem* entry1 = TestHistoryEntryItem(today, "entry");
+  LegacyHistoryEntryItem* entry2 = TestHistoryEntryItem(today, "entry");
 
   OCMockObject* mock_delegate = (OCMockObject*)mock_delegate_;
   [[mock_delegate expect] historyEntryInserter:inserter_
@@ -214,8 +215,8 @@
   EXPECT_EQ(0, [model_ numberOfItemsInSection:0]);
   EXPECT_EQ(1, [model_ numberOfItemsInSection:1]);
 
-  NSArray<HistoryEntryItem*>* section_1 =
-      base::mac::ObjCCastStrict<NSArray<HistoryEntryItem*>>(
+  NSArray<LegacyHistoryEntryItem*>* section_1 =
+      base::mac::ObjCCastStrict<NSArray<LegacyHistoryEntryItem*>>(
           [model_ itemsInSectionWithIdentifier:kSectionIdentifierEnumZero + 1]);
   EXPECT_NSEQ(@"entry", section_1[0].text);
   EXPECT_OCMOCK_VERIFY(mock_delegate);
@@ -226,8 +227,8 @@
   base::Time today =
       base::Time::Now().LocalMidnight() + base::TimeDelta::FromHours(1);
   base::TimeDelta day = base::TimeDelta::FromDays(1);
-  HistoryEntryItem* day1 = TestHistoryEntryItem(today, "day1");
-  HistoryEntryItem* day2 = TestHistoryEntryItem(today - day, "day2");
+  LegacyHistoryEntryItem* day1 = TestHistoryEntryItem(today, "day1");
+  LegacyHistoryEntryItem* day2 = TestHistoryEntryItem(today - day, "day2");
 
   OCMockObject* mock_delegate = (OCMockObject*)mock_delegate_;
 
diff --git a/ios/chrome/browser/ui/history/history_panel_view_controller.mm b/ios/chrome/browser/ui/history/history_panel_view_controller.mm
index 2cbc8ec9..5bfe048 100644
--- a/ios/chrome/browser/ui/history/history_panel_view_controller.mm
+++ b/ios/chrome/browser/ui/history/history_panel_view_controller.mm
@@ -11,8 +11,8 @@
 #include "components/strings/grit/components_strings.h"
 #import "ios/chrome/browser/ui/commands/application_commands.h"
 #import "ios/chrome/browser/ui/history/clear_browsing_bar.h"
-#import "ios/chrome/browser/ui/history/history_collection_view_controller.h"
 #import "ios/chrome/browser/ui/history/history_search_view_controller.h"
+#import "ios/chrome/browser/ui/history/legacy_history_collection_view_controller.h"
 #import "ios/chrome/browser/ui/icons/chrome_icon.h"
 #import "ios/chrome/browser/ui/keyboard/UIKeyCommand+Chrome.h"
 #import "ios/chrome/browser/ui/material_components/utils.h"
@@ -35,10 +35,10 @@
 }  // namespace
 
 @interface HistoryPanelViewController ()<
-    HistoryCollectionViewControllerDelegate,
+    LegacyHistoryCollectionViewControllerDelegate,
     HistorySearchViewControllerDelegate> {
   // Controller for collection view that displays history entries.
-  HistoryCollectionViewController* _historyCollectionController;
+  LegacyHistoryCollectionViewController* _historyCollectionController;
   // Bar at the bottom of the history panel the displays options for entry
   // deletion, including "Clear Browsing Data..." which takes the user to
   // Privacy settings, or "Edit" for entering a mode for deleting individual
@@ -95,9 +95,10 @@
   self = [super initWithNibName:nil bundle:nil];
   if (self) {
     _historyCollectionController =
-        [[HistoryCollectionViewController alloc] initWithLoader:loader
-                                                   browserState:browserState
-                                                       delegate:self];
+        [[LegacyHistoryCollectionViewController alloc]
+            initWithLoader:loader
+              browserState:browserState
+                  delegate:self];
     _dispatcher = dispatcher;
 
     // Configure modal presentation.
@@ -266,13 +267,13 @@
 #pragma mark - HistoryCollectionViewControllerDelegate
 
 - (void)historyCollectionViewController:
-            (HistoryCollectionViewController*)collectionViewcontroller
+            (LegacyHistoryCollectionViewController*)collectionViewcontroller
               shouldCloseWithCompletion:(ProceduralBlock)completionHandler {
   [self closeHistoryWithCompletion:completionHandler];
 }
 
 - (void)historyCollectionViewController:
-            (HistoryCollectionViewController*)controller
+            (LegacyHistoryCollectionViewController*)controller
                       didScrollToOffset:(CGPoint)offset {
   // Display a shadow on the header when the collection is scrolled.
   MDCFlexibleHeaderView* headerView = _appBar.headerViewController.headerView;
@@ -281,7 +282,7 @@
 }
 
 - (void)historyCollectionViewControllerDidChangeEntries:
-    (HistoryCollectionViewController*)controller {
+    (LegacyHistoryCollectionViewController*)controller {
   // Reconfigure the navigation and clear browsing bars to reflect currently
   // displayed entries.
   [self configureNavigationBar];
@@ -289,7 +290,7 @@
 }
 
 - (void)historyCollectionViewControllerDidChangeEntrySelection:
-    (HistoryCollectionViewController*)controller {
+    (LegacyHistoryCollectionViewController*)controller {
   // Reconfigure the clear browsing bar to reflect current availability of
   // entries for deletion.
   [self configureClearBrowsingBar];
diff --git a/ios/chrome/browser/ui/history/history_ui_egtest.mm b/ios/chrome/browser/ui/history/history_ui_egtest.mm
index 5d8a969..56093d1e 100644
--- a/ios/chrome/browser/ui/history/history_ui_egtest.mm
+++ b/ios/chrome/browser/ui/history/history_ui_egtest.mm
@@ -16,7 +16,7 @@
 #include "ios/chrome/browser/chrome_url_constants.h"
 #import "ios/chrome/browser/ui/authentication/signin_earlgrey_utils.h"
 #import "ios/chrome/browser/ui/authentication/signin_promo_view.h"
-#import "ios/chrome/browser/ui/history/history_entry_item.h"
+#import "ios/chrome/browser/ui/history/legacy_history_entry_item.h"
 #import "ios/chrome/browser/ui/settings/settings_collection_view_controller.h"
 #include "ios/chrome/browser/ui/tools_menu/public/tools_menu_constants.h"
 #import "ios/chrome/browser/ui/tools_menu/tools_popup_controller.h"
@@ -62,7 +62,7 @@
   NSString* url_spec_text = base::SysUTF8ToNSString(url.spec());
   NSString* title_text = base::SysUTF8ToNSString(title);
 
-  MatchesBlock matches = ^BOOL(HistoryEntryCell* cell) {
+  MatchesBlock matches = ^BOOL(LegacyHistoryEntryCell* cell) {
     return [cell.textLabel.text isEqual:title_text] &&
            [cell.detailTextLabel.text isEqual:url_spec_text];
   };
@@ -75,7 +75,7 @@
   };
 
   return grey_allOf(
-      grey_kindOfClass([HistoryEntryCell class]),
+      grey_kindOfClass([LegacyHistoryEntryCell class]),
       [[GREYElementMatcherBlock alloc] initWithMatchesBlock:matches
                                            descriptionBlock:describe],
       grey_sufficientlyVisible(), nil);
@@ -439,7 +439,7 @@
       assertWithMatcher:grey_notNil()];
 
   id<GREYMatcher> historyEntryMatcher =
-      grey_allOf(grey_kindOfClass([HistoryEntryCell class]),
+      grey_allOf(grey_kindOfClass([LegacyHistoryEntryCell class]),
                  grey_sufficientlyVisible(), nil);
   [[EarlGrey selectElementWithMatcher:historyEntryMatcher]
       assertWithMatcher:grey_nil()];
diff --git a/ios/chrome/browser/ui/history/history_collection_view_controller.h b/ios/chrome/browser/ui/history/legacy_history_collection_view_controller.h
similarity index 71%
rename from ios/chrome/browser/ui/history/history_collection_view_controller.h
rename to ios/chrome/browser/ui/history/legacy_history_collection_view_controller.h
index 424a477..01da280 100644
--- a/ios/chrome/browser/ui/history/history_collection_view_controller.h
+++ b/ios/chrome/browser/ui/history/legacy_history_collection_view_controller.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 IOS_CHROME_BROWSER_UI_HISTORY_HISTORY_COLLECTION_VIEW_CONTROLLER_H_
-#define IOS_CHROME_BROWSER_UI_HISTORY_HISTORY_COLLECTION_VIEW_CONTROLLER_H_
+#ifndef IOS_CHROME_BROWSER_UI_HISTORY_LEGACY_HISTORY_COLLECTION_VIEW_CONTROLLER_H_
+#define IOS_CHROME_BROWSER_UI_HISTORY_LEGACY_HISTORY_COLLECTION_VIEW_CONTROLLER_H_
 
 #import "ios/chrome/browser/ui/collection_view/collection_view_controller.h"
 
@@ -13,29 +13,29 @@
 class ChromeBrowserState;
 }
 
-@class HistoryCollectionViewController;
+@class LegacyHistoryCollectionViewController;
 @protocol UrlLoader;
 
 // Delegate for the history collection view controller.
-@protocol HistoryCollectionViewControllerDelegate<NSObject>
+@protocol LegacyHistoryCollectionViewControllerDelegate<NSObject>
 // Notifies the delegate that history should be dismissed.
 - (void)historyCollectionViewController:
-            (HistoryCollectionViewController*)controller
+            (LegacyHistoryCollectionViewController*)controller
               shouldCloseWithCompletion:(ProceduralBlock)completionHandler;
 // Notifies the delegate that the collection view has scrolled to |offset|.
 - (void)historyCollectionViewController:
-            (HistoryCollectionViewController*)controller
+            (LegacyHistoryCollectionViewController*)controller
                       didScrollToOffset:(CGPoint)offset;
 // Notifies the delegate that history entries have been loaded or changed.
 - (void)historyCollectionViewControllerDidChangeEntries:
-    (HistoryCollectionViewController*)controller;
+    (LegacyHistoryCollectionViewController*)controller;
 // Notifies the delegate that history entries have been selected or deselected.
 - (void)historyCollectionViewControllerDidChangeEntrySelection:
-    (HistoryCollectionViewController*)controller;
+    (LegacyHistoryCollectionViewController*)controller;
 @end
 
 // View controller for displaying a collection of history entries.
-@interface HistoryCollectionViewController : CollectionViewController
+@interface LegacyHistoryCollectionViewController : CollectionViewController
 // YES if the collection view is in editing mode. Setting |editing| turns
 // editing mode on or off accordingly.
 @property(nonatomic, assign, getter=isEditing) BOOL editing;
@@ -46,10 +46,10 @@
 // YES if the collection view has selected entries while in editing mode.
 @property(nonatomic, assign, readonly) BOOL hasSelectedEntries;
 
-- (instancetype)initWithLoader:(id<UrlLoader>)loader
-                  browserState:(ios::ChromeBrowserState*)browserState
-                      delegate:
-                          (id<HistoryCollectionViewControllerDelegate>)delegate
+- (instancetype)
+initWithLoader:(id<UrlLoader>)loader
+  browserState:(ios::ChromeBrowserState*)browserState
+      delegate:(id<LegacyHistoryCollectionViewControllerDelegate>)delegate
     NS_DESIGNATED_INITIALIZER;
 - (instancetype)initWithLayout:(UICollectionViewLayout*)layout
                          style:(CollectionViewControllerStyle)style
@@ -65,4 +65,4 @@
 
 @end
 
-#endif  // IOS_CHROME_BROWSER_UI_HISTORY_HISTORY_COLLECTION_VIEW_CONTROLLER_H_
+#endif  // IOS_CHROME_BROWSER_UI_HISTORY_LEGACY_HISTORY_COLLECTION_VIEW_CONTROLLER_H_
diff --git a/ios/chrome/browser/ui/history/history_collection_view_controller.mm b/ios/chrome/browser/ui/history/legacy_history_collection_view_controller.mm
similarity index 92%
rename from ios/chrome/browser/ui/history/history_collection_view_controller.mm
rename to ios/chrome/browser/ui/history/legacy_history_collection_view_controller.mm
index 3780191..772d7c2 100644
--- a/ios/chrome/browser/ui/history/history_collection_view_controller.mm
+++ b/ios/chrome/browser/ui/history/legacy_history_collection_view_controller.mm
@@ -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 "ios/chrome/browser/ui/history/history_collection_view_controller.h"
+#include "ios/chrome/browser/ui/history/legacy_history_collection_view_controller.h"
 
 #import <MobileCoreServices/MobileCoreServices.h>
 
@@ -37,11 +37,11 @@
 #import "ios/chrome/browser/ui/collection_view/collection_view_model.h"
 #import "ios/chrome/browser/ui/context_menu/context_menu_coordinator.h"
 #import "ios/chrome/browser/ui/history/history_base_feature.h"
-#include "ios/chrome/browser/ui/history/history_entries_status_item.h"
 #include "ios/chrome/browser/ui/history/history_entry_inserter.h"
-#import "ios/chrome/browser/ui/history/history_entry_item.h"
 #include "ios/chrome/browser/ui/history/history_util.h"
 #include "ios/chrome/browser/ui/history/ios_browsing_history_driver.h"
+#include "ios/chrome/browser/ui/history/legacy_history_entries_status_item.h"
+#import "ios/chrome/browser/ui/history/legacy_history_entry_item.h"
 #import "ios/chrome/browser/ui/url_loader.h"
 #import "ios/chrome/browser/ui/util/pasteboard_util.h"
 #import "ios/chrome/browser/ui/util/top_view_controller.h"
@@ -75,10 +75,11 @@
 const CGFloat kSeparatorInset = 10;
 }
 
-@interface HistoryCollectionViewController ()<HistoryEntriesStatusItemDelegate,
-                                              HistoryEntryInserterDelegate,
-                                              HistoryEntryItemDelegate,
-                                              BrowsingHistoryDriverDelegate> {
+@interface LegacyHistoryCollectionViewController ()<
+    HistoryEntriesStatusItemDelegate,
+    HistoryEntryInserterDelegate,
+    HistoryEntryItemDelegate,
+    BrowsingHistoryDriverDelegate> {
   // Abstraction to communicate with HistoryService and WebHistoryService.
   std::unique_ptr<BrowsingHistoryService> _browsingHistoryService;
   // Provides dependencies and funnels callbacks from BrowsingHistoryService.
@@ -86,7 +87,7 @@
   // The main browser state. Not owned by HistoryCollectionViewController.
   ios::ChromeBrowserState* _browserState;
   // Backing ivar for delegate property.
-  __weak id<HistoryCollectionViewControllerDelegate> _delegate;
+  __weak id<LegacyHistoryCollectionViewControllerDelegate> _delegate;
   // Backing ivar for URLLoader property.
   __weak id<UrlLoader> _URLLoader;
   // Closure to request next page of history.
@@ -96,8 +97,9 @@
 // Object to manage insertion of history entries into the collection view model.
 @property(nonatomic, strong) HistoryEntryInserter* entryInserter;
 // Delegate for the history collection view.
-@property(nonatomic, weak, readonly) id<HistoryCollectionViewControllerDelegate>
-    delegate;
+@property(nonatomic, weak, readonly)
+    id<LegacyHistoryCollectionViewControllerDelegate>
+        delegate;
 // UrlLoader for navigating to history entries.
 @property(nonatomic, weak, readonly) id<UrlLoader> URLLoader;
 // The current query for visible history entries.
@@ -150,7 +152,7 @@
 - (void)openURLInNewIncognitoTab:(const GURL&)URL;
 @end
 
-@implementation HistoryCollectionViewController
+@implementation LegacyHistoryCollectionViewController
 
 @synthesize searching = _searching;
 @synthesize entryInserter = _entryInserter;
@@ -163,10 +165,10 @@
 @synthesize finishedLoading = _finishedLoading;
 @synthesize filterQueryResult = _filterQueryResult;
 
-- (instancetype)initWithLoader:(id<UrlLoader>)loader
-                  browserState:(ios::ChromeBrowserState*)browserState
-                      delegate:(id<HistoryCollectionViewControllerDelegate>)
-                                   delegate {
+- (instancetype)
+initWithLoader:(id<UrlLoader>)loader
+  browserState:(ios::ChromeBrowserState*)browserState
+      delegate:(id<LegacyHistoryCollectionViewControllerDelegate>)delegate {
   UICollectionViewLayout* layout = [[MDCCollectionViewFlowLayout alloc] init];
   self =
       [super initWithLayout:layout style:CollectionViewControllerStyleDefault];
@@ -260,8 +262,9 @@
   NSArray* deletedIndexPaths = self.collectionView.indexPathsForSelectedItems;
   std::vector<BrowsingHistoryService::HistoryEntry> entries;
   for (NSIndexPath* indexPath in deletedIndexPaths) {
-    HistoryEntryItem* object = base::mac::ObjCCastStrict<HistoryEntryItem>(
-        [self.collectionViewModel itemAtIndexPath:indexPath]);
+    LegacyHistoryEntryItem* object =
+        base::mac::ObjCCastStrict<LegacyHistoryEntryItem>(
+            [self.collectionViewModel itemAtIndexPath:indexPath]);
     BrowsingHistoryService::HistoryEntry entry;
     entry.url = object.URL;
     entry.all_timestamps.insert(object.timestamp.ToInternalValue());
@@ -271,7 +274,7 @@
   [self removeSelectedItemsFromCollection];
 }
 
-- (id<HistoryCollectionViewControllerDelegate>)delegate {
+- (id<LegacyHistoryCollectionViewControllerDelegate>)delegate {
   return _delegate;
 }
 
@@ -289,7 +292,7 @@
 
 #pragma mark - HistoryEntriesStatusItemDelegate
 
-- (void)historyEntriesStatusItem:(HistoryEntriesStatusItem*)item
+- (void)historyEntriesStatusItem:(LegacyHistoryEntriesStatusItem*)item
                didRequestOpenURL:(const GURL&)URL {
   [self openURLInNewTab:URL];
 }
@@ -313,13 +316,13 @@
       deleteSections:[NSIndexSet indexSetWithIndex:sectionIndex]];
 }
 
-#pragma mark - HistoryEntryItemDelegate
+#pragma mark - LegacyHistoryEntryItemDelegate
 
-- (void)historyEntryItemDidRequestOpen:(HistoryEntryItem*)item {
+- (void)historyEntryItemDidRequestOpen:(LegacyHistoryEntryItem*)item {
   [self openURL:item.URL];
 }
 
-- (void)historyEntryItemDidRequestDelete:(HistoryEntryItem*)item {
+- (void)historyEntryItemDidRequestDelete:(LegacyHistoryEntryItem*)item {
   NSInteger sectionIdentifier =
       [self.entryInserter sectionIdentifierForTimestamp:item.timestamp];
   if ([self.collectionViewModel
@@ -335,20 +338,20 @@
   }
 }
 
-- (void)historyEntryItemDidRequestCopy:(HistoryEntryItem*)item {
+- (void)historyEntryItemDidRequestCopy:(LegacyHistoryEntryItem*)item {
   StoreURLInPasteboard(item.URL);
 }
 
-- (void)historyEntryItemDidRequestOpenInNewTab:(HistoryEntryItem*)item {
+- (void)historyEntryItemDidRequestOpenInNewTab:(LegacyHistoryEntryItem*)item {
   [self openURLInNewTab:item.URL];
 }
 
 - (void)historyEntryItemDidRequestOpenInNewIncognitoTab:
-    (HistoryEntryItem*)item {
+    (LegacyHistoryEntryItem*)item {
   [self openURLInNewIncognitoTab:item.URL];
 }
 
-- (void)historyEntryItemShouldUpdateView:(HistoryEntryItem*)item {
+- (void)historyEntryItemShouldUpdateView:(LegacyHistoryEntryItem*)item {
   NSInteger sectionIdentifier =
       [self.entryInserter sectionIdentifierForTimestamp:item.timestamp];
   // If the item is still in the model, reconfigure it.
@@ -405,11 +408,11 @@
       // There should always be at least a header section present.
       DCHECK([[self collectionViewModel] numberOfSections]);
       for (const BrowsingHistoryService::HistoryEntry& entry : results) {
-        HistoryEntryItem* item =
-            [[HistoryEntryItem alloc] initWithType:ItemTypeHistoryEntry
-                                      historyEntry:entry
-                                      browserState:_browserState
-                                          delegate:self];
+        LegacyHistoryEntryItem* item =
+            [[LegacyHistoryEntryItem alloc] initWithType:ItemTypeHistoryEntry
+                                            historyEntry:entry
+                                            browserState:_browserState
+                                                delegate:self];
         [resultsItems addObject:item];
       }
       [self.delegate historyCollectionViewControllerDidChangeEntries:self];
@@ -427,7 +430,7 @@
       // Wait to insert until after the deletions are done, this is needed
       // because performBatchUpdates processes deletion indexes first, and then
       // inserts.
-      for (HistoryEntryItem* item in resultsItems) {
+      for (LegacyHistoryEntryItem* item in resultsItems) {
         [self.entryInserter insertHistoryEntryItem:item];
       }
     }
@@ -442,11 +445,11 @@
       // There should always be at least a header section present.
       DCHECK([[self collectionViewModel] numberOfSections]);
       for (const BrowsingHistoryService::HistoryEntry& entry : results) {
-        HistoryEntryItem* item =
-            [[HistoryEntryItem alloc] initWithType:ItemTypeHistoryEntry
-                                      historyEntry:entry
-                                      browserState:_browserState
-                                          delegate:self];
+        LegacyHistoryEntryItem* item =
+            [[LegacyHistoryEntryItem alloc] initWithType:ItemTypeHistoryEntry
+                                            historyEntry:entry
+                                            browserState:_browserState
+                                                delegate:self];
         [self.entryInserter insertHistoryEntryItem:item];
         if ([self isSearching] || self.filterQueryResult) {
           [filterResults addObject:item];
@@ -557,8 +560,9 @@
   if (self.isEditing) {
     [self.delegate historyCollectionViewControllerDidChangeEntrySelection:self];
   } else {
-    HistoryEntryItem* item = base::mac::ObjCCastStrict<HistoryEntryItem>(
-        [self.collectionViewModel itemAtIndexPath:indexPath]);
+    LegacyHistoryEntryItem* item =
+        base::mac::ObjCCastStrict<LegacyHistoryEntryItem>(
+            [self.collectionViewModel itemAtIndexPath:indexPath]);
     [self openURL:item.URL];
     if (self.isSearching) {
       base::RecordAction(
@@ -665,8 +669,9 @@
                          : l10n_util::GetNSString(IDS_HISTORY_NO_RESULTS);
     entriesStatusItem = noResultsItem;
   } else if (self.shouldShowNoticeAboutOtherFormsOfBrowsingHistory) {
-    HistoryEntriesStatusItem* historyEntriesStatusItem =
-        [[HistoryEntriesStatusItem alloc] initWithType:ItemTypeEntriesStatus];
+    LegacyHistoryEntriesStatusItem* historyEntriesStatusItem =
+        [[LegacyHistoryEntriesStatusItem alloc]
+            initWithType:ItemTypeEntriesStatus];
     historyEntriesStatusItem.delegate = self;
     historyEntriesStatusItem.hidden = self.isSearching;
     entriesStatusItem = historyEntriesStatusItem;
@@ -761,8 +766,8 @@
       NSArray* items = [self.collectionViewModel
           itemsInSectionWithIdentifier:sectionIdentifier];
       for (id item in items) {
-        HistoryEntryItem* historyItem =
-            base::mac::ObjCCastStrict<HistoryEntryItem>(item);
+        LegacyHistoryEntryItem* historyItem =
+            base::mac::ObjCCastStrict<LegacyHistoryEntryItem>(item);
         if (![entries containsObject:historyItem]) {
           NSIndexPath* indexPath =
               [self.collectionViewModel indexPathForItem:historyItem];
@@ -827,10 +832,11 @@
           isEqual:[NSIndexPath indexPathForItem:0 inSection:0]])
     return;
 
-  HistoryEntryItem* entry = base::mac::ObjCCastStrict<HistoryEntryItem>(
-      [self.collectionViewModel itemAtIndexPath:touchedItemIndexPath]);
+  LegacyHistoryEntryItem* entry =
+      base::mac::ObjCCastStrict<LegacyHistoryEntryItem>(
+          [self.collectionViewModel itemAtIndexPath:touchedItemIndexPath]);
 
-  __weak HistoryCollectionViewController* weakSelf = self;
+  __weak LegacyHistoryCollectionViewController* weakSelf = self;
   web::ContextMenuParams params;
   params.location = touchLocation;
   params.view = self.collectionView;
diff --git a/ios/chrome/browser/ui/history/history_entries_status_item.h b/ios/chrome/browser/ui/history/legacy_history_entries_status_item.h
similarity index 71%
rename from ios/chrome/browser/ui/history/history_entries_status_item.h
rename to ios/chrome/browser/ui/history/legacy_history_entries_status_item.h
index c11fdba..cb77f7c 100644
--- a/ios/chrome/browser/ui/history/history_entries_status_item.h
+++ b/ios/chrome/browser/ui/history/legacy_history_entries_status_item.h
@@ -2,27 +2,27 @@
 // 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_HISTORY_HISTORY_ENTRIES_STATUS_ITEM_H_
-#define IOS_CHROME_BROWSER_UI_HISTORY_HISTORY_ENTRIES_STATUS_ITEM_H_
+#ifndef IOS_CHROME_BROWSER_UI_HISTORY_LEGACY_HISTORY_ENTRIES_STATUS_ITEM_H_
+#define IOS_CHROME_BROWSER_UI_HISTORY_LEGACY_HISTORY_ENTRIES_STATUS_ITEM_H_
 
 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_footer_item.h"
 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_item.h"
 
 class GURL;
-@class HistoryEntriesStatusItem;
+@class LegacyHistoryEntriesStatusItem;
 @class LabelLinkController;
 
 // Delegate HistoryEntriesStatusItem. Handles link taps on
 // HistoryEntriesStatusCell.
 @protocol HistoryEntriesStatusItemDelegate<NSObject>
 // Called when a link is pressed on a HistoryEntriesStatusCell.
-- (void)historyEntriesStatusItem:(HistoryEntriesStatusItem*)item
+- (void)historyEntriesStatusItem:(LegacyHistoryEntriesStatusItem*)item
                didRequestOpenURL:(const GURL&)URL;
 
 @end
 
 // Model item for HistoryEntriesStatusCell. Manages links added to the cell.
-@interface HistoryEntriesStatusItem : CollectionViewItem
+@interface LegacyHistoryEntriesStatusItem : CollectionViewItem
 // YES if messages should be hidden.
 @property(nonatomic, assign, getter=isHidden) BOOL hidden;
 // Delegate for HistoryEntriesStatusItem. Is notified when a link is pressed.
@@ -32,12 +32,12 @@
 // Cell for displaying status for history entry. Provides information on whether
 // local or synced entries or displays, and how to access other forms of
 // browsing history, if applicable.
-@interface HistoryEntriesStatusCell : CollectionViewFooterCell
+@interface LegacyHistoryEntriesStatusCell : CollectionViewFooterCell
 @end
 
-@interface HistoryEntriesStatusCell (Testing)
+@interface LegacyHistoryEntriesStatusCell (Testing)
 // Link controller for entries status message.
 @property(nonatomic, retain, readonly) LabelLinkController* labelLinkController;
 @end
 
-#endif  // IOS_CHROME_BROWSER_UI_HISTORY_HISTORY_ENTRIES_STATUS_ITEM_H_
+#endif  // IOS_CHROME_BROWSER_UI_HISTORY_LEGACY_HISTORY_ENTRIES_STATUS_ITEM_H_
diff --git a/ios/chrome/browser/ui/history/history_entries_status_item.mm b/ios/chrome/browser/ui/history/legacy_history_entries_status_item.mm
similarity index 79%
rename from ios/chrome/browser/ui/history/history_entries_status_item.mm
rename to ios/chrome/browser/ui/history/legacy_history_entries_status_item.mm
index 280f3e1..95b0069 100644
--- a/ios/chrome/browser/ui/history/history_entries_status_item.mm
+++ b/ios/chrome/browser/ui/history/legacy_history_entries_status_item.mm
@@ -2,7 +2,7 @@
 // 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/history/history_entries_status_item.h"
+#import "ios/chrome/browser/ui/history/legacy_history_entries_status_item.h"
 
 #include "base/mac/foundation_util.h"
 #include "components/strings/grit/components_strings.h"
@@ -23,11 +23,11 @@
 // Delegate for HistoryEntriesStatusCell.
 @protocol HistoryEntriesStatusCellDelegate<NSObject>
 // Notifies the delegate that |URL| should be opened.
-- (void)historyEntriesStatusCell:(HistoryEntriesStatusCell*)cell
+- (void)historyEntriesStatusCell:(LegacyHistoryEntriesStatusCell*)cell
                didRequestOpenURL:(const GURL&)URL;
 @end
 
-@interface HistoryEntriesStatusCell ()
+@interface LegacyHistoryEntriesStatusCell ()
 // Redeclare as readwrite.
 @property(nonatomic, strong, readwrite)
     LabelLinkController* labelLinkController;
@@ -38,18 +38,18 @@
 - (void)setLinkForBrowsingDataURL:(const GURL&)browsingDataURL;
 @end
 
-@interface HistoryEntriesStatusItem ()<HistoryEntriesStatusCellDelegate>
+@interface LegacyHistoryEntriesStatusItem ()<HistoryEntriesStatusCellDelegate>
 @end
 
-@implementation HistoryEntriesStatusItem
+@implementation LegacyHistoryEntriesStatusItem
 @synthesize delegate = _delegate;
 @synthesize hidden = _hidden;
 
 - (Class)cellClass {
-  return [HistoryEntriesStatusCell class];
+  return [LegacyHistoryEntriesStatusCell class];
 }
 
-- (void)configureCell:(HistoryEntriesStatusCell*)cell {
+- (void)configureCell:(LegacyHistoryEntriesStatusCell*)cell {
   [super configureCell:cell];
   [cell setDelegate:self];
   if (self.hidden) {
@@ -62,12 +62,13 @@
   }
 }
 
-- (void)historyEntriesStatusCell:(HistoryEntriesStatusCell*)cell
+- (void)historyEntriesStatusCell:(LegacyHistoryEntriesStatusCell*)cell
                didRequestOpenURL:(const GURL&)URL {
   [self.delegate historyEntriesStatusItem:self didRequestOpenURL:URL];
 }
 
-- (BOOL)isEqualToHistoryEntriesStatusItem:(HistoryEntriesStatusItem*)object {
+- (BOOL)isEqualToHistoryEntriesStatusItem:
+    (LegacyHistoryEntriesStatusItem*)object {
   return self.hidden == object.hidden;
 }
 
@@ -75,22 +76,23 @@
   if (self == object) {
     return YES;
   }
-  if (![object isKindOfClass:[HistoryEntriesStatusItem class]]) {
+  if (![object isKindOfClass:[LegacyHistoryEntriesStatusItem class]]) {
     return NO;
   }
   return [self
       isEqualToHistoryEntriesStatusItem:base::mac::ObjCCastStrict<
-                                            HistoryEntriesStatusItem>(object)];
+                                            LegacyHistoryEntriesStatusItem>(
+                                            object)];
 }
 
 @end
 
-@implementation HistoryEntriesStatusCell
+@implementation LegacyHistoryEntriesStatusCell
 @synthesize delegate = _delegate;
 @synthesize labelLinkController = _labelLinkController;
 
 - (void)setLinkForBrowsingDataURL:(const GURL&)browsingDataURL {
-  __weak HistoryEntriesStatusCell* weakSelf = self;
+  __weak LegacyHistoryEntriesStatusCell* weakSelf = self;
   self.labelLinkController = [[LabelLinkController alloc]
       initWithLabel:self.textLabel
              action:^(const GURL& URL) {
diff --git a/ios/chrome/browser/ui/history/history_entries_status_item_unittest.mm b/ios/chrome/browser/ui/history/legacy_history_entries_status_item_unittest.mm
similarity index 80%
rename from ios/chrome/browser/ui/history/history_entries_status_item_unittest.mm
rename to ios/chrome/browser/ui/history/legacy_history_entries_status_item_unittest.mm
index 7706e87e..19a26ee2 100644
--- a/ios/chrome/browser/ui/history/history_entries_status_item_unittest.mm
+++ b/ios/chrome/browser/ui/history/legacy_history_entries_status_item_unittest.mm
@@ -2,7 +2,7 @@
 // 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/history/history_entries_status_item.h"
+#import "ios/chrome/browser/ui/history/legacy_history_entries_status_item.h"
 
 #import "base/test/ios/wait_util.h"
 #include "components/strings/grit/components_strings.h"
@@ -36,7 +36,7 @@
 @synthesize delegateCalledForSyncURL = _delegateCalledForSyncURL;
 @synthesize delegateCalledForBrowsingDataURL =
     _delegateCalledForBrowsingDataURL;
-- (void)historyEntriesStatusItem:(HistoryEntriesStatusItem*)item
+- (void)historyEntriesStatusItem:(LegacyHistoryEntriesStatusItem*)item
                didRequestOpenURL:(const GURL&)URL {
   GURL browsingDataURL(kHistoryMyActivityURL);
   if (URL == browsingDataURL) {
@@ -47,25 +47,27 @@
 
 namespace {
 
-using HistoryEntriesStatusItemTest = PlatformTest;
+using LegacyHistoryEntriesStatusItemTest = PlatformTest;
 
 // Tests that configuring a cell for HistoryEntriesStatusItem with hidden
 // property set to YES results in an empty label.
-TEST_F(HistoryEntriesStatusItemTest, TestHidden) {
-  HistoryEntriesStatusItem* item =
-      [[HistoryEntriesStatusItem alloc] initWithType:0];
+TEST_F(LegacyHistoryEntriesStatusItemTest, TestHidden) {
+  LegacyHistoryEntriesStatusItem* item =
+      [[LegacyHistoryEntriesStatusItem alloc] initWithType:0];
   item.hidden = YES;
-  HistoryEntriesStatusCell* cell = [[HistoryEntriesStatusCell alloc] init];
+  LegacyHistoryEntriesStatusCell* cell =
+      [[LegacyHistoryEntriesStatusCell alloc] init];
   [item configureCell:cell];
   EXPECT_FALSE(cell.textLabel.text);
 }
 
 // Tests that tapping on links on a configured cell invokes
 // the HistoryEntriesStatusItemDelegate method.
-TEST_F(HistoryEntriesStatusItemTest, TestDelegate) {
-  HistoryEntriesStatusItem* item =
-      [[HistoryEntriesStatusItem alloc] initWithType:0];
-  HistoryEntriesStatusCell* cell = [[HistoryEntriesStatusCell alloc] init];
+TEST_F(LegacyHistoryEntriesStatusItemTest, TestDelegate) {
+  LegacyHistoryEntriesStatusItem* item =
+      [[LegacyHistoryEntriesStatusItem alloc] initWithType:0];
+  LegacyHistoryEntriesStatusCell* cell =
+      [[LegacyHistoryEntriesStatusCell alloc] init];
   MockEntriesStatusItemDelegate* delegate =
       [[MockEntriesStatusItemDelegate alloc] init];
   item.delegate = delegate;
diff --git a/ios/chrome/browser/ui/history/history_entry_item.h b/ios/chrome/browser/ui/history/legacy_history_entry_item.h
similarity index 77%
rename from ios/chrome/browser/ui/history/history_entry_item.h
rename to ios/chrome/browser/ui/history/legacy_history_entry_item.h
index 367191e..201119b9 100644
--- a/ios/chrome/browser/ui/history/history_entry_item.h
+++ b/ios/chrome/browser/ui/history/legacy_history_entry_item.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 IOS_CHROME_BROWSER_UI_HISTORY_HISTORY_ENTRY_ITEM_H_
-#define IOS_CHROME_BROWSER_UI_HISTORY_HISTORY_ENTRY_ITEM_H_
+#ifndef IOS_CHROME_BROWSER_UI_HISTORY_LEGACY_HISTORY_ENTRY_ITEM_H_
+#define IOS_CHROME_BROWSER_UI_HISTORY_LEGACY_HISTORY_ENTRY_ITEM_H_
 
 #include "components/history/core/browser/browsing_history_service.h"
 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_item.h"
@@ -20,27 +20,28 @@
 @class FaviconView;
 @protocol FaviconViewProviderDelegate;
 class GURL;
-@class HistoryEntryItem;
+@class LegacyHistoryEntryItem;
 
 // Delegate for HistoryEntryItem. Handles actions invoked as custom
 // accessibility actions.
 @protocol HistoryEntryItemDelegate
 // Called when custom accessibility action to delete the entry is invoked.
-- (void)historyEntryItemDidRequestDelete:(HistoryEntryItem*)item;
+- (void)historyEntryItemDidRequestDelete:(LegacyHistoryEntryItem*)item;
 // Called when custom accessibility action to open the entry in a new tab is
 // invoked.
-- (void)historyEntryItemDidRequestOpenInNewTab:(HistoryEntryItem*)item;
+- (void)historyEntryItemDidRequestOpenInNewTab:(LegacyHistoryEntryItem*)item;
 // Called when custom accessibility action to open the entry in a new incognito
 // tab is invoked.
-- (void)historyEntryItemDidRequestOpenInNewIncognitoTab:(HistoryEntryItem*)item;
+- (void)historyEntryItemDidRequestOpenInNewIncognitoTab:
+    (LegacyHistoryEntryItem*)item;
 // Called when custom accessibility action to copy the entry's URL is invoked.
-- (void)historyEntryItemDidRequestCopy:(HistoryEntryItem*)item;
+- (void)historyEntryItemDidRequestCopy:(LegacyHistoryEntryItem*)item;
 // Called when the view associated with the HistoryEntryItem should be updated.
-- (void)historyEntryItemShouldUpdateView:(HistoryEntryItem*)item;
+- (void)historyEntryItemShouldUpdateView:(LegacyHistoryEntryItem*)item;
 @end
 
 // Model object for the cell that displays a history entry.
-@interface HistoryEntryItem : CollectionViewItem
+@interface LegacyHistoryEntryItem : CollectionViewItem
 
 // Text for the content view. Rendered at the top trailing the favicon.
 @property(nonatomic, copy) NSString* text;
@@ -65,12 +66,12 @@
 
 // HistoryEntryItems are equal if they have the same URL and
 // timestamp.
-- (BOOL)isEqualToHistoryEntryItem:(HistoryEntryItem*)item;
+- (BOOL)isEqualToHistoryEntryItem:(LegacyHistoryEntryItem*)item;
 
 @end
 
 // Cell that renders a history entry.
-@interface HistoryEntryCell : MDCCollectionViewCell
+@interface LegacyHistoryEntryCell : MDCCollectionViewCell
 
 // View for displaying the favicon for the history entry.
 @property(nonatomic, strong) UIView* faviconViewContainer;
@@ -83,4 +84,4 @@
 
 @end
 
-#endif  // IOS_CHROME_BROWSER_UI_HISTORY_HISTORY_ENTRY_ITEM_H_
+#endif  // IOS_CHROME_BROWSER_UI_HISTORY_LEGACY_HISTORY_ENTRY_ITEM_H_
diff --git a/ios/chrome/browser/ui/history/history_entry_item.mm b/ios/chrome/browser/ui/history/legacy_history_entry_item.mm
similarity index 94%
rename from ios/chrome/browser/ui/history/history_entry_item.mm
rename to ios/chrome/browser/ui/history/legacy_history_entry_item.mm
index f5d15d8..dd0e5cb3 100644
--- a/ios/chrome/browser/ui/history/history_entry_item.mm
+++ b/ios/chrome/browser/ui/history/legacy_history_entry_item.mm
@@ -2,7 +2,7 @@
 // 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/history/history_entry_item.h"
+#import "ios/chrome/browser/ui/history/legacy_history_entry_item.h"
 
 #include "base/i18n/time_formatting.h"
 #import "base/mac/foundation_util.h"
@@ -57,10 +57,10 @@
 }
 }  // namespace
 
-#pragma mark - HistoryEntryItem
+#pragma mark - LegacyHistoryEntryItem
 
-@interface HistoryEntryItem ()<FaviconViewProviderDelegate> {
-  // Delegate for HistoryEntryItem.
+@interface LegacyHistoryEntryItem ()<FaviconViewProviderDelegate> {
+  // Delegate for LegacyHistoryEntryItem.
   __weak id<HistoryEntryItemDelegate> _delegate;
 }
 
@@ -80,7 +80,7 @@
 - (BOOL)copyURL;
 @end
 
-@implementation HistoryEntryItem
+@implementation LegacyHistoryEntryItem
 
 @synthesize faviconViewProvider = _faviconViewProvider;
 @synthesize text = _text;
@@ -96,7 +96,7 @@
                     delegate:(id<HistoryEntryItemDelegate>)delegate {
   self = [super initWithType:type];
   if (self) {
-    self.cellClass = [HistoryEntryCell class];
+    self.cellClass = [LegacyHistoryEntryCell class];
     favicon::LargeIconService* largeIconService =
         IOSChromeLargeIconServiceFactory::GetForBrowserState(browserState);
     _faviconViewProvider =
@@ -121,7 +121,7 @@
   return nil;
 }
 
-- (BOOL)isEqualToHistoryEntryItem:(HistoryEntryItem*)item {
+- (BOOL)isEqualToHistoryEntryItem:(LegacyHistoryEntryItem*)item {
   return item && item.URL == _URL && item.timestamp == _timestamp;
 }
 
@@ -129,7 +129,7 @@
   if (self == object)
     return YES;
 
-  if (![object isMemberOfClass:[HistoryEntryItem class]])
+  if (![object isMemberOfClass:[LegacyHistoryEntryItem class]])
     return NO;
 
   return [self isEqualToHistoryEntryItem:object];
@@ -189,7 +189,7 @@
   return YES;
 }
 
-- (void)configureCell:(HistoryEntryCell*)cell {
+- (void)configureCell:(LegacyHistoryEntryCell*)cell {
   [super configureCell:cell];
 
   // Set favicon view and constraints.
@@ -216,9 +216,9 @@
 
 @end
 
-#pragma mark - HistoryEntryCell
+#pragma mark - LegacyHistoryEntryCell
 
-@interface HistoryEntryCell ()
+@interface LegacyHistoryEntryCell ()
 
 // Redeclare as readwrite.
 @property(nonatomic, readwrite, strong) UILabel* textLabel;
@@ -226,7 +226,7 @@
 @property(nonatomic, readwrite, strong) UILabel* timeLabel;
 @end
 
-@implementation HistoryEntryCell
+@implementation LegacyHistoryEntryCell
 
 @synthesize faviconViewContainer = _faviconViewContainer;
 @synthesize textLabel = _textLabel;
@@ -236,7 +236,6 @@
 - (id)initWithFrame:(CGRect)frame {
   self = [super initWithFrame:frame];
   if (self) {
-
     _faviconViewContainer = [[UIView alloc] initWithFrame:CGRectZero];
 
     _textLabel = [[UILabel alloc] initWithFrame:CGRectZero];
diff --git a/ios/chrome/browser/ui/history/history_entry_item_unittest.mm b/ios/chrome/browser/ui/history/legacy_history_entry_item_unittest.mm
similarity index 70%
rename from ios/chrome/browser/ui/history/history_entry_item_unittest.mm
rename to ios/chrome/browser/ui/history/legacy_history_entry_item_unittest.mm
index 1d2c052..d1d6542 100644
--- a/ios/chrome/browser/ui/history/history_entry_item_unittest.mm
+++ b/ios/chrome/browser/ui/history/legacy_history_entry_item_unittest.mm
@@ -2,7 +2,7 @@
 // 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/history/history_entry_item.h"
+#import "ios/chrome/browser/ui/history/legacy_history_entry_item.h"
 
 #include "base/i18n/time_formatting.h"
 #include "base/strings/sys_string_conversions.h"
@@ -25,31 +25,32 @@
 const char kTestTitle[] = "Test";
 }
 
-HistoryEntryItem* GetHistoryEntryItem(const GURL& url,
-                                      const char title[],
-                                      base::Time timestamp) {
+LegacyHistoryEntryItem* GetHistoryEntryItem(const GURL& url,
+                                            const char title[],
+                                            base::Time timestamp) {
   BrowsingHistoryService::HistoryEntry entry(
       BrowsingHistoryService::HistoryEntry::LOCAL_ENTRY, GURL(url),
       base::UTF8ToUTF16(title), timestamp, "", false, base::string16(), false);
-  HistoryEntryItem* item = [[HistoryEntryItem alloc] initWithType:0
-                                                     historyEntry:entry
-                                                     browserState:nil
-                                                         delegate:nil];
+  LegacyHistoryEntryItem* item =
+      [[LegacyHistoryEntryItem alloc] initWithType:0
+                                      historyEntry:entry
+                                      browserState:nil
+                                          delegate:nil];
   return item;
 }
 
-using HistoryEntryItemTest = PlatformTest;
+using LegacyHistoryEntryItemTest = PlatformTest;
 
 // Tests that -[HistoryEntryItem configureCell:] sets the cell's textLabel text
 // to the item title, the detailTextLabel text to the URL, and the timeLabel
 // text to the timestamp.
-TEST_F(HistoryEntryItemTest, ConfigureCell) {
+TEST_F(LegacyHistoryEntryItemTest, ConfigureCell) {
   base::Time timestamp = base::Time::Now();
-  HistoryEntryItem* item =
+  LegacyHistoryEntryItem* item =
       GetHistoryEntryItem(GURL(kTestUrl), kTestTitle, timestamp);
 
-  HistoryEntryCell* cell = [[[item cellClass] alloc] init];
-  EXPECT_TRUE([cell isMemberOfClass:[HistoryEntryCell class]]);
+  LegacyHistoryEntryCell* cell = [[[item cellClass] alloc] init];
+  EXPECT_TRUE([cell isMemberOfClass:[LegacyHistoryEntryCell class]]);
   [item configureCell:cell];
   EXPECT_NSEQ(base::SysUTF8ToNSString(kTestTitle), cell.textLabel.text);
   EXPECT_NSEQ(base::SysUTF8ToNSString(kTestUrl), cell.detailTextLabel.text);
@@ -59,17 +60,17 @@
 
 // Tests that -[HistoryItem isEqualToHistoryItem:] returns YES if the two items
 // have the same URL and timestamp, and NO otherwise.
-TEST_F(HistoryEntryItemTest, IsEqual) {
+TEST_F(LegacyHistoryEntryItemTest, IsEqual) {
   base::Time timestamp = base::Time::Now();
   base::Time timestamp2 = timestamp - base::TimeDelta::FromMinutes(1);
-  HistoryEntryItem* history_entry =
+  LegacyHistoryEntryItem* history_entry =
       GetHistoryEntryItem(GURL(kTestUrl), kTestTitle, timestamp);
-  HistoryEntryItem* same_entry =
+  LegacyHistoryEntryItem* same_entry =
       GetHistoryEntryItem(GURL(kTestUrl), kTestTitle, timestamp);
 
-  HistoryEntryItem* different_time_entry =
+  LegacyHistoryEntryItem* different_time_entry =
       GetHistoryEntryItem(GURL(kTestUrl), kTestTitle, timestamp2);
-  HistoryEntryItem* different_url_entry =
+  LegacyHistoryEntryItem* different_url_entry =
       GetHistoryEntryItem(GURL(kTestUrl2), kTestTitle, timestamp);
 
   EXPECT_TRUE([history_entry isEqualToHistoryEntryItem:same_entry]);
diff --git a/ios/chrome/browser/ui/ntp/recent_tabs/BUILD.gn b/ios/chrome/browser/ui/ntp/recent_tabs/BUILD.gn
index 5029c6e2..958a144d 100644
--- a/ios/chrome/browser/ui/ntp/recent_tabs/BUILD.gn
+++ b/ios/chrome/browser/ui/ntp/recent_tabs/BUILD.gn
@@ -19,8 +19,6 @@
     "recent_tabs_handset_view_controller.h",
     "recent_tabs_handset_view_controller.mm",
     "recent_tabs_table_consumer.h",
-    "recent_tabs_table_view_controller.h",
-    "recent_tabs_table_view_controller.mm",
     "sessions_sync_user_state.h",
     "synced_sessions.h",
     "synced_sessions.mm",
diff --git a/ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_table_coordinator_unittest.mm b/ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_table_coordinator_unittest.mm
index 83f99b0..18aab6fb 100644
--- a/ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_table_coordinator_unittest.mm
+++ b/ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_table_coordinator_unittest.mm
@@ -80,7 +80,7 @@
       bool(std::vector<const sync_sessions::SyncedSession*>* sessions));
   MOCK_METHOD3(GetForeignTab,
                bool(const std::string& tag,
-                    const SessionID::id_type tab_id,
+                    const SessionID tab_id,
                     const sessions::SessionTab** tab));
   MOCK_METHOD1(DeleteForeignSession, void(const std::string& tag));
   MOCK_METHOD2(GetForeignSession,
diff --git a/ios/chrome/browser/ui/ntp/recent_tabs/synced_sessions.h b/ios/chrome/browser/ui/ntp/recent_tabs/synced_sessions.h
index 3d8a91d..4590ff8 100644
--- a/ios/chrome/browser/ui/ntp/recent_tabs/synced_sessions.h
+++ b/ios/chrome/browser/ui/ntp/recent_tabs/synced_sessions.h
@@ -32,7 +32,7 @@
   // Uniquely identifies the distant session this DistantTab belongs to.
   std::string session_tag;
   // Uniquely identifies this tab in its distant session.
-  SessionID::id_type tab_id;
+  SessionID tab_id;
   // The title of the page shown in this DistantTab.
   base::string16 title;
   // The url shown in this DistantTab.
diff --git a/ios/chrome/browser/ui/ntp/recent_tabs/synced_sessions.mm b/ios/chrome/browser/ui/ntp/recent_tabs/synced_sessions.mm
index bf48708..15ef410c 100644
--- a/ios/chrome/browser/ui/ntp/recent_tabs/synced_sessions.mm
+++ b/ios/chrome/browser/ui/ntp/recent_tabs/synced_sessions.mm
@@ -38,7 +38,7 @@
         std::make_unique<synced_sessions::DistantTab>());
     synced_sessions::DistantTab& distant_tab = *distant_session->tabs.back();
     distant_tab.session_tag = session_tag;
-    distant_tab.tab_id = session_tab.tab_id.id();
+    distant_tab.tab_id = session_tab.tab_id;
     int index = session_tab.current_navigation_index;
     if (index < 0)
       index = 0;
diff --git a/ios/chrome/browser/ui/popup_menu/BUILD.gn b/ios/chrome/browser/ui/popup_menu/BUILD.gn
index 0a28388..d35e5ec 100644
--- a/ios/chrome/browser/ui/popup_menu/BUILD.gn
+++ b/ios/chrome/browser/ui/popup_menu/BUILD.gn
@@ -15,6 +15,7 @@
     "//base",
     "//ios/chrome/app/strings",
     "//ios/chrome/browser/find_in_page",
+    "//ios/chrome/browser/ui",
     "//ios/chrome/browser/ui/commands",
     "//ios/chrome/browser/ui/coordinators:chrome_coordinators",
     "//ios/chrome/browser/ui/popup_menu/cells",
diff --git a/ios/chrome/browser/ui/popup_menu/cells/popup_menu_footer_item.mm b/ios/chrome/browser/ui/popup_menu/cells/popup_menu_footer_item.mm
index 796cd0a..9c8e9c4 100644
--- a/ios/chrome/browser/ui/popup_menu/cells/popup_menu_footer_item.mm
+++ b/ios/chrome/browser/ui/popup_menu/cells/popup_menu_footer_item.mm
@@ -9,7 +9,7 @@
 #endif
 
 namespace {
-const CGFloat kSeparatorHeight = 2;
+const CGFloat kSeparatorHeight = 1;
 const CGFloat kSeparatorMargin = 12;
 }  // namespace
 
@@ -42,7 +42,7 @@
   if (self) {
     UIView* separator = [[UIView alloc] init];
     separator.translatesAutoresizingMaskIntoConstraints = NO;
-    separator.backgroundColor = [UIColor lightGrayColor];
+    separator.backgroundColor = [UIColor colorWithWhite:0 alpha:0.05];
     [self.contentView addSubview:separator];
     [NSLayoutConstraint activateConstraints:@[
       [separator.heightAnchor constraintEqualToConstant:kSeparatorHeight],
diff --git a/ios/chrome/browser/ui/popup_menu/cells/popup_menu_tools_item.mm b/ios/chrome/browser/ui/popup_menu/cells/popup_menu_tools_item.mm
index c29ba94b..e3b6bf3 100644
--- a/ios/chrome/browser/ui/popup_menu/cells/popup_menu_tools_item.mm
+++ b/ios/chrome/browser/ui/popup_menu/cells/popup_menu_tools_item.mm
@@ -12,8 +12,11 @@
 #endif
 
 namespace {
-const CGFloat kImageLength = 30;
-const CGFloat kMargin = 8;
+const CGFloat kImageLength = 28;
+const CGFloat kCellHeight = 44;
+const CGFloat kImageTextMargin = 11;
+const CGFloat kMargin = 15;
+const CGFloat kImageTopMargin = 8;
 }
 
 @implementation PopupMenuToolsItem
@@ -70,30 +73,29 @@
   if (self) {
     _titleLabel = [[UILabel alloc] init];
     _titleLabel.numberOfLines = 0;
+    _titleLabel.font = [UIFont preferredFontForTextStyle:UIFontTextStyleBody];
     _titleLabel.translatesAutoresizingMaskIntoConstraints = NO;
 
     _imageView = [[UIImageView alloc] init];
     _imageView.translatesAutoresizingMaskIntoConstraints = NO;
-    [NSLayoutConstraint activateConstraints:@[
-      [_imageView.widthAnchor constraintEqualToConstant:kImageLength],
-      [_imageView.heightAnchor
-          constraintGreaterThanOrEqualToConstant:kImageLength],
-    ]];
 
     [self.contentView addSubview:_titleLabel];
     [self.contentView addSubview:_imageView];
 
-    AddSameConstraintsToSides(self.contentView, _titleLabel,
-                              LayoutSides::kTop | LayoutSides::kBottom);
-    AddSameConstraintsToSides(
-        self.contentView, _imageView,
-        LayoutSides::kTop | LayoutSides::kBottom | LayoutSides::kLeading);
-    [_imageView.trailingAnchor
-        constraintEqualToAnchor:_titleLabel.leadingAnchor]
-        .active = YES;
-    [_titleLabel.trailingAnchor
-        constraintEqualToAnchor:self.contentView.trailingAnchor
-                       constant:-kMargin]
+    ApplyVisualConstraintsWithMetrics(
+        @[
+          @"H:|-(margin)-[image(imageSize)]-(textImage)-[text]-(margin)-|",
+          @"V:|-(imageTopMargin)-[image(imageSize)]", @"V:|[text]|"
+        ],
+        @{@"image" : _imageView, @"text" : _titleLabel}, @{
+          @"margin" : @(kMargin),
+          @"imageSize" : @(kImageLength),
+          @"textImage" : @(kImageTextMargin),
+          @"imageTopMargin" : @(kImageTopMargin),
+        });
+
+    [self.contentView.heightAnchor
+        constraintGreaterThanOrEqualToConstant:kCellHeight]
         .active = YES;
   }
   return self;
@@ -101,7 +103,7 @@
 
 + (CGSize)sizeForWidth:(CGFloat)width title:(NSString*)title {
   // This is not using a prototype cell and autolayout for performance reasons.
-  CGFloat nonTitleElementWidth = kImageLength + kMargin;
+  CGFloat nonTitleElementWidth = kImageLength + 2 * kMargin + kImageTextMargin;
   // The width should be enough to contain more than the image.
   DCHECK(width > nonTitleElementWidth);
 
@@ -128,8 +130,10 @@
   [super setUserInteractionEnabled:userInteractionEnabled];
   if (userInteractionEnabled) {
     self.titleLabel.textColor = self.tintColor;
+    self.imageView.tintColor = self.tintColor;
   } else {
     self.titleLabel.textColor = [[self class] disabledColor];
+    self.imageView.tintColor = [[self class] disabledColor];
   }
 }
 
diff --git a/ios/chrome/browser/ui/popup_menu/popup_menu_mediator.mm b/ios/chrome/browser/ui/popup_menu/popup_menu_mediator.mm
index 5b213a7..e68a30f 100644
--- a/ios/chrome/browser/ui/popup_menu/popup_menu_mediator.mm
+++ b/ios/chrome/browser/ui/popup_menu/popup_menu_mediator.mm
@@ -9,6 +9,7 @@
 #import "ios/chrome/browser/ui/popup_menu/cells/popup_menu_tools_item.h"
 #import "ios/chrome/browser/ui/popup_menu/popup_menu_table_view_controller.h"
 #include "ios/chrome/browser/ui/tools_menu/public/tools_menu_constants.h"
+#import "ios/chrome/browser/ui/uikit_ui_util.h"
 #import "ios/chrome/browser/web_state_list/web_state_list.h"
 #import "ios/chrome/browser/web_state_list/web_state_list_observer_bridge.h"
 #include "ios/chrome/grit/ios_strings.h"
@@ -35,6 +36,9 @@
   item.title = l10n_util::GetNSString(titleID);
   item.actionIdentifier = action;
   item.accessibilityIdentifier = accessibilityID;
+  // TODO(crbug.com/817795): Use real assets instead.
+  item.image = [ImageWithColor([UIColor colorWithWhite:0 alpha:0.75])
+      imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
   return item;
 }
 }
diff --git a/ios/chrome/browser/ui/popup_menu/popup_menu_presenter.mm b/ios/chrome/browser/ui/popup_menu/popup_menu_presenter.mm
index fc8ff09..e9c3398 100644
--- a/ios/chrome/browser/ui/popup_menu/popup_menu_presenter.mm
+++ b/ios/chrome/browser/ui/popup_menu/popup_menu_presenter.mm
@@ -9,6 +9,7 @@
 #import "ios/chrome/browser/ui/presenters/contained_presenter_delegate.h"
 #import "ios/chrome/browser/ui/util/constraints_ui_util.h"
 #import "ios/chrome/browser/ui/util/named_guide.h"
+#import "ios/chrome/common/material_timing.h"
 
 #if !defined(__has_feature) || !__has_feature(objc_arc)
 #error "This file requires ARC support."
@@ -19,11 +20,17 @@
 const CGFloat kMinWidth = 200;
 const CGFloat kMaxWidth = 300;
 const CGFloat kMaxHeight = 400;
-const CGFloat kMinMargin = 16;
+const CGFloat kMinHorizontalMargin = 5;
+const CGFloat kMinVerticalMargin = 15;
+const CGFloat kDamping = 0.85;
 }  // namespace
 
 @interface PopupMenuPresenter ()
 @property(nonatomic, strong) PopupMenuViewController* popupViewController;
+// Constraints used for the initial positioning of the popup.
+@property(nonatomic, strong) NSArray<NSLayoutConstraint*>* initialConstraints;
+// Constraints used for the positioning of the popup when presented.
+@property(nonatomic, strong) NSArray<NSLayoutConstraint*>* presentedConstraints;
 @end
 
 @implementation PopupMenuPresenter
@@ -33,6 +40,8 @@
 @synthesize delegate = _delegate;
 @synthesize guideName = _guideName;
 @synthesize popupViewController = _popupViewController;
+@synthesize initialConstraints = _initialConstraints;
+@synthesize presentedConstraints = _presentedConstraints;
 @synthesize presentedViewController = _presentedViewController;
 
 #pragma mark - Public
@@ -51,7 +60,7 @@
   // Set the frame of the table view to the maximum width to have the label
   // resizing correctly.
   CGRect frame = self.presentedViewController.view.frame;
-  frame.size.width = kMaxWidth - 2 * kMinMargin;
+  frame.size.width = kMaxWidth;
   self.presentedViewController.view.frame = frame;
   // It is necessary to do a first layout pass so the table view can size
   // itself.
@@ -74,49 +83,94 @@
       [self.presentedViewController.view.widthAnchor
           constraintEqualToConstant:width];
   widthConstraint.priority = UILayoutPriorityDefaultHigh + 1;
-  widthConstraint.active = YES;
 
   NSLayoutConstraint* heightConstraint =
       [self.presentedViewController.view.heightAnchor
           constraintEqualToConstant:fittingSize.height];
   heightConstraint.priority = UILayoutPriorityDefaultHigh + 1;
-  heightConstraint.active = YES;
 
+  UIView* popup = self.popupViewController.contentContainer;
+  [NSLayoutConstraint activateConstraints:@[
+    widthConstraint,
+    heightConstraint,
+    [popup.heightAnchor constraintLessThanOrEqualToConstant:kMaxHeight],
+    [popup.widthAnchor constraintLessThanOrEqualToConstant:kMaxWidth],
+    [popup.widthAnchor constraintGreaterThanOrEqualToConstant:kMinWidth],
+  ]];
   [self.popupViewController addContent:self.presentedViewController];
 
   [self.baseViewController addChildViewController:self.popupViewController];
   [self.baseViewController.view addSubview:self.popupViewController.view];
   self.popupViewController.view.frame = self.baseViewController.view.bounds;
 
-  // TODO(crbug.com/804774): Prepare for animation.
-  self.popupViewController.contentContainer.alpha = 0;
-  [self positionPopupOnNamedGuide];
+  UILayoutGuide* namedGuide =
+      [NamedGuide guideWithName:self.guideName
+                           view:self.baseViewController.view];
+  self.initialConstraints = @[
+    [popup.centerXAnchor constraintEqualToAnchor:namedGuide.centerXAnchor],
+    [popup.centerYAnchor constraintEqualToAnchor:namedGuide.centerYAnchor],
+  ];
+  [self setUpPresentedConstraints];
+
+  // Configure the initial state of the animation.
+  popup.alpha = 0;
+  popup.transform = CGAffineTransformMakeScale(0.1, 0.1);
+  [NSLayoutConstraint activateConstraints:self.initialConstraints];
+  [self.baseViewController.view layoutIfNeeded];
 
   [self.popupViewController
       didMoveToParentViewController:self.baseViewController];
 }
 
 - (void)presentAnimated:(BOOL)animated {
-  // TODO(crbug.com/804774): Add animation based on |guideName|.
-  self.popupViewController.contentContainer.alpha = 1;
+  [NSLayoutConstraint deactivateConstraints:self.initialConstraints];
+  [NSLayoutConstraint activateConstraints:self.presentedConstraints];
+  [self animate:^{
+    self.popupViewController.contentContainer.alpha = 1;
+    [self.baseViewController.view layoutIfNeeded];
+    self.popupViewController.contentContainer.transform =
+        CGAffineTransformIdentity;
+  }
+      withCompletion:nil];
 }
 
 - (void)dismissAnimated:(BOOL)animated {
   [self.popupViewController willMoveToParentViewController:nil];
-  // TODO(crbug.com/804771): Add animation.
-  [self.popupViewController.view removeFromSuperview];
-  [self.popupViewController removeFromParentViewController];
-  self.popupViewController = nil;
-  [self.delegate containedPresenterDidDismiss:self];
+  [NSLayoutConstraint deactivateConstraints:self.presentedConstraints];
+  [NSLayoutConstraint activateConstraints:self.initialConstraints];
+  [self animate:^{
+    self.popupViewController.contentContainer.alpha = 0;
+    [self.baseViewController.view layoutIfNeeded];
+    self.popupViewController.contentContainer.transform =
+        CGAffineTransformMakeScale(0.1, 0.1);
+  }
+      withCompletion:^(BOOL finished) {
+        [self.popupViewController.view removeFromSuperview];
+        [self.popupViewController removeFromParentViewController];
+        self.popupViewController = nil;
+        [self.delegate containedPresenterDidDismiss:self];
+      }];
 }
 
 #pragma mark - Private
 
-// Positions the popup relatively to the |guideName| layout guide. The popup is
-// positioned closest to the layout guide, by default it is presented below the
-// layout guide, aligned on its leading edge. However, it is respecting the safe
-// area bounds.
-- (void)positionPopupOnNamedGuide {
+// Animate the |animations| then execute |completion|.
+- (void)animate:(void (^)(void))animation
+    withCompletion:(void (^)(BOOL finished))completion {
+  [UIView animateWithDuration:ios::material::kDuration1
+                        delay:0
+       usingSpringWithDamping:kDamping
+        initialSpringVelocity:0
+                      options:UIViewAnimationOptionBeginFromCurrentState
+                   animations:animation
+                   completion:completion];
+}
+
+// Sets |presentedConstraints| up, such as they are positioning the popup
+// relatively to the |guideName| layout guide. The popup is positioned closest
+// to the layout guide, by default it is presented below the layout guide,
+// aligned on its leading edge. However, it is respecting the safe area bounds.
+- (void)setUpPresentedConstraints {
   UIView* parentView = self.baseViewController.view;
   UIView* container = self.popupViewController.contentContainer;
 
@@ -126,38 +180,39 @@
       [self.popupViewController.view convertRect:namedGuide.layoutFrame
                                         fromView:namedGuide.owningView];
 
+  NSLayoutConstraint* verticalPositioning = nil;
   if (CGRectGetMaxY(guideFrame) + kMinHeight >
       CGRectGetHeight(parentView.frame)) {
     // Display above.
-    [container.bottomAnchor constraintEqualToAnchor:namedGuide.topAnchor]
-        .active = YES;
+    verticalPositioning =
+        [container.bottomAnchor constraintEqualToAnchor:namedGuide.topAnchor];
   } else {
     // Display below.
-    [container.topAnchor constraintEqualToAnchor:namedGuide.bottomAnchor]
-        .active = YES;
+    verticalPositioning =
+        [container.topAnchor constraintEqualToAnchor:namedGuide.bottomAnchor];
   }
 
+  NSLayoutConstraint* center = [container.centerXAnchor
+      constraintEqualToAnchor:namedGuide.centerXAnchor];
+  center.priority = UILayoutPriorityDefaultHigh;
+
   id<LayoutGuideProvider> safeArea = SafeAreaLayoutGuideForView(parentView);
-  [NSLayoutConstraint activateConstraints:@[
+  self.presentedConstraints = @[
+    center,
+    verticalPositioning,
     [container.leadingAnchor
         constraintGreaterThanOrEqualToAnchor:safeArea.leadingAnchor
-                                    constant:kMinMargin],
+                                    constant:kMinHorizontalMargin],
     [container.trailingAnchor
         constraintLessThanOrEqualToAnchor:safeArea.trailingAnchor
-                                 constant:-kMinMargin],
-    [container.heightAnchor constraintLessThanOrEqualToConstant:kMaxHeight],
-    [container.widthAnchor constraintLessThanOrEqualToConstant:kMaxWidth],
-    [container.widthAnchor constraintGreaterThanOrEqualToConstant:kMinWidth],
+                                 constant:-kMinHorizontalMargin],
     [container.bottomAnchor
         constraintLessThanOrEqualToAnchor:safeArea.bottomAnchor
-                                 constant:-kMinMargin],
-    [container.topAnchor constraintGreaterThanOrEqualToAnchor:safeArea.topAnchor
-                                                     constant:kMinMargin],
-  ]];
-  NSLayoutConstraint* leading = [container.leadingAnchor
-      constraintEqualToAnchor:namedGuide.leadingAnchor];
-  leading.priority = UILayoutPriorityDefaultHigh;
-  leading.active = YES;
+                                 constant:-kMinVerticalMargin],
+    [container.topAnchor
+        constraintGreaterThanOrEqualToAnchor:safeArea.topAnchor
+                                    constant:kMinVerticalMargin],
+  ];
 }
 
 @end
diff --git a/ios/chrome/browser/ui/popup_menu/popup_menu_table_view_controller.mm b/ios/chrome/browser/ui/popup_menu/popup_menu_table_view_controller.mm
index 3bb4b35f..f37a7c5d 100644
--- a/ios/chrome/browser/ui/popup_menu/popup_menu_table_view_controller.mm
+++ b/ios/chrome/browser/ui/popup_menu/popup_menu_table_view_controller.mm
@@ -20,7 +20,9 @@
 using base::UserMetricsAction;
 
 namespace {
-const CGFloat kFooterHeight = 30;
+const CGFloat kFooterHeight = 21;
+const CGFloat kPopupMenuVerticalInsets = 7;
+const CGFloat kScrollIndicatorVerticalInsets = 11;
 }  // namespace
 
 @implementation PopupMenuTableViewController
@@ -34,6 +36,10 @@
 - (void)viewDidLoad {
   self.styler.tableViewBackgroundColor = nil;
   [super viewDidLoad];
+  self.tableView.contentInset = UIEdgeInsetsMake(kPopupMenuVerticalInsets, 0,
+                                                 kPopupMenuVerticalInsets, 0);
+  self.tableView.scrollIndicatorInsets = UIEdgeInsetsMake(
+      kScrollIndicatorVerticalInsets, 0, kScrollIndicatorVerticalInsets, 0);
   self.tableView.rowHeight = UITableViewAutomaticDimension;
   self.tableView.sectionHeaderHeight = 0;
   self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
diff --git a/ios/chrome/browser/ui/popup_menu/popup_menu_view_controller.mm b/ios/chrome/browser/ui/popup_menu/popup_menu_view_controller.mm
index 1c8f6ec..a72395c 100644
--- a/ios/chrome/browser/ui/popup_menu/popup_menu_view_controller.mm
+++ b/ios/chrome/browser/ui/popup_menu/popup_menu_view_controller.mm
@@ -12,12 +12,11 @@
 #endif
 
 namespace {
-const CGFloat kCornerRadius = 15;
+const CGFloat kCornerRadius = 13;
 const CGFloat kShadowRadius = 10;
 const CGFloat kShadowOpacity = 0.3;
-const CGFloat kContentMargin = 8;
 const CGFloat kBlurBackgroundGreyScale = 0.98;
-const CGFloat kBlurBackgroundAlpha = 0.75;
+const CGFloat kBlurBackgroundAlpha = 0.95;
 }  // namespace
 
 @interface PopupMenuViewController ()<UIGestureRecognizerDelegate>
@@ -49,7 +48,7 @@
   [self addChildViewController:content];
   content.view.translatesAutoresizingMaskIntoConstraints = NO;
   [self.contentContainer addSubview:content.view];
-  AddSameConstraints(self.contentContainer.layoutMarginsGuide, content.view);
+  AddSameConstraints(self.contentContainer, content.view);
   [content didMoveToParentViewController:self];
 }
 
@@ -82,8 +81,6 @@
   _contentContainer.layer.shadowRadius = kShadowRadius;
   _contentContainer.layer.shadowOpacity = kShadowOpacity;
   _contentContainer.translatesAutoresizingMaskIntoConstraints = NO;
-  _contentContainer.layoutMargins = UIEdgeInsetsMake(
-      kContentMargin, kContentMargin, kContentMargin, kContentMargin);
   // TODO(crbug.com/821765): Add update the shadow.
   [self.view addSubview:_contentContainer];
 }
diff --git a/ios/chrome/browser/ui/recent_tabs/BUILD.gn b/ios/chrome/browser/ui/recent_tabs/BUILD.gn
index 6c37c21..075a2383 100644
--- a/ios/chrome/browser/ui/recent_tabs/BUILD.gn
+++ b/ios/chrome/browser/ui/recent_tabs/BUILD.gn
@@ -11,6 +11,7 @@
     "recent_tabs_mediator.mm",
   ]
   deps = [
+    ":recent_tabs_ui",
     "//base",
     "//components/browser_sync",
     "//components/sessions",
@@ -28,3 +29,34 @@
   ]
   allow_circular_includes_from = [ "//ios/chrome/browser/ui/ntp/recent_tabs" ]
 }
+
+source_set("recent_tabs_ui") {
+  configs += [ "//build/config/compiler:enable_arc" ]
+  sources = [
+    "recent_tabs_table_view_controller.h",
+    "recent_tabs_table_view_controller.mm",
+  ]
+  deps = [
+    "//base",
+    "//components/browser_sync",
+    "//components/sessions",
+    "//components/strings",
+    "//components/sync",
+    "//ios/chrome/app/strings",
+    "//ios/chrome/browser/browser_state",
+    "//ios/chrome/browser/metrics:metrics_internal",
+    "//ios/chrome/browser/sessions",
+    "//ios/chrome/browser/sync",
+    "//ios/chrome/browser/ui",
+    "//ios/chrome/browser/ui/authentication",
+    "//ios/chrome/browser/ui/authentication:authentication_ui",
+    "//ios/chrome/browser/ui/commands",
+    "//ios/chrome/browser/ui/context_menu",
+    "//ios/chrome/browser/ui/ntp/recent_tabs",
+    "//ios/chrome/browser/ui/settings/sync_utils",
+    "//ios/chrome/browser/ui/signin_interaction/public",
+    "//ios/chrome/browser/ui/table_view",
+    "//ios/chrome/browser/ui/util",
+    "//ui/base",
+  ]
+}
diff --git a/ios/chrome/browser/ui/recent_tabs/recent_tabs_coordinator.mm b/ios/chrome/browser/ui/recent_tabs/recent_tabs_coordinator.mm
index 9972ff1..fcc77fa 100644
--- a/ios/chrome/browser/ui/recent_tabs/recent_tabs_coordinator.mm
+++ b/ios/chrome/browser/ui/recent_tabs/recent_tabs_coordinator.mm
@@ -7,8 +7,8 @@
 #include "base/ios/block_types.h"
 #include "base/mac/foundation_util.h"
 #import "ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_handset_view_controller.h"
-#import "ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_table_view_controller.h"
 #import "ios/chrome/browser/ui/recent_tabs/recent_tabs_mediator.h"
+#import "ios/chrome/browser/ui/recent_tabs/recent_tabs_table_view_controller.h"
 #import "ios/chrome/browser/ui/table_view/table_container_view_controller.h"
 #import "ios/chrome/browser/ui/util/form_sheet_navigation_controller.h"
 #include "ios/chrome/grit/ios_strings.h"
diff --git a/ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_table_view_controller.h b/ios/chrome/browser/ui/recent_tabs/recent_tabs_table_view_controller.h
similarity index 82%
rename from ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_table_view_controller.h
rename to ios/chrome/browser/ui/recent_tabs/recent_tabs_table_view_controller.h
index a6af262..fafceb3 100644
--- a/ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_table_view_controller.h
+++ b/ios/chrome/browser/ui/recent_tabs/recent_tabs_table_view_controller.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 IOS_CHROME_BROWSER_UI_NTP_RECENT_TABS_RECENT_TABS_TABLE_VIEW_CONTROLLER_H_
-#define IOS_CHROME_BROWSER_UI_NTP_RECENT_TABS_RECENT_TABS_TABLE_VIEW_CONTROLLER_H_
+#ifndef IOS_CHROME_BROWSER_UI_RECENT_TABS_RECENT_TABS_TABLE_VIEW_CONTROLLER_H_
+#define IOS_CHROME_BROWSER_UI_RECENT_TABS_RECENT_TABS_TABLE_VIEW_CONTROLLER_H_
 
 #import "ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_table_consumer.h"
 #import "ios/chrome/browser/ui/table_view/chrome_table_view_controller.h"
@@ -36,4 +36,4 @@
 
 @end
 
-#endif  // IOS_CHROME_BROWSER_UI_NTP_RECENT_TABS_RECENT_TABS_TABLE_VIEW_CONTROLLER_H_
+#endif  // IOS_CHROME_BROWSER_UI_RECENT_TABS_RECENT_TABS_TABLE_VIEW_CONTROLLER_H_
diff --git a/ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_table_view_controller.mm b/ios/chrome/browser/ui/recent_tabs/recent_tabs_table_view_controller.mm
similarity index 99%
rename from ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_table_view_controller.mm
rename to ios/chrome/browser/ui/recent_tabs/recent_tabs_table_view_controller.mm
index 2cc8e3e8..cfa72e0 100644
--- a/ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_table_view_controller.mm
+++ b/ios/chrome/browser/ui/recent_tabs/recent_tabs_table_view_controller.mm
@@ -2,7 +2,7 @@
 // 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/ntp/recent_tabs/recent_tabs_table_view_controller.h"
+#import "ios/chrome/browser/ui/recent_tabs/recent_tabs_table_view_controller.h"
 
 #include "base/logging.h"
 #include "base/mac/foundation_util.h"
diff --git a/ios/chrome/browser/ui/tab_grid/tab_grid_adaptor.mm b/ios/chrome/browser/ui/tab_grid/tab_grid_adaptor.mm
index fd0d8bf..2744373 100644
--- a/ios/chrome/browser/ui/tab_grid/tab_grid_adaptor.mm
+++ b/ios/chrome/browser/ui/tab_grid/tab_grid_adaptor.mm
@@ -84,6 +84,7 @@
                                      inBackground:NO];
 
   // Tell the delegate to display the tab.
+  DCHECK(self.delegate);
   [self.delegate tabSwitcher:self shouldFinishWithActiveModel:targetModel];
 
   return tab;
diff --git a/ios/chrome/browser/ui/tab_grid/tab_grid_coordinator.mm b/ios/chrome/browser/ui/tab_grid/tab_grid_coordinator.mm
index 2a4f9d31..6e96065ec 100644
--- a/ios/chrome/browser/ui/tab_grid/tab_grid_coordinator.mm
+++ b/ios/chrome/browser/ui/tab_grid/tab_grid_coordinator.mm
@@ -245,6 +245,7 @@
       command.incognito ? self.incognitoTabModel : self.regularTabModel;
   // TODO(crbug.com/804587) : It is better to use the mediator to insert a
   // webState and show the active tab.
+  DCHECK(self.tabSwitcher);
   [self.tabSwitcher
       dismissWithNewTabAnimationToModel:activeTabModel
                                 withURL:GURL(kChromeUINewTabURL)
diff --git a/ipc/ipc_mojo_bootstrap.cc b/ipc/ipc_mojo_bootstrap.cc
index e1007508..ed863ba 100644
--- a/ipc/ipc_mojo_bootstrap.cc
+++ b/ipc/ipc_mojo_bootstrap.cc
@@ -38,7 +38,7 @@
 #include "mojo/public/cpp/bindings/pipe_control_message_handler.h"
 #include "mojo/public/cpp/bindings/pipe_control_message_handler_delegate.h"
 #include "mojo/public/cpp/bindings/pipe_control_message_proxy.h"
-#include "mojo/public/cpp/bindings/sync_event_watcher.h"
+#include "mojo/public/cpp/bindings/sequence_local_sync_event_watcher.h"
 
 namespace IPC {
 
@@ -463,8 +463,8 @@
     void SignalSyncMessageEvent() {
       controller_->lock_.AssertAcquired();
 
-      if (sync_message_event_)
-        sync_message_event_->Signal();
+      if (sync_watcher_)
+        sync_watcher_->SignalEvent();
     }
 
     MessageWrapper PopSyncMessage(uint32_t id) {
@@ -487,7 +487,7 @@
       DCHECK(task_runner_->RunsTasksInCurrentSequence());
 
       EnsureSyncWatcherExists();
-      sync_watcher_->AllowWokenUpBySyncWatchOnSameThread();
+      sync_watcher_->AllowWokenUpBySyncWatchOnSameSequence();
     }
 
     bool SyncWatch(const bool* should_stop) override {
@@ -519,45 +519,37 @@
       scoped_refptr<Endpoint> keepalive(this);
       scoped_refptr<AssociatedGroupController> controller_keepalive(
           controller_);
+      base::AutoLock locker(controller_->lock_);
+      bool more_to_process = false;
+      if (!sync_messages_.empty()) {
+        MessageWrapper message_wrapper =
+            std::move(sync_messages_.front().second);
+        sync_messages_.pop();
 
-      bool reset_sync_watcher = false;
-      {
-        base::AutoLock locker(controller_->lock_);
-        bool more_to_process = false;
-        if (!sync_messages_.empty()) {
-          MessageWrapper message_wrapper =
-              std::move(sync_messages_.front().second);
-          sync_messages_.pop();
-
-          bool dispatch_succeeded;
-          mojo::InterfaceEndpointClient* client = client_;
-          {
-            base::AutoUnlock unlocker(controller_->lock_);
-            dispatch_succeeded =
-                client->HandleIncomingMessage(&message_wrapper.value());
-          }
-
-          if (!sync_messages_.empty())
-            more_to_process = true;
-
-          if (!dispatch_succeeded)
-            controller_->RaiseError();
+        bool dispatch_succeeded;
+        mojo::InterfaceEndpointClient* client = client_;
+        {
+          base::AutoUnlock unlocker(controller_->lock_);
+          dispatch_succeeded =
+              client->HandleIncomingMessage(&message_wrapper.value());
         }
 
-        if (!more_to_process)
-          sync_message_event_->Reset();
+        if (!sync_messages_.empty())
+          more_to_process = true;
 
-        // If there are no queued sync messages and the peer has closed, there
-        // there won't be incoming sync messages in the future.
-        reset_sync_watcher = !more_to_process && peer_closed_;
+        if (!dispatch_succeeded)
+          controller_->RaiseError();
       }
 
-      if (reset_sync_watcher) {
-        // If a SyncWatch() call (or multiple ones) of this interface endpoint
-        // is on the call stack, resetting the sync watcher will allow it to
-        // exit when the call stack unwinds to that frame.
+      if (!more_to_process)
+        sync_watcher_->ResetEvent();
+
+      // If there are no queued sync messages and the peer has closed, there
+      // there won't be incoming sync messages in the future. If any
+      // SyncWatch() calls are on the stack for this endpoint, resetting the
+      // watcher will allow them to exit as the stack undwinds.
+      if (!more_to_process && peer_closed_)
         sync_watcher_.reset();
-      }
     }
 
     void EnsureSyncWatcherExists() {
@@ -565,21 +557,12 @@
       if (sync_watcher_)
         return;
 
-      {
-        base::AutoLock locker(controller_->lock_);
-        if (!sync_message_event_) {
-          sync_message_event_ = std::make_unique<base::WaitableEvent>(
-              base::WaitableEvent::ResetPolicy::MANUAL,
-              base::WaitableEvent::InitialState::NOT_SIGNALED);
-          if (peer_closed_ || !sync_messages_.empty())
-            SignalSyncMessageEvent();
-        }
-      }
-
-      sync_watcher_ = std::make_unique<mojo::SyncEventWatcher>(
-          sync_message_event_.get(),
-          base::Bind(&Endpoint::OnSyncMessageEventReady,
-                     base::Unretained(this)));
+      base::AutoLock locker(controller_->lock_);
+      sync_watcher_ = std::make_unique<mojo::SequenceLocalSyncEventWatcher>(
+          base::BindRepeating(&Endpoint::OnSyncMessageEventReady,
+                              base::Unretained(this)));
+      if (peer_closed_ || !sync_messages_.empty())
+        SignalSyncMessageEvent();
     }
 
     uint32_t GenerateSyncMessageId() {
@@ -598,8 +581,7 @@
     base::Optional<mojo::DisconnectReason> disconnect_reason_;
     mojo::InterfaceEndpointClient* client_ = nullptr;
     scoped_refptr<base::SequencedTaskRunner> task_runner_;
-    std::unique_ptr<mojo::SyncEventWatcher> sync_watcher_;
-    std::unique_ptr<base::WaitableEvent> sync_message_event_;
+    std::unique_ptr<mojo::SequenceLocalSyncEventWatcher> sync_watcher_;
     base::queue<std::pair<uint32_t, MessageWrapper>> sync_messages_;
     uint32_t next_sync_message_id_ = 0;
 
diff --git a/media/audio/mac/audio_low_latency_input_mac.cc b/media/audio/mac/audio_low_latency_input_mac.cc
index ad5cf1d..173167b 100644
--- a/media/audio/mac/audio_low_latency_input_mac.cc
+++ b/media/audio/mac/audio_low_latency_input_mac.cc
@@ -36,22 +36,6 @@
                          Float32 inRampDuration) __attribute__((weak_import));
 }
 
-void UpmixMonoToStereoInPlace(AudioBuffer* audio_buffer, int bytes_per_sample) {
-  constexpr int channels = 2;
-  const int total_bytes = audio_buffer->mDataByteSize;
-  const int frames = total_bytes / bytes_per_sample / channels;
-  char* byte_ptr = reinterpret_cast<char*>(audio_buffer->mData);
-  for (int i = frames - 1; i > 0; --i) {
-    int in_offset = (bytes_per_sample * i);
-    int out_offset = (channels * bytes_per_sample * i);
-    for (int b = 0; b != bytes_per_sample; ++b) {
-      const char byte = byte_ptr[in_offset + b];
-      byte_ptr[out_offset + bytes_per_sample + b] = byte;
-      byte_ptr[out_offset + bytes_per_sample * 2 + b] = byte;
-    }
-  }
-}
-
 }  // namespace
 
 namespace media {
@@ -1368,4 +1352,41 @@
   largest_glitch_frames_ = 0;
 }
 
+// TODO(ossu): Ideally, we'd just use the mono stream directly. However, since
+// mono or stereo (may) depend on if we want to run the echo canceller, and
+// since we can't provide two sets of AudioParameters for a device, this is the
+// best we can do right now.
+//
+// The algorithm works by copying a sample at offset N to 2*N and 2*N + 1, e.g.:
+//  ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
+// | a1 | a2 | a3 | b1 | b2 | b3 | c1 | c2 | c3 | -- | -- | -- | -- | -- | ...
+//  ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
+//  into
+//  ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
+// | a1 | a2 | a3 | a1 | a2 | a3 | b1 | b2 | b3 | b1 | b2 | b3 | c1 | c2 | ...
+//  ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
+//
+// To support various different sample sizes, this is done byte-by-byte. Only
+// the first half of the buffer will be used as input. It is expected to contain
+// mono audio. The second half is output only. Since the data is expanding, the
+// algorithm starts copying from the last sample. Otherwise it would overwrite
+// data not already copied.
+void AUAudioInputStream::UpmixMonoToStereoInPlace(AudioBuffer* audio_buffer,
+                                                  int bytes_per_sample) {
+  constexpr int channels = 2;
+  DCHECK_EQ(audio_buffer->mNumberChannels, static_cast<UInt32>(channels));
+  const int total_bytes = audio_buffer->mDataByteSize;
+  const int frames = total_bytes / bytes_per_sample / channels;
+  char* byte_ptr = reinterpret_cast<char*>(audio_buffer->mData);
+  for (int i = frames - 1; i >= 0; --i) {
+    int in_offset = (bytes_per_sample * i);
+    int out_offset = (channels * bytes_per_sample * i);
+    for (int b = 0; b < bytes_per_sample; ++b) {
+      const char byte = byte_ptr[in_offset + b];
+      byte_ptr[out_offset + b] = byte;
+      byte_ptr[out_offset + bytes_per_sample + b] = byte;
+    }
+  }
+}
+
 }  // namespace media
diff --git a/media/audio/mac/audio_low_latency_input_mac.h b/media/audio/mac/audio_low_latency_input_mac.h
index 77b3d66..8245f29e 100644
--- a/media/audio/mac/audio_low_latency_input_mac.h
+++ b/media/audio/mac/audio_low_latency_input_mac.h
@@ -98,6 +98,11 @@
   }
   AudioUnit audio_unit() const { return audio_unit_; }
 
+  // Fan out the data from the first half of audio_buffer into interleaved
+  // stereo across the whole of audio_buffer. Public for testing only.
+  static void UpmixMonoToStereoInPlace(AudioBuffer* audio_buffer,
+                                       int bytes_per_sample);
+
  private:
   bool OpenAUHAL();
   bool OpenVoiceProcessingAU();
diff --git a/media/audio/mac/audio_low_latency_input_mac_unittest.cc b/media/audio/mac/audio_low_latency_input_mac_unittest.cc
index 73a24b6..8e3348eb 100644
--- a/media/audio/mac/audio_low_latency_input_mac_unittest.cc
+++ b/media/audio/mac/audio_low_latency_input_mac_unittest.cc
@@ -285,4 +285,54 @@
   ais->Close();
 }
 
+TEST(MacAudioInputUpmixerTest, Upmix16bit) {
+  constexpr int kNumFrames = 512;
+  constexpr int kBytesPerSample = sizeof(int16_t);
+  int16_t mono[kNumFrames];
+  int16_t stereo[kNumFrames * 2];
+
+  // Fill the mono buffer and the first half of the stereo buffer with data
+  for (int i = 0; i != kNumFrames; ++i) {
+    mono[i] = i;
+    stereo[i] = i;
+  }
+
+  AudioBuffer audio_buffer;
+  audio_buffer.mNumberChannels = 2;
+  audio_buffer.mDataByteSize = kNumFrames * kBytesPerSample * 2;
+  audio_buffer.mData = stereo;
+  AUAudioInputStream::UpmixMonoToStereoInPlace(&audio_buffer, kBytesPerSample);
+
+  // Assert that the samples have been distributed properly
+  for (int i = 0; i != kNumFrames; ++i) {
+    ASSERT_EQ(mono[i], stereo[i * 2]);
+    ASSERT_EQ(mono[i], stereo[i * 2 + 1]);
+  }
+}
+
+TEST(MacAudioInputUpmixerTest, Upmix32bit) {
+  constexpr int kNumFrames = 512;
+  constexpr int kBytesPerSample = sizeof(int32_t);
+  int32_t mono[kNumFrames];
+  int32_t stereo[kNumFrames * 2];
+
+  // Fill the mono buffer and the first half of the stereo buffer with data
+  for (int i = 0; i != kNumFrames; ++i) {
+    mono[i] = i;
+    stereo[i] = i;
+  }
+
+  AudioBuffer audio_buffer;
+  audio_buffer.mNumberChannels = 2;
+  audio_buffer.mDataByteSize = kNumFrames * kBytesPerSample * 2;
+  audio_buffer.mData = stereo;
+  AUAudioInputStream::UpmixMonoToStereoInPlace(&audio_buffer, kBytesPerSample);
+
+  // Assert that the samples have been distributed properly
+  for (int i = 0; i != kNumFrames; ++i) {
+    ASSERT_EQ(mono[i], stereo[i * 2]);
+    ASSERT_EQ(mono[i], stereo[i * 2 + 1]);
+  }
+}
+
 }  // namespace media
diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc
index ca085f8..5fbb32b 100644
--- a/media/base/media_switches.cc
+++ b/media/base/media_switches.cc
@@ -12,6 +12,10 @@
 // Allow users to specify a custom buffer size for debugging purpose.
 const char kAudioBufferSize[] = "audio-buffer-size";
 
+// Set a timeout (in milliseconds) for the audio service to quit if there are no
+// client connections to it. If the value is zero the service never quits.
+const char kAudioServiceQuitTimeoutMs[] = "audio-service-quit-timeout-ms";
+
 // Command line flag name to set the autoplay policy.
 const char kAutoplayPolicy[] = "autoplay-policy";
 
diff --git a/media/base/media_switches.h b/media/base/media_switches.h
index 6eac1f80..2bd2ae7 100644
--- a/media/base/media_switches.h
+++ b/media/base/media_switches.h
@@ -22,6 +22,8 @@
 
 MEDIA_EXPORT extern const char kAudioBufferSize[];
 
+MEDIA_EXPORT extern const char kAudioServiceQuitTimeoutMs[];
+
 MEDIA_EXPORT extern const char kAutoplayPolicy[];
 
 MEDIA_EXPORT extern const char kDisableAudioOutput[];
diff --git a/media/cast/BUILD.gn b/media/cast/BUILD.gn
index 02c2822..1b1749a 100644
--- a/media/cast/BUILD.gn
+++ b/media/cast/BUILD.gn
@@ -230,8 +230,6 @@
     "test/fake_receiver_time_offset_estimator.h",
     "test/loopback_transport.cc",
     "test/loopback_transport.h",
-    "test/mock_cast_transport.cc",
-    "test/mock_cast_transport.h",
     "test/skewed_single_thread_task_runner.cc",
     "test/skewed_single_thread_task_runner.h",
     "test/skewed_tick_clock.cc",
@@ -265,7 +263,6 @@
     "//base/test:test_support",
     "//media",
     "//net",
-    "//testing/gmock",
     "//testing/gtest",
     "//third_party/libyuv",
     "//ui/gfx:test_support",
@@ -296,6 +293,8 @@
     "logging/simple_event_subscriber_unittest.cc",
     "logging/stats_event_subscriber_unittest.cc",
     "net/cast_transport_impl_unittest.cc",
+    "net/mock_cast_transport.cc",
+    "net/mock_cast_transport.h",
     "net/pacing/mock_paced_packet_sender.cc",
     "net/pacing/mock_paced_packet_sender.h",
     "net/pacing/paced_sender_unittest.cc",
diff --git a/media/cast/test/mock_cast_transport.cc b/media/cast/net/mock_cast_transport.cc
similarity index 87%
rename from media/cast/test/mock_cast_transport.cc
rename to media/cast/net/mock_cast_transport.cc
index 7c0a046..01d789f6 100644
--- a/media/cast/test/mock_cast_transport.cc
+++ b/media/cast/net/mock_cast_transport.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 "media/cast/test/mock_cast_transport.h"
+#include "media/cast/net/mock_cast_transport.h"
 
 namespace media {
 namespace cast {
diff --git a/media/cast/test/mock_cast_transport.h b/media/cast/net/mock_cast_transport.h
similarity index 92%
rename from media/cast/test/mock_cast_transport.h
rename to media/cast/net/mock_cast_transport.h
index aa81dc11..df6e9c5d 100644
--- a/media/cast/test/mock_cast_transport.h
+++ b/media/cast/net/mock_cast_transport.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 MEDIA_CAST_TEST_MOCK_CAST_TRANSPORT_H_
-#define MEDIA_CAST_TEST_MOCK_CAST_TRANSPORT_H_
+#ifndef MEDIA_CAST_NET_MOCK_CAST_TRANSPORT_H_
+#define MEDIA_CAST_NET_MOCK_CAST_TRANSPORT_H_
 
 #include <stdint.h>
 
@@ -47,4 +47,4 @@
 }  // namespace cast
 }  // namespace media
 
-#endif  // MEDIA_CAST_TEST_MOCK_CAST_TRANSPORT_H_
+#endif  // MEDIA_CAST_NET_MOCK_CAST_TRANSPORT_H_
diff --git a/media/cast/receiver/frame_receiver_unittest.cc b/media/cast/receiver/frame_receiver_unittest.cc
index 1599ac9d..1aa9d5b 100644
--- a/media/cast/receiver/frame_receiver_unittest.cc
+++ b/media/cast/receiver/frame_receiver_unittest.cc
@@ -19,9 +19,9 @@
 #include "media/cast/cast_environment.h"
 #include "media/cast/logging/simple_event_subscriber.h"
 #include "media/cast/net/cast_transport_impl.h"
+#include "media/cast/net/mock_cast_transport.h"
 #include "media/cast/net/rtcp/rtcp_utility.h"
 #include "media/cast/net/rtcp/test_rtcp_packet_builder.h"
-#include "media/cast/test/mock_cast_transport.h"
 #include "media/cast/test/utility/default_config.h"
 #include "testing/gmock/include/gmock/gmock.h"
 
diff --git a/media/filters/offloading_video_decoder.cc b/media/filters/offloading_video_decoder.cc
index 7a528a6..e342d8f 100644
--- a/media/filters/offloading_video_decoder.cc
+++ b/media/filters/offloading_video_decoder.cc
@@ -35,11 +35,14 @@
     decoder_->Decode(buffer, decode_cb);
   }
 
-  void Reset() {
+  void Reset(const base::Closure& reset_cb) {
     // OffloadableVideoDecoders are required to have a synchronous Reset(), so
-    // we don't need to wait for the Reset to complete.
+    // we don't need to wait for the Reset to complete. Despite this, we don't
+    // want to run |reset_cb| before we've reset the cancellation flag or the
+    // client may end up issuing another Reset() before this code runs.
     decoder_->Reset(base::DoNothing());
     cancellation_flag_.reset(new base::AtomicFlag());
+    reset_cb.Run();
   }
 
   OffloadableVideoDecoder* decoder() const { return decoder_.get(); }
@@ -170,17 +173,14 @@
 
   base::Closure bound_reset_cb = BindToCurrentLoop(reset_cb);
   if (!offload_task_runner_) {
-    helper_->Reset();
+    helper_->Reset(bound_reset_cb);
   } else {
     helper_->Cancel();
     offload_task_runner_->PostTask(
-        FROM_HERE, base::BindOnce(&CancellationHelper::Reset,
-                                  base::Unretained(helper_.get())));
+        FROM_HERE,
+        base::BindOnce(&CancellationHelper::Reset,
+                       base::Unretained(helper_.get()), bound_reset_cb));
   }
-
-  // No need to wait for this to complete since all offloadable decoders are
-  // required to have a synchronous Reset().
-  bound_reset_cb.Run();
 }
 
 int OffloadingVideoDecoder::GetMaxDecodeRequests() const {
diff --git a/media/renderers/audio_renderer_impl.cc b/media/renderers/audio_renderer_impl.cc
index abcb3df..269d347 100644
--- a/media/renderers/audio_renderer_impl.cc
+++ b/media/renderers/audio_renderer_impl.cc
@@ -679,12 +679,17 @@
       last_decoded_sample_rate_ = buffer->sample_rate();
 
       if (last_decoded_channel_layout_ != buffer->channel_layout()) {
-        last_decoded_channel_layout_ = buffer->channel_layout();
-        last_decoded_channels_ = buffer->channel_count();
-
-        // Input layouts should never be discrete.
-        DCHECK_NE(last_decoded_channel_layout_, CHANNEL_LAYOUT_DISCRETE);
-        ConfigureChannelMask();
+        if (buffer->channel_layout() == CHANNEL_LAYOUT_DISCRETE) {
+          MEDIA_LOG(ERROR, media_log_)
+              << "Unsupported midstream configuration change! Discrete channel"
+              << " layout not allowed by sink.";
+          HandleAbortedReadOrDecodeError(PIPELINE_ERROR_DECODE);
+          return;
+        } else {
+          last_decoded_channel_layout_ = buffer->channel_layout();
+          last_decoded_channels_ = buffer->channel_count();
+          ConfigureChannelMask();
+        }
       }
     }
 
diff --git a/mojo/public/cpp/bindings/BUILD.gn b/mojo/public/cpp/bindings/BUILD.gn
index d1eaece..a3e4d00 100644
--- a/mojo/public/cpp/bindings/BUILD.gn
+++ b/mojo/public/cpp/bindings/BUILD.gn
@@ -101,6 +101,7 @@
     "associated_interface_request.h",
     "binding.h",
     "binding_set.h",
+    "bindings_export.h",
     "callback_helpers.h",
     "connection_error_callback.h",
     "connector.h",
@@ -135,6 +136,7 @@
     "lib/native_struct_serialization.h",
     "lib/pipe_control_message_handler.cc",
     "lib/pipe_control_message_proxy.cc",
+    "lib/sequence_local_sync_event_watcher.cc",
     "lib/sync_call_restrictions.cc",
     "lib/sync_event_watcher.cc",
     "lib/sync_handle_registry.cc",
@@ -146,6 +148,7 @@
     "pipe_control_message_handler_delegate.h",
     "pipe_control_message_proxy.h",
     "raw_ptr_impl_ref_traits.h",
+    "sequence_local_sync_event_watcher.h",
     "strong_associated_binding.h",
     "strong_binding.h",
     "strong_binding_set.h",
diff --git a/mojo/public/cpp/bindings/lib/multiplex_router.cc b/mojo/public/cpp/bindings/lib/multiplex_router.cc
index eb7cb31..6183309 100644
--- a/mojo/public/cpp/bindings/lib/multiplex_router.cc
+++ b/mojo/public/cpp/bindings/lib/multiplex_router.cc
@@ -18,7 +18,7 @@
 #include "mojo/public/cpp/bindings/interface_endpoint_client.h"
 #include "mojo/public/cpp/bindings/interface_endpoint_controller.h"
 #include "mojo/public/cpp/bindings/lib/may_auto_lock.h"
-#include "mojo/public/cpp/bindings/sync_event_watcher.h"
+#include "mojo/public/cpp/bindings/sequence_local_sync_event_watcher.h"
 
 namespace mojo {
 namespace internal {
@@ -108,8 +108,8 @@
     if (sync_message_event_signaled_)
       return;
     sync_message_event_signaled_ = true;
-    if (sync_message_event_)
-      sync_message_event_->Signal();
+    if (sync_watcher_)
+      sync_watcher_->SignalEvent();
   }
 
   void ResetSyncMessageSignal() {
@@ -117,8 +117,8 @@
     if (!sync_message_event_signaled_)
       return;
     sync_message_event_signaled_ = false;
-    if (sync_message_event_)
-      sync_message_event_->Reset();
+    if (sync_watcher_)
+      sync_watcher_->ResetEvent();
   }
 
   // ---------------------------------------------------------------------------
@@ -136,7 +136,7 @@
     DCHECK(task_runner_->RunsTasksInCurrentSequence());
 
     EnsureSyncWatcherExists();
-    sync_watcher_->AllowWokenUpBySyncWatchOnSameThread();
+    sync_watcher_->AllowWokenUpBySyncWatchOnSameSequence();
   }
 
   bool SyncWatch(const bool* should_stop) override {
@@ -182,20 +182,12 @@
     if (sync_watcher_)
       return;
 
-    {
-      MayAutoLock locker(&router_->lock_);
-      if (!sync_message_event_) {
-        sync_message_event_.emplace(
-            base::WaitableEvent::ResetPolicy::MANUAL,
-            base::WaitableEvent::InitialState::NOT_SIGNALED);
-        if (sync_message_event_signaled_)
-          sync_message_event_->Signal();
-      }
-    }
-    sync_watcher_.reset(
-        new SyncEventWatcher(&sync_message_event_.value(),
-                             base::Bind(&InterfaceEndpoint::OnSyncEventSignaled,
-                                        base::Unretained(this))));
+    MayAutoLock locker(&router_->lock_);
+    sync_watcher_ =
+        std::make_unique<SequenceLocalSyncEventWatcher>(base::BindRepeating(
+            &InterfaceEndpoint::OnSyncEventSignaled, base::Unretained(this)));
+    if (sync_message_event_signaled_)
+      sync_watcher_->SignalEvent();
   }
 
   // ---------------------------------------------------------------------------
@@ -223,18 +215,11 @@
   // Not owned. It is null if no client is attached to this endpoint.
   InterfaceEndpointClient* client_;
 
-  // An event used to signal that sync messages are available. The event is
-  // initialized under the router's lock and remains unchanged afterwards. It
-  // may be accessed outside of the router's lock later.
-  base::Optional<base::WaitableEvent> sync_message_event_;
+  // Indicates whether the sync watcher should be signaled for this endpoint.
   bool sync_message_event_signaled_ = false;
 
-  // ---------------------------------------------------------------------------
-  // The following members are only valid while a client is attached. They are
-  // used exclusively on the client's sequence. They may be accessed outside of
-  // the router's lock.
-
-  std::unique_ptr<SyncEventWatcher> sync_watcher_;
+  // Guarded by the router's lock. Used to synchronously wait on replies.
+  std::unique_ptr<SequenceLocalSyncEventWatcher> sync_watcher_;
 
   DISALLOW_COPY_AND_ASSIGN(InterfaceEndpoint);
 };
diff --git a/mojo/public/cpp/bindings/lib/sequence_local_sync_event_watcher.cc b/mojo/public/cpp/bindings/lib/sequence_local_sync_event_watcher.cc
new file mode 100644
index 0000000..f4618ff
--- /dev/null
+++ b/mojo/public/cpp/bindings/lib/sequence_local_sync_event_watcher.cc
@@ -0,0 +1,286 @@
+// 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 "mojo/public/cpp/bindings/sequence_local_sync_event_watcher.h"
+
+#include <map>
+#include <memory>
+#include <set>
+
+#include "base/bind.h"
+#include "base/containers/flat_set.h"
+#include "base/macros.h"
+#include "base/memory/ptr_util.h"
+#include "base/memory/ref_counted.h"
+#include "base/memory/weak_ptr.h"
+#include "base/no_destructor.h"
+#include "base/synchronization/lock.h"
+#include "base/synchronization/waitable_event.h"
+#include "base/threading/sequence_local_storage_slot.h"
+#include "mojo/public/cpp/bindings/sync_event_watcher.h"
+
+namespace mojo {
+
+namespace {
+
+struct WatcherState;
+
+using WatcherStateMap =
+    std::map<const SequenceLocalSyncEventWatcher*, scoped_refptr<WatcherState>>;
+
+// Ref-counted watcher state which may outlive the watcher to which it pertains.
+// This is necessary to store outside of the SequenceLocalSyncEventWatcher
+// itself in order to support nested sync operations where an inner operation
+// may destroy the watcher.
+struct WatcherState : public base::RefCounted<WatcherState> {
+  WatcherState() = default;
+
+  bool watcher_was_destroyed = false;
+
+ private:
+  friend class base::RefCounted<WatcherState>;
+
+  ~WatcherState() = default;
+
+  DISALLOW_COPY_AND_ASSIGN(WatcherState);
+};
+
+}  // namespace
+
+// Owns the WaitableEvent and SyncEventWatcher shared by all
+// SequenceLocalSyncEventWatchers on a single sequence, and coordinates the
+// multiplexing of those shared objects to support an arbitrary number of
+// SequenceLocalSyncEventWatchers waiting and signaling potentially while
+// nested.
+class SequenceLocalSyncEventWatcher::SequenceLocalState {
+ public:
+  SequenceLocalState()
+      : event_(base::WaitableEvent::ResetPolicy::MANUAL,
+               base::WaitableEvent::InitialState::NOT_SIGNALED),
+        event_watcher_(&event_,
+                       base::BindRepeating(&SequenceLocalState::OnEventSignaled,
+                                           base::Unretained(this))),
+        weak_ptr_factory_(this) {
+    // We always allow this event handler to be awoken during any sync event on
+    // the sequence. Individual watchers still must opt into having such
+    // wake-ups propagated to them.
+    event_watcher_.AllowWokenUpBySyncWatchOnSameThread();
+  }
+
+  ~SequenceLocalState() {}
+
+  // Initializes a SequenceLocalState instance in sequence-local storage if
+  // not already initialized. Returns a WeakPtr to the stored state object.
+  static base::WeakPtr<SequenceLocalState> GetOrCreate() {
+    auto& state_ptr = GetStorageSlot().Get();
+    if (!state_ptr)
+      state_ptr = std::make_unique<SequenceLocalState>();
+    return state_ptr->weak_ptr_factory_.GetWeakPtr();
+  }
+
+  // Registers a new watcher and returns an iterator into the WatcherStateMap to
+  // be used for fast access with other methods.
+  WatcherStateMap::iterator RegisterWatcher(
+      const SequenceLocalSyncEventWatcher* watcher) {
+    auto result = registered_watchers_.emplace(
+        watcher, base::MakeRefCounted<WatcherState>());
+    DCHECK(result.second);
+    return result.first;
+  }
+
+  void UnregisterWatcher(WatcherStateMap::iterator iter) {
+    if (top_watcher_ == iter->first) {
+      // If the watcher being unregistered is currently blocking in a
+      // |SyncWatch()| operation, we need to unblock it. Setting this flag does
+      // that.
+      top_watcher_state_->watcher_was_destroyed = true;
+      top_watcher_state_ = nullptr;
+      top_watcher_ = nullptr;
+    }
+
+    {
+      base::AutoLock lock(ready_watchers_lock_);
+      ready_watchers_.erase(iter->first);
+    }
+
+    registered_watchers_.erase(iter);
+    if (registered_watchers_.empty()) {
+      // If no more watchers are registered, clear our sequence-local storage.
+      // Deletes |this|.
+      GetStorageSlot().Get().reset();
+    }
+  }
+
+  void SignalForWatcher(const SequenceLocalSyncEventWatcher* watcher) {
+    bool must_signal = false;
+    {
+      base::AutoLock lock(ready_watchers_lock_);
+      must_signal = ready_watchers_.empty();
+      ready_watchers_.insert(watcher);
+    }
+
+    // If we didn't have any ready watchers before, the event may not have
+    // been signaled. Signal it to ensure that |OnEventSignaled()| is run.
+    if (must_signal)
+      event_.Signal();
+  }
+
+  void ResetForWatcher(const SequenceLocalSyncEventWatcher* watcher) {
+    base::AutoLock lock(ready_watchers_lock_);
+    ready_watchers_.erase(watcher);
+
+    // No more watchers are ready, so we can reset the event. The next watcher
+    // to call |SignalForWatcher()| will re-signal the event.
+    if (ready_watchers_.empty())
+      event_.Reset();
+  }
+
+  bool SyncWatch(const SequenceLocalSyncEventWatcher* watcher,
+                 WatcherState* watcher_state,
+                 const bool* should_stop) {
+    // |SyncWatch()| calls may nest arbitrarily deep on the same sequence. We
+    // preserve the outer watcher state on the stack and restore it once the
+    // innermost watch is complete.
+    const SequenceLocalSyncEventWatcher* outer_watcher = top_watcher_;
+    WatcherState* outer_watcher_state = top_watcher_state_;
+
+    // Keep a ref on the stack so the state stays alive even if the watcher is
+    // destroyed.
+    scoped_refptr<WatcherState> top_watcher_state(watcher_state);
+    top_watcher_state_ = watcher_state;
+    top_watcher_ = watcher;
+
+    // In addition to the caller's own stop condition, we need to interrupt the
+    // SyncEventWatcher if |watcher| is destroyed while we're waiting.
+    const bool* stop_flags[] = {should_stop,
+                                &top_watcher_state_->watcher_was_destroyed};
+
+    // |SyncWatch()| may delete |this|.
+    auto weak_self = weak_ptr_factory_.GetWeakPtr();
+    bool result = event_watcher_.SyncWatch(stop_flags, 2);
+    if (!weak_self)
+      return false;
+
+    top_watcher_state_ = outer_watcher_state;
+    top_watcher_ = outer_watcher;
+    return result;
+  }
+
+ private:
+  using StorageSlotType =
+      base::SequenceLocalStorageSlot<std::unique_ptr<SequenceLocalState>>;
+  static StorageSlotType& GetStorageSlot() {
+    static base::NoDestructor<StorageSlotType> storage;
+    return *storage;
+  }
+
+  void OnEventSignaled();
+
+  // The shared event and watcher used for this sequence.
+  base::WaitableEvent event_;
+  mojo::SyncEventWatcher event_watcher_;
+
+  // All SequenceLocalSyncEventWatchers on the current sequence have some state
+  // registered here.
+  WatcherStateMap registered_watchers_;
+
+  // Tracks state of the top-most |SyncWatch()| invocation on the stack.
+  const SequenceLocalSyncEventWatcher* top_watcher_ = nullptr;
+  WatcherState* top_watcher_state_ = nullptr;
+
+  // Set of all SequenceLocalSyncEventWatchers in a signaled state, guarded by
+  // a lock for sequence-safe signaling.
+  base::Lock ready_watchers_lock_;
+  base::flat_set<const SequenceLocalSyncEventWatcher*> ready_watchers_;
+
+  base::WeakPtrFactory<SequenceLocalState> weak_ptr_factory_;
+
+  DISALLOW_COPY_AND_ASSIGN(SequenceLocalState);
+};
+
+void SequenceLocalSyncEventWatcher::SequenceLocalState::OnEventSignaled() {
+  for (;;) {
+    base::flat_set<const SequenceLocalSyncEventWatcher*> ready_watchers;
+    {
+      base::AutoLock lock(ready_watchers_lock_);
+      std::swap(ready_watchers_, ready_watchers);
+    }
+    if (ready_watchers.empty())
+      return;
+
+    auto weak_self = weak_ptr_factory_.GetWeakPtr();
+    for (auto* watcher : ready_watchers) {
+      if (top_watcher_ == watcher || watcher->can_wake_up_during_any_watch_) {
+        watcher->callback_.Run();
+
+        // The callback may have deleted |this|.
+        if (!weak_self)
+          return;
+      }
+    }
+  }
+}
+
+// Manages a watcher's reference to the sequence-local state. This hides
+// implementation details from the SequenceLocalSyncEventWatcher interface.
+class SequenceLocalSyncEventWatcher::Registration {
+ public:
+  explicit Registration(const SequenceLocalSyncEventWatcher* watcher)
+      : weak_shared_state_(SequenceLocalState::GetOrCreate()),
+        shared_state_(weak_shared_state_.get()),
+        watcher_state_iterator_(shared_state_->RegisterWatcher(watcher)),
+        watcher_state_(watcher_state_iterator_->second) {}
+
+  ~Registration() {
+    if (weak_shared_state_) {
+      // Because |this| may itself be owned by sequence- or thread-local storage
+      // (e.g. if an interface binding lives there) we have no guarantee that
+      // our SequenceLocalState's storage slot will still be alive during our
+      // own destruction; so we have to guard against any access to it. Note
+      // that this uncertainty only exists within the destructor and does not
+      // apply to other methods on SequenceLocalSyncEventWatcher.
+      //
+      // May delete |shared_state_|.
+      shared_state_->UnregisterWatcher(watcher_state_iterator_);
+    }
+  }
+
+  SequenceLocalState* shared_state() const { return shared_state_; }
+  WatcherState* watcher_state() { return watcher_state_.get(); }
+
+ private:
+  const base::WeakPtr<SequenceLocalState> weak_shared_state_;
+  SequenceLocalState* const shared_state_;
+  WatcherStateMap::iterator watcher_state_iterator_;
+  const scoped_refptr<WatcherState> watcher_state_;
+
+  DISALLOW_COPY_AND_ASSIGN(Registration);
+};
+
+SequenceLocalSyncEventWatcher::SequenceLocalSyncEventWatcher(
+    const base::RepeatingClosure& callback)
+    : registration_(std::make_unique<Registration>(this)),
+      callback_(callback) {}
+
+SequenceLocalSyncEventWatcher::~SequenceLocalSyncEventWatcher() = default;
+
+void SequenceLocalSyncEventWatcher::SignalEvent() {
+  registration_->shared_state()->SignalForWatcher(this);
+}
+
+void SequenceLocalSyncEventWatcher::ResetEvent() {
+  registration_->shared_state()->ResetForWatcher(this);
+}
+
+void SequenceLocalSyncEventWatcher::AllowWokenUpBySyncWatchOnSameSequence() {
+  can_wake_up_during_any_watch_ = true;
+}
+
+bool SequenceLocalSyncEventWatcher::SyncWatch(const bool* should_stop) {
+  // NOTE: |SyncWatch()| may delete |this|.
+  return registration_->shared_state()->SyncWatch(
+      this, registration_->watcher_state(), should_stop);
+}
+
+}  // namespace mojo
diff --git a/mojo/public/cpp/bindings/lib/sync_event_watcher.cc b/mojo/public/cpp/bindings/lib/sync_event_watcher.cc
index 19a41eb5..1716591 100644
--- a/mojo/public/cpp/bindings/lib/sync_event_watcher.cc
+++ b/mojo/public/cpp/bindings/lib/sync_event_watcher.cc
@@ -4,6 +4,9 @@
 
 #include "mojo/public/cpp/bindings/sync_event_watcher.h"
 
+#include <algorithm>
+
+#include "base/containers/stack_container.h"
 #include "base/logging.h"
 
 namespace mojo {
@@ -27,7 +30,8 @@
   IncrementRegisterCount();
 }
 
-bool SyncEventWatcher::SyncWatch(const bool* should_stop) {
+bool SyncEventWatcher::SyncWatch(const bool** stop_flags,
+                                 size_t num_stop_flags) {
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
   IncrementRegisterCount();
   if (!registered_) {
@@ -38,8 +42,14 @@
   // This object may be destroyed during the Wait() call. So we have to preserve
   // the boolean that Wait uses.
   auto destroyed = destroyed_;
-  const bool* should_stop_array[] = {should_stop, &destroyed->data};
-  bool result = registry_->Wait(should_stop_array, 2);
+
+  constexpr size_t kFlagStackCapacity = 4;
+  base::StackVector<const bool*, kFlagStackCapacity> should_stop_array;
+  should_stop_array.container().push_back(&destroyed->data);
+  std::copy(stop_flags, stop_flags + num_stop_flags,
+            std::back_inserter(should_stop_array.container()));
+  bool result = registry_->Wait(should_stop_array.container().data(),
+                                should_stop_array.container().size());
 
   // This object has been destroyed.
   if (destroyed->data)
diff --git a/mojo/public/cpp/bindings/lib/sync_handle_registry.cc b/mojo/public/cpp/bindings/lib/sync_handle_registry.cc
index 6816de0..2ac4833 100644
--- a/mojo/public/cpp/bindings/lib/sync_handle_registry.cc
+++ b/mojo/public/cpp/bindings/lib/sync_handle_registry.cc
@@ -128,9 +128,10 @@
 
   scoped_refptr<SyncHandleRegistry> preserver(this);
   while (true) {
-    for (size_t i = 0; i < count; ++i)
+    for (size_t i = 0; i < count; ++i) {
       if (*should_stop[i])
         return true;
+    }
 
     // TODO(yzshen): Theoretically it can reduce sync call re-entrancy if we
     // give priority to the handle that is waiting for sync response.
diff --git a/mojo/public/cpp/bindings/sequence_local_sync_event_watcher.h b/mojo/public/cpp/bindings/sequence_local_sync_event_watcher.h
new file mode 100644
index 0000000..ad50bde4
--- /dev/null
+++ b/mojo/public/cpp/bindings/sequence_local_sync_event_watcher.h
@@ -0,0 +1,69 @@
+// 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 MOJO_PUBLIC_CPP_BINDINGS_SEQUENCE_LOCAL_SYNC_EVENT_WATCHER_H_
+#define MOJO_PUBLIC_CPP_BINDINGS_SEQUENCE_LOCAL_SYNC_EVENT_WATCHER_H_
+
+#include "base/callback.h"
+#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
+#include "mojo/public/cpp/bindings/bindings_export.h"
+
+namespace mojo {
+
+// This encapsulates a SyncEventWatcher watching an event shared by all
+// |SequenceLocalSyncEventWatcher| on the same sequence. This class is NOT
+// sequence-safe in general, but |SignalEvent()| is safe to call from any
+// sequence.
+//
+// Interfaces which support sync messages use a WaitableEvent to block and
+// be signaled when messages are available, but having a WaitableEvent for every
+// such interface endpoint would cause the number of WaitableEvents to grow
+// arbitrarily large.
+//
+// Some platform constraints may limit the number of WaitableEvents the bindings
+// layer can wait upon concurrently, so this type is used to keep the number
+// of such events fixed at a small constant value per sequence regardless of the
+// number of active interface endpoints supporting sync messages on that
+// sequence.
+class MOJO_CPP_BINDINGS_EXPORT SequenceLocalSyncEventWatcher {
+ public:
+  explicit SequenceLocalSyncEventWatcher(
+      const base::RepeatingClosure& callback);
+  ~SequenceLocalSyncEventWatcher();
+
+  // Signals the shared event on behalf of this specific watcher. Safe to call
+  // from any sequence.
+  void SignalEvent();
+
+  // Resets the shared event on behalf of this specific watcher.
+  void ResetEvent();
+
+  // Allows this watcher to be notified during sync wait operations invoked by
+  // other watchers (for example, other SequenceLocalSyncEventWatchers calling
+  // |SyncWatch()|) on the same sequence.
+  void AllowWokenUpBySyncWatchOnSameSequence();
+
+  // Blocks the calling sequence until the shared event is signaled on behalf of
+  // this specific watcher (i.e. until someone calls |SignalEvent()| on |this|).
+  // Behaves similarly to SyncEventWatcher and SyncHandleWatcher, returning
+  // |true| when |*should_stop| is set to |true|, or |false| if some other
+  // (e.g. error) event interrupts the wait.
+  bool SyncWatch(const bool* should_stop);
+
+ private:
+  class Registration;
+  class SequenceLocalState;
+  friend class SequenceLocalState;
+
+  const std::unique_ptr<Registration> registration_;
+  const base::RepeatingClosure callback_;
+  bool can_wake_up_during_any_watch_ = false;
+
+  DISALLOW_COPY_AND_ASSIGN(SequenceLocalSyncEventWatcher);
+};
+
+}  // namespace mojo
+
+#endif  // MOJO_PUBLIC_CPP_BINDINGS_SEQUENCE_LOCAL_SYNC_EVENT_WATCHER_H_
diff --git a/mojo/public/cpp/bindings/sync_event_watcher.h b/mojo/public/cpp/bindings/sync_event_watcher.h
index 76dc4fe..9bc9ada 100644
--- a/mojo/public/cpp/bindings/sync_event_watcher.h
+++ b/mojo/public/cpp/bindings/sync_event_watcher.h
@@ -36,11 +36,15 @@
   // Waits on |event_| plus all other events and handles registered with this
   // sequence's SyncHandleRegistry, running callbacks synchronously for any
   // ready events and handles.
+  //
+  // |stop_flags| is treated as an array of |const bool*| with |num_stop_flags|
+  // entries.
+  //
   // This method:
-  //   - returns true when |should_stop| is set to true;
+  //   - returns true when any flag in |stop_flags| is set to |true|.
   //   - return false when any error occurs, including this object being
   //     destroyed during a callback.
-  bool SyncWatch(const bool* should_stop);
+  bool SyncWatch(const bool** stop_flags, size_t num_stop_flags);
 
  private:
   void IncrementRegisterCount();
diff --git a/mojo/public/cpp/bindings/thread_safe_interface_ptr.h b/mojo/public/cpp/bindings/thread_safe_interface_ptr.h
index 73b87683..fb69037 100644
--- a/mojo/public/cpp/bindings/thread_safe_interface_ptr.h
+++ b/mojo/public/cpp/bindings/thread_safe_interface_ptr.h
@@ -152,7 +152,8 @@
     bool event_signaled = false;
     SyncEventWatcher watcher(&response->event,
                              base::Bind(assign_true, &event_signaled));
-    watcher.SyncWatch(&event_signaled);
+    const bool* stop_flags[] = {&event_signaled};
+    watcher.SyncWatch(stop_flags, 1);
 
     {
       base::AutoLock l(sync_calls->lock);
diff --git a/remoting/protocol/webrtc_dummy_video_encoder.cc b/remoting/protocol/webrtc_dummy_video_encoder.cc
index 49e5e9d2..4f32d5b 100644
--- a/remoting/protocol/webrtc_dummy_video_encoder.cc
+++ b/remoting/protocol/webrtc_dummy_video_encoder.cc
@@ -165,6 +165,7 @@
   encoded_image.playout_delay_.max_ms = 0;
   encoded_image.timing_.encode_start_ms = encode_started_time_ms;
   encoded_image.timing_.encode_finish_ms = encode_finished_time_ms;
+  encoded_image.content_type_ = webrtc::VideoContentType::SCREENSHARE;
 
   webrtc::CodecSpecificInfo codec_specific_info;
   memset(&codec_specific_info, 0, sizeof(codec_specific_info));
diff --git a/services/audio/BUILD.gn b/services/audio/BUILD.gn
index d8a4931..812d1ffd 100644
--- a/services/audio/BUILD.gn
+++ b/services/audio/BUILD.gn
@@ -8,6 +8,21 @@
 import("//services/service_manager/public/tools/test/service_test.gni")
 import("//testing/test.gni")
 
+# Currently standalone service binaries are not supported on Android or iOS.
+standalone_supported = !(is_android || is_ios)
+
+service("audio") {
+  sources = [
+    "service_main.cc",
+  ]
+
+  deps = [
+    ":lib",
+    "//services/audio/public/cpp",
+    "//services/audio/public/mojom",
+  ]
+}
+
 service_manifest("manifest") {
   name = "audio"
   source = "manifest.json"
@@ -21,6 +36,8 @@
     "in_process_audio_manager_accessor.h",
     "output_stream.cc",
     "output_stream.h",
+    "owning_audio_manager_accessor.cc",
+    "owning_audio_manager_accessor.h",
     "service.cc",
     "service.h",
     "service_factory.cc",
@@ -57,6 +74,7 @@
   ]
 
   deps = [
+    ":audio",
     ":lib",
     "//base/test:test_support",
     "//media:test_support",
@@ -70,8 +88,18 @@
     "//testing/gmock",
     "//testing/gtest",
   ]
+
+  if (standalone_supported) {
+    sources += [ "test/standalone_service_test.cc" ]
+    deps += [ ":standalone_unittest_catalog_source" ]
+  }
+
+  data_deps = [
+    ":audio",
+  ]
 }
 
+# Embedded tests support.
 service_manifest("unittest_manifest") {
   name = "audio_unittests"
   source = "test/service_unittest_manifest.json"
@@ -82,3 +110,21 @@
   testonly = true
   embedded_services = [ ":unittest_manifest" ]
 }
+
+# Standalone tests support.
+if (standalone_supported) {
+  service_manifest("standalone_unittest_manifest") {
+    name = "audio_unittests"
+    source = "test/service_unittest_manifest.json"
+  }
+
+  catalog("standalone_unittest_catalog") {
+    embedded_services = [ ":standalone_unittest_manifest" ]
+    standalone_services = [ ":manifest" ]
+  }
+
+  catalog_cpp_source("standalone_unittest_catalog_source") {
+    catalog = ":standalone_unittest_catalog"
+    generated_function_name = "audio::CreateStandaloneUnittestCatalog"
+  }
+}
diff --git a/services/audio/owning_audio_manager_accessor.cc b/services/audio/owning_audio_manager_accessor.cc
new file mode 100644
index 0000000..2ac6da63
--- /dev/null
+++ b/services/audio/owning_audio_manager_accessor.cc
@@ -0,0 +1,86 @@
+// 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 "services/audio/owning_audio_manager_accessor.h"
+
+#include "base/macros.h"
+#include "base/single_thread_task_runner.h"
+#include "media/audio/audio_manager.h"
+#include "media/audio/audio_thread.h"
+
+namespace audio {
+
+namespace {
+
+// Thread class for hosting owned AudioManager on the main thread of the
+// service.
+class MainThread : public media::AudioThread {
+ public:
+  MainThread();
+  ~MainThread() override;
+
+  // AudioThread implementation.
+  void Stop() override;
+  base::SingleThreadTaskRunner* GetTaskRunner() override;
+  base::SingleThreadTaskRunner* GetWorkerTaskRunner() override;
+
+ private:
+  scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
+  DISALLOW_COPY_AND_ASSIGN(MainThread);
+};
+
+MainThread::MainThread() : task_runner_(base::ThreadTaskRunnerHandle::Get()) {}
+
+MainThread::~MainThread() {
+  DCHECK(task_runner_->BelongsToCurrentThread());
+}
+
+void MainThread::Stop() {
+  DCHECK(task_runner_->BelongsToCurrentThread());
+}
+
+base::SingleThreadTaskRunner* MainThread::GetTaskRunner() {
+  return task_runner_.get();
+}
+
+base::SingleThreadTaskRunner* MainThread::GetWorkerTaskRunner() {
+  NOTREACHED();
+  return task_runner_.get();
+}
+
+}  // namespace
+
+OwningAudioManagerAccessor::OwningAudioManagerAccessor(
+    AudioManagerFactoryCallback audio_manager_factory_cb)
+    : audio_manager_factory_cb_(std::move(audio_manager_factory_cb)) {
+  DCHECK(audio_manager_factory_cb_);
+}
+
+OwningAudioManagerAccessor::~OwningAudioManagerAccessor() {
+  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
+}
+
+media::AudioManager* OwningAudioManagerAccessor::GetAudioManager() {
+  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
+  if (!audio_manager_) {
+    DCHECK(audio_manager_factory_cb_);
+
+    // TODO(http://crbug/812557): pass AudioLogFactory (needed for output
+    // streams).
+    audio_manager_ = std::move(audio_manager_factory_cb_)
+                         .Run(std::make_unique<MainThread>(), nullptr);
+    DCHECK(audio_manager_);
+  }
+  DCHECK(audio_manager_->GetTaskRunner()->BelongsToCurrentThread());
+  return audio_manager_.get();
+}
+
+void OwningAudioManagerAccessor::Shutdown() {
+  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
+  if (audio_manager_)
+    audio_manager_->Shutdown();
+  audio_manager_factory_cb_ = AudioManagerFactoryCallback();
+}
+
+}  // namespace audio
diff --git a/services/audio/owning_audio_manager_accessor.h b/services/audio/owning_audio_manager_accessor.h
new file mode 100644
index 0000000..dd8225e1
--- /dev/null
+++ b/services/audio/owning_audio_manager_accessor.h
@@ -0,0 +1,46 @@
+// 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 SERVICES_AUDIO_OWNING_AUDIO_MANAGER_ACCESSOR_H_
+#define SERVICES_AUDIO_OWNING_AUDIO_MANAGER_ACCESSOR_H_
+
+#include "base/macros.h"
+#include "base/threading/thread_checker.h"
+#include "services/audio/service.h"
+
+namespace media {
+class AudioLogFactory;
+class AudioManager;
+class AudioThread;
+}  // namespace media
+
+namespace audio {
+
+// Lazily creates AudioManager using provided factory callback and controls its
+// lifetime. Threading model of a created AudioManager is enforced: its main
+// thread is the thread OwningAudioManagerAccessor lives on.
+class OwningAudioManagerAccessor : public Service::AudioManagerAccessor {
+ public:
+  using AudioManagerFactoryCallback =
+      base::OnceCallback<std::unique_ptr<media::AudioManager>(
+          std::unique_ptr<media::AudioThread>,
+          media::AudioLogFactory* audio_log_factory)>;
+
+  explicit OwningAudioManagerAccessor(
+      AudioManagerFactoryCallback audio_manager_factory_cb);
+  ~OwningAudioManagerAccessor() override;
+
+  media::AudioManager* GetAudioManager() final;
+  void Shutdown() final;
+
+ private:
+  AudioManagerFactoryCallback audio_manager_factory_cb_;
+  std::unique_ptr<media::AudioManager> audio_manager_;
+  THREAD_CHECKER(thread_checker_);
+  DISALLOW_COPY_AND_ASSIGN(OwningAudioManagerAccessor);
+};
+
+}  // namespace audio
+
+#endif  // SERVICES_AUDIO_OWNING_AUDIO_MANAGER_ACCESSOR_H_
diff --git a/services/audio/service.h b/services/audio/service.h
index 1d054bf..80777d12 100644
--- a/services/audio/service.h
+++ b/services/audio/service.h
@@ -37,7 +37,8 @@
    public:
     virtual ~AudioManagerAccessor() {}
 
-    // Must be called before destruction.
+    // Must be called before destruction to cleanly shut down AudioManager.
+    // Service must ensure AudioManager is not called after that.
     virtual void Shutdown() = 0;
 
     // Returns a pointer to AudioManager.
@@ -67,8 +68,8 @@
   void MaybeRequestQuitDelayed();
   void MaybeRequestQuit();
 
-  // Thread it runs on should be the same as the main thread of AudioManager
-  // provided by AudioManagerAccessor.
+  // The thread Service runs on should be the same as the main thread of
+  // AudioManager provided by AudioManagerAccessor.
   THREAD_CHECKER(thread_checker_);
 
   // The members below should outlive |ref_factory_|.
diff --git a/services/audio/service_main.cc b/services/audio/service_main.cc
new file mode 100644
index 0000000..746a492
--- /dev/null
+++ b/services/audio/service_main.cc
@@ -0,0 +1,41 @@
+// 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 "base/command_line.h"
+#include "base/strings/string_number_conversions.h"
+#include "media/audio/audio_manager.h"
+#include "media/base/media_switches.h"
+#include "services/audio/owning_audio_manager_accessor.h"
+#include "services/audio/service.h"
+#include "services/service_manager/public/c/main.h"
+#include "services/service_manager/public/cpp/service_runner.h"
+
+namespace {
+
+base::TimeDelta GetQuitTimeout() {
+  constexpr base::TimeDelta kDefaultTimeout = base::TimeDelta::FromSeconds(10);
+
+  const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
+  if (!cmd_line->HasSwitch(switches::kAudioServiceQuitTimeoutMs))
+    return kDefaultTimeout;
+
+  std::string timeout_str(
+      cmd_line->GetSwitchValueASCII(switches::kAudioServiceQuitTimeoutMs));
+  int timeout_ms = 0;
+  if (!base::StringToInt(timeout_str, &timeout_ms) || timeout_ms < 0)
+    return kDefaultTimeout;  // Ill-formed value provided, fall back to default.
+
+  return base::TimeDelta::FromMilliseconds(timeout_ms);
+}
+
+}  // namespace
+
+MojoResult ServiceMain(MojoHandle service_request_handle) {
+  return service_manager::ServiceRunner(
+             new audio::Service(
+                 std::make_unique<audio::OwningAudioManagerAccessor>(
+                     base::BindOnce(&media::AudioManager::Create)),
+                 GetQuitTimeout()))
+      .Run(service_request_handle);
+}
diff --git a/services/audio/test/standalone_service_test.cc b/services/audio/test/standalone_service_test.cc
new file mode 100644
index 0000000..24712f3
--- /dev/null
+++ b/services/audio/test/standalone_service_test.cc
@@ -0,0 +1,42 @@
+// 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 "base/command_line.h"
+#include "base/strings/string_number_conversions.h"
+#include "media/base/media_switches.h"
+#include "services/audio/service.h"
+#include "services/audio/standalone_unittest_catalog_source.h"
+#include "services/audio/test/service_lifetime_test_template.h"
+#include "services/service_manager/public/cpp/service_context.h"
+#include "services/service_manager/public/cpp/service_test.h"
+
+namespace audio {
+
+class StandaloneAudioServiceTest : public service_manager::test::ServiceTest {
+ public:
+  StandaloneAudioServiceTest() : ServiceTest("audio_unittests") {}
+
+  ~StandaloneAudioServiceTest() override {}
+
+ protected:
+  // service_manager::test::ServiceTest:
+  std::unique_ptr<base::Value> CreateCustomTestCatalog() override {
+    return audio::CreateStandaloneUnittestCatalog();
+  }
+
+  void SetUp() override {
+    ServiceTest::SetUp();
+    base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
+    cmd_line->AppendSwitchASCII(switches::kAudioServiceQuitTimeoutMs,
+                                base::UintToString(10));
+  }
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(StandaloneAudioServiceTest);
+};
+
+INSTANTIATE_TYPED_TEST_CASE_P(StandaloneAudioService,
+                              ServiceLifetimeTestTemplate,
+                              StandaloneAudioServiceTest);
+}  // namespace audio
diff --git a/services/resource_coordinator/coordination_unit/frame_coordination_unit_impl_unittest.cc b/services/resource_coordinator/coordination_unit/frame_coordination_unit_impl_unittest.cc
index 50d99f2..342a60fc 100644
--- a/services/resource_coordinator/coordination_unit/frame_coordination_unit_impl_unittest.cc
+++ b/services/resource_coordinator/coordination_unit/frame_coordination_unit_impl_unittest.cc
@@ -18,25 +18,21 @@
 class FrameCoordinationUnitImplTest : public CoordinationUnitTestHarness {
  public:
   void SetUp() override {
-    ResourceCoordinatorClock::SetClockForTesting(
-        std::make_unique<base::SimpleTestTickClock>());
-    clock_ = static_cast<base::SimpleTestTickClock*>(
-        ResourceCoordinatorClock::GetClockForTesting());
+    ResourceCoordinatorClock::SetClockForTesting(&clock_);
 
     // Sets a valid starting time.
-    clock_->SetNowTicks(base::TimeTicks::Now());
+    clock_.SetNowTicks(base::TimeTicks::Now());
   }
 
   void TearDown() override {
-    clock_ = nullptr;
     ResourceCoordinatorClock::ResetClockForTesting();
   }
 
  protected:
-  void AdvanceClock(base::TimeDelta delta) { clock_->Advance(delta); }
+  void AdvanceClock(base::TimeDelta delta) { clock_.Advance(delta); }
 
  private:
-  base::SimpleTestTickClock* clock_ = nullptr;
+  base::SimpleTestTickClock clock_;
 };
 
 using FrameCoordinationUnitImplDeathTest = FrameCoordinationUnitImplTest;
diff --git a/services/resource_coordinator/coordination_unit/page_coordination_unit_impl_unittest.cc b/services/resource_coordinator/coordination_unit/page_coordination_unit_impl_unittest.cc
index 269c60a9..d81e427 100644
--- a/services/resource_coordinator/coordination_unit/page_coordination_unit_impl_unittest.cc
+++ b/services/resource_coordinator/coordination_unit/page_coordination_unit_impl_unittest.cc
@@ -20,25 +20,21 @@
 class PageCoordinationUnitImplTest : public CoordinationUnitTestHarness {
  public:
   void SetUp() override {
-    ResourceCoordinatorClock::SetClockForTesting(
-        std::make_unique<base::SimpleTestTickClock>());
-    clock_ = static_cast<base::SimpleTestTickClock*>(
-        ResourceCoordinatorClock::GetClockForTesting());
+    ResourceCoordinatorClock::SetClockForTesting(&clock_);
 
     // Sets a valid starting time.
-    clock_->SetNowTicks(base::TimeTicks::Now());
+    clock_.SetNowTicks(base::TimeTicks::Now());
   }
 
   void TearDown() override {
-    clock_ = nullptr;
     ResourceCoordinatorClock::ResetClockForTesting();
   }
 
  protected:
-  void AdvanceClock(base::TimeDelta delta) { clock_->Advance(delta); }
+  void AdvanceClock(base::TimeDelta delta) { clock_.Advance(delta); }
 
  private:
-  base::SimpleTestTickClock* clock_ = nullptr;
+  base::SimpleTestTickClock clock_;
 };
 
 }  // namespace
diff --git a/services/resource_coordinator/observers/metrics_collector_unittest.cc b/services/resource_coordinator/observers/metrics_collector_unittest.cc
index c5399bbf..af023a38 100644
--- a/services/resource_coordinator/observers/metrics_collector_unittest.cc
+++ b/services/resource_coordinator/observers/metrics_collector_unittest.cc
@@ -35,27 +35,23 @@
 
   void SetUp() override {
     MetricsCollector* metrics_collector = new MetricsCollector();
-    ResourceCoordinatorClock::SetClockForTesting(
-        std::make_unique<base::SimpleTestTickClock>());
-    clock_ = static_cast<base::SimpleTestTickClock*>(
-        ResourceCoordinatorClock::GetClockForTesting());
+    ResourceCoordinatorClock::SetClockForTesting(&clock_);
 
     // Sets a valid starting time.
-    clock_->SetNowTicks(base::TimeTicks::Now());
+    clock_.SetNowTicks(base::TimeTicks::Now());
     coordination_unit_manager().RegisterObserver(
         base::WrapUnique(metrics_collector));
   }
 
   void TearDown() override {
-    clock_ = nullptr;
     ResourceCoordinatorClock::ResetClockForTesting();
   }
 
  protected:
-  void AdvanceClock(base::TimeDelta delta) { clock_->Advance(delta); }
+  void AdvanceClock(base::TimeDelta delta) { clock_.Advance(delta); }
 
   base::HistogramTester histogram_tester_;
-  base::SimpleTestTickClock* clock_ = nullptr;
+  base::SimpleTestTickClock clock_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(MAYBE_MetricsCollectorTest);
diff --git a/services/resource_coordinator/observers/page_signal_generator_impl_unittest.cc b/services/resource_coordinator/observers/page_signal_generator_impl_unittest.cc
index dafdd3cf..bbb7f62 100644
--- a/services/resource_coordinator/observers/page_signal_generator_impl_unittest.cc
+++ b/services/resource_coordinator/observers/page_signal_generator_impl_unittest.cc
@@ -18,24 +18,6 @@
 
 namespace resource_coordinator {
 
-// A wrapper for a tick clock. ResourceCoordinatorClock wants TickClock
-// ownership, but the test harness only provides a raw pointer.
-class TickClockWrapper : public base::TickClock {
- public:
-  explicit TickClockWrapper(base::TickClock* tick_clock)
-      : tick_clock_(tick_clock) {}
-
-  ~TickClockWrapper() override {}
-
-  // base::TickClock implementation:
-  base::TimeTicks NowTicks() const override { return tick_clock_->NowTicks(); }
-
- private:
-  base::TickClock* tick_clock_;
-
-  DISALLOW_COPY_AND_ASSIGN(TickClockWrapper);
-};
-
 class MockPageSignalGeneratorImpl : public PageSignalGeneratorImpl {
  public:
   // Overridden from PageSignalGeneratorImpl.
@@ -163,8 +145,7 @@
 
 void PageSignalGeneratorImplTest::TestPageAlmostIdleTransitions(bool timeout) {
   EnablePAI();
-  ResourceCoordinatorClock::SetClockForTesting(
-      std::make_unique<TickClockWrapper>(task_env().GetMockTickClock()));
+  ResourceCoordinatorClock::SetClockForTesting(task_env().GetMockTickClock());
   task_env().FastForwardBy(base::TimeDelta::FromSeconds(1));
 
   MockSinglePageInSingleProcessCoordinationUnitGraph cu_graph;
diff --git a/services/resource_coordinator/resource_coordinator_clock.cc b/services/resource_coordinator/resource_coordinator_clock.cc
index bf3b237..cf73710 100644
--- a/services/resource_coordinator/resource_coordinator_clock.cc
+++ b/services/resource_coordinator/resource_coordinator_clock.cc
@@ -10,8 +10,8 @@
 
 namespace {
 
-std::unique_ptr<base::TickClock>& g_tick_clock_for_testing() {
-  static std::unique_ptr<base::TickClock> tick_clock_for_testing = nullptr;
+base::TickClock*& g_tick_clock_for_testing() {
+  static base::TickClock* tick_clock_for_testing = nullptr;
   return tick_clock_for_testing;
 }
 
@@ -23,17 +23,16 @@
 }
 
 base::TickClock* ResourceCoordinatorClock::GetClockForTesting() {
-  return g_tick_clock_for_testing().get();
+  return g_tick_clock_for_testing();
 }
 
 void ResourceCoordinatorClock::ResetClockForTesting() {
-  g_tick_clock_for_testing().reset();
+  g_tick_clock_for_testing() = nullptr;
 }
 
-void ResourceCoordinatorClock::SetClockForTesting(
-    std::unique_ptr<base::TickClock> tick_clock) {
+void ResourceCoordinatorClock::SetClockForTesting(base::TickClock* tick_clock) {
   DCHECK(!g_tick_clock_for_testing());
-  g_tick_clock_for_testing() = std::move(tick_clock);
+  g_tick_clock_for_testing() = tick_clock;
 }
 
 }  // namespace resource_coordinator
diff --git a/services/resource_coordinator/resource_coordinator_clock.h b/services/resource_coordinator/resource_coordinator_clock.h
index ef45054..60d6408c 100644
--- a/services/resource_coordinator/resource_coordinator_clock.h
+++ b/services/resource_coordinator/resource_coordinator_clock.h
@@ -27,9 +27,8 @@
 
   static base::TickClock* GetClockForTesting();
 
-  // Sets a TickClock for testing, the ownership of the |tick_clock| will be
-  // transferred to the global clock.
-  static void SetClockForTesting(std::unique_ptr<base::TickClock> tick_clock);
+  // Sets a TickClock for testing.
+  static void SetClockForTesting(base::TickClock* tick_clock);
 
   static void ResetClockForTesting();
 
diff --git a/services/service_manager/public/cpp/service_test.cc b/services/service_manager/public/cpp/service_test.cc
index 6125ae79..d03875d9 100644
--- a/services/service_manager/public/cpp/service_test.cc
+++ b/services/service_manager/public/cpp/service_test.cc
@@ -48,6 +48,10 @@
   return std::make_unique<ServiceTestClient>(this);
 }
 
+std::unique_ptr<base::Value> ServiceTest::CreateCustomTestCatalog() {
+  return nullptr;
+}
+
 void ServiceTest::OnStartCalled(Connector* connector,
                                 const std::string& name,
                                 const std::string& user_id) {
@@ -59,8 +63,8 @@
 
 void ServiceTest::SetUp() {
   background_service_manager_ =
-      std::make_unique<service_manager::BackgroundServiceManager>(nullptr,
-                                                                  nullptr);
+      std::make_unique<service_manager::BackgroundServiceManager>(
+          nullptr, CreateCustomTestCatalog());
 
   // Create the service manager connection. We don't proceed until we get our
   // Service's OnStart() method is called.
diff --git a/services/service_manager/public/cpp/service_test.h b/services/service_manager/public/cpp/service_test.h
index fdc942b6..8dec4e0 100644
--- a/services/service_manager/public/cpp/service_test.h
+++ b/services/service_manager/public/cpp/service_test.h
@@ -82,6 +82,10 @@
   // work.
   virtual std::unique_ptr<Service> CreateService();
 
+  // By default returns null, which means the global default is used. Override
+  // to customize.
+  virtual std::unique_ptr<base::Value> CreateCustomTestCatalog();
+
   // Call to set OnStart() metadata when GetService() is overridden.
   void OnStartCalled(Connector* connector,
                      const std::string& name,
diff --git a/services/ui/public/cpp/gpu/context_provider_command_buffer.cc b/services/ui/public/cpp/gpu/context_provider_command_buffer.cc
index 1c65c9c..606622f 100644
--- a/services/ui/public/cpp/gpu/context_provider_command_buffer.cc
+++ b/services/ui/public/cpp/gpu/context_provider_command_buffer.cc
@@ -325,29 +325,32 @@
       // The GLES2Implementation exposes the OpenGLES2 API, as well as the
       // gpu::ContextSupport interface.
       constexpr bool support_client_side_arrays = false;
+
+      std::unique_ptr<gpu::gles2::GLES2Implementation> gles2_impl;
       if (support_grcontext_) {
         // GLES2ImplementationWithGrContextSupport adds a bit of overhead, so
         // we only use it if grcontext_support was requested.
-        gles2_impl_ = std::make_unique<
+        gles2_impl = std::make_unique<
             skia_bindings::GLES2ImplementationWithGrContextSupport>(
             gles2_helper.get(), share_group, transfer_buffer_.get(),
             attributes_.bind_generates_resource,
             attributes_.lose_context_when_out_of_memory,
             support_client_side_arrays, command_buffer_.get());
       } else {
-        gles2_impl_ = std::make_unique<gpu::gles2::GLES2Implementation>(
+        gles2_impl = std::make_unique<gpu::gles2::GLES2Implementation>(
             gles2_helper.get(), share_group, transfer_buffer_.get(),
             attributes_.bind_generates_resource,
             attributes_.lose_context_when_out_of_memory,
             support_client_side_arrays, command_buffer_.get());
       }
-      bind_result_ = gles2_impl_->Initialize(memory_limits_);
+      bind_result_ = gles2_impl->Initialize(memory_limits_);
       if (bind_result_ != gpu::ContextResult::kSuccess) {
         DLOG(ERROR) << "Failed to initialize GLES2Implementation.";
         return bind_result_;
       }
 
-      impl_ = gles2_impl_.get();
+      impl_ = gles2_impl.get();
+      gles2_impl_ = std::move(gles2_impl);
       helper_ = std::move(gles2_helper);
     }
 
diff --git a/storage/DEPS b/storage/DEPS
index 9285e30..e389524 100644
--- a/storage/DEPS
+++ b/storage/DEPS
@@ -1,11 +1,12 @@
 include_rules = [
+  "+components/services/filesystem",
   "+mojo",
   "+net",
   "+services/network/public/cpp",
   "+services/network/public/mojom",
   "+sql",
-  "+third_party/leveldatabase",
-  "+third_party/sqlite",
   "+third_party/WebKit/public/mojom",
   "+third_party/WebKit/public/platform",
+  "+third_party/leveldatabase",
+  "+third_party/sqlite",
 ]
diff --git a/storage/browser/BUILD.gn b/storage/browser/BUILD.gn
index 3943bac..01d80e17 100644
--- a/storage/browser/BUILD.gn
+++ b/storage/browser/BUILD.gn
@@ -208,6 +208,7 @@
   ]
 
   public_deps = [
+    "//components/services/filesystem/public/interfaces",
     "//storage/common",
   ]
   deps = [
@@ -305,6 +306,7 @@
     ":browser",
     ":test_support",
     "//base/test:test_support",
+    "//components/services/filesystem/public/interfaces",
     "//mojo/common",
     "//mojo/edk",
     "//net:test_support",
diff --git a/storage/browser/fileapi/async_file_util.h b/storage/browser/fileapi/async_file_util.h
index ed64283..ce65d2fd 100644
--- a/storage/browser/fileapi/async_file_util.h
+++ b/storage/browser/fileapi/async_file_util.h
@@ -14,9 +14,9 @@
 #include "base/files/file.h"
 #include "base/files/file_util_proxy.h"
 #include "base/macros.h"
+#include "components/services/filesystem/public/interfaces/types.mojom.h"
 #include "storage/browser/fileapi/file_system_operation.h"
 #include "storage/browser/storage_browser_export.h"
-#include "storage/common/fileapi/directory_entry.h"
 
 namespace base {
 class Time;
@@ -65,7 +65,7 @@
       base::Callback<void(base::File::Error result,
                           const base::File::Info& file_info)>;
 
-  using EntryList = std::vector<DirectoryEntry>;
+  using EntryList = std::vector<filesystem::mojom::DirectoryEntry>;
   using ReadDirectoryCallback = base::RepeatingCallback<
       void(base::File::Error result, EntryList file_list, bool has_more)>;
 
diff --git a/storage/browser/fileapi/async_file_util_adapter.cc b/storage/browser/fileapi/async_file_util_adapter.cc
index 962662a..d159271e 100644
--- a/storage/browser/fileapi/async_file_util_adapter.cc
+++ b/storage/browser/fileapi/async_file_util_adapter.cc
@@ -16,6 +16,7 @@
 #include "base/sequenced_task_runner.h"
 #include "base/task_runner_util.h"
 #include "base/threading/thread_task_runner_handle.h"
+#include "components/services/filesystem/public/interfaces/types.mojom.h"
 #include "storage/browser/blob/shareable_file_reference.h"
 #include "storage/browser/fileapi/file_system_context.h"
 #include "storage/browser/fileapi/file_system_file_util.h"
@@ -102,7 +103,7 @@
   if (error == base::File::FILE_OK && !file_info.is_directory)
     error = base::File::FILE_ERROR_NOT_A_DIRECTORY;
 
-  std::vector<DirectoryEntry> entries;
+  std::vector<filesystem::mojom::DirectoryEntry> entries;
   if (error != base::File::FILE_OK) {
     origin_runner->PostTask(FROM_HERE, base::BindOnce(callback, error, entries,
                                                       false /* has_more */));
@@ -119,10 +120,10 @@
 
   base::FilePath current;
   while (!(current = file_enum->Next()).empty()) {
-    DirectoryEntry entry;
-    entry.is_directory = file_enum->IsDirectory();
-    entry.name = VirtualPath::BaseName(current).value();
-    entries.push_back(entry);
+    entries.emplace_back(VirtualPath::BaseName(current),
+                         file_enum->IsDirectory()
+                             ? filesystem::mojom::FsFileType::DIRECTORY
+                             : filesystem::mojom::FsFileType::REGULAR_FILE);
 
     if (entries.size() == kResultChunkSize) {
       origin_runner->PostTask(
diff --git a/storage/browser/fileapi/copy_or_move_operation_delegate_unittest.cc b/storage/browser/fileapi/copy_or_move_operation_delegate_unittest.cc
index 7566483..395e0b71 100644
--- a/storage/browser/fileapi/copy_or_move_operation_delegate_unittest.cc
+++ b/storage/browser/fileapi/copy_or_move_operation_delegate_unittest.cc
@@ -4,8 +4,11 @@
 
 #include <stddef.h>
 #include <stdint.h>
+
 #include <map>
+#include <string>
 #include <utility>
+#include <vector>
 
 #include "base/bind.h"
 #include "base/containers/queue.h"
@@ -19,6 +22,7 @@
 #include "base/stl_util.h"
 #include "base/test/scoped_task_environment.h"
 #include "base/threading/thread_task_runner_handle.h"
+#include "components/services/filesystem/public/interfaces/types.mojom.h"
 #include "storage/browser/fileapi/copy_or_move_file_validator.h"
 #include "storage/browser/fileapi/copy_or_move_operation_delegate.h"
 #include "storage/browser/fileapi/file_stream_reader.h"
@@ -335,7 +339,7 @@
         root.virtual_path().AppendRelativePath(url.virtual_path(), &relative);
         relative = relative.NormalizePathSeparators();
         ASSERT_TRUE(base::ContainsKey(test_case_map, relative));
-        if (entries[i].is_directory) {
+        if (entries[i].type == filesystem::mojom::FsFileType::DIRECTORY) {
           EXPECT_TRUE(test_case_map[relative]->is_directory);
           directories.push(url);
         } else {
diff --git a/storage/browser/fileapi/dragged_file_util_unittest.cc b/storage/browser/fileapi/dragged_file_util_unittest.cc
index 8fffb06b..bf1a98d 100644
--- a/storage/browser/fileapi/dragged_file_util_unittest.cc
+++ b/storage/browser/fileapi/dragged_file_util_unittest.cc
@@ -19,6 +19,7 @@
 #include "base/message_loop/message_loop.h"
 #include "base/time/time.h"
 #include "build/build_config.h"
+#include "components/services/filesystem/public/interfaces/types.mojom.h"
 #include "storage/browser/fileapi/dragged_file_util.h"
 #include "storage/browser/fileapi/file_system_context.h"
 #include "storage/browser/fileapi/file_system_operation_context.h"
@@ -210,9 +211,9 @@
                 AsyncFileTestHelper::ReadDirectory(
                     file_system_context(), dir, &entries));
       for (size_t i = 0; i < entries.size(); ++i) {
-        FileSystemURL url = GetEntryURL(file_system_context(),
-                                        dir, entries[i].name);
-        if (entries[i].is_directory) {
+        FileSystemURL url =
+            GetEntryURL(file_system_context(), dir, entries[i].name.value());
+        if (entries[i].type == filesystem::mojom::FsFileType::DIRECTORY) {
           directories.push(url);
           continue;
         }
@@ -229,11 +230,11 @@
                 AsyncFileTestHelper::ReadDirectory(
                     file_system_context(), dir, &entries));
       for (size_t i = 0; i < entries.size(); ++i) {
-        FileSystemURL url2 = GetEntryURL(file_system_context(),
-                                         dir, entries[i].name);
+        FileSystemURL url2 =
+            GetEntryURL(file_system_context(), dir, entries[i].name.value());
         FileSystemURL url1 = GetOtherURL(file_system_context(),
                                          root2, root1, url2);
-        if (entries[i].is_directory) {
+        if (entries[i].type == filesystem::mojom::FsFileType::DIRECTORY) {
           directories.push(url2);
           EXPECT_EQ(IsDirectoryEmpty(file_system_context(), url1),
                     IsDirectoryEmpty(file_system_context(), url2));
@@ -360,7 +361,8 @@
                  << ": " << test_case.path);
 
     // Read entries in the directory to construct the expected results map.
-    typedef std::map<base::FilePath::StringType, storage::DirectoryEntry>
+    typedef std::map<base::FilePath::StringType,
+                     filesystem::mojom::DirectoryEntry>
         EntryMap;
     EntryMap expected_entry_map;
 
@@ -371,10 +373,13 @@
     base::FilePath current;
     while (!(current = file_enum.Next()).empty()) {
       base::FileEnumerator::FileInfo file_info = file_enum.GetInfo();
-      storage::DirectoryEntry entry;
-      entry.is_directory = file_info.IsDirectory();
-      entry.name = current.BaseName().value();
-      expected_entry_map[entry.name] = entry;
+      filesystem::mojom::DirectoryEntry entry;
+      entry.type = file_info.IsDirectory()
+                       ? filesystem::mojom::FsFileType::DIRECTORY
+                       : filesystem::mojom::FsFileType::REGULAR_FILE;
+
+      entry.name = current.BaseName();
+      expected_entry_map[entry.name.value()] = entry;
 
 #if defined(OS_POSIX) && !defined(OS_FUCHSIA)
       // Creates a symlink for each file/directory.
@@ -396,11 +401,11 @@
 
     EXPECT_EQ(expected_entry_map.size(), entries.size());
     for (size_t i = 0; i < entries.size(); ++i) {
-      const storage::DirectoryEntry& entry = entries[i];
-      EntryMap::iterator found = expected_entry_map.find(entry.name);
+      const filesystem::mojom::DirectoryEntry& entry = entries[i];
+      EntryMap::iterator found = expected_entry_map.find(entry.name.value());
       EXPECT_TRUE(found != expected_entry_map.end());
       EXPECT_EQ(found->second.name, entry.name);
-      EXPECT_EQ(found->second.is_directory, entry.is_directory);
+      EXPECT_EQ(found->second.type, entry.type);
     }
   }
 }
@@ -440,12 +445,12 @@
               AsyncFileTestHelper::ReadDirectory(file_system_context(),
                                                  dir, &entries));
     for (size_t i = 0; i < entries.size(); ++i) {
-      FileSystemURL src_url = GetEntryURL(file_system_context(),
-                                          dir, entries[i].name);
+      FileSystemURL src_url =
+          GetEntryURL(file_system_context(), dir, entries[i].name.value());
       FileSystemURL dest_url = GetOtherURL(file_system_context(),
                                            src_root, dest_root, src_url);
 
-      if (entries[i].is_directory) {
+      if (entries[i].type == filesystem::mojom::FsFileType::DIRECTORY) {
         ASSERT_EQ(base::File::FILE_OK,
                   AsyncFileTestHelper::CreateDirectory(file_system_context(),
                                                        dest_url));
@@ -475,10 +480,10 @@
             AsyncFileTestHelper::ReadDirectory(file_system_context(),
                                                src_root, &entries));
   for (size_t i = 0; i < entries.size(); ++i) {
-    if (!entries[i].is_directory)
+    if (entries[i].type != filesystem::mojom::FsFileType::DIRECTORY)
       continue;
-    FileSystemURL src_url = GetEntryURL(file_system_context(),
-                                        src_root, entries[i].name);
+    FileSystemURL src_url =
+        GetEntryURL(file_system_context(), src_root, entries[i].name.value());
     FileSystemURL dest_url = GetOtherURL(file_system_context(),
                                          src_root, dest_root, src_url);
     SCOPED_TRACE(testing::Message() << "Testing file copy "
diff --git a/storage/browser/fileapi/file_system_dir_url_request_job.cc b/storage/browser/fileapi/file_system_dir_url_request_job.cc
index 5221650..69d8aea 100644
--- a/storage/browser/fileapi/file_system_dir_url_request_job.cc
+++ b/storage/browser/fileapi/file_system_dir_url_request_job.cc
@@ -17,12 +17,12 @@
 #include "base/threading/thread_task_runner_handle.h"
 #include "base/time/time.h"
 #include "build/build_config.h"
+#include "components/services/filesystem/public/interfaces/types.mojom.h"
 #include "net/base/directory_listing.h"
 #include "net/base/io_buffer.h"
 #include "net/url_request/url_request.h"
 #include "storage/browser/fileapi/file_system_context.h"
 #include "storage/browser/fileapi/file_system_operation_runner.h"
-#include "storage/common/fileapi/directory_entry.h"
 #include "storage/common/fileapi/file_system_util.h"
 #include "url/gurl.h"
 
@@ -93,8 +93,7 @@
     if (url_.is_valid() && VirtualPath::IsRootPath(url_.virtual_path())) {
       // Return an empty directory if the filesystem root is queried.
       DidReadDirectory(base::File::FILE_OK,
-                       std::vector<DirectoryEntry>(),
-                       false);
+                       std::vector<filesystem::mojom::DirectoryEntry>(), false);
       return;
     }
     NotifyStartError(URLRequestStatus::FromError(net::ERR_FILE_NOT_FOUND));
@@ -116,7 +115,7 @@
 
 void FileSystemDirURLRequestJob::DidReadDirectory(
     base::File::Error result,
-    std::vector<DirectoryEntry> entries,
+    std::vector<filesystem::mojom::DirectoryEntry> entries,
     bool has_more) {
   if (result != base::File::FILE_OK) {
     int rv = net::ERR_FILE_NOT_FOUND;
@@ -152,7 +151,7 @@
 }
 
 void FileSystemDirURLRequestJob::GetMetadata(size_t index) {
-  const DirectoryEntry& entry = entries_[index];
+  const filesystem::mojom::DirectoryEntry& entry = entries_[index];
   const FileSystemURL url = file_system_context_->CreateCrackedFileSystemURL(
       url_.origin(), url_.type(),
       url_.path().Append(base::FilePath(entry.name)));
@@ -178,11 +177,12 @@
   if (!request_)
     return;
 
-  const DirectoryEntry& entry = entries_[index];
+  const filesystem::mojom::DirectoryEntry& entry = entries_[index];
   const base::string16& name = base::FilePath(entry.name).LossyDisplayName();
-  data_.append(net::GetDirectoryListingEntry(name, std::string(),
-                                             entry.is_directory, file_info.size,
-                                             file_info.last_modified));
+  data_.append(net::GetDirectoryListingEntry(
+      name, std::string(),
+      entry.type == filesystem::mojom::FsFileType::DIRECTORY, file_info.size,
+      file_info.last_modified));
 
   if (index < entries_.size() - 1) {
     GetMetadata(index + 1);
diff --git a/storage/browser/fileapi/file_system_dir_url_request_job.h b/storage/browser/fileapi/file_system_dir_url_request_job.h
index 1a105014..9876c566 100644
--- a/storage/browser/fileapi/file_system_dir_url_request_job.h
+++ b/storage/browser/fileapi/file_system_dir_url_request_job.h
@@ -14,6 +14,7 @@
 #include "base/files/file_path.h"
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
+#include "components/services/filesystem/public/interfaces/types.mojom.h"
 #include "net/url_request/url_request_job.h"
 #include "storage/browser/fileapi/file_system_url.h"
 #include "storage/browser/storage_browser_export.h"
@@ -21,7 +22,6 @@
 namespace storage {
 
 class FileSystemContext;
-struct DirectoryEntry;
 
 // A request job that handles reading filesystem: URLs for directories.
 class STORAGE_EXPORT FileSystemDirURLRequestJob : public net::URLRequestJob {
@@ -51,7 +51,7 @@
   void StartAsync();
   void DidAttemptAutoMount(base::File::Error result);
   void DidReadDirectory(base::File::Error result,
-                        std::vector<DirectoryEntry> entries,
+                        std::vector<filesystem::mojom::DirectoryEntry> entries,
                         bool has_more);
 
   // Reads metadata for the |index|-th entry in the directory. Must be called
@@ -61,7 +61,7 @@
                       base::File::Error result,
                       const base::File::Info& file_info);
 
-  std::vector<DirectoryEntry> entries_;
+  std::vector<filesystem::mojom::DirectoryEntry> entries_;
   std::string data_;
   FileSystemURL url_;
   const std::string storage_domain_;
diff --git a/storage/browser/fileapi/file_system_operation.h b/storage/browser/fileapi/file_system_operation.h
index a5409d0..d8fc668 100644
--- a/storage/browser/fileapi/file_system_operation.h
+++ b/storage/browser/fileapi/file_system_operation.h
@@ -14,9 +14,9 @@
 #include "base/files/file.h"
 #include "base/files/file_path.h"
 #include "base/process/process.h"
+#include "components/services/filesystem/public/interfaces/types.mojom.h"
 #include "storage/browser/fileapi/file_system_operation_context.h"
 #include "storage/browser/storage_browser_export.h"
-#include "storage/common/fileapi/directory_entry.h"
 
 namespace base {
 class Time;
@@ -83,7 +83,7 @@
       OpenFileCallback;
 
   // Used for ReadDirectoryCallback.
-  typedef std::vector<DirectoryEntry> FileEntryList;
+  typedef std::vector<filesystem::mojom::DirectoryEntry> FileEntryList;
 
   // Used for ReadDirectory(). |result| is the return code of the operation,
   // |file_list| is the list of files read, and |has_more| is true if some files
diff --git a/storage/browser/fileapi/file_system_operation_impl_unittest.cc b/storage/browser/fileapi/file_system_operation_impl_unittest.cc
index a09834f..410be44 100644
--- a/storage/browser/fileapi/file_system_operation_impl_unittest.cc
+++ b/storage/browser/fileapi/file_system_operation_impl_unittest.cc
@@ -8,6 +8,8 @@
 #include <stdint.h>
 
 #include <memory>
+#include <string>
+#include <utility>
 
 #include "base/bind.h"
 #include "base/files/file_util.h"
@@ -21,6 +23,7 @@
 #include "base/strings/stringprintf.h"
 #include "base/test/scoped_task_environment.h"
 #include "base/threading/thread_task_runner_handle.h"
+#include "components/services/filesystem/public/interfaces/types.mojom.h"
 #include "storage/browser/blob/shareable_file_reference.h"
 #include "storage/browser/fileapi/file_system_context.h"
 #include "storage/browser/fileapi/file_system_file_util.h"
@@ -94,7 +97,7 @@
 
   const base::File::Info& info() const { return info_; }
   const base::FilePath& path() const { return path_; }
-  const std::vector<storage::DirectoryEntry>& entries() const {
+  const std::vector<filesystem::mojom::DirectoryEntry>& entries() const {
     return entries_;
   }
 
@@ -217,7 +220,7 @@
   void DidReadDirectory(base::RepeatingClosure closure,
                         base::File::Error* status,
                         base::File::Error actual,
-                        std::vector<storage::DirectoryEntry> entries,
+                        std::vector<filesystem::mojom::DirectoryEntry> entries,
                         bool /* has_more */) {
     entries_ = std::move(entries);
     *status = actual;
@@ -477,7 +480,7 @@
   // For post-operation status.
   base::File::Info info_;
   base::FilePath path_;
-  std::vector<storage::DirectoryEntry> entries_;
+  std::vector<filesystem::mojom::DirectoryEntry> entries_;
   scoped_refptr<ShareableFileReference> shareable_file_ref_;
 
   storage::MockFileChangeObserver change_observer_;
@@ -1019,10 +1022,10 @@
   EXPECT_EQ(2u, entries().size());
 
   for (size_t i = 0; i < entries().size(); ++i) {
-    if (entries()[i].is_directory)
-      EXPECT_EQ(FILE_PATH_LITERAL("child_dir"), entries()[i].name);
+    if (entries()[i].type == filesystem::mojom::FsFileType::DIRECTORY)
+      EXPECT_EQ(FILE_PATH_LITERAL("child_dir"), entries()[i].name.value());
     else
-      EXPECT_EQ(FILE_PATH_LITERAL("child_file"), entries()[i].name);
+      EXPECT_EQ(FILE_PATH_LITERAL("child_file"), entries()[i].name.value());
   }
   EXPECT_EQ(1, quota_manager_proxy()->notify_storage_accessed_count());
   EXPECT_TRUE(change_observer()->HasNoChange());
diff --git a/storage/browser/fileapi/file_system_operation_runner.cc b/storage/browser/fileapi/file_system_operation_runner.cc
index 276b7c4..772a3d0 100644
--- a/storage/browser/fileapi/file_system_operation_runner.cc
+++ b/storage/browser/fileapi/file_system_operation_runner.cc
@@ -228,7 +228,7 @@
       BeginOperation(std::move(operation), scope.AsWeakPtr());
   if (!operation_raw) {
     DidReadDirectory(handle, std::move(callback), error,
-                     std::vector<DirectoryEntry>(), false);
+                     std::vector<filesystem::mojom::DirectoryEntry>(), false);
     return handle.id;
   }
   PrepareForRead(handle.id, url);
@@ -588,7 +588,7 @@
     const OperationHandle& handle,
     const ReadDirectoryCallback& callback,
     base::File::Error rv,
-    std::vector<DirectoryEntry> entries,
+    std::vector<filesystem::mojom::DirectoryEntry> entries,
     bool has_more) {
   if (handle.scope) {
     finished_operations_.insert(handle.id);
diff --git a/storage/browser/fileapi/file_system_operation_runner.h b/storage/browser/fileapi/file_system_operation_runner.h
index 9eb2a53..fe1e2dc 100644
--- a/storage/browser/fileapi/file_system_operation_runner.h
+++ b/storage/browser/fileapi/file_system_operation_runner.h
@@ -15,6 +15,7 @@
 #include "base/containers/id_map.h"
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
+#include "components/services/filesystem/public/interfaces/types.mojom.h"
 #include "storage/browser/blob/blob_data_handle.h"
 #include "storage/browser/fileapi/file_system_operation.h"
 #include "storage/browser/fileapi/file_system_url.h"
@@ -269,7 +270,7 @@
   void DidReadDirectory(const OperationHandle& handle,
                         const ReadDirectoryCallback& callback,
                         base::File::Error rv,
-                        std::vector<DirectoryEntry> entries,
+                        std::vector<filesystem::mojom::DirectoryEntry> entries,
                         bool has_more);
   void DidWrite(const OperationHandle& handle,
                 const WriteCallback& callback,
diff --git a/storage/browser/fileapi/obfuscated_file_util_unittest.cc b/storage/browser/fileapi/obfuscated_file_util_unittest.cc
index a5d11990..2c5aa254 100644
--- a/storage/browser/fileapi/obfuscated_file_util_unittest.cc
+++ b/storage/browser/fileapi/obfuscated_file_util_unittest.cc
@@ -23,6 +23,7 @@
 #include "base/test/scoped_task_environment.h"
 #include "base/threading/thread_task_runner_handle.h"
 #include "build/build_config.h"
+#include "components/services/filesystem/public/interfaces/types.mojom.h"
 #include "storage/browser/fileapi/external_mount_points.h"
 #include "storage/browser/fileapi/file_system_backend.h"
 #include "storage/browser/fileapi/file_system_context.h"
@@ -457,7 +458,7 @@
       std::set<base::FilePath::StringType>* files,
       std::set<base::FilePath::StringType>* directories) {
     std::unique_ptr<FileSystemOperationContext> context;
-    std::vector<storage::DirectoryEntry> entries;
+    std::vector<filesystem::mojom::DirectoryEntry> entries;
     EXPECT_EQ(base::File::FILE_OK,
               AsyncFileTestHelper::ReadDirectory(file_system_context(),
                                                  root_url, &entries));
@@ -499,27 +500,27 @@
     FillTestDirectory(root_url, &files, &directories);
 
     std::unique_ptr<FileSystemOperationContext> context;
-    std::vector<storage::DirectoryEntry> entries;
+    std::vector<filesystem::mojom::DirectoryEntry> entries;
     context.reset(NewContext(NULL));
     EXPECT_EQ(base::File::FILE_OK,
               AsyncFileTestHelper::ReadDirectory(
                   file_system_context(), root_url, &entries));
-    std::vector<storage::DirectoryEntry>::iterator entry_iter;
+    std::vector<filesystem::mojom::DirectoryEntry>::iterator entry_iter;
     EXPECT_EQ(files.size() + directories.size(), entries.size());
     EXPECT_TRUE(change_observer()->HasNoChange());
     for (entry_iter = entries.begin(); entry_iter != entries.end();
         ++entry_iter) {
-      const storage::DirectoryEntry& entry = *entry_iter;
+      const filesystem::mojom::DirectoryEntry& entry = *entry_iter;
       std::set<base::FilePath::StringType>::iterator iter =
-          files.find(entry.name);
+          files.find(entry.name.value());
       if (iter != files.end()) {
-        EXPECT_FALSE(entry.is_directory);
+        EXPECT_EQ(entry.type, filesystem::mojom::FsFileType::REGULAR_FILE);
         files.erase(iter);
         continue;
       }
-      iter = directories.find(entry.name);
+      iter = directories.find(entry.name.value());
       EXPECT_FALSE(directories.end() == iter);
-      EXPECT_TRUE(entry.is_directory);
+      EXPECT_EQ(entry.type, filesystem::mojom::FsFileType::DIRECTORY);
       directories.erase(iter);
     }
   }
@@ -1233,7 +1234,7 @@
             ofu()->EnsureFileExists(context.get(), url, &created));
   ASSERT_TRUE(created);
 
-  std::vector<storage::DirectoryEntry> entries;
+  std::vector<filesystem::mojom::DirectoryEntry> entries;
   EXPECT_EQ(base::File::FILE_ERROR_NOT_A_DIRECTORY,
             AsyncFileTestHelper::ReadDirectory(file_system_context(), url,
                                                &entries));
@@ -1811,7 +1812,7 @@
     EXPECT_TRUE(created);
   }
 
-  std::vector<storage::DirectoryEntry> entries;
+  std::vector<filesystem::mojom::DirectoryEntry> entries;
   EXPECT_EQ(base::File::FILE_OK,
             AsyncFileTestHelper::ReadDirectory(
                 file_system_context(), empty_path, &entries));
diff --git a/storage/browser/fileapi/recursive_operation_delegate.cc b/storage/browser/fileapi/recursive_operation_delegate.cc
index b7a2e4a..c48faa1 100644
--- a/storage/browser/fileapi/recursive_operation_delegate.cc
+++ b/storage/browser/fileapi/recursive_operation_delegate.cc
@@ -118,7 +118,7 @@
         parent.origin(),
         parent.mount_type(),
         parent.virtual_path().Append(entries[i].name));
-    if (entries[i].is_directory)
+    if (entries[i].type == filesystem::mojom::FsFileType::DIRECTORY)
       pending_directory_stack_.top().push(url);
     else
       pending_files_.push(url);
diff --git a/storage/common/BUILD.gn b/storage/common/BUILD.gn
index 9335c02d..712adb6 100644
--- a/storage/common/BUILD.gn
+++ b/storage/common/BUILD.gn
@@ -15,8 +15,6 @@
     "database/database_connections.h",
     "database/database_identifier.cc",
     "database/database_identifier.h",
-    "fileapi/directory_entry.cc",
-    "fileapi/directory_entry.h",
     "fileapi/file_system_info.cc",
     "fileapi/file_system_info.h",
     "fileapi/file_system_mount_option.h",
@@ -38,6 +36,7 @@
   defines = [ "STORAGE_COMMON_IMPLEMENTATION" ]
 
   public_deps = [
+    "//components/services/filesystem/public/interfaces",
     "//services/network/public/mojom",
     "//third_party/WebKit/public:blink_headers",
   ]
diff --git a/storage/common/fileapi/directory_entry.cc b/storage/common/fileapi/directory_entry.cc
deleted file mode 100644
index f972745..0000000
--- a/storage/common/fileapi/directory_entry.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2013 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 "storage/common/fileapi/directory_entry.h"
-
-namespace storage {
-
-DirectoryEntry::DirectoryEntry() : is_directory(false) {}
-
-DirectoryEntry::DirectoryEntry(const std::string& name, DirectoryEntryType type)
-    : name(base::FilePath::FromUTF8Unsafe(name).value()),
-      is_directory(type == DIRECTORY) {}
-
-}  // namespace storage
diff --git a/storage/common/fileapi/directory_entry.h b/storage/common/fileapi/directory_entry.h
deleted file mode 100644
index 0f86030f..0000000
--- a/storage/common/fileapi/directory_entry.h
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2013 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 STORAGE_COMMON_FILEAPI_DIRECTORY_ENTRY_H_
-#define STORAGE_COMMON_FILEAPI_DIRECTORY_ENTRY_H_
-
-#include <string>
-
-#include "base/files/file_path.h"
-#include "base/time/time.h"
-#include "storage/common/storage_common_export.h"
-
-namespace storage {
-
-// Holds metadata for file or directory entry.
-struct STORAGE_COMMON_EXPORT DirectoryEntry {
-  enum DirectoryEntryType {
-    FILE,
-    DIRECTORY,
-  };
-
-  DirectoryEntry();
-  DirectoryEntry(const std::string& name, DirectoryEntryType type);
-
-  base::FilePath::StringType name;
-  bool is_directory;
-};
-
-}  // namespace storage
-
-#endif  // STORAGE_COMMON_FILEAPI_DIRECTORY_ENTRY_H_
diff --git a/styleguide/web/web.md b/styleguide/web/web.md
index 1724838..e657ab394 100644
--- a/styleguide/web/web.md
+++ b/styleguide/web/web.md
@@ -268,7 +268,7 @@
 The contents of file.png are base64-encoded and the `url()` is replaced with
 
 ```css
-background-image: url(data:image/xml+svg;base64,...);
+background-image: url(data:image/svg+xml;base64,...);
 ```
 
 if `flattenhtml="true"` is specified in your .grd file.
diff --git a/testing/buildbot/chromium.fyi.json b/testing/buildbot/chromium.fyi.json
index ac19f22..2d7c72a6 100644
--- a/testing/buildbot/chromium.fyi.json
+++ b/testing/buildbot/chromium.fyi.json
@@ -3665,8 +3665,7 @@
       },
       {
         "args": [
-          "--test-launcher-filter-file=../../testing/buildbot/filters/fuchsia.ui_base_unittests.filter",
-          "--use-new-test-runner"
+          "--test-launcher-filter-file=../../testing/buildbot/filters/fuchsia.ui_base_unittests.filter"
         ],
         "swarming": {
           "can_use_on_swarming_builders": true,
diff --git a/testing/buildbot/filters/fuchsia.base_unittests.filter b/testing/buildbot/filters/fuchsia.base_unittests.filter
index dc2866d..95c4e9f 100644
--- a/testing/buildbot/filters/fuchsia.base_unittests.filter
+++ b/testing/buildbot/filters/fuchsia.base_unittests.filter
@@ -28,6 +28,12 @@
 -SysInfoTest.AmountOfMem
 -SysInfoTest.AmountOfTotalDiskSpace
 
+# These tests are affected by an issue with cloning namespace entries from
+# inside a package. See https://crbug.com/826018
+-ProcessUtilTest.CloneAlternateDir
+-ProcessUtilTest.KillSlowChild
+-ProcessUtilTest.SelectivelyClonedDir
+
 # These tests all rely on being able to set the exit code of an externally
 # terminated process, which mx_task_kill() does not support.
 # https://crbug.com/753490.
diff --git a/testing/buildbot/test_suite_exceptions.pyl b/testing/buildbot/test_suite_exceptions.pyl
index a8deb68..bb16c3d9 100644
--- a/testing/buildbot/test_suite_exceptions.pyl
+++ b/testing/buildbot/test_suite_exceptions.pyl
@@ -3329,12 +3329,6 @@
           'hard_timeout': 120,
         },
       },
-      # chromium.fyi
-      'Fuchsia': {
-        'args': [
-          '--use-new-test-runner',
-        ],
-      },
     },
   },
   'ui_touch_selection_unittests': {
diff --git a/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG b/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
index 055d440..92fdfc6 100644
--- a/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
+++ b/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
@@ -130,7 +130,6 @@
 crbug.com/591099 css1/box_properties/float_on_text_elements.html [ Failure ]
 crbug.com/591099 css1/classification/list_style.html [ Failure ]
 crbug.com/591099 css1/classification/list_style_image.html [ Failure ]
-crbug.com/591099 css1/font_properties/font_variant.html [ Failure Pass ]
 crbug.com/591099 css2.1/20110323/margin-applies-to-008.htm [ Failure ]
 crbug.com/714962 css2.1/20110323/overflow-applies-to-012.htm [ Failure ]
 crbug.com/591099 css2.1/20110323/table-caption-margins-001.htm [ Failure ]
@@ -500,9 +499,6 @@
 crbug.com/714962 external/wpt/css/css-transforms/transform-origin-006.html [ Failure ]
 crbug.com/591099 external/wpt/css/css-transforms/transform-transformed-tr-percent-height-child.html [ Failure ]
 crbug.com/591099 external/wpt/css/css-transforms/transform3d-perspective-008.html [ Pass ]
-crbug.com/591099 external/wpt/css/css-transitions/properties-value-001.html [ Timeout ]
-crbug.com/591099 external/wpt/css/css-transitions/properties-value-inherit-001.html [ Timeout ]
-crbug.com/591099 external/wpt/css/css-transitions/properties-value-inherit-002.html [ Timeout ]
 crbug.com/591099 external/wpt/css/css-ui/box-sizing-007.html [ Failure ]
 crbug.com/591099 external/wpt/css/css-ui/box-sizing-008.html [ Failure ]
 crbug.com/591099 external/wpt/css/css-ui/box-sizing-009.html [ Failure ]
@@ -658,23 +654,23 @@
 crbug.com/591099 external/wpt/css/css-writing-modes/text-combine-upright-decorations-001.html [ Failure ]
 crbug.com/591099 external/wpt/css/css-writing-modes/text-combine-upright-layout-rules-001.html [ Failure ]
 crbug.com/591099 external/wpt/css/css-writing-modes/text-orientation-016.xht [ Failure ]
-crbug.com/591099 external/wpt/css/css-writing-modes/text-orientation-script-001a.html [ Failure ]
-crbug.com/591099 external/wpt/css/css-writing-modes/text-orientation-script-001b.html [ Failure ]
-crbug.com/591099 external/wpt/css/css-writing-modes/text-orientation-script-001c.html [ Failure ]
-crbug.com/591099 external/wpt/css/css-writing-modes/text-orientation-script-001d.html [ Failure ]
-crbug.com/591099 external/wpt/css/css-writing-modes/text-orientation-script-001e.html [ Failure ]
-crbug.com/591099 external/wpt/css/css-writing-modes/text-orientation-script-001f.html [ Failure ]
-crbug.com/591099 external/wpt/css/css-writing-modes/text-orientation-script-001g.html [ Failure ]
-crbug.com/591099 external/wpt/css/css-writing-modes/text-orientation-script-001h.html [ Failure ]
-crbug.com/591099 external/wpt/css/css-writing-modes/text-orientation-script-001i.html [ Failure ]
-crbug.com/591099 external/wpt/css/css-writing-modes/text-orientation-script-001j.html [ Failure ]
-crbug.com/591099 external/wpt/css/css-writing-modes/text-orientation-script-001k.html [ Failure ]
-crbug.com/591099 external/wpt/css/css-writing-modes/text-orientation-script-001l.html [ Failure ]
-crbug.com/591099 external/wpt/css/css-writing-modes/text-orientation-script-001m.html [ Failure ]
-crbug.com/591099 external/wpt/css/css-writing-modes/text-orientation-script-001n.html [ Failure ]
-crbug.com/591099 external/wpt/css/css-writing-modes/text-orientation-script-001o.html [ Failure ]
-crbug.com/591099 external/wpt/css/css-writing-modes/text-orientation-script-001p.html [ Failure ]
-crbug.com/591099 external/wpt/css/css-writing-modes/text-orientation-script-001q.html [ Failure ]
+crbug.com/591099 external/wpt/css/css-writing-modes/text-orientation-script-001a.html [ Failure Pass ]
+crbug.com/591099 external/wpt/css/css-writing-modes/text-orientation-script-001b.html [ Failure Pass ]
+crbug.com/591099 external/wpt/css/css-writing-modes/text-orientation-script-001c.html [ Failure Pass ]
+crbug.com/591099 external/wpt/css/css-writing-modes/text-orientation-script-001d.html [ Failure Pass ]
+crbug.com/591099 external/wpt/css/css-writing-modes/text-orientation-script-001e.html [ Failure Pass ]
+crbug.com/591099 external/wpt/css/css-writing-modes/text-orientation-script-001f.html [ Failure Pass ]
+crbug.com/591099 external/wpt/css/css-writing-modes/text-orientation-script-001g.html [ Failure Pass ]
+crbug.com/591099 external/wpt/css/css-writing-modes/text-orientation-script-001h.html [ Failure Pass ]
+crbug.com/591099 external/wpt/css/css-writing-modes/text-orientation-script-001i.html [ Failure Pass ]
+crbug.com/591099 external/wpt/css/css-writing-modes/text-orientation-script-001j.html [ Failure Pass ]
+crbug.com/591099 external/wpt/css/css-writing-modes/text-orientation-script-001k.html [ Failure Pass ]
+crbug.com/591099 external/wpt/css/css-writing-modes/text-orientation-script-001l.html [ Failure Pass ]
+crbug.com/591099 external/wpt/css/css-writing-modes/text-orientation-script-001m.html [ Failure Pass ]
+crbug.com/591099 external/wpt/css/css-writing-modes/text-orientation-script-001n.html [ Failure Pass ]
+crbug.com/591099 external/wpt/css/css-writing-modes/text-orientation-script-001o.html [ Failure Pass ]
+crbug.com/591099 external/wpt/css/css-writing-modes/text-orientation-script-001p.html [ Failure Pass ]
+crbug.com/591099 external/wpt/css/css-writing-modes/text-orientation-script-001q.html [ Failure Pass ]
 crbug.com/591099 external/wpt/css/css-writing-modes/vertical-alignment-005.xht [ Failure ]
 crbug.com/591099 external/wpt/css/css-writing-modes/vertical-alignment-007.xht [ Failure ]
 crbug.com/591099 external/wpt/css/css-writing-modes/vertical-alignment-vlr-023.xht [ Failure ]
@@ -700,7 +696,6 @@
 crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-writing-mode-015.html [ Failure ]
 crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/writing-modes-3/text-combine-upright-break-inside-001.html [ Failure ]
 crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/writing-modes-3/text-combine-upright-compression-007.html [ Failure ]
-crbug.com/591099 external/wpt/dom/interfaces.html [ Pass Timeout ]
 crbug.com/591099 external/wpt/dom/nodes/Element-classlist.html [ Timeout ]
 crbug.com/591099 external/wpt/dom/nodes/Element-matches.html [ Timeout ]
 crbug.com/591099 external/wpt/dom/nodes/Element-webkitMatchesSelector.html [ Timeout ]
@@ -716,8 +711,8 @@
 crbug.com/591099 external/wpt/dom/ranges/Range-mutations-dataChange.html [ Timeout ]
 crbug.com/591099 external/wpt/dom/ranges/Range-set.html [ Timeout ]
 crbug.com/591099 external/wpt/dom/ranges/Range-surroundContents.html [ Timeout ]
-crbug.com/591099 external/wpt/domxpath/xml_xpath_runner.html [ Pass Timeout ]
-crbug.com/591099 external/wpt/editing/run/backcolor.html [ Pass Timeout ]
+crbug.com/591099 external/wpt/domxpath/xml_xpath_runner.html [ Timeout ]
+crbug.com/591099 external/wpt/editing/run/backcolor.html [ Timeout ]
 crbug.com/591099 external/wpt/editing/run/bold.html [ Timeout ]
 crbug.com/591099 external/wpt/editing/run/fontname.html [ Timeout ]
 crbug.com/591099 external/wpt/editing/run/fontsize.html [ Timeout ]
@@ -726,7 +721,7 @@
 crbug.com/591099 external/wpt/editing/run/forwarddelete.html [ Timeout ]
 crbug.com/591099 external/wpt/editing/run/hilitecolor.html [ Timeout ]
 crbug.com/591099 external/wpt/editing/run/indent.html [ Timeout ]
-crbug.com/591099 external/wpt/editing/run/inserthorizontalrule.html [ Pass Timeout ]
+crbug.com/591099 external/wpt/editing/run/inserthorizontalrule.html [ Timeout ]
 crbug.com/591099 external/wpt/editing/run/inserthtml.html [ Timeout ]
 crbug.com/591099 external/wpt/editing/run/insertlinebreak.html [ Timeout ]
 crbug.com/591099 external/wpt/editing/run/insertorderedlist.html [ Timeout ]
@@ -838,7 +833,7 @@
 crbug.com/591099 external/wpt/encoding/legacy-mb-tchinese/big5/big5-encode-href-errors-misc.html [ Timeout ]
 crbug.com/591099 external/wpt/encoding/legacy-mb-tchinese/big5/big5-encode-href.html [ Timeout ]
 crbug.com/591099 external/wpt/encoding/textdecoder-fatal-single-byte.html [ Timeout ]
-crbug.com/591099 external/wpt/geolocation-API/PositionOptions.https.html [ Failure Pass ]
+crbug.com/591099 external/wpt/geolocation-API/PositionOptions.https.html [ Failure ]
 crbug.com/591099 external/wpt/html-media-capture/capture_audio_cancel-manual.html [ Failure ]
 crbug.com/591099 external/wpt/html-media-capture/capture_image_cancel-manual.html [ Failure ]
 crbug.com/591099 external/wpt/html-media-capture/capture_video_cancel-manual.html [ Failure ]
@@ -906,11 +901,10 @@
 crbug.com/591099 external/wpt/svg/linking/reftests/href-filter-element.html [ Failure ]
 crbug.com/591099 external/wpt/url/url-setters.html [ Pass Timeout ]
 crbug.com/591099 external/wpt/wasm/wasm_local_iframe_test.html [ Failure ]
-crbug.com/591099 external/wpt/webaudio/idlharness.https.html [ Pass Timeout ]
+crbug.com/591099 external/wpt/webaudio/idlharness.https.html [ Timeout ]
 crbug.com/591099 external/wpt/webmessaging/broadcastchannel/sandbox.html [ Failure ]
 crbug.com/591099 external/wpt/webrtc/RTCPeerConnection-setLocalDescription-answer.html [ Pass ]
 crbug.com/591099 external/wpt/webrtc/interfaces.html [ Pass Timeout ]
-crbug.com/591099 external/wpt/webrtc/interfaces.https.html [ Pass Timeout ]
 crbug.com/591099 external/wpt/webstorage/storage_setitem.html [ Pass Timeout ]
 crbug.com/591099 external/wpt/webvtt/rendering/cues-with-video/processing-model/2_cues_overlapping_completely_move_up.html [ Failure ]
 crbug.com/591099 external/wpt/webvtt/rendering/cues-with-video/processing-model/2_cues_overlapping_partially_move_up.html [ Failure ]
@@ -962,7 +956,6 @@
 crbug.com/810370 fast/block/float/overhanging-float-remove-from-fixed-position-block2.html [ Failure ]
 crbug.com/591099 fast/block/float/overlapping-floats-paint-hittest-order-1.html [ Failure ]
 crbug.com/591099 fast/block/line-layout/floats-do-not-fit-on-line.html [ Failure ]
-crbug.com/591099 fast/block/margin-collapse/103.html [ Failure Pass ]
 crbug.com/591099 fast/block/margin-collapse/webkit-margin-collapse-container.html [ Failure ]
 crbug.com/591099 fast/block/margin-collapse/webkit-margin-collapse-separate-position.html [ Failure ]
 crbug.com/591099 fast/block/margin-collapse/webkit-margin-collapse-siblings.html [ Failure ]
@@ -1265,7 +1258,7 @@
 crbug.com/714962 fast/events/event-on-culled_inline.html [ Failure ]
 crbug.com/591099 fast/events/keyboardevent-getModifierState.html [ Timeout ]
 crbug.com/714962 fast/events/middleClickAutoscroll-latching.html [ Timeout ]
-crbug.com/714962 fast/events/mouse-down-on-pseudo-element-remove-crash.html [ Failure Pass ]
+crbug.com/714962 fast/events/mouse-down-on-pseudo-element-remove-crash.html [ Failure ]
 crbug.com/591099 fast/events/mouse-event-buttons-attribute.html [ Timeout ]
 crbug.com/591099 fast/events/mouse-relative-position.html [ Failure ]
 crbug.com/591099 fast/events/mouseevent-getModifierState.html [ Timeout ]
@@ -1275,7 +1268,7 @@
 crbug.com/591099 fast/events/pointerevents/mouse-pointer-capture.html [ Timeout ]
 crbug.com/591099 fast/events/pointerevents/mouse-pointer-event-properties.html [ Timeout ]
 crbug.com/591099 fast/events/pointerevents/mouse-pointer-preventdefault.html [ Timeout ]
-crbug.com/591099 fast/events/pointerevents/multi-pointer-preventdefault.html [ Pass Timeout ]
+crbug.com/591099 fast/events/pointerevents/multi-pointer-preventdefault.html [ Timeout ]
 crbug.com/591099 fast/events/pointerevents/touch-capture-in-iframe.html [ Timeout ]
 crbug.com/591099 fast/events/pointerevents/touch-capture.html [ Timeout ]
 crbug.com/591099 fast/events/select-element.html [ Timeout ]
@@ -1297,7 +1290,6 @@
 crbug.com/591099 fast/forms/label/label-selection-by-textSelection-and-click.html [ Failure Pass ]
 crbug.com/591099 fast/forms/long-text-in-input.html [ Crash Failure ]
 crbug.com/591099 fast/forms/placeholder-position.html [ Failure ]
-crbug.com/591099 fast/forms/select-popup/popup-menu-appearance-transform.html [ Failure Pass ]
 crbug.com/591099 fast/forms/select/select-initial-position.html [ Failure ]
 crbug.com/591099 fast/forms/select/select-style.html [ Failure ]
 crbug.com/591099 fast/forms/selection-direction.html [ Timeout ]
@@ -1307,7 +1299,6 @@
 crbug.com/591099 fast/forms/textarea/textarea-align.html [ Failure ]
 crbug.com/591099 fast/forms/textarea/textarea-metrics.html [ Timeout ]
 crbug.com/591099 fast/forms/time-multiple-fields/time-multiple-fields-stepup-stepdown-from-renderer.html [ Timeout ]
-crbug.com/591099 fast/forms/validation-bubble-appearance-rtl-ui.html [ Failure Pass ]
 crbug.com/591099 fast/frames/iframe-with-frameborder.html [ Failure ]
 crbug.com/591099 fast/gradients/list-item-gradient.html [ Failure ]
 crbug.com/591099 fast/gradients/radial-centered.html [ Failure ]
@@ -1341,6 +1332,7 @@
 crbug.com/591099 fast/js/dfg-byte-array-put.html [ Timeout ]
 crbug.com/591099 fast/js/document-all-triggers-masquerades-watchpoint.html [ Timeout ]
 crbug.com/591099 fast/layers/scroll-rect-to-visible.html [ Failure ]
+crbug.com/591099 fast/layout/scroll-anchoring/fullscreen-crash.html [ Crash ]
 crbug.com/591099 fast/lists/001-vertical.html [ Failure ]
 crbug.com/591099 fast/lists/001.html [ Failure ]
 crbug.com/591099 fast/lists/002-vertical.html [ Failure ]
@@ -1530,7 +1522,7 @@
 crbug.com/591099 fast/shapes/shape-outside-floats/shape-outside-rounded-inset.html [ Failure ]
 crbug.com/591099 fast/spatial-navigation/snav-fully-aligned-vertically.html [ Failure ]
 crbug.com/591099 fast/spatial-navigation/snav-iframe-with-offscreen-focusable-element.html [ Failure ]
-crbug.com/591099 fast/spatial-navigation/snav-stay-in-overflow-div.html [ Failure ]
+crbug.com/591099 fast/spatial-navigation/snav-stay-in-overflow-div.html [ Failure Pass ]
 crbug.com/591099 fast/sub-pixel/computedstylemargin.html [ Failure ]
 crbug.com/591099 fast/sub-pixel/inline-block-with-padding.html [ Failure ]
 crbug.com/591099 fast/sub-pixel/sub-pixel-border-2.html [ Failure ]
@@ -1584,7 +1576,7 @@
 crbug.com/591099 fast/table/percent-height-content-in-fixed-height-border-box-sized-cell-with-collapsed-border.html [ Failure ]
 crbug.com/591099 fast/table/percent-height-content-in-fixed-height-content-box-sized-cell.html [ Failure ]
 crbug.com/591099 fast/table/percent-height-overflow-auto-content-in-cell.html [ Failure Pass ]
-crbug.com/591099 fast/table/percent-height-overflow-scroll-content-in-cell.html [ Failure Pass ]
+crbug.com/591099 fast/table/percent-height-overflow-scroll-content-in-cell.html [ Failure ]
 crbug.com/591099 fast/table/percent-widths-stretch-vertical.html [ Failure ]
 crbug.com/714962 fast/table/split-table-section-before-anonymous-block-2.html [ Failure ]
 crbug.com/714962 fast/table/split-table-section-before-anonymous-block-3.html [ Failure ]
@@ -1793,7 +1785,7 @@
 crbug.com/591099 http/tests/csspaint/invalidation-background-image.html [ Timeout ]
 crbug.com/591099 http/tests/csspaint/invalidation-border-image.html [ Timeout ]
 crbug.com/591099 http/tests/csspaint/invalidation-content-image.html [ Timeout ]
-crbug.com/591099 http/tests/devtools/console/console-prompt-keyboard.js [ Failure ]
+crbug.com/591099 http/tests/devtools/console/console-prompt-keyboard.js [ Failure Pass ]
 crbug.com/591099 http/tests/devtools/console/console-search.js [ Timeout ]
 crbug.com/591099 http/tests/devtools/console/console-uncaught-promise.js [ Failure ]
 crbug.com/591099 http/tests/devtools/console/console-viewport-control.js [ Failure ]
@@ -1801,16 +1793,16 @@
 crbug.com/591099 http/tests/devtools/editor/text-editor-ctrl-d-1.js [ Timeout ]
 crbug.com/591099 http/tests/devtools/editor/text-editor-ctrl-d-2.js [ Timeout ]
 crbug.com/714962 http/tests/devtools/editor/text-editor-formatter.js [ Timeout ]
-crbug.com/591099 http/tests/devtools/editor/text-editor-word-jumps.js [ Timeout ]
+crbug.com/591099 http/tests/devtools/editor/text-editor-word-jumps.js [ Pass Timeout ]
 crbug.com/714962 http/tests/devtools/elements/edit/edit-dom-actions-4.js [ Crash ]
 crbug.com/591099 http/tests/devtools/elements/elements-panel-rewrite-href.js [ Failure Pass ]
 crbug.com/591099 http/tests/devtools/elements/highlight/highlight-css-shapes-outside-scroll.js [ Failure ]
 crbug.com/591099 http/tests/devtools/elements/highlight/highlight-css-shapes-outside.js [ Failure ]
 crbug.com/714962 http/tests/devtools/elements/inspect-pseudo-element.js [ Timeout ]
 crbug.com/591099 http/tests/devtools/elements/styles-3/styles-disable-inherited.js [ Failure ]
-crbug.com/714962 http/tests/devtools/jump-to-previous-editing-location.js [ Failure ]
+crbug.com/714962 http/tests/devtools/jump-to-previous-editing-location.js [ Failure Pass ]
 crbug.com/591099 http/tests/devtools/network/network-datareceived.js [ Failure ]
-crbug.com/714962 http/tests/devtools/service-workers/service-workers-view.js [ Failure Pass Timeout ]
+crbug.com/714962 http/tests/devtools/service-workers/service-workers-view.js [ Failure Pass ]
 crbug.com/591099 http/tests/devtools/text-autosizing-override.js [ Failure ]
 crbug.com/591099 http/tests/devtools/tracing/scroll-invalidations.js [ Failure ]
 crbug.com/591099 http/tests/devtools/tracing/timeline-misc/timeline-bound-function.js [ Failure ]
@@ -2364,8 +2356,8 @@
 crbug.com/591099 tables/mozilla_expected_failures/marvin/table_overflow_caption_left.html [ Failure ]
 crbug.com/591099 tables/mozilla_expected_failures/marvin/table_overflow_caption_right.html [ Failure ]
 crbug.com/591099 tables/mozilla_expected_failures/marvin/table_overflow_caption_top.html [ Failure ]
-crbug.com/714962 touchadjustment/context-menu-select-text.html [ Failure ]
-crbug.com/714962 touchadjustment/context-menu-text-subtargets.html [ Failure ]
+crbug.com/714962 touchadjustment/context-menu-select-text.html [ Failure Pass ]
+crbug.com/714962 touchadjustment/context-menu-text-subtargets.html [ Failure Pass ]
 crbug.com/591099 transforms/2d/compound-transforms-vs-containers.html [ Failure ]
 crbug.com/591099 transforms/2d/hindi-rotated.html [ Failure ]
 crbug.com/591099 transforms/2d/transform-2d.html [ Timeout ]
@@ -2389,6 +2381,7 @@
 crbug.com/591099 virtual/gpu-rasterization/images/percent-height-image.html [ Failure ]
 crbug.com/591099 virtual/gpu-rasterization/images/rendering-broken-block-flow-images.html [ Failure ]
 crbug.com/591099 virtual/gpu-rasterization/images/rendering-broken-images.html [ Failure ]
+crbug.com/591099 virtual/gpu/fast/canvas/OffscreenCanvas-2d-pattern-in-worker.html [ Pass ]
 crbug.com/714962 virtual/gpu/fast/canvas/canvas-css-clip-path.html [ Failure Pass ]
 crbug.com/591099 virtual/gpu/fast/canvas/canvas-drawImage-video-imageSmoothingEnabled.html [ Pass ]
 crbug.com/591099 virtual/gpu/fast/canvas/canvas-imageSmoothingQuality.html [ Pass ]
@@ -2404,8 +2397,8 @@
 crbug.com/714962 virtual/mouseevent_fractional/fast/events/drag-in-frames.html [ Failure ]
 crbug.com/714962 virtual/mouseevent_fractional/fast/events/event-on-culled_inline.html [ Failure ]
 crbug.com/591099 virtual/mouseevent_fractional/fast/events/keyboardevent-getModifierState.html [ Timeout ]
-crbug.com/591099 virtual/mouseevent_fractional/fast/events/menu-key-context-menu-document-pinch-zoom.html [ Failure ]
-crbug.com/714962 virtual/mouseevent_fractional/fast/events/middleClickAutoscroll-latching.html [ Pass Timeout ]
+crbug.com/591099 virtual/mouseevent_fractional/fast/events/menu-key-context-menu-document-pinch-zoom.html [ Failure Pass ]
+crbug.com/714962 virtual/mouseevent_fractional/fast/events/middleClickAutoscroll-latching.html [ Timeout ]
 crbug.com/714962 virtual/mouseevent_fractional/fast/events/mouse-down-on-pseudo-element-remove-crash.html [ Failure ]
 crbug.com/591099 virtual/mouseevent_fractional/fast/events/mouse-event-buttons-attribute.html [ Timeout ]
 crbug.com/591099 virtual/mouseevent_fractional/fast/events/mouse-relative-position.html [ Failure ]
@@ -2415,7 +2408,7 @@
 crbug.com/591099 virtual/mouseevent_fractional/fast/events/pointerevents/mouse-pointer-capture-transition-events.html [ Timeout ]
 crbug.com/591099 virtual/mouseevent_fractional/fast/events/pointerevents/mouse-pointer-capture.html [ Timeout ]
 crbug.com/591099 virtual/mouseevent_fractional/fast/events/pointerevents/mouse-pointer-preventdefault.html [ Timeout ]
-crbug.com/591099 virtual/mouseevent_fractional/fast/events/pointerevents/multi-pointer-preventdefault.html [ Pass Timeout ]
+crbug.com/591099 virtual/mouseevent_fractional/fast/events/pointerevents/multi-pointer-preventdefault.html [ Timeout ]
 crbug.com/591099 virtual/mouseevent_fractional/fast/events/pointerevents/touch-capture-in-iframe.html [ Timeout ]
 crbug.com/591099 virtual/mouseevent_fractional/fast/events/pointerevents/touch-capture.html [ Timeout ]
 crbug.com/591099 virtual/mouseevent_fractional/fast/events/select-element.html [ Timeout ]
@@ -2430,7 +2423,6 @@
 crbug.com/591099 virtual/outofblink-cors/ [ Skip ]
 crbug.com/591099 virtual/paint-timing/external/wpt/paint-timing/sibling-painting-first-image.html [ Failure ]
 crbug.com/591099 virtual/prefer_compositing_to_lcd_text/ [ Skip ]
-crbug.com/714962 virtual/pwa-full-code-cache/http/tests/devtools/service-workers/service-workers-view.js [ Failure Pass ]
 crbug.com/591099 virtual/reporting-api/external/wpt/content-security-policy/reporting-api/reporting-api-doesnt-send-reports-without-violation.https.sub.html [ Pass ]
 crbug.com/591099 virtual/scalefactor150/fast/hidpi/static/popup-menu-with-scrollbar-appearance.html [ Failure ]
 crbug.com/591099 virtual/scalefactor200/fast/hidpi/static/popup-menu-with-scrollbar-appearance.html [ Failure ]
diff --git a/third_party/WebKit/LayoutTests/TestExpectations b/third_party/WebKit/LayoutTests/TestExpectations
index e03ad93..1ebf12c 100644
--- a/third_party/WebKit/LayoutTests/TestExpectations
+++ b/third_party/WebKit/LayoutTests/TestExpectations
@@ -524,36 +524,8 @@
 
 # ====== IncrementalShadowDOM-only failures from here ======
 
-crbug.com/822679 virtual/incremental-shadow-dom/external/wpt/css/css-scoping/shadow-fallback-dynamic-002.html [ Crash Failure ]
-crbug.com/822679 virtual/incremental-shadow-dom/external/wpt/css/css-scoping/shadow-fallback-dynamic-003.html [ Crash Failure ]
-crbug.com/822679 virtual/incremental-shadow-dom/external/wpt/css/css-scoping/shadow-fallback-dynamic-005.html [ Crash Failure ]
-
 crbug.com/776656 virtual/incremental-shadow-dom/external/wpt/shadow-dom/untriaged/styles/test-003.html [ Failure ]
 
-crbug.com/776656 virtual/incremental-shadow-dom/html/details_summary/details-add-summary-1-and-click.html [ Crash Failure ]
-crbug.com/776656 virtual/incremental-shadow-dom/html/details_summary/details-add-summary-1.html [ Crash Failure ]
-crbug.com/776656 virtual/incremental-shadow-dom/html/details_summary/details-add-summary-10-and-click.html [ Failure ]
-crbug.com/776656 virtual/incremental-shadow-dom/html/details_summary/details-add-summary-10.html [ Failure ]
-crbug.com/776656 virtual/incremental-shadow-dom/html/details_summary/details-add-summary-2-and-click.html [ Crash Failure ]
-crbug.com/776656 virtual/incremental-shadow-dom/html/details_summary/details-add-summary-2.html [ Crash Failure ]
-crbug.com/776656 virtual/incremental-shadow-dom/html/details_summary/details-add-summary-3-and-click.html [ Crash Failure ]
-crbug.com/776656 virtual/incremental-shadow-dom/html/details_summary/details-add-summary-3.html [ Crash Failure ]
-crbug.com/776656 virtual/incremental-shadow-dom/html/details_summary/details-add-summary-5.html [ Failure ]
-crbug.com/776656 virtual/incremental-shadow-dom/html/details_summary/details-add-summary-6-and-click.html [ Crash Failure ]
-crbug.com/776656 virtual/incremental-shadow-dom/html/details_summary/details-add-summary-6.html [ Crash Failure ]
-crbug.com/776656 virtual/incremental-shadow-dom/html/details_summary/details-add-summary-7-and-click.html [ Crash Failure ]
-crbug.com/776656 virtual/incremental-shadow-dom/html/details_summary/details-add-summary-7.html [ Crash Failure ]
-crbug.com/776656 virtual/incremental-shadow-dom/html/details_summary/details-add-summary-8-and-click.html [ Crash Failure ]
-crbug.com/776656 virtual/incremental-shadow-dom/html/details_summary/details-add-summary-8.html [ Crash Failure ]
-crbug.com/776656 virtual/incremental-shadow-dom/html/details_summary/details-remove-summary-1-and-click.html [ Failure ]
-crbug.com/776656 virtual/incremental-shadow-dom/html/details_summary/details-remove-summary-1.html [ Failure ]
-crbug.com/776656 virtual/incremental-shadow-dom/html/details_summary/details-remove-summary-2-and-click.html [ Failure ]
-crbug.com/776656 virtual/incremental-shadow-dom/html/details_summary/details-remove-summary-2.html [ Failure ]
-crbug.com/776656 virtual/incremental-shadow-dom/html/details_summary/details-remove-summary-4-and-click.html [ Failure ]
-crbug.com/776656 virtual/incremental-shadow-dom/html/details_summary/details-remove-summary-4.html [ Failure ]
-crbug.com/776656 virtual/incremental-shadow-dom/html/details_summary/details-remove-summary-5-and-click.html [ Failure ]
-crbug.com/776656 virtual/incremental-shadow-dom/html/details_summary/details-remove-summary-5.html [ Failure ]
-
 # ====== IncrementalShadowDOM-only failures until here ======
 
 crbug.com/667560 [ Debug ] http/tests/devtools/elements/styles-3/styles-change-node-while-editing.js [ Pass Failure ]
@@ -1444,9 +1416,6 @@
 crbug.com/v8/7486 http/tests/devtools/startup/console/console-format-startup-bigint.js [ Skip ]
 crbug.com/v8/7486 http/tests/devtools/console/console-format-bigint.js [ Skip ]
 
-# Changing signature of console function.
-crbug.com/v8/178 inspector-protocol/console/console-let-const-with-api.js [ NeedsManualRebaseline ]
-
 crbug.com/564109 [ Win ]  http/tests/webfont/font-display-intervention.html [ Pass Failure Timeout ]
 
 crbug.com/399951 http/tests/mime/javascript-mimetype-usecounters.html [ Pass Failure ]
@@ -1729,7 +1698,6 @@
 crbug.com/626703 external/wpt/css/css-transitions/transition-property-013.html [ Skip ]
 crbug.com/626703 [ Mac10.11 ] external/wpt/payment-request/show-method-postmessage-manual.https.html [ Skip ]
 crbug.com/626703 [ Linux Mac10.10 Mac10.12 Mac10.13 Retina Win ] external/wpt/payment-request/show-method-postmessage-manual.https.html [ Skip ]
-crbug.com/626703 virtual/incremental-shadow-dom/external/wpt/css/css-scoping/shadow-fallback-dynamic-001.html [ Failure ]
 crbug.com/626703 [ Android ] virtual/media-gpu-accelerated/external/wpt/media-source/mediasource-config-change-mp4-av-framesize.html [ Crash ]
 crbug.com/626703 external/wpt/payment-request/payment-request-show-method-manual.https.html [ Skip ]
 crbug.com/626703 external/wpt/payment-request/payment-request-abort-method-manual.https.html [ Skip ]
diff --git a/third_party/WebKit/LayoutTests/editing/deleting/5032066-expected.txt b/third_party/WebKit/LayoutTests/editing/deleting/5032066-expected.txt
deleted file mode 100644
index 4bdb21aa..0000000
--- a/third_party/WebKit/LayoutTests/editing/deleting/5032066-expected.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-This tests deleting when the caret is at the start of a paragraph just after a table.  The content in that paragraph should be moved into the last table cell unless that content is another table.
-| <table>
-|   border="1"
-|   <tbody>
-|     <tr>
-|       <td>
-|         "All the content in this editable region <#selection-caret>should be in one table cell."
diff --git a/third_party/WebKit/LayoutTests/editing/deleting/5032066.html b/third_party/WebKit/LayoutTests/editing/deleting/5032066.html
index 1ed841f..f2b5e35e 100644
--- a/third_party/WebKit/LayoutTests/editing/deleting/5032066.html
+++ b/third_party/WebKit/LayoutTests/editing/deleting/5032066.html
@@ -1,17 +1,48 @@
 <!DOCTYPE html>
-<html>
-<body>
-<p id="description">This tests deleting when the caret is at the start of a paragraph just after a table.  The content in that paragraph should be moved into the last table cell unless that content is another table.</p>
-<div contenteditable="true" id="root"><table border="1"><tr><td>All the content in this editable region&nbsp;</td></tr></table><div id="div">should be in one table cell.</div></div>
-
-<script src="../../resources/dump-as-markup.js"></script>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../assert_selection.js"></script>
+<div id="log"></div>
 <script>
-var sel = window.getSelection();
-var div = document.getElementById("div");
-sel.collapse(div, 0);
-document.execCommand("Delete");
-Markup.description(description.textContent);
-Markup.dump("root");
+const isMac = navigator.platform.indexOf('Mac') === 0;
+selection_test(
+  [
+    '<div contenteditable="true" id="root">',
+        '<table border="1">',
+            '<tr>',
+                '<td>All the content in this editable region </td>',
+            '</tr>',
+         '</table>',
+         '<div id="div">|should be in one table cell.</div>',
+    '</div>'
+  ],
+  'Delete',
+  isMac
+    ? [
+        '<div contenteditable="true" id="root">',
+            '<table border="1">',
+                '<tbody>',
+                    '<tr>',
+                        '<td>All the content in this editable region |should be in one table cell.</td>',
+                    '</tr>',
+                '</tbody>',
+            '</table>',
+        '</div>'
+      ]
+    : [
+        '<div contenteditable="true" id="root">',
+            '<table border="1">',
+                '<tbody>',
+                    '<tr>',
+                        '<td>All the content in this editable region </td>',
+                    '</tr>',
+                '</tbody>',
+            '</table>',
+            '|should be in one table cell.',
+        '</div>'
+      ],
+  'Deleting when the caret is at the start of a paragraph just after a table' +
+  isMac
+    ? 'The content in the deleted paragraph should be moved into the last table cell unless that content is another table.'
+    : 'The content in the deleted paragraph should not be merged into the table above.');
 </script>
-</body>
-</html>
diff --git a/third_party/WebKit/LayoutTests/editing/deleting/backspace-merge-into-block.html b/third_party/WebKit/LayoutTests/editing/deleting/backspace-merge-into-block.html
index f57277f..1bbaec6 100644
--- a/third_party/WebKit/LayoutTests/editing/deleting/backspace-merge-into-block.html
+++ b/third_party/WebKit/LayoutTests/editing/deleting/backspace-merge-into-block.html
@@ -11,6 +11,7 @@
 </style>
 <div id="log"></div>
 <script>
+const isMac = navigator.platform.indexOf('Mac') === 0;
 test(() => {
     assert_selection(
         '<div contenteditable="true"><h1>Heading 1:</h1>^<p>|paragraph was merged.</p></div>',
@@ -30,7 +31,11 @@
     assert_selection(
         '<div contenteditable="true"><table><tbody><tr><td>Table:</td></tr></tbody></table>^<p>|paragraph was merged.</p></div>',
         'delete',
-        '<div contenteditable="true"><table><tbody><tr><td>Table:|paragraph was merged.</td></tr></tbody></table></div>',
-        'Make a paragraph into a table');
+        isMac
+            ? '<div contenteditable="true"><table><tbody><tr><td>Table:|paragraph was merged.</td></tr></tbody></table></div>'
+            : '<div contenteditable="true"><table><tbody><tr><td>Table:</td></tr></tbody></table>|paragraph was merged.</div>',
+        isMac
+            ? 'Make a paragraph into a table'
+            : 'Do not merge paragraph into a table');
 }, 'merge into a block by backspace');
 </script>
diff --git a/third_party/WebKit/LayoutTests/editing/deleting/delete-block-table-expected.txt b/third_party/WebKit/LayoutTests/editing/deleting/delete-block-table-expected.txt
deleted file mode 100644
index fc2b0f0..0000000
--- a/third_party/WebKit/LayoutTests/editing/deleting/delete-block-table-expected.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-This test checks that deleting into a table works properly. When deleting three times with the cursor after the character "a" in the "after" text after the table, the "a" should be deleted, as should the "o" of "buffalo" in the last table cell.
-
-Before
-Foo	baz
-bar	buffalfter
-execDeleteCommand: <div>Before</div> <table style="border:3px solid #aaa;"> <tbody><tr> <td> Foo </td> <td> baz </td> </tr> <tr> <td> bar </td> <td> buffalo </td> </tr> </tbody></table> <span id="start">fter</span>
-execDeleteCommand: <div>Before</div> <table style="border:3px solid #aaa;"> <tbody><tr> <td> Foo </td> <td> baz </td> </tr> <tr> <td> bar </td> <td> buffalofter</td></tr></tbody></table>
-execDeleteCommand: <div>Before</div> <table style="border:3px solid #aaa;"> <tbody><tr> <td> Foo </td> <td> baz </td> </tr> <tr> <td> bar </td> <td> buffalfter</td></tr></tbody></table>
diff --git a/third_party/WebKit/LayoutTests/editing/deleting/delete-block-table.html b/third_party/WebKit/LayoutTests/editing/deleting/delete-block-table.html
index 89099e1..3f5b19e9 100644
--- a/third_party/WebKit/LayoutTests/editing/deleting/delete-block-table.html
+++ b/third_party/WebKit/LayoutTests/editing/deleting/delete-block-table.html
@@ -1,41 +1,69 @@
 <!DOCTYPE html>
-<html>
-<body>
-<p>This test checks that deleting into a table works properly. When deleting three times with the cursor after the character "a" in the "after" text after the table, the "a" should be deleted, as should the "o" of "buffalo" in the last table cell.</p>
-<div contenteditable="true" id="root">
-<div>Before</div>
-  <table style="border:3px solid #aaa;">
-    <tr>
-      <td>
-        Foo
-      </td>
-      <td>
-        baz
-      </td>
-    </tr>
-    <tr>
-      <td>
-        bar
-      </td>
-      <td>
-        buffalo
-      </td>
-    </tr>
-  </table>
-<span id="start">after</span>
-</div>
-<script src=../editing.js></script>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../assert_selection.js"></script>
+<div id="log"></div>
 <script>
-function editingTest() {
-    var selection = window.getSelection();
-    var s = document.getElementById("start");
-    selection.collapse(s, 0);
-    execMoveSelectionForwardByCharacterCommand();
-    for (i = 0; i < 3; i++) {
-        deleteCommand();
-    }
-}
-runDumpAsTextEditingTest();
+const isMac = navigator.platform.indexOf('Mac') === 0;
+selection_test(
+  [
+    '<div contenteditable="true" id="root">',
+        '<div>Before</div>',
+        '<table style="border:3px solid #aaa;">',
+            '<tr>',
+                '<td>Foo</td>',
+                '<td>baz</td>',
+            '</tr>',
+            '<tr>',
+                '<td>bar</td>',
+                '<td>buffalo</td>',
+            '</tr>',
+        '</table>',
+        '<span id="start">^a|fter</span>',
+    '</div>'
+  ],
+  selection => {
+    selection.document.execCommand('delete');
+    selection.document.execCommand('delete');
+    selection.document.execCommand('delete');
+  },
+  isMac
+    ? [
+        '<div contenteditable="true" id="root">',
+            '<div>Before</div>',
+            '<table style="border:3px solid #aaa;">',
+                '<tbody>',
+                    '<tr>',
+                        '<td>Foo</td>',
+                        '<td>baz</td>',
+                    '</tr>',
+                    '<tr>',
+                        '<td>bar</td>',
+                        '<td>buffal|fter</td>',
+                    '</tr>',
+                '</tbody>',
+            '</table>',
+        '</div>',
+      ]
+    : [
+        '<div contenteditable="true" id="root">',
+            '<div>Before</div>',
+            '<table style="border:3px solid #aaa;">',
+                '<tbody>',
+                    '<tr>',
+                        '<td>Foo</td>',
+                        '<td>baz</td>',
+                    '</tr>',
+                    '<tr>',
+                        '<td>bar</td>',
+                        '<td>buffalo</td>',
+                    '</tr>',
+                '</tbody>',
+            '</table>|fter',
+        '</div>',
+      ],
+    'This test checks that deleting into a table works properly.' +
+    isMac
+      ? 'When deleting three times with the cursor after the character "a" in the "after" text after the table, the "a" should be deleted, as should the "o" of "buffalo" in the last table cell.'
+      : 'When deleting three times with the cursor after the character "a" in the "after" text after the table, the "a" should be deleted; the rest of the delete commands should do nothing.');
 </script>
-</body>
-</html>
diff --git a/third_party/WebKit/LayoutTests/editing/selection/expanding-selections.html b/third_party/WebKit/LayoutTests/editing/selection/mouse/expanding-selections.html
similarity index 87%
rename from third_party/WebKit/LayoutTests/editing/selection/expanding-selections.html
rename to third_party/WebKit/LayoutTests/editing/selection/mouse/expanding-selections.html
index 3219db7..b363c003 100644
--- a/third_party/WebKit/LayoutTests/editing/selection/expanding-selections.html
+++ b/third_party/WebKit/LayoutTests/editing/selection/mouse/expanding-selections.html
@@ -1,7 +1,7 @@
 <!doctype html>
-<script src="../../resources/testharness.js"></script>
-<script src="../../resources/testharnessreport.js"></script>
-<script src="../assert_selection.js"></script>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<script src="../../assert_selection.js"></script>
 <script>
 function doDoubleClick(selection) {
   if (!window.eventSender)
diff --git a/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json b/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json
index 5b55f68a..875d1e8 100644
--- a/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json
+++ b/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json
@@ -44413,6 +44413,162 @@
      {}
     ]
    ],
+   "css/css-layout-api/constraints-fixed-inline-size-absolute-left-right.https.html": [
+    [
+     "/css/css-layout-api/constraints-fixed-inline-size-absolute-left-right.https.html",
+     [
+      [
+       "/css/css-layout-api/constraints-fixed-inline-size-ref.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
+   "css/css-layout-api/constraints-fixed-inline-size-absolute-top-bottom-vrl.https.html": [
+    [
+     "/css/css-layout-api/constraints-fixed-inline-size-absolute-top-bottom-vrl.https.html",
+     [
+      [
+       "/css/css-layout-api/constraints-fixed-inline-size-ref.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
+   "css/css-layout-api/constraints-fixed-inline-size-block-auto-avoid-floats-vlr.https.html": [
+    [
+     "/css/css-layout-api/constraints-fixed-inline-size-block-auto-avoid-floats-vlr.https.html",
+     [
+      [
+       "/css/css-layout-api/constraints-fixed-inline-size-ref.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
+   "css/css-layout-api/constraints-fixed-inline-size-block-auto-avoid-floats.https.html": [
+    [
+     "/css/css-layout-api/constraints-fixed-inline-size-block-auto-avoid-floats.https.html",
+     [
+      [
+       "/css/css-layout-api/constraints-fixed-inline-size-ref.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
+   "css/css-layout-api/constraints-fixed-inline-size-block-auto-vlr.https.html": [
+    [
+     "/css/css-layout-api/constraints-fixed-inline-size-block-auto-vlr.https.html",
+     [
+      [
+       "/css/css-layout-api/constraints-fixed-inline-size-ref.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
+   "css/css-layout-api/constraints-fixed-inline-size-block-auto.https.html": [
+    [
+     "/css/css-layout-api/constraints-fixed-inline-size-block-auto.https.html",
+     [
+      [
+       "/css/css-layout-api/constraints-fixed-inline-size-ref.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
+   "css/css-layout-api/constraints-fixed-inline-size-fixed-vrl.https.html": [
+    [
+     "/css/css-layout-api/constraints-fixed-inline-size-fixed-vrl.https.html",
+     [
+      [
+       "/css/css-layout-api/constraints-fixed-inline-size-ref.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
+   "css/css-layout-api/constraints-fixed-inline-size-fixed.https.html": [
+    [
+     "/css/css-layout-api/constraints-fixed-inline-size-fixed.https.html",
+     [
+      [
+       "/css/css-layout-api/constraints-fixed-inline-size-ref.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
+   "css/css-layout-api/constraints-fixed-inline-size-flex-grow-column-vrl.https.html": [
+    [
+     "/css/css-layout-api/constraints-fixed-inline-size-flex-grow-column-vrl.https.html",
+     [
+      [
+       "/css/css-layout-api/constraints-fixed-inline-size-ref.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
+   "css/css-layout-api/constraints-fixed-inline-size-flex-grow.https.html": [
+    [
+     "/css/css-layout-api/constraints-fixed-inline-size-flex-grow.https.html",
+     [
+      [
+       "/css/css-layout-api/constraints-fixed-inline-size-ref.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
+   "css/css-layout-api/constraints-fixed-inline-size-grid.https.html": [
+    [
+     "/css/css-layout-api/constraints-fixed-inline-size-grid.https.html",
+     [
+      [
+       "/css/css-layout-api/constraints-fixed-inline-size-ref.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
+   "css/css-layout-api/constraints-fixed-inline-size-percentage-vlr.https.html": [
+    [
+     "/css/css-layout-api/constraints-fixed-inline-size-percentage-vlr.https.html",
+     [
+      [
+       "/css/css-layout-api/constraints-fixed-inline-size-ref.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
+   "css/css-layout-api/constraints-fixed-inline-size-percentage.https.html": [
+    [
+     "/css/css-layout-api/constraints-fixed-inline-size-percentage.https.html",
+     [
+      [
+       "/css/css-layout-api/constraints-fixed-inline-size-ref.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
    "css/css-layout-api/fallback-constructor-error.https.html": [
     [
      "/css/css-layout-api/fallback-constructor-error.https.html",
@@ -47713,18 +47869,6 @@
      {}
     ]
    ],
-   "css/css-position/position-sticky-nested-bottom.html": [
-    [
-     "/css/css-position/position-sticky-nested-bottom.html",
-     [
-      [
-       "/css/css-position/position-sticky-nested-bottom-ref.html",
-       "=="
-      ]
-     ],
-     {}
-    ]
-   ],
    "css/css-position/position-sticky-nested-inline.html": [
     [
      "/css/css-position/position-sticky-nested-inline.html",
@@ -47737,30 +47881,6 @@
      {}
     ]
    ],
-   "css/css-position/position-sticky-nested-left.html": [
-    [
-     "/css/css-position/position-sticky-nested-left.html",
-     [
-      [
-       "/css/css-position/position-sticky-nested-left-ref.html",
-       "=="
-      ]
-     ],
-     {}
-    ]
-   ],
-   "css/css-position/position-sticky-nested-right.html": [
-    [
-     "/css/css-position/position-sticky-nested-right.html",
-     [
-      [
-       "/css/css-position/position-sticky-nested-right-ref.html",
-       "=="
-      ]
-     ],
-     {}
-    ]
-   ],
    "css/css-position/position-sticky-nested-table.html": [
     [
      "/css/css-position/position-sticky-nested-table.html",
@@ -47773,18 +47893,6 @@
      {}
     ]
    ],
-   "css/css-position/position-sticky-nested-top.html": [
-    [
-     "/css/css-position/position-sticky-nested-top.html",
-     [
-      [
-       "/css/css-position/position-sticky-nested-top-ref.html",
-       "=="
-      ]
-     ],
-     {}
-    ]
-   ],
    "css/css-position/position-sticky-rendering.html": [
     [
      "/css/css-position/position-sticky-rendering.html",
@@ -117388,6 +117496,11 @@
      {}
     ]
    ],
+   "css/css-layout-api/constraints-fixed-inline-size-ref.html": [
+    [
+     {}
+    ]
+   ],
    "css/css-layout-api/fallback-ref.html": [
     [
      {}
@@ -117413,6 +117526,11 @@
      {}
     ]
    ],
+   "css/css-layout-api/support/constraints-fixed-inline-size.js": [
+    [
+     {}
+    ]
+   ],
    "css/css-layout-api/support/layout-child-fixed-sizes-worklet.js": [
     [
      {}
@@ -118438,36 +118556,16 @@
      {}
     ]
    ],
-   "css/css-position/position-sticky-nested-bottom-ref.html": [
-    [
-     {}
-    ]
-   ],
    "css/css-position/position-sticky-nested-inline-ref.html": [
     [
      {}
     ]
    ],
-   "css/css-position/position-sticky-nested-left-ref.html": [
-    [
-     {}
-    ]
-   ],
-   "css/css-position/position-sticky-nested-right-ref.html": [
-    [
-     {}
-    ]
-   ],
    "css/css-position/position-sticky-nested-table-ref.html": [
     [
      {}
     ]
    ],
-   "css/css-position/position-sticky-nested-top-ref.html": [
-    [
-     {}
-    ]
-   ],
    "css/css-position/position-sticky-rendering-ref.html": [
     [
      {}
@@ -125068,6 +125166,21 @@
      {}
     ]
    ],
+   "css/css-typed-om/the-stylepropertymap/properties/text-decoration-line-expected.txt": [
+    [
+     {}
+    ]
+   ],
+   "css/css-typed-om/the-stylepropertymap/properties/text-decoration-skip-expected.txt": [
+    [
+     {}
+    ]
+   ],
+   "css/css-typed-om/the-stylepropertymap/properties/text-decoration-width-expected.txt": [
+    [
+     {}
+    ]
+   ],
    "css/css-typed-om/the-stylepropertymap/properties/text-emphasis-color-expected.txt": [
     [
      {}
@@ -164933,11 +165046,21 @@
      {}
     ]
    ],
+   "workers/modules/resources/dynamic-import-given-url-worker.js": [
+    [
+     {}
+    ]
+   ],
    "workers/modules/resources/dynamic-import-worker.js": [
     [
      {}
     ]
    ],
+   "workers/modules/resources/import-meta-url-worker.js": [
+    [
+     {}
+    ]
+   ],
    "workers/modules/resources/nested-dynamic-import-worker.js": [
     [
      {}
@@ -181282,6 +181405,30 @@
      {}
     ]
    ],
+   "css/css-position/position-sticky-nested-bottom.html": [
+    [
+     "/css/css-position/position-sticky-nested-bottom.html",
+     {}
+    ]
+   ],
+   "css/css-position/position-sticky-nested-left.html": [
+    [
+     "/css/css-position/position-sticky-nested-left.html",
+     {}
+    ]
+   ],
+   "css/css-position/position-sticky-nested-right.html": [
+    [
+     "/css/css-position/position-sticky-nested-right.html",
+     {}
+    ]
+   ],
+   "css/css-position/position-sticky-nested-top.html": [
+    [
+     "/css/css-position/position-sticky-nested-top.html",
+     {}
+    ]
+   ],
    "css/css-position/position-sticky-offset-overflow.html": [
     [
      "/css/css-position/position-sticky-offset-overflow.html",
@@ -184516,6 +184663,12 @@
      {}
     ]
    ],
+   "css/css-typed-om/the-stylepropertymap/properties/center-coordinate.html": [
+    [
+     "/css/css-typed-om/the-stylepropertymap/properties/center-coordinate.html",
+     {}
+    ]
+   ],
    "css/css-typed-om/the-stylepropertymap/properties/clear.html": [
     [
      "/css/css-typed-om/the-stylepropertymap/properties/clear.html",
@@ -184546,6 +184699,12 @@
      {}
     ]
    ],
+   "css/css-typed-om/the-stylepropertymap/properties/coordinate.html": [
+    [
+     "/css/css-typed-om/the-stylepropertymap/properties/coordinate.html",
+     {}
+    ]
+   ],
    "css/css-typed-om/the-stylepropertymap/properties/direction.html": [
     [
      "/css/css-typed-om/the-stylepropertymap/properties/direction.html",
@@ -184870,6 +185029,12 @@
      {}
     ]
    ],
+   "css/css-typed-om/the-stylepropertymap/properties/radius.html": [
+    [
+     "/css/css-typed-om/the-stylepropertymap/properties/radius.html",
+     {}
+    ]
+   ],
    "css/css-typed-om/the-stylepropertymap/properties/resize.html": [
     [
      "/css/css-typed-om/the-stylepropertymap/properties/resize.html",
@@ -184918,12 +185083,42 @@
      {}
     ]
    ],
+   "css/css-typed-om/the-stylepropertymap/properties/text-decoration-line.html": [
+    [
+     "/css/css-typed-om/the-stylepropertymap/properties/text-decoration-line.html",
+     {}
+    ]
+   ],
+   "css/css-typed-om/the-stylepropertymap/properties/text-decoration-skip-ink.html": [
+    [
+     "/css/css-typed-om/the-stylepropertymap/properties/text-decoration-skip-ink.html",
+     {}
+    ]
+   ],
+   "css/css-typed-om/the-stylepropertymap/properties/text-decoration-skip.html": [
+    [
+     "/css/css-typed-om/the-stylepropertymap/properties/text-decoration-skip.html",
+     {}
+    ]
+   ],
    "css/css-typed-om/the-stylepropertymap/properties/text-decoration-style.html": [
     [
      "/css/css-typed-om/the-stylepropertymap/properties/text-decoration-style.html",
      {}
     ]
    ],
+   "css/css-typed-om/the-stylepropertymap/properties/text-decoration-width.html": [
+    [
+     "/css/css-typed-om/the-stylepropertymap/properties/text-decoration-width.html",
+     {}
+    ]
+   ],
+   "css/css-typed-om/the-stylepropertymap/properties/text-decoration.html": [
+    [
+     "/css/css-typed-om/the-stylepropertymap/properties/text-decoration.html",
+     {}
+    ]
+   ],
    "css/css-typed-om/the-stylepropertymap/properties/text-emphasis-color.html": [
     [
      "/css/css-typed-om/the-stylepropertymap/properties/text-emphasis-color.html",
@@ -204744,6 +204939,12 @@
      {}
     ]
    ],
+   "html/webappapis/scripting/events/event-handler-attributes-window-body.html": [
+    [
+     "/html/webappapis/scripting/events/event-handler-attributes-window-body.html",
+     {}
+    ]
+   ],
    "html/webappapis/scripting/events/event-handler-javascript.html": [
     [
      "/html/webappapis/scripting/events/event-handler-javascript.html",
@@ -236432,6 +236633,12 @@
      {}
     ]
    ],
+   "workers/modules/dedicated-worker-import-meta.html": [
+    [
+     "/workers/modules/dedicated-worker-import-meta.html",
+     {}
+    ]
+   ],
    "workers/modules/dedicated-worker-import.html": [
     [
      "/workers/modules/dedicated-worker-import.html",
@@ -288217,6 +288424,62 @@
    "a999a2a7ad8981879cdc984bf602939a23a60ea6",
    "testharness"
   ],
+  "css/css-layout-api/constraints-fixed-inline-size-absolute-left-right.https.html": [
+   "15f8dde88dd066b5525a6b8990206ac567f48b2a",
+   "reftest"
+  ],
+  "css/css-layout-api/constraints-fixed-inline-size-absolute-top-bottom-vrl.https.html": [
+   "9cb3a2b8671ef4f9926a39431d193875a5a1738a",
+   "reftest"
+  ],
+  "css/css-layout-api/constraints-fixed-inline-size-block-auto-avoid-floats-vlr.https.html": [
+   "b38fb83238cba9bef74121b1f2a07a1667e4ea63",
+   "reftest"
+  ],
+  "css/css-layout-api/constraints-fixed-inline-size-block-auto-avoid-floats.https.html": [
+   "50b56739750402d286da5a3c6cdbbc0335a60bd4",
+   "reftest"
+  ],
+  "css/css-layout-api/constraints-fixed-inline-size-block-auto-vlr.https.html": [
+   "929bc22562cd2b1a3635b082c4176215d8668857",
+   "reftest"
+  ],
+  "css/css-layout-api/constraints-fixed-inline-size-block-auto.https.html": [
+   "8d0459a147ed62a8c2dc6941bfb38335fa9ad4e5",
+   "reftest"
+  ],
+  "css/css-layout-api/constraints-fixed-inline-size-fixed-vrl.https.html": [
+   "888a34c8a1e40c7687a5500efce2496bb5e1b2b6",
+   "reftest"
+  ],
+  "css/css-layout-api/constraints-fixed-inline-size-fixed.https.html": [
+   "d98fc7d2cdecc5f11a6853a3280aaf106a8de4e2",
+   "reftest"
+  ],
+  "css/css-layout-api/constraints-fixed-inline-size-flex-grow-column-vrl.https.html": [
+   "924c0581767d514b24b530ab012233d61d96055a",
+   "reftest"
+  ],
+  "css/css-layout-api/constraints-fixed-inline-size-flex-grow.https.html": [
+   "3f0077ceb95fcfa870c6c6625efbee3c8fa1e2b6",
+   "reftest"
+  ],
+  "css/css-layout-api/constraints-fixed-inline-size-grid.https.html": [
+   "ec0ea758406f3bbc73d5d8b8ee2138a3fd941163",
+   "reftest"
+  ],
+  "css/css-layout-api/constraints-fixed-inline-size-percentage-vlr.https.html": [
+   "e1e299e101a6f501f2a27b867db36ab8afdc73d1",
+   "reftest"
+  ],
+  "css/css-layout-api/constraints-fixed-inline-size-percentage.https.html": [
+   "c11a34aeba8f8743723b8859bb9c6fca886cda23",
+   "reftest"
+  ],
+  "css/css-layout-api/constraints-fixed-inline-size-ref.html": [
+   "1d7de325448b3132ec04b8788665829ff5d1fb02",
+   "support"
+  ],
   "css/css-layout-api/fallback-constructor-error.https.html": [
    "fdb9954e12f4628c114499a5e69f257b60377617",
    "reftest"
@@ -288341,6 +288604,10 @@
    "361b3c82c37c0068d23ae23e96d8e9185d3765b0",
    "reftest"
   ],
+  "css/css-layout-api/support/constraints-fixed-inline-size.js": [
+   "ed0224a380c50a7e83d23a95be5a4348ce5bf706",
+   "support"
+  ],
   "css/css-layout-api/support/layout-child-fixed-sizes-worklet.js": [
    "5ddda72e3c9d077508622511e8685249c7803028",
    "support"
@@ -290238,20 +290505,16 @@
    "testharness"
   ],
   "css/css-position/position-sticky-left.html": [
-   "2a04672cdac818a6887eac7d6824ea85d3d0559d",
+   "d28b5ee55d5fed4b263b130df700092e14b9e784",
    "testharness"
   ],
   "css/css-position/position-sticky-margins.html": [
    "3f6bc9537adf2a4d477f99866d73f42b65c26db3",
    "testharness"
   ],
-  "css/css-position/position-sticky-nested-bottom-ref.html": [
-   "59a8e46358a8a5bf8638a2d1982c63becef5bc77",
-   "support"
-  ],
   "css/css-position/position-sticky-nested-bottom.html": [
-   "3604a921be04927dd19b805b7c9abaed6d0e7c72",
-   "reftest"
+   "82b1bdada6bfc0c2b6fc04ee3fdd9036e807c1e4",
+   "testharness"
   ],
   "css/css-position/position-sticky-nested-inline-ref.html": [
    "8fb9378e91a20b71ef886b9aac0147b25d00a9a3",
@@ -290261,21 +290524,13 @@
    "50be9f2fb6ab9295081f6f13705be4853e48fdde",
    "reftest"
   ],
-  "css/css-position/position-sticky-nested-left-ref.html": [
-   "52804c5589c3035818cd653c1801a70645a9fe99",
-   "support"
-  ],
   "css/css-position/position-sticky-nested-left.html": [
-   "c32881097147e285b6ee66e6239af4808d780c83",
-   "reftest"
-  ],
-  "css/css-position/position-sticky-nested-right-ref.html": [
-   "5703ad6457deca332232e510dc479c39b7020d24",
-   "support"
+   "dabe2ee93d0f0078beacf5c715fd040558ad9c08",
+   "testharness"
   ],
   "css/css-position/position-sticky-nested-right.html": [
-   "39683624316599779b0efcb347010b92694e02a6",
-   "reftest"
+   "023e0eea58b52a249c2313c533be38a033f40da0",
+   "testharness"
   ],
   "css/css-position/position-sticky-nested-table-ref.html": [
    "7b8956bc720e2e25e7ff0bc5889812c26837ab58",
@@ -290285,13 +290540,9 @@
    "87a80629bcfcace28d4f13bce99325d55d317574",
    "reftest"
   ],
-  "css/css-position/position-sticky-nested-top-ref.html": [
-   "66ea8b8c72023089d52e6ebdf5bfff5d56259bfc",
-   "support"
-  ],
   "css/css-position/position-sticky-nested-top.html": [
-   "88e35164b6ede3adf9727989cf59ff9956bdbae7",
-   "reftest"
+   "ae24eeaea7f25860fa770141d0894abf9e961c5e",
+   "testharness"
   ],
   "css/css-position/position-sticky-offset-overflow.html": [
    "cab620b2008a9df57abc6907b1199e35a4099241",
@@ -290318,7 +290569,7 @@
    "reftest"
   ],
   "css/css-position/position-sticky-right.html": [
-   "80caf6fb1e6c84dbf3e371a11166ac5b71bba687",
+   "8bd2ae1a53ade0a524d98f5c8b0fe2ebce66d338",
    "testharness"
   ],
   "css/css-position/position-sticky-root-scroller.html": [
@@ -290426,7 +290677,7 @@
    "reftest"
   ],
   "css/css-position/resources/sticky-util.js": [
-   "c7b441a3a07276cad9528dd3ef7d82844d06e2d8",
+   "7f8a5b4d9047c07378473362acb3d001e70d5663",
    "support"
   ],
   "css/css-properties-values-api/register-property-syntax-parsing-expected.txt": [
@@ -305593,6 +305844,10 @@
    "d4139aeff755abe89ee1e04fcd34ccfba4efe91c",
    "testharness"
   ],
+  "css/css-typed-om/the-stylepropertymap/properties/center-coordinate.html": [
+   "3f7e38c8f71e7da0fb17e714f37821922bd3d720",
+   "testharness"
+  ],
   "css/css-typed-om/the-stylepropertymap/properties/clear.html": [
    "376585635ab5752db4b2078f6247fa621a954282",
    "testharness"
@@ -305613,6 +305868,10 @@
    "3f6faf5b2371d8be9483148f3bfa562710c9c3ef",
    "testharness"
   ],
+  "css/css-typed-om/the-stylepropertymap/properties/coordinate.html": [
+   "f03d1956798b3bbf5d4ed421cea55b274b7fecc7",
+   "testharness"
+  ],
   "css/css-typed-om/the-stylepropertymap/properties/direction.html": [
    "b7c49aba4e8785f819beeb444c113d937d441089",
    "testharness"
@@ -305897,6 +306156,10 @@
    "4e3eccee58cec470febe4cd9a9149f4b4436487e",
    "testharness"
   ],
+  "css/css-typed-om/the-stylepropertymap/properties/radius.html": [
+   "ae21056fb993efb7112e0bc42fe1269f6bc0c72e",
+   "testharness"
+  ],
   "css/css-typed-om/the-stylepropertymap/properties/resize.html": [
    "533f287facbc82118469f75f9f88a1372848d3b2",
    "testharness"
@@ -305937,10 +306200,42 @@
    "fe6d3765ca8fea1c1963a310d0aa35fa68089a9b",
    "testharness"
   ],
+  "css/css-typed-om/the-stylepropertymap/properties/text-decoration-line-expected.txt": [
+   "5f695ae94cc887587182a4ae0cdcc4a000090cc0",
+   "support"
+  ],
+  "css/css-typed-om/the-stylepropertymap/properties/text-decoration-line.html": [
+   "0bd9668c45b14a0c52869ed0627cc408af550a25",
+   "testharness"
+  ],
+  "css/css-typed-om/the-stylepropertymap/properties/text-decoration-skip-expected.txt": [
+   "355f299d6bd2dbefa73f2d3f511d20b5d33e8006",
+   "support"
+  ],
+  "css/css-typed-om/the-stylepropertymap/properties/text-decoration-skip-ink.html": [
+   "f6a122cc2d44432e94e0700961868a5708cde232",
+   "testharness"
+  ],
+  "css/css-typed-om/the-stylepropertymap/properties/text-decoration-skip.html": [
+   "db1e8a3d65c8c0653e3412c965df11fc4917ba85",
+   "testharness"
+  ],
   "css/css-typed-om/the-stylepropertymap/properties/text-decoration-style.html": [
    "b541bd8b57f8b85f6e5f3a17a3266169debee876",
    "testharness"
   ],
+  "css/css-typed-om/the-stylepropertymap/properties/text-decoration-width-expected.txt": [
+   "4f8beb57992112f1504659fc95a3aac2024326fb",
+   "support"
+  ],
+  "css/css-typed-om/the-stylepropertymap/properties/text-decoration-width.html": [
+   "50f917bbd7df4e0c235a6c84a4ec5a90243e36dc",
+   "testharness"
+  ],
+  "css/css-typed-om/the-stylepropertymap/properties/text-decoration.html": [
+   "88d9f53aa4691c682c37fe74f7644e8ac8344cc9",
+   "testharness"
+  ],
   "css/css-typed-om/the-stylepropertymap/properties/text-emphasis-color-expected.txt": [
    "9e23026ac8a8e6b0a83b1c29a112e6f267628f52",
    "support"
@@ -347461,6 +347756,10 @@
    "c25750e626c5c2121833fd4627f656ffe9c83d38",
    "testharness"
   ],
+  "html/webappapis/scripting/events/event-handler-attributes-window-body.html": [
+   "d5a47edd139eb2ff2fe035451f44996bfe2f414d",
+   "testharness"
+  ],
   "html/webappapis/scripting/events/event-handler-javascript.html": [
    "2dece90b5e8b3ac3371a732e158ff44b8ea63b00",
    "testharness"
@@ -351506,7 +351805,7 @@
    "testharness"
   ],
   "navigation-timing/test_timing_server_redirect.html": [
-   "10b7f221c4667e92a993f0aae70820a95ea445aa",
+   "e08cd61d0e373b0ba04e00d429b3c607df8d2fd4",
    "testharness"
   ],
   "navigation-timing/test_timing_xserver_redirect.html": [
@@ -369178,7 +369477,7 @@
    "testharness"
   ],
   "service-workers/service-worker/navigation-timing.https-expected.txt": [
-   "51bd4562d49c339c69b187aff7dc36ca2cf742b2",
+   "e4b0e95d28a4f43017de9d75f44f877df4f65616",
    "support"
   ],
   "service-workers/service-worker/navigation-timing.https.html": [
@@ -376518,7 +376817,7 @@
    "testharness"
   ],
   "webrtc/RTCPeerConnection-setLocalDescription-pranswer-expected.txt": [
-   "4a74b3588c4ca20f33af96b8dff3e8b9e672829f",
+   "ff21fde36d76b73bf976beec719c306ef1190c01",
    "support"
   ],
   "webrtc/RTCPeerConnection-setLocalDescription-pranswer.html": [
@@ -381869,6 +382168,10 @@
    "6bffa3be83d81e2faa93119e710e4fee93fb855e",
    "testharness"
   ],
+  "workers/modules/dedicated-worker-import-meta.html": [
+   "ba8b24064e23f018ffd3ac9e4184d6f856123bff",
+   "testharness"
+  ],
   "workers/modules/dedicated-worker-import.html": [
    "752698b4f8f7298ca2ecc74d41887117a636118a",
    "testharness"
@@ -381881,10 +382184,18 @@
    "f4df69196f64cd81e92705186325004ac94db659",
    "support"
   ],
+  "workers/modules/resources/dynamic-import-given-url-worker.js": [
+   "372686abd1b2d2d09228a44f6420c646319e0bd1",
+   "support"
+  ],
   "workers/modules/resources/dynamic-import-worker.js": [
    "444e313fe51923097e3672d88d0afd30aac5ecab",
    "support"
   ],
+  "workers/modules/resources/import-meta-url-worker.js": [
+   "83f231a886c36543721c2b0204c18b97d10968f8",
+   "support"
+  ],
   "workers/modules/resources/nested-dynamic-import-worker.js": [
    "4ee05f3be8a1b41a9e2fa3e24d40ec5103f67eac",
    "support"
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-absolute-left-right.https.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-absolute-left-right.https.html
new file mode 100644
index 0000000..6b3662a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-absolute-left-right.https.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html class=reftest-wait>
+<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#dom-layoutconstraints-fixedinlinesize">
+<link rel="match" href="constraints-fixed-inline-size-ref.html">
+<meta name="assert" content="This test checks that LayoutConstraints#fixedInlineSize is passed into the layout function correctly." />
+<style>
+body {
+  position: relative;
+  width: 120px;
+}
+
+.test {
+  background: red;
+  position: absolute;
+  left: 0px;
+  right: 20px;
+}
+
+@supports (display: layout(test)) {
+  .test {
+    background: green;
+    display: layout(test);
+  }
+}
+</style>
+<script src="/common/reftest-wait.js"></script>
+<script src="/common/worklet-reftest.js"></script>
+
+<div class="test"></div>
+
+<script>
+importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/constraints-fixed-inline-size.js'});
+</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-absolute-top-bottom-vrl.https.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-absolute-top-bottom-vrl.https.html
new file mode 100644
index 0000000..632a5dd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-absolute-top-bottom-vrl.https.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html class=reftest-wait>
+<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#dom-layoutconstraints-fixedinlinesize">
+<link rel="match" href="constraints-fixed-inline-size-ref.html">
+<meta name="assert" content="This test checks that LayoutConstraints#fixedInlineSize is passed into the layout function correctly." />
+<style>
+body {
+  position: relative;
+  height: 120px;
+}
+
+.test {
+  background: red;
+  position: absolute;
+  left: 0px;
+  top: 0px;
+  bottom: 20px;
+  writing-mode: vertical-rl;
+}
+
+@supports (display: layout(test)) {
+  .test {
+    background: green;
+    display: layout(test);
+  }
+}
+</style>
+<script src="/common/reftest-wait.js"></script>
+<script src="/common/worklet-reftest.js"></script>
+
+<div class="test"></div>
+
+<script>
+importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/constraints-fixed-inline-size.js'});
+</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-block-auto-avoid-floats-vlr.https.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-block-auto-avoid-floats-vlr.https.html
new file mode 100644
index 0000000..a8f4dd3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-block-auto-avoid-floats-vlr.https.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html class=reftest-wait>
+<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#dom-layoutconstraints-fixedinlinesize">
+<link rel="match" href="constraints-fixed-inline-size-ref.html">
+<meta name="assert" content="This test checks that LayoutConstraints#fixedInlineSize is passed into the layout function correctly." />
+<style>
+body {
+  height: 200px;
+  writing-mode: vertical-lr;
+}
+
+.float {
+  float: right;
+  width: 20px;
+  height: 100px;
+}
+
+.test {
+  background: red;
+}
+
+@supports (display: layout(test)) {
+  .test {
+    background: green;
+    display: layout(test);
+  }
+}
+</style>
+<script src="/common/reftest-wait.js"></script>
+<script src="/common/worklet-reftest.js"></script>
+
+<div class="float"></div>
+<div class="test"></div>
+
+<script>
+importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/constraints-fixed-inline-size.js'});
+</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-block-auto-avoid-floats.https.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-block-auto-avoid-floats.https.html
new file mode 100644
index 0000000..2eb6197
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-block-auto-avoid-floats.https.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html class=reftest-wait>
+<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#dom-layoutconstraints-fixedinlinesize">
+<link rel="match" href="constraints-fixed-inline-size-ref.html">
+<meta name="assert" content="This test checks that LayoutConstraints#fixedInlineSize is passed into the layout function correctly." />
+<style>
+body {
+  width: 200px;
+}
+
+.float {
+  float: right;
+  width: 100px;
+  height: 20px;
+}
+
+.test {
+  background: red;
+}
+
+@supports (display: layout(test)) {
+  .test {
+    background: green;
+    display: layout(test);
+  }
+}
+</style>
+<script src="/common/reftest-wait.js"></script>
+<script src="/common/worklet-reftest.js"></script>
+
+<div class="float"></div>
+<div class="test"></div>
+
+<script>
+importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/constraints-fixed-inline-size.js'});
+</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-block-auto-vlr.https.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-block-auto-vlr.https.html
new file mode 100644
index 0000000..751ea5e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-block-auto-vlr.https.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html class=reftest-wait>
+<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#dom-layoutconstraints-fixedinlinesize">
+<link rel="match" href="constraints-fixed-inline-size-ref.html">
+<meta name="assert" content="This test checks that LayoutConstraints#fixedInlineSize is passed into the layout function correctly." />
+<style>
+body {
+  height: 120px;
+  writing-mode: vertical-lr;
+}
+
+.test {
+  margin-bottom: 20px;
+  background: red;
+}
+
+@supports (display: layout(test)) {
+  .test {
+    background: green;
+    display: layout(test);
+  }
+}
+</style>
+<script src="/common/reftest-wait.js"></script>
+<script src="/common/worklet-reftest.js"></script>
+
+<div class="test"></div>
+
+<script>
+importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/constraints-fixed-inline-size.js'});
+</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-block-auto.https.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-block-auto.https.html
new file mode 100644
index 0000000..1458a8b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-block-auto.https.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html class=reftest-wait>
+<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#dom-layoutconstraints-fixedinlinesize">
+<link rel="match" href="constraints-fixed-inline-size-ref.html">
+<meta name="assert" content="This test checks that LayoutConstraints#fixedInlineSize is passed into the layout function correctly." />
+<style>
+body {
+  width: 120px;
+}
+
+.test {
+  margin-right: 20px;
+  background: red;
+}
+
+@supports (display: layout(test)) {
+  .test {
+    background: green;
+    display: layout(test);
+  }
+}
+</style>
+<script src="/common/reftest-wait.js"></script>
+<script src="/common/worklet-reftest.js"></script>
+
+<div class="test"></div>
+
+<script>
+importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/constraints-fixed-inline-size.js'});
+</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-fixed-vrl.https.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-fixed-vrl.https.html
new file mode 100644
index 0000000..39ea818
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-fixed-vrl.https.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html class=reftest-wait>
+<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#dom-layoutconstraints-fixedinlinesize">
+<link rel="match" href="constraints-fixed-inline-size-ref.html">
+<meta name="assert" content="This test checks that LayoutConstraints#fixedInlineSize is passed into the layout function correctly." />
+<style>
+.test {
+  background: red;
+  height: 100px;
+  writing-mode: vertical-rl;
+}
+
+@supports (display: layout(test)) {
+  .test {
+    background: green;
+    display: layout(test);
+  }
+}
+</style>
+<script src="/common/reftest-wait.js"></script>
+<script src="/common/worklet-reftest.js"></script>
+
+<div class="test"></div>
+
+<script>
+importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/constraints-fixed-inline-size.js'});
+</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-fixed.https.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-fixed.https.html
new file mode 100644
index 0000000..6434d33
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-fixed.https.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html class=reftest-wait>
+<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#dom-layoutconstraints-fixedinlinesize">
+<link rel="match" href="constraints-fixed-inline-size-ref.html">
+<meta name="assert" content="This test checks that LayoutConstraints#fixedInlineSize is passed into the layout function correctly." />
+<style>
+.test {
+  background: red;
+  width: 100px;
+}
+
+@supports (display: layout(test)) {
+  .test {
+    background: green;
+    display: layout(test);
+  }
+}
+</style>
+<script src="/common/reftest-wait.js"></script>
+<script src="/common/worklet-reftest.js"></script>
+
+<div class="test"></div>
+
+<script>
+importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/constraints-fixed-inline-size.js'});
+</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-flex-grow-column-vrl.https.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-flex-grow-column-vrl.https.html
new file mode 100644
index 0000000..263d45e5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-flex-grow-column-vrl.https.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html class=reftest-wait>
+<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#dom-layoutconstraints-fixedinlinesize">
+<link rel="match" href="constraints-fixed-inline-size-ref.html">
+<meta name="assert" content="This test checks that LayoutConstraints#fixedInlineSize is passed into the layout function correctly." />
+<style>
+body {
+  display: flex;
+  flex-flow: column;
+  width: 100px;
+  height: 100px;
+}
+
+.test {
+  background: red;
+  flex-grow: 1;
+}
+
+@supports (display: layout(test)) {
+  .test {
+    background: green;
+    display: layout(test);
+  }
+}
+</style>
+<script src="/common/reftest-wait.js"></script>
+<script src="/common/worklet-reftest.js"></script>
+
+<div class="test"></div>
+
+<script>
+importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/constraints-fixed-inline-size.js'});
+</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-flex-grow.https.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-flex-grow.https.html
new file mode 100644
index 0000000..d2589e62
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-flex-grow.https.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html class=reftest-wait>
+<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#dom-layoutconstraints-fixedinlinesize">
+<link rel="match" href="constraints-fixed-inline-size-ref.html">
+<meta name="assert" content="This test checks that LayoutConstraints#fixedInlineSize is passed into the layout function correctly." />
+<style>
+body {
+  display: flex;
+  width: 100px;
+}
+
+.test {
+  background: red;
+  flex-grow: 1;
+}
+
+@supports (display: layout(test)) {
+  .test {
+    background: green;
+    display: layout(test);
+  }
+}
+</style>
+<script src="/common/reftest-wait.js"></script>
+<script src="/common/worklet-reftest.js"></script>
+
+<div class="test"></div>
+
+<script>
+importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/constraints-fixed-inline-size.js'});
+</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-grid.https.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-grid.https.html
new file mode 100644
index 0000000..94eca6b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-grid.https.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html class=reftest-wait>
+<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#dom-layoutconstraints-fixedinlinesize">
+<link rel="match" href="constraints-fixed-inline-size-ref.html">
+<meta name="assert" content="This test checks that LayoutConstraints#fixedInlineSize is passed into the layout function correctly." />
+<style>
+body {
+  display: grid;
+  grid: auto-flow / 100px;
+}
+
+.test {
+  background: red;
+}
+
+@supports (display: layout(test)) {
+  .test {
+    background: green;
+    display: layout(test);
+  }
+}
+</style>
+<script src="/common/reftest-wait.js"></script>
+<script src="/common/worklet-reftest.js"></script>
+
+<div class="test"></div>
+
+<script>
+importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/constraints-fixed-inline-size.js'});
+</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-percentage-vlr.https.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-percentage-vlr.https.html
new file mode 100644
index 0000000..0efabcb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-percentage-vlr.https.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html class=reftest-wait>
+<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#dom-layoutconstraints-fixedinlinesize">
+<link rel="match" href="constraints-fixed-inline-size-ref.html">
+<meta name="assert" content="This test checks that LayoutConstraints#fixedInlineSize is passed into the layout function correctly." />
+<style>
+body {
+  height: 200px;
+  writing-mode: vertical-lr;
+}
+
+.test {
+  background: red;
+  height: 50%;
+}
+
+@supports (display: layout(test)) {
+  .test {
+    background: green;
+    display: layout(test);
+  }
+}
+</style>
+<script src="/common/reftest-wait.js"></script>
+<script src="/common/worklet-reftest.js"></script>
+
+<div class="test"></div>
+
+<script>
+importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/constraints-fixed-inline-size.js'});
+</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-percentage.https.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-percentage.https.html
new file mode 100644
index 0000000..4b5a567
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-percentage.https.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html class=reftest-wait>
+<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#dom-layoutconstraints-fixedinlinesize">
+<link rel="match" href="constraints-fixed-inline-size-ref.html">
+<meta name="assert" content="This test checks that LayoutConstraints#fixedInlineSize is passed into the layout function correctly." />
+<style>
+body {
+  width: 200px;
+}
+
+.test {
+  background: red;
+  width: 50%;
+}
+
+@supports (display: layout(test)) {
+  .test {
+    background: green;
+    display: layout(test);
+  }
+}
+</style>
+<script src="/common/reftest-wait.js"></script>
+<script src="/common/worklet-reftest.js"></script>
+
+<div class="test"></div>
+
+<script>
+importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/constraints-fixed-inline-size.js'});
+</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-ref.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-ref.html
new file mode 100644
index 0000000..e5727c0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/constraints-fixed-inline-size-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<style>
+.result {
+  background: green;
+  height: 100px;
+  width: 100px;
+}
+</style>
+
+<div class="result"></div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/support/constraints-fixed-inline-size.js b/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/support/constraints-fixed-inline-size.js
new file mode 100644
index 0000000..4e591f7a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-layout-api/support/constraints-fixed-inline-size.js
@@ -0,0 +1,9 @@
+registerLayout('test', class {
+  *intrinsicSizes() {}
+  *layout(children, edges, constraints, styleMap) {
+    if (constraints.fixedInlineSize !== 100)
+      return {autoBlockSize: 0};
+
+    return {autoBlockSize: 100};
+  }
+});
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-typed-om/the-stylepropertymap/properties/center-coordinate.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-typed-om/the-stylepropertymap/properties/center-coordinate.html
new file mode 100644
index 0000000..97722ec
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-typed-om/the-stylepropertymap/properties/center-coordinate.html
@@ -0,0 +1,26 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>'center-coordinate' property</title>
+<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get">
+<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set">
+<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../../resources/testhelper.js"></script>
+<script src="resources/testsuite.js"></script>
+<body>
+<div id="log"></div>
+<script>
+'use strict';
+
+runPropertyTests('cx', [
+  { syntax: '<percentage>' },
+  { syntax: '<length>' },
+]);
+
+runPropertyTests('cy', [
+  { syntax: '<percentage>' },
+  { syntax: '<length>' },
+]);
+
+</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-typed-om/the-stylepropertymap/properties/coordinate.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-typed-om/the-stylepropertymap/properties/coordinate.html
new file mode 100644
index 0000000..31ccbfa
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-typed-om/the-stylepropertymap/properties/coordinate.html
@@ -0,0 +1,26 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>'coordinate' property</title>
+<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get">
+<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set">
+<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../../resources/testhelper.js"></script>
+<script src="resources/testsuite.js"></script>
+<body>
+<div id="log"></div>
+<script>
+'use strict';
+
+runPropertyTests('x', [
+  { syntax: '<percentage>' },
+  { syntax: '<length>' },
+]);
+
+runPropertyTests('y', [
+  { syntax: '<percentage>' },
+  { syntax: '<length>' },
+]);
+
+</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/webappapis/scripting/events/event-handler-attributes-window-body.html b/third_party/WebKit/LayoutTests/external/wpt/html/webappapis/scripting/events/event-handler-attributes-window-body.html
new file mode 100644
index 0000000..29c4c133
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/html/webappapis/scripting/events/event-handler-attributes-window-body.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>HTMLBodyElement event handlers</title>
+
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<div id="log"></div>
+<body>
+<script>
+function f() {
+  return 0;
+}
+
+var handlers = ['blur','error','focus','load','resize','scroll',
+                'afterprint','beforeprint','beforeunload','hashchange',
+                'languagechange','message','offline','online','pagehide',
+                'pageshow','popstate','storage','unload'];
+handlers.forEach(function(handler) {
+  test(function() {
+    window['on' + handler] = f;
+    assert_equals(document.body['on' + handler], f);
+  }, handler);
+});
+
+handlers.forEach(function(handler) {
+    window['on' + handler] = null;
+});
+
+handlers.forEach(function(handler) {
+  test(function() {
+    assert_equals(window['on' + handler], null);
+    assert_equals(document.body['on' + handler], null);
+  }, handler + " removal");
+});
+</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/shadow-dom/layout-slot-no-longer-assigned.html b/third_party/WebKit/LayoutTests/external/wpt/shadow-dom/layout-slot-no-longer-assigned.html
new file mode 100644
index 0000000..dfcac99
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/shadow-dom/layout-slot-no-longer-assigned.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<title>Layout using slot elements</title>
+<link rel="author" title="Hayato Ito" href="mailto:hayato@google.com"/>
+<link rel="help" href="https://dom.spec.whatwg.org/#shadow-tree-slots">
+<link rel="match" href="reference/empty.html"/>
+<div id="host"></div>
+<script>
+const host = document.querySelector('#host');
+const sr = host.attachShadow({ mode: 'open' });
+sr.innerHTML = '<slot name=s1></slot>'
+host.innerHTML = '<div id=d1 slot=s1></div>';
+
+document.body.offsetLeft;
+document.querySelector('#d1').setAttribute('slot', 's2');
+</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/shadow-dom/layout-slot-no-longer-fallback.html b/third_party/WebKit/LayoutTests/external/wpt/shadow-dom/layout-slot-no-longer-fallback.html
new file mode 100644
index 0000000..7507f11a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/shadow-dom/layout-slot-no-longer-fallback.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<title>Layout using slot elements</title>
+<link rel="author" title="Hayato Ito" href="mailto:hayato@google.com"/>
+<link rel="help" href="https://dom.spec.whatwg.org/#shadow-tree-slots">
+<link rel="match" href="reference/empty.html"/>
+<div id="host"></div>
+<script>
+const host = document.querySelector('#host');
+const sr = host.attachShadow({ mode: 'open' });
+
+sr.innerHTML = '<slot><div id="fallback">Should not be displayed</div></slot>'
+
+document.body.offsetLeft;
+host.appendChild(document.createElement('div'));
+</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/shadow-dom/reference/empty.html b/third_party/WebKit/LayoutTests/external/wpt/shadow-dom/reference/empty.html
new file mode 100644
index 0000000..0e76edd6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/shadow-dom/reference/empty.html
@@ -0,0 +1 @@
+<!DOCTYPE html>
diff --git a/third_party/WebKit/LayoutTests/fast/harness/results.html b/third_party/WebKit/LayoutTests/fast/harness/results.html
index 604b2ef..c5777608 100644
--- a/third_party/WebKit/LayoutTests/fast/harness/results.html
+++ b/third_party/WebKit/LayoutTests/fast/harness/results.html
@@ -173,9 +173,16 @@
   color: #4F8A10;
   margin-left: 5px;
 }
+
+#flag-toolbar {
+  display: inline-block;
+}
+#flag-toolbar.hidden {
+  display: none;
+}
 </style>
 <body>
-<h3>Test run summary <span id="builder_name"></span></h3>
+<h3>Test run summary <span id="builder_name"></span> <span class="flag_name"></span></h3>
 
 <div id="right-toolbar">
   <a id="help_button" href="javascript:GUI.toggleVisibility('help')">help</a>
@@ -302,6 +309,16 @@
     <button onclick="javascript:Query.query('Flagged', Filters.flagged, true)">
       Flagged
     </button>
+    <div id="flag-toolbar" class="hidden">
+      <button onclick="javascript:Query.query('Flag failures', Filters.flagFailure, true)">
+        <span class="flag_name"></span> failures
+        <span id="count_flagfailure"></span>
+      </button>
+      <button onclick="javascript:Query.query('Flag failures', Filters.flagPass, true)">
+        <span class="flag_name"></span> passes
+        <span id="count_flagpass"></span>
+      </button>
+    </div>
   </div>
   <div id="filters">
     <span class="fix-width">Filters</span>
@@ -401,7 +418,7 @@
   }
 
   _helper(node, path, filter, action) {
-    if ("actual" in node) {
+    if (GUI.isTest(node)) {
       this.testCount++;
       if (filter(node, path)) {
         this.filteredCount++;
@@ -894,6 +911,7 @@
     document.querySelector("#progress").style.width = "1%";
     document.querySelector("#copy_report").disabled = true;
     document.querySelector("#copy_single_line").disabled = true;
+        document.querySelector("#report_count").innerText = "";
     let traversal = new Traversal(globalResults.tests);
     let chunkSize = 1000;
     let index = 0;
@@ -936,35 +954,38 @@
   unexpectedPass: test => {
     return !Filters.containsPass(test.expectedMap) && Filters.containsPass(test.actualMap);
   },
-  regression: test => {
-    if (Filters.containsPass(test.actualMap))
+  regressionFromExpectedMap: (finalResult, expectedMap) => {
+    if (expectedMap.has("NEEDSMANUALREBASELINE")
+        || expectedMap.has("NEEDSREBASELINE")
+        || expectedMap.has("WONTFIX"))
       return false;
-    if (test.expectedMap.has("NEEDSMANUALREBASELINE")
-        || test.expectedMap.has("NEEDSREBASELINE")
-        || test.expectedMap.has("WONTFIX"))
-      return false;
-    switch (test.actualFinal) {
+    switch (finalResult) {
       case "SKIP":
         return false;
       case "CRASH":
       case "TIMEOUT":
       case "LEAK":
-        if (test.expectedMap.has(test.actualFinal))
+        if (expectedMap.has(finalResult))
           return false;
         break;
       case "TEXT":
       case "IMAGE":
       case "IMAGE+TEXT":
-        if (test.expectedMap.has("FAIL"))
+        if (expectedMap.has("FAIL"))
           return false;
         break;
       case "MISSING":
         break;
       default:
-        console.error("Unexpected test result", est.actualMap.keys().next().value);
+        console.error("Unexpected test result", finalResult);
       }
     return true;
   },
+  regression: test => {
+    if (Filters.containsPass(test.actualMap))
+      return false;
+    return Filters.regressionFromExpectedMap(test.actualFinal, test.expectedMap);
+  },
   notpass: test => test.actualFinal != "PASS" && test.expected != "WONTFIX",
   actual: tag => {  // Returns comparator for tag.
     return function(test) {
@@ -974,7 +995,40 @@
   wontfix: test => test.expected == "WONTFIX",
   all: _ => true,
   flaky: test => test.actualMap.size > 1,
-  flagged: test => test.flagged
+  flagged: test => test.flagged,
+  flagFailure: test => { // Tests that are failing, but expected to pass in base.
+    if (Filters.containsPass(test.actualMap))
+      return false;
+    if (test.expectedMap.has("NEEDSMANUALREBASELINE")
+        || test.expectedMap.has("NEEDSREBASELINE")
+        || test.expectedMap.has("WONTFIX"))
+      return false;
+    let baseMap = test.flagMap ? test.baseMap : test.expectedMap;
+    switch (test.actualFinal) {
+      case "SKIP":
+        return false;
+      case "CRASH":
+      case "TIMEOUT":
+      case "LEAK":
+        if (baseMap && baseMap.has(test.actualFinal))
+          return false;
+        break;
+      case "TEXT":
+      case "IMAGE":
+      case "IMAGE+TEXT":
+        if (baseMap && baseMap.has("FAIL"))
+          return false;
+        break;
+      case "MISSING":
+        break;
+      default:
+        console.error("Unexpected test result", test.actualFinal);
+      }
+    return true;
+  },
+  flagPass: test => {
+    return test.baseMap && (Filters.containsPass(test.actualMap) && !Filters.containsPass(test.baseMap));
+  }
 }; // Filters
 
 // Event handling, initialization.
@@ -993,15 +1047,20 @@
     document.querySelector("#button_regressions").click();
   },
 
+  hasBaseExpectations : false,
+
+  isTest: function(o) {
+    return "actual" in o;
+  },
+
   convertToMap: function(o) {
-    if ("actual" in o)
+    if (GUI.isTest(o))
       return o;
     else {
       let map = new Map();
       var keys = Object.keys(o).sort((a, b) => {
-        let a_isTest = "actual" in o[a];
-        let b_isTest = "actual" in o[b];
-        if (a_isTest == b_isTest)
+        let a_isTest = GUI.isTest(o[a]);
+        if (a_isTest == GUI.isTest(o[b]))
           return a < b ? -1 : +(a > b);
         return a_isTest ? -1 : 1;
       });
@@ -1019,9 +1078,12 @@
     // - test.expectPath, full path to test
     // - test.actualMap, map of actual results
     // - test.actualFinal, last result
-    // - test.expectedMap, maps of expected results
+    // - test.expectedMap, maps of all expected results
+    // - test.baseMap, map of base expected results. Can be undefined.
+    // - test.flagMap, map of flag expected results. Can be undefined.
     // For all crashing tests without crash_site, set crash_site to "Can't identify".
     let nextId = 1;
+    let baseCount = 0;
     t.traverse(
       test => true,
       (test, path) => {
@@ -1040,6 +1102,16 @@
         if (test.actualMap.has("CRASH") && !test["crash_site"]) {
           test["crash_site"] = "Can't identify";
         }
+        if ("base_expectations" in test) {
+          GUI.hasBaseExpectations = true;
+          baseCount++;
+          test.baseMap = new Map();
+          test.base_expectations.forEach( result => test.baseMap.set(result, true));
+        }
+        if ("flag_expectations" in test) {
+          test.flagMap = new Map();
+          test.flag_expectations.forEach( result => test.flagMap.set(result, true));
+        }
       }
     );
   },
@@ -1291,6 +1363,8 @@
       "count_testexpectations": 0,
       "count_flaky": 0,
       "count_all": 0,
+      "count_flagfailure": 0,
+      "count_flagpass" : 0
     };
     var t = new Traversal(fullResults.tests);
     t.traverse( test => {
@@ -1303,6 +1377,10 @@
         counts.count_testexpectations++;
       if (Filters.flaky(test))
         counts.count_flaky++;
+      if (Filters.flagFailure(test))
+        counts.count_flagfailure++;
+      if (Filters.flagPass(test))
+        counts.count_flagpass++;
     });
     console.assert(
         counts.count_regressions == fullResults.num_regressions,
@@ -1312,6 +1390,17 @@
       document.querySelector("#" + p).innerText = counts[p];
 
     document.querySelector("#summary_total").innerText = counts.count_all;
+    if (!GUI.hasBaseExpectations)
+      document.querySelector("#flag-toolbar").classList.add("hidden");
+    else {
+      document.querySelector("#flag-toolbar").classList.remove("hidden");
+      let flagName = fullResults.flag_name || "";
+      flagName = flagName.replace('/', '')
+        .replace('enable-blink-features', '').replace('=', '');
+      Array.from(document.querySelectorAll(".flag_name")).forEach( el => {
+        el.innerText = flagName;
+      });
+    }
   },
 
   getExpectation: function(el) {
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/line-height-determined-by-primary-font-expected.png b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/line-height-determined-by-primary-font-expected.png
index 5cf8058b..3482e74 100644
--- a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/line-height-determined-by-primary-font-expected.png
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/line-height-determined-by-primary-font-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/text/international/002-expected.png b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/text/international/002-expected.png
index 7d1ede99..3987c51 100644
--- a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/text/international/002-expected.png
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/text/international/002-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/text/international/plane2-expected.png b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/text/international/plane2-expected.png
index dc179b43..b38ceae7 100644
--- a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/text/international/plane2-expected.png
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/text/international/plane2-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/text/international/wrap-CJK-001-expected.png b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/text/international/wrap-CJK-001-expected.png
new file mode 100644
index 0000000..5eb4da5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/text/international/wrap-CJK-001-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/text/justify-ideograph-complex-expected.png b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/text/justify-ideograph-complex-expected.png
index 82f6cc7..9bcb87a 100644
--- a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/text/justify-ideograph-complex-expected.png
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/text/justify-ideograph-complex-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/text/justify-ideograph-simple-expected.png b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/text/justify-ideograph-simple-expected.png
index 82f6cc7..9bcb87a 100644
--- a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/text/justify-ideograph-simple-expected.png
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/text/justify-ideograph-simple-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/text/justify-ideograph-vertical-expected.png b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/text/justify-ideograph-vertical-expected.png
index 5db7d3e..0ec58ce4 100644
--- a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/text/justify-ideograph-vertical-expected.png
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/text/justify-ideograph-vertical-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/text/orientation-sideways-expected.png b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/text/orientation-sideways-expected.png
index 5f8597e..6b9f9f9 100644
--- a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/text/orientation-sideways-expected.png
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/text/orientation-sideways-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/writing-mode/japanese-lr-text-expected.png b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/writing-mode/japanese-lr-text-expected.png
new file mode 100644
index 0000000..fe3dfc1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/writing-mode/japanese-lr-text-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/writing-mode/vertical-align-table-baseline-expected.png b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/writing-mode/vertical-align-table-baseline-expected.png
new file mode 100644
index 0000000..f9ba82c4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/writing-mode/vertical-align-table-baseline-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/writing-mode/vertical-baseline-alignment-expected.png b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/writing-mode/vertical-baseline-alignment-expected.png
new file mode 100644
index 0000000..128871e8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/writing-mode/vertical-baseline-alignment-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/writing-mode/vertical-font-fallback-expected.png b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/writing-mode/vertical-font-fallback-expected.png
new file mode 100644
index 0000000..45a1f7a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/writing-mode/vertical-font-fallback-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/elements/css-variables/defined-css-variables-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/elements/css-variables/defined-css-variables-expected.txt
new file mode 100644
index 0000000..2981203
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/elements/css-variables/defined-css-variables-expected.txt
@@ -0,0 +1,21 @@
+Verify that CSS variables are defined correctly wrt DOM inheritance
+matchedStyles.availableCSSVariables()
+element.style
+  --body-variable
+  --another-div-variable
+  --div-variable
+  --span-variable
+span
+  --body-variable
+  --another-div-variable
+  --div-variable
+  --span-variable
+.myelement
+  --body-variable
+  --another-div-variable
+  --div-variable
+div
+  --body-variable
+  --another-div-variable
+  --div-variable
+
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/elements/css-variables/defined-css-variables.js b/third_party/WebKit/LayoutTests/http/tests/devtools/elements/css-variables/defined-css-variables.js
new file mode 100644
index 0000000..c0acd2f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/elements/css-variables/defined-css-variables.js
@@ -0,0 +1,52 @@
+// 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() {
+  TestRunner.addResult(`Verify that CSS variables are defined correctly wrt DOM inheritance`);
+  await TestRunner.loadModule('elements_test_runner');
+  await TestRunner.showPanel('elements');
+  await TestRunner.loadHTML(`
+    <style>
+      body {
+        --body-variable: red;
+      }
+
+      div {
+        --div-variable: blue;
+      }
+
+      .myelement {
+        --another-div-variable: grey;
+      }
+
+      span {
+        --span-variable: green;
+      }
+    </style>
+    <body>
+      <div class=myelement>
+        <span id=inspected></span>
+      </div>
+    </body>
+  `);
+
+
+  const node = await ElementsTestRunner.selectNodeAndWaitForStylesPromise('inspected');
+  const matchedStyles = await TestRunner.cssModel.matchedStylesPromise(node.id);
+  TestRunner.addResult('matchedStyles.availableCSSVariables()');
+  const styles = matchedStyles.nodeStyles();
+  dumpCSSVariables(styles[0]);
+  dumpCSSVariables(styles[1]);
+  dumpCSSVariables(styles[2]);
+  dumpCSSVariables(styles[3]);
+  TestRunner.completeTest();
+
+  function dumpCSSVariables(style) {
+    const rule = style.parentRule;
+    TestRunner.addResult(rule ? rule.selectorText() : 'element.style');
+    const cssVariables = matchedStyles.availableCSSVariables(style);
+    for (const cssVar of cssVariables)
+      TestRunner.addResult('  ' + cssVar);
+  }
+})();
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/elements/css-variables/resolve-css-variables-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/elements/css-variables/resolve-css-variables-expected.txt
new file mode 100644
index 0000000..cd84545d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/elements/css-variables/resolve-css-variables-expected.txt
@@ -0,0 +1,21 @@
+Verify that CSS variables are resolved inside cascade
+matchedStyles.computeCSSVariable()
+  --foo === active-foo
+  --baz === active-baz !important
+  --does-not-exist === null
+  --dark === darkgrey
+  --light === lightgrey
+  --theme === darkgrey
+  --shadow === 1px darkgrey
+  --width === 1px
+  --cycle-a === null
+  --cycle-b === null
+  --cycle-c === null
+matchedStyles.computeValue()
+  1px var(--dark) 2px var(--theme) === 1px darkgrey 2px darkgrey
+  1px var(--theme) === 1px darkgrey
+  rgb(100, 200, 300) var(--some-color, blue    ) 1px === rgb(100, 200, 300) blue 1px
+  var(--not-existing) === null
+  var(--not-existing-with-default, red) === red
+  var(--width)solid black === 1px solid black
+
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/elements/css-variables/resolve-css-variables.js b/third_party/WebKit/LayoutTests/http/tests/devtools/elements/css-variables/resolve-css-variables.js
new file mode 100644
index 0000000..4ba2268
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/elements/css-variables/resolve-css-variables.js
@@ -0,0 +1,71 @@
+// 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.
+
+(async function() {
+  TestRunner.addResult(`Verify that CSS variables are resolved inside cascade`);
+  await TestRunner.loadModule('elements_test_runner');
+  await TestRunner.showPanel('elements');
+  await TestRunner.loadHTML(`
+    <style>
+      .foo {
+        --foo: active-foo;
+        --baz: active-baz !important;
+        --baz: passive-baz;
+      }
+
+      div {
+        --dark: darkgrey;
+        --light: lightgrey;
+        --theme: var(--dark);
+        --shadow: 1px var(--theme);
+        text-shadow: 2px var(--shadow);
+        --cycle-a: var(--cycle-b);
+        --cycle-b: var(--cycle-c);
+        --cycle-c: var(--cycle-a);
+      }
+
+      * {
+        --foo: passive-foo;
+        --width: 1px;
+      }
+    </style>
+    <div>
+      <div id=inspected class=foo></div>
+    </div>
+  `);
+
+
+  const node = await ElementsTestRunner.selectNodeAndWaitForStylesPromise('inspected');
+  const matchedStyles = await TestRunner.cssModel.matchedStylesPromise(node.id);
+  TestRunner.addResult('matchedStyles.computeCSSVariable()');
+  dumpCSSVariable('--foo');
+  dumpCSSVariable('--baz');
+  dumpCSSVariable('--does-not-exist');
+  dumpCSSVariable('--dark');
+  dumpCSSVariable('--light');
+  dumpCSSVariable('--theme');
+  dumpCSSVariable('--shadow');
+  dumpCSSVariable('--width');
+  dumpCSSVariable('--cycle-a');
+  dumpCSSVariable('--cycle-b');
+  dumpCSSVariable('--cycle-c');
+  TestRunner.addResult('matchedStyles.computeValue()');
+  dumpValue('1px var(--dark) 2px var(--theme)');
+  dumpValue('1px var(--theme)');
+  dumpValue('rgb(100, 200, 300) var(--some-color, blue    ) 1px');
+  dumpValue('var(--not-existing)');
+  dumpValue('var(--not-existing-with-default, red)');
+  dumpValue('var(--width)solid black');
+  TestRunner.completeTest();
+
+  function dumpCSSVariable(varName) {
+    const style = matchedStyles.nodeStyles()[0];
+    TestRunner.addResult('  ' + varName + ' === ' + matchedStyles.computeCSSVariable(style, varName));
+  }
+
+  function dumpValue(value) {
+    const style = matchedStyles.nodeStyles()[0];
+    TestRunner.addResult('  ' + value + ' === ' + matchedStyles.computeValue(style, value));
+  }
+})();
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/elements/css-variables/resolve-inherited-css-variables-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/elements/css-variables/resolve-inherited-css-variables-expected.txt
new file mode 100644
index 0000000..b2a8ec3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/elements/css-variables/resolve-inherited-css-variables-expected.txt
@@ -0,0 +1,6 @@
+Verify that CSS variables are resolved properly for DOM inheritance
+compute "var(--color)" for element.style: blue
+compute "var(--color)" for span: blue
+compute "var(--color)" for div: red
+compute "var(--color)" for body: red
+
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/elements/css-variables/resolve-inherited-css-variables.js b/third_party/WebKit/LayoutTests/http/tests/devtools/elements/css-variables/resolve-inherited-css-variables.js
new file mode 100644
index 0000000..607148e3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/elements/css-variables/resolve-inherited-css-variables.js
@@ -0,0 +1,36 @@
+// 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.
+
+(async function() {
+  TestRunner.addResult(`Verify that CSS variables are resolved properly for DOM inheritance`);
+  await TestRunner.loadModule('elements_test_runner');
+  await TestRunner.showPanel('elements');
+  await TestRunner.loadHTML(`
+    <style>
+      span {
+        --color: blue;
+      }
+
+      div {
+        color: var(--color);
+      }
+
+      body {
+        --color: red;
+      }
+    </style>
+    <div>
+      <span id=inspected></span>
+    </div>
+  `);
+
+  const node = await ElementsTestRunner.selectNodeAndWaitForStylesPromise('inspected');
+  const matchedStyles = await TestRunner.cssModel.matchedStylesPromise(node.id);
+  for (const style of matchedStyles.nodeStyles()) {
+    const selector = style.parentRule ? style.parentRule.selectorText() : 'element.style';
+    const value = 'var(--color)';
+    TestRunner.addResult(`compute "${value}" for ${selector}: ` + matchedStyles.computeValue(style, value));
+  }
+  TestRunner.completeTest();
+})();
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/elements/styles-3/style-autocomplete.js b/third_party/WebKit/LayoutTests/http/tests/devtools/elements/styles-3/style-autocomplete.js
index a1d339d0..93661c1 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/elements/styles-3/style-autocomplete.js
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/elements/styles-3/style-autocomplete.js
@@ -21,12 +21,13 @@
   var node =
       ElementsTestRunner.nodeWithId('inner', node => TestRunner.cssModel.cachedMatchedCascadeForNode(node).then(step1));
   function step1(matchedStyles) {
+    var inlineStyle = matchedStyles.nodeStyles()[0];
     var namePrompt = new Elements.StylesSidebarPane.CSSPropertyPrompt(
-        SDK.cssMetadata().allProperties(), matchedStyles.cssVariables(), null, true);
+        SDK.cssMetadata().allProperties(), matchedStyles.availableCSSVariables(inlineStyle), null, true);
     var valuePrompt = valuePromptFor('color');
     function valuePromptFor(name) {
       return new Elements.StylesSidebarPane.CSSPropertyPrompt(
-          SDK.cssMetadata().propertyValues(name), matchedStyles.cssVariables(), null, false);
+          SDK.cssMetadata().propertyValues(name), matchedStyles.availableCSSVariables(inlineStyle), null, false);
     }
     TestRunner.runTestSuite([
       function testEmptyName(next) {
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/elements/styles-4/styles-overloaded-shorthand-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/elements/styles-4/styles-overloaded-shorthand-expected.txt
index 8f98b63e..74a30032 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/elements/styles-4/styles-overloaded-shorthand-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/elements/styles-4/styles-overloaded-shorthand-expected.txt
@@ -15,7 +15,7 @@
     font-size: 1.2em;
     line-height: 1;
     font-family: "Arial", sans-serif;
-    margin: 10px;
+/-- overloaded --/     margin: 10px;
     /-- overloaded --/     margin-top: 10px;
     /-- overloaded --/     margin-right: 10px;
     /-- overloaded --/     margin-bottom: 10px;
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8SVGTestInterface.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8SVGTestInterface.cpp
index 1ce03800..257ae13 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8SVGTestInterface.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8SVGTestInterface.cpp
@@ -108,7 +108,8 @@
 }
 
 static const V8DOMConfiguration::AccessorConfiguration V8SVGTestInterfaceAccessors[] = {
-    { "type", V8SVGTestInterface::typeAttributeGetterCallback, V8SVGTestInterface::typeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "type", V8SVGTestInterface::typeAttributeGetterCallback, V8SVGTestInterface::typeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 };
 
 static void installV8SVGTestInterfaceTemplate(
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestAttributeGetters.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestAttributeGetters.cpp
index 2fa9cd6..e73d1832 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestAttributeGetters.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestAttributeGetters.cpp
@@ -179,15 +179,20 @@
 }
 
 static const V8DOMConfiguration::AccessorConfiguration V8TestAttributeGettersAccessors[] = {
-    { "lenientThisLongAttribute", V8TestAttributeGetters::lenientThisLongAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kDoNotCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "lenientThisLongAttribute", V8TestAttributeGetters::lenientThisLongAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kDoNotCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "stringPromiseAttribute", V8TestAttributeGetters::stringPromiseAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kDoNotCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "stringPromiseAttribute", V8TestAttributeGetters::stringPromiseAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kDoNotCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "lenientThisStringPromiseAttribute", V8TestAttributeGetters::lenientThisStringPromiseAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kDoNotCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "lenientThisStringPromiseAttribute", V8TestAttributeGetters::lenientThisStringPromiseAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kDoNotCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "raisesExceptionShortPromiseAttribute", V8TestAttributeGetters::raisesExceptionShortPromiseAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kDoNotCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "raisesExceptionShortPromiseAttribute", V8TestAttributeGetters::raisesExceptionShortPromiseAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kDoNotCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "floatAttribute", V8TestAttributeGetters::floatAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "floatAttribute", V8TestAttributeGetters::floatAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 };
 
 static void installV8TestAttributeGettersTemplate(
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestCallbackFunctions.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestCallbackFunctions.cpp
index 5c16470..9ef62fd 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestCallbackFunctions.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestCallbackFunctions.cpp
@@ -155,6 +155,7 @@
   }
   if (UNLIKELY(numArgsPassed <= 0)) {
     impl->voidMethodOptionalCallbackFunctionInArg();
+
     return;
   }
   if (info[0]->IsFunction()) {
@@ -255,7 +256,8 @@
 }
 
 static const V8DOMConfiguration::AccessorConfiguration V8TestCallbackFunctionsAccessors[] = {
-    { "customElementsCallbacksReadonlyAttribute", V8TestCallbackFunctions::customElementsCallbacksReadonlyAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "customElementsCallbacksReadonlyAttribute", V8TestCallbackFunctions::customElementsCallbacksReadonlyAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 };
 
 static const V8DOMConfiguration::MethodConfiguration V8TestCallbackFunctionsMethods[] = {
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexed.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexed.cpp
index c6a4d9f..16d4578 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexed.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexed.cpp
@@ -315,7 +315,8 @@
 }
 
 static const V8DOMConfiguration::AccessorConfiguration V8TestIntegerIndexedAccessors[] = {
-    { "length", V8TestIntegerIndexed::lengthAttributeGetterCallback, V8TestIntegerIndexed::lengthAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "length", V8TestIntegerIndexed::lengthAttributeGetterCallback, V8TestIntegerIndexed::lengthAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 };
 
 static const V8DOMConfiguration::MethodConfiguration V8TestIntegerIndexedMethods[] = {
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedGlobal.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedGlobal.cpp
index ea0a1165..fe62861 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedGlobal.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedGlobal.cpp
@@ -237,7 +237,8 @@
 }
 
 static const V8DOMConfiguration::AccessorConfiguration V8TestIntegerIndexedGlobalAccessors[] = {
-    { "length", V8TestIntegerIndexedGlobal::lengthAttributeGetterCallback, V8TestIntegerIndexedGlobal::lengthAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "length", V8TestIntegerIndexedGlobal::lengthAttributeGetterCallback, V8TestIntegerIndexedGlobal::lengthAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 };
 
 static const V8DOMConfiguration::MethodConfiguration V8TestIntegerIndexedGlobalMethods[] = {
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedPrimaryGlobal.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedPrimaryGlobal.cpp
index 2879ebaa..2f4a7c3 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedPrimaryGlobal.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedPrimaryGlobal.cpp
@@ -237,7 +237,8 @@
 }
 
 static const V8DOMConfiguration::AccessorConfiguration V8TestIntegerIndexedPrimaryGlobalAccessors[] = {
-    { "length", V8TestIntegerIndexedPrimaryGlobal::lengthAttributeGetterCallback, V8TestIntegerIndexedPrimaryGlobal::lengthAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "length", V8TestIntegerIndexedPrimaryGlobal::lengthAttributeGetterCallback, V8TestIntegerIndexedPrimaryGlobal::lengthAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 };
 
 static const V8DOMConfiguration::MethodConfiguration V8TestIntegerIndexedPrimaryGlobalMethods[] = {
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp
index 94784a1..c2c5bd3 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp
@@ -3526,74 +3526,106 @@
 #pragma clang diagnostic ignored "-Wglobal-constructors"
 #endif
 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceLazyDataAttributes[] = {
-    { "testInterfaceConstructorAttribute", V8TestInterface::testInterfaceConstructorAttributeConstructorGetterCallback, nullptr, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "testInterfaceConstructorAttribute", V8TestInterface::testInterfaceConstructorAttributeConstructorGetterCallback, nullptr, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "TestInterface", V8TestInterface::TestInterfaceConstructorGetterCallback, nullptr, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "TestInterface", V8TestInterface::TestInterfaceConstructorGetterCallback, nullptr, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "TestInterface2", V8TestInterface::TestInterface2ConstructorGetterCallback, nullptr, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "TestInterface2", V8TestInterface::TestInterface2ConstructorGetterCallback, nullptr, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 };
 #if defined(COMPONENT_BUILD) && defined(WIN32) && defined(__clang__)
 #pragma clang diagnostic pop
 #endif
 
 static const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceAccessors[] = {
-    { "testInterfaceAttribute", V8TestInterface::testInterfaceAttributeAttributeGetterCallback, V8TestInterface::testInterfaceAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "testInterfaceAttribute", V8TestInterface::testInterfaceAttributeAttributeGetterCallback, V8TestInterface::testInterfaceAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "doubleAttribute", V8TestInterface::doubleAttributeAttributeGetterCallback, V8TestInterface::doubleAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "doubleAttribute", V8TestInterface::doubleAttributeAttributeGetterCallback, V8TestInterface::doubleAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "floatAttribute", V8TestInterface::floatAttributeAttributeGetterCallback, V8TestInterface::floatAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "floatAttribute", V8TestInterface::floatAttributeAttributeGetterCallback, V8TestInterface::floatAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "unrestrictedDoubleAttribute", V8TestInterface::unrestrictedDoubleAttributeAttributeGetterCallback, V8TestInterface::unrestrictedDoubleAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "unrestrictedDoubleAttribute", V8TestInterface::unrestrictedDoubleAttributeAttributeGetterCallback, V8TestInterface::unrestrictedDoubleAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "unrestrictedFloatAttribute", V8TestInterface::unrestrictedFloatAttributeAttributeGetterCallback, V8TestInterface::unrestrictedFloatAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "unrestrictedFloatAttribute", V8TestInterface::unrestrictedFloatAttributeAttributeGetterCallback, V8TestInterface::unrestrictedFloatAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "testEnumAttribute", V8TestInterface::testEnumAttributeAttributeGetterCallback, V8TestInterface::testEnumAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "testEnumAttribute", V8TestInterface::testEnumAttributeAttributeGetterCallback, V8TestInterface::testEnumAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "testEnumOrNullAttribute", V8TestInterface::testEnumOrNullAttributeAttributeGetterCallback, V8TestInterface::testEnumOrNullAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "testEnumOrNullAttribute", V8TestInterface::testEnumOrNullAttributeAttributeGetterCallback, V8TestInterface::testEnumOrNullAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "stringOrDoubleAttribute", V8TestInterface::stringOrDoubleAttributeAttributeGetterCallback, V8TestInterface::stringOrDoubleAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "stringOrDoubleAttribute", V8TestInterface::stringOrDoubleAttributeAttributeGetterCallback, V8TestInterface::stringOrDoubleAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "withExtendedAttributeStringAttribute", V8TestInterface::withExtendedAttributeStringAttributeAttributeGetterCallback, V8TestInterface::withExtendedAttributeStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "withExtendedAttributeStringAttribute", V8TestInterface::withExtendedAttributeStringAttributeAttributeGetterCallback, V8TestInterface::withExtendedAttributeStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "uncapitalAttribute", V8TestInterface::uncapitalAttributeAttributeGetterCallback, V8TestInterface::uncapitalAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "uncapitalAttribute", V8TestInterface::uncapitalAttributeAttributeGetterCallback, V8TestInterface::uncapitalAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "staticStringAttribute", V8TestInterface::staticStringAttributeAttributeGetterCallback, V8TestInterface::staticStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "staticStringAttribute", V8TestInterface::staticStringAttributeAttributeGetterCallback, V8TestInterface::staticStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "staticReturnDOMWrapperAttribute", V8TestInterface::staticReturnDOMWrapperAttributeAttributeGetterCallback, V8TestInterface::staticReturnDOMWrapperAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "staticReturnDOMWrapperAttribute", V8TestInterface::staticReturnDOMWrapperAttributeAttributeGetterCallback, V8TestInterface::staticReturnDOMWrapperAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "staticReadOnlyStringAttribute", V8TestInterface::staticReadOnlyStringAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "staticReadOnlyStringAttribute", V8TestInterface::staticReadOnlyStringAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "staticReadOnlyReturnDOMWrapperAttribute", V8TestInterface::staticReadOnlyReturnDOMWrapperAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "staticReadOnlyReturnDOMWrapperAttribute", V8TestInterface::staticReadOnlyReturnDOMWrapperAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "legacyInterfaceTypeCheckingAttribute", V8TestInterface::legacyInterfaceTypeCheckingAttributeAttributeGetterCallback, V8TestInterface::legacyInterfaceTypeCheckingAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "legacyInterfaceTypeCheckingAttribute", V8TestInterface::legacyInterfaceTypeCheckingAttributeAttributeGetterCallback, V8TestInterface::legacyInterfaceTypeCheckingAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "stringNullAsEmptyAttribute", V8TestInterface::stringNullAsEmptyAttributeAttributeGetterCallback, V8TestInterface::stringNullAsEmptyAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "stringNullAsEmptyAttribute", V8TestInterface::stringNullAsEmptyAttributeAttributeGetterCallback, V8TestInterface::stringNullAsEmptyAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "usvStringOrNullAttribute", V8TestInterface::usvStringOrNullAttributeAttributeGetterCallback, V8TestInterface::usvStringOrNullAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "usvStringOrNullAttribute", V8TestInterface::usvStringOrNullAttributeAttributeGetterCallback, V8TestInterface::usvStringOrNullAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "alwaysExposedAttribute", V8TestInterface::alwaysExposedAttributeAttributeGetterCallback, V8TestInterface::alwaysExposedAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "alwaysExposedAttribute", V8TestInterface::alwaysExposedAttributeAttributeGetterCallback, V8TestInterface::alwaysExposedAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "lenientThisAttribute", V8TestInterface::lenientThisAttributeAttributeGetterCallback, V8TestInterface::lenientThisAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kDoNotCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "lenientThisAttribute", V8TestInterface::lenientThisAttributeAttributeGetterCallback, V8TestInterface::lenientThisAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kDoNotCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "implementsStaticReadOnlyLongAttribute", V8TestInterface::implementsStaticReadOnlyLongAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "implementsStaticReadOnlyLongAttribute", V8TestInterface::implementsStaticReadOnlyLongAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "implementsStaticStringAttribute", V8TestInterface::implementsStaticStringAttributeAttributeGetterCallback, V8TestInterface::implementsStaticStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "implementsStaticStringAttribute", V8TestInterface::implementsStaticStringAttributeAttributeGetterCallback, V8TestInterface::implementsStaticStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "implementsReadonlyStringAttribute", V8TestInterface::implementsReadonlyStringAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "implementsReadonlyStringAttribute", V8TestInterface::implementsReadonlyStringAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "implementsStringAttribute", V8TestInterface::implementsStringAttributeAttributeGetterCallback, V8TestInterface::implementsStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "implementsStringAttribute", V8TestInterface::implementsStringAttributeAttributeGetterCallback, V8TestInterface::implementsStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "implementsNodeAttribute", V8TestInterface::implementsNodeAttributeAttributeGetterCallback, V8TestInterface::implementsNodeAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "implementsNodeAttribute", V8TestInterface::implementsNodeAttributeAttributeGetterCallback, V8TestInterface::implementsNodeAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "implementsEventHandlerAttribute", V8TestInterface::implementsEventHandlerAttributeAttributeGetterCallback, V8TestInterface::implementsEventHandlerAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "implementsEventHandlerAttribute", V8TestInterface::implementsEventHandlerAttributeAttributeGetterCallback, V8TestInterface::implementsEventHandlerAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "implements3StringAttribute", V8TestInterface::implements3StringAttributeAttributeGetterCallback, V8TestInterface::implements3StringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "implements3StringAttribute", V8TestInterface::implements3StringAttributeAttributeGetterCallback, V8TestInterface::implements3StringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "implements3StaticStringAttribute", V8TestInterface::implements3StaticStringAttributeAttributeGetterCallback, V8TestInterface::implements3StaticStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "implements3StaticStringAttribute", V8TestInterface::implements3StaticStringAttributeAttributeGetterCallback, V8TestInterface::implements3StaticStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "partial2LongAttribute", V8TestInterface::partial2LongAttributeAttributeGetterCallback, V8TestInterface::partial2LongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "partial2LongAttribute", V8TestInterface::partial2LongAttributeAttributeGetterCallback, V8TestInterface::partial2LongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "partial2StaticLongAttribute", V8TestInterface::partial2StaticLongAttributeAttributeGetterCallback, V8TestInterface::partial2StaticLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "partial2StaticLongAttribute", V8TestInterface::partial2StaticLongAttributeAttributeGetterCallback, V8TestInterface::partial2StaticLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 };
 
 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceMethods[] = {
@@ -3653,6 +3685,7 @@
   V8DOMConfiguration::InstallConstants(
       isolate, interfaceTemplate, prototypeTemplate,
       V8TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants));
+
   V8DOMConfiguration::InstallLazyDataAttributes(
       isolate, world, instanceTemplate, prototypeTemplate,
       V8TestInterfaceLazyDataAttributes, WTF_ARRAY_LENGTH(V8TestInterfaceLazyDataAttributes));
@@ -3721,11 +3754,14 @@
 
   if (RuntimeEnabledFeatures::FeatureNameEnabled()) {
     static const V8DOMConfiguration::AccessorConfiguration accessor_configurations[] = {
-        { "conditionalReadOnlyLongAttribute", V8TestInterface::conditionalReadOnlyLongAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+        { "conditionalReadOnlyLongAttribute", V8TestInterface::conditionalReadOnlyLongAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+  ,
 
-        { "staticConditionalReadOnlyLongAttribute", V8TestInterface::staticConditionalReadOnlyLongAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+        { "staticConditionalReadOnlyLongAttribute", V8TestInterface::staticConditionalReadOnlyLongAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+  ,
 
-        { "conditionalLongAttribute", V8TestInterface::conditionalLongAttributeAttributeGetterCallback, V8TestInterface::conditionalLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+        { "conditionalLongAttribute", V8TestInterface::conditionalLongAttributeAttributeGetterCallback, V8TestInterface::conditionalLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+  ,
     };
     V8DOMConfiguration::InstallAccessors(
         isolate, world, instance_template, prototype_template, interface_template,
@@ -3734,9 +3770,11 @@
   }
   if (RuntimeEnabledFeatures::Implements2FeatureNameEnabled()) {
     static const V8DOMConfiguration::AccessorConfiguration accessor_configurations[] = {
-        { "implements2StaticStringAttribute", V8TestInterface::implements2StaticStringAttributeAttributeGetterCallback, V8TestInterface::implements2StaticStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+        { "implements2StaticStringAttribute", V8TestInterface::implements2StaticStringAttributeAttributeGetterCallback, V8TestInterface::implements2StaticStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+  ,
 
-        { "implements2StringAttribute", V8TestInterface::implements2StringAttributeAttributeGetterCallback, V8TestInterface::implements2StringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+        { "implements2StringAttribute", V8TestInterface::implements2StringAttributeAttributeGetterCallback, V8TestInterface::implements2StringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+  ,
     };
     V8DOMConfiguration::InstallAccessors(
         isolate, world, instance_template, prototype_template, interface_template,
@@ -3745,7 +3783,8 @@
   }
   if (RuntimeEnabledFeatures::ImplementsFeatureNameEnabled()) {
     static const V8DOMConfiguration::AccessorConfiguration accessor_configurations[] = {
-        { "implementsRuntimeEnabledNodeAttribute", V8TestInterface::implementsRuntimeEnabledNodeAttributeAttributeGetterCallback, V8TestInterface::implementsRuntimeEnabledNodeAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+        { "implementsRuntimeEnabledNodeAttribute", V8TestInterface::implementsRuntimeEnabledNodeAttributeAttributeGetterCallback, V8TestInterface::implementsRuntimeEnabledNodeAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+  ,
     };
     V8DOMConfiguration::InstallAccessors(
         isolate, world, instance_template, prototype_template, interface_template,
@@ -3754,13 +3793,17 @@
   }
   if (RuntimeEnabledFeatures::PartialFeatureNameEnabled()) {
     static const V8DOMConfiguration::AccessorConfiguration accessor_configurations[] = {
-        { "partialCallWithExecutionContextLongAttribute", V8TestInterface::partialCallWithExecutionContextLongAttributeAttributeGetterCallback, V8TestInterface::partialCallWithExecutionContextLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+        { "partialCallWithExecutionContextLongAttribute", V8TestInterface::partialCallWithExecutionContextLongAttributeAttributeGetterCallback, V8TestInterface::partialCallWithExecutionContextLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+  ,
 
-        { "partialLongAttribute", V8TestInterface::partialLongAttributeAttributeGetterCallback, V8TestInterface::partialLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+        { "partialLongAttribute", V8TestInterface::partialLongAttributeAttributeGetterCallback, V8TestInterface::partialLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+  ,
 
-        { "partialPartialEnumTypeAttribute", V8TestInterface::partialPartialEnumTypeAttributeAttributeGetterCallback, V8TestInterface::partialPartialEnumTypeAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+        { "partialPartialEnumTypeAttribute", V8TestInterface::partialPartialEnumTypeAttributeAttributeGetterCallback, V8TestInterface::partialPartialEnumTypeAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+  ,
 
-        { "partialStaticLongAttribute", V8TestInterface::partialStaticLongAttributeAttributeGetterCallback, V8TestInterface::partialStaticLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+        { "partialStaticLongAttribute", V8TestInterface::partialStaticLongAttributeAttributeGetterCallback, V8TestInterface::partialStaticLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+  ,
     };
     V8DOMConfiguration::InstallAccessors(
         isolate, world, instance_template, prototype_template, interface_template,
@@ -3859,11 +3902,14 @@
   if (!prototypeObject.IsEmpty() || !interfaceObject.IsEmpty()) {
     if (isSecureContext) {
       static const V8DOMConfiguration::AccessorConfiguration accessor_configurations[] = {
-          { "partial2SecureContextAttribute", V8TestInterface::partial2SecureContextAttributeAttributeGetterCallback, V8TestInterface::partial2SecureContextAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+          { "partial2SecureContextAttribute", V8TestInterface::partial2SecureContextAttributeAttributeGetterCallback, V8TestInterface::partial2SecureContextAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+      ,
 
-          { "partialSecureContextAttribute", V8TestInterface::partialSecureContextAttributeAttributeGetterCallback, V8TestInterface::partialSecureContextAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+          { "partialSecureContextAttribute", V8TestInterface::partialSecureContextAttributeAttributeGetterCallback, V8TestInterface::partialSecureContextAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+      ,
 
-          { "secureContextAttribute", V8TestInterface::secureContextAttributeAttributeGetterCallback, V8TestInterface::secureContextAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+          { "secureContextAttribute", V8TestInterface::secureContextAttributeAttributeGetterCallback, V8TestInterface::secureContextAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+      ,
       };
       V8DOMConfiguration::InstallAccessors(
           isolate, world, instanceObject, prototypeObject, interfaceObject,
@@ -3871,7 +3917,8 @@
           WTF_ARRAY_LENGTH(accessor_configurations));
       if (RuntimeEnabledFeatures::PartialFeatureNameEnabled()) {
         static const V8DOMConfiguration::AccessorConfiguration accessor_configurations[] = {
-            { "partialSecureContextLongAttribute", V8TestInterface::partialSecureContextLongAttributeAttributeGetterCallback, V8TestInterface::partialSecureContextLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+            { "partialSecureContextLongAttribute", V8TestInterface::partialSecureContextLongAttributeAttributeGetterCallback, V8TestInterface::partialSecureContextLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+        ,
         };
         V8DOMConfiguration::InstallAccessors(
             isolate, world, instanceObject, prototypeObject, interfaceObject,
@@ -3880,9 +3927,11 @@
       }
       if (RuntimeEnabledFeatures::SecureFeatureEnabled()) {
         static const V8DOMConfiguration::AccessorConfiguration accessor_configurations[] = {
-            { "partialSecureContextRuntimeEnabledAttribute", V8TestInterface::partialSecureContextRuntimeEnabledAttributeAttributeGetterCallback, V8TestInterface::partialSecureContextRuntimeEnabledAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+            { "partialSecureContextRuntimeEnabledAttribute", V8TestInterface::partialSecureContextRuntimeEnabledAttributeAttributeGetterCallback, V8TestInterface::partialSecureContextRuntimeEnabledAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+        ,
 
-            { "secureContextRuntimeEnabledAttribute", V8TestInterface::secureContextRuntimeEnabledAttributeAttributeGetterCallback, V8TestInterface::secureContextRuntimeEnabledAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+            { "secureContextRuntimeEnabledAttribute", V8TestInterface::secureContextRuntimeEnabledAttributeAttributeGetterCallback, V8TestInterface::secureContextRuntimeEnabledAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+        ,
         };
         V8DOMConfiguration::InstallAccessors(
             isolate, world, instanceObject, prototypeObject, interfaceObject,
@@ -3892,7 +3941,8 @@
     }
     if (executionContext && (executionContext->IsDocument())) {
       static const V8DOMConfiguration::AccessorConfiguration accessor_configurations[] = {
-          { "windowExposedAttribute", V8TestInterface::windowExposedAttributeAttributeGetterCallback, V8TestInterface::windowExposedAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+          { "windowExposedAttribute", V8TestInterface::windowExposedAttributeAttributeGetterCallback, V8TestInterface::windowExposedAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+      ,
       };
       V8DOMConfiguration::InstallAccessors(
           isolate, world, instanceObject, prototypeObject, interfaceObject,
@@ -3900,9 +3950,11 @@
           WTF_ARRAY_LENGTH(accessor_configurations));
       if (isSecureContext) {
         static const V8DOMConfiguration::AccessorConfiguration accessor_configurations[] = {
-            { "partialSecureContextWindowExposedAttribute", V8TestInterface::partialSecureContextWindowExposedAttributeAttributeGetterCallback, V8TestInterface::partialSecureContextWindowExposedAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+            { "partialSecureContextWindowExposedAttribute", V8TestInterface::partialSecureContextWindowExposedAttributeAttributeGetterCallback, V8TestInterface::partialSecureContextWindowExposedAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+        ,
 
-            { "secureContextWindowExposedAttribute", V8TestInterface::secureContextWindowExposedAttributeAttributeGetterCallback, V8TestInterface::secureContextWindowExposedAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+            { "secureContextWindowExposedAttribute", V8TestInterface::secureContextWindowExposedAttributeAttributeGetterCallback, V8TestInterface::secureContextWindowExposedAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+        ,
         };
         V8DOMConfiguration::InstallAccessors(
             isolate, world, instanceObject, prototypeObject, interfaceObject,
@@ -3910,9 +3962,11 @@
             WTF_ARRAY_LENGTH(accessor_configurations));
         if (RuntimeEnabledFeatures::SecureFeatureEnabled()) {
           static const V8DOMConfiguration::AccessorConfiguration accessor_configurations[] = {
-              { "partialSecureContextWindowExposedRuntimeEnabledAttribute", V8TestInterface::partialSecureContextWindowExposedRuntimeEnabledAttributeAttributeGetterCallback, V8TestInterface::partialSecureContextWindowExposedRuntimeEnabledAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+              { "partialSecureContextWindowExposedRuntimeEnabledAttribute", V8TestInterface::partialSecureContextWindowExposedRuntimeEnabledAttributeAttributeGetterCallback, V8TestInterface::partialSecureContextWindowExposedRuntimeEnabledAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+          ,
 
-              { "secureContextWindowExposedRuntimeEnabledAttribute", V8TestInterface::secureContextWindowExposedRuntimeEnabledAttributeAttributeGetterCallback, V8TestInterface::secureContextWindowExposedRuntimeEnabledAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+              { "secureContextWindowExposedRuntimeEnabledAttribute", V8TestInterface::secureContextWindowExposedRuntimeEnabledAttributeAttributeGetterCallback, V8TestInterface::secureContextWindowExposedRuntimeEnabledAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+          ,
           };
           V8DOMConfiguration::InstallAccessors(
               isolate, world, instanceObject, prototypeObject, interfaceObject,
@@ -3923,7 +3977,8 @@
     }
     if (executionContext && (executionContext->IsWorkerGlobalScope())) {
       static const V8DOMConfiguration::AccessorConfiguration accessor_configurations[] = {
-          { "workerExposedAttribute", V8TestInterface::workerExposedAttributeAttributeGetterCallback, V8TestInterface::workerExposedAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+          { "workerExposedAttribute", V8TestInterface::workerExposedAttributeAttributeGetterCallback, V8TestInterface::workerExposedAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+      ,
       };
       V8DOMConfiguration::InstallAccessors(
           isolate, world, instanceObject, prototypeObject, interfaceObject,
@@ -3931,9 +3986,11 @@
           WTF_ARRAY_LENGTH(accessor_configurations));
       if (isSecureContext) {
         static const V8DOMConfiguration::AccessorConfiguration accessor_configurations[] = {
-            { "partialSecureContextWorkerExposedAttribute", V8TestInterface::partialSecureContextWorkerExposedAttributeAttributeGetterCallback, V8TestInterface::partialSecureContextWorkerExposedAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+            { "partialSecureContextWorkerExposedAttribute", V8TestInterface::partialSecureContextWorkerExposedAttributeAttributeGetterCallback, V8TestInterface::partialSecureContextWorkerExposedAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+        ,
 
-            { "secureContextWorkerExposedAttribute", V8TestInterface::secureContextWorkerExposedAttributeAttributeGetterCallback, V8TestInterface::secureContextWorkerExposedAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+            { "secureContextWorkerExposedAttribute", V8TestInterface::secureContextWorkerExposedAttributeAttributeGetterCallback, V8TestInterface::secureContextWorkerExposedAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+        ,
         };
         V8DOMConfiguration::InstallAccessors(
             isolate, world, instanceObject, prototypeObject, interfaceObject,
@@ -3941,9 +3998,11 @@
             WTF_ARRAY_LENGTH(accessor_configurations));
         if (RuntimeEnabledFeatures::SecureFeatureEnabled()) {
           static const V8DOMConfiguration::AccessorConfiguration accessor_configurations[] = {
-              { "partialSecureContextWorkerExposedRuntimeEnabledAttribute", V8TestInterface::partialSecureContextWorkerExposedRuntimeEnabledAttributeAttributeGetterCallback, V8TestInterface::partialSecureContextWorkerExposedRuntimeEnabledAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+              { "partialSecureContextWorkerExposedRuntimeEnabledAttribute", V8TestInterface::partialSecureContextWorkerExposedRuntimeEnabledAttributeAttributeGetterCallback, V8TestInterface::partialSecureContextWorkerExposedRuntimeEnabledAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+          ,
 
-              { "secureContextWorkerExposedRuntimeEnabledAttribute", V8TestInterface::secureContextWorkerExposedRuntimeEnabledAttributeAttributeGetterCallback, V8TestInterface::secureContextWorkerExposedRuntimeEnabledAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+              { "secureContextWorkerExposedRuntimeEnabledAttribute", V8TestInterface::secureContextWorkerExposedRuntimeEnabledAttributeAttributeGetterCallback, V8TestInterface::secureContextWorkerExposedRuntimeEnabledAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+          ,
           };
           V8DOMConfiguration::InstallAccessors(
               isolate, world, instanceObject, prototypeObject, interfaceObject,
@@ -3952,6 +4011,7 @@
         }
       }
     }
+
     if (executionContext && (executionContext->IsWorkerGlobalScope())) {
       const V8DOMConfiguration::MethodConfiguration workerExposedMethodMethodConfiguration[] = {
         {"workerExposedMethod", V8TestInterface::workerExposedMethodMethodCallback, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp
index f05483bf6..a9ef2504 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp
@@ -653,7 +653,8 @@
 }
 
 static const V8DOMConfiguration::AccessorConfiguration V8TestInterface2Accessors[] = {
-    { "size", V8TestInterface2::sizeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::DontEnum | v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "size", V8TestInterface2::sizeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::DontEnum | v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 };
 
 static const V8DOMConfiguration::MethodConfiguration V8TestInterface2Methods[] = {
@@ -705,6 +706,7 @@
 
   // Register IDL constants, attributes and operations.
   static_assert(1 == TestInterface2::kConstValue1, "the value of TestInterface2_kConstValue1 does not match with implementation");
+
   V8DOMConfiguration::InstallAccessors(
       isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
       signature, V8TestInterface2Accessors, WTF_ARRAY_LENGTH(V8TestInterface2Accessors));
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface3.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface3.cpp
index 5c0d166fb..eaf0c30 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface3.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface3.cpp
@@ -236,9 +236,11 @@
 }
 
 static const V8DOMConfiguration::AccessorConfiguration V8TestInterface3Accessors[] = {
-    { "length", V8TestInterface3::lengthAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "length", V8TestInterface3::lengthAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "readonlyStringifierAttribute", V8TestInterface3::readonlyStringifierAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "readonlyStringifierAttribute", V8TestInterface3::readonlyStringifierAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 };
 
 static const V8DOMConfiguration::MethodConfiguration V8TestInterface3Methods[] = {
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCheckSecurity.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCheckSecurity.cpp
index cd678007..31f12b4 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCheckSecurity.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCheckSecurity.cpp
@@ -545,22 +545,28 @@
 #pragma clang diagnostic ignored "-Wglobal-constructors"
 #endif
 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceCheckSecurityAttributes[] = {
-    { "doNotCheckSecurityLongAttribute", V8TestInterfaceCheckSecurity::doNotCheckSecurityLongAttributeAttributeGetterCallback, V8TestInterfaceCheckSecurity::doNotCheckSecurityLongAttributeAttributeSetterCallback, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "doNotCheckSecurityLongAttribute", V8TestInterfaceCheckSecurity::doNotCheckSecurityLongAttributeAttributeGetterCallback, V8TestInterfaceCheckSecurity::doNotCheckSecurityLongAttributeAttributeSetterCallback, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "doNotCheckSecurityReadonlyLongAttribute", V8TestInterfaceCheckSecurity::doNotCheckSecurityReadonlyLongAttributeAttributeGetterCallback, nullptr, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "doNotCheckSecurityReadonlyLongAttribute", V8TestInterfaceCheckSecurity::doNotCheckSecurityReadonlyLongAttributeAttributeGetterCallback, nullptr, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "doNotCheckSecurityOnSetterLongAttribute", V8TestInterfaceCheckSecurity::doNotCheckSecurityOnSetterLongAttributeAttributeGetterCallback, V8TestInterfaceCheckSecurity::doNotCheckSecurityOnSetterLongAttributeAttributeSetterCallback, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "doNotCheckSecurityOnSetterLongAttribute", V8TestInterfaceCheckSecurity::doNotCheckSecurityOnSetterLongAttributeAttributeGetterCallback, V8TestInterfaceCheckSecurity::doNotCheckSecurityOnSetterLongAttributeAttributeSetterCallback, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "doNotCheckSecurityReplaceableReadonlyLongAttribute", V8TestInterfaceCheckSecurity::doNotCheckSecurityReplaceableReadonlyLongAttributeAttributeGetterCallback, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "doNotCheckSecurityReplaceableReadonlyLongAttribute", V8TestInterfaceCheckSecurity::doNotCheckSecurityReplaceableReadonlyLongAttributeAttributeGetterCallback, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 };
 #if defined(COMPONENT_BUILD) && defined(WIN32) && defined(__clang__)
 #pragma clang diagnostic pop
 #endif
 
 static const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceCheckSecurityAccessors[] = {
-    { "readonlyLongAttribute", V8TestInterfaceCheckSecurity::readonlyLongAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "readonlyLongAttribute", V8TestInterfaceCheckSecurity::readonlyLongAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "longAttribute", V8TestInterfaceCheckSecurity::longAttributeAttributeGetterCallback, V8TestInterfaceCheckSecurity::longAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "longAttribute", V8TestInterfaceCheckSecurity::longAttributeAttributeGetterCallback, V8TestInterfaceCheckSecurity::longAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 };
 
 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceCheckSecurityMethods[] = {
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor.cpp
index 33770087..6902d90 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor.cpp
@@ -157,6 +157,7 @@
     v8::Local<v8::Object> wrapper = info.Holder();
     wrapper = impl->AssociateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor::wrapperTypeInfo, wrapper);
     V8SetReturnValue(info, wrapper);
+
     return;
   }
   optionalUSVStringArg = NativeValueTraits<IDLUSVStringBase<kTreatNullAndUndefinedAsNullString>>::NativeValue(info.GetIsolate(), info[7], exceptionState);
@@ -221,6 +222,7 @@
     v8::Local<v8::Object> wrapper = info.Holder();
     wrapper = impl->AssociateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor::wrapperTypeInfo, wrapper);
     V8SetReturnValue(info, wrapper);
+
     return;
   }
   optArg = info[1];
@@ -405,6 +407,7 @@
     v8::Local<v8::Object> wrapper = info.Holder();
     wrapper = impl->AssociateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructorConstructor::wrapperTypeInfo, wrapper);
     V8SetReturnValue(info, wrapper);
+
     return;
   }
   optArg = info[1];
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor2.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor2.cpp
index f5d6f76..828d966 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor2.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor2.cpp
@@ -165,6 +165,7 @@
     v8::Local<v8::Object> wrapper = info.Holder();
     wrapper = impl->AssociateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper);
     V8SetReturnValue(info, wrapper);
+
     return;
   }
   optionalStringArg = info[5];
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceDocument.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceDocument.cpp
index 739a9355..afbadf8 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceDocument.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceDocument.cpp
@@ -113,7 +113,8 @@
 }
 
 static const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceDocumentAccessors[] = {
-    { "location", V8TestInterfaceDocument::locationAttributeGetterCallback, V8TestInterfaceDocument::locationAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::DontDelete), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "location", V8TestInterfaceDocument::locationAttributeGetterCallback, V8TestInterfaceDocument::locationAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::DontDelete), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 };
 
 static void installV8TestInterfaceDocumentTemplate(
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.cpp
index 58a8dbd..45d076d 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.cpp
@@ -125,9 +125,11 @@
 }
 
 static const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceEventInitConstructorAccessors[] = {
-    { "readonlyStringAttribute", V8TestInterfaceEventInitConstructor::readonlyStringAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "readonlyStringAttribute", V8TestInterfaceEventInitConstructor::readonlyStringAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "isTrusted", V8TestInterfaceEventInitConstructor::isTrustedAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "isTrusted", V8TestInterfaceEventInitConstructor::isTrustedAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 };
 
 void V8TestInterfaceEventInitConstructor::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.cpp
index 582baea..85165ee 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.cpp
@@ -376,9 +376,11 @@
 }
 
 static const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceGarbageCollectedAccessors[] = {
-    { "attr1", V8TestInterfaceGarbageCollected::attr1AttributeGetterCallback, V8TestInterfaceGarbageCollected::attr1AttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "attr1", V8TestInterfaceGarbageCollected::attr1AttributeGetterCallback, V8TestInterfaceGarbageCollected::attr1AttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "size", V8TestInterfaceGarbageCollected::sizeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::DontEnum | v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "size", V8TestInterfaceGarbageCollected::sizeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::DontEnum | v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 };
 
 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceGarbageCollectedMethods[] = {
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.cpp
index 7ce661b..2aced77 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.cpp
@@ -80,7 +80,8 @@
 #pragma clang diagnostic ignored "-Wglobal-constructors"
 #endif
 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceNamedConstructorLazyDataAttributes[] = {
-    { "testNamedConstructorConstructorAttribute", V8TestInterfaceNamedConstructor::testNamedConstructorConstructorAttributeConstructorGetterCallback, nullptr, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "testNamedConstructorConstructorAttribute", V8TestInterfaceNamedConstructor::testNamedConstructorConstructorAttributeConstructorGetterCallback, nullptr, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 };
 #if defined(COMPONENT_BUILD) && defined(WIN32) && defined(__clang__)
 #pragma clang diagnostic pop
@@ -171,6 +172,7 @@
     v8::Local<v8::Object> wrapper = info.Holder();
     wrapper = impl->AssociateWithWrapper(info.GetIsolate(), &V8TestInterfaceNamedConstructorConstructor::wrapperTypeInfo, wrapper);
     V8SetReturnValue(info, wrapper);
+
     return;
   }
   optionalStringArg = info[5];
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNode.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNode.cpp
index 1b928371..54ff1a74 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNode.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNode.cpp
@@ -251,6 +251,7 @@
   }
   if (UNLIKELY(numArgsPassed <= 0)) {
     V8SetReturnValueFast(info, impl->perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArg(), impl);
+
     return;
   }
   optionalBooleanArgument = NativeValueTraits<IDLBoolean>::NativeValue(info.GetIsolate(), info[0], exceptionState);
@@ -274,6 +275,7 @@
   }
   if (UNLIKELY(numArgsPassed <= 0)) {
     V8SetReturnValueForMainWorld(info, impl->perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArg());
+
     return;
   }
   optionalBooleanArgument = NativeValueTraits<IDLBoolean>::NativeValue(info.GetIsolate(), info[0], exceptionState);
@@ -404,20 +406,27 @@
 }
 
 static const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceNodeAccessors[] = {
-    { "nodeName", V8TestInterfaceNode::nodeNameAttributeGetterCallback, V8TestInterfaceNode::nodeNameAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "nodeName", V8TestInterfaceNode::nodeNameAttributeGetterCallback, V8TestInterfaceNode::nodeNameAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "stringAttribute", V8TestInterfaceNode::stringAttributeAttributeGetterCallback, V8TestInterfaceNode::stringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "stringAttribute", V8TestInterfaceNode::stringAttributeAttributeGetterCallback, V8TestInterfaceNode::stringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "readonlyTestInterfaceEmptyAttribute", V8TestInterfaceNode::readonlyTestInterfaceEmptyAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "readonlyTestInterfaceEmptyAttribute", V8TestInterfaceNode::readonlyTestInterfaceEmptyAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "eventHandlerAttribute", V8TestInterfaceNode::eventHandlerAttributeAttributeGetterCallback, V8TestInterfaceNode::eventHandlerAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "eventHandlerAttribute", V8TestInterfaceNode::eventHandlerAttributeAttributeGetterCallback, V8TestInterfaceNode::eventHandlerAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
     { "perWorldBindingsReadonlyTestInterfaceEmptyAttribute", V8TestInterfaceNode::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallbackForMainWorld, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kMainWorld },
-    { "perWorldBindingsReadonlyTestInterfaceEmptyAttribute", V8TestInterfaceNode::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kNonMainWorlds },
+    { "perWorldBindingsReadonlyTestInterfaceEmptyAttribute", V8TestInterfaceNode::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kNonMainWorlds }
+,
 
-    { "reflectStringAttribute", V8TestInterfaceNode::reflectStringAttributeAttributeGetterCallback, V8TestInterfaceNode::reflectStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "reflectStringAttribute", V8TestInterfaceNode::reflectStringAttributeAttributeGetterCallback, V8TestInterfaceNode::reflectStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "reflectUrlStringAttribute", V8TestInterfaceNode::reflectUrlStringAttributeAttributeGetterCallback, V8TestInterfaceNode::reflectUrlStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "reflectUrlStringAttribute", V8TestInterfaceNode::reflectUrlStringAttributeAttributeGetterCallback, V8TestInterfaceNode::reflectUrlStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 };
 
 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceNodeMethods[] = {
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceOriginTrialEnabled.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceOriginTrialEnabled.cpp
index 6ee0983..5ce42efe 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceOriginTrialEnabled.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceOriginTrialEnabled.cpp
@@ -285,9 +285,11 @@
 }
 
 static const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceOriginTrialEnabledAccessors[] = {
-    { "doubleAttribute", V8TestInterfaceOriginTrialEnabled::doubleAttributeAttributeGetterCallback, V8TestInterfaceOriginTrialEnabled::doubleAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "doubleAttribute", V8TestInterfaceOriginTrialEnabled::doubleAttributeAttributeGetterCallback, V8TestInterfaceOriginTrialEnabled::doubleAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "staticStringAttribute", V8TestInterfaceOriginTrialEnabled::staticStringAttributeAttributeGetterCallback, V8TestInterfaceOriginTrialEnabled::staticStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "staticStringAttribute", V8TestInterfaceOriginTrialEnabled::staticStringAttributeAttributeGetterCallback, V8TestInterfaceOriginTrialEnabled::staticStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 };
 
 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceOriginTrialEnabledMethods[] = {
@@ -319,6 +321,7 @@
       V8TestInterfaceOriginTrialEnabledConstants, WTF_ARRAY_LENGTH(V8TestInterfaceOriginTrialEnabledConstants));
   static_assert(0 == TestInterfaceOriginTrialEnabled::kUnsignedLong, "the value of TestInterfaceOriginTrialEnabled_kUnsignedLong does not match with implementation");
   static_assert(1 == TestInterfaceOriginTrialEnabled::kConstJavascript, "the value of TestInterfaceOriginTrialEnabled_kConstJavascript does not match with implementation");
+
   V8DOMConfiguration::InstallAccessors(
       isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
       signature, V8TestInterfaceOriginTrialEnabledAccessors, WTF_ARRAY_LENGTH(V8TestInterfaceOriginTrialEnabledAccessors));
@@ -347,11 +350,14 @@
 
   if (RuntimeEnabledFeatures::FeatureNameEnabled()) {
     static const V8DOMConfiguration::AccessorConfiguration accessor_configurations[] = {
-        { "conditionalReadOnlyLongAttribute", V8TestInterfaceOriginTrialEnabled::conditionalReadOnlyLongAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+        { "conditionalReadOnlyLongAttribute", V8TestInterfaceOriginTrialEnabled::conditionalReadOnlyLongAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+  ,
 
-        { "staticConditionalReadOnlyLongAttribute", V8TestInterfaceOriginTrialEnabled::staticConditionalReadOnlyLongAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+        { "staticConditionalReadOnlyLongAttribute", V8TestInterfaceOriginTrialEnabled::staticConditionalReadOnlyLongAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+  ,
 
-        { "conditionalLongAttribute", V8TestInterfaceOriginTrialEnabled::conditionalLongAttributeAttributeGetterCallback, V8TestInterfaceOriginTrialEnabled::conditionalLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+        { "conditionalLongAttribute", V8TestInterfaceOriginTrialEnabled::conditionalLongAttributeAttributeGetterCallback, V8TestInterfaceOriginTrialEnabled::conditionalLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+  ,
     };
     V8DOMConfiguration::InstallAccessors(
         isolate, world, instance_template, prototype_template, interface_template,
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceSecureContext.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceSecureContext.cpp
index 783b0b4..a3c8e6d0 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceSecureContext.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceSecureContext.cpp
@@ -467,7 +467,8 @@
   if (!prototypeObject.IsEmpty() || !interfaceObject.IsEmpty()) {
     if (isSecureContext) {
       static const V8DOMConfiguration::AccessorConfiguration accessor_configurations[] = {
-          { "secureContextAttribute", V8TestInterfaceSecureContext::secureContextAttributeAttributeGetterCallback, V8TestInterfaceSecureContext::secureContextAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+          { "secureContextAttribute", V8TestInterfaceSecureContext::secureContextAttributeAttributeGetterCallback, V8TestInterfaceSecureContext::secureContextAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+      ,
       };
       V8DOMConfiguration::InstallAccessors(
           isolate, world, instanceObject, prototypeObject, interfaceObject,
@@ -475,7 +476,8 @@
           WTF_ARRAY_LENGTH(accessor_configurations));
       if (RuntimeEnabledFeatures::SecureFeatureEnabled()) {
         static const V8DOMConfiguration::AccessorConfiguration accessor_configurations[] = {
-            { "secureContextRuntimeEnabledAttribute", V8TestInterfaceSecureContext::secureContextRuntimeEnabledAttributeAttributeGetterCallback, V8TestInterfaceSecureContext::secureContextRuntimeEnabledAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+            { "secureContextRuntimeEnabledAttribute", V8TestInterfaceSecureContext::secureContextRuntimeEnabledAttributeAttributeGetterCallback, V8TestInterfaceSecureContext::secureContextRuntimeEnabledAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+        ,
         };
         V8DOMConfiguration::InstallAccessors(
             isolate, world, instanceObject, prototypeObject, interfaceObject,
@@ -486,7 +488,8 @@
     if (executionContext && (executionContext->IsDocument())) {
       if (isSecureContext) {
         static const V8DOMConfiguration::AccessorConfiguration accessor_configurations[] = {
-            { "secureContextWindowExposedAttribute", V8TestInterfaceSecureContext::secureContextWindowExposedAttributeAttributeGetterCallback, V8TestInterfaceSecureContext::secureContextWindowExposedAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+            { "secureContextWindowExposedAttribute", V8TestInterfaceSecureContext::secureContextWindowExposedAttributeAttributeGetterCallback, V8TestInterfaceSecureContext::secureContextWindowExposedAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+        ,
         };
         V8DOMConfiguration::InstallAccessors(
             isolate, world, instanceObject, prototypeObject, interfaceObject,
@@ -494,7 +497,8 @@
             WTF_ARRAY_LENGTH(accessor_configurations));
         if (RuntimeEnabledFeatures::SecureFeatureEnabled()) {
           static const V8DOMConfiguration::AccessorConfiguration accessor_configurations[] = {
-              { "secureContextWindowExposedRuntimeEnabledAttribute", V8TestInterfaceSecureContext::secureContextWindowExposedRuntimeEnabledAttributeAttributeGetterCallback, V8TestInterfaceSecureContext::secureContextWindowExposedRuntimeEnabledAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+              { "secureContextWindowExposedRuntimeEnabledAttribute", V8TestInterfaceSecureContext::secureContextWindowExposedRuntimeEnabledAttributeAttributeGetterCallback, V8TestInterfaceSecureContext::secureContextWindowExposedRuntimeEnabledAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+          ,
           };
           V8DOMConfiguration::InstallAccessors(
               isolate, world, instanceObject, prototypeObject, interfaceObject,
@@ -506,7 +510,8 @@
     if (executionContext && (executionContext->IsWorkerGlobalScope())) {
       if (isSecureContext) {
         static const V8DOMConfiguration::AccessorConfiguration accessor_configurations[] = {
-            { "secureContextWorkerExposedAttribute", V8TestInterfaceSecureContext::secureContextWorkerExposedAttributeAttributeGetterCallback, V8TestInterfaceSecureContext::secureContextWorkerExposedAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+            { "secureContextWorkerExposedAttribute", V8TestInterfaceSecureContext::secureContextWorkerExposedAttributeAttributeGetterCallback, V8TestInterfaceSecureContext::secureContextWorkerExposedAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+        ,
         };
         V8DOMConfiguration::InstallAccessors(
             isolate, world, instanceObject, prototypeObject, interfaceObject,
@@ -514,7 +519,8 @@
             WTF_ARRAY_LENGTH(accessor_configurations));
         if (RuntimeEnabledFeatures::SecureFeatureEnabled()) {
           static const V8DOMConfiguration::AccessorConfiguration accessor_configurations[] = {
-              { "secureContextWorkerExposedRuntimeEnabledAttribute", V8TestInterfaceSecureContext::secureContextWorkerExposedRuntimeEnabledAttributeAttributeGetterCallback, V8TestInterfaceSecureContext::secureContextWorkerExposedRuntimeEnabledAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+              { "secureContextWorkerExposedRuntimeEnabledAttribute", V8TestInterfaceSecureContext::secureContextWorkerExposedRuntimeEnabledAttributeAttributeGetterCallback, V8TestInterfaceSecureContext::secureContextWorkerExposedRuntimeEnabledAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+          ,
           };
           V8DOMConfiguration::InstallAccessors(
               isolate, world, instanceObject, prototypeObject, interfaceObject,
@@ -523,6 +529,7 @@
         }
       }
     }
+
     if (isSecureContext) {
       const V8DOMConfiguration::MethodConfiguration secureContextMethodMethodConfiguration[] = {
         {"secureContextMethod", V8TestInterfaceSecureContext::secureContextMethodMethodCallback, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestNode.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestNode.cpp
index 48386980..8d99d4d2 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestNode.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestNode.cpp
@@ -237,13 +237,17 @@
 }
 
 static const V8DOMConfiguration::AccessorConfiguration V8TestNodeAccessors[] = {
-    { "href", V8TestNode::hrefAttributeGetterCallback, V8TestNode::hrefAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "href", V8TestNode::hrefAttributeGetterCallback, V8TestNode::hrefAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "hrefThrows", V8TestNode::hrefThrowsAttributeGetterCallback, V8TestNode::hrefThrowsAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "hrefThrows", V8TestNode::hrefThrowsAttributeGetterCallback, V8TestNode::hrefThrowsAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "hrefCallWith", V8TestNode::hrefCallWithAttributeGetterCallback, V8TestNode::hrefCallWithAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "hrefCallWith", V8TestNode::hrefCallWithAttributeGetterCallback, V8TestNode::hrefCallWithAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "hrefByteString", V8TestNode::hrefByteStringAttributeGetterCallback, V8TestNode::hrefByteStringAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "hrefByteString", V8TestNode::hrefByteStringAttributeGetterCallback, V8TestNode::hrefByteStringAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 };
 
 void V8TestNode::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp
index 3ade6e9..9215d81 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp
@@ -5999,6 +5999,7 @@
 
   if (UNLIKELY(numArgsPassed <= 1)) {
     impl->voidMethodByteStringOrNullOptionalUSVStringArg(byteStringArg);
+
     return;
   }
   usvStringArg = NativeValueTraits<IDLUSVString>::NativeValue(info.GetIsolate(), info[1], exceptionState);
@@ -6020,6 +6021,7 @@
   }
   if (UNLIKELY(numArgsPassed <= 0)) {
     impl->voidMethodOptionalStringArg();
+
     return;
   }
   optionalStringArg = info[0];
@@ -6041,6 +6043,7 @@
   }
   if (UNLIKELY(numArgsPassed <= 0)) {
     impl->voidMethodOptionalTestInterfaceEmptyArg();
+
     return;
   }
   optionalTestInterfaceEmptyArg = V8TestInterfaceEmpty::ToImplWithTypeCheck(info.GetIsolate(), info[0]);
@@ -6066,6 +6069,7 @@
   }
   if (UNLIKELY(numArgsPassed <= 0)) {
     impl->voidMethodOptionalLongArg();
+
     return;
   }
   optionalLongArg = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(), info[0], exceptionState, kNormalConversion);
@@ -6089,6 +6093,7 @@
   }
   if (UNLIKELY(numArgsPassed <= 0)) {
     V8SetReturnValueString(info, impl->stringMethodOptionalLongArg(), info.GetIsolate());
+
     return;
   }
   optionalLongArg = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(), info[0], exceptionState, kNormalConversion);
@@ -6112,6 +6117,7 @@
   }
   if (UNLIKELY(numArgsPassed <= 0)) {
     V8SetReturnValue(info, impl->testInterfaceEmptyMethodOptionalLongArg());
+
     return;
   }
   optionalLongArg = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(), info[0], exceptionState, kNormalConversion);
@@ -6135,6 +6141,7 @@
   }
   if (UNLIKELY(numArgsPassed <= 0)) {
     V8SetReturnValueInt(info, impl->longMethodOptionalLongArg());
+
     return;
   }
   optionalLongArg = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(), info[0], exceptionState, kNormalConversion);
@@ -6168,6 +6175,7 @@
 
   if (UNLIKELY(numArgsPassed <= 1)) {
     impl->voidMethodLongArgOptionalLongArg(longArg);
+
     return;
   }
   optionalLongArg = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(), info[1], exceptionState, kNormalConversion);
@@ -6202,6 +6210,7 @@
 
   if (UNLIKELY(numArgsPassed <= 1)) {
     impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg);
+
     return;
   }
   optionalLongArg1 = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(), info[1], exceptionState, kNormalConversion);
@@ -6210,6 +6219,7 @@
 
   if (UNLIKELY(numArgsPassed <= 2)) {
     impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg, optionalLongArg1);
+
     return;
   }
   optionalLongArg2 = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(), info[2], exceptionState, kNormalConversion);
@@ -6243,6 +6253,7 @@
 
   if (UNLIKELY(numArgsPassed <= 1)) {
     impl->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg);
+
     return;
   }
   optionalTestInterfaceEmpty = V8TestInterfaceEmpty::ToImplWithTypeCheck(info.GetIsolate(), info[1]);
@@ -6280,6 +6291,7 @@
 
   if (UNLIKELY(numArgsPassed <= 1)) {
     impl->voidMethodTestInterfaceEmptyArgOptionalLongArg(optionalTestInterfaceEmpty);
+
     return;
   }
   longArg = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(), info[1], exceptionState, kNormalConversion);
@@ -6713,6 +6725,7 @@
 
   if (UNLIKELY(numArgsPassed <= 1)) {
     impl->overloadedMethodB(stringArg);
+
     return;
   }
   longArg = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(), info[1], exceptionState, kNormalConversion);
@@ -6938,6 +6951,7 @@
   }
   if (UNLIKELY(numArgsPassed <= 0)) {
     impl->overloadedMethodF();
+
     return;
   }
   stringArg = info[0];
@@ -7908,6 +7922,7 @@
   if (UNLIKELY(numArgsPassed <= 0)) {
     ScriptArguments* scriptArguments(ScriptArguments::Create(scriptState, info, 1));
     impl->callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg(scriptState, scriptArguments);
+
     return;
   }
   optionalBooleanArg = NativeValueTraits<IDLBoolean>::NativeValue(info.GetIsolate(), info[0], exceptionState);
@@ -8630,6 +8645,7 @@
     if (exceptionState.HadException()) {
       return;
     }
+
     return;
   }
   optionalLongArg = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(), info[0], exceptionState, kNormalConversion);
@@ -8992,6 +9008,7 @@
 
   if (UNLIKELY(numArgsPassed <= 1)) {
     impl->useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg(node1);
+
     return;
   }
   node2 = V8Node::ToImplWithTypeCheck(info.GetIsolate(), info[1]);
@@ -13022,6 +13039,7 @@
 
 void V8TestObject::RuntimeCallStatsCounterMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
   RUNTIME_CALL_TIMER_SCOPE(info.GetIsolate(), RuntimeCallStats::CounterId::kRuntimeCallStatsCounterMethod);
+
   TestObjectV8Internal::RuntimeCallStatsCounterMethodMethod(info);
 }
 
@@ -13180,9 +13198,11 @@
 #pragma clang diagnostic ignored "-Wglobal-constructors"
 #endif
 static const V8DOMConfiguration::AttributeConfiguration V8TestObjectAttributes[] = {
-    { "testInterfaceEmptyConstructorAttribute", V8TestObject::testInterfaceEmptyConstructorAttributeConstructorGetterCallback, nullptr, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "testInterfaceEmptyConstructorAttribute", V8TestObject::testInterfaceEmptyConstructorAttributeConstructorGetterCallback, nullptr, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "measureAsFeatureNameTestInterfaceEmptyConstructorAttribute", V8TestObject::measureAsFeatureNameTestInterfaceEmptyConstructorAttributeConstructorGetterCallback, nullptr, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "measureAsFeatureNameTestInterfaceEmptyConstructorAttribute", V8TestObject::measureAsFeatureNameTestInterfaceEmptyConstructorAttributeConstructorGetterCallback, nullptr, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 };
 #if defined(COMPONENT_BUILD) && defined(WIN32) && defined(__clang__)
 #pragma clang diagnostic pop
@@ -13195,312 +13215,460 @@
 #pragma clang diagnostic ignored "-Wglobal-constructors"
 #endif
 static const V8DOMConfiguration::AttributeConfiguration V8TestObjectLazyDataAttributes[] = {
-    { "testInterfaceEmptyConstructorAttribute", V8TestObject::testInterfaceEmptyConstructorAttributeConstructorGetterCallback, nullptr, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "testInterfaceEmptyConstructorAttribute", V8TestObject::testInterfaceEmptyConstructorAttributeConstructorGetterCallback, nullptr, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 };
 #if defined(COMPONENT_BUILD) && defined(WIN32) && defined(__clang__)
 #pragma clang diagnostic pop
 #endif
 
 static const V8DOMConfiguration::AccessorConfiguration V8TestObjectAccessors[] = {
-    { "stringifierAttribute", V8TestObject::stringifierAttributeAttributeGetterCallback, V8TestObject::stringifierAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "stringifierAttribute", V8TestObject::stringifierAttributeAttributeGetterCallback, V8TestObject::stringifierAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "readonlyStringAttribute", V8TestObject::readonlyStringAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "readonlyStringAttribute", V8TestObject::readonlyStringAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "readonlyTestInterfaceEmptyAttribute", V8TestObject::readonlyTestInterfaceEmptyAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "readonlyTestInterfaceEmptyAttribute", V8TestObject::readonlyTestInterfaceEmptyAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "readonlyLongAttribute", V8TestObject::readonlyLongAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "readonlyLongAttribute", V8TestObject::readonlyLongAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "dateAttribute", V8TestObject::dateAttributeAttributeGetterCallback, V8TestObject::dateAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "dateAttribute", V8TestObject::dateAttributeAttributeGetterCallback, V8TestObject::dateAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "stringAttribute", V8TestObject::stringAttributeAttributeGetterCallback, V8TestObject::stringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "stringAttribute", V8TestObject::stringAttributeAttributeGetterCallback, V8TestObject::stringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "byteStringAttribute", V8TestObject::byteStringAttributeAttributeGetterCallback, V8TestObject::byteStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "byteStringAttribute", V8TestObject::byteStringAttributeAttributeGetterCallback, V8TestObject::byteStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "usvStringAttribute", V8TestObject::usvStringAttributeAttributeGetterCallback, V8TestObject::usvStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "usvStringAttribute", V8TestObject::usvStringAttributeAttributeGetterCallback, V8TestObject::usvStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "domTimeStampAttribute", V8TestObject::domTimeStampAttributeAttributeGetterCallback, V8TestObject::domTimeStampAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "domTimeStampAttribute", V8TestObject::domTimeStampAttributeAttributeGetterCallback, V8TestObject::domTimeStampAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "booleanAttribute", V8TestObject::booleanAttributeAttributeGetterCallback, V8TestObject::booleanAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "booleanAttribute", V8TestObject::booleanAttributeAttributeGetterCallback, V8TestObject::booleanAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "byteAttribute", V8TestObject::byteAttributeAttributeGetterCallback, V8TestObject::byteAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "byteAttribute", V8TestObject::byteAttributeAttributeGetterCallback, V8TestObject::byteAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "doubleAttribute", V8TestObject::doubleAttributeAttributeGetterCallback, V8TestObject::doubleAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "doubleAttribute", V8TestObject::doubleAttributeAttributeGetterCallback, V8TestObject::doubleAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "floatAttribute", V8TestObject::floatAttributeAttributeGetterCallback, V8TestObject::floatAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "floatAttribute", V8TestObject::floatAttributeAttributeGetterCallback, V8TestObject::floatAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "longAttribute", V8TestObject::longAttributeAttributeGetterCallback, V8TestObject::longAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "longAttribute", V8TestObject::longAttributeAttributeGetterCallback, V8TestObject::longAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "longLongAttribute", V8TestObject::longLongAttributeAttributeGetterCallback, V8TestObject::longLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "longLongAttribute", V8TestObject::longLongAttributeAttributeGetterCallback, V8TestObject::longLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "octetAttribute", V8TestObject::octetAttributeAttributeGetterCallback, V8TestObject::octetAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "octetAttribute", V8TestObject::octetAttributeAttributeGetterCallback, V8TestObject::octetAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "shortAttribute", V8TestObject::shortAttributeAttributeGetterCallback, V8TestObject::shortAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "shortAttribute", V8TestObject::shortAttributeAttributeGetterCallback, V8TestObject::shortAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "unrestrictedDoubleAttribute", V8TestObject::unrestrictedDoubleAttributeAttributeGetterCallback, V8TestObject::unrestrictedDoubleAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "unrestrictedDoubleAttribute", V8TestObject::unrestrictedDoubleAttributeAttributeGetterCallback, V8TestObject::unrestrictedDoubleAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "unrestrictedFloatAttribute", V8TestObject::unrestrictedFloatAttributeAttributeGetterCallback, V8TestObject::unrestrictedFloatAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "unrestrictedFloatAttribute", V8TestObject::unrestrictedFloatAttributeAttributeGetterCallback, V8TestObject::unrestrictedFloatAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "unsignedLongAttribute", V8TestObject::unsignedLongAttributeAttributeGetterCallback, V8TestObject::unsignedLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "unsignedLongAttribute", V8TestObject::unsignedLongAttributeAttributeGetterCallback, V8TestObject::unsignedLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "unsignedLongLongAttribute", V8TestObject::unsignedLongLongAttributeAttributeGetterCallback, V8TestObject::unsignedLongLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "unsignedLongLongAttribute", V8TestObject::unsignedLongLongAttributeAttributeGetterCallback, V8TestObject::unsignedLongLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "unsignedShortAttribute", V8TestObject::unsignedShortAttributeAttributeGetterCallback, V8TestObject::unsignedShortAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "unsignedShortAttribute", V8TestObject::unsignedShortAttributeAttributeGetterCallback, V8TestObject::unsignedShortAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "testInterfaceEmptyAttribute", V8TestObject::testInterfaceEmptyAttributeAttributeGetterCallback, V8TestObject::testInterfaceEmptyAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "testInterfaceEmptyAttribute", V8TestObject::testInterfaceEmptyAttributeAttributeGetterCallback, V8TestObject::testInterfaceEmptyAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "testObjectAttribute", V8TestObject::testObjectAttributeAttributeGetterCallback, V8TestObject::testObjectAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "testObjectAttribute", V8TestObject::testObjectAttributeAttributeGetterCallback, V8TestObject::testObjectAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "cssAttribute", V8TestObject::cssAttributeAttributeGetterCallback, V8TestObject::cssAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "cssAttribute", V8TestObject::cssAttributeAttributeGetterCallback, V8TestObject::cssAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "imeAttribute", V8TestObject::imeAttributeAttributeGetterCallback, V8TestObject::imeAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "imeAttribute", V8TestObject::imeAttributeAttributeGetterCallback, V8TestObject::imeAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "svgAttribute", V8TestObject::svgAttributeAttributeGetterCallback, V8TestObject::svgAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "svgAttribute", V8TestObject::svgAttributeAttributeGetterCallback, V8TestObject::svgAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "xmlAttribute", V8TestObject::xmlAttributeAttributeGetterCallback, V8TestObject::xmlAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "xmlAttribute", V8TestObject::xmlAttributeAttributeGetterCallback, V8TestObject::xmlAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "nodeFilterAttribute", V8TestObject::nodeFilterAttributeAttributeGetterCallback, V8TestObject::nodeFilterAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "nodeFilterAttribute", V8TestObject::nodeFilterAttributeAttributeGetterCallback, V8TestObject::nodeFilterAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "serializedScriptValueAttribute", V8TestObject::serializedScriptValueAttributeAttributeGetterCallback, V8TestObject::serializedScriptValueAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "serializedScriptValueAttribute", V8TestObject::serializedScriptValueAttributeAttributeGetterCallback, V8TestObject::serializedScriptValueAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "anyAttribute", V8TestObject::anyAttributeAttributeGetterCallback, V8TestObject::anyAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "anyAttribute", V8TestObject::anyAttributeAttributeGetterCallback, V8TestObject::anyAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "promiseAttribute", V8TestObject::promiseAttributeAttributeGetterCallback, V8TestObject::promiseAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kDoNotCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "promiseAttribute", V8TestObject::promiseAttributeAttributeGetterCallback, V8TestObject::promiseAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kDoNotCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "windowAttribute", V8TestObject::windowAttributeAttributeGetterCallback, V8TestObject::windowAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "windowAttribute", V8TestObject::windowAttributeAttributeGetterCallback, V8TestObject::windowAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "documentAttribute", V8TestObject::documentAttributeAttributeGetterCallback, V8TestObject::documentAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "documentAttribute", V8TestObject::documentAttributeAttributeGetterCallback, V8TestObject::documentAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "documentFragmentAttribute", V8TestObject::documentFragmentAttributeAttributeGetterCallback, V8TestObject::documentFragmentAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "documentFragmentAttribute", V8TestObject::documentFragmentAttributeAttributeGetterCallback, V8TestObject::documentFragmentAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "documentTypeAttribute", V8TestObject::documentTypeAttributeAttributeGetterCallback, V8TestObject::documentTypeAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "documentTypeAttribute", V8TestObject::documentTypeAttributeAttributeGetterCallback, V8TestObject::documentTypeAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "elementAttribute", V8TestObject::elementAttributeAttributeGetterCallback, V8TestObject::elementAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "elementAttribute", V8TestObject::elementAttributeAttributeGetterCallback, V8TestObject::elementAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "nodeAttribute", V8TestObject::nodeAttributeAttributeGetterCallback, V8TestObject::nodeAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "nodeAttribute", V8TestObject::nodeAttributeAttributeGetterCallback, V8TestObject::nodeAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "shadowRootAttribute", V8TestObject::shadowRootAttributeAttributeGetterCallback, V8TestObject::shadowRootAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "shadowRootAttribute", V8TestObject::shadowRootAttributeAttributeGetterCallback, V8TestObject::shadowRootAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "arrayBufferAttribute", V8TestObject::arrayBufferAttributeAttributeGetterCallback, V8TestObject::arrayBufferAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "arrayBufferAttribute", V8TestObject::arrayBufferAttributeAttributeGetterCallback, V8TestObject::arrayBufferAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "float32ArrayAttribute", V8TestObject::float32ArrayAttributeAttributeGetterCallback, V8TestObject::float32ArrayAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "float32ArrayAttribute", V8TestObject::float32ArrayAttributeAttributeGetterCallback, V8TestObject::float32ArrayAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "uint8ArrayAttribute", V8TestObject::uint8ArrayAttributeAttributeGetterCallback, V8TestObject::uint8ArrayAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "uint8ArrayAttribute", V8TestObject::uint8ArrayAttributeAttributeGetterCallback, V8TestObject::uint8ArrayAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "self", V8TestObject::selfAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "self", V8TestObject::selfAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "readonlyEventTargetAttribute", V8TestObject::readonlyEventTargetAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "readonlyEventTargetAttribute", V8TestObject::readonlyEventTargetAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "readonlyEventTargetOrNullAttribute", V8TestObject::readonlyEventTargetOrNullAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "readonlyEventTargetOrNullAttribute", V8TestObject::readonlyEventTargetOrNullAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "readonlyWindowAttribute", V8TestObject::readonlyWindowAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "readonlyWindowAttribute", V8TestObject::readonlyWindowAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "htmlCollectionAttribute", V8TestObject::htmlCollectionAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "htmlCollectionAttribute", V8TestObject::htmlCollectionAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "htmlElementAttribute", V8TestObject::htmlElementAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "htmlElementAttribute", V8TestObject::htmlElementAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "stringFrozenArrayAttribute", V8TestObject::stringFrozenArrayAttributeAttributeGetterCallback, V8TestObject::stringFrozenArrayAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "stringFrozenArrayAttribute", V8TestObject::stringFrozenArrayAttributeAttributeGetterCallback, V8TestObject::stringFrozenArrayAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "testInterfaceEmptyFrozenArrayAttribute", V8TestObject::testInterfaceEmptyFrozenArrayAttributeAttributeGetterCallback, V8TestObject::testInterfaceEmptyFrozenArrayAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "testInterfaceEmptyFrozenArrayAttribute", V8TestObject::testInterfaceEmptyFrozenArrayAttributeAttributeGetterCallback, V8TestObject::testInterfaceEmptyFrozenArrayAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "booleanOrNullAttribute", V8TestObject::booleanOrNullAttributeAttributeGetterCallback, V8TestObject::booleanOrNullAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "booleanOrNullAttribute", V8TestObject::booleanOrNullAttributeAttributeGetterCallback, V8TestObject::booleanOrNullAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "stringOrNullAttribute", V8TestObject::stringOrNullAttributeAttributeGetterCallback, V8TestObject::stringOrNullAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "stringOrNullAttribute", V8TestObject::stringOrNullAttributeAttributeGetterCallback, V8TestObject::stringOrNullAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "longOrNullAttribute", V8TestObject::longOrNullAttributeAttributeGetterCallback, V8TestObject::longOrNullAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "longOrNullAttribute", V8TestObject::longOrNullAttributeAttributeGetterCallback, V8TestObject::longOrNullAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "testInterfaceOrNullAttribute", V8TestObject::testInterfaceOrNullAttributeAttributeGetterCallback, V8TestObject::testInterfaceOrNullAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "testInterfaceOrNullAttribute", V8TestObject::testInterfaceOrNullAttributeAttributeGetterCallback, V8TestObject::testInterfaceOrNullAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "testEnumAttribute", V8TestObject::testEnumAttributeAttributeGetterCallback, V8TestObject::testEnumAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "testEnumAttribute", V8TestObject::testEnumAttributeAttributeGetterCallback, V8TestObject::testEnumAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "testEnumOrNullAttribute", V8TestObject::testEnumOrNullAttributeAttributeGetterCallback, V8TestObject::testEnumOrNullAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "testEnumOrNullAttribute", V8TestObject::testEnumOrNullAttributeAttributeGetterCallback, V8TestObject::testEnumOrNullAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "staticStringAttribute", V8TestObject::staticStringAttributeAttributeGetterCallback, V8TestObject::staticStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "staticStringAttribute", V8TestObject::staticStringAttributeAttributeGetterCallback, V8TestObject::staticStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "staticLongAttribute", V8TestObject::staticLongAttributeAttributeGetterCallback, V8TestObject::staticLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "staticLongAttribute", V8TestObject::staticLongAttributeAttributeGetterCallback, V8TestObject::staticLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "eventHandlerAttribute", V8TestObject::eventHandlerAttributeAttributeGetterCallback, V8TestObject::eventHandlerAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "eventHandlerAttribute", V8TestObject::eventHandlerAttributeAttributeGetterCallback, V8TestObject::eventHandlerAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "doubleOrStringAttribute", V8TestObject::doubleOrStringAttributeAttributeGetterCallback, V8TestObject::doubleOrStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "doubleOrStringAttribute", V8TestObject::doubleOrStringAttributeAttributeGetterCallback, V8TestObject::doubleOrStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "doubleOrStringOrNullAttribute", V8TestObject::doubleOrStringOrNullAttributeAttributeGetterCallback, V8TestObject::doubleOrStringOrNullAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "doubleOrStringOrNullAttribute", V8TestObject::doubleOrStringOrNullAttributeAttributeGetterCallback, V8TestObject::doubleOrStringOrNullAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "doubleOrNullStringAttribute", V8TestObject::doubleOrNullStringAttributeAttributeGetterCallback, V8TestObject::doubleOrNullStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "doubleOrNullStringAttribute", V8TestObject::doubleOrNullStringAttributeAttributeGetterCallback, V8TestObject::doubleOrNullStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "stringOrStringSequenceAttribute", V8TestObject::stringOrStringSequenceAttributeAttributeGetterCallback, V8TestObject::stringOrStringSequenceAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "stringOrStringSequenceAttribute", V8TestObject::stringOrStringSequenceAttributeAttributeGetterCallback, V8TestObject::stringOrStringSequenceAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "testEnumOrDoubleAttribute", V8TestObject::testEnumOrDoubleAttributeAttributeGetterCallback, V8TestObject::testEnumOrDoubleAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "testEnumOrDoubleAttribute", V8TestObject::testEnumOrDoubleAttributeAttributeGetterCallback, V8TestObject::testEnumOrDoubleAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "unrestrictedDoubleOrStringAttribute", V8TestObject::unrestrictedDoubleOrStringAttributeAttributeGetterCallback, V8TestObject::unrestrictedDoubleOrStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "unrestrictedDoubleOrStringAttribute", V8TestObject::unrestrictedDoubleOrStringAttributeAttributeGetterCallback, V8TestObject::unrestrictedDoubleOrStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "nestedUnionAtribute", V8TestObject::nestedUnionAtributeAttributeGetterCallback, V8TestObject::nestedUnionAtributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "nestedUnionAtribute", V8TestObject::nestedUnionAtributeAttributeGetterCallback, V8TestObject::nestedUnionAtributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "activityLoggingAccessForAllWorldsLongAttribute", V8TestObject::activityLoggingAccessForAllWorldsLongAttributeAttributeGetterCallback, V8TestObject::activityLoggingAccessForAllWorldsLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "activityLoggingAccessForAllWorldsLongAttribute", V8TestObject::activityLoggingAccessForAllWorldsLongAttributeAttributeGetterCallback, V8TestObject::activityLoggingAccessForAllWorldsLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "activityLoggingGetterForAllWorldsLongAttribute", V8TestObject::activityLoggingGetterForAllWorldsLongAttributeAttributeGetterCallback, V8TestObject::activityLoggingGetterForAllWorldsLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "activityLoggingGetterForAllWorldsLongAttribute", V8TestObject::activityLoggingGetterForAllWorldsLongAttributeAttributeGetterCallback, V8TestObject::activityLoggingGetterForAllWorldsLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "activityLoggingSetterForAllWorldsLongAttribute", V8TestObject::activityLoggingSetterForAllWorldsLongAttributeAttributeGetterCallback, V8TestObject::activityLoggingSetterForAllWorldsLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "activityLoggingSetterForAllWorldsLongAttribute", V8TestObject::activityLoggingSetterForAllWorldsLongAttributeAttributeGetterCallback, V8TestObject::activityLoggingSetterForAllWorldsLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "cachedAttributeAnyAttribute", V8TestObject::cachedAttributeAnyAttributeAttributeGetterCallback, V8TestObject::cachedAttributeAnyAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "cachedAttributeAnyAttribute", V8TestObject::cachedAttributeAnyAttributeAttributeGetterCallback, V8TestObject::cachedAttributeAnyAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "cachedArrayAttribute", V8TestObject::cachedArrayAttributeAttributeGetterCallback, V8TestObject::cachedArrayAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "cachedArrayAttribute", V8TestObject::cachedArrayAttributeAttributeGetterCallback, V8TestObject::cachedArrayAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "cachedStringOrNoneAttribute", V8TestObject::cachedStringOrNoneAttributeAttributeGetterCallback, V8TestObject::cachedStringOrNoneAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "cachedStringOrNoneAttribute", V8TestObject::cachedStringOrNoneAttributeAttributeGetterCallback, V8TestObject::cachedStringOrNoneAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "callWithExecutionContextAnyAttribute", V8TestObject::callWithExecutionContextAnyAttributeAttributeGetterCallback, V8TestObject::callWithExecutionContextAnyAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "callWithExecutionContextAnyAttribute", V8TestObject::callWithExecutionContextAnyAttributeAttributeGetterCallback, V8TestObject::callWithExecutionContextAnyAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "callWithScriptStateAnyAttribute", V8TestObject::callWithScriptStateAnyAttributeAttributeGetterCallback, V8TestObject::callWithScriptStateAnyAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "callWithScriptStateAnyAttribute", V8TestObject::callWithScriptStateAnyAttributeAttributeGetterCallback, V8TestObject::callWithScriptStateAnyAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "callWithExecutionContextAndScriptStateAnyAttribute", V8TestObject::callWithExecutionContextAndScriptStateAnyAttributeAttributeGetterCallback, V8TestObject::callWithExecutionContextAndScriptStateAnyAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "callWithExecutionContextAndScriptStateAnyAttribute", V8TestObject::callWithExecutionContextAndScriptStateAnyAttributeAttributeGetterCallback, V8TestObject::callWithExecutionContextAndScriptStateAnyAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "checkSecurityForNodeReadonlyDocumentAttribute", V8TestObject::checkSecurityForNodeReadonlyDocumentAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "checkSecurityForNodeReadonlyDocumentAttribute", V8TestObject::checkSecurityForNodeReadonlyDocumentAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "customObjectAttribute", V8TestObject::customObjectAttributeAttributeGetterCallback, V8TestObject::customObjectAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "customObjectAttribute", V8TestObject::customObjectAttributeAttributeGetterCallback, V8TestObject::customObjectAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "customGetterLongAttribute", V8TestObject::customGetterLongAttributeAttributeGetterCallback, V8TestObject::customGetterLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "customGetterLongAttribute", V8TestObject::customGetterLongAttributeAttributeGetterCallback, V8TestObject::customGetterLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "customGetterReadonlyObjectAttribute", V8TestObject::customGetterReadonlyObjectAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "customGetterReadonlyObjectAttribute", V8TestObject::customGetterReadonlyObjectAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "customSetterLongAttribute", V8TestObject::customSetterLongAttributeAttributeGetterCallback, V8TestObject::customSetterLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "customSetterLongAttribute", V8TestObject::customSetterLongAttributeAttributeGetterCallback, V8TestObject::customSetterLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "deprecatedLongAttribute", V8TestObject::deprecatedLongAttributeAttributeGetterCallback, V8TestObject::deprecatedLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "deprecatedLongAttribute", V8TestObject::deprecatedLongAttributeAttributeGetterCallback, V8TestObject::deprecatedLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "enforceRangeLongAttribute", V8TestObject::enforceRangeLongAttributeAttributeGetterCallback, V8TestObject::enforceRangeLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "enforceRangeLongAttribute", V8TestObject::enforceRangeLongAttributeAttributeGetterCallback, V8TestObject::enforceRangeLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "implementedAsLongAttribute", V8TestObject::implementedAsLongAttributeAttributeGetterCallback, V8TestObject::implementedAsLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "implementedAsLongAttribute", V8TestObject::implementedAsLongAttributeAttributeGetterCallback, V8TestObject::implementedAsLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "customImplementedAsLongAttribute", V8TestObject::customImplementedAsLongAttributeAttributeGetterCallback, V8TestObject::customImplementedAsLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "customImplementedAsLongAttribute", V8TestObject::customImplementedAsLongAttributeAttributeGetterCallback, V8TestObject::customImplementedAsLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "customGetterImplementedAsLongAttribute", V8TestObject::customGetterImplementedAsLongAttributeAttributeGetterCallback, V8TestObject::customGetterImplementedAsLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "customGetterImplementedAsLongAttribute", V8TestObject::customGetterImplementedAsLongAttributeAttributeGetterCallback, V8TestObject::customGetterImplementedAsLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "customSetterImplementedAsLongAttribute", V8TestObject::customSetterImplementedAsLongAttributeAttributeGetterCallback, V8TestObject::customSetterImplementedAsLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "customSetterImplementedAsLongAttribute", V8TestObject::customSetterImplementedAsLongAttributeAttributeGetterCallback, V8TestObject::customSetterImplementedAsLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "measureAsLongAttribute", V8TestObject::measureAsLongAttributeAttributeGetterCallback, V8TestObject::measureAsLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "measureAsLongAttribute", V8TestObject::measureAsLongAttributeAttributeGetterCallback, V8TestObject::measureAsLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "notEnumerableLongAttribute", V8TestObject::notEnumerableLongAttributeAttributeGetterCallback, V8TestObject::notEnumerableLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "notEnumerableLongAttribute", V8TestObject::notEnumerableLongAttributeAttributeGetterCallback, V8TestObject::notEnumerableLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
     { "perWorldBindingsReadonlyTestInterfaceEmptyAttribute", V8TestObject::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallbackForMainWorld, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kMainWorld },
-    { "perWorldBindingsReadonlyTestInterfaceEmptyAttribute", V8TestObject::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kNonMainWorlds },
+    { "perWorldBindingsReadonlyTestInterfaceEmptyAttribute", V8TestObject::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kNonMainWorlds }
+,
 
     { "activityLoggingAccessPerWorldBindingsLongAttribute", V8TestObject::activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld, V8TestObject::activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kMainWorld },
-    { "activityLoggingAccessPerWorldBindingsLongAttribute", V8TestObject::activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCallback, V8TestObject::activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kNonMainWorlds },
+    { "activityLoggingAccessPerWorldBindingsLongAttribute", V8TestObject::activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCallback, V8TestObject::activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kNonMainWorlds }
+,
 
     { "activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute", V8TestObject::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld, V8TestObject::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kMainWorld },
-    { "activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute", V8TestObject::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallback, V8TestObject::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kNonMainWorlds },
+    { "activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute", V8TestObject::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallback, V8TestObject::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kNonMainWorlds }
+,
 
     { "activityLoggingGetterPerWorldBindingsLongAttribute", V8TestObject::activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld, V8TestObject::activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kMainWorld },
-    { "activityLoggingGetterPerWorldBindingsLongAttribute", V8TestObject::activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCallback, V8TestObject::activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kNonMainWorlds },
+    { "activityLoggingGetterPerWorldBindingsLongAttribute", V8TestObject::activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCallback, V8TestObject::activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kNonMainWorlds }
+,
 
     { "activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute", V8TestObject::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld, V8TestObject::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kMainWorld },
-    { "activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute", V8TestObject::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallback, V8TestObject::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kNonMainWorlds },
+    { "activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute", V8TestObject::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallback, V8TestObject::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kNonMainWorlds }
+,
 
-    { "location", V8TestObject::locationAttributeGetterCallback, V8TestObject::locationAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "location", V8TestObject::locationAttributeGetterCallback, V8TestObject::locationAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "locationWithException", V8TestObject::locationWithExceptionAttributeGetterCallback, V8TestObject::locationWithExceptionAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "locationWithException", V8TestObject::locationWithExceptionAttributeGetterCallback, V8TestObject::locationWithExceptionAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "locationWithCallWith", V8TestObject::locationWithCallWithAttributeGetterCallback, V8TestObject::locationWithCallWithAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "locationWithCallWith", V8TestObject::locationWithCallWithAttributeGetterCallback, V8TestObject::locationWithCallWithAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "locationByteString", V8TestObject::locationByteStringAttributeGetterCallback, V8TestObject::locationByteStringAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "locationByteString", V8TestObject::locationByteStringAttributeGetterCallback, V8TestObject::locationByteStringAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
     { "locationWithPerWorldBindings", V8TestObject::locationWithPerWorldBindingsAttributeGetterCallbackForMainWorld, V8TestObject::locationWithPerWorldBindingsAttributeSetterCallbackForMainWorld, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kMainWorld },
-    { "locationWithPerWorldBindings", V8TestObject::locationWithPerWorldBindingsAttributeGetterCallback, V8TestObject::locationWithPerWorldBindingsAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kNonMainWorlds },
+    { "locationWithPerWorldBindings", V8TestObject::locationWithPerWorldBindingsAttributeGetterCallback, V8TestObject::locationWithPerWorldBindingsAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kNonMainWorlds }
+,
 
-    { "locationLegacyInterfaceTypeChecking", V8TestObject::locationLegacyInterfaceTypeCheckingAttributeGetterCallback, V8TestObject::locationLegacyInterfaceTypeCheckingAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "locationLegacyInterfaceTypeChecking", V8TestObject::locationLegacyInterfaceTypeCheckingAttributeGetterCallback, V8TestObject::locationLegacyInterfaceTypeCheckingAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "locationGarbageCollected", V8TestObject::locationGarbageCollectedAttributeGetterCallback, V8TestObject::locationGarbageCollectedAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "locationGarbageCollected", V8TestObject::locationGarbageCollectedAttributeGetterCallback, V8TestObject::locationGarbageCollectedAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "raisesExceptionLongAttribute", V8TestObject::raisesExceptionLongAttributeAttributeGetterCallback, V8TestObject::raisesExceptionLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "raisesExceptionLongAttribute", V8TestObject::raisesExceptionLongAttributeAttributeGetterCallback, V8TestObject::raisesExceptionLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "raisesExceptionGetterLongAttribute", V8TestObject::raisesExceptionGetterLongAttributeAttributeGetterCallback, V8TestObject::raisesExceptionGetterLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "raisesExceptionGetterLongAttribute", V8TestObject::raisesExceptionGetterLongAttributeAttributeGetterCallback, V8TestObject::raisesExceptionGetterLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "setterRaisesExceptionLongAttribute", V8TestObject::setterRaisesExceptionLongAttributeAttributeGetterCallback, V8TestObject::setterRaisesExceptionLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "setterRaisesExceptionLongAttribute", V8TestObject::setterRaisesExceptionLongAttributeAttributeGetterCallback, V8TestObject::setterRaisesExceptionLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "raisesExceptionTestInterfaceEmptyAttribute", V8TestObject::raisesExceptionTestInterfaceEmptyAttributeAttributeGetterCallback, V8TestObject::raisesExceptionTestInterfaceEmptyAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "raisesExceptionTestInterfaceEmptyAttribute", V8TestObject::raisesExceptionTestInterfaceEmptyAttributeAttributeGetterCallback, V8TestObject::raisesExceptionTestInterfaceEmptyAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "cachedAttributeRaisesExceptionGetterAnyAttribute", V8TestObject::cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetterCallback, V8TestObject::cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "cachedAttributeRaisesExceptionGetterAnyAttribute", V8TestObject::cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetterCallback, V8TestObject::cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "reflectTestInterfaceAttribute", V8TestObject::reflectTestInterfaceAttributeAttributeGetterCallback, V8TestObject::reflectTestInterfaceAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "reflectTestInterfaceAttribute", V8TestObject::reflectTestInterfaceAttributeAttributeGetterCallback, V8TestObject::reflectTestInterfaceAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "reflectReflectedNameAttributeTestAttribute", V8TestObject::reflectReflectedNameAttributeTestAttributeAttributeGetterCallback, V8TestObject::reflectReflectedNameAttributeTestAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "reflectReflectedNameAttributeTestAttribute", V8TestObject::reflectReflectedNameAttributeTestAttributeAttributeGetterCallback, V8TestObject::reflectReflectedNameAttributeTestAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "reflectBooleanAttribute", V8TestObject::reflectBooleanAttributeAttributeGetterCallback, V8TestObject::reflectBooleanAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "reflectBooleanAttribute", V8TestObject::reflectBooleanAttributeAttributeGetterCallback, V8TestObject::reflectBooleanAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "reflectLongAttribute", V8TestObject::reflectLongAttributeAttributeGetterCallback, V8TestObject::reflectLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "reflectLongAttribute", V8TestObject::reflectLongAttributeAttributeGetterCallback, V8TestObject::reflectLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "reflectUnsignedShortAttribute", V8TestObject::reflectUnsignedShortAttributeAttributeGetterCallback, V8TestObject::reflectUnsignedShortAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "reflectUnsignedShortAttribute", V8TestObject::reflectUnsignedShortAttributeAttributeGetterCallback, V8TestObject::reflectUnsignedShortAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "reflectUnsignedLongAttribute", V8TestObject::reflectUnsignedLongAttributeAttributeGetterCallback, V8TestObject::reflectUnsignedLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "reflectUnsignedLongAttribute", V8TestObject::reflectUnsignedLongAttributeAttributeGetterCallback, V8TestObject::reflectUnsignedLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "id", V8TestObject::idAttributeGetterCallback, V8TestObject::idAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "id", V8TestObject::idAttributeGetterCallback, V8TestObject::idAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "name", V8TestObject::nameAttributeGetterCallback, V8TestObject::nameAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "name", V8TestObject::nameAttributeGetterCallback, V8TestObject::nameAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "class", V8TestObject::classAttributeGetterCallback, V8TestObject::classAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "class", V8TestObject::classAttributeGetterCallback, V8TestObject::classAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "reflectedId", V8TestObject::reflectedIdAttributeGetterCallback, V8TestObject::reflectedIdAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "reflectedId", V8TestObject::reflectedIdAttributeGetterCallback, V8TestObject::reflectedIdAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "reflectedName", V8TestObject::reflectedNameAttributeGetterCallback, V8TestObject::reflectedNameAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "reflectedName", V8TestObject::reflectedNameAttributeGetterCallback, V8TestObject::reflectedNameAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "reflectedClass", V8TestObject::reflectedClassAttributeGetterCallback, V8TestObject::reflectedClassAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "reflectedClass", V8TestObject::reflectedClassAttributeGetterCallback, V8TestObject::reflectedClassAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "limitedToOnlyOneAttribute", V8TestObject::limitedToOnlyOneAttributeAttributeGetterCallback, V8TestObject::limitedToOnlyOneAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "limitedToOnlyOneAttribute", V8TestObject::limitedToOnlyOneAttributeAttributeGetterCallback, V8TestObject::limitedToOnlyOneAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "limitedToOnlyAttribute", V8TestObject::limitedToOnlyAttributeAttributeGetterCallback, V8TestObject::limitedToOnlyAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "limitedToOnlyAttribute", V8TestObject::limitedToOnlyAttributeAttributeGetterCallback, V8TestObject::limitedToOnlyAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "limitedToOnlyOtherAttribute", V8TestObject::limitedToOnlyOtherAttributeAttributeGetterCallback, V8TestObject::limitedToOnlyOtherAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "limitedToOnlyOtherAttribute", V8TestObject::limitedToOnlyOtherAttributeAttributeGetterCallback, V8TestObject::limitedToOnlyOtherAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "limitedWithMissingDefaultAttribute", V8TestObject::limitedWithMissingDefaultAttributeAttributeGetterCallback, V8TestObject::limitedWithMissingDefaultAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "limitedWithMissingDefaultAttribute", V8TestObject::limitedWithMissingDefaultAttributeAttributeGetterCallback, V8TestObject::limitedWithMissingDefaultAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "limitedWithInvalidMissingDefaultAttribute", V8TestObject::limitedWithInvalidMissingDefaultAttributeAttributeGetterCallback, V8TestObject::limitedWithInvalidMissingDefaultAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "limitedWithInvalidMissingDefaultAttribute", V8TestObject::limitedWithInvalidMissingDefaultAttributeAttributeGetterCallback, V8TestObject::limitedWithInvalidMissingDefaultAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "corsSettingAttribute", V8TestObject::corsSettingAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "corsSettingAttribute", V8TestObject::corsSettingAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "limitedWithEmptyMissingInvalidAttribute", V8TestObject::limitedWithEmptyMissingInvalidAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "limitedWithEmptyMissingInvalidAttribute", V8TestObject::limitedWithEmptyMissingInvalidAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "RuntimeCallStatsCounterAttribute", V8TestObject::RuntimeCallStatsCounterAttributeAttributeGetterCallback, V8TestObject::RuntimeCallStatsCounterAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "RuntimeCallStatsCounterAttribute", V8TestObject::RuntimeCallStatsCounterAttributeAttributeGetterCallback, V8TestObject::RuntimeCallStatsCounterAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "RuntimeCallStatsCounterReadOnlyAttribute", V8TestObject::RuntimeCallStatsCounterReadOnlyAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "RuntimeCallStatsCounterReadOnlyAttribute", V8TestObject::RuntimeCallStatsCounterReadOnlyAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "replaceableReadonlyLongAttribute", V8TestObject::replaceableReadonlyLongAttributeAttributeGetterCallback, V8TestObject::replaceableReadonlyLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "replaceableReadonlyLongAttribute", V8TestObject::replaceableReadonlyLongAttributeAttributeGetterCallback, V8TestObject::replaceableReadonlyLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "locationPutForwards", V8TestObject::locationPutForwardsAttributeGetterCallback, V8TestObject::locationPutForwardsAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "locationPutForwards", V8TestObject::locationPutForwardsAttributeGetterCallback, V8TestObject::locationPutForwardsAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "setterCallWithCurrentWindowAndEnteredWindowStringAttribute", V8TestObject::setterCallWithCurrentWindowAndEnteredWindowStringAttributeAttributeGetterCallback, V8TestObject::setterCallWithCurrentWindowAndEnteredWindowStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "setterCallWithCurrentWindowAndEnteredWindowStringAttribute", V8TestObject::setterCallWithCurrentWindowAndEnteredWindowStringAttributeAttributeGetterCallback, V8TestObject::setterCallWithCurrentWindowAndEnteredWindowStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "setterCallWithExecutionContextStringAttribute", V8TestObject::setterCallWithExecutionContextStringAttributeAttributeGetterCallback, V8TestObject::setterCallWithExecutionContextStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "setterCallWithExecutionContextStringAttribute", V8TestObject::setterCallWithExecutionContextStringAttributeAttributeGetterCallback, V8TestObject::setterCallWithExecutionContextStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "treatNullAsEmptyStringStringAttribute", V8TestObject::treatNullAsEmptyStringStringAttributeAttributeGetterCallback, V8TestObject::treatNullAsEmptyStringStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "treatNullAsEmptyStringStringAttribute", V8TestObject::treatNullAsEmptyStringStringAttributeAttributeGetterCallback, V8TestObject::treatNullAsEmptyStringStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "treatNullAsNullStringStringAttribute", V8TestObject::treatNullAsNullStringStringAttributeAttributeGetterCallback, V8TestObject::treatNullAsNullStringStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "treatNullAsNullStringStringAttribute", V8TestObject::treatNullAsNullStringStringAttributeAttributeGetterCallback, V8TestObject::treatNullAsNullStringStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "legacyInterfaceTypeCheckingFloatAttribute", V8TestObject::legacyInterfaceTypeCheckingFloatAttributeAttributeGetterCallback, V8TestObject::legacyInterfaceTypeCheckingFloatAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "legacyInterfaceTypeCheckingFloatAttribute", V8TestObject::legacyInterfaceTypeCheckingFloatAttributeAttributeGetterCallback, V8TestObject::legacyInterfaceTypeCheckingFloatAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "legacyInterfaceTypeCheckingTestInterfaceAttribute", V8TestObject::legacyInterfaceTypeCheckingTestInterfaceAttributeAttributeGetterCallback, V8TestObject::legacyInterfaceTypeCheckingTestInterfaceAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "legacyInterfaceTypeCheckingTestInterfaceAttribute", V8TestObject::legacyInterfaceTypeCheckingTestInterfaceAttributeAttributeGetterCallback, V8TestObject::legacyInterfaceTypeCheckingTestInterfaceAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "legacyInterfaceTypeCheckingTestInterfaceOrNullAttribute", V8TestObject::legacyInterfaceTypeCheckingTestInterfaceOrNullAttributeAttributeGetterCallback, V8TestObject::legacyInterfaceTypeCheckingTestInterfaceOrNullAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "legacyInterfaceTypeCheckingTestInterfaceOrNullAttribute", V8TestObject::legacyInterfaceTypeCheckingTestInterfaceOrNullAttributeAttributeGetterCallback, V8TestObject::legacyInterfaceTypeCheckingTestInterfaceOrNullAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "urlStringAttribute", V8TestObject::urlStringAttributeAttributeGetterCallback, V8TestObject::urlStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "urlStringAttribute", V8TestObject::urlStringAttributeAttributeGetterCallback, V8TestObject::urlStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "urlStringAttribute", V8TestObject::urlStringAttributeAttributeGetterCallback, V8TestObject::urlStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "urlStringAttribute", V8TestObject::urlStringAttributeAttributeGetterCallback, V8TestObject::urlStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "unforgeableLongAttribute", V8TestObject::unforgeableLongAttributeAttributeGetterCallback, V8TestObject::unforgeableLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::DontDelete), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "unforgeableLongAttribute", V8TestObject::unforgeableLongAttributeAttributeGetterCallback, V8TestObject::unforgeableLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::DontDelete), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "measuredLongAttribute", V8TestObject::measuredLongAttributeAttributeGetterCallback, V8TestObject::measuredLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "measuredLongAttribute", V8TestObject::measuredLongAttributeAttributeGetterCallback, V8TestObject::measuredLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "sameObjectAttribute", V8TestObject::sameObjectAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "sameObjectAttribute", V8TestObject::sameObjectAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "saveSameObjectAttribute", V8TestObject::saveSameObjectAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "saveSameObjectAttribute", V8TestObject::saveSameObjectAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "staticSaveSameObjectAttribute", V8TestObject::staticSaveSameObjectAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "staticSaveSameObjectAttribute", V8TestObject::staticSaveSameObjectAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "unscopableLongAttribute", V8TestObject::unscopableLongAttributeAttributeGetterCallback, V8TestObject::unscopableLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "unscopableLongAttribute", V8TestObject::unscopableLongAttributeAttributeGetterCallback, V8TestObject::unscopableLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "testInterfaceAttribute", V8TestObject::testInterfaceAttributeAttributeGetterCallback, V8TestObject::testInterfaceAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "testInterfaceAttribute", V8TestObject::testInterfaceAttributeAttributeGetterCallback, V8TestObject::testInterfaceAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "testInterfaceGarbageCollectedAttribute", V8TestObject::testInterfaceGarbageCollectedAttributeAttributeGetterCallback, V8TestObject::testInterfaceGarbageCollectedAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "testInterfaceGarbageCollectedAttribute", V8TestObject::testInterfaceGarbageCollectedAttributeAttributeGetterCallback, V8TestObject::testInterfaceGarbageCollectedAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "testInterfaceGarbageCollectedOrNullAttribute", V8TestObject::testInterfaceGarbageCollectedOrNullAttributeAttributeGetterCallback, V8TestObject::testInterfaceGarbageCollectedOrNullAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "testInterfaceGarbageCollectedOrNullAttribute", V8TestObject::testInterfaceGarbageCollectedOrNullAttributeAttributeGetterCallback, V8TestObject::testInterfaceGarbageCollectedOrNullAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "size", V8TestObject::sizeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::DontEnum | v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "size", V8TestObject::sizeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::DontEnum | v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 };
 
 static const V8DOMConfiguration::MethodConfiguration V8TestObjectMethods[] = {
@@ -13824,9 +13992,11 @@
 
   if (RuntimeEnabledFeatures::FeatureNameEnabled()) {
     static const V8DOMConfiguration::AccessorConfiguration accessor_configurations[] = {
-        { "runtimeEnabledLongAttribute", V8TestObject::runtimeEnabledLongAttributeAttributeGetterCallback, V8TestObject::runtimeEnabledLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+        { "runtimeEnabledLongAttribute", V8TestObject::runtimeEnabledLongAttributeAttributeGetterCallback, V8TestObject::runtimeEnabledLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+  ,
 
-        { "unscopableRuntimeEnabledLongAttribute", V8TestObject::unscopableRuntimeEnabledLongAttributeAttributeGetterCallback, V8TestObject::unscopableRuntimeEnabledLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+        { "unscopableRuntimeEnabledLongAttribute", V8TestObject::unscopableRuntimeEnabledLongAttributeAttributeGetterCallback, V8TestObject::unscopableRuntimeEnabledLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+  ,
     };
     V8DOMConfiguration::InstallAccessors(
         isolate, world, instance_template, prototype_template, interface_template,
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestTypedefs.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestTypedefs.cpp
index efa2bc0..414dafd 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestTypedefs.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestTypedefs.cpp
@@ -174,6 +174,7 @@
   }
   if (UNLIKELY(numArgsPassed <= 0)) {
     impl->voidMethodLongSequenceArg();
+
     return;
   }
   longSequenceArg = NativeValueTraits<IDLSequence<IDLLong>>::NativeValue(info.GetIsolate(), info[0], exceptionState);
@@ -527,18 +528,22 @@
 #pragma clang diagnostic ignored "-Wglobal-constructors"
 #endif
 static const V8DOMConfiguration::AttributeConfiguration V8TestTypedefsLazyDataAttributes[] = {
-    { "tAttribute", V8TestTypedefs::tAttributeConstructorGetterCallback, nullptr, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "tAttribute", V8TestTypedefs::tAttributeConstructorGetterCallback, nullptr, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 };
 #if defined(COMPONENT_BUILD) && defined(WIN32) && defined(__clang__)
 #pragma clang diagnostic pop
 #endif
 
 static const V8DOMConfiguration::AccessorConfiguration V8TestTypedefsAccessors[] = {
-    { "uLongLongAttribute", V8TestTypedefs::uLongLongAttributeAttributeGetterCallback, V8TestTypedefs::uLongLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "uLongLongAttribute", V8TestTypedefs::uLongLongAttributeAttributeGetterCallback, V8TestTypedefs::uLongLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "longWithClampAttribute", V8TestTypedefs::longWithClampAttributeAttributeGetterCallback, V8TestTypedefs::longWithClampAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "longWithClampAttribute", V8TestTypedefs::longWithClampAttributeAttributeGetterCallback, V8TestTypedefs::longWithClampAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "domStringOrDoubleOrNullAttribute", V8TestTypedefs::domStringOrDoubleOrNullAttributeAttributeGetterCallback, V8TestTypedefs::domStringOrDoubleOrNullAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "domStringOrDoubleOrNullAttribute", V8TestTypedefs::domStringOrDoubleOrNullAttributeAttributeGetterCallback, V8TestTypedefs::domStringOrDoubleOrNullAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 };
 
 static const V8DOMConfiguration::MethodConfiguration V8TestTypedefsMethods[] = {
diff --git a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInheritedLegacyUnenumerableNamedProperties.cpp b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInheritedLegacyUnenumerableNamedProperties.cpp
index 1243e3c2..b9873584 100644
--- a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInheritedLegacyUnenumerableNamedProperties.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInheritedLegacyUnenumerableNamedProperties.cpp
@@ -183,7 +183,8 @@
 }
 
 static const V8DOMConfiguration::AccessorConfiguration V8TestInheritedLegacyUnenumerableNamedPropertiesAccessors[] = {
-    { "longAttribute", V8TestInheritedLegacyUnenumerableNamedProperties::longAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "longAttribute", V8TestInheritedLegacyUnenumerableNamedProperties::longAttributeAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 };
 
 static void installV8TestInheritedLegacyUnenumerableNamedPropertiesTemplate(
diff --git a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp
index 8a98d19..a000a6a6 100644
--- a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp
@@ -913,28 +913,37 @@
 #pragma clang diagnostic ignored "-Wglobal-constructors"
 #endif
 static const V8DOMConfiguration::AttributeConfiguration V8TestInterface5LazyDataAttributes[] = {
-    { "testInterfaceConstructorAttribute", V8TestInterface5::testInterfaceConstructorAttributeConstructorGetterCallback, nullptr, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "testInterfaceConstructorAttribute", V8TestInterface5::testInterfaceConstructorAttributeConstructorGetterCallback, nullptr, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 };
 #if defined(COMPONENT_BUILD) && defined(WIN32) && defined(__clang__)
 #pragma clang diagnostic pop
 #endif
 
 static const V8DOMConfiguration::AccessorConfiguration V8TestInterface5Accessors[] = {
-    { "testInterfaceAttribute", V8TestInterface5::testInterfaceAttributeAttributeGetterCallback, V8TestInterface5::testInterfaceAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "testInterfaceAttribute", V8TestInterface5::testInterfaceAttributeAttributeGetterCallback, V8TestInterface5::testInterfaceAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "doubleAttribute", V8TestInterface5::doubleAttributeAttributeGetterCallback, V8TestInterface5::doubleAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "doubleAttribute", V8TestInterface5::doubleAttributeAttributeGetterCallback, V8TestInterface5::doubleAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "floatAttribute", V8TestInterface5::floatAttributeAttributeGetterCallback, V8TestInterface5::floatAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "floatAttribute", V8TestInterface5::floatAttributeAttributeGetterCallback, V8TestInterface5::floatAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "unrestrictedDoubleAttribute", V8TestInterface5::unrestrictedDoubleAttributeAttributeGetterCallback, V8TestInterface5::unrestrictedDoubleAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "unrestrictedDoubleAttribute", V8TestInterface5::unrestrictedDoubleAttributeAttributeGetterCallback, V8TestInterface5::unrestrictedDoubleAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "unrestrictedFloatAttribute", V8TestInterface5::unrestrictedFloatAttributeAttributeGetterCallback, V8TestInterface5::unrestrictedFloatAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "unrestrictedFloatAttribute", V8TestInterface5::unrestrictedFloatAttributeAttributeGetterCallback, V8TestInterface5::unrestrictedFloatAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "staticStringAttribute", V8TestInterface5::staticStringAttributeAttributeGetterCallback, V8TestInterface5::staticStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "staticStringAttribute", V8TestInterface5::staticStringAttributeAttributeGetterCallback, V8TestInterface5::staticStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "length", V8TestInterface5::lengthAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "length", V8TestInterface5::lengthAttributeGetterCallback, nullptr, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "alwaysExposedAttribute", V8TestInterface5::alwaysExposedAttributeAttributeGetterCallback, V8TestInterface5::alwaysExposedAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "alwaysExposedAttribute", V8TestInterface5::alwaysExposedAttributeAttributeGetterCallback, V8TestInterface5::alwaysExposedAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 };
 
 static const V8DOMConfiguration::MethodConfiguration V8TestInterface5Methods[] = {
@@ -978,6 +987,7 @@
   V8DOMConfiguration::InstallConstants(
       isolate, interfaceTemplate, prototypeTemplate,
       V8TestInterface5Constants, WTF_ARRAY_LENGTH(V8TestInterface5Constants));
+
   V8DOMConfiguration::InstallLazyDataAttributes(
       isolate, world, instanceTemplate, prototypeTemplate,
       V8TestInterface5LazyDataAttributes, WTF_ARRAY_LENGTH(V8TestInterface5LazyDataAttributes));
@@ -1085,7 +1095,8 @@
   if (!prototypeObject.IsEmpty() || !interfaceObject.IsEmpty()) {
     if (executionContext && (executionContext->IsDocument())) {
       static const V8DOMConfiguration::AccessorConfiguration accessor_configurations[] = {
-          { "windowExposedAttribute", V8TestInterface5::windowExposedAttributeAttributeGetterCallback, V8TestInterface5::windowExposedAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+          { "windowExposedAttribute", V8TestInterface5::windowExposedAttributeAttributeGetterCallback, V8TestInterface5::windowExposedAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+      ,
       };
       V8DOMConfiguration::InstallAccessors(
           isolate, world, instanceObject, prototypeObject, interfaceObject,
@@ -1094,13 +1105,15 @@
     }
     if (executionContext && (executionContext->IsWorkerGlobalScope())) {
       static const V8DOMConfiguration::AccessorConfiguration accessor_configurations[] = {
-          { "workerExposedAttribute", V8TestInterface5::workerExposedAttributeAttributeGetterCallback, V8TestInterface5::workerExposedAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+          { "workerExposedAttribute", V8TestInterface5::workerExposedAttributeAttributeGetterCallback, V8TestInterface5::workerExposedAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+      ,
       };
       V8DOMConfiguration::InstallAccessors(
           isolate, world, instanceObject, prototypeObject, interfaceObject,
           signature, accessor_configurations,
           WTF_ARRAY_LENGTH(accessor_configurations));
     }
+
     if (executionContext && (executionContext->IsWorkerGlobalScope())) {
       const V8DOMConfiguration::MethodConfiguration workerExposedMethodMethodConfiguration[] = {
         {"workerExposedMethod", V8TestInterface5::workerExposedMethodMethodCallback, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}
diff --git a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp
index 4cb01fc..25c1d8b 100644
--- a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp
@@ -468,6 +468,7 @@
   V8DOMConfiguration::InstallConstants(
       isolate, interfaceTemplate, prototypeTemplate,
       V8TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants));
+
   V8DOMConfiguration::InstallMethods(
       isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
       signature, V8TestInterfaceMethods, WTF_ARRAY_LENGTH(V8TestInterfaceMethods));
diff --git a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestSubObject.cpp b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestSubObject.cpp
index 198d5d4..41805ed0 100644
--- a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestSubObject.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestSubObject.cpp
@@ -145,9 +145,11 @@
 }
 
 static const V8DOMConfiguration::AccessorConfiguration V8TestSubObjectAccessors[] = {
-    { "unforgeableStringAttribute", V8TestSubObject::unforgeableStringAttributeAttributeGetterCallback, V8TestSubObject::unforgeableStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::DontDelete), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "unforgeableStringAttribute", V8TestSubObject::unforgeableStringAttributeAttributeGetterCallback, V8TestSubObject::unforgeableStringAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::DontDelete), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 
-    { "unforgeableLongAttribute", V8TestSubObject::unforgeableLongAttributeAttributeGetterCallback, V8TestSubObject::unforgeableLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::DontDelete), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    { "unforgeableLongAttribute", V8TestSubObject::unforgeableLongAttributeAttributeGetterCallback, V8TestSubObject::unforgeableLongAttributeAttributeSetterCallback, V8PrivateProperty::kNoCachedAccessor, static_cast<v8::PropertyAttribute>(v8::DontDelete), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
+,
 };
 
 static void installV8TestSubObjectTemplate(
diff --git a/third_party/WebKit/Source/core/core_idl_files.gni b/third_party/WebKit/Source/core/core_idl_files.gni
index 0da6035f..5800e93 100644
--- a/third_party/WebKit/Source/core/core_idl_files.gni
+++ b/third_party/WebKit/Source/core/core_idl_files.gni
@@ -291,6 +291,7 @@
                     "inspector/InspectorOverlayHost.idl",
                     "intersection_observer/IntersectionObserver.idl",
                     "intersection_observer/IntersectionObserverEntry.idl",
+                    "layout/custom/LayoutConstraints.idl",
                     "layout/custom/LayoutFragment.idl",
                     "layout/custom/LayoutFragmentRequest.idl",
                     "layout/custom/LayoutChild.idl",
diff --git a/third_party/WebKit/Source/core/css/AbstractPropertySetCSSStyleDeclaration.cpp b/third_party/WebKit/Source/core/css/AbstractPropertySetCSSStyleDeclaration.cpp
index c54bac8..b5909eb 100644
--- a/third_party/WebKit/Source/core/css/AbstractPropertySetCSSStyleDeclaration.cpp
+++ b/third_party/WebKit/Source/core/css/AbstractPropertySetCSSStyleDeclaration.cpp
@@ -125,7 +125,7 @@
   if (!property_id)
     return;
 
-  bool important = DeprecatedEqualIgnoringCase(priority, "important");
+  bool important = EqualIgnoringASCIICase(priority, "important");
   if (!important && !priority.IsEmpty())
     return;
 
diff --git a/third_party/WebKit/Source/core/css/CSSProperties.json5 b/third_party/WebKit/Source/core/css/CSSProperties.json5
index 09f66ce8..fc68c4c 100644
--- a/third_party/WebKit/Source/core/css/CSSProperties.json5
+++ b/third_party/WebKit/Source/core/css/CSSProperties.json5
@@ -1297,6 +1297,7 @@
       property_methods: ["ParseSingleValue", "CSSValueFromComputedStyleInternal"],
       interpolable: true,
       svg: true,
+      typedom_types: ["Length", "Percentage"],
       converter: "ConvertLength",
     },
     {
@@ -1304,6 +1305,7 @@
       property_methods: ["ParseSingleValue", "CSSValueFromComputedStyleInternal"],
       interpolable: true,
       svg: true,
+      typedom_types: ["Length", "Percentage"],
       converter: "ConvertLength",
     },
     {
@@ -2985,6 +2987,7 @@
       property_methods: ["ParseSingleValue", "CSSValueFromComputedStyleInternal"],
       interpolable: true,
       svg: true,
+      typedom_types: ["Length", "Percentage"],
       converter: "ConvertLength",
     },
     {
@@ -2992,6 +2995,7 @@
       property_methods: ["ParseSingleValue", "CSSValueFromComputedStyleInternal"],
       interpolable: true,
       svg: true,
+      typedom_types: ["Length", "Percentage"],
       converter: "ConvertLength",
     },
     {
diff --git a/third_party/WebKit/Source/core/css/SelectorQuery.cpp b/third_party/WebKit/Source/core/css/SelectorQuery.cpp
index bdee59b0..c669eb74 100644
--- a/third_party/WebKit/Source/core/css/SelectorQuery.cpp
+++ b/third_party/WebKit/Source/core/css/SelectorQuery.cpp
@@ -34,7 +34,6 @@
 #include "core/css/SelectorChecker.h"
 #include "core/css/parser/CSSParser.h"
 #include "core/dom/Document.h"
-#include "core/dom/ElementShadow.h"
 #include "core/dom/ElementTraversal.h"
 #include "core/dom/ExceptionCode.h"
 #include "core/dom/Node.h"
diff --git a/third_party/WebKit/Source/core/css/SelectorQueryTest.cpp b/third_party/WebKit/Source/core/css/SelectorQueryTest.cpp
index 62b236c..d7c26771 100644
--- a/third_party/WebKit/Source/core/css/SelectorQueryTest.cpp
+++ b/third_party/WebKit/Source/core/css/SelectorQueryTest.cpp
@@ -8,8 +8,8 @@
 #include "core/css/parser/CSSParser.h"
 #include "core/css/parser/CSSParserContext.h"
 #include "core/dom/Document.h"
-#include "core/dom/ElementShadow.h"
 #include "core/dom/ElementTraversal.h"
+#include "core/dom/ShadowRoot.h"
 #include "core/dom/StaticNodeList.h"
 #include "core/html/HTMLDocument.h"
 #include "core/html/HTMLHtmlElement.h"
@@ -240,13 +240,10 @@
       </body>
     </html>
   )HTML");
-  // TODO(esprehn): Element::attachShadow() should not require a ScriptState,
-  // it should handle the use counting in the bindings layer instead of in the
-  // C++.
   Element* scope = document->getElementById("first");
   ASSERT_NE(nullptr, scope);
   ShadowRoot& shadowRoot =
-      scope->EnsureShadow().AddShadowRoot(*scope, ShadowRootType::kOpen);
+      scope->AttachShadowRootInternal(ShadowRootType::kOpen);
   // Make the inside the shadow root be identical to that of the outer document.
   shadowRoot.appendChild(document->documentElement()->CloneWithChildren());
   static const struct QueryTest kTestCases[] = {
@@ -355,11 +352,8 @@
 TEST(SelectorQueryTest, DisconnectedTreeScope) {
   Document* document = HTMLDocument::CreateForTest();
   Element* host = document->CreateRawElement(HTMLNames::divTag);
-  // TODO(esprehn): Element::attachShadow() should not require a ScriptState,
-  // it should handle the use counting in the bindings layer instead of in the
-  // C++.
   ShadowRoot& shadowRoot =
-      host->EnsureShadow().AddShadowRoot(*host, ShadowRootType::kOpen);
+      host->AttachShadowRootInternal(ShadowRootType::kOpen);
   shadowRoot.SetInnerHTMLFromString(R"HTML(
     <section>
       <span id=first>
diff --git a/third_party/WebKit/Source/core/css/StyleEngine.cpp b/third_party/WebKit/Source/core/css/StyleEngine.cpp
index 111dd9f0..ff4f8b7 100644
--- a/third_party/WebKit/Source/core/css/StyleEngine.cpp
+++ b/third_party/WebKit/Source/core/css/StyleEngine.cpp
@@ -42,7 +42,6 @@
 #include "core/css/resolver/StyleRuleUsageTracker.h"
 #include "core/css/resolver/ViewportStyleResolver.h"
 #include "core/dom/Element.h"
-#include "core/dom/ElementShadow.h"
 #include "core/dom/ElementTraversal.h"
 #include "core/dom/ProcessingInstruction.h"
 #include "core/dom/ShadowRoot.h"
diff --git a/third_party/WebKit/Source/core/css/StyleEngineTest.cpp b/third_party/WebKit/Source/core/css/StyleEngineTest.cpp
index 57a79a2..389b8236 100644
--- a/third_party/WebKit/Source/core/css/StyleEngineTest.cpp
+++ b/third_party/WebKit/Source/core/css/StyleEngineTest.cpp
@@ -14,6 +14,7 @@
 #include "core/css/parser/CSSParserContext.h"
 #include "core/dom/Document.h"
 #include "core/dom/NodeComputedStyle.h"
+#include "core/dom/ShadowRoot.h"
 #include "core/dom/ShadowRootInit.h"
 #include "core/dom/ViewportDescription.h"
 #include "core/frame/FrameTestHelpers.h"
diff --git a/third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.cpp b/third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.cpp
index 887ddd6c..0b53341 100644
--- a/third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.cpp
+++ b/third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.cpp
@@ -8,7 +8,6 @@
 #include "core/css/invalidation/InvalidationSet.h"
 #include "core/dom/Document.h"
 #include "core/dom/Element.h"
-#include "core/dom/ElementShadow.h"
 #include "core/dom/ElementTraversal.h"
 #include "core/dom/ShadowRoot.h"
 #include "core/html/HTMLSlotElement.h"
diff --git a/third_party/WebKit/Source/core/css/resolver/ScopedStyleResolver.cpp b/third_party/WebKit/Source/core/css/resolver/ScopedStyleResolver.cpp
index a45051e..481b43c 100644
--- a/third_party/WebKit/Source/core/css/resolver/ScopedStyleResolver.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/ScopedStyleResolver.cpp
@@ -40,7 +40,6 @@
 #include "core/css/StyleSheetContents.h"
 #include "core/css/resolver/MatchRequest.h"
 #include "core/dom/Document.h"
-#include "core/dom/ElementShadow.h"
 #include "core/dom/ShadowRoot.h"
 #include "core/html/HTMLStyleElement.h"
 #include "core/html_names.h"
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
index ea41e3a..32420d2 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
@@ -73,7 +73,6 @@
 #include "core/css/resolver/StyleResolverStats.h"
 #include "core/css/resolver/StyleRuleUsageTracker.h"
 #include "core/css_property_names.h"
-#include "core/dom/ElementShadow.h"
 #include "core/dom/FirstLetterPseudoElement.h"
 #include "core/dom/NodeComputedStyle.h"
 #include "core/dom/ShadowRoot.h"
diff --git a/third_party/WebKit/Source/core/dom/BUILD.gn b/third_party/WebKit/Source/core/dom/BUILD.gn
index ea68b323..18c2e2c2 100644
--- a/third_party/WebKit/Source/core/dom/BUILD.gn
+++ b/third_party/WebKit/Source/core/dom/BUILD.gn
@@ -109,10 +109,6 @@
     "ElementDataCache.h",
     "ElementRareData.cpp",
     "ElementRareData.h",
-    "ElementShadow.cpp",
-    "ElementShadow.h",
-    "ElementShadowV0.cpp",
-    "ElementShadowV0.h",
     "ElementTraversal.h",
     "ElementVisibilityObserver.cpp",
     "ElementVisibilityObserver.h",
@@ -216,7 +212,8 @@
     "SecurityContext.h",
     "ShadowRoot.cpp",
     "ShadowRoot.h",
-    "ShadowRootRareDataV0.h",
+    "ShadowRootV0.cpp",
+    "ShadowRootV0.h",
     "SinkDocument.cpp",
     "SinkDocument.h",
     "SlotAssignment.cpp",
@@ -303,6 +300,8 @@
     "events/WindowEventContext.h",
     "ng/flat_tree_traversal_ng.cc",
     "ng/flat_tree_traversal_ng.h",
+    "ng/slot_assignment_engine.cc",
+    "ng/slot_assignment_engine.h",
     "trustedtypes/TrustedHTML.cpp",
     "trustedtypes/TrustedHTML.h",
     "trustedtypes/TrustedScriptURL.cpp",
diff --git a/third_party/WebKit/Source/core/dom/ChildFrameDisconnector.cpp b/third_party/WebKit/Source/core/dom/ChildFrameDisconnector.cpp
index 3d6e16e..59df80c 100644
--- a/third_party/WebKit/Source/core/dom/ChildFrameDisconnector.cpp
+++ b/third_party/WebKit/Source/core/dom/ChildFrameDisconnector.cpp
@@ -4,7 +4,6 @@
 
 #include "core/dom/ChildFrameDisconnector.h"
 
-#include "core/dom/ElementShadow.h"
 #include "core/dom/ShadowRoot.h"
 #include "core/html/HTMLFrameOwnerElement.h"
 #include "platform/wtf/Assertions.h"
diff --git a/third_party/WebKit/Source/core/dom/ContainerNode.cpp b/third_party/WebKit/Source/core/dom/ContainerNode.cpp
index c5feaebf..07e99d4 100644
--- a/third_party/WebKit/Source/core/dom/ContainerNode.cpp
+++ b/third_party/WebKit/Source/core/dom/ContainerNode.cpp
@@ -30,7 +30,6 @@
 #include "core/dom/ChildFrameDisconnector.h"
 #include "core/dom/ChildListMutationScope.h"
 #include "core/dom/ClassCollection.h"
-#include "core/dom/ElementShadow.h"
 #include "core/dom/ElementTraversal.h"
 #include "core/dom/ExceptionCode.h"
 #include "core/dom/NameNodeList.h"
@@ -1597,7 +1596,7 @@
   if (IsHTMLSlotElement(node))
     return true;
 
-  if (node->IsElementNode() && ToElement(node)->Shadow())
+  if (IsShadowHost(node))
     return true;
 
   return false;
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 00b6940..599644e 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -76,7 +76,6 @@
 #include "core/dom/ElementCreationOptions.h"
 #include "core/dom/ElementDataCache.h"
 #include "core/dom/ElementRegistrationOptions.h"
-#include "core/dom/ElementShadow.h"
 #include "core/dom/ElementTraversal.h"
 #include "core/dom/ExceptionCode.h"
 #include "core/dom/FlatTreeTraversal.h"
@@ -95,6 +94,7 @@
 #include "core/dom/ProcessingInstruction.h"
 #include "core/dom/ScriptedAnimationController.h"
 #include "core/dom/ShadowRoot.h"
+#include "core/dom/SlotAssignment.h"
 #include "core/dom/StaticNodeList.h"
 #include "core/dom/TransformSource.h"
 #include "core/dom/TreeWalker.h"
@@ -104,6 +104,7 @@
 #include "core/dom/events/Event.h"
 #include "core/dom/events/EventListener.h"
 #include "core/dom/events/ScopedEventQueue.h"
+#include "core/dom/ng/slot_assignment_engine.h"
 #include "core/dom/trustedtypes/TrustedHTML.h"
 #include "core/editing/EditingUtilities.h"
 #include "core/editing/FrameSelection.h"
@@ -2118,7 +2119,13 @@
   DocumentAnimations::UpdateAnimationTimingIfNeeded(*this);
   EvaluateMediaQueryListIfNeeded();
   UpdateUseShadowTreesIfNeeded();
+
+  // For V0 Shadow DOM or V1 Shadow DOM without IncrementalShadowDOM
   UpdateDistribution();
+
+  if (RuntimeEnabledFeatures::IncrementalShadowDOMEnabled())
+    GetSlotAssignmentEngine().RecalcSlotAssignments();
+
   UpdateActiveStyle();
   UpdateStyleInvalidationIfNeeded();
 
@@ -7288,6 +7295,7 @@
   visitor->Trace(property_registry_);
   visitor->Trace(network_state_observer_);
   visitor->Trace(policy_);
+  visitor->Trace(slot_assignment_engine_);
   Supplementable<Document>::Trace(visitor);
   TreeScope::Trace(visitor);
   ContainerNode::Trace(visitor);
@@ -7334,6 +7342,12 @@
          scripted_animation_controller_->NextFrameHasPendingRAF();
 }
 
+SlotAssignmentEngine& Document::GetSlotAssignmentEngine() {
+  if (!slot_assignment_engine_)
+    slot_assignment_engine_ = SlotAssignmentEngine::Create();
+  return *slot_assignment_engine_;
+}
+
 void Document::TraceWrappers(const ScriptWrappableVisitor* visitor) const {
   // node_lists_ are traced in their corresponding NodeListsNodeData, keeping
   // them only alive for live nodes. Otherwise we would keep lists of dead
diff --git a/third_party/WebKit/Source/core/dom/Document.h b/third_party/WebKit/Source/core/dom/Document.h
index 6eef52e..1dfa438d 100644
--- a/third_party/WebKit/Source/core/dom/Document.h
+++ b/third_party/WebKit/Source/core/dom/Document.h
@@ -171,6 +171,7 @@
 class SelectorQueryCache;
 class SerializedScriptValue;
 class Settings;
+class SlotAssignmentEngine;
 class SnapCoordinator;
 class StringOrDictionary;
 class StyleEngine;
@@ -1423,6 +1424,8 @@
   void AddComputedStyleMapItem(Element*, StylePropertyMapReadOnly*);
   StylePropertyMapReadOnly* RemoveComputedStyleMapItem(Element*);
 
+  SlotAssignmentEngine& GetSlotAssignmentEngine();
+
  protected:
   Document(const DocumentInit&, DocumentClassFlags = kDefaultDocumentClass);
 
@@ -1816,6 +1819,8 @@
   bool needs_to_record_ukm_outlive_time_;
 
   Member<Policy> policy_;
+
+  Member<SlotAssignmentEngine> slot_assignment_engine_;
 };
 
 extern template class CORE_EXTERN_TEMPLATE_EXPORT Supplement<Document>;
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp
index 7ee80624..7424947 100644
--- a/third_party/WebKit/Source/core/dom/Element.cpp
+++ b/third_party/WebKit/Source/core/dom/Element.cpp
@@ -58,8 +58,6 @@
 #include "core/dom/Document.h"
 #include "core/dom/ElementDataCache.h"
 #include "core/dom/ElementRareData.h"
-#include "core/dom/ElementShadow.h"
-#include "core/dom/ElementShadowV0.h"
 #include "core/dom/ElementTraversal.h"
 #include "core/dom/ExceptionCode.h"
 #include "core/dom/FirstLetterPseudoElement.h"
@@ -73,6 +71,7 @@
 #include "core/dom/ScriptableDocumentParser.h"
 #include "core/dom/ShadowRoot.h"
 #include "core/dom/ShadowRootInit.h"
+#include "core/dom/ShadowRootV0.h"
 #include "core/dom/SlotAssignment.h"
 #include "core/dom/SpaceSplitString.h"
 #include "core/dom/Text.h"
@@ -1510,11 +1509,11 @@
 DISABLE_CFI_PERF
 void Element::AttributeChanged(const AttributeModificationParams& params) {
   const QualifiedName& name = params.name;
-  if (ElementShadow* parent_element_shadow =
-          ShadowWhereNodeCanBeDistributedForV0(*this)) {
+  if (ShadowRoot* parent_shadow_root =
+          ShadowRootWhereNodeCanBeDistributedForV0(*this)) {
     if (ShouldInvalidateDistributionWhenAttributeChanged(
-            parent_element_shadow, name, params.new_value))
-      parent_element_shadow->SetNeedsDistributionRecalc();
+            *parent_shadow_root, name, params.new_value))
+      parent_shadow_root->SetNeedsDistributionRecalc();
   }
   if (name == HTMLNames::slotAttr && params.old_value != params.new_value) {
     if (ShadowRoot* root = V1ShadowRootOfParent())
@@ -1637,14 +1636,13 @@
 }
 
 bool Element::ShouldInvalidateDistributionWhenAttributeChanged(
-    ElementShadow* element_shadow,
+    ShadowRoot& shadow_root,
     const QualifiedName& name,
     const AtomicString& new_value) {
-  DCHECK(element_shadow);
-  if (element_shadow->IsV1())
+  if (shadow_root.IsV1())
     return false;
   const SelectRuleFeatureSet& feature_set =
-      element_shadow->V0().EnsureSelectFeatureSet();
+      shadow_root.V0().EnsureSelectFeatureSet();
 
   if (name == HTMLNames::idAttr) {
     AtomicString old_id = GetElementData()->IdForStyleResolution();
@@ -1959,8 +1957,10 @@
   CreateAndAttachPseudoElementIfNeeded(kPseudoIdBefore, children_context);
 
   // When a shadow root exists, it does the work of attaching the children.
-  if (ElementShadow* shadow = Shadow())
-    shadow->Attach(children_context);
+  if (ShadowRoot* shadow_root = GetShadowRoot()) {
+    if (shadow_root->NeedsAttach())
+      shadow_root->AttachLayoutTree(children_context);
+  }
 
   ContainerNode::AttachLayoutTree(children_context);
   SetNonAttachedStyle(nullptr);
@@ -2012,8 +2012,8 @@
       element_animations->ClearBaseComputedStyle();
     }
 
-    if (ElementShadow* shadow = data->Shadow())
-      shadow->Detach(context);
+    if (ShadowRoot* shadow_root = data->GetShadowRoot())
+      shadow_root->DetachLayoutTree(context);
   }
 
   ContainerNode::DetachLayoutTree(context);
@@ -2347,7 +2347,7 @@
       child_attacher = &whitespace_attacher;
     }
     RebuildPseudoElementLayoutTree(kPseudoIdAfter, *child_attacher);
-    if (Shadow())
+    if (GetShadowRoot())
       RebuildShadowRootLayoutTree(*child_attacher);
     else
       RebuildChildrenLayoutTrees(*child_attacher);
@@ -2409,12 +2409,36 @@
   UpdateCallbackSelectors(GetComputedStyle(), nullptr);
 }
 
-ElementShadow* Element::Shadow() const {
-  return HasRareData() ? GetElementRareData()->Shadow() : nullptr;
+ShadowRoot& Element::CreateAndAttachShadowRoot(ShadowRootType type) {
+  EventDispatchForbiddenScope assert_no_event_dispatch;
+  ScriptForbiddenScope forbid_script;
+
+  DCHECK(!GetShadowRoot());
+
+  ShadowRoot* shadow_root = ShadowRoot::Create(GetDocument(), type);
+  EnsureElementRareData().SetShadowRoot(*shadow_root);
+  shadow_root->SetParentOrShadowHostNode(this);
+  shadow_root->SetParentTreeScope(GetTreeScope());
+  if (type == ShadowRootType::V0) {
+    shadow_root->SetNeedsDistributionRecalc();
+  } else {
+    for (Node& child : NodeTraversal::ChildrenOf(*this))
+      child.LazyReattachIfAttached();
+  }
+
+  shadow_root->InsertedInto(this);
+  SetChildNeedsStyleRecalc();
+  SetNeedsStyleRecalc(kSubtreeStyleChange, StyleChangeReasonForTracing::Create(
+                                               StyleChangeReason::kShadow));
+
+  probe::didPushShadowRoot(this, shadow_root);
+
+  return *shadow_root;
 }
 
-ElementShadow& Element::EnsureShadow() {
-  return EnsureElementRareData().EnsureShadow();
+// TODO(kochi): inline this.
+ShadowRoot* Element::GetShadowRoot() const {
+  return HasRareData() ? GetElementRareData()->GetShadowRoot() : nullptr;
 }
 
 void Element::PseudoStateChanged(CSSSelector::PseudoType pseudo) {
@@ -2607,23 +2631,25 @@
   DCHECK(AreAuthorShadowsAllowed());
   DCHECK(!AlwaysCreateUserAgentShadowRoot());
   GetDocument().SetShadowCascadeOrder(ShadowCascadeOrder::kShadowCascadeV0);
-  return EnsureShadow().AddShadowRoot(*this, ShadowRootType::V0);
+  return CreateAndAttachShadowRoot(ShadowRootType::V0);
 }
 
 ShadowRoot& Element::CreateUserAgentShadowRoot() {
   DCHECK(!GetShadowRoot());
-  return EnsureShadow().AddShadowRoot(*this, ShadowRootType::kUserAgent);
+  return CreateAndAttachShadowRoot(ShadowRootType::kUserAgent);
 }
 
 ShadowRoot& Element::AttachShadowRootInternal(ShadowRootType type,
                                               bool delegates_focus) {
-  DCHECK(CanAttachShadowRoot());
+  // SVG <use> is a special case for using this API to create a closed shadow
+  // root.
+  DCHECK(CanAttachShadowRoot() || IsSVGUseElement(*this));
   DCHECK(type == ShadowRootType::kOpen || type == ShadowRootType::kClosed)
       << type;
   DCHECK(!AlwaysCreateUserAgentShadowRoot());
 
   GetDocument().SetShadowCascadeOrder(ShadowCascadeOrder::kShadowCascadeV1);
-  ShadowRoot& shadow_root = EnsureShadow().AddShadowRoot(*this, type);
+  ShadowRoot& shadow_root = CreateAndAttachShadowRoot(type);
   shadow_root.SetDelegatesFocus(delegates_focus);
   return shadow_root;
 }
@@ -2664,7 +2690,7 @@
     return *shadow_root;
   }
   ShadowRoot& shadow_root =
-      EnsureShadow().AddShadowRoot(*this, ShadowRootType::kUserAgent);
+      CreateAndAttachShadowRoot(ShadowRootType::kUserAgent);
   DidAddUserAgentShadowRoot(shadow_root);
   return shadow_root;
 }
@@ -2726,8 +2752,8 @@
         change.sibling_after_change);
 
   // TODO(hayato): Confirm that we can skip this if a shadow tree is v1.
-  if (ElementShadow* shadow = Shadow())
-    shadow->SetNeedsDistributionRecalcWillBeSetNeedsAssignmentRecalc();
+  if (ShadowRoot* shadow_root = GetShadowRoot())
+    shadow_root->SetNeedsDistributionRecalcWillBeSetNeedsAssignmentRecalc();
 }
 
 void Element::FinishParsingChildren() {
diff --git a/third_party/WebKit/Source/core/dom/Element.h b/third_party/WebKit/Source/core/dom/Element.h
index 987ccb0..2b5715c 100644
--- a/third_party/WebKit/Source/core/dom/Element.h
+++ b/third_party/WebKit/Source/core/dom/Element.h
@@ -56,7 +56,6 @@
 class ElementAnimations;
 class ElementIntersectionObserverData;
 class ElementRareData;
-class ElementShadow;
 class ExceptionState;
 class FloatQuad;
 class FocusOptions;
@@ -481,8 +480,6 @@
 
   void SetNeedsCompositingUpdate();
 
-  ElementShadow* Shadow() const;
-  ElementShadow& EnsureShadow();
   // If type of ShadowRoot (either closed or open) is explicitly specified,
   // creation of multiple shadow roots is prohibited in any combination and
   // throws an exception.  Multiple shadow roots are allowed only when
@@ -972,6 +969,8 @@
   inline PseudoElement* CreatePseudoElementIfNeeded(PseudoId);
   void CreateAndAttachPseudoElementIfNeeded(PseudoId, AttachContext&);
 
+  ShadowRoot& CreateAndAttachShadowRoot(ShadowRootType);
+
   // FIXME: Everyone should allow author shadows.
   virtual bool AreAuthorShadowsAllowed() const { return true; }
   virtual void DidAddUserAgentShadowRoot(ShadowRoot&) {}
@@ -1042,7 +1041,7 @@
 
   void CreateUniqueElementData();
 
-  bool ShouldInvalidateDistributionWhenAttributeChanged(ElementShadow*,
+  bool ShouldInvalidateDistributionWhenAttributeChanged(ShadowRoot&,
                                                         const QualifiedName&,
                                                         const AtomicString&);
 
@@ -1255,19 +1254,19 @@
 }
 
 inline bool IsShadowHost(const Node* node) {
-  return node && node->IsElementNode() && ToElement(node)->Shadow();
+  return node && node->GetShadowRoot();
 }
 
 inline bool IsShadowHost(const Node& node) {
-  return node.IsElementNode() && ToElement(node).Shadow();
+  return node.GetShadowRoot();
 }
 
 inline bool IsShadowHost(const Element* element) {
-  return element && element->Shadow();
+  return element && element->GetShadowRoot();
 }
 
 inline bool IsShadowHost(const Element& element) {
-  return element.Shadow();
+  return element.GetShadowRoot();
 }
 
 inline bool IsAtShadowBoundary(const Element* element) {
diff --git a/third_party/WebKit/Source/core/dom/ElementRareData.cpp b/third_party/WebKit/Source/core/dom/ElementRareData.cpp
index dcb5db87..b62c79d9 100644
--- a/third_party/WebKit/Source/core/dom/ElementRareData.cpp
+++ b/third_party/WebKit/Source/core/dom/ElementRareData.cpp
@@ -94,7 +94,7 @@
 void ElementRareData::TraceAfterDispatch(blink::Visitor* visitor) {
   visitor->Trace(dataset_);
   visitor->Trace(class_list_);
-  visitor->Trace(shadow_);
+  visitor->Trace(shadow_root_);
   visitor->Trace(attribute_map_);
   visitor->Trace(attr_node_list_);
   visitor->Trace(element_animations_);
@@ -117,7 +117,7 @@
     }
   }
   visitor->TraceWrappers(dataset_);
-  visitor->TraceWrappers(shadow_);
+  visitor->TraceWrappers(shadow_root_);
   visitor->TraceWrappers(class_list_);
   visitor->TraceWrappers(attribute_map_);
   visitor->TraceWrappers(accessible_node_);
diff --git a/third_party/WebKit/Source/core/dom/ElementRareData.h b/third_party/WebKit/Source/core/dom/ElementRareData.h
index 73d5caf..efbffa48 100644
--- a/third_party/WebKit/Source/core/dom/ElementRareData.h
+++ b/third_party/WebKit/Source/core/dom/ElementRareData.h
@@ -30,11 +30,11 @@
 #include "core/dom/Attr.h"
 #include "core/dom/DOMTokenList.h"
 #include "core/dom/DatasetDOMStringMap.h"
-#include "core/dom/ElementShadow.h"
 #include "core/dom/NamedNodeMap.h"
 #include "core/dom/NodeRareData.h"
 #include "core/dom/PseudoElement.h"
 #include "core/dom/PseudoElementData.h"
+#include "core/dom/ShadowRoot.h"
 #include "core/dom/SpaceSplitString.h"
 #include "core/html/custom/CustomElementDefinition.h"
 #include "core/html/custom/V0CustomElementDefinition.h"
@@ -75,13 +75,10 @@
     return cssom_map_wrapper_.Get();
   }
 
-  void ClearShadow() { shadow_ = nullptr; }
-  ElementShadow* Shadow() const { return shadow_.Get(); }
-  ElementShadow& EnsureShadow() {
-    if (!shadow_) {
-      shadow_ = ElementShadow::Create();
-    }
-    return *shadow_;
+  ShadowRoot* GetShadowRoot() const { return shadow_root_.Get(); }
+  void SetShadowRoot(ShadowRoot& shadow_root) {
+    DCHECK(!shadow_root_);
+    shadow_root_ = &shadow_root;
   }
 
   NamedNodeMap* AttributeMap() const { return attribute_map_.Get(); }
@@ -190,7 +187,7 @@
   AtomicString nonce_;
 
   TraceWrapperMember<DatasetDOMStringMap> dataset_;
-  TraceWrapperMember<ElementShadow> shadow_;
+  TraceWrapperMember<ShadowRoot> shadow_root_;
   TraceWrapperMember<DOMTokenList> class_list_;
   std::unique_ptr<SpaceSplitString> part_names_;
   TraceWrapperMember<NamedNodeMap> attribute_map_;
diff --git a/third_party/WebKit/Source/core/dom/ElementShadow.cpp b/third_party/WebKit/Source/core/dom/ElementShadow.cpp
deleted file mode 100644
index 518ceb2e..0000000
--- a/third_party/WebKit/Source/core/dom/ElementShadow.cpp
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "core/dom/ElementShadow.h"
-
-#include "core/css/StyleChangeReason.h"
-#include "core/css/StyleSheetList.h"
-#include "core/css/resolver/ScopedStyleResolver.h"
-#include "core/dom/ElementShadowV0.h"
-#include "core/dom/NodeTraversal.h"
-#include "core/frame/Deprecation.h"
-#include "core/probe/CoreProbes.h"
-#include "platform/EventDispatchForbiddenScope.h"
-#include "platform/bindings/ScriptForbiddenScope.h"
-
-namespace blink {
-
-ElementShadow* ElementShadow::Create() {
-  return new ElementShadow();
-}
-
-ElementShadow::ElementShadow() : needs_distribution_recalc_(false) {}
-
-ShadowRoot& ElementShadow::AddShadowRoot(Element& shadow_host,
-                                         ShadowRootType type) {
-  EventDispatchForbiddenScope assert_no_event_dispatch;
-  ScriptForbiddenScope forbid_script;
-
-  DCHECK(!shadow_root_);
-  if (type == ShadowRootType::V0) {
-    DCHECK(!element_shadow_v0_);
-    element_shadow_v0_ = ElementShadowV0::Create(*this);
-  }
-
-  shadow_root_ = ShadowRoot::Create(shadow_host.GetDocument(), type);
-  shadow_root_->SetParentOrShadowHostNode(&shadow_host);
-  shadow_root_->SetParentTreeScope(shadow_host.GetTreeScope());
-  if (type == ShadowRootType::V0) {
-    SetNeedsDistributionRecalc();
-  } else {
-    for (Node& child : NodeTraversal::ChildrenOf(shadow_host))
-      child.LazyReattachIfAttached();
-  }
-
-  shadow_root_->InsertedInto(&shadow_host);
-  shadow_host.SetChildNeedsStyleRecalc();
-  shadow_host.SetNeedsStyleRecalc(
-      kSubtreeStyleChange,
-      StyleChangeReasonForTracing::Create(StyleChangeReason::kShadow));
-
-  probe::didPushShadowRoot(&shadow_host, shadow_root_);
-
-  return *shadow_root_;
-}
-
-void ElementShadow::Attach(const Node::AttachContext& context) {
-  Node::AttachContext children_context(context);
-  ShadowRoot& root = GetShadowRoot();
-  if (root.NeedsAttach())
-    root.AttachLayoutTree(children_context);
-}
-
-void ElementShadow::Detach(const Node::AttachContext& context) {
-  Node::AttachContext children_context(context);
-  children_context.clear_invalidation = true;
-  GetShadowRoot().DetachLayoutTree(children_context);
-}
-
-void ElementShadow::SetNeedsDistributionRecalcWillBeSetNeedsAssignmentRecalc() {
-  if (RuntimeEnabledFeatures::IncrementalShadowDOMEnabled() && IsV1())
-    GetShadowRoot().SetNeedsAssignmentRecalc();
-  else
-    SetNeedsDistributionRecalc();
-}
-
-void ElementShadow::SetNeedsDistributionRecalc() {
-  DCHECK(!(RuntimeEnabledFeatures::IncrementalShadowDOMEnabled() && IsV1()));
-  if (needs_distribution_recalc_)
-    return;
-  needs_distribution_recalc_ = true;
-  Host().MarkAncestorsWithChildNeedsDistributionRecalc();
-  if (!IsV1())
-    V0().ClearDistribution();
-}
-
-void ElementShadow::Distribute() {
-  if (IsV1())
-    GetShadowRoot().DistributeV1();
-  else
-    V0().Distribute();
-}
-
-void ElementShadow::Trace(blink::Visitor* visitor) {
-  visitor->Trace(element_shadow_v0_);
-  visitor->Trace(shadow_root_);
-}
-
-void ElementShadow::TraceWrappers(const ScriptWrappableVisitor* visitor) const {
-  visitor->TraceWrappers(element_shadow_v0_);
-  visitor->TraceWrappers(shadow_root_);
-}
-
-}  // namespace blink
diff --git a/third_party/WebKit/Source/core/dom/ElementShadow.h b/third_party/WebKit/Source/core/dom/ElementShadow.h
deleted file mode 100644
index 6ba8cdb..0000000
--- a/third_party/WebKit/Source/core/dom/ElementShadow.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef ElementShadow_h
-#define ElementShadow_h
-
-#include "base/macros.h"
-#include "core/CoreExport.h"
-#include "core/dom/ShadowRoot.h"
-#include "platform/bindings/ScriptWrappable.h"
-#include "platform/bindings/TraceWrapperMember.h"
-#include "platform/heap/Handle.h"
-
-namespace blink {
-
-class ElementShadowV0;
-
-class CORE_EXPORT ElementShadow final : public GarbageCollected<ElementShadow>,
-                                        public TraceWrapperBase {
- public:
-  static ElementShadow* Create();
-
-  Element& Host() const {
-    DCHECK(shadow_root_);
-    return shadow_root_->host();
-  }
-
-  ShadowRoot& GetShadowRoot() const {
-    DCHECK(shadow_root_);
-    return *shadow_root_;
-  }
-  ElementShadow* ContainingShadow() const;
-
-  ShadowRoot& AddShadowRoot(Element& shadow_host, ShadowRootType);
-
-  void Attach(const Node::AttachContext&);
-  void Detach(const Node::AttachContext&);
-
-  void DistributeIfNeeded();
-
-  void SetNeedsDistributionRecalcWillBeSetNeedsAssignmentRecalc();
-  void SetNeedsDistributionRecalc();
-  bool NeedsDistributionRecalc() const { return needs_distribution_recalc_; }
-
-  bool IsV1() const { return GetShadowRoot().IsV1(); }
-  bool IsOpenOrV0() const { return GetShadowRoot().IsOpenOrV0(); }
-
-  ElementShadowV0& V0() const {
-    DCHECK(element_shadow_v0_);
-    return *element_shadow_v0_;
-  }
-
-  void Trace(blink::Visitor*);
-  void TraceWrappers(const ScriptWrappableVisitor*) const override;
-  const char* NameInHeapSnapshot() const override { return "ElementShadow"; }
-
- private:
-  ElementShadow();
-
-  void Distribute();
-
-  TraceWrapperMember<ElementShadowV0> element_shadow_v0_;
-  TraceWrapperMember<ShadowRoot> shadow_root_;
-  bool needs_distribution_recalc_;
-  DISALLOW_COPY_AND_ASSIGN(ElementShadow);
-};
-
-inline ShadowRoot* Node::GetShadowRoot() const {
-  if (!IsElementNode())
-    return nullptr;
-  return ToElement(this)->GetShadowRoot();
-}
-
-inline ShadowRoot* Element::GetShadowRoot() const {
-  if (ElementShadow* shadow = Shadow())
-    return &shadow->GetShadowRoot();
-  return nullptr;
-}
-
-inline ShadowRoot* Element::ShadowRootIfV1() const {
-  ShadowRoot* root = GetShadowRoot();
-  if (root && root->IsV1())
-    return root;
-  return nullptr;
-}
-
-inline ElementShadow* ElementShadow::ContainingShadow() const {
-  if (ShadowRoot* parent_root = Host().ContainingShadowRoot())
-    return parent_root->Owner();
-  return nullptr;
-}
-
-inline void ElementShadow::DistributeIfNeeded() {
-  if (needs_distribution_recalc_)
-    Distribute();
-  needs_distribution_recalc_ = false;
-}
-
-}  // namespace blink
-
-#endif
diff --git a/third_party/WebKit/Source/core/dom/ElementShadowV0.h b/third_party/WebKit/Source/core/dom/ElementShadowV0.h
deleted file mode 100644
index 1b5b5cfc..0000000
--- a/third_party/WebKit/Source/core/dom/ElementShadowV0.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef ElementShadowV0_h
-#define ElementShadowV0_h
-
-#include "base/macros.h"
-#include "core/CoreExport.h"
-#include "core/css/SelectRuleFeatureSet.h"
-#include "core/dom/V0InsertionPoint.h"
-#include "platform/bindings/ScriptWrappable.h"
-#include "platform/heap/Handle.h"
-
-namespace blink {
-
-class CORE_EXPORT ElementShadowV0 final
-    : public GarbageCollectedFinalized<ElementShadowV0>,
-      public TraceWrapperBase {
- public:
-  static ElementShadowV0* Create(ElementShadow&);
-  ~ElementShadowV0();
-
-  void WillAffectSelector();
-  const SelectRuleFeatureSet& EnsureSelectFeatureSet();
-
-  const V0InsertionPoint* FinalDestinationInsertionPointFor(const Node*) const;
-  const DestinationInsertionPoints* DestinationInsertionPointsFor(
-      const Node*) const;
-
-  void Distribute();
-  void DidDistributeNode(const Node*, V0InsertionPoint*);
-  void ClearDistribution();
-
-  void Trace(blink::Visitor*);
-  void TraceWrappers(const ScriptWrappableVisitor*) const override;
-  const char* NameInHeapSnapshot() const override { return "ElementShadowV0"; }
-
- private:
-  explicit ElementShadowV0(ElementShadow&);
-
-  ShadowRoot& GetShadowRoot() const;
-
-  void DistributeNodeChildrenTo(V0InsertionPoint*, ContainerNode*);
-
-  void CollectSelectFeatureSetFrom(const ShadowRoot&);
-  bool NeedsSelectFeatureSet() const { return needs_select_feature_set_; }
-  void SetNeedsSelectFeatureSet() { needs_select_feature_set_ = true; }
-
-  Member<ElementShadow> element_shadow_;
-  using NodeToDestinationInsertionPoints =
-      HeapHashMap<Member<const Node>, Member<DestinationInsertionPoints>>;
-  NodeToDestinationInsertionPoints node_to_insertion_points_;
-  SelectRuleFeatureSet select_features_;
-  bool needs_select_feature_set_;
-  DISALLOW_COPY_AND_ASSIGN(ElementShadowV0);
-};
-
-}  // namespace blink
-
-#endif
diff --git a/third_party/WebKit/Source/core/dom/FlatTreeTraversal.cpp b/third_party/WebKit/Source/core/dom/FlatTreeTraversal.cpp
index 4e45ee4..8615406 100644
--- a/third_party/WebKit/Source/core/dom/FlatTreeTraversal.cpp
+++ b/third_party/WebKit/Source/core/dom/FlatTreeTraversal.cpp
@@ -27,7 +27,6 @@
 #include "core/dom/FlatTreeTraversal.h"
 
 #include "core/dom/Element.h"
-#include "core/dom/ElementShadow.h"
 #include "core/html/HTMLShadowElement.h"
 #include "core/html/HTMLSlotElement.h"
 
@@ -101,7 +100,7 @@
   if (node.IsChildOfV1ShadowHost())
     return TraverseSiblingsForV1HostChild(node, direction);
 
-  if (ShadowWhereNodeCanBeDistributedForV0(node))
+  if (ShadowRootWhereNodeCanBeDistributedForV0(node))
     return TraverseSiblingsForV0Distribution(node, direction);
 
   if (Node* found = ResolveDistributionStartingAt(
@@ -173,20 +172,20 @@
   if (CanBeDistributedToV0InsertionPoint(node))
     return TraverseParentForV0(node, details);
 
-  DCHECK(!ShadowWhereNodeCanBeDistributedForV0(node));
+  DCHECK(!ShadowRootWhereNodeCanBeDistributedForV0(node));
   return TraverseParentOrHost(node);
 }
 
 ContainerNode* FlatTreeTraversal::TraverseParentForV0(
     const Node& node,
     ParentTraversalDetails* details) {
-  if (ShadowWhereNodeCanBeDistributedForV0(node)) {
+  if (ShadowRootWhereNodeCanBeDistributedForV0(node)) {
     if (const V0InsertionPoint* insertion_point = ResolveReprojection(&node)) {
       if (details)
         details->DidTraverseInsertionPoint(insertion_point);
       // The node is distributed. But the distribution was stopped at this
       // insertion point.
-      if (ShadowWhereNodeCanBeDistributedForV0(*insertion_point))
+      if (ShadowRootWhereNodeCanBeDistributedForV0(*insertion_point))
         return nullptr;
       return TraverseParent(*insertion_point);
     }
diff --git a/third_party/WebKit/Source/core/dom/Node.cpp b/third_party/WebKit/Source/core/dom/Node.cpp
index 27af716..eb72c5e41 100644
--- a/third_party/WebKit/Source/core/dom/Node.cpp
+++ b/third_party/WebKit/Source/core/dom/Node.cpp
@@ -42,7 +42,6 @@
 #include "core/dom/DocumentType.h"
 #include "core/dom/Element.h"
 #include "core/dom/ElementRareData.h"
-#include "core/dom/ElementShadow.h"
 #include "core/dom/ElementTraversal.h"
 #include "core/dom/ExceptionCode.h"
 #include "core/dom/FlatTreeTraversal.h"
@@ -792,10 +791,8 @@
 void Node::RecalcDistribution() {
   DCHECK(ChildNeedsDistributionRecalc());
 
-  if (IsElementNode()) {
-    if (ElementShadow* shadow = ToElement(this)->Shadow())
-      shadow->DistributeIfNeeded();
-  }
+  if (GetShadowRoot())
+    GetShadowRoot()->DistributeIfNeeded();
 
   DCHECK(ScriptForbiddenScope::IsScriptForbidden());
   for (Node* child = firstChild(); child; child = child->nextSibling()) {
@@ -861,7 +858,7 @@
       return slot;
   }
   if (node.IsInV0ShadowTree() || node.IsChildOfV0ShadowHost()) {
-    if (ShadowWhereNodeCanBeDistributedForV0(node)) {
+    if (ShadowRootWhereNodeCanBeDistributedForV0(node)) {
       if (V0InsertionPoint* insertion_point =
               const_cast<V0InsertionPoint*>(ResolveReprojection(&node))) {
         return insertion_point;
@@ -1199,19 +1196,19 @@
   return shadow_root && !shadow_root->IsV1();
 }
 
-ElementShadow* Node::ParentElementShadow() const {
+ShadowRoot* Node::ParentElementShadowRoot() const {
   Element* parent = parentElement();
-  return parent ? parent->Shadow() : nullptr;
+  return parent ? parent->GetShadowRoot() : nullptr;
 }
 
 bool Node::IsChildOfV1ShadowHost() const {
-  ElementShadow* parent_shadow = ParentElementShadow();
-  return parent_shadow && parent_shadow->IsV1();
+  ShadowRoot* parent_shadow_root = ParentElementShadowRoot();
+  return parent_shadow_root && parent_shadow_root->IsV1();
 }
 
 bool Node::IsChildOfV0ShadowHost() const {
-  ElementShadow* parent_shadow = ParentElementShadow();
-  return parent_shadow && !parent_shadow->IsV1();
+  ShadowRoot* parent_shadow_root = ParentElementShadowRoot();
+  return parent_shadow_root && !parent_shadow_root->IsV1();
 }
 
 ShadowRoot* Node::V1ShadowRootOfParent() const {
diff --git a/third_party/WebKit/Source/core/dom/Node.h b/third_party/WebKit/Source/core/dom/Node.h
index d50de57..f3ddc60 100644
--- a/third_party/WebKit/Source/core/dom/Node.h
+++ b/third_party/WebKit/Source/core/dom/Node.h
@@ -47,7 +47,6 @@
 class ContainerNode;
 class Document;
 class Element;
-class ElementShadow;
 class Event;
 class EventDispatchHandlingState;
 class ExceptionState;
@@ -555,7 +554,7 @@
         static_cast<NodeFlags>(kIsConnectedFlag | kIsInShadowTreeFlag));
   }
 
-  ElementShadow* ParentElementShadow() const;
+  ShadowRoot* ParentElementShadowRoot() const;
   bool IsInV1ShadowTree() const;
   bool IsInV0ShadowTree() const;
   bool IsChildOfV1ShadowHost() const;
diff --git a/third_party/WebKit/Source/core/dom/ShadowDOMV0Test.cpp b/third_party/WebKit/Source/core/dom/ShadowDOMV0Test.cpp
index 49a99c21..2a39463 100644
--- a/third_party/WebKit/Source/core/dom/ShadowDOMV0Test.cpp
+++ b/third_party/WebKit/Source/core/dom/ShadowDOMV0Test.cpp
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "core/dom/ElementShadow.h"
-#include "core/dom/ElementShadowV0.h"
+#include "core/dom/ShadowRoot.h"
+#include "core/dom/ShadowRootV0.h"
 #include "core/html/HTMLBodyElement.h"
 #include "core/testing/sim/SimRequest.h"
 #include "core/testing/sim/SimTest.h"
@@ -14,21 +14,26 @@
 
 bool HasSelectorForIdInShadow(Element* host, const AtomicString& id) {
   DCHECK(host);
-  return host->Shadow()->V0().EnsureSelectFeatureSet().HasSelectorForId(id);
+  return host->GetShadowRoot()->V0().EnsureSelectFeatureSet().HasSelectorForId(
+      id);
 }
 
 bool HasSelectorForClassInShadow(Element* host,
                                  const AtomicString& class_name) {
   DCHECK(host);
-  return host->Shadow()->V0().EnsureSelectFeatureSet().HasSelectorForClass(
-      class_name);
+  return host->GetShadowRoot()
+      ->V0()
+      .EnsureSelectFeatureSet()
+      .HasSelectorForClass(class_name);
 }
 
 bool HasSelectorForAttributeInShadow(Element* host,
                                      const AtomicString& attribute_name) {
   DCHECK(host);
-  return host->Shadow()->V0().EnsureSelectFeatureSet().HasSelectorForAttribute(
-      attribute_name);
+  return host->GetShadowRoot()
+      ->V0()
+      .EnsureSelectFeatureSet()
+      .HasSelectorForAttribute(attribute_name);
 }
 
 class ShadowDOMVTest : public SimTest {};
diff --git a/third_party/WebKit/Source/core/dom/ShadowRoot.cpp b/third_party/WebKit/Source/core/dom/ShadowRoot.cpp
index 3318cdd..7562e059 100644
--- a/third_party/WebKit/Source/core/dom/ShadowRoot.cpp
+++ b/third_party/WebKit/Source/core/dom/ShadowRoot.cpp
@@ -28,28 +28,38 @@
 
 #include "bindings/core/v8/ExceptionState.h"
 #include "bindings/core/v8/string_or_trusted_html.h"
+#include "core/css/StyleChangeReason.h"
 #include "core/css/StyleEngine.h"
 #include "core/css/StyleSheetList.h"
 #include "core/css/resolver/StyleResolver.h"
-#include "core/dom/ElementShadow.h"
 #include "core/dom/ElementTraversal.h"
-#include "core/dom/ShadowRootRareDataV0.h"
+#include "core/dom/ShadowRootV0.h"
 #include "core/dom/SlotAssignment.h"
 #include "core/dom/Text.h"
 #include "core/dom/V0InsertionPoint.h"
 #include "core/dom/WhitespaceAttacher.h"
+#include "core/dom/ng/slot_assignment_engine.h"
 #include "core/dom/trustedtypes/TrustedHTML.h"
 #include "core/editing/serializers/Serialization.h"
+#include "core/html/HTMLContentElement.h"
 #include "core/html/HTMLShadowElement.h"
 #include "core/html/HTMLSlotElement.h"
 #include "core/layout/LayoutObject.h"
+#include "platform/EventDispatchForbiddenScope.h"
 #include "public/platform/Platform.h"
 
 namespace blink {
 
+void ShadowRoot::Distribute() {
+  if (IsV1())
+    DistributeV1();
+  else
+    V0().Distribute();
+}
+
 struct SameSizeAsShadowRoot : public DocumentFragment, public TreeScope {
   char empty_class_fields_due_to_gc_mixin_marker[1];
-  Member<void*> willbe_member[3];
+  Member<void*> member[3];
   unsigned counters_and_flags[1];
 };
 
@@ -63,9 +73,12 @@
       child_shadow_root_count_(0),
       type_(static_cast<unsigned short>(type)),
       registered_with_parent_shadow_root_(false),
-      descendant_insertion_points_is_valid_(false),
       delegates_focus_(false),
-      unused_(0) {}
+      needs_distribution_recalc_(false),
+      unused_(0) {
+  if (IsV0())
+    shadow_root_v0_ = new ShadowRootV0(*this);
+}
 
 ShadowRoot::~ShadowRoot() = default;
 
@@ -163,15 +176,15 @@
 }
 
 void ShadowRoot::AttachLayoutTree(AttachContext& context) {
-  DocumentFragment::AttachLayoutTree(context);
+  Node::AttachContext children_context(context);
+  DocumentFragment::AttachLayoutTree(children_context);
 }
 
 void ShadowRoot::DetachLayoutTree(const AttachContext& context) {
-  if (context.clear_invalidation) {
-    GetDocument().GetStyleEngine().GetStyleInvalidator().ClearInvalidation(
-        *this);
-  }
-  DocumentFragment::DetachLayoutTree(context);
+  Node::AttachContext children_context(context);
+  children_context.clear_invalidation = true;
+  GetDocument().GetStyleEngine().GetStyleInvalidator().ClearInvalidation(*this);
+  DocumentFragment::DetachLayoutTree(children_context);
 }
 
 Node::InsertionNotificationRequest ShadowRoot::InsertedInto(
@@ -181,6 +194,9 @@
   if (!insertion_point->isConnected())
     return kInsertionDone;
 
+  if (RuntimeEnabledFeatures::IncrementalShadowDOMEnabled())
+    GetDocument().GetSlotAssignmentEngine().Connected(*this);
+
   // FIXME: When parsing <video controls>, insertedInto() is called many times
   // without invoking removedFrom.  For now, we check
   // m_registeredWithParentShadowroot. We would like to
@@ -199,6 +215,8 @@
 
 void ShadowRoot::RemovedFrom(ContainerNode* insertion_point) {
   if (insertion_point->isConnected()) {
+    if (NeedsSlotAssignmentRecalc())
+      GetDocument().GetSlotAssignmentEngine().Disconnected(*this);
     GetDocument().GetStyleEngine().ShadowRootRemovedFromDocument(this);
     if (registered_with_parent_shadow_root_) {
       ShadowRoot* root = host().ContainingShadowRoot();
@@ -225,6 +243,10 @@
   return slot_assignment_->SetNeedsAssignmentRecalc();
 }
 
+bool ShadowRoot::NeedsSlotAssignmentRecalc() const {
+  return slot_assignment_ && slot_assignment_->NeedsAssignmentRecalc();
+}
+
 void ShadowRoot::ChildrenChanged(const ChildrenChange& change) {
   ContainerNode::ChildrenChanged(change);
 
@@ -237,83 +259,37 @@
   }
 }
 
-ShadowRootRareDataV0& ShadowRoot::EnsureShadowRootRareDataV0() {
-  if (shadow_root_rare_data_v0_)
-    return *shadow_root_rare_data_v0_;
-
-  shadow_root_rare_data_v0_ = new ShadowRootRareDataV0;
-  return *shadow_root_rare_data_v0_;
-}
-
-bool ShadowRoot::ContainsShadowElements() const {
-  return shadow_root_rare_data_v0_
-             ? shadow_root_rare_data_v0_->ContainsShadowElements()
-             : false;
-}
-
-bool ShadowRoot::ContainsContentElements() const {
-  return shadow_root_rare_data_v0_
-             ? shadow_root_rare_data_v0_->ContainsContentElements()
-             : false;
-}
-
-unsigned ShadowRoot::DescendantShadowElementCount() const {
-  return shadow_root_rare_data_v0_
-             ? shadow_root_rare_data_v0_->DescendantShadowElementCount()
-             : 0;
-}
-
-void ShadowRoot::DidAddInsertionPoint(V0InsertionPoint* insertion_point) {
-  EnsureShadowRootRareDataV0().DidAddInsertionPoint(insertion_point);
-  InvalidateDescendantInsertionPoints();
-}
-
-void ShadowRoot::DidRemoveInsertionPoint(V0InsertionPoint* insertion_point) {
-  shadow_root_rare_data_v0_->DidRemoveInsertionPoint(insertion_point);
-  InvalidateDescendantInsertionPoints();
-}
-
-void ShadowRoot::InvalidateDescendantInsertionPoints() {
-  descendant_insertion_points_is_valid_ = false;
-  shadow_root_rare_data_v0_->ClearDescendantInsertionPoints();
-}
-
-const HeapVector<Member<V0InsertionPoint>>&
-ShadowRoot::DescendantInsertionPoints() {
-  DEFINE_STATIC_LOCAL(HeapVector<Member<V0InsertionPoint>>, empty_list,
-                      (new HeapVector<Member<V0InsertionPoint>>));
-  if (shadow_root_rare_data_v0_ && descendant_insertion_points_is_valid_)
-    return shadow_root_rare_data_v0_->DescendantInsertionPoints();
-
-  descendant_insertion_points_is_valid_ = true;
-
-  if (!ContainsInsertionPoints())
-    return empty_list;
-
-  HeapVector<Member<V0InsertionPoint>> insertion_points;
-  for (V0InsertionPoint& insertion_point :
-       Traversal<V0InsertionPoint>::DescendantsOf(*this))
-    insertion_points.push_back(&insertion_point);
-
-  EnsureShadowRootRareDataV0().SetDescendantInsertionPoints(insertion_points);
-
-  return shadow_root_rare_data_v0_->DescendantInsertionPoints();
-}
-
 StyleSheetList& ShadowRoot::StyleSheets() {
   if (!style_sheet_list_)
     SetStyleSheets(StyleSheetList::Create(this));
   return *style_sheet_list_;
 }
 
+void ShadowRoot::SetNeedsDistributionRecalcWillBeSetNeedsAssignmentRecalc() {
+  if (RuntimeEnabledFeatures::IncrementalShadowDOMEnabled() && IsV1())
+    SetNeedsAssignmentRecalc();
+  else
+    SetNeedsDistributionRecalc();
+}
+
+void ShadowRoot::SetNeedsDistributionRecalc() {
+  DCHECK(!(RuntimeEnabledFeatures::IncrementalShadowDOMEnabled() && IsV1()));
+  if (needs_distribution_recalc_)
+    return;
+  needs_distribution_recalc_ = true;
+  host().MarkAncestorsWithChildNeedsDistributionRecalc();
+  if (!IsV1())
+    V0().ClearDistribution();
+}
+
 void ShadowRoot::DistributeV1() {
   EnsureSlotAssignment().RecalcDistribution();
 }
 
 void ShadowRoot::Trace(blink::Visitor* visitor) {
-  visitor->Trace(shadow_root_rare_data_v0_);
-  visitor->Trace(slot_assignment_);
   visitor->Trace(style_sheet_list_);
+  visitor->Trace(slot_assignment_);
+  visitor->Trace(shadow_root_v0_);
   TreeScope::Trace(visitor);
   DocumentFragment::Trace(visitor);
 }
diff --git a/third_party/WebKit/Source/core/dom/ShadowRoot.h b/third_party/WebKit/Source/core/dom/ShadowRoot.h
index 387669b..98c579b 100644
--- a/third_party/WebKit/Source/core/dom/ShadowRoot.h
+++ b/third_party/WebKit/Source/core/dom/ShadowRoot.h
@@ -40,12 +40,10 @@
 namespace blink {
 
 class Document;
-class ElementShadow;
 class ExceptionState;
-class ShadowRootRareDataV0;
+class ShadowRootV0;
 class SlotAssignment;
 class StringOrTrustedHTML;
-class V0InsertionPoint;
 class WhitespaceAttacher;
 
 enum class ShadowRootType { V0, kOpen, kClosed, kUserAgent };
@@ -72,7 +70,6 @@
     DCHECK(ParentOrShadowHostNode());
     return *ToElement(ParentOrShadowHostNode());
   }
-  ElementShadow* Owner() const { return host().Shadow(); }
   ShadowRootType GetType() const { return static_cast<ShadowRootType>(type_); }
   String mode() const {
     switch (GetType()) {
@@ -94,6 +91,7 @@
     }
   }
 
+  bool IsV0() const { return GetType() == ShadowRootType::V0; }
   bool IsOpenOrV0() const {
     return GetType() == ShadowRootType::V0 ||
            GetType() == ShadowRootType::kOpen;
@@ -112,17 +110,9 @@
   void RemovedFrom(ContainerNode*) override;
 
   void SetNeedsAssignmentRecalc();
+  bool NeedsSlotAssignmentRecalc() const;
 
-  // For V0
-  bool ContainsShadowElements() const;
-  bool ContainsContentElements() const;
-  bool ContainsInsertionPoints() const {
-    return ContainsShadowElements() || ContainsContentElements();
-  }
-  unsigned DescendantShadowElementCount() const;
-  void DidAddInsertionPoint(V0InsertionPoint*);
-  void DidRemoveInsertionPoint(V0InsertionPoint*);
-  const HeapVector<Member<V0InsertionPoint>>& DescendantInsertionPoints();
+  ShadowRootV0& V0() const;
 
   // For Internals, don't use this.
   unsigned ChildShadowRootCount() const { return child_shadow_root_count_; }
@@ -144,6 +134,11 @@
   void DidChangeHostChildSlotName(const AtomicString& old_value,
                                   const AtomicString& new_value);
 
+  void SetNeedsDistributionRecalcWillBeSetNeedsAssignmentRecalc();
+  void SetNeedsDistributionRecalc();
+  bool NeedsDistributionRecalc() const { return needs_distribution_recalc_; }
+
+  void DistributeIfNeeded();
   void DistributeV1();
 
   Element* ActiveElement() const;
@@ -178,7 +173,6 @@
 
   void ChildrenChanged(const ChildrenChange&) override;
 
-  ShadowRootRareDataV0& EnsureShadowRootRareDataV0();
   SlotAssignment& EnsureSlotAssignment();
 
   void AddChildShadowRoot() { ++child_shadow_root_count_; }
@@ -186,17 +180,19 @@
     DCHECK_GT(child_shadow_root_count_, 0u);
     --child_shadow_root_count_;
   }
-  void InvalidateDescendantInsertionPoints();
+  void Distribute();
 
-  Member<ShadowRootRareDataV0> shadow_root_rare_data_v0_;
   TraceWrapperMember<StyleSheetList> style_sheet_list_;
   Member<SlotAssignment> slot_assignment_;
+  Member<ShadowRootV0> shadow_root_v0_;
   unsigned short child_shadow_root_count_;
   unsigned short type_ : 2;
   unsigned short registered_with_parent_shadow_root_ : 1;
-  unsigned short descendant_insertion_points_is_valid_ : 1;
   unsigned short delegates_focus_ : 1;
+  unsigned short needs_distribution_recalc_ : 1;
   unsigned short unused_ : 11;
+
+  DISALLOW_COPY_AND_ASSIGN(ShadowRoot);
 };
 
 inline Element* ShadowRoot::ActiveElement() const {
@@ -207,6 +203,31 @@
   return ContainingShadowRoot() && ContainingShadowRoot()->IsUserAgent();
 }
 
+inline void ShadowRoot::DistributeIfNeeded() {
+  if (needs_distribution_recalc_)
+    Distribute();
+  needs_distribution_recalc_ = false;
+}
+
+inline ShadowRoot* Node::GetShadowRoot() const {
+  if (!IsElementNode())
+    return nullptr;
+  return ToElement(this)->GetShadowRoot();
+}
+
+inline ShadowRoot* Element::ShadowRootIfV1() const {
+  ShadowRoot* root = GetShadowRoot();
+  if (root && root->IsV1())
+    return root;
+  return nullptr;
+}
+
+inline ShadowRootV0& ShadowRoot::V0() const {
+  DCHECK(shadow_root_v0_);
+  DCHECK(IsV0());
+  return *shadow_root_v0_;
+}
+
 DEFINE_NODE_TYPE_CASTS(ShadowRoot, IsShadowRoot());
 DEFINE_TYPE_CASTS(ShadowRoot,
                   TreeScope,
diff --git a/third_party/WebKit/Source/core/dom/ShadowRootRareDataV0.h b/third_party/WebKit/Source/core/dom/ShadowRootRareDataV0.h
deleted file mode 100644
index efe5be4..0000000
--- a/third_party/WebKit/Source/core/dom/ShadowRootRareDataV0.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef ShadowRootRareDataV0_h
-#define ShadowRootRareDataV0_h
-
-#include "core/dom/V0InsertionPoint.h"
-#include "platform/wtf/Vector.h"
-
-namespace blink {
-
-class ShadowRootRareDataV0 : public GarbageCollected<ShadowRootRareDataV0> {
- public:
-  ShadowRootRareDataV0()
-      : descendant_shadow_element_count_(0),
-        descendant_content_element_count_(0) {}
-
-  void DidAddInsertionPoint(V0InsertionPoint*);
-  void DidRemoveInsertionPoint(V0InsertionPoint*);
-
-  bool ContainsShadowElements() const {
-    return descendant_shadow_element_count_;
-  }
-  bool ContainsContentElements() const {
-    return descendant_content_element_count_;
-  }
-
-  unsigned DescendantShadowElementCount() const {
-    return descendant_shadow_element_count_;
-  }
-
-  const HeapVector<Member<V0InsertionPoint>>& DescendantInsertionPoints() {
-    return descendant_insertion_points_;
-  }
-  void SetDescendantInsertionPoints(
-      HeapVector<Member<V0InsertionPoint>>& list) {
-    descendant_insertion_points_.swap(list);
-  }
-  void ClearDescendantInsertionPoints() {
-    descendant_insertion_points_.clear();
-  }
-
-  void Trace(blink::Visitor* visitor) {
-    visitor->Trace(descendant_insertion_points_);
-  }
-
- private:
-  unsigned descendant_shadow_element_count_;
-  unsigned descendant_content_element_count_;
-  HeapVector<Member<V0InsertionPoint>> descendant_insertion_points_;
-};
-
-inline void ShadowRootRareDataV0::DidAddInsertionPoint(
-    V0InsertionPoint* point) {
-  DCHECK(point);
-  if (IsHTMLShadowElement(*point))
-    ++descendant_shadow_element_count_;
-  else if (IsHTMLContentElement(*point))
-    ++descendant_content_element_count_;
-  else
-    NOTREACHED();
-}
-
-inline void ShadowRootRareDataV0::DidRemoveInsertionPoint(
-    V0InsertionPoint* point) {
-  DCHECK(point);
-  if (IsHTMLShadowElement(*point)) {
-    DCHECK_GT(descendant_shadow_element_count_, 0u);
-    --descendant_shadow_element_count_;
-  } else if (IsHTMLContentElement(*point)) {
-    DCHECK_GT(descendant_content_element_count_, 0u);
-    --descendant_content_element_count_;
-  } else {
-    NOTREACHED();
-  }
-}
-
-}  // namespace blink
-
-#endif
diff --git a/third_party/WebKit/Source/core/dom/ElementShadowV0.cpp b/third_party/WebKit/Source/core/dom/ShadowRootV0.cpp
similarity index 62%
rename from third_party/WebKit/Source/core/dom/ElementShadowV0.cpp
rename to third_party/WebKit/Source/core/dom/ShadowRootV0.cpp
index 8c9efd2..b1ffd81b 100644
--- a/third_party/WebKit/Source/core/dom/ElementShadowV0.cpp
+++ b/third_party/WebKit/Source/core/dom/ShadowRootV0.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012 Google Inc. All rights reserved.
+ * Copyright (C) 2011 Google Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -24,11 +24,11 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "core/dom/ElementShadowV0.h"
+#include "core/dom/ShadowRootV0.h"
 
-#include "core/dom/DistributedNodes.h"
-#include "core/dom/ElementShadow.h"
 #include "core/dom/ElementTraversal.h"
+#include "core/dom/ShadowRoot.h"
+#include "core/dom/V0InsertionPoint.h"
 #include "core/html/HTMLContentElement.h"
 #include "core/html/HTMLShadowElement.h"
 #include "core/probe/CoreProbes.h"
@@ -42,7 +42,7 @@
   explicit DistributionPool(const ContainerNode&);
   void Clear();
   ~DistributionPool();
-  void DistributeTo(V0InsertionPoint*, ElementShadowV0*);
+  void DistributeTo(V0InsertionPoint*, ShadowRoot*);
   void PopulateChildren(const ContainerNode&);
 
  private:
@@ -81,7 +81,7 @@
 }
 
 void DistributionPool::DistributeTo(V0InsertionPoint* insertion_point,
-                                    ElementShadowV0* element_shadow) {
+                                    ShadowRoot* shadow_root) {
   DistributedNodes distributed_nodes;
 
   for (size_t i = 0; i < nodes_.size(); ++i) {
@@ -94,7 +94,7 @@
 
     Node* node = nodes_[i];
     distributed_nodes.Append(node);
-    element_shadow->DidDistributeNode(node, insertion_point);
+    shadow_root->V0().DidDistributeNode(node, insertion_point);
     distributed_[i] = true;
   }
 
@@ -104,7 +104,7 @@
     for (Node* fallback_node = insertion_point->firstChild(); fallback_node;
          fallback_node = fallback_node->nextSibling()) {
       distributed_nodes.Append(fallback_node);
-      element_shadow->DidDistributeNode(fallback_node, insertion_point);
+      shadow_root->V0().DidDistributeNode(fallback_node, insertion_point);
     }
   }
   insertion_point->SetDistributedNodes(distributed_nodes);
@@ -123,20 +123,28 @@
   }
 }
 
-ElementShadowV0* ElementShadowV0::Create(ElementShadow& element_shadow) {
-  return new ElementShadowV0(element_shadow);
+const HeapVector<Member<V0InsertionPoint>>&
+ShadowRootV0::DescendantInsertionPoints() {
+  DEFINE_STATIC_LOCAL(HeapVector<Member<V0InsertionPoint>>, empty_list,
+                      (new HeapVector<Member<V0InsertionPoint>>));
+  if (descendant_insertion_points_is_valid_)
+    return descendant_insertion_points_;
+
+  descendant_insertion_points_is_valid_ = true;
+
+  if (!ContainsInsertionPoints())
+    return empty_list;
+
+  HeapVector<Member<V0InsertionPoint>> insertion_points;
+  for (V0InsertionPoint& insertion_point :
+       Traversal<V0InsertionPoint>::DescendantsOf(GetShadowRoot()))
+    insertion_points.push_back(&insertion_point);
+
+  descendant_insertion_points_.swap(insertion_points);
+  return descendant_insertion_points_;
 }
 
-ElementShadowV0::ElementShadowV0(ElementShadow& element_shadow)
-    : element_shadow_(&element_shadow), needs_select_feature_set_(false) {}
-
-ElementShadowV0::~ElementShadowV0() = default;
-
-inline ShadowRoot& ElementShadowV0::GetShadowRoot() const {
-  return element_shadow_->GetShadowRoot();
-}
-
-const V0InsertionPoint* ElementShadowV0::FinalDestinationInsertionPointFor(
+const V0InsertionPoint* ShadowRootV0::FinalDestinationInsertionPointFor(
     const Node* key) const {
   DCHECK(key);
   DCHECK(!key->NeedsDistributionRecalc());
@@ -145,8 +153,8 @@
   return it == node_to_insertion_points_.end() ? nullptr : it->value->back();
 }
 
-const DestinationInsertionPoints*
-ElementShadowV0::DestinationInsertionPointsFor(const Node* key) const {
+const DestinationInsertionPoints* ShadowRootV0::DestinationInsertionPointsFor(
+    const Node* key) const {
   DCHECK(key);
   DCHECK(!key->NeedsDistributionRecalc());
   NodeToDestinationInsertionPoints::const_iterator it =
@@ -154,38 +162,38 @@
   return it == node_to_insertion_points_.end() ? nullptr : it->value;
 }
 
-void ElementShadowV0::Distribute() {
-  DistributionPool pool(element_shadow_->Host());
+void ShadowRootV0::Distribute() {
+  DistributionPool pool(GetShadowRoot().host());
   HTMLShadowElement* shadow_insertion_point = nullptr;
 
-  for (const auto& point : GetShadowRoot().DescendantInsertionPoints()) {
+  for (const auto& point : DescendantInsertionPoints()) {
     if (!point->IsActive())
       continue;
     if (auto* shadow = ToHTMLShadowElementOrNull(*point)) {
       DCHECK(!shadow_insertion_point);
       shadow_insertion_point = shadow;
     } else {
-      pool.DistributeTo(point, this);
-      if (ElementShadow* shadow =
-              ShadowWhereNodeCanBeDistributedForV0(*point)) {
+      pool.DistributeTo(point, &GetShadowRoot());
+      if (ShadowRoot* shadow_root =
+              ShadowRootWhereNodeCanBeDistributedForV0(*point)) {
         if (!(RuntimeEnabledFeatures::IncrementalShadowDOMEnabled() &&
-              shadow->IsV1()))
-          shadow->SetNeedsDistributionRecalc();
+              shadow_root->IsV1()))
+          shadow_root->SetNeedsDistributionRecalc();
       }
     }
   }
 
   if (shadow_insertion_point) {
-    pool.DistributeTo(shadow_insertion_point, this);
-    if (ElementShadow* shadow =
-            ShadowWhereNodeCanBeDistributedForV0(*shadow_insertion_point))
-      shadow->SetNeedsDistributionRecalc();
+    pool.DistributeTo(shadow_insertion_point, &GetShadowRoot());
+    if (ShadowRoot* shadow_root =
+            ShadowRootWhereNodeCanBeDistributedForV0(*shadow_insertion_point))
+      shadow_root->SetNeedsDistributionRecalc();
   }
-  probe::didPerformElementShadowDistribution(&element_shadow_->Host());
+  probe::didPerformElementShadowDistribution(&GetShadowRoot().host());
 }
 
-void ElementShadowV0::DidDistributeNode(const Node* node,
-                                        V0InsertionPoint* insertion_point) {
+void ShadowRootV0::DidDistributeNode(const Node* node,
+                                     V0InsertionPoint* insertion_point) {
   NodeToDestinationInsertionPoints::AddResult result =
       node_to_insertion_points_.insert(node, nullptr);
   if (result.is_new_entry)
@@ -193,50 +201,43 @@
   result.stored_value->value->push_back(insertion_point);
 }
 
-const SelectRuleFeatureSet& ElementShadowV0::EnsureSelectFeatureSet() {
+void ShadowRootV0::ClearDistribution() {
+  node_to_insertion_points_.clear();
+}
+
+void ShadowRootV0::WillAffectSelector() {
+  for (ShadowRoot* shadow_root = &GetShadowRoot(); shadow_root;
+       shadow_root = shadow_root->host().ContainingShadowRoot()) {
+    if (shadow_root->IsV1() || shadow_root->V0().NeedsSelectFeatureSet())
+      break;
+    shadow_root->V0().SetNeedsSelectFeatureSet();
+  }
+  GetShadowRoot().SetNeedsDistributionRecalc();
+}
+
+const SelectRuleFeatureSet& ShadowRootV0::EnsureSelectFeatureSet() {
   if (!needs_select_feature_set_)
     return select_features_;
 
   select_features_.Clear();
-  CollectSelectFeatureSetFrom(GetShadowRoot());
+  CollectSelectFeatureSetFrom();
   needs_select_feature_set_ = false;
-  return select_features_;
+  return SelectFeatures();
 }
 
-void ElementShadowV0::CollectSelectFeatureSetFrom(const ShadowRoot& root) {
-  if (!root.ContainsShadowRoots() && !root.ContainsContentElements())
+void ShadowRootV0::CollectSelectFeatureSetFrom() {
+  if (!GetShadowRoot().ContainsShadowRoots() && !ContainsContentElements())
     return;
 
-  for (Element& element : ElementTraversal::DescendantsOf(root)) {
-    if (ElementShadow* shadow = element.Shadow()) {
-      if (!shadow->IsV1())
-        select_features_.Add(shadow->V0().EnsureSelectFeatureSet());
+  auto& select_features = select_features_;
+  for (Element& element : ElementTraversal::DescendantsOf(GetShadowRoot())) {
+    if (ShadowRoot* shadow_root = element.GetShadowRoot()) {
+      if (!shadow_root->IsV1())
+        select_features.Add(shadow_root->V0().EnsureSelectFeatureSet());
     }
     if (auto* content = ToHTMLContentElementOrNull(element))
-      select_features_.CollectFeaturesFromSelectorList(content->SelectorList());
+      select_features.CollectFeaturesFromSelectorList(content->SelectorList());
   }
 }
 
-void ElementShadowV0::WillAffectSelector() {
-  for (ElementShadow* shadow = element_shadow_; shadow;
-       shadow = shadow->ContainingShadow()) {
-    if (shadow->IsV1() || shadow->V0().NeedsSelectFeatureSet())
-      break;
-    shadow->V0().SetNeedsSelectFeatureSet();
-  }
-  element_shadow_->SetNeedsDistributionRecalc();
-}
-
-void ElementShadowV0::ClearDistribution() {
-  node_to_insertion_points_.clear();
-}
-
-void ElementShadowV0::Trace(blink::Visitor* visitor) {
-  visitor->Trace(element_shadow_);
-  visitor->Trace(node_to_insertion_points_);
-}
-
-void ElementShadowV0::TraceWrappers(
-    const ScriptWrappableVisitor* visitor) const {}
-
 }  // namespace blink
diff --git a/third_party/WebKit/Source/core/dom/ShadowRootV0.h b/third_party/WebKit/Source/core/dom/ShadowRootV0.h
new file mode 100644
index 0000000..10f4a7c
--- /dev/null
+++ b/third_party/WebKit/Source/core/dom/ShadowRootV0.h
@@ -0,0 +1,141 @@
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ShadowRootV0_h
+#define ShadowRootV0_h
+
+#include "core/css/SelectRuleFeatureSet.h"
+#include "core/dom/V0InsertionPoint.h"
+#include "platform/wtf/Vector.h"
+
+namespace blink {
+
+class CORE_EXPORT ShadowRootV0 final
+    : public GarbageCollectedFinalized<ShadowRootV0> {
+ public:
+  using NodeToDestinationInsertionPoints =
+      HeapHashMap<Member<const Node>, Member<DestinationInsertionPoints>>;
+
+  explicit ShadowRootV0(ShadowRoot& shadow_root) : shadow_root_(&shadow_root) {}
+
+  bool ContainsShadowElements() const {
+    return descendant_shadow_element_count_;
+  }
+  bool ContainsContentElements() const {
+    return descendant_content_element_count_;
+  }
+  bool ContainsInsertionPoints() const {
+    return ContainsShadowElements() || ContainsContentElements();
+  }
+
+  unsigned DescendantShadowElementCount() const {
+    return descendant_shadow_element_count_;
+  }
+  void DidAddInsertionPoint(V0InsertionPoint*);
+  void DidRemoveInsertionPoint(V0InsertionPoint*);
+
+  const HeapVector<Member<V0InsertionPoint>>& DescendantInsertionPoints();
+  void InvalidateDescendantInsertionPoints();
+
+  const V0InsertionPoint* FinalDestinationInsertionPointFor(
+      const Node* key) const;
+  const DestinationInsertionPoints* DestinationInsertionPointsFor(
+      const Node* key) const;
+
+  void Distribute();
+  void DidDistributeNode(const Node*, V0InsertionPoint*);
+  void ClearDistribution();
+
+  void WillAffectSelector();
+  const SelectRuleFeatureSet& EnsureSelectFeatureSet();
+  void CollectSelectFeatureSetFrom();
+  bool NeedsSelectFeatureSet() const { return needs_select_feature_set_; }
+  void SetNeedsSelectFeatureSet() { needs_select_feature_set_ = true; }
+  SelectRuleFeatureSet& SelectFeatures() { return select_features_; }
+
+  void Trace(blink::Visitor* visitor) {
+    visitor->Trace(shadow_root_);
+    visitor->Trace(descendant_insertion_points_);
+    visitor->Trace(node_to_insertion_points_);
+  }
+
+  void TraceWrappers(const ScriptWrappableVisitor* visitor) const {
+    visitor->TraceWrappers(shadow_root_);
+  }
+
+ private:
+  ShadowRoot& GetShadowRoot() const { return *shadow_root_; }
+
+  TraceWrapperMember<ShadowRoot> shadow_root_;
+  unsigned descendant_shadow_element_count_ = 0;
+  unsigned descendant_content_element_count_ = 0;
+  HeapVector<Member<V0InsertionPoint>> descendant_insertion_points_;
+
+  NodeToDestinationInsertionPoints node_to_insertion_points_;
+  SelectRuleFeatureSet select_features_;
+  bool needs_select_feature_set_ = false;
+  bool descendant_insertion_points_is_valid_ = false;
+
+  DISALLOW_COPY_AND_ASSIGN(ShadowRootV0);
+};
+
+inline void ShadowRootV0::DidAddInsertionPoint(V0InsertionPoint* point) {
+  DCHECK(point);
+  if (IsHTMLShadowElement(*point))
+    ++descendant_shadow_element_count_;
+  else if (IsHTMLContentElement(*point))
+    ++descendant_content_element_count_;
+  else
+    NOTREACHED();
+  InvalidateDescendantInsertionPoints();
+}
+
+inline void ShadowRootV0::DidRemoveInsertionPoint(V0InsertionPoint* point) {
+  DCHECK(point);
+  if (IsHTMLShadowElement(*point)) {
+    DCHECK_GT(descendant_shadow_element_count_, 0u);
+    --descendant_shadow_element_count_;
+  } else if (IsHTMLContentElement(*point)) {
+    DCHECK_GT(descendant_content_element_count_, 0u);
+    --descendant_content_element_count_;
+  } else {
+    NOTREACHED();
+  }
+  InvalidateDescendantInsertionPoints();
+}
+
+inline void ShadowRootV0::InvalidateDescendantInsertionPoints() {
+  descendant_insertion_points_is_valid_ = false;
+  descendant_insertion_points_.clear();
+}
+
+}  // namespace blink
+
+#endif
diff --git a/third_party/WebKit/Source/core/dom/SlotAssignment.cpp b/third_party/WebKit/Source/core/dom/SlotAssignment.cpp
index 0a10668..0e7e89e 100644
--- a/third_party/WebKit/Source/core/dom/SlotAssignment.cpp
+++ b/third_party/WebKit/Source/core/dom/SlotAssignment.cpp
@@ -4,12 +4,12 @@
 
 #include "core/dom/SlotAssignment.h"
 
-#include "core/dom/ElementShadow.h"
 #include "core/dom/ElementTraversal.h"
 #include "core/dom/Node.h"
 #include "core/dom/NodeTraversal.h"
 #include "core/dom/ShadowRoot.h"
 #include "core/dom/V0InsertionPoint.h"
+#include "core/dom/ng/slot_assignment_engine.h"
 #include "core/html/HTMLDetailsElement.h"
 #include "core/html/HTMLSlotElement.h"
 #include "core/html/forms/HTMLOptGroupElement.h"
@@ -204,6 +204,15 @@
   DCHECK(owner.IsV1());
 }
 
+void SlotAssignment::SetNeedsAssignmentRecalc() {
+  DCHECK(RuntimeEnabledFeatures::IncrementalShadowDOMEnabled());
+  needs_assignment_recalc_ = true;
+  if (owner_->isConnected()) {
+    owner_->GetDocument().GetSlotAssignmentEngine().AddShadowRootNeedingRecalc(
+        *owner_);
+  }
+}
+
 void SlotAssignment::RecalcAssignmentNg() {
   DCHECK(RuntimeEnabledFeatures::IncrementalShadowDOMEnabled());
 
@@ -228,6 +237,8 @@
   for (Node& child : NodeTraversal::ChildrenOf(owner_->host())) {
     if (!child.IsSlotable())
       continue;
+    // TODO(hayato): Avoid unconditional LazyReattach
+    child.LazyReattachIfAttached();
 
     HTMLSlotElement* slot = nullptr;
     if (!is_user_agent) {
@@ -243,6 +254,18 @@
     if (slot)
       slot->AppendAssignedNode(child);
   }
+
+  // TODO(hayato): Avoid unconditional LazyReattach
+  for (Member<HTMLSlotElement> slot : Slots()) {
+    for (Node& child : NodeTraversal::ChildrenOf(*slot))
+      child.LazyReattachIfAttached();
+  }
+
+  if (owner_->isConnected()) {
+    owner_->GetDocument()
+        .GetSlotAssignmentEngine()
+        .RemoveShadowRootNeedingRecalc(*owner_);
+  }
 }
 
 void SlotAssignment::RecalcAssignment() {
diff --git a/third_party/WebKit/Source/core/dom/SlotAssignment.h b/third_party/WebKit/Source/core/dom/SlotAssignment.h
index 93efc56..9178451 100644
--- a/third_party/WebKit/Source/core/dom/SlotAssignment.h
+++ b/third_party/WebKit/Source/core/dom/SlotAssignment.h
@@ -48,16 +48,15 @@
 
   bool FindHostChildBySlotName(const AtomicString& slot_name) const;
 
-  void SetNeedsAssignmentRecalc() {
-    DCHECK(RuntimeEnabledFeatures::IncrementalShadowDOMEnabled());
-    needs_assignment_recalc_ = true;
-  }
+  void SetNeedsAssignmentRecalc();
 
   // For Incremental Shadow DOM
   void RecalcAssignmentNg();
 
   void Trace(blink::Visitor*);
 
+  bool NeedsAssignmentRecalc() const { return needs_assignment_recalc_; }
+
  private:
   explicit SlotAssignment(ShadowRoot& owner);
 
diff --git a/third_party/WebKit/Source/core/dom/TreeScope.cpp b/third_party/WebKit/Source/core/dom/TreeScope.cpp
index 212c2bf..c0a6e2f0 100644
--- a/third_party/WebKit/Source/core/dom/TreeScope.cpp
+++ b/third_party/WebKit/Source/core/dom/TreeScope.cpp
@@ -31,7 +31,6 @@
 #include "core/dom/ContainerNode.h"
 #include "core/dom/Document.h"
 #include "core/dom/Element.h"
-#include "core/dom/ElementShadow.h"
 #include "core/dom/ElementTraversal.h"
 #include "core/dom/IdTargetObserverRegistry.h"
 #include "core/dom/NodeComputedStyle.h"
diff --git a/third_party/WebKit/Source/core/dom/TreeScopeAdopter.cpp b/third_party/WebKit/Source/core/dom/TreeScopeAdopter.cpp
index 31eca96..50852c0 100644
--- a/third_party/WebKit/Source/core/dom/TreeScopeAdopter.cpp
+++ b/third_party/WebKit/Source/core/dom/TreeScopeAdopter.cpp
@@ -28,7 +28,6 @@
 
 #include "core/dom/Attr.h"
 #include "core/dom/Document.h"
-#include "core/dom/ElementShadow.h"
 #include "core/dom/Node.h"
 #include "core/dom/NodeListsNodeData.h"
 #include "core/dom/NodeRareData.h"
diff --git a/third_party/WebKit/Source/core/dom/V0InsertionPoint.cpp b/third_party/WebKit/Source/core/dom/V0InsertionPoint.cpp
index 421914c1..88ee7e2 100644
--- a/third_party/WebKit/Source/core/dom/V0InsertionPoint.cpp
+++ b/third_party/WebKit/Source/core/dom/V0InsertionPoint.cpp
@@ -31,10 +31,10 @@
 #include "core/dom/V0InsertionPoint.h"
 
 #include "core/css/StyleChangeReason.h"
-#include "core/dom/ElementShadow.h"
-#include "core/dom/ElementShadowV0.h"
 #include "core/dom/ElementTraversal.h"
 #include "core/dom/QualifiedName.h"
+#include "core/dom/ShadowRoot.h"
+#include "core/dom/ShadowRootV0.h"
 #include "core/dom/StaticNodeList.h"
 #include "core/dom/WhitespaceAttacher.h"
 #include "core/html_names.h"
@@ -171,12 +171,12 @@
   ShadowRoot* shadow_root = ContainingShadowRoot();
   DCHECK(shadow_root);
   if (!IsHTMLShadowElement(*this) ||
-      shadow_root->DescendantShadowElementCount() <= 1)
+      shadow_root->V0().DescendantShadowElementCount() <= 1)
     return true;
 
   // Slow path only when there are more than one shadow elements in a shadow
   // tree. That should be a rare case.
-  for (const auto& point : shadow_root->DescendantInsertionPoints()) {
+  for (const auto& point : shadow_root->V0().DescendantInsertionPoints()) {
     if (IsHTMLShadowElement(*point))
       return point == this;
   }
@@ -205,11 +205,9 @@
 void V0InsertionPoint::ChildrenChanged(const ChildrenChange& change) {
   HTMLElement::ChildrenChanged(change);
   if (ShadowRoot* root = ContainingShadowRoot()) {
-    if (ElementShadow* root_owner = root->Owner()) {
-      if (!(RuntimeEnabledFeatures::IncrementalShadowDOMEnabled() &&
-            root_owner->IsV1()))
-        root_owner->SetNeedsDistributionRecalc();
-    }
+    if (!(RuntimeEnabledFeatures::IncrementalShadowDOMEnabled() &&
+          root->IsV1()))
+      root->SetNeedsDistributionRecalc();
   }
 }
 
@@ -218,17 +216,15 @@
   HTMLElement::InsertedInto(insertion_point);
   if (ShadowRoot* root = ContainingShadowRoot()) {
     if (!root->IsV1()) {
-      if (ElementShadow* root_owner = root->Owner()) {
-        if (!(RuntimeEnabledFeatures::IncrementalShadowDOMEnabled() &&
-              root_owner->IsV1()))
-          root_owner->SetNeedsDistributionRecalc();
-        if (CanBeActive() && !registered_with_shadow_root_ &&
-            insertion_point->GetTreeScope().RootNode() == root) {
-          registered_with_shadow_root_ = true;
-          root->DidAddInsertionPoint(this);
-          if (CanAffectSelector())
-            root_owner->V0().WillAffectSelector();
-        }
+      if (!(RuntimeEnabledFeatures::IncrementalShadowDOMEnabled() &&
+            root->IsV1()))
+        root->SetNeedsDistributionRecalc();
+      if (CanBeActive() && !registered_with_shadow_root_ &&
+          insertion_point->GetTreeScope().RootNode() == root) {
+        registered_with_shadow_root_ = true;
+        root->V0().DidAddInsertionPoint(this);
+        if (CanAffectSelector())
+          root->V0().WillAffectSelector();
       }
     }
   }
@@ -245,12 +241,9 @@
   if (!root)
     root = insertion_point->ContainingShadowRoot();
 
-  // host can be null when removedFrom() is called from ElementShadow
-  // destructor.
-  ElementShadow* root_owner = root ? root->Owner() : nullptr;
-  if (root_owner && !(RuntimeEnabledFeatures::IncrementalShadowDOMEnabled() &&
-                      root_owner->IsV1()))
-    root_owner->SetNeedsDistributionRecalc();
+  if (root &&
+      !(RuntimeEnabledFeatures::IncrementalShadowDOMEnabled() && root->IsV1()))
+    root->SetNeedsDistributionRecalc();
 
   // Since this insertion point is no longer visible from the shadow subtree, it
   // need to clean itself up.
@@ -260,11 +253,9 @@
       insertion_point->GetTreeScope().RootNode() == root) {
     DCHECK(root);
     registered_with_shadow_root_ = false;
-    root->DidRemoveInsertionPoint(this);
-    if (!root->IsV1() && root_owner) {
-      if (CanAffectSelector())
-        root_owner->V0().WillAffectSelector();
-    }
+    root->V0().DidRemoveInsertionPoint(this);
+    if (!root->IsV1() && CanAffectSelector())
+      root->V0().WillAffectSelector();
   }
 
   HTMLElement::RemovedFrom(insertion_point);
@@ -279,14 +270,15 @@
   DCHECK(projected_node);
   const V0InsertionPoint* insertion_point = nullptr;
   const Node* current = projected_node;
-  ElementShadow* last_element_shadow = nullptr;
+  ShadowRoot* last_shadow_root = nullptr;
   while (true) {
-    ElementShadow* shadow = ShadowWhereNodeCanBeDistributedForV0(*current);
-    if (!shadow || shadow->IsV1() || shadow == last_element_shadow)
+    ShadowRoot* shadow_root =
+        ShadowRootWhereNodeCanBeDistributedForV0(*current);
+    if (!shadow_root || shadow_root->IsV1() || shadow_root == last_shadow_root)
       break;
-    last_element_shadow = shadow;
+    last_shadow_root = shadow_root;
     const V0InsertionPoint* inserted_to =
-        shadow->V0().FinalDestinationInsertionPointFor(projected_node);
+        shadow_root->V0().FinalDestinationInsertionPointFor(projected_node);
     if (!inserted_to)
       break;
     DCHECK_NE(current, inserted_to);
@@ -300,14 +292,15 @@
     const Node& node,
     HeapVector<Member<V0InsertionPoint>, 8>& results) {
   const Node* current = &node;
-  ElementShadow* last_element_shadow = nullptr;
+  ShadowRoot* last_shadow_root = nullptr;
   while (true) {
-    ElementShadow* shadow = ShadowWhereNodeCanBeDistributedForV0(*current);
-    if (!shadow || shadow->IsV1() || shadow == last_element_shadow)
+    ShadowRoot* shadow_root =
+        ShadowRootWhereNodeCanBeDistributedForV0(*current);
+    if (!shadow_root || shadow_root->IsV1() || shadow_root == last_shadow_root)
       return;
-    last_element_shadow = shadow;
+    last_shadow_root = shadow_root;
     const DestinationInsertionPoints* insertion_points =
-        shadow->V0().DestinationInsertionPointsFor(&node);
+        shadow_root->V0().DestinationInsertionPointsFor(&node);
     if (!insertion_points)
       return;
     for (size_t i = 0; i < insertion_points->size(); ++i)
diff --git a/third_party/WebKit/Source/core/dom/V0InsertionPoint.h b/third_party/WebKit/Source/core/dom/V0InsertionPoint.h
index f70526c..c29879c 100644
--- a/third_party/WebKit/Source/core/dom/V0InsertionPoint.h
+++ b/third_party/WebKit/Source/core/dom/V0InsertionPoint.h
@@ -34,7 +34,6 @@
 #include "core/CoreExport.h"
 #include "core/css/CSSSelectorList.h"
 #include "core/dom/DistributedNodes.h"
-#include "core/dom/ShadowRoot.h"
 #include "core/html/HTMLElement.h"
 
 namespace blink {
@@ -94,7 +93,7 @@
   bool registered_with_shadow_root_;
 };
 
-typedef HeapVector<Member<V0InsertionPoint>, 1> DestinationInsertionPoints;
+using DestinationInsertionPoints = HeapVector<Member<V0InsertionPoint>, 1>;
 
 DEFINE_ELEMENT_TYPE_CASTS(V0InsertionPoint, IsV0InsertionPoint());
 
@@ -102,14 +101,14 @@
   return node.IsV0InsertionPoint() && ToV0InsertionPoint(node).IsActive();
 }
 
-inline ElementShadow* ShadowWhereNodeCanBeDistributedForV0(const Node& node) {
+inline ShadowRoot* ShadowRootWhereNodeCanBeDistributedForV0(const Node& node) {
   Node* parent = node.parentNode();
   if (!parent)
     return nullptr;
   if (IsActiveV0InsertionPoint(*parent))
-    return node.OwnerShadowHost()->Shadow();
+    return node.ContainingShadowRoot();
   if (parent->IsElementNode())
-    return ToElement(parent)->Shadow();
+    return ToElement(parent)->GetShadowRoot();
   return nullptr;
 }
 
diff --git a/third_party/WebKit/Source/core/dom/VisitedLinkState.cpp b/third_party/WebKit/Source/core/dom/VisitedLinkState.cpp
index 34d1b69b..e067d457 100644
--- a/third_party/WebKit/Source/core/dom/VisitedLinkState.cpp
+++ b/third_party/WebKit/Source/core/dom/VisitedLinkState.cpp
@@ -30,7 +30,6 @@
 
 #include "core/dom/VisitedLinkState.h"
 
-#include "core/dom/ElementShadow.h"
 #include "core/dom/ElementTraversal.h"
 #include "core/dom/ShadowRoot.h"
 #include "core/html/HTMLAnchorElement.h"
diff --git a/third_party/WebKit/Source/core/dom/ng/flat_tree_traversal_ng.cc b/third_party/WebKit/Source/core/dom/ng/flat_tree_traversal_ng.cc
index eafaf16..cc4cc97a 100644
--- a/third_party/WebKit/Source/core/dom/ng/flat_tree_traversal_ng.cc
+++ b/third_party/WebKit/Source/core/dom/ng/flat_tree_traversal_ng.cc
@@ -27,7 +27,6 @@
 #include "core/dom/ng/flat_tree_traversal_ng.h"
 
 #include "core/dom/Element.h"
-#include "core/dom/ElementShadow.h"
 #include "core/html/HTMLShadowElement.h"
 #include "core/html/HTMLSlotElement.h"
 
@@ -113,7 +112,7 @@
   if (node.IsChildOfV1ShadowHost())
     return TraverseSiblingsForV1HostChild(node, direction);
 
-  if (ShadowWhereNodeCanBeDistributedForV0(node))
+  if (ShadowRootWhereNodeCanBeDistributedForV0(node))
     return TraverseSiblingsForV0Distribution(node, direction);
 
   Node* sibling = direction == kTraversalDirectionForward
@@ -182,20 +181,20 @@
   if (CanBeDistributedToV0InsertionPoint(node))
     return TraverseParentForV0(node, details);
 
-  DCHECK(!ShadowWhereNodeCanBeDistributedForV0(node));
+  DCHECK(!ShadowRootWhereNodeCanBeDistributedForV0(node));
   return TraverseParentOrHost(node);
 }
 
 ContainerNode* FlatTreeTraversalNg::TraverseParentForV0(
     const Node& node,
     ParentTraversalDetails* details) {
-  if (ShadowWhereNodeCanBeDistributedForV0(node)) {
+  if (ShadowRootWhereNodeCanBeDistributedForV0(node)) {
     if (const V0InsertionPoint* insertion_point = ResolveReprojection(&node)) {
       if (details)
         details->DidTraverseInsertionPoint(insertion_point);
       // The node is distributed. But the distribution was stopped at this
       // insertion point.
-      if (ShadowWhereNodeCanBeDistributedForV0(*insertion_point))
+      if (ShadowRootWhereNodeCanBeDistributedForV0(*insertion_point))
         return nullptr;
       return TraverseParent(*insertion_point);
     }
diff --git a/third_party/WebKit/Source/core/dom/ng/slot_assignment_engine.cc b/third_party/WebKit/Source/core/dom/ng/slot_assignment_engine.cc
new file mode 100644
index 0000000..a2cd2f13
--- /dev/null
+++ b/third_party/WebKit/Source/core/dom/ng/slot_assignment_engine.cc
@@ -0,0 +1,58 @@
+// 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 "core/dom/ng/slot_assignment_engine.h"
+
+#include "core/dom/ShadowRoot.h"
+#include "core/dom/SlotAssignment.h"
+
+namespace blink {
+
+SlotAssignmentEngine::SlotAssignmentEngine() {}
+
+void SlotAssignmentEngine::AddShadowRootNeedingRecalc(ShadowRoot& shadow_root) {
+  DCHECK(shadow_root.isConnected());
+  DCHECK(shadow_root.NeedsSlotAssignmentRecalc());
+  shadow_roots_needing_recalc_.insert(&shadow_root);
+}
+
+void SlotAssignmentEngine::RemoveShadowRootNeedingRecalc(
+    ShadowRoot& shadow_root) {
+  DCHECK(shadow_root.isConnected());
+  DCHECK(!shadow_root.NeedsSlotAssignmentRecalc());
+  DCHECK(shadow_roots_needing_recalc_.Contains(&shadow_root));
+  shadow_roots_needing_recalc_.erase(&shadow_root);
+}
+
+void SlotAssignmentEngine::Connected(ShadowRoot& shadow_root) {
+  if (shadow_root.NeedsSlotAssignmentRecalc())
+    AddShadowRootNeedingRecalc(shadow_root);
+}
+
+void SlotAssignmentEngine::Disconnected(ShadowRoot& shadow_root) {
+  if (shadow_root.NeedsSlotAssignmentRecalc()) {
+    DCHECK(shadow_roots_needing_recalc_.Contains(&shadow_root));
+    shadow_roots_needing_recalc_.erase(&shadow_root);
+  } else {
+    DCHECK(!shadow_roots_needing_recalc_.Contains(&shadow_root));
+  }
+}
+
+void SlotAssignmentEngine::RecalcSlotAssignments() {
+  for (auto& shadow_root :
+       HeapHashSet<WeakMember<ShadowRoot>>(shadow_roots_needing_recalc_)) {
+    DCHECK(shadow_root->isConnected());
+    DCHECK(shadow_root->NeedsSlotAssignmentRecalc());
+    // SlotAssignment::RecalcAssignmentNg() will remove its shadow root from
+    // shadow_roots_needing_recalc_.
+    shadow_root->GetSlotAssignment().RecalcAssignmentNg();
+  }
+  DCHECK(shadow_roots_needing_recalc_.IsEmpty());
+}
+
+void SlotAssignmentEngine::Trace(blink::Visitor* visitor) {
+  visitor->Trace(shadow_roots_needing_recalc_);
+}
+
+}  // namespace blink
diff --git a/third_party/WebKit/Source/core/dom/ng/slot_assignment_engine.h b/third_party/WebKit/Source/core/dom/ng/slot_assignment_engine.h
new file mode 100644
index 0000000..564b4e32
--- /dev/null
+++ b/third_party/WebKit/Source/core/dom/ng/slot_assignment_engine.h
@@ -0,0 +1,37 @@
+// 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 slot_assignment_engine_h
+#define slot_assignment_engine_h
+
+#include "platform/heap/Handle.h"
+
+namespace blink {
+
+class ShadowRoot;
+
+class SlotAssignmentEngine final
+    : public GarbageCollected<SlotAssignmentEngine> {
+ public:
+  static SlotAssignmentEngine* Create() { return new SlotAssignmentEngine(); }
+
+  void AddShadowRootNeedingRecalc(ShadowRoot&);
+  void RemoveShadowRootNeedingRecalc(ShadowRoot&);
+
+  void Connected(ShadowRoot&);
+  void Disconnected(ShadowRoot&);
+
+  void RecalcSlotAssignments();
+
+  void Trace(blink::Visitor*);
+
+ private:
+  explicit SlotAssignmentEngine();
+
+  HeapHashSet<WeakMember<ShadowRoot>> shadow_roots_needing_recalc_;
+};
+
+}  // namespace blink
+
+#endif
diff --git a/third_party/WebKit/Source/core/editing/BUILD.gn b/third_party/WebKit/Source/core/editing/BUILD.gn
index 87451bd..33ae5d1 100644
--- a/third_party/WebKit/Source/core/editing/BUILD.gn
+++ b/third_party/WebKit/Source/core/editing/BUILD.gn
@@ -147,6 +147,8 @@
     "commands/InsertTextCommand.h",
     "commands/MergeIdenticalElementsCommand.cpp",
     "commands/MergeIdenticalElementsCommand.h",
+    "commands/MoveCommands.cpp",
+    "commands/MoveCommands.h",
     "commands/RemoveCSSPropertyCommand.cpp",
     "commands/RemoveCSSPropertyCommand.h",
     "commands/RemoveFormatCommand.cpp",
diff --git a/third_party/WebKit/Source/core/editing/EditingBehavior.h b/third_party/WebKit/Source/core/editing/EditingBehavior.h
index 023555b..9e7a0778 100644
--- a/third_party/WebKit/Source/core/editing/EditingBehavior.h
+++ b/third_party/WebKit/Source/core/editing/EditingBehavior.h
@@ -107,6 +107,14 @@
     return type_ == kEditingMacBehavior;
   }
 
+  // On Mac, backspacing at the start of a blocks merges with the
+  // previous table block, as we do with regular blocks. On other
+  // platforms backspace event does nothing if the block above is a
+  // table, but allows mergin otherwise.
+  bool ShouldMergeContentWithTablesOnBackspace() const {
+    return type_ == kEditingMacBehavior;
+  }
+
   // Support for global selections, used on platforms like the X Window
   // System that treat selection as a type of clipboard.
   bool SupportsGlobalSelection() const {
diff --git a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
index 99f7566a..680ef78 100644
--- a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
@@ -54,6 +54,7 @@
 #include "core/editing/commands/FormatBlockCommand.h"
 #include "core/editing/commands/IndentOutdentCommand.h"
 #include "core/editing/commands/InsertCommands.h"
+#include "core/editing/commands/MoveCommands.h"
 #include "core/editing/commands/RemoveFormatCommand.h"
 #include "core/editing/commands/TypingCommand.h"
 #include "core/editing/commands/UnlinkCommand.h"
@@ -64,7 +65,6 @@
 #include "core/html/HTMLFontElement.h"
 #include "core/html_names.h"
 #include "core/input/EventHandler.h"
-#include "core/layout/LayoutBox.h"
 #include "core/page/ChromeClient.h"
 #include "core/page/Page.h"
 #include "platform/Histogram.h"
@@ -643,31 +643,6 @@
              : EditingTriState::kFalse;
 }
 
-static unsigned VerticalScrollDistance(LocalFrame& frame) {
-  Element* focused_element = frame.GetDocument()->FocusedElement();
-  if (!focused_element)
-    return 0;
-  LayoutObject* layout_object = focused_element->GetLayoutObject();
-  if (!layout_object || !layout_object->IsBox())
-    return 0;
-  LayoutBox& layout_box = ToLayoutBox(*layout_object);
-  const ComputedStyle* style = layout_box.Style();
-  if (!style)
-    return 0;
-  if (!(style->OverflowY() == EOverflow::kScroll ||
-        style->OverflowY() == EOverflow::kAuto ||
-        HasEditableStyle(*focused_element)))
-    return 0;
-  ScrollableArea* scrollable_area =
-      frame.View()->LayoutViewportScrollableArea();
-  int height = std::min<int>(layout_box.ClientHeight().ToInt(),
-                             scrollable_area->VisibleHeight());
-  return static_cast<unsigned>(
-      max(max<int>(height * ScrollableArea::MinFractionToStepWhenPaging(),
-                   height - scrollable_area->MaxOverlapBetweenPages()),
-          1));
-}
-
 static EphemeralRange UnionEphemeralRanges(const EphemeralRange& range1,
                                            const EphemeralRange& range2) {
   const Position start_position =
@@ -1121,525 +1096,6 @@
   return true;
 }
 
-static bool ExecuteMoveBackward(LocalFrame& frame,
-                                Event*,
-                                EditorCommandSource,
-                                const String&) {
-  frame.Selection().Modify(SelectionModifyAlteration::kMove,
-                           SelectionModifyDirection::kBackward,
-                           TextGranularity::kCharacter, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveBackwardAndModifySelection(LocalFrame& frame,
-                                                  Event*,
-                                                  EditorCommandSource,
-                                                  const String&) {
-  frame.Selection().Modify(SelectionModifyAlteration::kExtend,
-                           SelectionModifyDirection::kBackward,
-                           TextGranularity::kCharacter, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveDown(LocalFrame& frame,
-                            Event*,
-                            EditorCommandSource,
-                            const String&) {
-  return frame.Selection().Modify(
-      SelectionModifyAlteration::kMove, SelectionModifyDirection::kForward,
-      TextGranularity::kLine, SetSelectionBy::kUser);
-}
-
-static bool ExecuteMoveDownAndModifySelection(LocalFrame& frame,
-                                              Event*,
-                                              EditorCommandSource,
-                                              const String&) {
-  frame.Selection().Modify(SelectionModifyAlteration::kExtend,
-                           SelectionModifyDirection::kForward,
-                           TextGranularity::kLine, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveForward(LocalFrame& frame,
-                               Event*,
-                               EditorCommandSource,
-                               const String&) {
-  frame.Selection().Modify(SelectionModifyAlteration::kMove,
-                           SelectionModifyDirection::kForward,
-                           TextGranularity::kCharacter, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveForwardAndModifySelection(LocalFrame& frame,
-                                                 Event*,
-                                                 EditorCommandSource,
-                                                 const String&) {
-  frame.Selection().Modify(SelectionModifyAlteration::kExtend,
-                           SelectionModifyDirection::kForward,
-                           TextGranularity::kCharacter, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveLeft(LocalFrame& frame,
-                            Event*,
-                            EditorCommandSource,
-                            const String&) {
-  return frame.Selection().Modify(
-      SelectionModifyAlteration::kMove, SelectionModifyDirection::kLeft,
-      TextGranularity::kCharacter, SetSelectionBy::kUser);
-}
-
-static bool ExecuteMoveLeftAndModifySelection(LocalFrame& frame,
-                                              Event*,
-                                              EditorCommandSource,
-                                              const String&) {
-  frame.Selection().Modify(SelectionModifyAlteration::kExtend,
-                           SelectionModifyDirection::kLeft,
-                           TextGranularity::kCharacter, SetSelectionBy::kUser);
-  return true;
-}
-
-// Returns true if selection is modified.
-bool ModifySelectionWithPageGranularity(
-    LocalFrame& frame,
-    SelectionModifyAlteration alter,
-    unsigned vertical_distance,
-    SelectionModifyVerticalDirection direction) {
-  SelectionModifier selection_modifier(
-      frame, frame.Selection().GetSelectionInDOMTree());
-  selection_modifier.SetSelectionIsDirectional(
-      frame.Selection().IsDirectional());
-  if (!selection_modifier.ModifyWithPageGranularity(alter, vertical_distance,
-                                                    direction)) {
-    return false;
-  }
-
-  frame.Selection().SetSelection(
-      selection_modifier.Selection().AsSelection(),
-      SetSelectionOptions::Builder()
-          .SetSetSelectionBy(SetSelectionBy::kUser)
-          .SetShouldCloseTyping(true)
-          .SetShouldClearTypingStyle(true)
-          .SetCursorAlignOnScroll(alter == SelectionModifyAlteration::kMove
-                                      ? CursorAlignOnScroll::kAlways
-                                      : CursorAlignOnScroll::kIfNeeded)
-          .SetIsDirectional(alter == SelectionModifyAlteration::kExtend ||
-                            frame.GetEditor()
-                                .Behavior()
-                                .ShouldConsiderSelectionAsDirectional())
-          .Build());
-  return true;
-}
-
-static bool ExecuteMovePageDown(LocalFrame& frame,
-                                Event*,
-                                EditorCommandSource,
-                                const String&) {
-  unsigned distance = VerticalScrollDistance(frame);
-  if (!distance)
-    return false;
-  return ModifySelectionWithPageGranularity(
-      frame, SelectionModifyAlteration::kMove, distance,
-      SelectionModifyVerticalDirection::kDown);
-}
-
-static bool ExecuteMovePageDownAndModifySelection(LocalFrame& frame,
-                                                  Event*,
-                                                  EditorCommandSource,
-                                                  const String&) {
-  unsigned distance = VerticalScrollDistance(frame);
-  if (!distance)
-    return false;
-  return ModifySelectionWithPageGranularity(
-      frame, SelectionModifyAlteration::kExtend, distance,
-      SelectionModifyVerticalDirection::kDown);
-}
-
-static bool ExecuteMovePageUp(LocalFrame& frame,
-                              Event*,
-                              EditorCommandSource,
-                              const String&) {
-  unsigned distance = VerticalScrollDistance(frame);
-  if (!distance)
-    return false;
-  return ModifySelectionWithPageGranularity(
-      frame, SelectionModifyAlteration::kMove, distance,
-      SelectionModifyVerticalDirection::kUp);
-}
-
-static bool ExecuteMovePageUpAndModifySelection(LocalFrame& frame,
-                                                Event*,
-                                                EditorCommandSource,
-                                                const String&) {
-  unsigned distance = VerticalScrollDistance(frame);
-  if (!distance)
-    return false;
-  return ModifySelectionWithPageGranularity(
-      frame, SelectionModifyAlteration::kExtend, distance,
-      SelectionModifyVerticalDirection::kUp);
-}
-
-static bool ExecuteMoveRight(LocalFrame& frame,
-                             Event*,
-                             EditorCommandSource,
-                             const String&) {
-  return frame.Selection().Modify(
-      SelectionModifyAlteration::kMove, SelectionModifyDirection::kRight,
-      TextGranularity::kCharacter, SetSelectionBy::kUser);
-}
-
-static bool ExecuteMoveRightAndModifySelection(LocalFrame& frame,
-                                               Event*,
-                                               EditorCommandSource,
-                                               const String&) {
-  frame.Selection().Modify(SelectionModifyAlteration::kExtend,
-                           SelectionModifyDirection::kRight,
-                           TextGranularity::kCharacter, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveToBeginningOfDocument(LocalFrame& frame,
-                                             Event*,
-                                             EditorCommandSource,
-                                             const String&) {
-  frame.Selection().Modify(
-      SelectionModifyAlteration::kMove, SelectionModifyDirection::kBackward,
-      TextGranularity::kDocumentBoundary, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveToBeginningOfDocumentAndModifySelection(
-    LocalFrame& frame,
-    Event*,
-    EditorCommandSource,
-    const String&) {
-  frame.Selection().Modify(
-      SelectionModifyAlteration::kExtend, SelectionModifyDirection::kBackward,
-      TextGranularity::kDocumentBoundary, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveToBeginningOfLine(LocalFrame& frame,
-                                         Event*,
-                                         EditorCommandSource,
-                                         const String&) {
-  frame.Selection().Modify(
-      SelectionModifyAlteration::kMove, SelectionModifyDirection::kBackward,
-      TextGranularity::kLineBoundary, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveToBeginningOfLineAndModifySelection(LocalFrame& frame,
-                                                           Event*,
-                                                           EditorCommandSource,
-                                                           const String&) {
-  frame.Selection().Modify(
-      SelectionModifyAlteration::kExtend, SelectionModifyDirection::kBackward,
-      TextGranularity::kLineBoundary, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveToBeginningOfParagraph(LocalFrame& frame,
-                                              Event*,
-                                              EditorCommandSource,
-                                              const String&) {
-  frame.Selection().Modify(
-      SelectionModifyAlteration::kMove, SelectionModifyDirection::kBackward,
-      TextGranularity::kParagraphBoundary, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveToBeginningOfParagraphAndModifySelection(
-    LocalFrame& frame,
-    Event*,
-    EditorCommandSource,
-    const String&) {
-  frame.Selection().Modify(
-      SelectionModifyAlteration::kExtend, SelectionModifyDirection::kBackward,
-      TextGranularity::kParagraphBoundary, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveToBeginningOfSentence(LocalFrame& frame,
-                                             Event*,
-                                             EditorCommandSource,
-                                             const String&) {
-  frame.Selection().Modify(
-      SelectionModifyAlteration::kMove, SelectionModifyDirection::kBackward,
-      TextGranularity::kSentenceBoundary, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveToBeginningOfSentenceAndModifySelection(
-    LocalFrame& frame,
-    Event*,
-    EditorCommandSource,
-    const String&) {
-  frame.Selection().Modify(
-      SelectionModifyAlteration::kExtend, SelectionModifyDirection::kBackward,
-      TextGranularity::kSentenceBoundary, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveToEndOfDocument(LocalFrame& frame,
-                                       Event*,
-                                       EditorCommandSource,
-                                       const String&) {
-  frame.Selection().Modify(
-      SelectionModifyAlteration::kMove, SelectionModifyDirection::kForward,
-      TextGranularity::kDocumentBoundary, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveToEndOfDocumentAndModifySelection(LocalFrame& frame,
-                                                         Event*,
-                                                         EditorCommandSource,
-                                                         const String&) {
-  frame.Selection().Modify(
-      SelectionModifyAlteration::kExtend, SelectionModifyDirection::kForward,
-      TextGranularity::kDocumentBoundary, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveToEndOfSentence(LocalFrame& frame,
-                                       Event*,
-                                       EditorCommandSource,
-                                       const String&) {
-  frame.Selection().Modify(
-      SelectionModifyAlteration::kMove, SelectionModifyDirection::kForward,
-      TextGranularity::kSentenceBoundary, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveToEndOfSentenceAndModifySelection(LocalFrame& frame,
-                                                         Event*,
-                                                         EditorCommandSource,
-                                                         const String&) {
-  frame.Selection().Modify(
-      SelectionModifyAlteration::kExtend, SelectionModifyDirection::kForward,
-      TextGranularity::kSentenceBoundary, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveToEndOfLine(LocalFrame& frame,
-                                   Event*,
-                                   EditorCommandSource,
-                                   const String&) {
-  frame.Selection().Modify(
-      SelectionModifyAlteration::kMove, SelectionModifyDirection::kForward,
-      TextGranularity::kLineBoundary, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveToEndOfLineAndModifySelection(LocalFrame& frame,
-                                                     Event*,
-                                                     EditorCommandSource,
-                                                     const String&) {
-  frame.Selection().Modify(
-      SelectionModifyAlteration::kExtend, SelectionModifyDirection::kForward,
-      TextGranularity::kLineBoundary, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveToEndOfParagraph(LocalFrame& frame,
-                                        Event*,
-                                        EditorCommandSource,
-                                        const String&) {
-  frame.Selection().Modify(
-      SelectionModifyAlteration::kMove, SelectionModifyDirection::kForward,
-      TextGranularity::kParagraphBoundary, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveToEndOfParagraphAndModifySelection(LocalFrame& frame,
-                                                          Event*,
-                                                          EditorCommandSource,
-                                                          const String&) {
-  frame.Selection().Modify(
-      SelectionModifyAlteration::kExtend, SelectionModifyDirection::kForward,
-      TextGranularity::kParagraphBoundary, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveParagraphBackward(LocalFrame& frame,
-                                         Event*,
-                                         EditorCommandSource,
-                                         const String&) {
-  frame.Selection().Modify(SelectionModifyAlteration::kMove,
-                           SelectionModifyDirection::kBackward,
-                           TextGranularity::kParagraph, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveParagraphBackwardAndModifySelection(LocalFrame& frame,
-                                                           Event*,
-                                                           EditorCommandSource,
-                                                           const String&) {
-  frame.Selection().Modify(SelectionModifyAlteration::kExtend,
-                           SelectionModifyDirection::kBackward,
-                           TextGranularity::kParagraph, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveParagraphForward(LocalFrame& frame,
-                                        Event*,
-                                        EditorCommandSource,
-                                        const String&) {
-  frame.Selection().Modify(SelectionModifyAlteration::kMove,
-                           SelectionModifyDirection::kForward,
-                           TextGranularity::kParagraph, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveParagraphForwardAndModifySelection(LocalFrame& frame,
-                                                          Event*,
-                                                          EditorCommandSource,
-                                                          const String&) {
-  frame.Selection().Modify(SelectionModifyAlteration::kExtend,
-                           SelectionModifyDirection::kForward,
-                           TextGranularity::kParagraph, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveUp(LocalFrame& frame,
-                          Event*,
-                          EditorCommandSource,
-                          const String&) {
-  return frame.Selection().Modify(
-      SelectionModifyAlteration::kMove, SelectionModifyDirection::kBackward,
-      TextGranularity::kLine, SetSelectionBy::kUser);
-}
-
-static bool ExecuteMoveUpAndModifySelection(LocalFrame& frame,
-                                            Event*,
-                                            EditorCommandSource,
-                                            const String&) {
-  frame.Selection().Modify(SelectionModifyAlteration::kExtend,
-                           SelectionModifyDirection::kBackward,
-                           TextGranularity::kLine, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveWordBackward(LocalFrame& frame,
-                                    Event*,
-                                    EditorCommandSource,
-                                    const String&) {
-  frame.Selection().Modify(SelectionModifyAlteration::kMove,
-                           SelectionModifyDirection::kBackward,
-                           TextGranularity::kWord, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveWordBackwardAndModifySelection(LocalFrame& frame,
-                                                      Event*,
-                                                      EditorCommandSource,
-                                                      const String&) {
-  frame.Selection().Modify(SelectionModifyAlteration::kExtend,
-                           SelectionModifyDirection::kBackward,
-                           TextGranularity::kWord, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveWordForward(LocalFrame& frame,
-                                   Event*,
-                                   EditorCommandSource,
-                                   const String&) {
-  frame.Selection().Modify(SelectionModifyAlteration::kMove,
-                           SelectionModifyDirection::kForward,
-                           TextGranularity::kWord, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveWordForwardAndModifySelection(LocalFrame& frame,
-                                                     Event*,
-                                                     EditorCommandSource,
-                                                     const String&) {
-  frame.Selection().Modify(SelectionModifyAlteration::kExtend,
-                           SelectionModifyDirection::kForward,
-                           TextGranularity::kWord, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveWordLeft(LocalFrame& frame,
-                                Event*,
-                                EditorCommandSource,
-                                const String&) {
-  frame.Selection().Modify(SelectionModifyAlteration::kMove,
-                           SelectionModifyDirection::kLeft,
-                           TextGranularity::kWord, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveWordLeftAndModifySelection(LocalFrame& frame,
-                                                  Event*,
-                                                  EditorCommandSource,
-                                                  const String&) {
-  frame.Selection().Modify(SelectionModifyAlteration::kExtend,
-                           SelectionModifyDirection::kLeft,
-                           TextGranularity::kWord, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveWordRight(LocalFrame& frame,
-                                 Event*,
-                                 EditorCommandSource,
-                                 const String&) {
-  frame.Selection().Modify(SelectionModifyAlteration::kMove,
-                           SelectionModifyDirection::kRight,
-                           TextGranularity::kWord, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveWordRightAndModifySelection(LocalFrame& frame,
-                                                   Event*,
-                                                   EditorCommandSource,
-                                                   const String&) {
-  frame.Selection().Modify(SelectionModifyAlteration::kExtend,
-                           SelectionModifyDirection::kRight,
-                           TextGranularity::kWord, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveToLeftEndOfLine(LocalFrame& frame,
-                                       Event*,
-                                       EditorCommandSource,
-                                       const String&) {
-  frame.Selection().Modify(
-      SelectionModifyAlteration::kMove, SelectionModifyDirection::kLeft,
-      TextGranularity::kLineBoundary, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveToLeftEndOfLineAndModifySelection(LocalFrame& frame,
-                                                         Event*,
-                                                         EditorCommandSource,
-                                                         const String&) {
-  frame.Selection().Modify(
-      SelectionModifyAlteration::kExtend, SelectionModifyDirection::kLeft,
-      TextGranularity::kLineBoundary, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveToRightEndOfLine(LocalFrame& frame,
-                                        Event*,
-                                        EditorCommandSource,
-                                        const String&) {
-  frame.Selection().Modify(
-      SelectionModifyAlteration::kMove, SelectionModifyDirection::kRight,
-      TextGranularity::kLineBoundary, SetSelectionBy::kUser);
-  return true;
-}
-
-static bool ExecuteMoveToRightEndOfLineAndModifySelection(LocalFrame& frame,
-                                                          Event*,
-                                                          EditorCommandSource,
-                                                          const String&) {
-  frame.Selection().Modify(
-      SelectionModifyAlteration::kExtend, SelectionModifyDirection::kRight,
-      TextGranularity::kLineBoundary, SetSelectionBy::kUser);
-  return true;
-}
-
 static bool ExecuteOutdent(LocalFrame& frame,
                            Event*,
                            EditorCommandSource,
@@ -2558,182 +2014,189 @@
        SupportedFromMenuOrKeyBinding, EnabledInRichlyEditableText,
        StateTextWritingDirectionRightToLeft, ValueStateOrNull,
        kNotTextInsertion, CanNotExecuteWhenDisabled},
-      {WebEditingCommandType::kMoveBackward, ExecuteMoveBackward,
+      {WebEditingCommandType::kMoveBackward, MoveCommands::ExecuteMoveBackward,
        SupportedFromMenuOrKeyBinding, EnabledInEditableText, StateNone,
        ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
       {WebEditingCommandType::kMoveBackwardAndModifySelection,
-       ExecuteMoveBackwardAndModifySelection, SupportedFromMenuOrKeyBinding,
-       EnabledVisibleSelection, StateNone, ValueStateOrNull, kNotTextInsertion,
-       CanNotExecuteWhenDisabled},
-      {WebEditingCommandType::kMoveDown, ExecuteMoveDown,
+       MoveCommands::ExecuteMoveBackwardAndModifySelection,
+       SupportedFromMenuOrKeyBinding, EnabledVisibleSelection, StateNone,
+       ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
+      {WebEditingCommandType::kMoveDown, MoveCommands::ExecuteMoveDown,
        SupportedFromMenuOrKeyBinding, EnabledInEditableText, StateNone,
        ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
       {WebEditingCommandType::kMoveDownAndModifySelection,
-       ExecuteMoveDownAndModifySelection, SupportedFromMenuOrKeyBinding,
-       EnabledVisibleSelection, StateNone, ValueStateOrNull, kNotTextInsertion,
-       CanNotExecuteWhenDisabled},
-      {WebEditingCommandType::kMoveForward, ExecuteMoveForward,
+       MoveCommands::ExecuteMoveDownAndModifySelection,
+       SupportedFromMenuOrKeyBinding, EnabledVisibleSelection, StateNone,
+       ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
+      {WebEditingCommandType::kMoveForward, MoveCommands::ExecuteMoveForward,
        SupportedFromMenuOrKeyBinding, EnabledInEditableText, StateNone,
        ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
       {WebEditingCommandType::kMoveForwardAndModifySelection,
-       ExecuteMoveForwardAndModifySelection, SupportedFromMenuOrKeyBinding,
-       EnabledVisibleSelection, StateNone, ValueStateOrNull, kNotTextInsertion,
-       CanNotExecuteWhenDisabled},
-      {WebEditingCommandType::kMoveLeft, ExecuteMoveLeft,
+       MoveCommands::ExecuteMoveForwardAndModifySelection,
+       SupportedFromMenuOrKeyBinding, EnabledVisibleSelection, StateNone,
+       ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
+      {WebEditingCommandType::kMoveLeft, MoveCommands::ExecuteMoveLeft,
        SupportedFromMenuOrKeyBinding, EnabledInEditableText, StateNone,
        ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
       {WebEditingCommandType::kMoveLeftAndModifySelection,
-       ExecuteMoveLeftAndModifySelection, SupportedFromMenuOrKeyBinding,
-       EnabledVisibleSelection, StateNone, ValueStateOrNull, kNotTextInsertion,
-       CanNotExecuteWhenDisabled},
-      {WebEditingCommandType::kMovePageDown, ExecuteMovePageDown,
+       MoveCommands::ExecuteMoveLeftAndModifySelection,
+       SupportedFromMenuOrKeyBinding, EnabledVisibleSelection, StateNone,
+       ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
+      {WebEditingCommandType::kMovePageDown, MoveCommands::ExecuteMovePageDown,
        SupportedFromMenuOrKeyBinding, EnabledInEditableText, StateNone,
        ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
       {WebEditingCommandType::kMovePageDownAndModifySelection,
-       ExecuteMovePageDownAndModifySelection, SupportedFromMenuOrKeyBinding,
-       EnabledVisibleSelection, StateNone, ValueStateOrNull, kNotTextInsertion,
-       CanNotExecuteWhenDisabled},
-      {WebEditingCommandType::kMovePageUp, ExecuteMovePageUp,
+       MoveCommands::ExecuteMovePageDownAndModifySelection,
+       SupportedFromMenuOrKeyBinding, EnabledVisibleSelection, StateNone,
+       ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
+      {WebEditingCommandType::kMovePageUp, MoveCommands::ExecuteMovePageUp,
        SupportedFromMenuOrKeyBinding, EnabledInEditableText, StateNone,
        ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
       {WebEditingCommandType::kMovePageUpAndModifySelection,
-       ExecuteMovePageUpAndModifySelection, SupportedFromMenuOrKeyBinding,
-       EnabledVisibleSelection, StateNone, ValueStateOrNull, kNotTextInsertion,
-       CanNotExecuteWhenDisabled},
+       MoveCommands::ExecuteMovePageUpAndModifySelection,
+       SupportedFromMenuOrKeyBinding, EnabledVisibleSelection, StateNone,
+       ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
       {WebEditingCommandType::kMoveParagraphBackward,
-       ExecuteMoveParagraphBackward, SupportedFromMenuOrKeyBinding,
-       EnabledInEditableText, StateNone, ValueStateOrNull, kNotTextInsertion,
-       CanNotExecuteWhenDisabled},
+       MoveCommands::ExecuteMoveParagraphBackward,
+       SupportedFromMenuOrKeyBinding, EnabledInEditableText, StateNone,
+       ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
       {WebEditingCommandType::kMoveParagraphBackwardAndModifySelection,
-       ExecuteMoveParagraphBackwardAndModifySelection,
+       MoveCommands::ExecuteMoveParagraphBackwardAndModifySelection,
        SupportedFromMenuOrKeyBinding, EnabledVisibleSelection, StateNone,
        ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
       {WebEditingCommandType::kMoveParagraphForward,
-       ExecuteMoveParagraphForward, SupportedFromMenuOrKeyBinding,
+       MoveCommands::ExecuteMoveParagraphForward, SupportedFromMenuOrKeyBinding,
        EnabledInEditableText, StateNone, ValueStateOrNull, kNotTextInsertion,
        CanNotExecuteWhenDisabled},
       {WebEditingCommandType::kMoveParagraphForwardAndModifySelection,
-       ExecuteMoveParagraphForwardAndModifySelection,
+       MoveCommands::ExecuteMoveParagraphForwardAndModifySelection,
        SupportedFromMenuOrKeyBinding, EnabledVisibleSelection, StateNone,
        ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
-      {WebEditingCommandType::kMoveRight, ExecuteMoveRight,
+      {WebEditingCommandType::kMoveRight, MoveCommands::ExecuteMoveRight,
        SupportedFromMenuOrKeyBinding, EnabledInEditableText, StateNone,
        ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
       {WebEditingCommandType::kMoveRightAndModifySelection,
-       ExecuteMoveRightAndModifySelection, SupportedFromMenuOrKeyBinding,
-       EnabledVisibleSelection, StateNone, ValueStateOrNull, kNotTextInsertion,
-       CanNotExecuteWhenDisabled},
+       MoveCommands::ExecuteMoveRightAndModifySelection,
+       SupportedFromMenuOrKeyBinding, EnabledVisibleSelection, StateNone,
+       ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
       {WebEditingCommandType::kMoveToBeginningOfDocument,
-       ExecuteMoveToBeginningOfDocument, SupportedFromMenuOrKeyBinding,
-       EnabledInEditableText, StateNone, ValueStateOrNull, kNotTextInsertion,
-       CanNotExecuteWhenDisabled},
+       MoveCommands::ExecuteMoveToBeginningOfDocument,
+       SupportedFromMenuOrKeyBinding, EnabledInEditableText, StateNone,
+       ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
       {WebEditingCommandType::kMoveToBeginningOfDocumentAndModifySelection,
-       ExecuteMoveToBeginningOfDocumentAndModifySelection,
+       MoveCommands::ExecuteMoveToBeginningOfDocumentAndModifySelection,
        SupportedFromMenuOrKeyBinding, EnabledVisibleSelection, StateNone,
        ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
       {WebEditingCommandType::kMoveToBeginningOfLine,
-       ExecuteMoveToBeginningOfLine, SupportedFromMenuOrKeyBinding,
-       EnabledInEditableText, StateNone, ValueStateOrNull, kNotTextInsertion,
-       CanNotExecuteWhenDisabled},
+       MoveCommands::ExecuteMoveToBeginningOfLine,
+       SupportedFromMenuOrKeyBinding, EnabledInEditableText, StateNone,
+       ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
       {WebEditingCommandType::kMoveToBeginningOfLineAndModifySelection,
-       ExecuteMoveToBeginningOfLineAndModifySelection,
+       MoveCommands::ExecuteMoveToBeginningOfLineAndModifySelection,
        SupportedFromMenuOrKeyBinding, EnabledVisibleSelection, StateNone,
        ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
       {WebEditingCommandType::kMoveToBeginningOfParagraph,
-       ExecuteMoveToBeginningOfParagraph, SupportedFromMenuOrKeyBinding,
-       EnabledInEditableText, StateNone, ValueStateOrNull, kNotTextInsertion,
-       CanNotExecuteWhenDisabled},
+       MoveCommands::ExecuteMoveToBeginningOfParagraph,
+       SupportedFromMenuOrKeyBinding, EnabledInEditableText, StateNone,
+       ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
       {WebEditingCommandType::kMoveToBeginningOfParagraphAndModifySelection,
-       ExecuteMoveToBeginningOfParagraphAndModifySelection,
+       MoveCommands::ExecuteMoveToBeginningOfParagraphAndModifySelection,
        SupportedFromMenuOrKeyBinding, EnabledVisibleSelection, StateNone,
        ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
       {WebEditingCommandType::kMoveToBeginningOfSentence,
-       ExecuteMoveToBeginningOfSentence, SupportedFromMenuOrKeyBinding,
+       MoveCommands::ExecuteMoveToBeginningOfSentence,
+       SupportedFromMenuOrKeyBinding, EnabledInEditableText, StateNone,
+       ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
+      {WebEditingCommandType::kMoveToBeginningOfSentenceAndModifySelection,
+       MoveCommands::ExecuteMoveToBeginningOfSentenceAndModifySelection,
+       SupportedFromMenuOrKeyBinding, EnabledVisibleSelection, StateNone,
+       ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
+      {WebEditingCommandType::kMoveToEndOfDocument,
+       MoveCommands::ExecuteMoveToEndOfDocument, SupportedFromMenuOrKeyBinding,
        EnabledInEditableText, StateNone, ValueStateOrNull, kNotTextInsertion,
        CanNotExecuteWhenDisabled},
-      {WebEditingCommandType::kMoveToBeginningOfSentenceAndModifySelection,
-       ExecuteMoveToBeginningOfSentenceAndModifySelection,
-       SupportedFromMenuOrKeyBinding, EnabledVisibleSelection, StateNone,
-       ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
-      {WebEditingCommandType::kMoveToEndOfDocument, ExecuteMoveToEndOfDocument,
-       SupportedFromMenuOrKeyBinding, EnabledInEditableText, StateNone,
-       ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
       {WebEditingCommandType::kMoveToEndOfDocumentAndModifySelection,
-       ExecuteMoveToEndOfDocumentAndModifySelection,
+       MoveCommands::ExecuteMoveToEndOfDocumentAndModifySelection,
        SupportedFromMenuOrKeyBinding, EnabledVisibleSelection, StateNone,
        ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
-      {WebEditingCommandType::kMoveToEndOfLine, ExecuteMoveToEndOfLine,
-       SupportedFromMenuOrKeyBinding, EnabledInEditableText, StateNone,
-       ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
-      {WebEditingCommandType::kMoveToEndOfLineAndModifySelection,
-       ExecuteMoveToEndOfLineAndModifySelection, SupportedFromMenuOrKeyBinding,
-       EnabledVisibleSelection, StateNone, ValueStateOrNull, kNotTextInsertion,
+      {WebEditingCommandType::kMoveToEndOfLine,
+       MoveCommands::ExecuteMoveToEndOfLine, SupportedFromMenuOrKeyBinding,
+       EnabledInEditableText, StateNone, ValueStateOrNull, kNotTextInsertion,
        CanNotExecuteWhenDisabled},
+      {WebEditingCommandType::kMoveToEndOfLineAndModifySelection,
+       MoveCommands::ExecuteMoveToEndOfLineAndModifySelection,
+       SupportedFromMenuOrKeyBinding, EnabledVisibleSelection, StateNone,
+       ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
       {WebEditingCommandType::kMoveToEndOfParagraph,
-       ExecuteMoveToEndOfParagraph, SupportedFromMenuOrKeyBinding,
+       MoveCommands::ExecuteMoveToEndOfParagraph, SupportedFromMenuOrKeyBinding,
        EnabledInEditableText, StateNone, ValueStateOrNull, kNotTextInsertion,
        CanNotExecuteWhenDisabled},
       {WebEditingCommandType::kMoveToEndOfParagraphAndModifySelection,
-       ExecuteMoveToEndOfParagraphAndModifySelection,
+       MoveCommands::ExecuteMoveToEndOfParagraphAndModifySelection,
        SupportedFromMenuOrKeyBinding, EnabledVisibleSelection, StateNone,
        ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
-      {WebEditingCommandType::kMoveToEndOfSentence, ExecuteMoveToEndOfSentence,
-       SupportedFromMenuOrKeyBinding, EnabledInEditableText, StateNone,
-       ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
+      {WebEditingCommandType::kMoveToEndOfSentence,
+       MoveCommands::ExecuteMoveToEndOfSentence, SupportedFromMenuOrKeyBinding,
+       EnabledInEditableText, StateNone, ValueStateOrNull, kNotTextInsertion,
+       CanNotExecuteWhenDisabled},
       {WebEditingCommandType::kMoveToEndOfSentenceAndModifySelection,
-       ExecuteMoveToEndOfSentenceAndModifySelection,
+       MoveCommands::ExecuteMoveToEndOfSentenceAndModifySelection,
        SupportedFromMenuOrKeyBinding, EnabledVisibleSelection, StateNone,
        ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
-      {WebEditingCommandType::kMoveToLeftEndOfLine, ExecuteMoveToLeftEndOfLine,
-       SupportedFromMenuOrKeyBinding, EnabledInEditableText, StateNone,
-       ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
+      {WebEditingCommandType::kMoveToLeftEndOfLine,
+       MoveCommands::ExecuteMoveToLeftEndOfLine, SupportedFromMenuOrKeyBinding,
+       EnabledInEditableText, StateNone, ValueStateOrNull, kNotTextInsertion,
+       CanNotExecuteWhenDisabled},
       {WebEditingCommandType::kMoveToLeftEndOfLineAndModifySelection,
-       ExecuteMoveToLeftEndOfLineAndModifySelection,
+       MoveCommands::ExecuteMoveToLeftEndOfLineAndModifySelection,
        SupportedFromMenuOrKeyBinding, EnabledInEditableText, StateNone,
        ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
       {WebEditingCommandType::kMoveToRightEndOfLine,
-       ExecuteMoveToRightEndOfLine, SupportedFromMenuOrKeyBinding,
+       MoveCommands::ExecuteMoveToRightEndOfLine, SupportedFromMenuOrKeyBinding,
        EnabledInEditableText, StateNone, ValueStateOrNull, kNotTextInsertion,
        CanNotExecuteWhenDisabled},
       {WebEditingCommandType::kMoveToRightEndOfLineAndModifySelection,
-       ExecuteMoveToRightEndOfLineAndModifySelection,
+       MoveCommands::ExecuteMoveToRightEndOfLineAndModifySelection,
        SupportedFromMenuOrKeyBinding, EnabledInEditableText, StateNone,
        ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
-      {WebEditingCommandType::kMoveUp, ExecuteMoveUp,
+      {WebEditingCommandType::kMoveUp, MoveCommands::ExecuteMoveUp,
        SupportedFromMenuOrKeyBinding, EnabledInEditableText, StateNone,
        ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
       {WebEditingCommandType::kMoveUpAndModifySelection,
-       ExecuteMoveUpAndModifySelection, SupportedFromMenuOrKeyBinding,
-       EnabledVisibleSelection, StateNone, ValueStateOrNull, kNotTextInsertion,
-       CanNotExecuteWhenDisabled},
-      {WebEditingCommandType::kMoveWordBackward, ExecuteMoveWordBackward,
-       SupportedFromMenuOrKeyBinding, EnabledInEditableText, StateNone,
+       MoveCommands::ExecuteMoveUpAndModifySelection,
+       SupportedFromMenuOrKeyBinding, EnabledVisibleSelection, StateNone,
        ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
+      {WebEditingCommandType::kMoveWordBackward,
+       MoveCommands::ExecuteMoveWordBackward, SupportedFromMenuOrKeyBinding,
+       EnabledInEditableText, StateNone, ValueStateOrNull, kNotTextInsertion,
+       CanNotExecuteWhenDisabled},
       {WebEditingCommandType::kMoveWordBackwardAndModifySelection,
-       ExecuteMoveWordBackwardAndModifySelection, SupportedFromMenuOrKeyBinding,
-       EnabledVisibleSelection, StateNone, ValueStateOrNull, kNotTextInsertion,
-       CanNotExecuteWhenDisabled},
-      {WebEditingCommandType::kMoveWordForward, ExecuteMoveWordForward,
-       SupportedFromMenuOrKeyBinding, EnabledInEditableText, StateNone,
+       MoveCommands::ExecuteMoveWordBackwardAndModifySelection,
+       SupportedFromMenuOrKeyBinding, EnabledVisibleSelection, StateNone,
        ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
-      {WebEditingCommandType::kMoveWordForwardAndModifySelection,
-       ExecuteMoveWordForwardAndModifySelection, SupportedFromMenuOrKeyBinding,
-       EnabledVisibleSelection, StateNone, ValueStateOrNull, kNotTextInsertion,
+      {WebEditingCommandType::kMoveWordForward,
+       MoveCommands::ExecuteMoveWordForward, SupportedFromMenuOrKeyBinding,
+       EnabledInEditableText, StateNone, ValueStateOrNull, kNotTextInsertion,
        CanNotExecuteWhenDisabled},
-      {WebEditingCommandType::kMoveWordLeft, ExecuteMoveWordLeft,
+      {WebEditingCommandType::kMoveWordForwardAndModifySelection,
+       MoveCommands::ExecuteMoveWordForwardAndModifySelection,
+       SupportedFromMenuOrKeyBinding, EnabledVisibleSelection, StateNone,
+       ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
+      {WebEditingCommandType::kMoveWordLeft, MoveCommands::ExecuteMoveWordLeft,
        SupportedFromMenuOrKeyBinding, EnabledInEditableText, StateNone,
        ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
       {WebEditingCommandType::kMoveWordLeftAndModifySelection,
-       ExecuteMoveWordLeftAndModifySelection, SupportedFromMenuOrKeyBinding,
-       EnabledVisibleSelection, StateNone, ValueStateOrNull, kNotTextInsertion,
-       CanNotExecuteWhenDisabled},
-      {WebEditingCommandType::kMoveWordRight, ExecuteMoveWordRight,
-       SupportedFromMenuOrKeyBinding, EnabledInEditableText, StateNone,
+       MoveCommands::ExecuteMoveWordLeftAndModifySelection,
+       SupportedFromMenuOrKeyBinding, EnabledVisibleSelection, StateNone,
        ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
-      {WebEditingCommandType::kMoveWordRightAndModifySelection,
-       ExecuteMoveWordRightAndModifySelection, SupportedFromMenuOrKeyBinding,
-       EnabledVisibleSelection, StateNone, ValueStateOrNull, kNotTextInsertion,
+      {WebEditingCommandType::kMoveWordRight,
+       MoveCommands::ExecuteMoveWordRight, SupportedFromMenuOrKeyBinding,
+       EnabledInEditableText, StateNone, ValueStateOrNull, kNotTextInsertion,
        CanNotExecuteWhenDisabled},
+      {WebEditingCommandType::kMoveWordRightAndModifySelection,
+       MoveCommands::ExecuteMoveWordRightAndModifySelection,
+       SupportedFromMenuOrKeyBinding, EnabledVisibleSelection, StateNone,
+       ValueStateOrNull, kNotTextInsertion, CanNotExecuteWhenDisabled},
       {WebEditingCommandType::kOutdent, ExecuteOutdent, Supported,
        EnabledInRichlyEditableText, StateNone, ValueStateOrNull,
        kNotTextInsertion, CanNotExecuteWhenDisabled},
diff --git a/third_party/WebKit/Source/core/editing/commands/MoveCommands.cpp b/third_party/WebKit/Source/core/editing/commands/MoveCommands.cpp
new file mode 100644
index 0000000..62b335d
--- /dev/null
+++ b/third_party/WebKit/Source/core/editing/commands/MoveCommands.cpp
@@ -0,0 +1,595 @@
+/*
+ * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2009 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// 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 "core/editing/commands/MoveCommands.h"
+
+#include "core/editing/EditingUtilities.h"
+#include "core/editing/Editor.h"
+#include "core/editing/FrameSelection.h"
+#include "core/editing/SelectionModifier.h"
+#include "core/frame/LocalFrame.h"
+#include "core/layout/LayoutBox.h"
+
+namespace blink {
+
+unsigned MoveCommands::VerticalScrollDistance(LocalFrame& frame) {
+  const Element* const focused_element = frame.GetDocument()->FocusedElement();
+  if (!focused_element)
+    return 0;
+  LayoutObject* const layout_object = focused_element->GetLayoutObject();
+  if (!layout_object || !layout_object->IsBox())
+    return 0;
+  LayoutBox& layout_box = ToLayoutBox(*layout_object);
+  const ComputedStyle* const style = layout_box.Style();
+  if (!style)
+    return 0;
+  if (!(style->OverflowY() == EOverflow::kScroll ||
+        style->OverflowY() == EOverflow::kAuto ||
+        HasEditableStyle(*focused_element)))
+    return 0;
+  const ScrollableArea& scrollable_area =
+      *frame.View()->LayoutViewportScrollableArea();
+  const int height = std::min<int>(layout_box.ClientHeight().ToInt(),
+                                   scrollable_area.VisibleHeight());
+  return static_cast<unsigned>(
+      max(max<int>(height * ScrollableArea::MinFractionToStepWhenPaging(),
+                   height - scrollable_area.MaxOverlapBetweenPages()),
+          1));
+}
+
+bool MoveCommands::ModifySelectionWithPageGranularity(
+    LocalFrame& frame,
+    SelectionModifyAlteration alter,
+    unsigned vertical_distance,
+    SelectionModifyVerticalDirection direction) {
+  SelectionModifier selection_modifier(
+      frame, frame.Selection().GetSelectionInDOMTree());
+  selection_modifier.SetSelectionIsDirectional(
+      frame.Selection().IsDirectional());
+  if (!selection_modifier.ModifyWithPageGranularity(alter, vertical_distance,
+                                                    direction)) {
+    return false;
+  }
+
+  frame.Selection().SetSelection(
+      selection_modifier.Selection().AsSelection(),
+      SetSelectionOptions::Builder()
+          .SetSetSelectionBy(SetSelectionBy::kUser)
+          .SetShouldCloseTyping(true)
+          .SetShouldClearTypingStyle(true)
+          .SetCursorAlignOnScroll(alter == SelectionModifyAlteration::kMove
+                                      ? CursorAlignOnScroll::kAlways
+                                      : CursorAlignOnScroll::kIfNeeded)
+          .SetIsDirectional(alter == SelectionModifyAlteration::kExtend ||
+                            frame.GetEditor()
+                                .Behavior()
+                                .ShouldConsiderSelectionAsDirectional())
+          .Build());
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveBackward(LocalFrame& frame,
+                                       Event*,
+                                       EditorCommandSource,
+                                       const String&) {
+  frame.Selection().Modify(SelectionModifyAlteration::kMove,
+                           SelectionModifyDirection::kBackward,
+                           TextGranularity::kCharacter, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveBackwardAndModifySelection(LocalFrame& frame,
+                                                         Event*,
+                                                         EditorCommandSource,
+                                                         const String&) {
+  frame.Selection().Modify(SelectionModifyAlteration::kExtend,
+                           SelectionModifyDirection::kBackward,
+                           TextGranularity::kCharacter, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveDown(LocalFrame& frame,
+                                   Event*,
+                                   EditorCommandSource,
+                                   const String&) {
+  return frame.Selection().Modify(
+      SelectionModifyAlteration::kMove, SelectionModifyDirection::kForward,
+      TextGranularity::kLine, SetSelectionBy::kUser);
+}
+
+bool MoveCommands::ExecuteMoveDownAndModifySelection(LocalFrame& frame,
+                                                     Event*,
+                                                     EditorCommandSource,
+                                                     const String&) {
+  frame.Selection().Modify(SelectionModifyAlteration::kExtend,
+                           SelectionModifyDirection::kForward,
+                           TextGranularity::kLine, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveForward(LocalFrame& frame,
+                                      Event*,
+                                      EditorCommandSource,
+                                      const String&) {
+  frame.Selection().Modify(SelectionModifyAlteration::kMove,
+                           SelectionModifyDirection::kForward,
+                           TextGranularity::kCharacter, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveForwardAndModifySelection(LocalFrame& frame,
+                                                        Event*,
+                                                        EditorCommandSource,
+                                                        const String&) {
+  frame.Selection().Modify(SelectionModifyAlteration::kExtend,
+                           SelectionModifyDirection::kForward,
+                           TextGranularity::kCharacter, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveLeft(LocalFrame& frame,
+                                   Event*,
+                                   EditorCommandSource,
+                                   const String&) {
+  return frame.Selection().Modify(
+      SelectionModifyAlteration::kMove, SelectionModifyDirection::kLeft,
+      TextGranularity::kCharacter, SetSelectionBy::kUser);
+}
+
+bool MoveCommands::ExecuteMoveLeftAndModifySelection(LocalFrame& frame,
+                                                     Event*,
+                                                     EditorCommandSource,
+                                                     const String&) {
+  frame.Selection().Modify(SelectionModifyAlteration::kExtend,
+                           SelectionModifyDirection::kLeft,
+                           TextGranularity::kCharacter, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMovePageDown(LocalFrame& frame,
+                                       Event*,
+                                       EditorCommandSource,
+                                       const String&) {
+  const unsigned distance = VerticalScrollDistance(frame);
+  if (!distance)
+    return false;
+  return ModifySelectionWithPageGranularity(
+      frame, SelectionModifyAlteration::kMove, distance,
+      SelectionModifyVerticalDirection::kDown);
+}
+
+bool MoveCommands::ExecuteMovePageDownAndModifySelection(LocalFrame& frame,
+                                                         Event*,
+                                                         EditorCommandSource,
+                                                         const String&) {
+  const unsigned distance = VerticalScrollDistance(frame);
+  if (!distance)
+    return false;
+  return ModifySelectionWithPageGranularity(
+      frame, SelectionModifyAlteration::kExtend, distance,
+      SelectionModifyVerticalDirection::kDown);
+}
+
+bool MoveCommands::ExecuteMovePageUp(LocalFrame& frame,
+                                     Event*,
+                                     EditorCommandSource,
+                                     const String&) {
+  const unsigned distance = VerticalScrollDistance(frame);
+  if (!distance)
+    return false;
+  return ModifySelectionWithPageGranularity(
+      frame, SelectionModifyAlteration::kMove, distance,
+      SelectionModifyVerticalDirection::kUp);
+}
+
+bool MoveCommands::ExecuteMovePageUpAndModifySelection(LocalFrame& frame,
+                                                       Event*,
+                                                       EditorCommandSource,
+                                                       const String&) {
+  const unsigned distance = VerticalScrollDistance(frame);
+  if (!distance)
+    return false;
+  return ModifySelectionWithPageGranularity(
+      frame, SelectionModifyAlteration::kExtend, distance,
+      SelectionModifyVerticalDirection::kUp);
+}
+
+bool MoveCommands::ExecuteMoveParagraphBackward(LocalFrame& frame,
+                                                Event*,
+                                                EditorCommandSource,
+                                                const String&) {
+  frame.Selection().Modify(SelectionModifyAlteration::kMove,
+                           SelectionModifyDirection::kBackward,
+                           TextGranularity::kParagraph, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveParagraphBackwardAndModifySelection(
+    LocalFrame& frame,
+    Event*,
+    EditorCommandSource,
+    const String&) {
+  frame.Selection().Modify(SelectionModifyAlteration::kExtend,
+                           SelectionModifyDirection::kBackward,
+                           TextGranularity::kParagraph, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveParagraphForward(LocalFrame& frame,
+                                               Event*,
+                                               EditorCommandSource,
+                                               const String&) {
+  frame.Selection().Modify(SelectionModifyAlteration::kMove,
+                           SelectionModifyDirection::kForward,
+                           TextGranularity::kParagraph, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveParagraphForwardAndModifySelection(
+    LocalFrame& frame,
+    Event*,
+    EditorCommandSource,
+    const String&) {
+  frame.Selection().Modify(SelectionModifyAlteration::kExtend,
+                           SelectionModifyDirection::kForward,
+                           TextGranularity::kParagraph, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveRight(LocalFrame& frame,
+                                    Event*,
+                                    EditorCommandSource,
+                                    const String&) {
+  return frame.Selection().Modify(
+      SelectionModifyAlteration::kMove, SelectionModifyDirection::kRight,
+      TextGranularity::kCharacter, SetSelectionBy::kUser);
+}
+
+bool MoveCommands::ExecuteMoveRightAndModifySelection(LocalFrame& frame,
+                                                      Event*,
+                                                      EditorCommandSource,
+                                                      const String&) {
+  frame.Selection().Modify(SelectionModifyAlteration::kExtend,
+                           SelectionModifyDirection::kRight,
+                           TextGranularity::kCharacter, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveToBeginningOfDocument(LocalFrame& frame,
+                                                    Event*,
+                                                    EditorCommandSource,
+                                                    const String&) {
+  frame.Selection().Modify(
+      SelectionModifyAlteration::kMove, SelectionModifyDirection::kBackward,
+      TextGranularity::kDocumentBoundary, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveToBeginningOfDocumentAndModifySelection(
+    LocalFrame& frame,
+    Event*,
+    EditorCommandSource,
+    const String&) {
+  frame.Selection().Modify(
+      SelectionModifyAlteration::kExtend, SelectionModifyDirection::kBackward,
+      TextGranularity::kDocumentBoundary, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveToBeginningOfLine(LocalFrame& frame,
+                                                Event*,
+                                                EditorCommandSource,
+                                                const String&) {
+  frame.Selection().Modify(
+      SelectionModifyAlteration::kMove, SelectionModifyDirection::kBackward,
+      TextGranularity::kLineBoundary, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveToBeginningOfLineAndModifySelection(
+    LocalFrame& frame,
+    Event*,
+    EditorCommandSource,
+    const String&) {
+  frame.Selection().Modify(
+      SelectionModifyAlteration::kExtend, SelectionModifyDirection::kBackward,
+      TextGranularity::kLineBoundary, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveToBeginningOfParagraph(LocalFrame& frame,
+                                                     Event*,
+                                                     EditorCommandSource,
+                                                     const String&) {
+  frame.Selection().Modify(
+      SelectionModifyAlteration::kMove, SelectionModifyDirection::kBackward,
+      TextGranularity::kParagraphBoundary, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveToBeginningOfParagraphAndModifySelection(
+    LocalFrame& frame,
+    Event*,
+    EditorCommandSource,
+    const String&) {
+  frame.Selection().Modify(
+      SelectionModifyAlteration::kExtend, SelectionModifyDirection::kBackward,
+      TextGranularity::kParagraphBoundary, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveToBeginningOfSentence(LocalFrame& frame,
+                                                    Event*,
+                                                    EditorCommandSource,
+                                                    const String&) {
+  frame.Selection().Modify(
+      SelectionModifyAlteration::kMove, SelectionModifyDirection::kBackward,
+      TextGranularity::kSentenceBoundary, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveToBeginningOfSentenceAndModifySelection(
+    LocalFrame& frame,
+    Event*,
+    EditorCommandSource,
+    const String&) {
+  frame.Selection().Modify(
+      SelectionModifyAlteration::kExtend, SelectionModifyDirection::kBackward,
+      TextGranularity::kSentenceBoundary, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveToEndOfDocument(LocalFrame& frame,
+                                              Event*,
+                                              EditorCommandSource,
+                                              const String&) {
+  frame.Selection().Modify(
+      SelectionModifyAlteration::kMove, SelectionModifyDirection::kForward,
+      TextGranularity::kDocumentBoundary, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveToEndOfDocumentAndModifySelection(
+    LocalFrame& frame,
+    Event*,
+    EditorCommandSource,
+    const String&) {
+  frame.Selection().Modify(
+      SelectionModifyAlteration::kExtend, SelectionModifyDirection::kForward,
+      TextGranularity::kDocumentBoundary, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveToEndOfLine(LocalFrame& frame,
+                                          Event*,
+                                          EditorCommandSource,
+                                          const String&) {
+  frame.Selection().Modify(
+      SelectionModifyAlteration::kMove, SelectionModifyDirection::kForward,
+      TextGranularity::kLineBoundary, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveToEndOfLineAndModifySelection(LocalFrame& frame,
+                                                            Event*,
+                                                            EditorCommandSource,
+                                                            const String&) {
+  frame.Selection().Modify(
+      SelectionModifyAlteration::kExtend, SelectionModifyDirection::kForward,
+      TextGranularity::kLineBoundary, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveToEndOfParagraph(LocalFrame& frame,
+                                               Event*,
+                                               EditorCommandSource,
+                                               const String&) {
+  frame.Selection().Modify(
+      SelectionModifyAlteration::kMove, SelectionModifyDirection::kForward,
+      TextGranularity::kParagraphBoundary, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveToEndOfParagraphAndModifySelection(
+    LocalFrame& frame,
+    Event*,
+    EditorCommandSource,
+    const String&) {
+  frame.Selection().Modify(
+      SelectionModifyAlteration::kExtend, SelectionModifyDirection::kForward,
+      TextGranularity::kParagraphBoundary, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveToEndOfSentence(LocalFrame& frame,
+                                              Event*,
+                                              EditorCommandSource,
+                                              const String&) {
+  frame.Selection().Modify(
+      SelectionModifyAlteration::kMove, SelectionModifyDirection::kForward,
+      TextGranularity::kSentenceBoundary, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveToEndOfSentenceAndModifySelection(
+    LocalFrame& frame,
+    Event*,
+    EditorCommandSource,
+    const String&) {
+  frame.Selection().Modify(
+      SelectionModifyAlteration::kExtend, SelectionModifyDirection::kForward,
+      TextGranularity::kSentenceBoundary, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveToLeftEndOfLine(LocalFrame& frame,
+                                              Event*,
+                                              EditorCommandSource,
+                                              const String&) {
+  frame.Selection().Modify(
+      SelectionModifyAlteration::kMove, SelectionModifyDirection::kLeft,
+      TextGranularity::kLineBoundary, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveToLeftEndOfLineAndModifySelection(
+    LocalFrame& frame,
+    Event*,
+    EditorCommandSource,
+    const String&) {
+  frame.Selection().Modify(
+      SelectionModifyAlteration::kExtend, SelectionModifyDirection::kLeft,
+      TextGranularity::kLineBoundary, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveToRightEndOfLine(LocalFrame& frame,
+                                               Event*,
+                                               EditorCommandSource,
+                                               const String&) {
+  frame.Selection().Modify(
+      SelectionModifyAlteration::kMove, SelectionModifyDirection::kRight,
+      TextGranularity::kLineBoundary, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveToRightEndOfLineAndModifySelection(
+    LocalFrame& frame,
+    Event*,
+    EditorCommandSource,
+    const String&) {
+  frame.Selection().Modify(
+      SelectionModifyAlteration::kExtend, SelectionModifyDirection::kRight,
+      TextGranularity::kLineBoundary, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveUp(LocalFrame& frame,
+                                 Event*,
+                                 EditorCommandSource,
+                                 const String&) {
+  return frame.Selection().Modify(
+      SelectionModifyAlteration::kMove, SelectionModifyDirection::kBackward,
+      TextGranularity::kLine, SetSelectionBy::kUser);
+}
+
+bool MoveCommands::ExecuteMoveUpAndModifySelection(LocalFrame& frame,
+                                                   Event*,
+                                                   EditorCommandSource,
+                                                   const String&) {
+  frame.Selection().Modify(SelectionModifyAlteration::kExtend,
+                           SelectionModifyDirection::kBackward,
+                           TextGranularity::kLine, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveWordBackward(LocalFrame& frame,
+                                           Event*,
+                                           EditorCommandSource,
+                                           const String&) {
+  frame.Selection().Modify(SelectionModifyAlteration::kMove,
+                           SelectionModifyDirection::kBackward,
+                           TextGranularity::kWord, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveWordBackwardAndModifySelection(
+    LocalFrame& frame,
+    Event*,
+    EditorCommandSource,
+    const String&) {
+  frame.Selection().Modify(SelectionModifyAlteration::kExtend,
+                           SelectionModifyDirection::kBackward,
+                           TextGranularity::kWord, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveWordForward(LocalFrame& frame,
+                                          Event*,
+                                          EditorCommandSource,
+                                          const String&) {
+  frame.Selection().Modify(SelectionModifyAlteration::kMove,
+                           SelectionModifyDirection::kForward,
+                           TextGranularity::kWord, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveWordForwardAndModifySelection(LocalFrame& frame,
+                                                            Event*,
+                                                            EditorCommandSource,
+                                                            const String&) {
+  frame.Selection().Modify(SelectionModifyAlteration::kExtend,
+                           SelectionModifyDirection::kForward,
+                           TextGranularity::kWord, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveWordLeft(LocalFrame& frame,
+                                       Event*,
+                                       EditorCommandSource,
+                                       const String&) {
+  frame.Selection().Modify(SelectionModifyAlteration::kMove,
+                           SelectionModifyDirection::kLeft,
+                           TextGranularity::kWord, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveWordLeftAndModifySelection(LocalFrame& frame,
+                                                         Event*,
+                                                         EditorCommandSource,
+                                                         const String&) {
+  frame.Selection().Modify(SelectionModifyAlteration::kExtend,
+                           SelectionModifyDirection::kLeft,
+                           TextGranularity::kWord, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveWordRight(LocalFrame& frame,
+                                        Event*,
+                                        EditorCommandSource,
+                                        const String&) {
+  frame.Selection().Modify(SelectionModifyAlteration::kMove,
+                           SelectionModifyDirection::kRight,
+                           TextGranularity::kWord, SetSelectionBy::kUser);
+  return true;
+}
+
+bool MoveCommands::ExecuteMoveWordRightAndModifySelection(LocalFrame& frame,
+                                                          Event*,
+                                                          EditorCommandSource,
+                                                          const String&) {
+  frame.Selection().Modify(SelectionModifyAlteration::kExtend,
+                           SelectionModifyDirection::kRight,
+                           TextGranularity::kWord, SetSelectionBy::kUser);
+  return true;
+}
+
+}  // namespace blink
diff --git a/third_party/WebKit/Source/core/editing/commands/MoveCommands.h b/third_party/WebKit/Source/core/editing/commands/MoveCommands.h
new file mode 100644
index 0000000..1379e1be
--- /dev/null
+++ b/third_party/WebKit/Source/core/editing/commands/MoveCommands.h
@@ -0,0 +1,264 @@
+/*
+ * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2009 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// 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 MoveCommands_h
+#define MoveCommands_h
+
+#include "platform/wtf/Allocator.h"
+#include "platform/wtf/Forward.h"
+
+namespace blink {
+
+class Event;
+class LocalFrame;
+
+enum class EditorCommandSource;
+enum class SelectionModifyAlteration;
+enum class SelectionModifyVerticalDirection;
+
+// This class provides static functions about commands related to move.
+class MoveCommands {
+  STATIC_ONLY(MoveCommands);
+
+ public:
+  // Returns |bool| value for Document#execCommand().
+  static bool ExecuteMoveBackward(LocalFrame&,
+                                  Event*,
+                                  EditorCommandSource,
+                                  const String&);
+  static bool ExecuteMoveBackwardAndModifySelection(LocalFrame&,
+                                                    Event*,
+                                                    EditorCommandSource,
+                                                    const String&);
+  static bool ExecuteMoveDown(LocalFrame&,
+                              Event*,
+                              EditorCommandSource,
+                              const String&);
+  static bool ExecuteMoveDownAndModifySelection(LocalFrame&,
+                                                Event*,
+                                                EditorCommandSource,
+                                                const String&);
+  static bool ExecuteMoveForward(LocalFrame&,
+                                 Event*,
+                                 EditorCommandSource,
+                                 const String&);
+  static bool ExecuteMoveForwardAndModifySelection(LocalFrame&,
+                                                   Event*,
+                                                   EditorCommandSource,
+                                                   const String&);
+  static bool ExecuteMoveLeft(LocalFrame&,
+                              Event*,
+                              EditorCommandSource,
+                              const String&);
+  static bool ExecuteMoveLeftAndModifySelection(LocalFrame&,
+                                                Event*,
+                                                EditorCommandSource,
+                                                const String&);
+  static bool ExecuteMovePageDown(LocalFrame&,
+                                  Event*,
+                                  EditorCommandSource,
+                                  const String&);
+  static bool ExecuteMovePageDownAndModifySelection(LocalFrame&,
+                                                    Event*,
+                                                    EditorCommandSource,
+                                                    const String&);
+  static bool ExecuteMovePageUp(LocalFrame&,
+                                Event*,
+                                EditorCommandSource,
+                                const String&);
+  static bool ExecuteMovePageUpAndModifySelection(LocalFrame&,
+                                                  Event*,
+                                                  EditorCommandSource,
+                                                  const String&);
+  static bool ExecuteMoveParagraphBackward(LocalFrame&,
+                                           Event*,
+                                           EditorCommandSource,
+                                           const String&);
+  static bool ExecuteMoveParagraphBackwardAndModifySelection(
+      LocalFrame&,
+      Event*,
+      EditorCommandSource,
+      const String&);
+  static bool ExecuteMoveParagraphForward(LocalFrame&,
+                                          Event*,
+                                          EditorCommandSource,
+                                          const String&);
+  static bool ExecuteMoveParagraphForwardAndModifySelection(LocalFrame&,
+                                                            Event*,
+                                                            EditorCommandSource,
+                                                            const String&);
+  static bool ExecuteMoveRight(LocalFrame&,
+                               Event*,
+                               EditorCommandSource,
+                               const String&);
+  static bool ExecuteMoveRightAndModifySelection(LocalFrame&,
+                                                 Event*,
+                                                 EditorCommandSource,
+                                                 const String&);
+  static bool ExecuteMoveToBeginningOfDocument(LocalFrame&,
+                                               Event*,
+                                               EditorCommandSource,
+                                               const String&);
+  static bool ExecuteMoveToBeginningOfDocumentAndModifySelection(
+      LocalFrame&,
+      Event*,
+      EditorCommandSource,
+      const String&);
+  static bool ExecuteMoveToBeginningOfLine(LocalFrame&,
+                                           Event*,
+                                           EditorCommandSource,
+                                           const String&);
+  static bool ExecuteMoveToBeginningOfLineAndModifySelection(
+      LocalFrame&,
+      Event*,
+      EditorCommandSource,
+      const String&);
+  static bool ExecuteMoveToBeginningOfParagraph(LocalFrame&,
+                                                Event*,
+                                                EditorCommandSource,
+                                                const String&);
+  static bool ExecuteMoveToBeginningOfParagraphAndModifySelection(
+      LocalFrame&,
+      Event*,
+      EditorCommandSource,
+      const String&);
+  static bool ExecuteMoveToBeginningOfSentence(LocalFrame&,
+                                               Event*,
+                                               EditorCommandSource,
+                                               const String&);
+  static bool ExecuteMoveToBeginningOfSentenceAndModifySelection(
+      LocalFrame&,
+      Event*,
+      EditorCommandSource,
+      const String&);
+  static bool ExecuteMoveToEndOfDocument(LocalFrame&,
+                                         Event*,
+                                         EditorCommandSource,
+                                         const String&);
+  static bool ExecuteMoveToEndOfDocumentAndModifySelection(LocalFrame&,
+                                                           Event*,
+                                                           EditorCommandSource,
+                                                           const String&);
+  static bool ExecuteMoveToEndOfLine(LocalFrame&,
+                                     Event*,
+                                     EditorCommandSource,
+                                     const String&);
+  static bool ExecuteMoveToEndOfLineAndModifySelection(LocalFrame&,
+                                                       Event*,
+                                                       EditorCommandSource,
+                                                       const String&);
+  static bool ExecuteMoveToEndOfParagraph(LocalFrame&,
+                                          Event*,
+                                          EditorCommandSource,
+                                          const String&);
+  static bool ExecuteMoveToEndOfParagraphAndModifySelection(LocalFrame&,
+                                                            Event*,
+                                                            EditorCommandSource,
+                                                            const String&);
+  static bool ExecuteMoveToEndOfSentence(LocalFrame&,
+                                         Event*,
+                                         EditorCommandSource,
+                                         const String&);
+  static bool ExecuteMoveToEndOfSentenceAndModifySelection(LocalFrame&,
+                                                           Event*,
+                                                           EditorCommandSource,
+                                                           const String&);
+  static bool ExecuteMoveToLeftEndOfLine(LocalFrame&,
+                                         Event*,
+                                         EditorCommandSource,
+                                         const String&);
+  static bool ExecuteMoveToLeftEndOfLineAndModifySelection(LocalFrame&,
+                                                           Event*,
+                                                           EditorCommandSource,
+                                                           const String&);
+  static bool ExecuteMoveToRightEndOfLine(LocalFrame&,
+                                          Event*,
+                                          EditorCommandSource,
+                                          const String&);
+  static bool ExecuteMoveToRightEndOfLineAndModifySelection(LocalFrame&,
+                                                            Event*,
+                                                            EditorCommandSource,
+                                                            const String&);
+  static bool ExecuteMoveUp(LocalFrame&,
+                            Event*,
+                            EditorCommandSource,
+                            const String&);
+  static bool ExecuteMoveUpAndModifySelection(LocalFrame&,
+                                              Event*,
+                                              EditorCommandSource,
+                                              const String&);
+  static bool ExecuteMoveWordBackward(LocalFrame&,
+                                      Event*,
+                                      EditorCommandSource,
+                                      const String&);
+  static bool ExecuteMoveWordBackwardAndModifySelection(LocalFrame&,
+                                                        Event*,
+                                                        EditorCommandSource,
+                                                        const String&);
+  static bool ExecuteMoveWordForward(LocalFrame&,
+                                     Event*,
+                                     EditorCommandSource,
+                                     const String&);
+  static bool ExecuteMoveWordForwardAndModifySelection(LocalFrame&,
+                                                       Event*,
+                                                       EditorCommandSource,
+                                                       const String&);
+  static bool ExecuteMoveWordLeft(LocalFrame&,
+                                  Event*,
+                                  EditorCommandSource,
+                                  const String&);
+  static bool ExecuteMoveWordLeftAndModifySelection(LocalFrame&,
+                                                    Event*,
+                                                    EditorCommandSource,
+                                                    const String&);
+  static bool ExecuteMoveWordRight(LocalFrame&,
+                                   Event*,
+                                   EditorCommandSource,
+                                   const String&);
+  static bool ExecuteMoveWordRightAndModifySelection(LocalFrame&,
+                                                     Event*,
+                                                     EditorCommandSource,
+                                                     const String&);
+
+ private:
+  static unsigned VerticalScrollDistance(LocalFrame&);
+
+  // Returns true if selection is modified.
+  static bool ModifySelectionWithPageGranularity(
+      LocalFrame&,
+      SelectionModifyAlteration,
+      unsigned,
+      SelectionModifyVerticalDirection);
+};
+
+}  // namespace blink
+
+#endif
diff --git a/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp b/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
index 27cd97b..da3fcad 100644
--- a/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
@@ -848,8 +848,9 @@
     return;
 
   // If the caret is at the start of a paragraph after a table, move content
-  // into the last table cell.
-  if (IsStartOfParagraph(visible_start) &&
+  // into the last table cell (this is done to follows macOS' behavior).
+  if (frame->GetEditor().Behavior().ShouldMergeContentWithTablesOnBackspace() &&
+      IsStartOfParagraph(visible_start) &&
       TableElementJustBefore(
           PreviousPositionOf(visible_start, kCannotCrossEditingBoundary))) {
     // Unless the caret is just before a table.  We don't want to move a
diff --git a/third_party/WebKit/Source/core/editing/serializers/StyledMarkupSerializer.cpp b/third_party/WebKit/Source/core/editing/serializers/StyledMarkupSerializer.cpp
index 036e8e7..f519ed1 100644
--- a/third_party/WebKit/Source/core/editing/serializers/StyledMarkupSerializer.cpp
+++ b/third_party/WebKit/Source/core/editing/serializers/StyledMarkupSerializer.cpp
@@ -33,7 +33,6 @@
 #include "core/css/CSSPropertyValueSet.h"
 #include "core/dom/Document.h"
 #include "core/dom/Element.h"
-#include "core/dom/ElementShadow.h"
 #include "core/dom/Text.h"
 #include "core/editing/EditingStyle.h"
 #include "core/editing/EditingStyleUtilities.h"
diff --git a/third_party/WebKit/Source/core/editing/testing/SelectionSample.cpp b/third_party/WebKit/Source/core/editing/testing/SelectionSample.cpp
index 5be24996..256e89b2 100644
--- a/third_party/WebKit/Source/core/editing/testing/SelectionSample.cpp
+++ b/third_party/WebKit/Source/core/editing/testing/SelectionSample.cpp
@@ -10,7 +10,6 @@
 #include "core/dom/CharacterData.h"
 #include "core/dom/Document.h"
 #include "core/dom/Element.h"
-#include "core/dom/ElementShadow.h"
 #include "core/dom/ProcessingInstruction.h"
 #include "core/dom/ShadowRootInit.h"
 #include "core/editing/EditingUtilities.h"
diff --git a/third_party/WebKit/Source/core/editing/testing/SelectionSampleTest.cpp b/third_party/WebKit/Source/core/editing/testing/SelectionSampleTest.cpp
index 8e291d2..9912b87 100644
--- a/third_party/WebKit/Source/core/editing/testing/SelectionSampleTest.cpp
+++ b/third_party/WebKit/Source/core/editing/testing/SelectionSampleTest.cpp
@@ -4,7 +4,6 @@
 
 #include "core/editing/testing/SelectionSample.h"
 
-#include "core/dom/ElementShadow.h"
 #include "core/dom/ProcessingInstruction.h"
 #include "core/editing/SelectionTemplate.h"
 #include "core/editing/testing/EditingTestBase.h"
diff --git a/third_party/WebKit/Source/core/exported/WebElement.cpp b/third_party/WebKit/Source/core/exported/WebElement.cpp
index 35f8c434..2e0b819 100644
--- a/third_party/WebKit/Source/core/exported/WebElement.cpp
+++ b/third_party/WebKit/Source/core/exported/WebElement.cpp
@@ -32,7 +32,6 @@
 
 #include "bindings/core/v8/ExceptionState.h"
 #include "core/dom/Element.h"
-#include "core/dom/ElementShadow.h"
 #include "core/editing/EditingUtilities.h"
 #include "core/fullscreen/Fullscreen.h"
 #include "core/html/custom/CustomElement.h"
diff --git a/third_party/WebKit/Source/core/exported/WebFrameSerializer.cpp b/third_party/WebKit/Source/core/exported/WebFrameSerializer.cpp
index 9f23b536..651e41d 100644
--- a/third_party/WebKit/Source/core/exported/WebFrameSerializer.cpp
+++ b/third_party/WebKit/Source/core/exported/WebFrameSerializer.cpp
@@ -33,7 +33,7 @@
 #include "base/macros.h"
 #include "core/dom/Document.h"
 #include "core/dom/Element.h"
-#include "core/dom/ElementShadow.h"
+#include "core/dom/ShadowRoot.h"
 #include "core/exported/WebRemoteFrameImpl.h"
 #include "core/frame/Frame.h"
 #include "core/frame/FrameSerializer.h"
@@ -86,6 +86,15 @@
 const char kShadowModeAttributeName[] = "shadowmode";
 const char kShadowDelegatesFocusAttributeName[] = "shadowdelegatesfocus";
 
+// Returns a Content-ID to be used for the given frame.
+// See rfc2557 - section 8.3 - "Use of the Content-ID header and CID URLs".
+// Format note - the returned string should be of the form "<foo@bar.com>"
+// (i.e. the strings should include the angle brackets).
+String GetContentID(Frame* frame) {
+  String frame_id = String(ToTraceValue(frame).data());
+  return "<frame-" + frame_id + "@mhtml.blink>";
+}
+
 class MHTMLFrameSerializerDelegate final : public FrameSerializer::Delegate {
   STACK_ALLOCATED();
 
@@ -263,10 +272,7 @@
   if (!frame)
     return false;
 
-  WebString content_id = web_delegate_.GetContentID(WebFrame::FromFrame(frame));
-  if (content_id.IsNull())
-    return false;
-
+  WebString content_id = GetContentID(frame);
   KURL cid_uri = MHTMLParser::ConvertContentIDToURI(content_id);
   DCHECK(cid_uri.IsValid());
 
@@ -504,9 +510,9 @@
         "PageSerialization.MhtmlGeneration.EncodingTime.SingleFrame");
     // Frame is the 1st resource (see FrameSerializer::serializeFrame doc
     // comment). Frames get a Content-ID header.
-    MHTMLArchive::GenerateMHTMLPart(
-        boundary, web_delegate->GetContentID(web_frame), encoding_policy,
-        resources.TakeFirst(), *output->MutableData());
+    MHTMLArchive::GenerateMHTMLPart(boundary, GetContentID(frame),
+                                    encoding_policy, resources.TakeFirst(),
+                                    *output->MutableData());
     while (!resources.IsEmpty()) {
       TRACE_EVENT0("page-serialization",
                    "WebFrameSerializer::generateMHTMLParts encoding");
diff --git a/third_party/WebKit/Source/core/exported/WebFrameSerializerSanitizationTest.cpp b/third_party/WebKit/Source/core/exported/WebFrameSerializerSanitizationTest.cpp
index dd7a3af..42cf2026 100644
--- a/third_party/WebKit/Source/core/exported/WebFrameSerializerSanitizationTest.cpp
+++ b/third_party/WebKit/Source/core/exported/WebFrameSerializerSanitizationTest.cpp
@@ -63,8 +63,6 @@
  private:
   bool ShouldSkipResource(const WebURL&) final { return false; }
 
-  WebString GetContentID(WebFrame*) final { return WebString("<cid>"); }
-
   WebFrameSerializerCacheControlPolicy CacheControlPolicy() final {
     return WebFrameSerializerCacheControlPolicy::kNone;
   }
diff --git a/third_party/WebKit/Source/core/exported/WebInputElement.cpp b/third_party/WebKit/Source/core/exported/WebInputElement.cpp
index 29825e5..f1d5bae 100644
--- a/third_party/WebKit/Source/core/exported/WebInputElement.cpp
+++ b/third_party/WebKit/Source/core/exported/WebInputElement.cpp
@@ -30,7 +30,6 @@
 
 #include "public/web/WebInputElement.h"
 
-#include "core/dom/ElementShadow.h"
 #include "core/dom/ShadowRoot.h"
 #include "core/html/forms/HTMLDataListElement.h"
 #include "core/html/forms/HTMLDataListOptionsCollection.h"
diff --git a/third_party/WebKit/Source/core/frame/MHTMLLoadingTest.cpp b/third_party/WebKit/Source/core/frame/MHTMLLoadingTest.cpp
index 149a39c..6fd7d77 100644
--- a/third_party/WebKit/Source/core/frame/MHTMLLoadingTest.cpp
+++ b/third_party/WebKit/Source/core/frame/MHTMLLoadingTest.cpp
@@ -32,7 +32,7 @@
 #include "core/dom/ClassCollection.h"
 #include "core/dom/Document.h"
 #include "core/dom/Element.h"
-#include "core/dom/ElementShadow.h"
+#include "core/dom/ShadowRoot.h"
 #include "core/frame/FrameTestHelpers.h"
 #include "core/frame/LocalFrame.h"
 #include "core/frame/Location.h"
diff --git a/third_party/WebKit/Source/core/html/HTMLContentElement.cpp b/third_party/WebKit/Source/core/html/HTMLContentElement.cpp
index f25422e..3480689 100644
--- a/third_party/WebKit/Source/core/html/HTMLContentElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLContentElement.cpp
@@ -28,10 +28,9 @@
 
 #include "core/css/SelectorChecker.h"
 #include "core/css/parser/CSSParser.h"
-#include "core/dom/ElementShadow.h"
-#include "core/dom/ElementShadowV0.h"
 #include "core/dom/QualifiedName.h"
 #include "core/dom/ShadowRoot.h"
+#include "core/dom/ShadowRootV0.h"
 #include "core/frame/UseCounter.h"
 #include "core/html_names.h"
 
@@ -69,8 +68,8 @@
     const AttributeModificationParams& params) {
   if (params.name == selectAttr) {
     if (ShadowRoot* root = ContainingShadowRoot()) {
-      if (!root->IsV1() && root->Owner())
-        root->Owner()->V0().WillAffectSelector();
+      if (!root->IsV1())
+        root->V0().WillAffectSelector();
     }
     should_parse_select_ = true;
     select_ = params.new_value;
diff --git a/third_party/WebKit/Source/core/html/HTMLElement.cpp b/third_party/WebKit/Source/core/html/HTMLElement.cpp
index 960f7625..b498d61 100644
--- a/third_party/WebKit/Source/core/html/HTMLElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLElement.cpp
@@ -34,7 +34,6 @@
 #include "core/css_property_names.h"
 #include "core/css_value_keywords.h"
 #include "core/dom/DocumentFragment.h"
-#include "core/dom/ElementShadow.h"
 #include "core/dom/ElementTraversal.h"
 #include "core/dom/ExceptionCode.h"
 #include "core/dom/FlatTreeTraversal.h"
diff --git a/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp b/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp
index f21a3b02..9f433b9 100644
--- a/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp
@@ -33,11 +33,10 @@
 #include <array>
 #include "core/css/StyleChangeReason.h"
 #include "core/css/StyleEngine.h"
-#include "core/dom/ElementShadow.h"
 #include "core/dom/NodeComputedStyle.h"
 #include "core/dom/NodeTraversal.h"
+#include "core/dom/ShadowRoot.h"
 #include "core/dom/SlotAssignment.h"
-#include "core/dom/V0InsertionPoint.h"
 #include "core/dom/WhitespaceAttacher.h"
 #include "core/dom/events/Event.h"
 #include "core/frame/UseCounter.h"
@@ -212,7 +211,7 @@
     }
 
     if (IsChildOfV1ShadowHost())
-      ParentElementShadow()->SetNeedsDistributionRecalc();
+      ParentElementShadowRoot()->SetNeedsDistributionRecalc();
   }
 }
 
@@ -231,6 +230,10 @@
 
 void HTMLSlotElement::ClearAssignedNodes() {
   DCHECK(RuntimeEnabledFeatures::IncrementalShadowDOMEnabled());
+  // TODO(hayato): Avoid uncondional LazyReattach
+  for (const auto& node : assigned_nodes_)
+    node->LazyReattachIfAttached();
+
   assigned_nodes_.clear();
 }
 
@@ -395,7 +398,6 @@
     ShadowRoot* root = ContainingShadowRoot();
     DCHECK(root);
     DCHECK(root->IsV1());
-    DCHECK(root->Owner());
     if (root == insertion_point->ContainingShadowRoot()) {
       // This slot is inserted into the same tree of |insertion_point|
       root->DidAddSlot(*this);
@@ -562,7 +564,7 @@
   if (RuntimeEnabledFeatures::IncrementalShadowDOMEnabled())
     ContainingShadowRoot()->GetSlotAssignment().SetNeedsAssignmentRecalc();
   else
-    ContainingShadowRoot()->Owner()->SetNeedsDistributionRecalc();
+    ContainingShadowRoot()->SetNeedsDistributionRecalc();
 }
 
 void HTMLSlotElement::DidSlotChange(SlotChangeType slot_change_type) {
diff --git a/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.cpp
index 38fc8f8..92fc088 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.cpp
@@ -44,10 +44,10 @@
 #include "core/dom/DocumentFragment.h"
 #include "core/dom/DocumentType.h"
 #include "core/dom/Element.h"
-#include "core/dom/ElementShadow.h"
 #include "core/dom/Node.h"
 #include "core/dom/PseudoElement.h"
 #include "core/dom/ShadowRoot.h"
+#include "core/dom/ShadowRootV0.h"
 #include "core/dom/StaticNodeList.h"
 #include "core/dom/Text.h"
 #include "core/dom/V0InsertionPoint.h"
@@ -1982,7 +1982,7 @@
 
   if (ShadowRoot* root = shadow_host->GetShadowRoot()) {
     const HeapVector<Member<V0InsertionPoint>>& insertion_points =
-        root->DescendantInsertionPoints();
+        root->V0().DescendantInsertionPoints();
     for (const auto& it : insertion_points) {
       V0InsertionPoint* insertion_point = it.Get();
       int insertion_point_id = document_node_to_id_map_->at(insertion_point);
diff --git a/third_party/WebKit/Source/core/layout/BUILD.gn b/third_party/WebKit/Source/core/layout/BUILD.gn
index 2164136..28343f9 100644
--- a/third_party/WebKit/Source/core/layout/BUILD.gn
+++ b/third_party/WebKit/Source/core/layout/BUILD.gn
@@ -266,6 +266,7 @@
     "custom/CSSLayoutWorklet.h",
     "custom/CustomLayoutChild.cpp",
     "custom/CustomLayoutChild.h",
+    "custom/CustomLayoutConstraints.h",
     "custom/CustomLayoutFragment.cpp",
     "custom/CustomLayoutFragment.h",
     "custom/CustomLayoutFragmentRequest.cpp",
diff --git a/third_party/WebKit/Source/core/layout/custom/CSSLayoutDefinition.cpp b/third_party/WebKit/Source/core/layout/custom/CSSLayoutDefinition.cpp
index 12f8d77..44f1bbd 100644
--- a/third_party/WebKit/Source/core/layout/custom/CSSLayoutDefinition.cpp
+++ b/third_party/WebKit/Source/core/layout/custom/CSSLayoutDefinition.cpp
@@ -14,6 +14,7 @@
 #include "core/css/cssom/PrepopulatedComputedStylePropertyMap.h"
 #include "core/dom/ExecutionContext.h"
 #include "core/inspector/ConsoleMessage.h"
+#include "core/layout/custom/CustomLayoutConstraints.h"
 #include "core/layout/custom/CustomLayoutFragment.h"
 #include "core/layout/custom/FragmentResultOptions.h"
 #include "core/layout/custom/LayoutCustom.h"
@@ -91,6 +92,9 @@
       return false;
   }
 
+  CustomLayoutConstraints* constraints =
+      new CustomLayoutConstraints(layout_custom.LogicalWidth());
+
   // TODO(ikilpatrick): Instead of creating a new style_map each time here,
   // store on LayoutCustom, and update when the style changes.
   StylePropertyMapReadOnly* style_map =
@@ -103,8 +107,8 @@
   Vector<v8::Local<v8::Value>> argv = {
       children,
       v8::Undefined(isolate),  // edges
-      v8::Undefined(isolate),  // constraints
-      ToV8(style_map, script_state->GetContext()->Global(), isolate),
+      ToV8(constraints, context->Global(), isolate),
+      ToV8(style_map, context->Global(), isolate),
   };
 
   v8::Local<v8::Value> generator_value;
diff --git a/third_party/WebKit/Source/core/layout/custom/CustomLayoutConstraints.h b/third_party/WebKit/Source/core/layout/custom/CustomLayoutConstraints.h
new file mode 100644
index 0000000..10b758c
--- /dev/null
+++ b/third_party/WebKit/Source/core/layout/custom/CustomLayoutConstraints.h
@@ -0,0 +1,33 @@
+// 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 CustomLayoutConstraints_h
+#define CustomLayoutConstraints_h
+
+#include "platform/bindings/ScriptWrappable.h"
+#include "platform/heap/Handle.h"
+
+namespace blink {
+
+// Represents the constraints given to the layout by the parent that isn't
+// encapsulated by the style, or edges.
+class CustomLayoutConstraints : public ScriptWrappable {
+  WTF_MAKE_NONCOPYABLE(CustomLayoutConstraints);
+  DEFINE_WRAPPERTYPEINFO();
+
+ public:
+  CustomLayoutConstraints(LayoutUnit fixed_inline_size)
+      : fixed_inline_size_(fixed_inline_size.ToDouble()) {}
+  virtual ~CustomLayoutConstraints() = default;
+
+  // LayoutConstraints.idl
+  double fixedInlineSize() const { return fixed_inline_size_; }
+
+ private:
+  double fixed_inline_size_;
+};
+
+}  // namespace blink
+
+#endif  // CustomLayoutConstraints_h
diff --git a/third_party/WebKit/Source/core/layout/custom/LayoutConstraints.idl b/third_party/WebKit/Source/core/layout/custom/LayoutConstraints.idl
new file mode 100644
index 0000000..b64fca0f
--- /dev/null
+++ b/third_party/WebKit/Source/core/layout/custom/LayoutConstraints.idl
@@ -0,0 +1,23 @@
+// 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.
+
+// https://drafts.css-houdini.org/css-layout-api/#layoutconstraints
+
+[
+  Exposed=LayoutWorklet,
+  ImplementedAs=CustomLayoutConstraints,
+  RuntimeEnabled=CSSLayoutAPI
+]
+interface LayoutConstraints {
+  readonly attribute double fixedInlineSize;
+  // readonly attribute double? fixedBlockSize;
+
+  // readonly attribute double availableInlineSize;
+  // readonly attribute double availableBlockSize;
+
+  // readonly attribute double percentageInlineSize;
+  // readonly attribute double percentageBlockSize;
+
+  // readonly attribute any data;
+};
diff --git a/third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp b/third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp
index aef8b1b0..d8816b7 100644
--- a/third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp
+++ b/third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp
@@ -235,7 +235,7 @@
  public:
   WebWorkerFetchContextForTest(KURL site_for_cookies)
       : site_for_cookies_(site_for_cookies.Copy()) {}
-  base::WaitableEvent* GetTerminateSyncLoadEvent() override { return nullptr; }
+  void SetTerminateSyncLoadEvent(base::WaitableEvent*) override {}
   void InitializeOnWorkerThread() override {}
 
   std::unique_ptr<WebURLLoaderFactory> CreateURLLoaderFactory() override {
diff --git a/third_party/WebKit/Source/core/page/FocusController.cpp b/third_party/WebKit/Source/core/page/FocusController.cpp
index 68656df..baf34d2c 100644
--- a/third_party/WebKit/Source/core/page/FocusController.cpp
+++ b/third_party/WebKit/Source/core/page/FocusController.cpp
@@ -30,7 +30,6 @@
 #include "core/dom/ContainerNode.h"
 #include "core/dom/Document.h"
 #include "core/dom/Element.h"
-#include "core/dom/ElementShadow.h"
 #include "core/dom/ElementTraversal.h"
 #include "core/dom/Range.h"
 #include "core/dom/ShadowRoot.h"
diff --git a/third_party/WebKit/Source/core/svg/SVGUseElement.cpp b/third_party/WebKit/Source/core/svg/SVGUseElement.cpp
index 1649dd7..1b8c4e9 100644
--- a/third_party/WebKit/Source/core/svg/SVGUseElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGUseElement.cpp
@@ -27,7 +27,6 @@
 
 #include "core/css/StyleChangeReason.h"
 #include "core/dom/Document.h"
-#include "core/dom/ElementShadow.h"
 #include "core/dom/ElementTraversal.h"
 #include "core/dom/IdTargetObserver.h"
 #include "core/dom/ShadowRoot.h"
@@ -82,7 +81,7 @@
 SVGUseElement* SVGUseElement::Create(Document& document) {
   // Always build a user agent #shadow-root for SVGUseElement.
   SVGUseElement* use = new SVGUseElement(document);
-  use->EnsureShadow().AddShadowRoot(*use, ShadowRootType::kClosed);
+  use->AttachShadowRootInternal(ShadowRootType::kClosed);
   return use;
 }
 
diff --git a/third_party/WebKit/Source/core/testing/Internals.cpp b/third_party/WebKit/Source/core/testing/Internals.cpp
index 5e1a4c7a..58dfb02 100644
--- a/third_party/WebKit/Source/core/testing/Internals.cpp
+++ b/third_party/WebKit/Source/core/testing/Internals.cpp
@@ -45,8 +45,6 @@
 #include "core/dom/DOMStringList.h"
 #include "core/dom/Document.h"
 #include "core/dom/Element.h"
-#include "core/dom/ElementShadow.h"
-#include "core/dom/ElementShadowV0.h"
 #include "core/dom/ExceptionCode.h"
 #include "core/dom/FlatTreeTraversal.h"
 #include "core/dom/Iterator.h"
@@ -54,6 +52,7 @@
 #include "core/dom/PseudoElement.h"
 #include "core/dom/Range.h"
 #include "core/dom/ShadowRoot.h"
+#include "core/dom/ShadowRootV0.h"
 #include "core/dom/StaticNodeList.h"
 #include "core/dom/TreeScope.h"
 #include "core/dom/ViewportDescription.h"
@@ -596,7 +595,7 @@
         kInvalidAccessError, "The node argument is not a shadow root.");
     return false;
   }
-  return ToShadowRoot(root)->ContainsShadowElements();
+  return ToShadowRoot(root)->V0().ContainsShadowElements();
 }
 
 bool Internals::hasContentElement(const Node* root,
@@ -607,7 +606,7 @@
         kInvalidAccessError, "The node argument is not a shadow root.");
     return false;
   }
-  return ToShadowRoot(root)->ContainsContentElements();
+  return ToShadowRoot(root)->V0().ContainsContentElements();
 }
 
 size_t Internals::countElementShadow(const Node* root,
diff --git a/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.cpp b/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.cpp
index 6ed65797..de5c243 100644
--- a/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.cpp
+++ b/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.cpp
@@ -34,6 +34,9 @@
       worker_inspector_proxy_(WorkerInspectorProxy::Create()),
       parent_frame_task_runners_(ParentFrameTaskRunners::Create(
           *ToDocument(execution_context_.Get())->GetFrame())),
+      terminate_sync_load_event_(
+          base::WaitableEvent::ResetPolicy::MANUAL,
+          base::WaitableEvent::InitialState::NOT_SIGNALED),
       keep_alive_(this) {
   DCHECK(IsParentContextThread());
   g_live_messaging_proxy_count++;
@@ -68,8 +71,8 @@
     std::unique_ptr<WebWorkerFetchContext> web_worker_fetch_context =
         web_frame->Client()->CreateWorkerFetchContext();
     DCHECK(web_worker_fetch_context);
-    terminate_sync_load_event_ =
-        web_worker_fetch_context->GetTerminateSyncLoadEvent();
+    web_worker_fetch_context->SetTerminateSyncLoadEvent(
+        &terminate_sync_load_event_);
     web_worker_fetch_context->SetApplicationCacheHostID(
         document->Fetcher()->Context().ApplicationCacheHostID());
     web_worker_fetch_context->SetIsOnSubframe(
@@ -144,10 +147,7 @@
     return;
   asked_to_terminate_ = true;
 
-  if (terminate_sync_load_event_) {
-    terminate_sync_load_event_->Signal();
-    terminate_sync_load_event_ = nullptr;
-  }
+  terminate_sync_load_event_.Signal();
 
   if (worker_thread_)
     worker_thread_->Terminate();
diff --git a/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.h b/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.h
index 31796d1f..33cb4fb8 100644
--- a/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.h
+++ b/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.h
@@ -104,7 +104,9 @@
 
   bool asked_to_terminate_ = false;
 
-  base::WaitableEvent* terminate_sync_load_event_ = nullptr;
+  // Used to terminate the synchronous resource loading (XMLHttpRequest) on the
+  // worker thread from the main thread.
+  base::WaitableEvent terminate_sync_load_event_;
 
   // Used to keep this alive until the worker thread gets terminated. This is
   // necessary because the co-owner (i.e., Worker or Worklet object) can be
diff --git a/third_party/WebKit/Source/devtools/front_end/elements/StylePropertyTreeElement.js b/third_party/WebKit/Source/devtools/front_end/elements/StylePropertyTreeElement.js
index 6372137..0de80ab 100644
--- a/third_party/WebKit/Source/devtools/front_end/elements/StylePropertyTreeElement.js
+++ b/third_party/WebKit/Source/devtools/front_end/elements/StylePropertyTreeElement.js
@@ -562,7 +562,9 @@
     } else {
       cssCompletions = SDK.cssMetadata().propertyValues(this.nameElement.textContent);
     }
-    const cssVariables = this._matchedStyles.cssVariables().sort(String.naturalOrderComparator);
+
+    const cssVariables = this._matchedStyles.availableCSSVariables(this.property.ownerStyle);
+    cssVariables.sort(String.naturalOrderComparator);
 
     this._prompt = new Elements.StylesSidebarPane.CSSPropertyPrompt(cssCompletions, cssVariables, this, isEditingName);
     this._prompt.setAutocompletionTimeout(0);
@@ -965,4 +967,4 @@
 
 /** @typedef {{expanded: boolean, hasChildren: boolean, isEditingName: boolean, previousContent: string}} */
 Elements.StylePropertyTreeElement.Context;
-Elements.StylePropertyTreeElement.ActiveSymbol = Symbol('ActiveSymbol');
\ No newline at end of file
+Elements.StylePropertyTreeElement.ActiveSymbol = Symbol('ActiveSymbol');
diff --git a/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js b/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
index 045238dd..5bd00200 100644
--- a/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
+++ b/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
@@ -428,15 +428,13 @@
     this._sectionBlocks =
         await this._rebuildSectionsForMatchedStyleRules(/** @type {!SDK.CSSMatchedStyles} */ (matchedStyles));
     let pseudoTypes = [];
-    const keys = new Set(matchedStyles.pseudoStyles().keys());
+    const keys = matchedStyles.pseudoTypes();
     if (keys.delete(Protocol.DOM.PseudoType.Before))
       pseudoTypes.push(Protocol.DOM.PseudoType.Before);
     pseudoTypes = pseudoTypes.concat(keys.valuesArray().sort());
     for (const pseudoType of pseudoTypes) {
       const block = Elements.SectionBlock.createPseudoTypeBlock(pseudoType);
-      const styles =
-          /** @type {!Array<!SDK.CSSStyleDeclaration>} */ (matchedStyles.pseudoStyles().get(pseudoType));
-      for (const style of styles) {
+      for (const style of matchedStyles.pseudoStyles(pseudoType)) {
         const section = new Elements.StylePropertiesSection(this, matchedStyles, style);
         block.sections.push(section);
       }
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/CSSMatchedStyles.js b/third_party/WebKit/Source/devtools/front_end/sdk/CSSMatchedStyles.js
index 1ec8e63c..9000e9b 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/CSSMatchedStyles.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/CSSMatchedStyles.js
@@ -26,12 +26,42 @@
       animationsPayload) {
     this._cssModel = cssModel;
     this._node = node;
-    this._nodeStyles = [];
-    this._nodeForStyle = new Map();
-    this._inheritedStyles = new Set();
-    this._keyframes = [];
+    /** @type {!Map<!SDK.CSSStyleDeclaration, !SDK.DOMNode>} */
+    this._addedStyles = new Map();
     /** @type {!Map<!Protocol.DOM.NodeId, !Map<string, boolean>>} */
     this._matchingSelectors = new Map();
+    this._keyframes = [];
+    if (animationsPayload)
+      this._keyframes = animationsPayload.map(rule => new SDK.CSSKeyframesRule(cssModel, rule));
+
+    /** @type {!Map<!SDK.CSSStyleDeclaration, ?SDK.DOMNode>} */
+    this._nodeForStyle = new Map();
+    /** @type {!Set<!SDK.CSSStyleDeclaration>} */
+    this._inheritedStyles = new Set();
+    this._mainDOMCascade = this._buildMainCascade(inlinePayload, attributesPayload, matchedPayload, inheritedPayload);
+    this._pseudoDOMCascades = this._buildPseudoCascades(pseudoPayload);
+
+    /** @type {!Map<!SDK.CSSStyleDeclaration, !SDK.CSSMatchedStyles.DOMInheritanceCascade>} */
+    this._styleToDOMCascade = new Map();
+    for (const domCascade of Array.from(this._pseudoDOMCascades.values()).concat(this._mainDOMCascade)) {
+      for (const style of domCascade.styles())
+        this._styleToDOMCascade.set(style, domCascade);
+    }
+  }
+
+  /**
+   * @param {?Protocol.CSS.CSSStyle} inlinePayload
+   * @param {?Protocol.CSS.CSSStyle} attributesPayload
+   * @param {!Array.<!Protocol.CSS.RuleMatch>} matchedPayload
+   * @param {!Array.<!Protocol.CSS.InheritedStyleEntry>} inheritedPayload
+   * @return {!SDK.CSSMatchedStyles.DOMInheritanceCascade}
+   */
+  _buildMainCascade(inlinePayload, attributesPayload, matchedPayload, inheritedPayload) {
+    /** @type {!Array<!SDK.CSSMatchedStyles.NodeCascade>} */
+    const nodeCascades = [];
+
+    /** @type {!Array<!SDK.CSSStyleDeclaration>} */
+    const nodeStyles = [];
 
     /**
      * @this {SDK.CSSMatchedStyles}
@@ -40,97 +70,107 @@
       if (!attributesPayload)
         return;
       const style =
-          new SDK.CSSStyleDeclaration(cssModel, null, attributesPayload, SDK.CSSStyleDeclaration.Type.Attributes);
+          new SDK.CSSStyleDeclaration(this._cssModel, null, attributesPayload, SDK.CSSStyleDeclaration.Type.Attributes);
       this._nodeForStyle.set(style, this._node);
-      this._nodeStyles.push(style);
+      nodeStyles.push(style);
     }
 
     // Inline style has the greatest specificity.
     if (inlinePayload && this._node.nodeType() === Node.ELEMENT_NODE) {
-      const style = new SDK.CSSStyleDeclaration(cssModel, null, inlinePayload, SDK.CSSStyleDeclaration.Type.Inline);
+      const style =
+          new SDK.CSSStyleDeclaration(this._cssModel, null, inlinePayload, SDK.CSSStyleDeclaration.Type.Inline);
       this._nodeForStyle.set(style, this._node);
-      this._nodeStyles.push(style);
+      nodeStyles.push(style);
     }
 
     // Add rules in reverse order to match the cascade order.
     let addedAttributesStyle;
     for (let i = matchedPayload.length - 1; i >= 0; --i) {
-      const rule = new SDK.CSSStyleRule(cssModel, matchedPayload[i].rule);
+      const rule = new SDK.CSSStyleRule(this._cssModel, matchedPayload[i].rule);
       if ((rule.isInjected() || rule.isUserAgent()) && !addedAttributesStyle) {
         // Show element's Style Attributes after all author rules.
         addedAttributesStyle = true;
         addAttributesStyle.call(this);
       }
       this._nodeForStyle.set(rule.style, this._node);
-      this._nodeStyles.push(rule.style);
-      addMatchingSelectors.call(this, this._node, rule, matchedPayload[i].matchingSelectors);
+      nodeStyles.push(rule.style);
+      this._addMatchingSelectors(this._node, rule, matchedPayload[i].matchingSelectors);
     }
 
     if (!addedAttributesStyle)
       addAttributesStyle.call(this);
+    nodeCascades.push(new SDK.CSSMatchedStyles.NodeCascade(this, nodeStyles, false /* isInherited */));
 
     // Walk the node structure and identify styles with inherited properties.
     let parentNode = this._node.parentNode;
     for (let i = 0; parentNode && inheritedPayload && i < inheritedPayload.length; ++i) {
+      const inheritedStyles = [];
       const entryPayload = inheritedPayload[i];
       const inheritedInlineStyle = entryPayload.inlineStyle ?
-          new SDK.CSSStyleDeclaration(cssModel, null, entryPayload.inlineStyle, SDK.CSSStyleDeclaration.Type.Inline) :
+          new SDK.CSSStyleDeclaration(
+              this._cssModel, null, entryPayload.inlineStyle, SDK.CSSStyleDeclaration.Type.Inline) :
           null;
       if (inheritedInlineStyle && this._containsInherited(inheritedInlineStyle)) {
         this._nodeForStyle.set(inheritedInlineStyle, parentNode);
-        this._nodeStyles.push(inheritedInlineStyle);
+        inheritedStyles.push(inheritedInlineStyle);
         this._inheritedStyles.add(inheritedInlineStyle);
       }
 
       const inheritedMatchedCSSRules = entryPayload.matchedCSSRules || [];
       for (let j = inheritedMatchedCSSRules.length - 1; j >= 0; --j) {
-        const inheritedRule = new SDK.CSSStyleRule(cssModel, inheritedMatchedCSSRules[j].rule);
-        addMatchingSelectors.call(this, parentNode, inheritedRule, inheritedMatchedCSSRules[j].matchingSelectors);
+        const inheritedRule = new SDK.CSSStyleRule(this._cssModel, inheritedMatchedCSSRules[j].rule);
+        this._addMatchingSelectors(parentNode, inheritedRule, inheritedMatchedCSSRules[j].matchingSelectors);
         if (!this._containsInherited(inheritedRule.style))
           continue;
         this._nodeForStyle.set(inheritedRule.style, parentNode);
-        this._nodeStyles.push(inheritedRule.style);
+        inheritedStyles.push(inheritedRule.style);
         this._inheritedStyles.add(inheritedRule.style);
       }
       parentNode = parentNode.parentNode;
+      nodeCascades.push(new SDK.CSSMatchedStyles.NodeCascade(this, inheritedStyles, true /* isInherited */));
     }
 
-    // Set up pseudo styles map.
-    this._pseudoStyles = new Map();
-    if (pseudoPayload) {
-      for (let i = 0; i < pseudoPayload.length; ++i) {
-        const entryPayload = pseudoPayload[i];
-        // PseudoElement nodes are not created unless "content" css property is set.
-        const pseudoElement = this._node.pseudoElements().get(entryPayload.pseudoType) || null;
-        const pseudoStyles = [];
-        const rules = entryPayload.matches || [];
-        for (let j = rules.length - 1; j >= 0; --j) {
-          const pseudoRule = new SDK.CSSStyleRule(cssModel, rules[j].rule);
-          pseudoStyles.push(pseudoRule.style);
-          this._nodeForStyle.set(pseudoRule.style, pseudoElement);
-          if (pseudoElement)
-            addMatchingSelectors.call(this, pseudoElement, pseudoRule, rules[j].matchingSelectors);
-        }
-        this._pseudoStyles.set(entryPayload.pseudoType, pseudoStyles);
+    return new SDK.CSSMatchedStyles.DOMInheritanceCascade(nodeCascades);
+  }
+
+  /**
+   * @param {!Array.<!Protocol.CSS.PseudoElementMatches>} pseudoPayload
+   * @return {!Map<!Protocol.DOM.PseudoType, !SDK.CSSMatchedStyles.DOMInheritanceCascade>}
+   */
+  _buildPseudoCascades(pseudoPayload) {
+    /** @type {!Map<!Protocol.DOM.PseudoType, !SDK.CSSMatchedStyles.DOMInheritanceCascade>} */
+    const pseudoCascades = new Map();
+    if (!pseudoPayload)
+      return pseudoCascades;
+    for (let i = 0; i < pseudoPayload.length; ++i) {
+      const entryPayload = pseudoPayload[i];
+      // PseudoElement nodes are not created unless "content" css property is set.
+      const pseudoElement = this._node.pseudoElements().get(entryPayload.pseudoType) || null;
+      const pseudoStyles = [];
+      const rules = entryPayload.matches || [];
+      for (let j = rules.length - 1; j >= 0; --j) {
+        const pseudoRule = new SDK.CSSStyleRule(this._cssModel, rules[j].rule);
+        pseudoStyles.push(pseudoRule.style);
+        this._nodeForStyle.set(pseudoRule.style, pseudoElement);
+        if (pseudoElement)
+          this._addMatchingSelectors(pseudoElement, pseudoRule, rules[j].matchingSelectors);
       }
+      const nodeCascade = new SDK.CSSMatchedStyles.NodeCascade(this, pseudoStyles, false /* isInherited */);
+      pseudoCascades.set(entryPayload.pseudoType, new SDK.CSSMatchedStyles.DOMInheritanceCascade([nodeCascade]));
     }
+    return pseudoCascades;
+  }
 
-    if (animationsPayload)
-      this._keyframes = animationsPayload.map(rule => new SDK.CSSKeyframesRule(cssModel, rule));
-
-    this.resetActiveProperties();
-
-    /**
-     * @param {!SDK.DOMNode} node
-     * @param {!SDK.CSSStyleRule} rule
-     * @param {!Array<number>} matchingSelectorIndices
-     * @this {SDK.CSSMatchedStyles}
-     */
-    function addMatchingSelectors(node, rule, matchingSelectorIndices) {
-      for (const matchingSelectorIndex of matchingSelectorIndices) {
-        const selector = rule.selectors[matchingSelectorIndex];
-        this._setSelectorMatches(node, selector.text, true);
-      }
+  /**
+   * @param {!SDK.DOMNode} node
+   * @param {!SDK.CSSStyleRule} rule
+   * @param {!Array<number>} matchingSelectorIndices
+   * @this {SDK.CSSMatchedStyles}
+   */
+  _addMatchingSelectors(node, rule, matchingSelectorIndices) {
+    for (const matchingSelectorIndex of matchingSelectorIndices) {
+      const selector = rule.selectors[matchingSelectorIndex];
+      this._setSelectorMatches(node, selector.text, true);
     }
   }
 
@@ -215,7 +255,7 @@
    * @return {!Promise}
    */
   addNewRule(rule, node) {
-    this._nodeForStyle.set(rule.style, node);
+    this._addedStyles.set(rule.style, node);
     return this.recomputeMatchingSelectors(rule);
   }
 
@@ -250,7 +290,7 @@
    * @return {!Array<!SDK.CSSStyleDeclaration>}
    */
   nodeStyles() {
-    return this._nodeStyles;
+    return this._mainDOMCascade.styles();
   }
 
   /**
@@ -261,10 +301,19 @@
   }
 
   /**
-   * @return {!Map.<!Protocol.DOM.PseudoType, !Array<!SDK.CSSStyleDeclaration>>}
+   * @param {!Protocol.DOM.PseudoType} pseudoType
+   * @return {!Array<!SDK.CSSStyleDeclaration>}
    */
-  pseudoStyles() {
-    return this._pseudoStyles;
+  pseudoStyles(pseudoType) {
+    const domCascade = this._pseudoDOMCascades.get(pseudoType);
+    return domCascade ? domCascade.styles() : [];
+  }
+
+  /**
+   * @return {!Set<!Protocol.DOM.PseudoType>}
+   */
+  pseudoTypes() {
+    return new Set(this._pseudoDOMCascades.keys());
   }
 
   /**
@@ -287,21 +336,36 @@
    * @return {?SDK.DOMNode}
    */
   nodeForStyle(style) {
-    return this._nodeForStyle.get(style) || null;
+    return this._addedStyles.get(style) || this._nodeForStyle.get(style) || null;
   }
 
   /**
+   * @param {!SDK.CSSStyleDeclaration} style
    * @return {!Array<string>}
    */
-  cssVariables() {
-    const cssVariables = [];
-    for (const style of this.nodeStyles()) {
-      for (const property of style.allProperties()) {
-        if (property.name.startsWith('--'))
-          cssVariables.push(property.name);
-      }
-    }
-    return cssVariables;
+  availableCSSVariables(style) {
+    const domCascade = this._styleToDOMCascade.get(style) || null;
+    return domCascade ? domCascade.availableCSSVariables(style) : [];
+  }
+
+  /**
+   * @param {!SDK.CSSStyleDeclaration} style
+   * @param {string} variableName
+   * @return {?string}
+   */
+  computeCSSVariable(style, variableName) {
+    const domCascade = this._styleToDOMCascade.get(style) || null;
+    return domCascade ? domCascade.computeCSSVariable(style, variableName) : null;
+  }
+
+  /**
+   * @param {!SDK.CSSStyleDeclaration} style
+   * @param {string} value
+   * @return {?string}
+   */
+  computeValue(style, value) {
+    const domCascade = this._styleToDOMCascade.get(style) || null;
+    return domCascade ? domCascade.computeValue(style, value) : null;
   }
 
   /**
@@ -317,114 +381,269 @@
    * @return {?SDK.CSSMatchedStyles.PropertyState}
    */
   propertyState(property) {
-    if (this._propertiesState.size === 0) {
-      this._computeActiveProperties(this._nodeStyles, this._propertiesState);
-      for (const pseudoElementStyles of this._pseudoStyles.valuesArray())
-        this._computeActiveProperties(pseudoElementStyles, this._propertiesState);
-    }
-    return this._propertiesState.get(property) || null;
+    const domCascade = this._styleToDOMCascade.get(property.ownerStyle);
+    return domCascade ? domCascade.propertyState(property) : null;
   }
 
   resetActiveProperties() {
+    this._mainDOMCascade.reset();
+    for (const domCascade of this._pseudoDOMCascades.values())
+      domCascade.reset();
+  }
+};
+
+SDK.CSSMatchedStyles.NodeCascade = class {
+  /**
+   * @param {!SDK.CSSMatchedStyles} matchedStyles
+   * @param {!Array<!SDK.CSSStyleDeclaration>} styles
+   * @param {boolean} isInherited
+   */
+  constructor(matchedStyles, styles, isInherited) {
+    this._matchedStyles = matchedStyles;
+    this._styles = styles;
+    this._isInherited = isInherited;
     /** @type {!Map<!SDK.CSSProperty, !SDK.CSSMatchedStyles.PropertyState>} */
     this._propertiesState = new Map();
+    /** @type {!Map.<string, !SDK.CSSProperty>} */
+    this._activeProperties = new Map();
   }
 
-  /**
-   * @param {!Array<!SDK.CSSStyleDeclaration>} styles
-   * @param {!Map<!SDK.CSSProperty, !SDK.CSSMatchedStyles.PropertyState>} result
-   */
-  _computeActiveProperties(styles, result) {
-    /** @type {!Set.<string>} */
-    const foundImportantProperties = new Set();
-    /** @type {!Map.<string, !Map<string, !SDK.CSSProperty>>} */
-    const propertyToEffectiveRule = new Map();
-    /** @type {!Map.<string, !SDK.DOMNode>} */
-    const inheritedPropertyToNode = new Map();
-    /** @type {!Set<string>} */
-    const allUsedProperties = new Set();
-    for (let i = 0; i < styles.length; ++i) {
-      const style = styles[i];
+  _computeActiveProperties() {
+    this._propertiesState.clear();
+    this._activeProperties.clear();
+
+    for (const style of this._styles) {
       const rule = style.parentRule;
       // Compute cascade for CSSStyleRules only.
       if (rule && !(rule instanceof SDK.CSSStyleRule))
         continue;
-      if (rule && !this.hasMatchingSelectors(rule))
+      if (rule && !this._matchedStyles.hasMatchingSelectors(rule))
         continue;
 
-      /** @type {!Map<string, !SDK.CSSProperty>} */
-      const styleActiveProperties = new Map();
-      const allProperties = style.allProperties();
-      for (let j = 0; j < allProperties.length; ++j) {
-        const property = allProperties[j];
-
+      for (const property of style.allProperties()) {
         // Do not pick non-inherited properties from inherited styles.
-        const inherited = this.isInherited(style);
-        if (inherited && !SDK.cssMetadata().isPropertyInherited(property.name))
+        if (this._isInherited && !SDK.cssMetadata().isPropertyInherited(property.name))
           continue;
 
         if (!property.activeInStyle()) {
-          result.set(property, SDK.CSSMatchedStyles.PropertyState.Overloaded);
+          this._propertiesState.set(property, SDK.CSSMatchedStyles.PropertyState.Overloaded);
           continue;
         }
 
         const canonicalName = SDK.cssMetadata().canonicalPropertyName(property.name);
-        if (foundImportantProperties.has(canonicalName)) {
-          result.set(property, SDK.CSSMatchedStyles.PropertyState.Overloaded);
+        const activeProperty = this._activeProperties.get(canonicalName);
+        if (activeProperty && (activeProperty.important || !property.important)) {
+          this._propertiesState.set(property, SDK.CSSMatchedStyles.PropertyState.Overloaded);
           continue;
         }
 
-        if (!property.important && allUsedProperties.has(canonicalName)) {
-          result.set(property, SDK.CSSMatchedStyles.PropertyState.Overloaded);
-          continue;
-        }
-
-        const isKnownProperty = propertyToEffectiveRule.has(canonicalName);
-        const inheritedFromNode = inherited ? this.nodeForStyle(style) : null;
-        if (!isKnownProperty && inheritedFromNode && !inheritedPropertyToNode.has(canonicalName))
-          inheritedPropertyToNode.set(canonicalName, inheritedFromNode);
-
-        if (property.important) {
-          if (inherited && isKnownProperty && inheritedFromNode !== inheritedPropertyToNode.get(canonicalName)) {
-            result.set(property, SDK.CSSMatchedStyles.PropertyState.Overloaded);
-            continue;
-          }
-
-          foundImportantProperties.add(canonicalName);
-          if (isKnownProperty) {
-            const overloaded =
-                /** @type {!SDK.CSSProperty} */ (propertyToEffectiveRule.get(canonicalName).get(canonicalName));
-            result.set(overloaded, SDK.CSSMatchedStyles.PropertyState.Overloaded);
-            propertyToEffectiveRule.get(canonicalName).delete(canonicalName);
-          }
-        }
-
-        styleActiveProperties.set(canonicalName, property);
-        allUsedProperties.add(canonicalName);
-        propertyToEffectiveRule.set(canonicalName, styleActiveProperties);
-        result.set(property, SDK.CSSMatchedStyles.PropertyState.Active);
+        if (activeProperty)
+          this._propertiesState.set(activeProperty, SDK.CSSMatchedStyles.PropertyState.Overloaded);
+        this._propertiesState.set(property, SDK.CSSMatchedStyles.PropertyState.Active);
+        this._activeProperties.set(canonicalName, property);
       }
+    }
+  }
+};
 
-      // If every longhand of the shorthand is not active, then the shorthand is not active too.
-      for (const property of style.leadingProperties()) {
+SDK.CSSMatchedStyles.DOMInheritanceCascade = class {
+  /**
+   * @param {!Array<!SDK.CSSMatchedStyles.NodeCascade>} nodeCascades
+   */
+  constructor(nodeCascades) {
+    this._nodeCascades = nodeCascades;
+    /** @type {!Map<!SDK.CSSProperty, !SDK.CSSMatchedStyles.PropertyState>} */
+    this._propertiesState = new Map();
+    /** @type {!Map<!SDK.CSSMatchedStyles.NodeCascade, !Map<string, string>>} */
+    this._availableCSSVariables = new Map();
+    /** @type {!Map<!SDK.CSSMatchedStyles.NodeCascade, !Map<string, ?string>>} */
+    this._computedCSSVariables = new Map();
+    this._initialized = false;
+
+    /** @type {!Map<!SDK.CSSStyleDeclaration, !SDK.CSSMatchedStyles.NodeCascade>} */
+    this._styleToNodeCascade = new Map();
+    for (const nodeCascade of nodeCascades) {
+      for (const style of nodeCascade._styles)
+        this._styleToNodeCascade.set(style, nodeCascade);
+    }
+  }
+
+  /**
+   * @param {!SDK.CSSStyleDeclaration} style
+   * @return {!Array<string>}
+   */
+  availableCSSVariables(style) {
+    const nodeCascade = this._styleToNodeCascade.get(style);
+    if (!nodeCascade)
+      return [];
+    this._ensureInitialized();
+    return Array.from(this._availableCSSVariables.get(nodeCascade).keys());
+  }
+
+  /**
+   * @param {!SDK.CSSStyleDeclaration} style
+   * @param {string} variableName
+   * @return {?string}
+   */
+  computeCSSVariable(style, variableName) {
+    const nodeCascade = this._styleToNodeCascade.get(style);
+    if (!nodeCascade)
+      return null;
+    this._ensureInitialized();
+    const availableCSSVariables = this._availableCSSVariables.get(nodeCascade);
+    const computedCSSVariables = this._computedCSSVariables.get(nodeCascade);
+    return this._innerComputeCSSVariable(availableCSSVariables, computedCSSVariables, variableName);
+  }
+
+  /**
+   * @param {!SDK.CSSStyleDeclaration} style
+   * @param {string} value
+   * @return {?string}
+   */
+  computeValue(style, value) {
+    const nodeCascade = this._styleToNodeCascade.get(style);
+    if (!nodeCascade)
+      return null;
+    this._ensureInitialized();
+    const availableCSSVariables = this._availableCSSVariables.get(nodeCascade);
+    const computedCSSVariables = this._computedCSSVariables.get(nodeCascade);
+    return this._innerComputeValue(availableCSSVariables, computedCSSVariables, value);
+  }
+
+  /**
+   * @param {!Map<string, string>} availableCSSVariables
+   * @param {!Map<string, ?string>} computedCSSVariables
+   * @param {string} variableName
+   * @return {?string}
+   */
+  _innerComputeCSSVariable(availableCSSVariables, computedCSSVariables, variableName) {
+    if (!availableCSSVariables.has(variableName))
+      return null;
+    if (computedCSSVariables.has(variableName))
+      return computedCSSVariables.get(variableName);
+    // Set dummy value to avoid infinite recursion.
+    computedCSSVariables.set(variableName, null);
+    const definedValue = availableCSSVariables.get(variableName);
+    const computedValue = this._innerComputeValue(availableCSSVariables, computedCSSVariables, definedValue);
+    computedCSSVariables.set(variableName, computedValue);
+    return computedValue;
+  }
+
+  /**
+   * @param {!Map<string, string>} availableCSSVariables
+   * @param {!Map<string, ?string>} computedCSSVariables
+   * @param {string} value
+   * @return {?string}
+   */
+  _innerComputeValue(availableCSSVariables, computedCSSVariables, value) {
+    const results = TextUtils.TextUtils.splitStringByRegexes(value, [SDK.CSSMetadata.VariableRegex]);
+    const tokens = [];
+    for (const result of results) {
+      if (result.regexIndex === -1) {
+        tokens.push(result.value);
+        continue;
+      }
+      // process var() function
+      const regexMatch = result.value.match(/^var\((--[a-zA-Z0-9-_]+)[,]?\s*(.*)\)$/);
+      if (!regexMatch)
+        return null;
+      const cssVariable = regexMatch[1];
+      const computedValue = this._innerComputeCSSVariable(availableCSSVariables, computedCSSVariables, cssVariable);
+      if (computedValue === null && !regexMatch[2])
+        return null;
+      if (computedValue === null)
+        tokens.push(regexMatch[2]);
+      else
+        tokens.push(computedValue);
+    }
+    return tokens.map(token => token.trim()).join(' ');
+  }
+
+  /**
+   * @return {!Array<!SDK.CSSStyleDeclaration>}
+   */
+  styles() {
+    return Array.from(this._styleToNodeCascade.keys());
+  }
+
+  /**
+   * @param {!SDK.CSSProperty} property
+   * @return {?SDK.CSSMatchedStyles.PropertyState}
+   */
+  propertyState(property) {
+    this._ensureInitialized();
+    return this._propertiesState.get(property) || null;
+  }
+
+  reset() {
+    this._initialized = false;
+    this._propertiesState.clear();
+    this._availableCSSVariables.clear();
+    this._computedCSSVariables.clear();
+  }
+
+  _ensureInitialized() {
+    if (this._initialized)
+      return;
+    this._initialized = true;
+
+    const activeProperties = new Map();
+    for (const nodeCascade of this._nodeCascades) {
+      nodeCascade._computeActiveProperties();
+      for (const entry of nodeCascade._propertiesState.entries()) {
+        const property = /** @type {!SDK.CSSProperty} */ (entry[0]);
+        const state = /** @type {!SDK.CSSMatchedStyles.PropertyState} */ (entry[1]);
+        if (state === SDK.CSSMatchedStyles.PropertyState.Overloaded) {
+          this._propertiesState.set(property, SDK.CSSMatchedStyles.PropertyState.Overloaded);
+          continue;
+        }
         const canonicalName = SDK.cssMetadata().canonicalPropertyName(property.name);
-        if (!styleActiveProperties.has(canonicalName))
+        if (activeProperties.has(canonicalName)) {
+          this._propertiesState.set(property, SDK.CSSMatchedStyles.PropertyState.Overloaded);
           continue;
-        const longhands = style.longhandProperties(property.name);
-        if (!longhands.length)
-          continue;
-        let notUsed = true;
-        for (const longhand of longhands) {
-          const longhandCanonicalName = SDK.cssMetadata().canonicalPropertyName(longhand.name);
-          notUsed = notUsed && !styleActiveProperties.has(longhandCanonicalName);
         }
-        if (!notUsed)
-          continue;
-        styleActiveProperties.delete(canonicalName);
-        allUsedProperties.delete(canonicalName);
-        result.set(property, SDK.CSSMatchedStyles.PropertyState.Overloaded);
+        activeProperties.set(canonicalName, property);
+        this._propertiesState.set(property, SDK.CSSMatchedStyles.PropertyState.Active);
       }
     }
+    // If every longhand of the shorthand is not active, then the shorthand is not active too.
+    for (const entry of activeProperties.entries()) {
+      const canonicalName = /** @type {string} */ (entry[0]);
+      const shorthandProperty = /** @type {!SDK.CSSProperty} */ (entry[1]);
+      const shorthandStyle = shorthandProperty.ownerStyle;
+      const longhands = shorthandStyle.longhandProperties(shorthandProperty.name);
+      if (!longhands.length)
+        continue;
+      let hasActiveLonghands = false;
+      for (const longhand of longhands) {
+        const longhandCanonicalName = SDK.cssMetadata().canonicalPropertyName(longhand.name);
+        const longhandActiveProperty = activeProperties.get(longhandCanonicalName);
+        if (!longhandActiveProperty)
+          continue;
+        if (longhandActiveProperty.ownerStyle === shorthandStyle) {
+          hasActiveLonghands = true;
+          break;
+        }
+      }
+      if (hasActiveLonghands)
+        continue;
+      activeProperties.delete(canonicalName);
+      this._propertiesState.set(shorthandProperty, SDK.CSSMatchedStyles.PropertyState.Overloaded);
+    }
+
+    // Work inheritance chain backwards to compute visible CSS Variables.
+    const accumulatedCSSVariables = new Map();
+    for (let i = this._nodeCascades.length - 1; i >= 0; --i) {
+      const nodeCascade = this._nodeCascades[i];
+      for (const entry of nodeCascade._activeProperties.entries()) {
+        const propertyName = /** @type {string} */ (entry[0]);
+        const property = /** @type {!SDK.CSSProperty} */ (entry[1]);
+        if (propertyName.startsWith('--'))
+          accumulatedCSSVariables.set(propertyName, property.value);
+      }
+      this._availableCSSVariables.set(nodeCascade, new Map(accumulatedCSSVariables));
+      this._computedCSSVariables.set(nodeCascade, new Map());
+    }
   }
 };
 
diff --git a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchBridge.cpp b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchBridge.cpp
index d9ef4097..7e7af0a 100644
--- a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchBridge.cpp
+++ b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchBridge.cpp
@@ -70,7 +70,9 @@
                                      const String& unique_id,
                                      const String& title,
                                      UpdateUICallback callback) {
-  GetService()->UpdateUI(unique_id, title, std::move(callback));
+  GetService()->UpdateUI(
+      GetSupplementable()->WebRegistration()->RegistrationId(), unique_id,
+      title, std::move(callback));
 }
 
 void BackgroundFetchBridge::GetRegistration(const String& developer_id,
diff --git a/third_party/WebKit/Source/modules/media_controls/elements/MediaControlLoadingPanelElement.cpp b/third_party/WebKit/Source/modules/media_controls/elements/MediaControlLoadingPanelElement.cpp
index 5db0a28..3702ba10 100644
--- a/third_party/WebKit/Source/modules/media_controls/elements/MediaControlLoadingPanelElement.cpp
+++ b/third_party/WebKit/Source/modules/media_controls/elements/MediaControlLoadingPanelElement.cpp
@@ -5,7 +5,7 @@
 #include "modules/media_controls/elements/MediaControlLoadingPanelElement.h"
 
 #include "core/css/CSSStyleDeclaration.h"
-#include "core/dom/ElementShadow.h"
+#include "core/dom/ShadowRoot.h"
 #include "core/dom/events/Event.h"
 #include "core/dom/events/EventListener.h"
 #include "core/html/HTMLDivElement.h"
diff --git a/third_party/WebKit/Source/modules/media_controls/elements/MediaControlLoadingPanelElementTest.cpp b/third_party/WebKit/Source/modules/media_controls/elements/MediaControlLoadingPanelElementTest.cpp
index ffcec53..ba90b581 100644
--- a/third_party/WebKit/Source/modules/media_controls/elements/MediaControlLoadingPanelElementTest.cpp
+++ b/third_party/WebKit/Source/modules/media_controls/elements/MediaControlLoadingPanelElementTest.cpp
@@ -5,7 +5,7 @@
 #include "modules/media_controls/elements/MediaControlLoadingPanelElement.h"
 
 #include "core/css/CSSStyleDeclaration.h"
-#include "core/dom/ElementShadow.h"
+#include "core/dom/ShadowRoot.h"
 #include "core/dom/events/Event.h"
 #include "core/event_type_names.h"
 #include "core/html/media/HTMLMediaElement.h"
diff --git a/third_party/WebKit/Source/modules/media_controls/elements/MediaControlOverlayPlayButtonElement.cpp b/third_party/WebKit/Source/modules/media_controls/elements/MediaControlOverlayPlayButtonElement.cpp
index 3d9f23f..8aa73679 100644
--- a/third_party/WebKit/Source/modules/media_controls/elements/MediaControlOverlayPlayButtonElement.cpp
+++ b/third_party/WebKit/Source/modules/media_controls/elements/MediaControlOverlayPlayButtonElement.cpp
@@ -4,7 +4,6 @@
 
 #include "modules/media_controls/elements/MediaControlOverlayPlayButtonElement.h"
 
-#include "core/dom/ElementShadow.h"
 #include "core/dom/ShadowRoot.h"
 #include "core/dom/events/Event.h"
 #include "core/events/MouseEvent.h"
diff --git a/third_party/WebKit/Source/modules/media_controls/elements/MediaControlScrubbingMessageElement.cpp b/third_party/WebKit/Source/modules/media_controls/elements/MediaControlScrubbingMessageElement.cpp
index bec5c1d..5961030 100644
--- a/third_party/WebKit/Source/modules/media_controls/elements/MediaControlScrubbingMessageElement.cpp
+++ b/third_party/WebKit/Source/modules/media_controls/elements/MediaControlScrubbingMessageElement.cpp
@@ -5,7 +5,7 @@
 #include "modules/media_controls/elements/MediaControlScrubbingMessageElement.h"
 
 #include "bindings/core/v8/ExceptionState.h"
-#include "core/dom/ElementShadow.h"
+#include "core/dom/ShadowRoot.h"
 #include "core/html/HTMLStyleElement.h"
 #include "core/html/media/HTMLMediaElement.h"
 #include "modules/media_controls/MediaControlsResourceLoader.h"
diff --git a/third_party/WebKit/Source/modules/media_controls/elements/MediaControlSliderElement.cpp b/third_party/WebKit/Source/modules/media_controls/elements/MediaControlSliderElement.cpp
index 77a2e28c..50696fe 100644
--- a/third_party/WebKit/Source/modules/media_controls/elements/MediaControlSliderElement.cpp
+++ b/third_party/WebKit/Source/modules/media_controls/elements/MediaControlSliderElement.cpp
@@ -4,7 +4,6 @@
 
 #include "modules/media_controls/elements/MediaControlSliderElement.h"
 
-#include "core/dom/ElementShadow.h"
 #include "core/html/HTMLDivElement.h"
 #include "core/input_type_names.h"
 #include "core/layout/LayoutBoxModelObject.h"
diff --git a/third_party/WebKit/Source/platform/scheduler/renderer/frame_scheduler_impl.cc b/third_party/WebKit/Source/platform/scheduler/renderer/frame_scheduler_impl.cc
index ec307c8..93bee7a4 100644
--- a/third_party/WebKit/Source/platform/scheduler/renderer/frame_scheduler_impl.cc
+++ b/third_party/WebKit/Source/platform/scheduler/renderer/frame_scheduler_impl.cc
@@ -119,6 +119,11 @@
                             &tracing_controller_,
                             YesNoStateToString),
       active_connection_count_(0),
+      has_active_connection_(false,
+                             "FrameScheduler.HasActiveConnection",
+                             this,
+                             &tracing_controller_,
+                             YesNoStateToString),
       weak_factory_(this) {
   DCHECK_EQ(throttling_state_, CalculateThrottlingState());
 }
@@ -151,7 +156,7 @@
   if (parent_page_scheduler_) {
     parent_page_scheduler_->Unregister(this);
 
-    if (active_connection_count_)
+    if (has_active_connection())
       parent_page_scheduler_->OnConnectionUpdated();
   }
 }
@@ -430,6 +435,7 @@
 
 void FrameSchedulerImpl::DidOpenActiveConnection() {
   ++active_connection_count_;
+  has_active_connection_ = static_cast<bool>(active_connection_count_);
   if (parent_page_scheduler_)
     parent_page_scheduler_->OnConnectionUpdated();
 }
@@ -437,6 +443,7 @@
 void FrameSchedulerImpl::DidCloseActiveConnection() {
   DCHECK_GT(active_connection_count_, 0);
   --active_connection_count_;
+  has_active_connection_ = static_cast<bool>(active_connection_count_);
   if (parent_page_scheduler_)
     parent_page_scheduler_->OnConnectionUpdated();
 }
diff --git a/third_party/WebKit/Source/platform/scheduler/renderer/frame_scheduler_impl.h b/third_party/WebKit/Source/platform/scheduler/renderer/frame_scheduler_impl.h
index d3a5f1b..680e29d 100644
--- a/third_party/WebKit/Source/platform/scheduler/renderer/frame_scheduler_impl.h
+++ b/third_party/WebKit/Source/platform/scheduler/renderer/frame_scheduler_impl.h
@@ -85,7 +85,7 @@
   scoped_refptr<TaskQueue> ControlTaskQueue();
   void SetPageVisibility(PageVisibilityState page_visibility);
 
-  bool has_active_connection() const { return active_connection_count_; }
+  bool has_active_connection() const { return has_active_connection_; }
 
   void OnTraceLogEnabled() { tracing_controller_.OnTraceLogEnabled(); }
 
@@ -172,8 +172,9 @@
   TraceableState<FrameOriginType, kTracingCategoryNameInfo> frame_origin_type_;
   StateTracer<kTracingCategoryNameInfo> url_tracer_;
   // |task_queue_throttled_| is false if |throttleable_task_queue_| is absent.
-  TraceableState<bool, kTracingCategoryNameDebug> task_queue_throttled_;
+  TraceableState<bool, kTracingCategoryNameInfo> task_queue_throttled_;
   int active_connection_count_;
+  TraceableState<bool, kTracingCategoryNameInfo> has_active_connection_;
 
   base::WeakPtrFactory<FrameSchedulerImpl> weak_factory_;
 
diff --git a/third_party/WebKit/Source/platform/testing/TestingPlatformSupportWithWebRTC.cpp b/third_party/WebKit/Source/platform/testing/TestingPlatformSupportWithWebRTC.cpp
index c22d414..a36c878 100644
--- a/third_party/WebKit/Source/platform/testing/TestingPlatformSupportWithWebRTC.cpp
+++ b/third_party/WebKit/Source/platform/testing/TestingPlatformSupportWithWebRTC.cpp
@@ -34,6 +34,7 @@
   std::unique_ptr<WebRTCRtpParameters> GetParameters() const override {
     return std::unique_ptr<WebRTCRtpParameters>();
   }
+  void GetStats(std::unique_ptr<blink::WebRTCStatsReportCallback>) override {}
 
  private:
   const uintptr_t id_;
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/merge_results.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/merge_results.py
index 9f1d5ee..3caa944 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/merge_results.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/merge_results.py
@@ -525,6 +525,7 @@
             ':builder_name$',
             ':build_number$',
             ':chromium_revision$',
+            ':flag_name$',
             ':has_pretty_patch$',
             ':has_wdiff$',
             ':path_delimiter$',
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
index d5d32bc..27223ab 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
@@ -239,6 +239,17 @@
         self.warnings = []
         self.is_extra_skipped_test = False
 
+        # WARNING: If flag_expectations are not set, base_expectations will
+        # always be empty. In this case, 'expectations' are base_expectations.
+        # This quirk is caused by the way expectations are computed.
+        #  base | flags | expectations | base_expectations | flag_expectations
+        #   0   |   0   |   []         |        []         | []
+        #   X   |   0   |   [base]     |        []         | []
+        #   0   |   X   |   [flag]     |        [base]     | [flag]
+        #   X   |   X   | [flag+base]  |        [base]     | [flag]
+        self.base_expectations = []
+        self.flag_expectations = []
+
     def __str__(self):
         return 'TestExpectationLine{name=%s, matching_configurations=%s, original_string=%s}' % (
             self.name, self.matching_configurations, self.original_string)
@@ -485,6 +496,8 @@
         result.matching_tests = list(list(set(line1.matching_tests) | set(line2.matching_tests)))
         result.warnings = list(set(line1.warnings) | set(line2.warnings))
         result.is_extra_skipped_test = line1.is_extra_skipped_test or line2.is_extra_skipped_test
+        result.base_expectations = line1.base_expectations if line1.base_expectations else line2.base_expectations
+        result.flag_expectations = line1.flag_expectations if line1.flag_expectations else line2.flag_expectations
         return result
 
     def to_string(self, test_configuration_converter=None, include_specifiers=True,
@@ -587,6 +600,7 @@
         self._result_type_to_tests = self._dict_of_sets(TestExpectations.RESULT_TYPES)
 
         self._shorten_filename = shorten_filename or (lambda x: x)
+        self._flag_name = None
 
     def all_lines(self):
         return sorted(self._test_to_expectation_line.values(),
@@ -610,7 +624,7 @@
         for key in other_dict:
             self_dict[key] |= other_dict[key]
 
-    def merge_model(self, other):
+    def merge_model(self, other, is_flag_specific=False):
         self._merge_test_map(self._test_to_expectations, other._test_to_expectations)
 
         # merge_expectation_lines is O(tests per line). Therefore, this loop
@@ -627,10 +641,15 @@
                 if other_line not in merge_lines_cache[self_line]:
                     merge_lines_cache[self_line][other_line] = TestExpectationLine.merge_expectation_lines(
                         self_line, other_line, model_all_expectations=False)
+                    if is_flag_specific:
+                        merge_lines_cache[self_line][other_line].base_expectations = self_line.expectations
+                        merge_lines_cache[self_line][other_line].flag_expectations = other_line.expectations
 
                 merged_line = merge_lines_cache[self_line][other_line]
             else:
                 merged_line = other_line
+                if is_flag_specific:
+                    merged_line.flag_expectations = other_line.expectations
 
             self._test_to_expectation_line[test] = merged_line
 
@@ -671,6 +690,15 @@
     def has_test(self, test):
         return test in self._test_to_expectation_line
 
+    def get_flag_name(self):
+        return self._flag_name
+
+    def append_flag_name(self, flag_name):
+        if self._flag_name:
+            self._flag_name += ' ' + flag_name
+        else:
+            self._flag_name = flag_name
+
     def get_expectation_line(self, test):
         return self._test_to_expectation_line.get(test)
 
@@ -1048,7 +1076,10 @@
                 model = TestExpectationsModel(self._shorten_filename)
                 self._add_expectations(expectations, model)
                 self._expectations += expectations
-                self._model.merge_model(model)
+                flag_specific_match = re.match('.*' + port.FLAG_EXPECTATIONS_PREFIX + '(.*)', path)
+                if flag_specific_match is not None:
+                    self._model.append_flag_name(flag_specific_match.group(1))
+                self._model.merge_model(model, flag_specific_match is not None)
 
         self.add_extra_skipped_tests(set(port.get_option('ignore_tests', [])))
         self.add_expectations_from_bot()
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_run_results.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_run_results.py
index 679e0f21..f9442a5 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_run_results.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_run_results.py
@@ -243,9 +243,16 @@
         if result.has_stderr:
             test_dict['has_stderr'] = True
 
-        bugs = expectations.model().get_expectation_line(test_name).bugs
+        expectation_line = expectations.model().get_expectation_line(test_name)
+        bugs = expectation_line.bugs
         if bugs:
             test_dict['bugs'] = bugs
+        if expectation_line.flag_expectations:
+            test_dict['flag_expectations'] = expectation_line.flag_expectations
+
+        base_expectations = expectation_line.base_expectations
+        if base_expectations:
+            test_dict['base_expectations'] = base_expectations
 
         if result.reftest_type:
             test_dict.update(reftest_type=list(result.reftest_type))
@@ -320,6 +327,7 @@
     if port_obj.get_option('order') == 'random':
         results['random_order_seed'] = port_obj.get_option('seed')
     results['path_delimiter'] = '/'
+    results['flag_name'] = expectations.model().get_flag_name()
 
     # Don't do this by default since it takes >100ms.
     # It's only used for rebaselining and uploading data to the flakiness dashboard.
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py
index 3ae937f..fb91ca1 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py
@@ -191,6 +191,8 @@
     # All of the non-reftest baseline extensions we use.
     BASELINE_EXTENSIONS = ('.wav', '.txt', '.png')
 
+    FLAG_EXPECTATIONS_PREFIX = 'FlagExpectations'
+
     # Because this is an abstract base class, arguments to functions may be
     # unused in this class - pylint: disable=unused-argument
 
@@ -1425,7 +1427,7 @@
         flag = self.primary_driver_flag()
         if flag:
             return self._filesystem.join(
-                self.layout_tests_dir(), 'FlagExpectations', flag.lstrip('-'))
+                self.layout_tests_dir(), self.FLAG_EXPECTATIONS_PREFIX, flag.lstrip('-'))
 
     def _flag_specific_baseline_search_path(self):
         flag = self.primary_driver_flag()
diff --git a/third_party/WebKit/public/platform/WebRTCRtpSender.h b/third_party/WebKit/public/platform/WebRTCRtpSender.h
index 8035f5d..a7e07216 100644
--- a/third_party/WebKit/public/platform/WebRTCRtpSender.h
+++ b/third_party/WebKit/public/platform/WebRTCRtpSender.h
@@ -7,6 +7,7 @@
 
 #include "WebCommon.h"
 #include "WebRTCRtpParameters.h"
+#include "WebRTCStats.h"
 #include "WebRTCVoidRequest.h"
 #include "WebString.h"
 
@@ -34,6 +35,7 @@
   virtual void ReplaceTrack(WebMediaStreamTrack, WebRTCVoidRequest) = 0;
   virtual std::unique_ptr<WebRTCDTMFSenderHandler> GetDtmfSender() const = 0;
   virtual std::unique_ptr<WebRTCRtpParameters> GetParameters() const = 0;
+  virtual void GetStats(std::unique_ptr<blink::WebRTCStatsReportCallback>) = 0;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/public/platform/WebWorkerFetchContext.h b/third_party/WebKit/public/platform/WebWorkerFetchContext.h
index b28df2d..0d912799 100644
--- a/third_party/WebKit/public/platform/WebWorkerFetchContext.h
+++ b/third_party/WebKit/public/platform/WebWorkerFetchContext.h
@@ -31,12 +31,11 @@
  public:
   virtual ~WebWorkerFetchContext() = default;
 
-  // Returns a raw pointer of a WaitableEvent which will be signaled from the
-  // main thread when the worker's GlobalScope is terminated, which will
-  // terminate sync loading requests on the worker thread.
-  // The raw pointer is valid only while the WebWorkerFetchContext is alive
-  // which is supposed to have the same lifetime as the worker's GlobalScope.
-  virtual base::WaitableEvent* GetTerminateSyncLoadEvent() = 0;
+  // Set a raw pointer of a WaitableEvent which will be signaled from the main
+  // thread when the worker's GlobalScope is terminated, which will terminate
+  // sync loading requests on the worker thread. It is guaranteed that the
+  // pointer is valid throughout the lifetime of this context.
+  virtual void SetTerminateSyncLoadEvent(base::WaitableEvent*) = 0;
 
   virtual void InitializeOnWorkerThread() = 0;
 
diff --git a/third_party/WebKit/public/platform/modules/background_fetch/background_fetch.mojom b/third_party/WebKit/public/platform/modules/background_fetch/background_fetch.mojom
index 9af930b..099ac58 100644
--- a/third_party/WebKit/public/platform/modules/background_fetch/background_fetch.mojom
+++ b/third_party/WebKit/public/platform/modules/background_fetch/background_fetch.mojom
@@ -76,8 +76,8 @@
           BackgroundFetchRegistration? registration);
 
   // Updates the user interface for the Background Fetch registration identified
-  // by |unique_id|.
-  UpdateUI(string unique_id, string title)
+  // by |service_worker_registration_id| and |unique_id|.
+  UpdateUI(int64 service_worker_registration_id, string unique_id, string title)
       => (BackgroundFetchError error);
 
   // Aborts the Background Fetch registration identified by |unique_id| and
diff --git a/third_party/WebKit/public/web/WebFrameSerializer.h b/third_party/WebKit/public/web/WebFrameSerializer.h
index cff21ab..d5b042a 100644
--- a/third_party/WebKit/public/web/WebFrameSerializer.h
+++ b/third_party/WebKit/public/web/WebFrameSerializer.h
@@ -53,13 +53,6 @@
     // Used to deduplicate resources across multiple frames.
     virtual bool ShouldSkipResource(const WebURL&) = 0;
 
-    // Returns a Content-ID to be used for the given frame.
-    // See rfc2557 - section 8.3 - "Use of the Content-ID header and CID URLs".
-    // Format note - the returned string should be of the form "<foo@bar.com>"
-    // (i.e. the strings should include the angle brackets).  The method
-    // should return null WebString if the frame doesn't have a content-id.
-    virtual WebString GetContentID(WebFrame*) = 0;
-
     virtual WebFrameSerializerCacheControlPolicy CacheControlPolicy() = 0;
 
     virtual bool UseBinaryEncoding() = 0;
diff --git a/third_party/closure_compiler/compile_js.gni b/third_party/closure_compiler/compile_js.gni
index 83a2f1d3..c1955d8b 100644
--- a/third_party/closure_compiler/compile_js.gni
+++ b/third_party/closure_compiler/compile_js.gni
@@ -3,6 +3,7 @@
 # found in the LICENSE file.
 
 import("//third_party/closure_compiler/closure_args.gni")
+import("//ui/webui/webui_features.gni")
 
 script_path = "//third_party/closure_compiler"
 compiler_path = "$script_path/compiler/compiler.jar"
@@ -219,8 +220,14 @@
 
 # Defines a target that compiles a group of js_library targets.
 template("js_type_check") {
-  js_binary(target_name) {
-    sources = []
-    forward_variables_from(invoker, [ "deps" ])
+  if (closure_compile) {
+    js_binary(target_name) {
+      sources = []
+      forward_variables_from(invoker, [ "deps" ])
+    }
+  } else {
+    not_needed(invoker, "*")
+    group(target_name) {
+    }
   }
 }
diff --git a/tools/binary_size/libsupersize/archive.py b/tools/binary_size/libsupersize/archive.py
index bcd3491..f8c050c 100644
--- a/tools/binary_size/libsupersize/archive.py
+++ b/tools/binary_size/libsupersize/archive.py
@@ -799,7 +799,7 @@
         apk_section_sizes['%s (unpacked)' % packed_section_name] = (
             section_sizes.get(packed_section_name))
     return apk_section_sizes, elf_overhead_size
-  return section_sizes
+  return section_sizes, 0
 
 
 def _ParseDexSymbols(section_sizes, apk_path, output_directory):
@@ -826,6 +826,7 @@
             models.SECTION_OTHER, zip_info.compress_size,
             object_path=path, full_name=os.path.basename(zip_info.filename)))
   overhead_size = os.path.getsize(apk_path) - zip_info_total
+  assert overhead_size >= 0, 'Apk overhead must be non-negative'
   zip_overhead_symbol = models.Symbol(
       models.SECTION_OTHER, overhead_size, full_name='Overhead: APK file')
   apk_symbols.append(zip_overhead_symbol)
@@ -851,7 +852,7 @@
         total_uncompressed_size += zip_info.file_size
         compression_ratio = knobs.pak_compression_ratio
       _ComputePakFileSymbols(
-          os.path.relpath(zip_info.filename, output_directory), contents,
+          zip_info.filename, contents,
           res_info, symbols_by_id, compression_ratio=compression_ratio)
     if total_uncompressed_size > 0:
       actual_ratio = (
@@ -891,7 +892,7 @@
 def CreateSectionSizesAndSymbols(
       map_path=None, tool_prefix=None, output_directory=None, elf_path=None,
       apk_path=None, track_string_literals=True, metadata=None,
-      apk_elf_result=None, pak_files=None, pak_info_file=None,
+      apk_so_path=None, pak_files=None, pak_info_file=None,
       knobs=SectionSizeKnobs()):
   """Creates sections sizes and symbols for a SizeInfo.
 
@@ -905,6 +906,11 @@
     track_string_literals: Whether to break down "** merge string" sections into
         smaller symbols (requires output_directory).
   """
+  if apk_path and elf_path:
+    # Extraction takes around 1 second, so do it in parallel.
+    apk_elf_result = concurrent.ForkAndCall(
+        _ElfInfoFromApk, (apk_path, apk_so_path, tool_prefix))
+
   source_mapper = None
   elf_object_paths = None
   if output_directory:
@@ -927,8 +933,9 @@
   if apk_path:
     pak_symbols_by_id = _FindPakSymbolsFromApk(apk_path, output_directory,
                                                knobs)
-    section_sizes, elf_overhead_size = _ParseApkElfSectionSize(
-        section_sizes, metadata, apk_elf_result)
+    if elf_path:
+      section_sizes, elf_overhead_size = _ParseApkElfSectionSize(
+          section_sizes, metadata, apk_elf_result)
     raw_symbols.extend(
         _ParseDexSymbols(section_sizes, apk_path, output_directory))
     raw_symbols.extend(_ParseApkOtherSymbols(section_sizes, apk_path))
@@ -1152,17 +1159,11 @@
   metadata = CreateMetadata(map_path, elf_path, apk_path, tool_prefix,
                             output_directory)
 
-  apk_elf_result = None
-  if apk_path and elf_path:
-    # Extraction takes around 1 second, so do it in parallel.
-    apk_elf_result = concurrent.ForkAndCall(
-        _ElfInfoFromApk, (apk_path, apk_so_path, tool_prefix))
-
   section_sizes, raw_symbols = CreateSectionSizesAndSymbols(
       map_path=map_path, tool_prefix=tool_prefix, elf_path=elf_path,
       apk_path=apk_path, output_directory=output_directory,
       track_string_literals=args.track_string_literals,
-      metadata=metadata, apk_elf_result=apk_elf_result,
+      metadata=metadata, apk_so_path=apk_so_path,
       pak_files=args.pak_file, pak_info_file=args.pak_info_file)
   size_info = CreateSizeInfo(
       section_sizes, raw_symbols, metadata=metadata, normalize_names=False)
diff --git a/tools/binary_size/libsupersize/integration_test.py b/tools/binary_size/libsupersize/integration_test.py
index e1b9294..16f9cfd 100755
--- a/tools/binary_size/libsupersize/integration_test.py
+++ b/tools/binary_size/libsupersize/integration_test.py
@@ -16,6 +16,7 @@
 import subprocess
 import sys
 import tempfile
+import zipfile
 
 import archive
 import describe
@@ -29,11 +30,20 @@
 _TEST_OUTPUT_DIR = os.path.join(_TEST_DATA_DIR, 'mock_output_directory')
 _TEST_TOOL_PREFIX = os.path.join(
     os.path.abspath(_TEST_DATA_DIR), 'mock_toolchain', '')
+_TEST_APK_ROOT_DIR = os.path.join(_TEST_DATA_DIR, 'mock_apk')
 _TEST_MAP_PATH = os.path.join(_TEST_DATA_DIR, 'test.map')
-_TEST_PAK_PATH = os.path.join(_TEST_OUTPUT_DIR, 'en-US.pak')
-_TEST_PAK_INFO_PATH = os.path.join(_TEST_OUTPUT_DIR, 'en-US.pak.info')
-_TEST_ELF_PATH = os.path.join(_TEST_OUTPUT_DIR, 'elf')  # Dynamically created
+_TEST_PAK_INFO_PATH = os.path.join(
+    _TEST_OUTPUT_DIR, 'size-info/test.apk.pak.info')
 _TEST_ELF_FILE_BEGIN = os.path.join(_TEST_OUTPUT_DIR, 'elf.begin')
+_TEST_APK_PAK_PATH = os.path.join(_TEST_APK_ROOT_DIR, 'assets/en-US.pak')
+
+# The following files are dynamically created.
+_TEST_ELF_PATH = os.path.join(_TEST_OUTPUT_DIR, 'elf')
+_TEST_APK_PATH = os.path.join(_TEST_OUTPUT_DIR, 'test.apk')
+
+# Generated file paths relative to apk
+_TEST_APK_SO_PATH = 'test.so'
+_TEST_APK_DEX_PATH = 'test.dex'
 
 update_goldens = False
 
@@ -102,24 +112,45 @@
   maxDiff = None  # Don't trucate diffs in errors.
   cached_size_info = {}
 
+  @staticmethod
+  def _CreateBlankData(power_of_two):
+    data = '\0'
+    for _ in range(power_of_two):
+      data = data + data
+    return data
+
+  @staticmethod
+  def _SafeRemoveFiles(file_names):
+    for file_name in file_names:
+      if os.path.exists(file_name):
+        os.remove(file_name)
+
   @classmethod
   def setUpClass(cls):
     shutil.copy(_TEST_ELF_FILE_BEGIN, _TEST_ELF_PATH)
+    # Exactly 128MB of data (2^27), extra bytes will be accounted in overhead.
     with open(_TEST_ELF_PATH, 'a') as elf_file:
-      data = '0'
-      # Exactly 128MB of data (2^27), extra bytes will be accounted in overhead.
-      for _ in range(27):
-        data = data + data
-      elf_file.write(data)
+      elf_file.write(IntegrationTest._CreateBlankData(27))
+    with zipfile.ZipFile(_TEST_APK_PATH, 'w') as apk_file:
+      apk_file.write(_TEST_ELF_PATH, _TEST_APK_SO_PATH)
+      pak_rel_path = os.path.relpath(_TEST_APK_PAK_PATH, _TEST_APK_ROOT_DIR)
+      apk_file.write(_TEST_APK_PAK_PATH, pak_rel_path)
+      # Exactly 8MB of data (2^23).
+      apk_file.writestr(
+          _TEST_APK_DEX_PATH, IntegrationTest._CreateBlankData(23))
 
   @classmethod
   def tearDownClass(cls):
-    os.remove(_TEST_ELF_PATH)
+    IntegrationTest._SafeRemoveFiles([
+      _TEST_ELF_PATH,
+      _TEST_APK_PATH,
+    ])
 
   def _CloneSizeInfo(self, use_output_directory=True, use_elf=True,
-                     use_pak=False):
+                     use_apk=False, use_pak=False):
     assert not use_elf or use_output_directory
-    cache_key = (use_output_directory, use_elf, use_pak)
+    assert not (use_apk and use_pak)
+    cache_key = (use_output_directory, use_elf, use_apk, use_pak)
     if cache_key not in IntegrationTest.cached_size_info:
       elf_path = _TEST_ELF_PATH if use_elf else None
       output_directory = _TEST_OUTPUT_DIR if use_output_directory else None
@@ -127,28 +158,33 @@
       # Override for testing. Lower the bar for compacting symbols, to allow
       # smaller test cases to be created.
       knobs.max_same_name_alias_count = 3
+      apk_path = None
+      apk_so_path = None
+      if use_apk:
+        apk_path = _TEST_APK_PATH
+        apk_so_path = _TEST_APK_SO_PATH
+      pak_files = None
+      pak_info_file = None
       if use_pak:
-        section_sizes, raw_symbols = archive.CreateSectionSizesAndSymbols(
-            map_path=_TEST_MAP_PATH, tool_prefix=_TEST_TOOL_PREFIX,
-            elf_path=elf_path, output_directory=output_directory,
-            pak_files=[_TEST_PAK_PATH], pak_info_file=_TEST_PAK_INFO_PATH,
-            knobs=knobs)
-      else:
-        section_sizes, raw_symbols = archive.CreateSectionSizesAndSymbols(
-            map_path=_TEST_MAP_PATH, tool_prefix=_TEST_TOOL_PREFIX,
-            elf_path=elf_path, output_directory=output_directory, knobs=knobs)
+        pak_files = [_TEST_APK_PAK_PATH]
+        pak_info_file = _TEST_PAK_INFO_PATH
       metadata = None
       if use_elf:
         with _AddMocksToPath():
           metadata = archive.CreateMetadata(
-              _TEST_MAP_PATH, elf_path, None, _TEST_TOOL_PREFIX,
+              _TEST_MAP_PATH, elf_path, apk_path, _TEST_TOOL_PREFIX,
               output_directory)
+      section_sizes, raw_symbols = archive.CreateSectionSizesAndSymbols(
+          map_path=_TEST_MAP_PATH, tool_prefix=_TEST_TOOL_PREFIX,
+          elf_path=elf_path, output_directory=output_directory,
+          apk_path=apk_path, apk_so_path=apk_so_path, metadata=metadata,
+          pak_files=pak_files, pak_info_file=pak_info_file, knobs=knobs)
       IntegrationTest.cached_size_info[cache_key] = archive.CreateSizeInfo(
           section_sizes, raw_symbols, metadata=metadata)
     return copy.deepcopy(IntegrationTest.cached_size_info[cache_key])
 
   def _DoArchive(self, archive_path, use_output_directory=True, use_elf=True,
-                 use_pak=False, debug_measures=False):
+                 use_apk=False, use_pak=False, debug_measures=False):
     args = [archive_path, '--map-file', _TEST_MAP_PATH]
     if use_output_directory:
       # Let autodetection find output_directory when --elf-file is used.
@@ -158,22 +194,25 @@
       args += ['--no-source-paths']
     if use_elf:
       args += ['--elf-file', _TEST_ELF_PATH]
+    if use_apk:
+      args += ['--apk-file', _TEST_APK_PATH]
     if use_pak:
-      args += ['--pak-file', _TEST_PAK_PATH,
+      args += ['--pak-file', _TEST_APK_PAK_PATH,
                '--pak-info-file', _TEST_PAK_INFO_PATH]
     _RunApp('archive', args, debug_measures=debug_measures)
 
   def _DoArchiveTest(self, use_output_directory=True, use_elf=True,
-                     use_pak=False, debug_measures=False):
+                     use_apk=False, use_pak=False, debug_measures=False):
     with tempfile.NamedTemporaryFile(suffix='.size') as temp_file:
       self._DoArchive(
           temp_file.name, use_output_directory=use_output_directory,
-          use_elf=use_elf, use_pak=use_pak, debug_measures=debug_measures)
+          use_elf=use_elf, use_apk=use_apk, use_pak=use_pak,
+          debug_measures=debug_measures)
       size_info = archive.LoadAndPostProcessSizeInfo(temp_file.name)
     # Check that saving & loading is the same as directly parsing.
     expected_size_info = self._CloneSizeInfo(
         use_output_directory=use_output_directory, use_elf=use_elf,
-        use_pak=use_pak)
+        use_apk=use_apk, use_pak=use_pak)
     self.assertEquals(expected_size_info.metadata, size_info.metadata)
     # Don't cluster.
     expected_size_info.symbols = expected_size_info.raw_symbols
@@ -203,7 +242,11 @@
     return self._DoArchiveTest()
 
   @_CompareWithGolden()
-  def test_Archive_Pak(self):
+  def test_Archive_Apk(self):
+    return self._DoArchiveTest(use_apk=True)
+
+  @_CompareWithGolden()
+  def test_Archive_Pak_Files(self):
     return self._DoArchiveTest(use_pak=True)
 
   @_CompareWithGolden(name='Archive_Elf')
diff --git a/tools/binary_size/libsupersize/testdata/Archive_Apk.golden b/tools/binary_size/libsupersize/testdata/Archive_Apk.golden
new file mode 100644
index 0000000..1b3aac4
--- /dev/null
+++ b/tools/binary_size/libsupersize/testdata/Archive_Apk.golden
@@ -0,0 +1,502 @@
+apk_file_name=test.apk
+apk_size=142613786
+elf_arch=arm
+elf_build_id=WhatAnAmazingBuildId
+elf_file_name=elf
+elf_mtime={redacted}
+git_revision=abc123
+gn_args=var1=true var2="foo"
+map_file_name=../test.map
+tool_prefix=tools/binary_size/libsupersize/testdata/mock_toolchain/
+Section .text: has 100.0% of 35900712 bytes accounted for from 19 symbols. 0 bytes are unaccounted for.
+* Padding accounts for 48 bytes (0.0%)
+* 3 placeholders (symbols that start with **) account for 35830760 bytes (99.8%)
+* Contains 6 aliases, mapped to 2 unique addresses (52 bytes saved)
+* 0 symbols have shared ownership
+Section .rodata: has 100.0% of 5927652 bytes accounted for from 12 symbols. 0 bytes are unaccounted for.
+* Padding accounts for 675996 bytes (11.4%)
+* 4 placeholders (symbols that start with **) account for 5251503 bytes (88.6%)
+* Contains 3 string literals. Total size=21, padding=0
+* Contains 2 aliases, mapped to 1 unique addresses (5 bytes saved)
+* 0 symbols have shared ownership
+Section .data.rel.ro: has 100.0% of 1065224 bytes accounted for from 4 symbols. 0 bytes are unaccounted for.
+* Padding accounts for 0 bytes (0.0%)
+* 1 placeholders (symbols that start with **) account for 1065132 bytes (100.0%)
+* Contains 0 aliases
+* 0 symbols have shared ownership
+Section .data: has 100.0% of 101768 bytes accounted for from 6 symbols. 0 bytes are unaccounted for.
+* Padding accounts for 0 bytes (0.0%)
+* 1 placeholders (symbols that start with **) account for 101600 bytes (99.8%)
+* Contains 0 aliases
+* 0 symbols have shared ownership
+Section .bss: has 40.3% of 524520 bytes accounted for from 6 symbols. 775936 bytes are unaccounted for.
+* Padding accounts for 196 bytes (0.0%)
+* Contains 0 aliases
+* 0 symbols have shared ownership
+Section .dex: has 100.0% of 8388608 bytes accounted for from 193 symbols. 0 bytes are unaccounted for.
+* Padding accounts for 0 bytes (0.0%)
+* 1 placeholders (symbols that start with **) account for 4616803 bytes (55.0%)
+* Contains 0 aliases
+* 0 symbols have shared ownership
+Section .pak.translations: has 100.0% of 6821 bytes accounted for from 207 symbols. 0 bytes are unaccounted for.
+* Padding accounts for 0 bytes (0.0%)
+* Contains 0 aliases
+* 0 symbols have shared ownership
+Section .other: has 100.0% of 33984483 bytes accounted for from 2 symbols. 0 bytes are unaccounted for.
+* Padding accounts for 33984483 bytes (100.0%)
+* Contains 0 aliases
+* 0 symbols have shared ownership
+.data@2de7000(size_without_padding=4,padding=0,full_name=google::protobuf::internal::pLinuxKernelCmpxchg,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1)
+.data@2de7004(size_without_padding=4,padding=0,full_name=google::protobuf::internal::pLinuxKernelMemoryBarrier,object_path=third_party/WebKit.a/ContiguousContainer.o,source_path=third_party/container.c,flags={},num_aliases=1)
+.data@2de7008(size_without_padding=152,padding=0,full_name=base::android::kBaseRegisteredMethods,object_path=third_party/WebKit.a/ContiguousContainer.o,source_path=third_party/container.c,flags={rel},num_aliases=1)
+.data@2de70a0(size_without_padding=4,padding=0,full_name=base::android::g_renderer_histogram_code,object_path=third_party/WebKit.a/ContiguousContainer.o,source_path=third_party/container.c,flags={anon},num_aliases=1)
+.data@2de70a4(size_without_padding=4,padding=0,full_name=base::android::g_library_version_number,object_path=third_party/WebKit.a/ContiguousContainer.o,source_path=third_party/container.c,flags={anon,rel.loc},num_aliases=1)
+.data@2dffd88(size_without_padding=0,padding=101600,full_name=** symbol gap 0 (end of section),object_path=,source_path=,flags={},num_aliases=1)
+.data.rel.ro@2cd8500(size_without_padding=56,padding=0,full_name=ChromeMainDelegateAndroid [vtable],object_path=third_party/WebKit.a/PaintChunker.o,source_path=third_party/paint.cc,flags={},num_aliases=1)
+.data.rel.ro@2cd8538(size_without_padding=24,padding=0,full_name=mojo::MessageReceiver [vtable],object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1)
+.data.rel.ro@2cd8550(size_without_padding=12,padding=0,full_name=kMethodsAnimationFrameTimeHistogram,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1)
+.data.rel.ro@2ddc608(size_without_padding=0,padding=1065132,full_name=** symbol gap 0 (end of section),object_path=,source_path=,flags={},num_aliases=1)
+.data.rel.ro.local@2c176f0(size_without_padding=56,padding=0,full_name=ChromeMainDelegate [vtable],object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1)
+.data.rel.ro.local@2c17728(size_without_padding=24,padding=0,full_name=chrome::mojom::FieldTrialRecorder [vtable],object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1)
+.data.rel.ro.local@2c17740(size_without_padding=789904,padding=0,full_name=chrome::mojom::FieldTrialRecorderProxy [vtable],object_path=third_party/WebKit.a/ContiguousContainer.o,source_path=third_party/container.c,flags={},num_aliases=1)
+.data.rel.ro.local@2cd84e0(size_without_padding=16,padding=16,full_name=.Lswitch.table.45,object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libcontroller_api_impl.a_controller_api_impl.o,source_path=,flags={},num_aliases=1)
+.data.rel.ro.local@2cd84f0(size_without_padding=8,padding=0,full_name=kSystemClassPrefixes,object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libport_android_jni.a_jni_utils.o,source_path=,flags={anon},num_aliases=1)
+.dex@0(size_without_padding=113,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack <clinit>(),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=225,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack <init>(android.content.Context,org.chromium.chrome.browser.compositor.layouts.phone.StackLayout),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=61,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack org.chromium.chrome.browser.compositor.layouts.phone.StackLayout access$000(org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=100,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack boolean allowOverscroll(),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=112,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float computeDiscardAlpha(float,float),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=136,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float computeDiscardScale(float,float,boolean),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=88,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float computeOverscrollPercent(),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=969,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void computeTabClippingVisibilityHelper(),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=1512,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void computeTabOffsetHelper(android.graphics.RectF),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=217,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void computeTabScrollOffsetHelper(),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=1008,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void computeTabTiltHelper(long,android.graphics.RectF),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=560,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void computeTabVisibilitySortingHelper(android.graphics.RectF),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=446,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack boolean evenOutTabs(float,boolean),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=223,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void finishAnimationsIfDone(long,boolean),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=128,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float getStackScale(android.graphics.RectF),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=87,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack org.chromium.chrome.browser.compositor.layouts.phone.stack.StackTab getTabAtPositon(float,float),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=79,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void resetInputActionIndices(),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=219,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void springBack(long),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=217,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void updateOverscrollOffset(),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=90,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float approxScreen(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackTab,float),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=64,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void cleanupTabs(),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=261,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void commitDiscard(long,boolean),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=253,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack int computeSpacing(int),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=318,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void computeTabPosition(long,android.graphics.RectF),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=322,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void contextChanged(android.content.Context),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=563,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void createStackTabs(boolean),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=1521,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void drag(long,float,float,float,float),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=813,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void finishAnimation(long),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=503,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void fling(long,float,float,float,float),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=68,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack int getCount(),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=84,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float getDefaultDiscardDirection(),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=79,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float getMaxScroll(boolean),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=113,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float getMaxTabHeight(),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=196,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float getMinScroll(boolean),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=105,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float getRange(float),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=94,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float getScrollDimensionSize(),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=360,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack int getTabIndexAtPositon(float,float,float),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=121,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack int getVisibleCount(),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=96,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack boolean isDisplayable(),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=400,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void notifySizeChanged$483d2f6e(int),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=107,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void onUpOrCancel(long),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=341,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack boolean onUpdateCompositorAnimations(long,boolean),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=101,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack boolean onUpdateViewAnimation(long,boolean),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=68,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void requestUpdate(),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=69,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float screenToScroll(float),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=69,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float scrollToScreen(float),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=134,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void setScrollTarget(float,boolean),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=121,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void setStackFocusInfo(float,int),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=244,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void setWarpState(boolean,boolean),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=919,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void startAnimation$62adfb33(long,int,int,int,boolean),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=77,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void startAnimation$6848a047(long,int),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=95,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void startAnimation$78b04ab8(long,int,int,boolean),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=137,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void stopScrollingMovement(long),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=142,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void swipeCancelled(long),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=266,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void tabClosingEffect(long,int),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=12,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack boolean $assertionsDisabled,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float DRAG_ANGLE_THRESHOLD,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=11,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation mAnimationFactory,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mBorderLeftPadding,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mBorderTopPadding,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mBorderTransparentSide,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mBorderTransparentTop,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack int mCurrentMode,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mCurrentScrollDirection,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mDiscardDirection,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack org.chromium.chrome.browser.compositor.layouts.phone.stack.StackTab mDiscardingTab,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack int mDragLock$7be2905e,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mEvenOutProgress,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mEvenOutRate,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack boolean mInSwipe,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack boolean mIsDying,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack boolean mIsStackForCurrentTabList,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mLastPinch0Offset,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mLastPinch1Offset,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack long mLastScrollUpdate,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack org.chromium.chrome.browser.compositor.layouts.phone.StackLayout mLayout,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack int mLongPressSelected,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mMaxOverScroll,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mMaxOverScrollAngle,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mMaxOverScrollSlide,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mMaxUnderScroll,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mMinScrollMotion,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mMinSpacing,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack android.view.animation.Interpolator mOverScrollAngleInterpolator,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack int mOverScrollCounter,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack int mOverScrollDerivative,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mOverScrollOffset,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack android.view.animation.Interpolator mOverscrollSlideInterpolator,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack int mOverviewAnimationType$5d025a5c,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack int mPinch0TabIndex,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack int mPinch1TabIndex,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack boolean mRecomputePosition,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack int mReferenceOrderIndex,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mScrollOffset,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mScrollOffsetForDyingTabs,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mScrollTarget,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller mScroller,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack org.chromium.chrome.browser.compositor.layouts.phone.stack.StackTab mScrollingTab,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack int mSpacing,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack org.chromium.chrome.browser.compositor.layouts.phone.stack.StackTab[] mStackTabs,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mSwipeBoundedScrollOffset,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack boolean mSwipeCanScroll,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack boolean mSwipeIsCancelable,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mSwipeUnboundScrollOffset,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack org.chromium.chrome.browser.compositor.layouts.ChromeAnimation mTabAnimations,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack org.chromium.chrome.browser.tabmodel.TabList mTabList,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack android.view.animation.Interpolator mUnderScrollAngleInterpolator,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack org.chromium.chrome.browser.compositor.layouts.phone.stack.StackViewAnimation mViewAnimationFactory,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack android.animation.Animator mViewAnimations,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack android.animation.AnimatorListenerAdapter mViewAnimatorListener,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mWarpSize,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=40,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=471,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller <clinit>(),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=146,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller <init>(android.content.Context),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=62,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller boolean access$000(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=65,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller boolean access$002(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,boolean),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=62,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller int access$100(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=62,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller int access$200(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=62,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller long access$300(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=62,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller int access$400(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=62,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller float access$500(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=176,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller void adjustDuration(int,int,int),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=71,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller float getDeceleration(int),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=97,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller double getSplineDeceleration(int),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=115,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller double getSplineFlingDistance(int),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=220,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller void onEdgeReached(),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=167,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller void startSpringback$4868d30e(int,int),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=218,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller boolean continueWhenFinished(long),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=66,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller void finish(),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=660,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller void fling(int,int,int,int,int,long),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=138,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller boolean springback(int,int,int,long),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=109,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller void startScroll(int,int,long,int),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=440,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller boolean update(long),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=90,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller void updateScroll(float),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=11,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller float DECELERATION_RATE,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller float[] SPLINE_POSITION,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller float[] SPLINE_TIME,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=11,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller float mCurrVelocity,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller int mCurrentPosition,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller float mDeceleration,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller int mDuration,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller int mFinal,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller boolean mFinished,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller float mFlingFriction,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller int mOver,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller float mPhysicalCoeff,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller int mSplineDistance,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller int mSplineDuration,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller int mStart,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller long mStartTime,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller int mState,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller int mVelocity,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=40,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=112,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation <init>(org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,float,float,float,float,float),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackAnimation.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=40,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation void addTiltScrollAnimation(org.chromium.chrome.browser.compositor.layouts.ChromeAnimation,org.chromium.chrome.browser.compositor.layouts.components.LayoutTab,float,int,int),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackAnimation.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=1055,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation org.chromium.chrome.browser.compositor.layouts.ChromeAnimation createAnimatorSetForType$2fab410e$104f6ddb(int,org.chromium.chrome.browser.compositor.layouts.phone.stack.StackTab[],int,int,int,float,float),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackAnimation.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=36,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation org.chromium.chrome.browser.compositor.layouts.ChromeAnimation createEnterStackAnimatorSet(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackTab[],int,int,float),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackAnimation.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=139,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation org.chromium.chrome.browser.compositor.layouts.ChromeAnimation createNewTabOpenedAnimatorSet$4078c09e(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackTab[]),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackAnimation.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=32,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation org.chromium.chrome.browser.compositor.layouts.ChromeAnimation createReachTopAnimatorSet(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackTab[],float),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackAnimation.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=36,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation org.chromium.chrome.browser.compositor.layouts.ChromeAnimation createTabFocusedAnimatorSet(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackTab[],int,int,float),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackAnimation.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=32,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation org.chromium.chrome.browser.compositor.layouts.ChromeAnimation createViewMoreAnimatorSet(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackTab[],int),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackAnimation.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=30,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation float getScreenPositionInScrollDirection(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackTab),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackAnimation.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=24,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation float getScreenSizeInScrollDirection(),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackAnimation.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=92,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation float getStaticTabPosition(),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackAnimation.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=67,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation float getToolbarOffsetToLineUpWithBorder(),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackAnimation.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=24,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation boolean isDefaultDiscardDirectionPositive(),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackAnimation.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=11,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation float mBorderTopHeight,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackAnimation.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation float mBorderTopOpaqueHeight,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackAnimation.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation float mHeight,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackAnimation.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation float mHeightMinusBrowserControls,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackAnimation.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack mStack,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackAnimation.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation float mWidth,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackAnimation.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=40,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackAnimation.java,flags={},num_aliases=1)
+.dex@0(size_without_padding=82,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimationLandscape <init>(org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,float,float,float,float,float),object_path=test.apk/prebuilt/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackAnimationLandscape,source_path=,flags={gen},num_aliases=1)
+.dex@0(size_without_padding=106,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimationLandscape void addTiltScrollAnimation(org.chromium.chrome.browser.compositor.layouts.ChromeAnimation,org.chromium.chrome.browser.compositor.layouts.components.LayoutTab,float,int,int),object_path=test.apk/prebuilt/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackAnimationLandscape,source_path=,flags={gen},num_aliases=1)
+.dex@0(size_without_padding=592,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimationLandscape org.chromium.chrome.browser.compositor.layouts.ChromeAnimation createEnterStackAnimatorSet(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackTab[],int,int,float),object_path=test.apk/prebuilt/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackAnimationLandscape,source_path=,flags={gen},num_aliases=1)
+.dex@0(size_without_padding=59,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimationLandscape org.chromium.chrome.browser.compositor.layouts.ChromeAnimation createNewTabOpenedAnimatorSet$4078c09e(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackTab[]),object_path=test.apk/prebuilt/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackAnimationLandscape,source_path=,flags={gen},num_aliases=1)
+.dex@0(size_without_padding=210,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimationLandscape org.chromium.chrome.browser.compositor.layouts.ChromeAnimation createReachTopAnimatorSet(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackTab[],float),object_path=test.apk/prebuilt/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackAnimationLandscape,source_path=,flags={gen},num_aliases=1)
+.dex@0(size_without_padding=961,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimationLandscape org.chromium.chrome.browser.compositor.layouts.ChromeAnimation createTabFocusedAnimatorSet(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackTab[],int,int,float),object_path=test.apk/prebuilt/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackAnimationLandscape,source_path=,flags={gen},num_aliases=1)
+.dex@0(size_without_padding=256,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimationLandscape org.chromium.chrome.browser.compositor.layouts.ChromeAnimation createViewMoreAnimatorSet(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackTab[],int),object_path=test.apk/prebuilt/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackAnimationLandscape,source_path=,flags={gen},num_aliases=1)
+.dex@0(size_without_padding=79,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimationLandscape float getScreenPositionInScrollDirection(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackTab),object_path=test.apk/prebuilt/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackAnimationLandscape,source_path=,flags={gen},num_aliases=1)
+.dex@0(size_without_padding=54,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimationLandscape float getScreenSizeInScrollDirection(),object_path=test.apk/prebuilt/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackAnimationLandscape,source_path=,flags={gen},num_aliases=1)
+.dex@0(size_without_padding=52,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimationLandscape boolean isDefaultDiscardDirectionPositive(),object_path=test.apk/prebuilt/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackAnimationLandscape,source_path=,flags={gen},num_aliases=1)
+.dex@0(size_without_padding=104,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimationLandscape,object_path=test.apk/prebuilt/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackAnimationLandscape,source_path=,flags={gen},num_aliases=1)
+.dex@0(size_without_padding=8586,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack,object_path=test.apk/prebuilt/org/chromium/chrome/browser/compositor/layouts/phone/stack,source_path=,flags={gen},num_aliases=1)
+.dex@0(size_without_padding=23896,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone,object_path=test.apk/prebuilt/org/chromium/chrome/browser/compositor/layouts/phone,source_path=,flags={gen},num_aliases=1)
+.dex@0(size_without_padding=58449,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts,object_path=test.apk/prebuilt/org/chromium/chrome/browser/compositor/layouts,source_path=,flags={gen},num_aliases=1)
+.dex@0(size_without_padding=111986,padding=0,full_name=org.chromium.chrome.browser.compositor,object_path=test.apk/prebuilt/org/chromium/chrome/browser/compositor,source_path=,flags={gen},num_aliases=1)
+.dex@0(size_without_padding=2522400,padding=0,full_name=org.chromium.chrome.browser,object_path=test.apk/prebuilt/org/chromium/chrome/browser,source_path=,flags={gen},num_aliases=1)
+.dex@0(size_without_padding=44714,padding=0,full_name=org.chromium.chrome,object_path=test.apk/prebuilt/org/chromium/chrome,source_path=,flags={gen},num_aliases=1)
+.dex@0(size_without_padding=975347,padding=0,full_name=org.chromium,object_path=test.apk/prebuilt/org/chromium,source_path=,flags={gen},num_aliases=1)
+.dex@0(size_without_padding=1792,padding=0,full_name=org,object_path=test.apk/prebuilt/org,source_path=,flags={gen},num_aliases=1)
+.dex@0(size_without_padding=4616803,padding=0,full_name=* Unattributed Dex,object_path=test.apk/prebuilt,source_path=,flags={gen},num_aliases=1)
+.other@0(size_without_padding=0,padding=312,full_name=Overhead: APK file,object_path=,source_path=,flags={},num_aliases=1)
+.other@0(size_without_padding=0,padding=33984171,full_name=Overhead: ELF file,object_path=,source_path=,flags={},num_aliases=1)
+.rodata@266e600(size_without_padding=5,padding=0,full_name=string literal,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=2)
+.rodata@266e600(size_without_padding=5,padding=0,full_name=string literal,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=2)
+.rodata@266e605(size_without_padding=16,padding=0,full_name=string literal,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1)
+.rodata@266e630(size_without_padding=16,padding=27,full_name=** merge strings,object_path=,source_path=,flags={},num_aliases=1)
+.rodata@284d600(size_without_padding=3425,padding=1961920,full_name=** merge constants,object_path=,source_path=,flags={},num_aliases=1)
+.rodata@284e364(size_without_padding=0,padding=3,full_name=** symbol gap 0,object_path=,source_path=,flags={},num_aliases=1)
+.rodata@284e364(size_without_padding=8,padding=0,full_name=,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1)
+.rodata@284e370(size_without_padding=40,padding=4,full_name=Name,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1)
+.rodata@284e398(size_without_padding=32,padding=0,full_name=chrome::mojom::FilePatcher::Name_,object_path=third_party/WebKit.a/ContiguousContainer.o,source_path=third_party/container.c,flags={},num_aliases=1)
+.rodata@28f3450(size_without_padding=48,padding=675992,full_name=kAnimationFrameTimeHistogramClassPath,object_path=third_party/WebKit.a/PaintChunker.o,source_path=third_party/paint.cc,flags={anon},num_aliases=1)
+.rodata@28f3480(size_without_padding=4,padding=0,full_name=blink::CSSValueKeywordsHash::findValueImpl(char const*, unsigned int)::value_word_list,object_path=third_party/WebKit.a/PaintChunker.o,source_path=third_party/paint.cc,flags={anon},num_aliases=1)
+.rodata@2c158e4(size_without_padding=0,padding=3286112,full_name=** symbol gap 1 (end of section),object_path=,source_path=,flags={},num_aliases=1)
+.text@28d900(size_without_padding=16,padding=0,full_name=_GLOBAL__sub_I_page_allocator.cc,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={startup},num_aliases=1)
+.text@28d910(size_without_padding=56,padding=0,full_name=_GLOBAL__sub_I_bbr_sender.cc,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={startup},num_aliases=1)
+.text@28d948(size_without_padding=28,padding=0,full_name=_GLOBAL__sub_I_pacing_sender.cc,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={startup},num_aliases=1)
+.text@28d964(size_without_padding=38,padding=0,full_name=extFromUUseMapping(signed char, unsigned int, int),object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1)
+.text@28d98a(size_without_padding=32,padding=0,full_name=extFromUUseMapping(aj, int),object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1)
+.text@28f000(size_without_padding=0,padding=5718,full_name=** symbol gap 0,object_path=,source_path=,flags={},num_aliases=1)
+.text@28f000(size_without_padding=448,padding=0,full_name=ucnv_extMatchFromU(int const*, int, unsigned short const*, int, unsigned short const*, int, unsigned int*, signed char, signed char),object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1)
+.text@28f1c8(size_without_padding=20,padding=8,full_name=_GLOBAL__sub_I_SkDeviceProfile.cpp,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={startup,gen},num_aliases=1)
+.text@28f1e0(size_without_padding=69120,padding=4,full_name=foo_bar,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={unlikely,gen},num_aliases=1)
+.text@2a0000(size_without_padding=16,padding=32,full_name=BazAlias(bool),object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=2)
+.text@2a0000(size_without_padding=16,padding=32,full_name=blink::ContiguousContainerBase::shrinkToFit(),object_path=,source_path=,flags={},num_aliases=2)
+.text@2a0010(size_without_padding=12,padding=0,full_name=BarAlias(),object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o,source_path=third_party/fft_float.cc,flags={},num_aliases=4)
+.text@2a0010(size_without_padding=12,padding=0,full_name=FooAlias(),object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o,source_path=third_party/fft_float.cc,flags={},num_aliases=4)
+.text@2a0010(size_without_padding=12,padding=0,full_name=blink::ContiguousContainerBase::shrinkToFit(),object_path=third_party/WebKit.a/PaintChunker.o,source_path=third_party/paint.cc,flags={clone},num_aliases=4)
+.text@2a0010(size_without_padding=12,padding=0,full_name=blink::ContiguousContainerBase::shrinkToFit(),object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen,clone},num_aliases=4)
+.text@2a0020(size_without_padding=24,padding=4,full_name=blink::ContiguousContainerBase::ContiguousContainerBase(blink::ContiguousContainerBase&&),object_path=third_party/WebKit.a/ContiguousContainer.o,source_path=third_party/container.c,flags={},num_aliases=1)
+.text@2a1000(size_without_padding=0,padding=4040,full_name=** symbol gap 1,object_path=,source_path=,flags={},num_aliases=1)
+.text@2a1000(size_without_padding=94,padding=0,full_name=blink::PaintChunker::releasePaintChunks(),object_path=third_party/WebKit.a/ContiguousContainer.o,source_path=third_party/container.c,flags={anon,clone},num_aliases=1)
+.text@24ca628(size_without_padding=0,padding=35821002,full_name=** symbol gap 2 (end of section),object_path=,source_path=,flags={},num_aliases=1)
+.bss@0(size_without_padding=262144,padding=0,full_name=ff_cos_131072,object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o,source_path=third_party/fft_float.cc,flags={},num_aliases=1)
+.bss@0(size_without_padding=131072,padding=0,full_name=ff_cos_131072_fixed,object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_fixed.o,source_path=third_party/fft_fixed.cc,flags={},num_aliases=1)
+.bss@0(size_without_padding=131072,padding=0,full_name=ff_cos_65536,object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o,source_path=third_party/fft_float.cc,flags={},num_aliases=1)
+.bss@2dffda0(size_without_padding=28,padding=0,full_name=g_chrome_content_browser_client,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1)
+.bss@2dffe80(size_without_padding=4,padding=196,full_name=SaveHistogram(_JNIEnv*, base::android::JavaParamRef<_jobject*> const&, base::android::JavaParamRef<_jstring*> const&, base::android::JavaParamRef<_jlongArray*> const&, int)::atomic_histogram_pointer,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1)
+.bss@2dffe84(size_without_padding=4,padding=0,full_name=g_AnimationFrameTimeHistogram_clazz,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={anon,gen},num_aliases=1)
+.pak.translations@0(size_without_padding=18,padding=0,full_name=assets/en-US.pak: overhead,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@0(size_without_padding=0,padding=0,full_name=Pak compression leftover artifacts,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@3ac6(size_without_padding=40,padding=0,full_name=../../components/app_modal_strings.grdp: IDS_BEFOREUNLOAD_MESSAGEBOX_MESSAGE,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@3d7c(size_without_padding=24,padding=0,full_name=../../components/policy_strings.grdp: IDS_POLICY_TYPE_ERROR,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@3d82(size_without_padding=25,padding=0,full_name=../../components/policy_strings.grdp: IDS_POLICY_LIST_ENTRY_ERROR,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@3d83(size_without_padding=41,padding=0,full_name=../../components/policy_strings.grdp: IDS_POLICY_SCHEMA_VALIDATION_ERROR,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@3dd2(size_without_padding=51,padding=0,full_name=../../components/safe_browsing_strings.grdp: IDS_SB_UNDER_CONSTRUCTION,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@3df8(size_without_padding=20,padding=0,full_name=../../components/security_interstitials_strings.grdp: IDS_SAFEBROWSING_V3_TITLE,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@3df9(size_without_padding=17,padding=0,full_name=../../components/security_interstitials_strings.grdp: IDS_SAFEBROWSING_V3_OPEN_DETAILS_BUTTON,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@3dfa(size_without_padding=18,padding=0,full_name=../../components/security_interstitials_strings.grdp: IDS_SAFEBROWSING_V3_CLOSE_DETAILS_BUTTON,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@3dfb(size_without_padding=20,padding=0,full_name=../../components/security_interstitials_strings.grdp: IDS_SAFEBROWSING_OVERRIDABLE_SAFETY_BUTTON,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@3dfc(size_without_padding=44,padding=0,full_name=../../components/security_interstitials_strings.grdp: IDS_MALWARE_V3_HEADING,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@3dfd(size_without_padding=226,padding=0,full_name=../../components/security_interstitials_strings.grdp: IDS_MALWARE_V3_PRIMARY_PARAGRAPH,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@3dfe(size_without_padding=165,padding=0,full_name=../../components/security_interstitials_strings.grdp: IDS_MALWARE_V3_EXPLANATION_PARAGRAPH,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@3dff(size_without_padding=231,padding=0,full_name=../../components/security_interstitials_strings.grdp: IDS_MALWARE_V3_EXPLANATION_PARAGRAPH_SUBRESOURCE,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@3e00(size_without_padding=165,padding=0,full_name=../../components/security_interstitials_strings.grdp: IDS_MALWARE_V3_PROCEED_PARAGRAPH,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@3e01(size_without_padding=20,padding=0,full_name=../../components/security_interstitials_strings.grdp: IDS_SAFE_BROWSING_PRIVACY_POLICY_PAGE,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@3e02(size_without_padding=116,padding=0,full_name=../../components/security_interstitials_strings.grdp: IDS_SAFE_BROWSING_MALWARE_REPORTING_AGREE,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@3e03(size_without_padding=156,padding=0,full_name=../../components/security_interstitials_strings.grdp: IDS_SAFE_BROWSING_SCOUT_REPORTING_AGREE,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@3e08(size_without_padding=26,padding=0,full_name=../../components/security_interstitials_strings.grdp: IDS_PHISHING_V4_HEADING,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@3e09(size_without_padding=253,padding=0,full_name=../../components/security_interstitials_strings.grdp: IDS_PHISHING_V4_PRIMARY_PARAGRAPH,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@3e0a(size_without_padding=155,padding=0,full_name=../../components/security_interstitials_strings.grdp: IDS_PHISHING_V4_EXPLANATION_PARAGRAPH,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@3e0b(size_without_padding=187,padding=0,full_name=../../components/security_interstitials_strings.grdp: IDS_PHISHING_V4_PROCEED_AND_REPORT_PARAGRAPH,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@3e0c(size_without_padding=32,padding=0,full_name=../../components/security_interstitials_strings.grdp: IDS_MALWARE_WEBVIEW_HEADING,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@3e0d(size_without_padding=160,padding=0,full_name=../../components/security_interstitials_strings.grdp: IDS_MALWARE_WEBVIEW_EXPLANATION_PARAGRAPH,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@3e0e(size_without_padding=32,padding=0,full_name=../../components/security_interstitials_strings.grdp: IDS_PHISHING_WEBVIEW_HEADING,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@3e0f(size_without_padding=147,padding=0,full_name=../../components/security_interstitials_strings.grdp: IDS_PHISHING_WEBVIEW_EXPLANATION_PARAGRAPH,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4e85(size_without_padding=11,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_CALENDAR_CLEAR,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4e86(size_without_padding=11,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_CALENDAR_TODAY,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4e87(size_without_padding=16,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_SUBMIT_LABEL,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4e89(size_without_padding=11,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_RESET_LABEL,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4e8a(size_without_padding=17,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_FILE_BUTTON_LABEL,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4e8b(size_without_padding=18,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_MULTIPLE_FILES_BUTTON_LABEL,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4e8c(size_without_padding=20,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_FILE_NO_FILE_LABEL,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4e8d(size_without_padding=14,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_FILE_MULTIPLE_UPLOAD,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4e8e(size_without_padding=26,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_OTHER_COLOR_LABEL,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4e92(size_without_padding=8,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_PLACEHOLDER_FOR_DAY_OF_MONTH_FIELD,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4e93(size_without_padding=8,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_PLACEHOLDER_FOR_MONTH_FIELD,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4e94(size_without_padding=10,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_PLACEHOLDER_FOR_YEAR_FIELD,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4e95(size_without_padding=17,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_SELECT_MENU_LIST_TEXT,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4e96(size_without_padding=16,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_THIS_MONTH_LABEL,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4e97(size_without_padding=15,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_THIS_WEEK_LABEL,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4e98(size_without_padding=14,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_WEEK_NUMBER_LABEL,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4e99(size_without_padding=32,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_CALENDAR_SHOW_MONTH_SELECTOR,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4e9a(size_without_padding=21,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_CALENDAR_SHOW_NEXT_MONTH,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4e9b(size_without_padding=25,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_CALENDAR_SHOW_PREVIOUS_MONTH,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4e9c(size_without_padding=24,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_CALENDAR_WEEK_DESCRIPTION,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4e9d(size_without_padding=13,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_ARTICLE,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4e9e(size_without_padding=12,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_BANNER,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4e9f(size_without_padding=19,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_COMPLEMENTARY,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ea0(size_without_padding=14,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_CHECK_BOX,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ea1(size_without_padding=18,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_CONTENT_INFO,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ea2(size_without_padding=16,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_DEFINITION,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ea4(size_without_padding=10,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_DESCRIPTION_TERM,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ea5(size_without_padding=25,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_DISCLOSURE_TRIANGLE,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ea6(size_without_padding=10,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_FEED,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ea9(size_without_padding=12,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_FOOTER,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4eac(size_without_padding=19,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_TOGGLE_BUTTON,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ead(size_without_padding=13,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_HEADING,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4eae(size_without_padding=10,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_LINK,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4eaf(size_without_padding=10,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_MAIN_CONTENT,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4eb0(size_without_padding=25,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_MARK,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4eb1(size_without_padding=10,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_MATH,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4eb2(size_without_padding=16,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_NAVIGATIONAL_LINK,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4eb3(size_without_padding=12,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_REGION,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4eb4(size_without_padding=23,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_SEARCH_BOX,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4eb5(size_without_padding=12,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_STATUS,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4eb6(size_without_padding=12,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_SWITCH,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4eb8(size_without_padding=11,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_ALERT,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4eb9(size_without_padding=18,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_ALERT_DIALOG,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4eba(size_without_padding=17,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_APPLICATION,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ebb(size_without_padding=16,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_BLOCKQUOTE,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ebc(size_without_padding=12,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_BUTTON,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ebd(size_without_padding=22,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_BUTTON_DROP_DOWN,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ebe(size_without_padding=10,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_CELL,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ebf(size_without_padding=18,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_COLOR_WELL,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ec0(size_without_padding=19,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_COLUMN_HEADER,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ec2(size_without_padding=17,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_DATE,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ec3(size_without_padding=26,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_DATE_TIME,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ec4(size_without_padding=12,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_DIALOG,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ec5(size_without_padding=15,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_DIRECTORY,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ec6(size_without_padding=14,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_DOCUMENT,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ec7(size_without_padding=12,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_EMBEDDED_OBJECT,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ec8(size_without_padding=13,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_GRAPHIC,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ec9(size_without_padding=16,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_HEADING_WITH_LEVEL,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4eca(size_without_padding=17,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_INPUT_TIME,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ecb(size_without_padding=14,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_LIST_BOX,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ecc(size_without_padding=9,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_LOG,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ecd(size_without_padding=13,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_MARQUEE,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ece(size_without_padding=10,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_MENU,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ecf(size_without_padding=14,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_MENU_BAR,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ed0(size_without_padding=17,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_MENU_BUTTON,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ed1(size_without_padding=15,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_MENU_ITEM,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ed2(size_without_padding=11,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_METER,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ed3(size_without_padding=10,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_NOTE,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ed4(size_without_padding=19,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_POP_UP_BUTTON,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ed5(size_without_padding=24,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_PROGRESS_INDICATOR,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ed6(size_without_padding=18,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_RADIO,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ed7(size_without_padding=17,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_RADIO_GROUP,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ed8(size_without_padding=16,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_ROW_HEADER,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ed9(size_without_padding=16,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_SCROLL_BAR,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4eda(size_without_padding=12,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_SEARCH,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4edb(size_without_padding=12,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_SLIDER,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4edc(size_without_padding=17,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_SPIN_BUTTON,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4edd(size_without_padding=14,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_SPLITTER,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ede(size_without_padding=9,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_TAB,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4edf(size_without_padding=11,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_TABLE,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ee0(size_without_padding=14,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_TAB_LIST,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ee1(size_without_padding=15,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_TAB_PANEL,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ee2(size_without_padding=10,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_TIME,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ee3(size_without_padding=11,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_TIMER,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ee4(size_without_padding=13,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_TOOLBAR,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ee5(size_without_padding=13,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_TOOLTIP,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ee6(size_without_padding=10,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_TREE,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ee7(size_without_padding=15,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_TREE_GRID,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ee8(size_without_padding=15,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_ROLE_TREE_ITEM,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ee9(size_without_padding=11,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_AM_PM_FIELD_TEXT,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4eea(size_without_padding=9,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_DAY_OF_MONTH_FIELD_TEXT,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4eeb(size_without_padding=11,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_HOUR_FIELD_TEXT,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4eec(size_without_padding=19,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_MEDIA_DEFAULT,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4eed(size_without_padding=15,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_MEDIA_AUDIO_ELEMENT,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4eee(size_without_padding=15,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_MEDIA_VIDEO_ELEMENT,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4eef(size_without_padding=10,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_MEDIA_MUTE_BUTTON,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ef0(size_without_padding=12,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_MEDIA_UNMUTE_BUTTON,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ef1(size_without_padding=10,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_MEDIA_PLAY_BUTTON,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ef2(size_without_padding=11,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_MEDIA_PAUSE_BUTTON,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ef3(size_without_padding=18,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_MEDIA_CURRENT_TIME_DISPLAY,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ef4(size_without_padding=20,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_MEDIA_TIME_REMAINING_DISPLAY,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ef5(size_without_padding=23,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_MEDIA_ENTER_FULL_SCREEN_BUTTON,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ef6(size_without_padding=26,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_MEDIA_EXIT_FULL_SCREEN_BUTTON,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ef7(size_without_padding=26,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_MEDIA_SHOW_CLOSED_CAPTIONS_BUTTON,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ef8(size_without_padding=26,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_MEDIA_HIDE_CLOSED_CAPTIONS_BUTTON,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4ef9(size_without_padding=31,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_MEDIA_CAST_OFF_BUTTON,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4efa(size_without_padding=33,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_MEDIA_CAST_ON_BUTTON,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4efb(size_without_padding=20,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_MEDIA_DOWNLOAD_BUTTON,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4efc(size_without_padding=30,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_MEDIA_OVERFLOW_BUTTON,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4eff(size_without_padding=22,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_MEDIA_MUTE_BUTTON_HELP,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f00(size_without_padding=24,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_MEDIA_UNMUTE_BUTTON_HELP,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f01(size_without_padding=20,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_MEDIA_PLAY_BUTTON_HELP,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f02(size_without_padding=20,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_MEDIA_PAUSE_BUTTON_HELP,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f03(size_without_padding=25,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_MEDIA_AUDIO_SLIDER_HELP,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f04(size_without_padding=25,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_MEDIA_VIDEO_SLIDER_HELP,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f05(size_without_padding=29,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_MEDIA_CURRENT_TIME_DISPLAY_HELP,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f06(size_without_padding=42,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_MEDIA_TIME_REMAINING_DISPLAY_HELP,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f07(size_without_padding=36,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_MEDIA_ENTER_FULL_SCREEN_BUTTON_HELP,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f09(size_without_padding=38,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_MEDIA_SHOW_CLOSED_CAPTIONS_BUTTON_HELP,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f0a(size_without_padding=37,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_MEDIA_HIDE_CLOSED_CAPTIONS_BUTTON_HELP,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f0d(size_without_padding=18,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_MEDIA_OVERFLOW_BUTTON_HELP,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f0e(size_without_padding=18,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_MILLISECOND_FIELD_TEXT,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f0f(size_without_padding=13,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_MINUTE_FIELD_TEXT,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f10(size_without_padding=11,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_MONTH_FIELD_TEXT,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f11(size_without_padding=13,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_SECOND_FIELD_TEXT,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f13(size_without_padding=10,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_AX_YEAR_FIELD_TEXT,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f14(size_without_padding=17,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_INPUT_WEEK_TEMPLATE,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f15(size_without_padding=38,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_VALIDATION_VALUE_MISSING_MULTIPLE_FILE,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f16(size_without_padding=20,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_VALIDATION_TYPE_MISMATCH,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f17(size_without_padding=45,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL_EMPTY,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f18(size_without_padding=61,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL_EMPTY_DOMAIN,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f19(size_without_padding=63,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL_EMPTY_LOCAL,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f1a(size_without_padding=63,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL_INVALID_DOMAIN,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f1b(size_without_padding=47,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL_INVALID_DOTS,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f1c(size_without_padding=65,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL_INVALID_LOCAL,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f1d(size_without_padding=75,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL_NO_AT_SIGN,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f1e(size_without_padding=61,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_VALIDATION_TYPE_MISMATCH_MULTIPLE_EMAIL,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f1f(size_without_padding=48,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_VALIDATION_RANGE_UNDERFLOW,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f20(size_without_padding=32,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_VALIDATION_RANGE_UNDERFLOW_DATETIME,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f21(size_without_padding=45,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_VALIDATION_RANGE_OVERFLOW,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f22(size_without_padding=34,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_VALIDATION_RANGE_OVERFLOW_DATETIME,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f23(size_without_padding=81,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_VALIDATION_BAD_INPUT_DATETIME,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f24(size_without_padding=28,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_VALIDATION_BAD_INPUT_NUMBER,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f25(size_without_padding=33,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_VALIDATION_VALUE_MISSING,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f26(size_without_padding=51,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_VALIDATION_VALUE_MISSING_CHECKBOX,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f27(size_without_padding=27,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_VALIDATION_VALUE_MISSING_FILE,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f28(size_without_padding=41,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_VALIDATION_VALUE_MISSING_RADIO,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f29(size_without_padding=40,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_VALIDATION_VALUE_MISSING_SELECT,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f2a(size_without_padding=36,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f2b(size_without_padding=25,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_VALIDATION_TYPE_MISMATCH_URL,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f2c(size_without_padding=40,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_VALIDATION_PATTERN_MISMATCH,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f2d(size_without_padding=77,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_VALIDATION_STEP_MISMATCH,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f2e(size_without_padding=64,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_VALIDATION_STEP_MISMATCH_CLOSE_TO_LIMIT,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f2f(size_without_padding=96,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_VALIDATION_TOO_LONG,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f30(size_without_padding=95,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_VALIDATION_TOO_SHORT,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f31(size_without_padding=97,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_FORM_VALIDATION_TOO_SHORT_PLURAL,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f32(size_without_padding=14,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_MEDIA_OVERFLOW_MENU_CLOSED_CAPTIONS,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f33(size_without_padding=13,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_MEDIA_OVERFLOW_MENU_CLOSED_CAPTIONS_SUBMENU_TITLE,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f34(size_without_padding=10,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_MEDIA_OVERFLOW_MENU_CAST,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f35(size_without_padding=16,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_MEDIA_OVERFLOW_MENU_ENTER_FULLSCREEN,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f36(size_without_padding=21,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_MEDIA_OVERFLOW_MENU_EXIT_FULLSCREEN,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f37(size_without_padding=18,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_MEDIA_OVERFLOW_MENU_STOP_CAST,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f38(size_without_padding=10,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_MEDIA_OVERFLOW_MENU_MUTE,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f39(size_without_padding=12,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_MEDIA_OVERFLOW_MENU_UNMUTE,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f3a(size_without_padding=10,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_MEDIA_OVERFLOW_MENU_PLAY,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f3b(size_without_padding=11,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_MEDIA_OVERFLOW_MENU_PAUSE,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f3c(size_without_padding=14,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_MEDIA_OVERFLOW_MENU_DOWNLOAD,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f3d(size_without_padding=26,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_MEDIA_REMOTING_DISABLE_TEXT,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f3e(size_without_padding=23,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_MEDIA_REMOTING_CAST_TEXT,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f3f(size_without_padding=28,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_MEDIA_REMOTING_CAST_TO_UNKNOWN_DEVICE_TEXT,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f40(size_without_padding=14,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_MEDIA_TRACKS_NO_LABEL,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f41(size_without_padding=9,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_MEDIA_TRACKS_OFF,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@4f42(size_without_padding=27,padding=0,full_name=../../content/app/strings/content_strings.grd: IDS_PLUGIN_INITIALIZATION_ERROR,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@5bd6(size_without_padding=27,padding=0,full_name=../../android_webview/ui/aw_strings.grd: IDS_AW_WEBPAGE_NOT_AVAILABLE,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@5bd7(size_without_padding=69,padding=0,full_name=../../android_webview/ui/aw_strings.grd: IDS_AW_WEBPAGE_CAN_NOT_BE_LOADED,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@5bd8(size_without_padding=121,padding=0,full_name=../../android_webview/ui/aw_strings.grd: IDS_AW_WEBPAGE_TEMPORARILY_DOWN,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@5bd9(size_without_padding=161,padding=0,full_name=../../android_webview/ui/aw_strings.grd: IDS_AW_WEBPAGE_TEMPORARILY_DOWN_SUGGESTIONS,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@5bda(size_without_padding=80,padding=0,full_name=../../android_webview/ui/aw_strings.grd: IDS_AW_WEBPAGE_PARENTAL_PERMISSION_NEEDED,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@6917(size_without_padding=23,padding=0,full_name=../../ui/strings/app_locale_settings.grd: IDS_WEB_FONT_FAMILY,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@6918(size_without_padding=9,padding=0,full_name=../../ui/strings/app_locale_settings.grd: IDS_WEB_FONT_SIZE,object_path=,source_path=,flags={},num_aliases=1)
diff --git a/tools/binary_size/libsupersize/testdata/Archive_Pak.golden b/tools/binary_size/libsupersize/testdata/Archive_Pak_Files.golden
similarity index 99%
rename from tools/binary_size/libsupersize/testdata/Archive_Pak.golden
rename to tools/binary_size/libsupersize/testdata/Archive_Pak_Files.golden
index ac6faf10..72bbe415 100644
--- a/tools/binary_size/libsupersize/testdata/Archive_Pak.golden
+++ b/tools/binary_size/libsupersize/testdata/Archive_Pak_Files.golden
@@ -92,7 +92,7 @@
 .bss@2dffda0(size_without_padding=28,padding=0,full_name=g_chrome_content_browser_client,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1)
 .bss@2dffe80(size_without_padding=4,padding=196,full_name=SaveHistogram(_JNIEnv*, base::android::JavaParamRef<_jobject*> const&, base::android::JavaParamRef<_jstring*> const&, base::android::JavaParamRef<_jlongArray*> const&, int)::atomic_histogram_pointer,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1)
 .bss@2dffe84(size_without_padding=4,padding=0,full_name=g_AnimationFrameTimeHistogram_clazz,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={anon,gen},num_aliases=1)
-.pak.translations@0(size_without_padding=18,padding=0,full_name=en-US.pak: overhead,object_path=,source_path=,flags={},num_aliases=1)
+.pak.translations@0(size_without_padding=18,padding=0,full_name=../mock_apk/assets/en-US.pak: overhead,object_path=,source_path=,flags={},num_aliases=1)
 .pak.translations@0(size_without_padding=0,padding=0,full_name=Pak compression leftover artifacts,object_path=,source_path=,flags={},num_aliases=1)
 .pak.translations@3ac6(size_without_padding=40,padding=0,full_name=../../components/app_modal_strings.grdp: IDS_BEFOREUNLOAD_MESSAGEBOX_MESSAGE,object_path=,source_path=,flags={},num_aliases=1)
 .pak.translations@3d7c(size_without_padding=24,padding=0,full_name=../../components/policy_strings.grdp: IDS_POLICY_TYPE_ERROR,object_path=,source_path=,flags={},num_aliases=1)
diff --git a/tools/binary_size/libsupersize/testdata/mock_output_directory/en-US.pak b/tools/binary_size/libsupersize/testdata/mock_apk/assets/en-US.pak
similarity index 100%
rename from tools/binary_size/libsupersize/testdata/mock_output_directory/en-US.pak
rename to tools/binary_size/libsupersize/testdata/mock_apk/assets/en-US.pak
Binary files differ
diff --git a/tools/binary_size/libsupersize/testdata/mock_output_directory/build_vars.txt b/tools/binary_size/libsupersize/testdata/mock_output_directory/build_vars.txt
new file mode 100644
index 0000000..87893860
--- /dev/null
+++ b/tools/binary_size/libsupersize/testdata/mock_output_directory/build_vars.txt
@@ -0,0 +1,2 @@
+android_sdk_root=../mock_sdk
+android_tool_prefix=../mock_toolchain/
diff --git a/tools/binary_size/libsupersize/testdata/mock_output_directory/size-info/test.apk.jar.info b/tools/binary_size/libsupersize/testdata/mock_output_directory/size-info/test.apk.jar.info
new file mode 100644
index 0000000..8fa1107
--- /dev/null
+++ b/tools/binary_size/libsupersize/testdata/mock_output_directory/size-info/test.apk.jar.info
@@ -0,0 +1,3 @@
+org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation,../../chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackAnimation.java
+org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,../../chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java
+org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller,../../chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java
diff --git a/tools/binary_size/libsupersize/testdata/mock_output_directory/en-US.pak.info b/tools/binary_size/libsupersize/testdata/mock_output_directory/size-info/test.apk.pak.info
similarity index 100%
rename from tools/binary_size/libsupersize/testdata/mock_output_directory/en-US.pak.info
rename to tools/binary_size/libsupersize/testdata/mock_output_directory/size-info/test.apk.pak.info
diff --git a/tools/binary_size/libsupersize/testdata/mock_sdk/tools/bin/apkanalyzer b/tools/binary_size/libsupersize/testdata/mock_sdk/tools/bin/apkanalyzer
new file mode 100755
index 0000000..51298a2b
--- /dev/null
+++ b/tools/binary_size/libsupersize/testdata/mock_sdk/tools/bin/apkanalyzer
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+# 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.
+
+base_dir=$(dirname "$0")
+exec python "$base_dir/mock_apkanalyzer.py" "$@"
diff --git a/tools/binary_size/libsupersize/testdata/mock_sdk/tools/bin/apkanalyzer.output b/tools/binary_size/libsupersize/testdata/mock_sdk/tools/bin/apkanalyzer.output
new file mode 100644
index 0000000..6197c60c
--- /dev/null
+++ b/tools/binary_size/libsupersize/testdata/mock_sdk/tools/bin/apkanalyzer.output
@@ -0,0 +1,193 @@
+P d 42356	53800	5949070	<TOTAL>
+P d 28637	31775	3771805	org
+P d 28637	31703	3770013	org.chromium
+P d 20581	23192	2794666	org.chromium.chrome
+P d 20580	23191	2749952	org.chromium.chrome.browser
+P d 1660	1861	227552	org.chromium.chrome.browser.compositor
+P d 755	818	115566	org.chromium.chrome.browser.compositor.layouts
+P d 281	308	57117	org.chromium.chrome.browser.compositor.layouts.phone
+P d 140	146	33221	org.chromium.chrome.browser.compositor.layouts.phone.stack
+C d 55	55	16417	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack
+M d 1	1	113	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack <clinit>()
+M d 1	1	225	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack <init>(android.content.Context,org.chromium.chrome.browser.compositor.layouts.phone.StackLayout)
+M d 1	1	61	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack org.chromium.chrome.browser.compositor.layouts.phone.StackLayout access$000(org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack)
+M d 1	1	100	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack boolean allowOverscroll()
+M d 1	1	112	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float computeDiscardAlpha(float,float)
+M d 1	1	136	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float computeDiscardScale(float,float,boolean)
+M d 1	1	88	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float computeOverscrollPercent()
+M d 1	1	969	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void computeTabClippingVisibilityHelper()
+M d 1	1	1512	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void computeTabOffsetHelper(android.graphics.RectF)
+M d 1	1	217	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void computeTabScrollOffsetHelper()
+M d 1	1	1008	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void computeTabTiltHelper(long,android.graphics.RectF)
+M d 1	1	560	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void computeTabVisibilitySortingHelper(android.graphics.RectF)
+M d 1	1	446	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack boolean evenOutTabs(float,boolean)
+M d 1	1	223	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void finishAnimationsIfDone(long,boolean)
+M d 1	1	128	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float getStackScale(android.graphics.RectF)
+M d 1	1	87	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack org.chromium.chrome.browser.compositor.layouts.phone.stack.StackTab getTabAtPositon(float,float)
+M d 1	1	79	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void resetInputActionIndices()
+M d 1	1	219	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void springBack(long)
+M d 1	1	217	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void updateOverscrollOffset()
+M d 1	1	90	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float approxScreen(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackTab,float)
+M d 1	1	64	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void cleanupTabs()
+M d 1	1	261	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void commitDiscard(long,boolean)
+M d 1	1	253	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack int computeSpacing(int)
+M d 1	1	318	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void computeTabPosition(long,android.graphics.RectF)
+M d 1	1	322	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void contextChanged(android.content.Context)
+M d 1	1	563	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void createStackTabs(boolean)
+M d 1	1	1521	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void drag(long,float,float,float,float)
+M d 1	1	813	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void finishAnimation(long)
+M d 1	1	503	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void fling(long,float,float,float,float)
+M d 1	1	68	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack int getCount()
+M d 1	1	84	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float getDefaultDiscardDirection()
+M d 1	1	79	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float getMaxScroll(boolean)
+M d 1	1	113	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float getMaxTabHeight()
+M d 1	1	196	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float getMinScroll(boolean)
+M d 1	1	105	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float getRange(float)
+M d 1	1	94	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float getScrollDimensionSize()
+M d 1	1	360	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack int getTabIndexAtPositon(float,float,float)
+M d 1	1	121	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack int getVisibleCount()
+M d 1	1	96	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack boolean isDisplayable()
+M d 1	1	400	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void notifySizeChanged$483d2f6e(int)
+M d 1	1	107	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void onUpOrCancel(long)
+M d 1	1	341	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack boolean onUpdateCompositorAnimations(long,boolean)
+M d 1	1	101	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack boolean onUpdateViewAnimation(long,boolean)
+M d 1	1	68	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void requestUpdate()
+M d 1	1	69	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float screenToScroll(float)
+M d 1	1	69	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float scrollToScreen(float)
+M d 1	1	134	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void setScrollTarget(float,boolean)
+M d 1	1	121	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void setStackFocusInfo(float,int)
+M d 1	1	244	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void setWarpState(boolean,boolean)
+M d 1	1	919	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void startAnimation$62adfb33(long,int,int,int,boolean)
+M d 1	1	77	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void startAnimation$6848a047(long,int)
+M d 1	1	95	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void startAnimation$78b04ab8(long,int,int,boolean)
+M d 1	1	137	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void stopScrollingMovement(long)
+M d 1	1	142	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void swipeCancelled(long)
+M d 1	1	266	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack void tabClosingEffect(long,int)
+F d 0	0	12	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack boolean $assertionsDisabled
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float DRAG_ANGLE_THRESHOLD
+F d 0	0	11	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation mAnimationFactory
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mBorderLeftPadding
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mBorderTopPadding
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mBorderTransparentSide
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mBorderTransparentTop
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack int mCurrentMode
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mCurrentScrollDirection
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mDiscardDirection
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack org.chromium.chrome.browser.compositor.layouts.phone.stack.StackTab mDiscardingTab
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack int mDragLock$7be2905e
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mEvenOutProgress
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mEvenOutRate
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack boolean mInSwipe
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack boolean mIsDying
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack boolean mIsStackForCurrentTabList
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mLastPinch0Offset
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mLastPinch1Offset
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack long mLastScrollUpdate
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack org.chromium.chrome.browser.compositor.layouts.phone.StackLayout mLayout
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack int mLongPressSelected
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mMaxOverScroll
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mMaxOverScrollAngle
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mMaxOverScrollSlide
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mMaxUnderScroll
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mMinScrollMotion
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mMinSpacing
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack android.view.animation.Interpolator mOverScrollAngleInterpolator
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack int mOverScrollCounter
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack int mOverScrollDerivative
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mOverScrollOffset
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack android.view.animation.Interpolator mOverscrollSlideInterpolator
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack int mOverviewAnimationType$5d025a5c
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack int mPinch0TabIndex
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack int mPinch1TabIndex
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack boolean mRecomputePosition
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack int mReferenceOrderIndex
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mScrollOffset
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mScrollOffsetForDyingTabs
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mScrollTarget
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller mScroller
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack org.chromium.chrome.browser.compositor.layouts.phone.stack.StackTab mScrollingTab
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack int mSpacing
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack org.chromium.chrome.browser.compositor.layouts.phone.stack.StackTab[] mStackTabs
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mSwipeBoundedScrollOffset
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack boolean mSwipeCanScroll
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack boolean mSwipeIsCancelable
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mSwipeUnboundScrollOffset
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack org.chromium.chrome.browser.compositor.layouts.ChromeAnimation mTabAnimations
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack org.chromium.chrome.browser.tabmodel.TabList mTabList
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack android.view.animation.Interpolator mUnderScrollAngleInterpolator
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack org.chromium.chrome.browser.compositor.layouts.phone.stack.StackViewAnimation mViewAnimationFactory
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack android.animation.Animator mViewAnimations
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack android.animation.AnimatorListenerAdapter mViewAnimatorListener
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack float mWarpSize
+C d 22	22	3843	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller
+M d 1	1	471	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller <clinit>()
+M d 1	1	146	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller <init>(android.content.Context)
+M d 1	1	62	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller boolean access$000(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller)
+M d 1	1	65	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller boolean access$002(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,boolean)
+M d 1	1	62	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller int access$100(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller)
+M d 1	1	62	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller int access$200(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller)
+M d 1	1	62	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller long access$300(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller)
+M d 1	1	62	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller int access$400(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller)
+M d 1	1	62	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller float access$500(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller)
+M d 1	1	176	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller void adjustDuration(int,int,int)
+M d 1	1	71	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller float getDeceleration(int)
+M d 1	1	97	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller double getSplineDeceleration(int)
+M d 1	1	115	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller double getSplineFlingDistance(int)
+M d 1	1	220	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller void onEdgeReached()
+M d 1	1	167	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller void startSpringback$4868d30e(int,int)
+M d 1	1	218	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller boolean continueWhenFinished(long)
+M d 1	1	66	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller void finish()
+M d 1	1	660	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller void fling(int,int,int,int,int,long)
+M d 1	1	138	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller boolean springback(int,int,int,long)
+M d 1	1	109	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller void startScroll(int,int,long,int)
+M d 1	1	440	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller boolean update(long)
+M d 1	1	90	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller void updateScroll(float)
+F d 0	0	11	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller float DECELERATION_RATE
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller float[] SPLINE_POSITION
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller float[] SPLINE_TIME
+F d 0	0	11	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller float mCurrVelocity
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller int mCurrentPosition
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller float mDeceleration
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller int mDuration
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller int mFinal
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller boolean mFinished
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller float mFlingFriction
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller int mOver
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller float mPhysicalCoeff
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller int mSplineDistance
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller int mSplineDuration
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller int mStart
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller long mStartTime
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller int mState
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller int mVelocity
+C d 13	13	1820	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation
+M d 1	1	112	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation <init>(org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,float,float,float,float,float)
+M d 1	1	40	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation void addTiltScrollAnimation(org.chromium.chrome.browser.compositor.layouts.ChromeAnimation,org.chromium.chrome.browser.compositor.layouts.components.LayoutTab,float,int,int)
+M d 1	1	1055	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation org.chromium.chrome.browser.compositor.layouts.ChromeAnimation createAnimatorSetForType$2fab410e$104f6ddb(int,org.chromium.chrome.browser.compositor.layouts.phone.stack.StackTab[],int,int,int,float,float)
+M d 1	1	36	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation org.chromium.chrome.browser.compositor.layouts.ChromeAnimation createEnterStackAnimatorSet(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackTab[],int,int,float)
+M d 1	1	139	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation org.chromium.chrome.browser.compositor.layouts.ChromeAnimation createNewTabOpenedAnimatorSet$4078c09e(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackTab[])
+M d 1	1	32	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation org.chromium.chrome.browser.compositor.layouts.ChromeAnimation createReachTopAnimatorSet(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackTab[],float)
+M d 1	1	36	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation org.chromium.chrome.browser.compositor.layouts.ChromeAnimation createTabFocusedAnimatorSet(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackTab[],int,int,float)
+M d 1	1	32	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation org.chromium.chrome.browser.compositor.layouts.ChromeAnimation createViewMoreAnimatorSet(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackTab[],int)
+M d 1	1	30	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation float getScreenPositionInScrollDirection(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackTab)
+M d 1	1	24	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation float getScreenSizeInScrollDirection()
+M d 1	1	92	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation float getStaticTabPosition()
+M d 1	1	67	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation float getToolbarOffsetToLineUpWithBorder()
+M d 1	1	24	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation boolean isDefaultDiscardDirectionPositive()
+F d 0	0	11	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation float mBorderTopHeight
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation float mBorderTopOpaqueHeight
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation float mHeight
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation float mHeightMinusBrowserControls
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack mStack
+F d 0	0	10	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation float mWidth
+C d 10	12	2555	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimationLandscape
+M d 1	1	82	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimationLandscape <init>(org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,float,float,float,float,float)
+M d 1	1	106	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimationLandscape void addTiltScrollAnimation(org.chromium.chrome.browser.compositor.layouts.ChromeAnimation,org.chromium.chrome.browser.compositor.layouts.components.LayoutTab,float,int,int)
+M d 1	1	592	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimationLandscape org.chromium.chrome.browser.compositor.layouts.ChromeAnimation createEnterStackAnimatorSet(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackTab[],int,int,float)
+M d 1	1	59	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimationLandscape org.chromium.chrome.browser.compositor.layouts.ChromeAnimation createNewTabOpenedAnimatorSet$4078c09e(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackTab[])
+M d 1	1	210	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimationLandscape org.chromium.chrome.browser.compositor.layouts.ChromeAnimation createReachTopAnimatorSet(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackTab[],float)
+M d 1	1	961	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimationLandscape org.chromium.chrome.browser.compositor.layouts.ChromeAnimation createTabFocusedAnimatorSet(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackTab[],int,int,float)
+M d 1	1	256	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimationLandscape org.chromium.chrome.browser.compositor.layouts.ChromeAnimation createViewMoreAnimatorSet(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackTab[],int)
+M d 1	1	79	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimationLandscape float getScreenPositionInScrollDirection(org.chromium.chrome.browser.compositor.layouts.phone.stack.StackTab)
+M d 1	1	54	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimationLandscape float getScreenSizeInScrollDirection()
+M d 1	1	52	org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimationLandscape boolean isDefaultDiscardDirectionPositive()
diff --git a/tools/binary_size/libsupersize/testdata/mock_sdk/tools/bin/mock_apkanalyzer.py b/tools/binary_size/libsupersize/testdata/mock_sdk/tools/bin/mock_apkanalyzer.py
new file mode 100644
index 0000000..79d149a7
--- /dev/null
+++ b/tools/binary_size/libsupersize/testdata/mock_sdk/tools/bin/mock_apkanalyzer.py
@@ -0,0 +1,23 @@
+# 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 os
+import sys
+
+
+_SCRIPT_DIR = os.path.dirname(__file__)
+_OUTPUT_FILE = os.path.join(_SCRIPT_DIR, 'apkanalyzer.output')
+
+
+def main():
+  # Without a proguard mapping file, the last argument is the apk_path.
+  apk_path = sys.argv[-1]
+  assert os.path.exists(apk_path), 'Apk does not exist: {}'.format(apk_path)
+  with open(_OUTPUT_FILE, 'r') as f:
+    sys.stdout.write(f.read())
+
+
+if __name__ == '__main__':
+  main()
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml
index 24ffd8b..5bb1807 100644
--- a/tools/metrics/histograms/enums.xml
+++ b/tools/metrics/histograms/enums.xml
@@ -15115,7 +15115,7 @@
   <int value="37" label="kCryptotokenPrivate"/>
   <int value="38" label="kDataReductionProxy"/>
   <int value="39" label="kDiagnostics"/>
-  <int value="40" label="kDial"/>
+  <int value="40" label="kDeleted_Dial"/>
   <int value="41" label="kDebugger"/>
   <int value="42" label="kDeclarative"/>
   <int value="43" label="kDeclarativeContent"/>
@@ -26065,6 +26065,7 @@
   <int value="-1311133348" label="VrBrowsingNativeAndroidUi:enabled"/>
   <int value="-1310737697" label="MaterialDesignSettings:enabled"/>
   <int value="-1302904242" label="enable-navigation-tracing"/>
+  <int value="-1302859198" label="enable-stylus-virtual-keyboard:disabled"/>
   <int value="-1294050129" label="ContentFullscreen:disabled"/>
   <int value="-1290053302"
       label="OfflinePagesInDownloadHomeOpenInCct:disabled"/>
@@ -26629,6 +26630,7 @@
   <int value="67639499" label="stop-loading-in-background:disabled"/>
   <int value="70878462" label="WebAssembly:disabled"/>
   <int value="73929836" label="VrBrowsingInCustomTab:enabled"/>
+  <int value="75207621" label="enable-stylus-virtual-keyboard:enabled"/>
   <int value="75237697" label="ash-enable-new-overview-ui"/>
   <int value="75747474" label="disable-webview-signin-flow"/>
   <int value="78998551" label="disable-hosted-app-shim-creation"/>
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml
index d2fbbc2..052a686 100644
--- a/tools/metrics/histograms/histograms.xml
+++ b/tools/metrics/histograms/histograms.xml
@@ -1488,6 +1488,19 @@
   </summary>
 </histogram>
 
+<histogram name="Android.PhotoPicker.DecoderHostSuccess" units="%">
+  <owner>finnur@chromium.org</owner>
+  <owner>twellington@chromium.org</owner>
+  <summary>
+    The percentage of successful decodes, per batch of photos decoded. Intended
+    to help identify if there are browsers where decoding fails 100% of the
+    time.  Be wary at looking at other numbers in the histogram, as a value
+    emitted at, say, 50% may represent one failure in a two-item decoding or 50
+    failures in a hundred-item decoding.  These are qualitatively different
+    experiences for a user.
+  </summary>
+</histogram>
+
 <histogram name="Android.PhotoPicker.DialogAction"
     enum="PhotoPickerDialogAction">
   <owner>finnur@chromium.org</owner>
@@ -73907,6 +73920,21 @@
   </summary>
 </histogram>
 
+<histogram name="RenderFrameHostImpl.DroppedInterfaceRequests" units="count">
+  <owner>engedy@chromium.org</owner>
+  <summary>
+    For each load in a frame, records the number of interface requests to
+    RenderFrame::GetRemoteInterfaces that arrived to the RenderFrameHostImpl
+    after the RFHI had already committed the next cross-document navigation.
+
+    This means that |document_scoped_interface_provider_binding_| was already
+    unbound at the time from the interface connection that had been used to
+    service RenderFrame::GetRemoteInterface for the previous load, so those
+    interface requests are dropped. This histogram measures how often, if at
+    all, that happens in practice.
+  </summary>
+</histogram>
+
 <histogram name="RenderFrameObservers.DidChangeScrollOffset" units="ms">
   <obsolete>
     Deprecated 2/2018
diff --git a/tools/win/DebugVisualizers/BUILD.gn b/tools/win/DebugVisualizers/BUILD.gn
index d85b8d3d..cdd7a23 100644
--- a/tools/win/DebugVisualizers/BUILD.gn
+++ b/tools/win/DebugVisualizers/BUILD.gn
@@ -21,22 +21,13 @@
 assert(is_win)
 
 config("chrome") {
-  # TODO(tikuta): remove this condition if lld supports /NATVIS.
-  if (!use_lld) {
-    ldflags = [ "/NATVIS:" + rebase_path("chrome.natvis", root_build_dir) ]
-  }
+  ldflags = [ "/NATVIS:" + rebase_path("chrome.natvis", root_build_dir) ]
 }
 
 config("skia") {
-  # TODO(tikuta): remove this condition if lld supports /NATVIS.
-  if (!use_lld) {
-    ldflags = [ "/NATVIS:" + rebase_path("skia.natvis", root_build_dir) ]
-  }
+  ldflags = [ "/NATVIS:" + rebase_path("skia.natvis", root_build_dir) ]
 }
 
 config("webkit") {
-  # TODO(tikuta): remove this condition if lld supports /NATVIS.
-  if (!use_lld) {
-    ldflags = [ "/NATVIS:" + rebase_path("webkit.natvis", root_build_dir) ]
-  }
+  ldflags = [ "/NATVIS:" + rebase_path("webkit.natvis", root_build_dir) ]
 }
diff --git a/ui/arc/notification/arc_notification_manager.cc b/ui/arc/notification/arc_notification_manager.cc
index ad12a9a..c015fc7 100644
--- a/ui/arc/notification/arc_notification_manager.cc
+++ b/ui/arc/notification/arc_notification_manager.cc
@@ -7,8 +7,6 @@
 #include <memory>
 #include <utility>
 
-#include "ash/shell.h"
-#include "ash/system/toast/toast_manager.h"
 #include "base/memory/ptr_util.h"
 #include "base/memory/singleton.h"
 #include "base/stl_util.h"
@@ -348,19 +346,6 @@
   get_app_id_callback_.Reset();
 }
 
-void ArcNotificationManager::OnToastPosted(mojom::ArcToastDataPtr data) {
-  const base::string16 text16(
-      base::UTF8ToUTF16(data->text.has_value() ? *data->text : std::string()));
-  const base::string16 dismiss_text16(base::UTF8ToUTF16(
-      data->dismiss_text.has_value() ? *data->dismiss_text : std::string()));
-  ash::Shell::Get()->toast_manager()->Show(
-      ash::ToastData(data->id, text16, data->duration, dismiss_text16));
-}
-
-void ArcNotificationManager::OnToastCancelled(mojom::ArcToastDataPtr data) {
-  ash::Shell::Get()->toast_manager()->Cancel(data->id);
-}
-
 bool ArcNotificationManager::ShouldIgnoreNotification(
     arc::mojom::ArcNotificationData* data) {
   // Notifications from Play Store are ignored in Public Session and Kiosk mode.
diff --git a/ui/arc/notification/arc_notification_manager.h b/ui/arc/notification/arc_notification_manager.h
index 3eabb26..42279600 100644
--- a/ui/arc/notification/arc_notification_manager.h
+++ b/ui/arc/notification/arc_notification_manager.h
@@ -65,8 +65,6 @@
   void OnNotificationPosted(mojom::ArcNotificationDataPtr data) override;
   void OnNotificationUpdated(mojom::ArcNotificationDataPtr data) override;
   void OnNotificationRemoved(const std::string& key) override;
-  void OnToastPosted(mojom::ArcToastDataPtr data) override;
-  void OnToastCancelled(mojom::ArcToastDataPtr data) override;
 
   // Methods called from ArcNotificationItem:
   void SendNotificationRemovedFromChrome(const std::string& key);
diff --git a/ui/base/ui_base_features.cc b/ui/base/ui_base_features.cc
index 696e1a8..f5fdafd 100644
--- a/ui/base/ui_base_features.cc
+++ b/ui/base/ui_base_features.cc
@@ -16,6 +16,9 @@
 const base::Feature kEnableFloatingVirtualKeyboard = {
     "enable-floating-virtual-keyboard", base::FEATURE_ENABLED_BY_DEFAULT};
 
+const base::Feature kEnableStylusVirtualKeyboard = {
+    "enable-stylus-virtual-keyboard", base::FEATURE_DISABLED_BY_DEFAULT};
+
 // Applies the material design mode to elements throughout Chrome (not just top
 // Chrome).
 const base::Feature kSecondaryUiMd = {"SecondaryUiMd",
diff --git a/ui/base/ui_base_features.h b/ui/base/ui_base_features.h
index fc82a8f..9644e1d8 100644
--- a/ui/base/ui_base_features.h
+++ b/ui/base/ui_base_features.h
@@ -14,6 +14,7 @@
 
 // Keep sorted!
 UI_BASE_EXPORT extern const base::Feature kEnableFloatingVirtualKeyboard;
+UI_BASE_EXPORT extern const base::Feature kEnableStylusVirtualKeyboard;
 UI_BASE_EXPORT extern const base::Feature kSecondaryUiMd;
 UI_BASE_EXPORT extern const base::Feature kTouchableAppContextMenu;
 
diff --git a/ui/base/ui_features.gni b/ui/base/ui_features.gni
index 1a8ec2b0..25f9980 100644
--- a/ui/base/ui_features.gni
+++ b/ui/base/ui_features.gni
@@ -20,11 +20,6 @@
   # Set to true to if mus (aka the UI service) is enabled. Use the features kMus
   # (or kMash in chrome code) to start in mus/mash.
   enable_mus = is_chromeos
-
-  # Optimize parts of Chrome's UI written with web technologies (HTML/CSS/JS)
-  # for runtime performance purposes. This does more work at compile time for
-  # speed benefits at runtime (so we skip in debug builds).
-  optimize_webui = !is_debug
 }
 
 enable_hidpi = is_mac || is_win || is_linux
diff --git a/ui/events/event.cc b/ui/events/event.cc
index bbc278f..b48e3ed2 100644
--- a/ui/events/event.cc
+++ b/ui/events/event.cc
@@ -640,9 +640,8 @@
 MouseEvent::~MouseEvent() = default;
 
 // static
-bool MouseEvent::IsRepeatedClickEvent(
-    const MouseEvent& event1,
-    const MouseEvent& event2) {
+bool MouseEvent::IsRepeatedClickEvent(const MouseEvent& event1,
+                                      const MouseEvent& event2) {
   // These values match the Windows defaults.
   static const int kDoubleClickTimeMS = 500;
   static const int kDoubleClickWidth = 4;
@@ -682,7 +681,6 @@
     if (event.type() == ui::ET_MOUSE_RELEASED) {
       if (event.changed_button_flags() ==
               last_click_event_->changed_button_flags()) {
-        last_click_complete_ = true;
         return last_click_event_->GetClickCount();
       } else {
         // If last_click_event_ has changed since this button was pressed
@@ -690,18 +688,17 @@
         return click_count;
       }
     }
-    if (event.time_stamp() != last_click_event_->time_stamp())
-      last_click_complete_ = true;
-    if (!last_click_complete_ ||
+    // Return the prior click count and do not update |last_click_event_| when
+    // re-processing the same native event, or processing a non-user event.
+    if (event.time_stamp() == last_click_event_->time_stamp() ||
         IsX11SendEventTrue(event.native_event())) {
-      click_count = last_click_event_->GetClickCount();
-    } else if (IsRepeatedClickEvent(*last_click_event_, event)) {
-      click_count = last_click_event_->GetClickCount() + 1;
+      return last_click_event_->GetClickCount();
     }
+    if (IsRepeatedClickEvent(*last_click_event_, event))
+      click_count = last_click_event_->GetClickCount() + 1;
     delete last_click_event_;
   }
   last_click_event_ = new MouseEvent(event);
-  last_click_complete_ = false;
   if (click_count > 3)
     click_count = 3;
   last_click_event_->SetClickCount(click_count);
@@ -712,13 +709,11 @@
   if (last_click_event_) {
     delete last_click_event_;
     last_click_event_ = NULL;
-    last_click_complete_ = false;
   }
 }
 
 // static
 MouseEvent* MouseEvent::last_click_event_ = NULL;
-bool MouseEvent::last_click_complete_ = false;
 
 int MouseEvent::GetClickCount() const {
   if (type() != ET_MOUSE_PRESSED && type() != ET_MOUSE_RELEASED)
diff --git a/ui/events/event.h b/ui/events/event.h
index 017e807..abaad0b 100644
--- a/ui/events/event.h
+++ b/ui/events/event.h
@@ -614,7 +614,7 @@
   const PointerDetails& pointer_details() const { return pointer_details_; }
 
  private:
-  FRIEND_TEST_ALL_PREFIXES(EventTest, DoubleClickRequiresRelease);
+  FRIEND_TEST_ALL_PREFIXES(EventTest, DoubleClickRequiresUniqueTimestamp);
   FRIEND_TEST_ALL_PREFIXES(EventTest, SingleClickRightLeft);
 
   // Returns the repeat count based on the previous mouse click, if it is
@@ -627,13 +627,9 @@
   // See description above getter for details.
   int changed_button_flags_;
 
+  // The most recent user-generated MouseEvent, used to detect double clicks.
   static MouseEvent* last_click_event_;
 
-  // We can create a MouseEvent for a native event more than once. We set this
-  // to true when the next event either has a different timestamp or we see a
-  // release signalling that the press (click) event was completed.
-  static bool last_click_complete_;
-
   // Structure for holding pointer details for implementing PointerEvents API.
   PointerDetails pointer_details_;
 };
diff --git a/ui/events/event_unittest.cc b/ui/events/event_unittest.cc
index 3702b5b..615e6500 100644
--- a/ui/events/event_unittest.cc
+++ b/ui/events/event_unittest.cc
@@ -88,112 +88,107 @@
 
 TEST(EventTest, RepeatedClick) {
   const gfx::Point origin(0, 0);
-  MouseEvent mouse_ev1(ET_MOUSE_PRESSED, origin, origin, EventTimeForNow(), 0,
-                       0);
-  MouseEvent mouse_ev2(ET_MOUSE_PRESSED, origin, origin, EventTimeForNow(), 0,
-                       0);
-  LocatedEventTestApi test_ev1(&mouse_ev1);
-  LocatedEventTestApi test_ev2(&mouse_ev2);
+  MouseEvent event1(ET_MOUSE_PRESSED, origin, origin, EventTimeForNow(), 0, 0);
+  MouseEvent event2(ET_MOUSE_PRESSED, origin, origin, EventTimeForNow(), 0, 0);
+  LocatedEventTestApi test_event1(&event1);
+  LocatedEventTestApi test_event2(&event2);
 
   base::TimeTicks start = base::TimeTicks();
   base::TimeTicks soon = start + base::TimeDelta::FromMilliseconds(1);
   base::TimeTicks later = start + base::TimeDelta::FromMilliseconds(1000);
 
-  // Same event.
-  test_ev1.set_location(gfx::Point(0, 0));
-  test_ev2.set_location(gfx::Point(1, 0));
-  test_ev1.set_time_stamp(start);
-  test_ev2.set_time_stamp(start);
-  EXPECT_FALSE(MouseEvent::IsRepeatedClickEvent(mouse_ev1, mouse_ev2));
-  MouseEvent mouse_ev3(mouse_ev1);
-  EXPECT_FALSE(MouseEvent::IsRepeatedClickEvent(mouse_ev1, mouse_ev3));
+  // Same time stamp (likely the same native event).
+  test_event1.set_location(gfx::Point(0, 0));
+  test_event2.set_location(gfx::Point(1, 0));
+  test_event1.set_time_stamp(start);
+  test_event2.set_time_stamp(start);
+  EXPECT_FALSE(MouseEvent::IsRepeatedClickEvent(event1, event2));
+  MouseEvent mouse_ev3(event1);
+  EXPECT_FALSE(MouseEvent::IsRepeatedClickEvent(event1, mouse_ev3));
 
   // Close point.
-  test_ev1.set_location(gfx::Point(0, 0));
-  test_ev2.set_location(gfx::Point(1, 0));
-  test_ev1.set_time_stamp(start);
-  test_ev2.set_time_stamp(soon);
-  EXPECT_TRUE(MouseEvent::IsRepeatedClickEvent(mouse_ev1, mouse_ev2));
+  test_event1.set_location(gfx::Point(0, 0));
+  test_event2.set_location(gfx::Point(1, 0));
+  test_event1.set_time_stamp(start);
+  test_event2.set_time_stamp(soon);
+  EXPECT_TRUE(MouseEvent::IsRepeatedClickEvent(event1, event2));
 
   // Too far.
-  test_ev1.set_location(gfx::Point(0, 0));
-  test_ev2.set_location(gfx::Point(10, 0));
-  test_ev1.set_time_stamp(start);
-  test_ev2.set_time_stamp(soon);
-  EXPECT_FALSE(MouseEvent::IsRepeatedClickEvent(mouse_ev1, mouse_ev2));
+  test_event1.set_location(gfx::Point(0, 0));
+  test_event2.set_location(gfx::Point(10, 0));
+  test_event1.set_time_stamp(start);
+  test_event2.set_time_stamp(soon);
+  EXPECT_FALSE(MouseEvent::IsRepeatedClickEvent(event1, event2));
 
   // Too long a time between clicks.
-  test_ev1.set_location(gfx::Point(0, 0));
-  test_ev2.set_location(gfx::Point(0, 0));
-  test_ev1.set_time_stamp(start);
-  test_ev2.set_time_stamp(later);
-  EXPECT_FALSE(MouseEvent::IsRepeatedClickEvent(mouse_ev1, mouse_ev2));
+  test_event1.set_location(gfx::Point(0, 0));
+  test_event2.set_location(gfx::Point(0, 0));
+  test_event1.set_time_stamp(start);
+  test_event2.set_time_stamp(later);
+  EXPECT_FALSE(MouseEvent::IsRepeatedClickEvent(event1, event2));
 }
 
-// Tests that an event only increases the click count and gets marked as a
-// double click if a release event was seen for the previous click. This
-// prevents the same PRESSED event from being processed twice:
-// http://crbug.com/389162
-TEST(EventTest, DoubleClickRequiresRelease) {
-  const gfx::Point origin1(0, 0);
-  const gfx::Point origin2(100, 0);
-  std::unique_ptr<MouseEvent> ev;
-  base::TimeTicks start = base::TimeTicks();
-  base::TimeTicks soon = start + base::TimeDelta::FromMilliseconds(1);
+// Tests that re-processing the same mouse press event (detected by timestamp)
+// does not yield a double click event: http://crbug.com/389162
+TEST(EventTest, DoubleClickRequiresUniqueTimestamp) {
+  const gfx::Point point(0, 0);
+  base::TimeTicks time1 = base::TimeTicks();
+  base::TimeTicks time2 = time1 + base::TimeDelta::FromMilliseconds(1);
 
-  ev.reset(new MouseEvent(ET_MOUSE_PRESSED, origin1, origin1, EventTimeForNow(),
-                          0, 0));
-  ev->set_time_stamp(start);
-  EXPECT_EQ(1, MouseEvent::GetRepeatCount(*ev));
-  ev.reset(new MouseEvent(ET_MOUSE_PRESSED, origin1, origin1, EventTimeForNow(),
-                          0, 0));
-  ev->set_time_stamp(start);
-  EXPECT_EQ(1, MouseEvent::GetRepeatCount(*ev));
+  // Re-processing the same press doesn't yield a double-click.
+  MouseEvent event(ET_MOUSE_PRESSED, point, point, time1, 0, 0);
+  EXPECT_EQ(1, MouseEvent::GetRepeatCount(event));
+  EXPECT_EQ(1, MouseEvent::GetRepeatCount(event));
+  // Processing a press with the same timestamp doesn't yield a double-click.
+  event = MouseEvent(ET_MOUSE_PRESSED, point, point, time1, 0, 0);
+  EXPECT_EQ(1, MouseEvent::GetRepeatCount(event));
+  // Processing a press with a later timestamp does yield a double-click.
+  event = MouseEvent(ET_MOUSE_PRESSED, point, point, time2, 0, 0);
+  EXPECT_EQ(2, MouseEvent::GetRepeatCount(event));
+  MouseEvent::ResetLastClickForTest();
 
-  ev.reset(new MouseEvent(ET_MOUSE_PRESSED, origin2, origin2, EventTimeForNow(),
-                          0, 0));
-  ev->set_time_stamp(start);
-  EXPECT_EQ(1, MouseEvent::GetRepeatCount(*ev));
-  ev.reset(new MouseEvent(ET_MOUSE_RELEASED, origin2, origin2,
-                          EventTimeForNow(), 0, 0));
-  ev->set_time_stamp(start);
-  EXPECT_EQ(1, MouseEvent::GetRepeatCount(*ev));
-  ev.reset(new MouseEvent(ET_MOUSE_PRESSED, origin2, origin2, EventTimeForNow(),
-                          0, 0));
-  ev->set_time_stamp(soon);
-  EXPECT_EQ(2, MouseEvent::GetRepeatCount(*ev));
-  ev.reset(new MouseEvent(ET_MOUSE_RELEASED, origin2, origin2,
-                          EventTimeForNow(), 0, 0));
-  ev->set_time_stamp(soon);
-  EXPECT_EQ(2, MouseEvent::GetRepeatCount(*ev));
+  // Test processing a double press and release sequence with one timestamp.
+  event = MouseEvent(ET_MOUSE_PRESSED, point, point, time1, 0, 0);
+  EXPECT_EQ(1, MouseEvent::GetRepeatCount(event));
+  event = MouseEvent(ET_MOUSE_RELEASED, point, point, time1, 0, 0);
+  EXPECT_EQ(1, MouseEvent::GetRepeatCount(event));
+  event = MouseEvent(ET_MOUSE_PRESSED, point, point, time1, 0, 0);
+  EXPECT_EQ(1, MouseEvent::GetRepeatCount(event));
+  event = MouseEvent(ET_MOUSE_RELEASED, point, point, time1, 0, 0);
+  EXPECT_EQ(1, MouseEvent::GetRepeatCount(event));
+  MouseEvent::ResetLastClickForTest();
+
+  // Test processing a double press and release sequence with two timestamps.
+  event = MouseEvent(ET_MOUSE_PRESSED, point, point, time1, 0, 0);
+  EXPECT_EQ(1, MouseEvent::GetRepeatCount(event));
+  event = MouseEvent(ET_MOUSE_RELEASED, point, point, time1, 0, 0);
+  EXPECT_EQ(1, MouseEvent::GetRepeatCount(event));
+  event = MouseEvent(ET_MOUSE_PRESSED, point, point, time2, 0, 0);
+  EXPECT_EQ(2, MouseEvent::GetRepeatCount(event));
+  event = MouseEvent(ET_MOUSE_RELEASED, point, point, time2, 0, 0);
+  EXPECT_EQ(2, MouseEvent::GetRepeatCount(event));
   MouseEvent::ResetLastClickForTest();
 }
 
-// Tests that clicking right and then left clicking does not generate a double
-// click.
+// Tests that right clicking, then left clicking does not yield double clicks.
 TEST(EventTest, SingleClickRightLeft) {
-  const gfx::Point origin(0, 0);
-  std::unique_ptr<MouseEvent> ev;
-  base::TimeTicks start = base::TimeTicks();
-  base::TimeTicks soon = start + base::TimeDelta::FromMilliseconds(1);
+  const gfx::Point point(0, 0);
+  base::TimeTicks time1 = base::TimeTicks();
+  base::TimeTicks time2 = time1 + base::TimeDelta::FromMilliseconds(1);
+  base::TimeTicks time3 = time1 + base::TimeDelta::FromMilliseconds(2);
 
-  ev.reset(new MouseEvent(ET_MOUSE_PRESSED, origin, origin, EventTimeForNow(),
-                          ui::EF_RIGHT_MOUSE_BUTTON,
-                          ui::EF_RIGHT_MOUSE_BUTTON));
-  ev->set_time_stamp(start);
-  EXPECT_EQ(1, MouseEvent::GetRepeatCount(*ev));
-  ev.reset(new MouseEvent(ET_MOUSE_PRESSED, origin, origin, EventTimeForNow(),
-                          ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON));
-  ev->set_time_stamp(start);
-  EXPECT_EQ(1, MouseEvent::GetRepeatCount(*ev));
-  ev.reset(new MouseEvent(ET_MOUSE_RELEASED, origin, origin, EventTimeForNow(),
-                          ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON));
-  ev->set_time_stamp(start);
-  EXPECT_EQ(1, MouseEvent::GetRepeatCount(*ev));
-  ev.reset(new MouseEvent(ET_MOUSE_PRESSED, origin, origin, EventTimeForNow(),
-                          ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON));
-  ev->set_time_stamp(soon);
-  EXPECT_EQ(2, MouseEvent::GetRepeatCount(*ev));
+  MouseEvent event(ET_MOUSE_PRESSED, point, point, time1,
+                   ui::EF_RIGHT_MOUSE_BUTTON, ui::EF_RIGHT_MOUSE_BUTTON);
+  EXPECT_EQ(1, MouseEvent::GetRepeatCount(event));
+  event = MouseEvent(ET_MOUSE_PRESSED, point, point, time2,
+                     ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
+  EXPECT_EQ(1, MouseEvent::GetRepeatCount(event));
+  event = MouseEvent(ET_MOUSE_RELEASED, point, point, time2,
+                     ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
+  EXPECT_EQ(1, MouseEvent::GetRepeatCount(event));
+  event = MouseEvent(ET_MOUSE_PRESSED, point, point, time3,
+                     ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
+  EXPECT_EQ(2, MouseEvent::GetRepeatCount(event));
   MouseEvent::ResetLastClickForTest();
 }
 
diff --git a/ui/file_manager/file_manager/background/js/compiled_resources2.gyp b/ui/file_manager/file_manager/background/js/compiled_resources2.gyp
index 171eff0..2894295 100644
--- a/ui/file_manager/file_manager/background/js/compiled_resources2.gyp
+++ b/ui/file_manager/file_manager/background/js/compiled_resources2.gyp
@@ -209,10 +209,20 @@
 #      'target_name': 'mock_progress_center',
 #      'includes': ['../../../compile_js2.gypi'],
 #    },
-#    {
-#      'target_name': 'mock_volume_manager',
-#      'includes': ['../../../compile_js2.gypi'],
-#    },
+    {
+      'target_name': 'mock_volume_manager',
+      'dependencies': [
+        '../../../externs/compiled_resources2.gyp:entry_location',
+        '../../../externs/compiled_resources2.gyp:volume_info_list',
+        '../../../externs/compiled_resources2.gyp:volume_info',
+        '../../../externs/compiled_resources2.gyp:volume_manager',
+        '../../common/js/compiled_resources2.gyp:mock_entry',
+        'volume_info_impl',
+        'volume_info_list_impl',
+        'volume_manager_factory',
+      ],
+      'includes': ['../../../compile_js2.gypi'],
+    },
     {
       'target_name': 'progress_center',
       'dependencies': [
diff --git a/ui/file_manager/file_manager/background/js/mock_volume_manager.js b/ui/file_manager/file_manager/background/js/mock_volume_manager.js
index 42313b1f..ec042b4 100644
--- a/ui/file_manager/file_manager/background/js/mock_volume_manager.js
+++ b/ui/file_manager/file_manager/background/js/mock_volume_manager.js
@@ -5,6 +5,7 @@
 /**
  * Mock class for VolumeManager.
  * @constructor
+ * @implements {VolumeManager}
  */
 function MockVolumeManager() {
   this.volumeInfoList = new VolumeInfoListImpl();
@@ -41,7 +42,7 @@
 /**
  * Creates, installs and returns a mock VolumeInfo instance.
  *
- * @param {!VolumeType} type
+ * @param {!VolumeManagerCommon.VolumeType} type
  * @param {string} volumeId
  * @param {string} label
  *
@@ -58,7 +59,7 @@
 /**
  * Returns the corresponding VolumeInfo.
  *
- * @param {MockFileEntry} entry MockFileEntry pointing anywhere on a volume.
+ * @param {!Entry|!FakeEntry} entry FileEntry pointing anywhere on a volume.
  * @return {VolumeInfo} Corresponding VolumeInfo.
  */
 MockVolumeManager.prototype.getVolumeInfo = function(entry) {
@@ -69,7 +70,7 @@
  * Obtains location information from an entry.
  * Current implementation can handle only fake entries.
  *
- * @param {Entry} entry A fake entry.
+ * @param {!Entry|!FakeEntry} entry A fake entry.
  * @return {EntryLocation} Location information.
  */
 MockVolumeManager.prototype.getLocationInfo = function(entry) {
@@ -80,8 +81,8 @@
 
   if (entry.filesystem.name === VolumeManagerCommon.VolumeType.DRIVE) {
     var volumeInfo = this.volumeInfoList.item(0);
-    var roootType;
-    var isRootEntry;
+    var rootType = VolumeManagerCommon.RootType.DRIVE;
+    var isRootEntry = entry.fullPath === '/root';
     if (entry.fullPath.startsWith('/team_drives')) {
       if (entry.fullPath === '/team_drives') {
         rootType = VolumeManagerCommon.RootType.TEAM_DRIVES_GRAND_ROOT;
@@ -90,9 +91,6 @@
         rootType = VolumeManagerCommon.RootType.TEAM_DRIVE;
         isRootEntry = util.isTeamDriveRoot(entry);
       }
-    } else {
-      rootType = VolumeManagerCommon.RootType.DRIVE;
-      isRootEntry = entry.fullPath === '/root';
     }
     return new EntryLocationImpl(volumeInfo, rootType, isRootEntry, true);
   }
@@ -105,8 +103,13 @@
  * @return {VolumeInfo} Volume info.
  */
 MockVolumeManager.prototype.getCurrentProfileVolumeInfo = function(volumeType) {
-  return VolumeManagerImpl.prototype.getCurrentProfileVolumeInfo.call(
-      this, volumeType);
+  for (var i = 0; i < this.volumeInfoList.length; i++) {
+    var volumeInfo = this.volumeInfoList.item(i);
+    if (volumeInfo.profile.isCurrentProfile &&
+        volumeInfo.volumeType === volumeType)
+      return volumeInfo;
+  }
+  return null;
 };
 
 /**
@@ -119,34 +122,55 @@
 
 /**
  * Utility function to create a mock VolumeInfo.
- * @param {VolumeType} type Volume type.
+ * @param {!VolumeManagerCommon.VolumeType} type Volume type.
  * @param {string} volumeId Volume id.
  * @param {string} label Label.
- * @return {VolumeInfo} Created mock VolumeInfo.
+ * @return {!VolumeInfo} Created mock VolumeInfo.
  */
 MockVolumeManager.createMockVolumeInfo = function(type, volumeId, label) {
   var fileSystem = new MockFileSystem(volumeId, 'filesystem:' + volumeId);
 
   var volumeInfo = new VolumeInfoImpl(
       type, volumeId, fileSystem,
-      '',                                         // error
-      '',                                         // deviceType
-      '',                                         // devicePath
-      false,                                      // isReadOnly
-      false,                                      // isReadOnlyRemovableDevice
-      {isCurrentProfile: true, displayName: ''},  // profile
-      label,                                      // label
-      undefined,                                  // providerId
-      false,                                      // hasMedia
-      false,                                      // configurable
-      false,                                      // watchable
-      'network',                                  // source
-      '',                                         // diskFileSystemType
-      {});                                        // iconSet
+      '',                                          // error
+      '',                                          // deviceType
+      '',                                          // devicePath
+      false,                                       // isReadOnly
+      false,                                       // isReadOnlyRemovableDevice
+      {isCurrentProfile: true, displayName: ''},   // profile
+      label,                                       // label
+      undefined,                                   // providerId
+      false,                                       // hasMedia
+      false,                                       // configurable
+      false,                                       // watchable
+      VolumeManagerCommon.Source.NETWORK,          // source
+      VolumeManagerCommon.FileSystemType.UNKNOWN,  // diskFileSystemType
+      {});                                         // iconSet
 
   return volumeInfo;
 };
 
+MockVolumeManager.prototype.mountArchive = function(
+    fileUrl, successCallback, errorCallback) {
+  throw new Error('Not implemented.');
+};
+MockVolumeManager.prototype.unmount = function(
+    volumeInfo, successCallback, errorCallback) {
+  throw new Error('Not implemented.');
+};
+MockVolumeManager.prototype.configure = function(volumeInfo) {
+  throw new Error('Not implemented.');
+};
+MockVolumeManager.prototype.addEventListener = function(type, handler) {
+  throw new Error('Not implemented.');
+};
+MockVolumeManager.prototype.removeEventListener = function(type, handler) {
+  throw new Error('Not implemented.');
+};
+MockVolumeManager.prototype.dispatchEvent = function(event) {
+  throw new Error('Not implemented.');
+};
+
 /**
  * Mock class for VolumeManagerWrapper.
  *
@@ -178,7 +202,8 @@
  */
 MockVolumeManagerWrapper.installMockSingleton = function(opt_singleton) {
   MockVolumeManagerWrapper.instance_ =
-      opt_singleton || new MockVolumeManagerWrapper();
+      /** @type {!VolumeManager} */ (
+          opt_singleton || new MockVolumeManagerWrapper());
   volumeManagerFactory.getInstance = function() {
     return Promise.resolve(MockVolumeManagerWrapper.instance_);
   };
@@ -186,7 +211,7 @@
 /**
  * Creates, installs and returns a mock VolumeInfo instance.
  *
- * @param {!VolumeType} type
+ * @param {!VolumeManagerCommon.VolumeType} type
  * @param {string} volumeId
  * @param {string} label
  *
@@ -202,13 +227,13 @@
 /**
  * Returns the corresponding VolumeInfo.
  *
- * @param {MockFileEntry} entry MockFileEntry pointing anywhere on a volume.
+ * @param {FileEntry} entry MockFileEntry pointing anywhere on a volume.
  * @return {VolumeInfo} Corresponding VolumeInfo.
  */
 MockVolumeManagerWrapper.prototype.getVolumeInfo = function(entry) {
   for (var i = 0; i < this.volumeInfoList.length; i++) {
     if (this.volumeInfoList.item(i).volumeId === entry.filesystem.name)
-      return this.volumeInfoList.item(i);
+      return /** @type {!VolumeInfo} */ (this.volumeInfoList.item(i));
   }
   return null;
 };
@@ -216,18 +241,17 @@
  * Obtains location information from an entry.
  * Current implementation can handle only fake entries.
  *
- * @param {Entry} entry A fake entry.
+ * @param {!Entry} entry A fake entry.
  * @return {EntryLocation} Location information.
  */
 MockVolumeManagerWrapper.prototype.getLocationInfo = function(entry) {
+  var volumeInfo = /** @type {!VolumeInfo} */ (this.volumeInfoList.item(0));
   if (util.isFakeEntry(entry)) {
-    return new EntryLocationImpl(
-        this.volumeInfoList.item(0), entry.rootType, true, true);
+    return new EntryLocationImpl(volumeInfo, entry.rootType, true, true);
   }
   if (entry.filesystem.name === VolumeManagerCommon.VolumeType.DRIVE) {
-    var volumeInfo = this.volumeInfoList.item(0);
-    var roootType;
-    var isRootEntry;
+    var rootType = VolumeManagerCommon.RootType.DRIVE;
+    var isRootEntry = entry.fullPath === '/root';
     if (entry.fullPath.startsWith('/team_drives')) {
       if (entry.fullPath === '/team_drives') {
         rootType = VolumeManagerCommon.RootType.TEAM_DRIVES_GRAND_ROOT;
@@ -236,9 +260,6 @@
         rootType = VolumeManagerCommon.RootType.TEAM_DRIVE;
         isRootEntry = util.isTeamDriveRoot(entry);
       }
-    } else {
-      rootType = VolumeManagerCommon.RootType.DRIVE;
-      isRootEntry = entry.fullPath === '/root';
     }
     return new EntryLocationImpl(volumeInfo, rootType, isRootEntry, true);
   }
@@ -248,46 +269,43 @@
  * @param {VolumeManagerCommon.VolumeType} volumeType Volume type.
  * @return {VolumeInfo} Volume info.
  */
-MockVolumeManagerWrapper.prototype.getCurrentProfileVolumeInfo =
-    function(volumeType) {
+MockVolumeManagerWrapper.prototype.getCurrentProfileVolumeInfo = function(
+    volumeType) {
   return VolumeManager.prototype.getCurrentProfileVolumeInfo.call(
-      this, volumeType);
+      /** @type {!VolumeManager} */ (this), volumeType);
 };
-
 /**
  * @return {VolumeManagerCommon.DriveConnectionState} Current drive connection
  *     state.
  */
-MockVolumeManagerWrapper.getDriveConnectionState = function() {
+MockVolumeManagerWrapper.prototype.getDriveConnectionState = function() {
   return this.driveConnectionState;
 };
-
 /**
  * Utility function to create a mock VolumeInfo.
- * @param {VolumeType} type Volume type.
+ * @param {VolumeManagerCommon.VolumeType} type Volume type.
  * @param {string} volumeId Volume id.
  * @param {string} label Label.
- * @return {VolumeInfo} Created mock VolumeInfo.
+ * @return {!VolumeInfo} Created mock VolumeInfo.
  */
 MockVolumeManagerWrapper.createMockVolumeInfo =
     function(type, volumeId, label) {
   var fileSystem = new MockFileSystem(volumeId, 'filesystem:' + volumeId);
   var volumeInfo = new VolumeInfoImpl(
       type, volumeId, fileSystem,
-      '',                                         // error
-      '',                                         // deviceType
-      '',                                         // devicePath
-      false,                                      // isReadonly
-      false,                                      // isReadOnlyRemovableDevice
-      {isCurrentProfile: true, displayName: ''},  // profile
-      label,                                      // label
-      undefined,                                  // providerId
-      {},                                         // iconSet
-      false,                                      // hasMedia
-      false,                                      // configurable
-      false,                                      // watchable
-      'network',                                  // source
-      '',                                         // diskFileSystemType
-      {});                                        // iconSet
+      '',                                          // error
+      '',                                          // deviceType
+      '',                                          // devicePath
+      false,                                       // isReadonly
+      false,                                       // isReadOnlyRemovableDevice
+      {isCurrentProfile: true, displayName: ''},   // profile
+      label,                                       // label
+      undefined,                                   // providerId
+      false,                                       // hasMedia
+      false,                                       // configurable
+      false,                                       // watchable
+      VolumeManagerCommon.Source.NETWORK,          // source
+      VolumeManagerCommon.FileSystemType.UNKNOWN,  // diskFileSystemType
+      {});                                         // iconSet
   return volumeInfo;
 };
diff --git a/ui/file_manager/file_manager/background/js/volume_info_impl.js b/ui/file_manager/file_manager/background/js/volume_info_impl.js
index 667ffe0..301d77bc 100644
--- a/ui/file_manager/file_manager/background/js/volume_info_impl.js
+++ b/ui/file_manager/file_manager/background/js/volume_info_impl.js
@@ -30,6 +30,7 @@
  * @param {boolean} hasMedia When true the volume has been identified
  *     as containing media such as photos or videos.
  * @param {boolean} configurable When true, then the volume can be configured.
+ * @param {boolean} watchable When true, then the volume can be watched.
  * @param {VolumeManagerCommon.Source} source Source of the volume's data.
  * @param {VolumeManagerCommon.FileSystemType} diskFileSystemType File system
  *     type indentifier.
diff --git a/ui/file_manager/file_manager/common/js/compiled_resources2.gyp b/ui/file_manager/file_manager/common/js/compiled_resources2.gyp
index a539058b7..370faaf3 100644
--- a/ui/file_manager/file_manager/common/js/compiled_resources2.gyp
+++ b/ui/file_manager/file_manager/common/js/compiled_resources2.gyp
@@ -59,6 +59,14 @@
       'includes': ['../../../compile_js2.gypi'],
     },
     {
+      'target_name': 'mock_entry',
+      'dependencies': [
+        '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:assert',
+        'util',
+      ],
+      'includes': ['../../../compile_js2.gypi'],
+    },
+    {
       'target_name': 'progress_center_common',
       'includes': ['../../../compile_js2.gypi'],
     },
diff --git a/ui/file_manager/file_manager/common/js/mock_entry.js b/ui/file_manager/file_manager/common/js/mock_entry.js
index d275116..2c479b0f 100644
--- a/ui/file_manager/file_manager/common/js/mock_entry.js
+++ b/ui/file_manager/file_manager/common/js/mock_entry.js
@@ -19,6 +19,7 @@
  * @param {string=} opt_rootURL URL string of root which is used in
  *     MockEntry.toURL.
  * @constructor
+ * @extends {FileSystem}
  */
 function MockFileSystem(volumeId, opt_rootURL) {
   /** @type {string} */
@@ -70,7 +71,7 @@
 
 /**
  * Returns all children of the supplied directoryEntry.
- * @param  {!DirectoryEntry} directoryEntry
+ * @param  {!DirectoryEntry} directory parent directory to find children of.
  * @return {!Array<!Entry>}
  * @private
  */
@@ -93,10 +94,11 @@
 /**
  * Base class of mock entries.
  *
- * @param {MockFileSystem} filesystem File system where the entry is localed.
+ * @param {FileSystem} filesystem File system where the entry is localed.
  * @param {string} fullPath Full path of the entry.
- * @param {Object} metadata Metadata.
+ * @param {!Metadata} metadata Metadata.
  * @constructor
+ * @extends {Entry}
  */
 function MockEntry(filesystem, fullPath, metadata) {
   filesystem.entries[fullPath] = this;
@@ -119,16 +121,13 @@
  * Obtains metadata of the entry.
  *
  * @param {function(!Metadata)} onSuccess Function to take the metadata.
- * @param {function(Error)} onError
+ * @param {function(!FileError)=} onError
  */
 MockEntry.prototype.getMetadata = function(onSuccess, onError) {
-  new Promise(function(fulfill, reject) {
-    if (this.filesystem && !this.filesystem.entries[this.fullPath])
-      reject(new DOMError('NotFoundError'));
-    else
-      onSuccess(this.metadata);
-  }.bind(this))
-      .then(onSuccess, onError);
+  if (this.filesystem.entries[this.fullPath])
+    onSuccess(this.metadata);
+  else
+    onError(/** @type {!FileError} */ ({name: util.FileError.NOT_FOUND_ERR}));
 };
 
 /**
@@ -148,71 +147,78 @@
 /**
  * Obtains parent directory.
  *
- * @param {function(MockDirectoryEntry)} onSuccess Callback invoked with
+ * @param {function(!Entry)} onSuccess Callback invoked with
  *     the parent directory.
- * @param {function(Object)} onError Callback invoked with an error
+ * @param {function(!FileError)=} onError Callback invoked with an error
  *     object.
  */
-MockEntry.prototype.getParent = function(
-    onSuccess, onError) {
+MockEntry.prototype.getParent = function(onSuccess, onError) {
   var path = this.fullPath.replace(/\/[^\/]+$/, '') || '/';
   if (this.filesystem.entries[path])
     onSuccess(this.filesystem.entries[path]);
   else
-    onError({name: util.FileError.NOT_FOUND_ERR});
+    onError(/** @type {!FileError} */ ({name: util.FileError.NOT_FOUND_ERR}));
 };
 
 /**
  * Moves the entry to the directory.
  *
- * @param {MockDirectoryEntry} parent Destination directory.
+ * @param {!DirectoryEntry} parent Destination directory.
  * @param {string=} opt_newName New name.
- * @param {function(MockDirectoryEntry)} onSuccess Callback invoked with the
+ * @param {function(!Entry)=} opt_successCallback Callback invoked with the
  *     moved entry.
- * @param {function(Object)} onError Callback invoked with an error object.
+ * @param {function(!FileError)=} opt_errorCallback Callback invoked with an
+ *     error object.
  */
-MockEntry.prototype.moveTo = function(parent, opt_newName, onSuccess, onError) {
-  Promise.resolve().then(function() {
-    delete this.filesystem.entries[this.fullPath];
-    return this.clone(
-        joinPath(parent.fullPath, opt_newName || this.name),
-        parent.filesystem);
-  }.bind(this)).then(onSuccess, onError);
+MockEntry.prototype.moveTo = function(
+    parent, opt_newName, opt_successCallback, opt_errorCallback) {
+  Promise.resolve()
+      .then(() => {
+        delete this.filesystem.entries[this.fullPath];
+        return this.clone(
+            joinPath(parent.fullPath, opt_newName || this.name),
+            parent.filesystem);
+      })
+      .then(opt_successCallback);
 };
 
 /**
- * @param {MockDirectoryEntry} parent
+ * @param {DirectoryEntry} parent
  * @param {string=} opt_newName
- * @param {function(!MockEntry)} successCallback
- * @param {function} errorCallback
+ * @param {function(!Entry)=} opt_successCallback
+ * @param {function(!FileError)=} opt_errorCallback
  */
-MockEntry.prototype.copyTo =
-    function(parent, opt_newName, successCallback, errorCallback) {
-  Promise.resolve().then(function() {
-    return this.clone(
-        joinPath(parent.fullPath, opt_newName || this.name),
-        parent.filesystem);
-  }.bind(this)).then(successCallback, errorCallback);
+MockEntry.prototype.copyTo = function(
+    parent, opt_newName, opt_successCallback, opt_errorCallback) {
+  Promise.resolve()
+      .then(() => {
+        return this.clone(
+            joinPath(parent.fullPath, opt_newName || this.name),
+            parent.filesystem);
+      })
+      .then(opt_successCallback);
 };
 
 /**
  * Removes the entry.
  *
  * @param {function()} onSuccess Success callback.
- * @param {function(Object)} onError Callback invoked with an error object.
+ * @param {function(!FileError)=} onError Callback invoked with an error object.
  */
 MockEntry.prototype.remove = function(onSuccess, onError) {
   this.removed_ = true;
-  Promise.resolve().then(function() {
+  Promise.resolve().then(() => {
     delete this.filesystem.entries[this.fullPath];
-  }.bind(this)).then(onSuccess, onError);
+    onSuccess();
+  });
 };
 
 /**
  * Asserts that the entry was removed.
  */
 MockEntry.prototype.assertRemoved = function() {
-  assertTrue(this.removed_);
+  if (!this.removed_)
+    throw new Error('expected removed for file ' + this.name);
 };
 
 /**
@@ -220,7 +226,7 @@
  *
  * @param {string} fullpath New fullpath.
  * @param {FileSystem=} opt_filesystem New file system
- * @return {MockEntry} Cloned entry.
+ * @return {Entry} Cloned entry.
  */
 MockEntry.prototype.clone = function(fullpath, opt_filesystem) {
   throw new Error('Not implemented.');
@@ -231,7 +237,7 @@
  *
  * @param {FileSystem} filesystem File system where the entry is localed.
  * @param {string} fullPath Full path for the entry.
- * @param {Object} metadata Metadata.
+ * @param {!Metadata} metadata Metadata.
  * @param {Blob=} opt_content Optional content.
  * @extends {MockEntry}
  * @constructor
@@ -251,7 +257,7 @@
  * Returns a File that this represents.
  *
  * @param {function(!File)} onSuccess Function to take the file.
- * @param {function(Error)} onError
+ * @param {function(!Error)} onError
  */
 MockFileEntry.prototype.file = function(onSuccess, onError) {
   onSuccess(new File([this.content], this.toURL()));
@@ -270,12 +276,12 @@
  *
  * @param {FileSystem} filesystem File system where the entry is localed.
  * @param {string} fullPath Full path for the entry.
- * @param {Object=} opt_metadata Metadata.
+ * @param {Metadata=} opt_metadata Metadata.
  * @extends {MockEntry}
  * @constructor
  */
 function MockDirectoryEntry(filesystem, fullPath, opt_metadata) {
-  var metadata = opt_metadata || {};
+  var metadata = opt_metadata || /** @type {!Metadata} */ ({});
   metadata.size = metadata.size || 0;
   metadata.modificationTime = metadata.modificationTime || new Date();
   MockEntry.call(this, filesystem, fullPath, metadata);
@@ -302,21 +308,22 @@
   return this.filesystem.findChildren_(this);
 };
 
-  /**
+/**
  * Returns a file under the directory.
  *
  * @param {string} path Path.
  * @param {Object} option Option.
- * @param {callback(MockFileEntry)} onSuccess Success callback.
- * @param {callback(Object)} onError Failure callback;
+ * @param {function(!FileEntry)} onSuccess Success callback.
+ * @param {function(!FileError)} onError Failure callback;
  */
 MockDirectoryEntry.prototype.getFile = function(
     path, option, onSuccess, onError) {
   var fullPath = path[0] === '/' ? path : joinPath(this.fullPath, path);
   if (!this.filesystem.entries[fullPath])
-    onError({name: util.FileError.NOT_FOUND_ERR});
+    onError(/** @type {!FileError} */ ({name: util.FileError.NOT_FOUND_ERR}));
   else if (!(this.filesystem.entries[fullPath] instanceof MockFileEntry))
-    onError({name: util.FileError.TYPE_MISMATCH_ERR});
+    onError(
+        /** @type {!FileError} */ ({name: util.FileError.TYPE_MISMATCH_ERR}));
   else
     onSuccess(this.filesystem.entries[fullPath]);
 };
@@ -326,8 +333,8 @@
  *
  * @param {string} path Path.
  * @param {Object} option Option.
- * @param {callback(MockDirectoryEntry)} onSuccess Success callback.
- * @param {callback(Object)} onError Failure callback;
+ * @param {function(!MockDirectoryEntry)} onSuccess Success callback.
+ * @param {function(Object)} onError Failure callback;
  */
 MockDirectoryEntry.prototype.getDirectory =
     function(path, option, onSuccess, onError) {
@@ -353,7 +360,7 @@
 
 /**
  * Creates a MockDirectoryReader for the entry.
- * @return {DirectoryReader} A directory reader.
+ * @return {!DirectoryReader} A directory reader.
  */
 MockDirectoryEntry.prototype.createReader = function() {
   return new MockDirectoryReader(this.filesystem.findChildren_(this));
@@ -362,6 +369,8 @@
 /**
  * Mock class for DirectoryReader.
  * @param {!Array<!Entry>} entries
+ * @constructor
+ * @extends {DirectoryReader}
  */
 function MockDirectoryReader(entries) {
   this.entries_ = entries;
@@ -371,8 +380,8 @@
  * Returns entries from the filesystem associated with this directory
  * in chunks of 2.
  *
- * @param {function(Array)} success Success callback.
- * @param {function} error Error callback.
+ * @param {function(!Array<!Entry>)} success Success callback.
+ * @param {function(!FileError)=} error Error callback.
  */
 MockDirectoryReader.prototype.readEntries = function(success, error) {
   if (this.entries_.length > 0) {
diff --git a/ui/file_manager/file_manager/common/js/volume_manager_common.js b/ui/file_manager/file_manager/common/js/volume_manager_common.js
index 19c1dba..ddf8357 100644
--- a/ui/file_manager/file_manager/common/js/volume_manager_common.js
+++ b/ui/file_manager/file_manager/common/js/volume_manager_common.js
@@ -266,7 +266,7 @@
 /**
  * @typedef {{
  *   type: VolumeManagerCommon.DriveConnectionType,
- *   reason: VolumeManagerCommon.DriveConnectionReason
+ *   reason: (VolumeManagerCommon.DriveConnectionReason|undefined)
  * }}
  */
 VolumeManagerCommon.DriveConnectionState;
@@ -281,7 +281,8 @@
 
 /**
  * Obtains a volume info containing the passed entry.
- * @param {Entry|Object} entry Entry on the volume to be returned. Can be fake.
+ * @param {!Entry|!FakeEntry} entry Entry on the volume to be returned.
+ *     Can be fake.
  * @return {?VolumeInfo} The VolumeInfo instance or null if not found.
  */
 VolumeManagerCommon.VolumeInfoProvider.prototype.getVolumeInfo;
diff --git a/ui/file_manager/file_manager/test/BUILD.gn b/ui/file_manager/file_manager/test/BUILD.gn
index 57025d1b4..d37ac91 100644
--- a/ui/file_manager/file_manager/test/BUILD.gn
+++ b/ui/file_manager/file_manager/test/BUILD.gn
@@ -4,7 +4,8 @@
 
 action("create_test_main") {
   script = "//ui/file_manager/file_manager/test/scripts/create_test_main.py"
-  output = "$target_gen_dir/main.html"
+  output = "$target_gen_dir/../test.html"
+  deps = ["//ui/file_manager:resources"]
   args = [ "--output=" + rebase_path(output, root_build_dir) ]
   outputs = [
     output,
diff --git a/ui/file_manager/file_manager/test/scripts/create_test_main.py b/ui/file_manager/file_manager/test/scripts/create_test_main.py
index d88f4dd..6cf8fd0 100755
--- a/ui/file_manager/file_manager/test/scripts/create_test_main.py
+++ b/ui/file_manager/file_manager/test/scripts/create_test_main.py
@@ -18,14 +18,9 @@
 
 assert __name__ == '__main__'
 
-# If --output is provided, create specified empty file.
 parser = argparse.ArgumentParser()
 parser.add_argument('--output')
 args = parser.parse_args()
-if args.output:
-  with open(args.output, 'w') as output:
-    output.write('')
-
 
 # ROOT=//ui/file_manager/file_manager
 ROOT = os.path.abspath(os.path.join(sys.path[0], '../..'))
@@ -147,4 +142,10 @@
     ('<link rel="import" href="../../../third_party/polymer/v1_0/'
      'components-chromium/polymer/polymer.html">')] + scripts)
 
-write('test.html', GENERATED_HTML + '\n'.join(main_html))
+test_html = GENERATED_HTML + '\n'.join(main_html)
+write('test.html', test_html)
+
+# If --output is provided, also create specified file.
+if args.output:
+  with open(args.output, 'w') as output:
+    output.write(test_html)
diff --git a/ui/resources/BUILD.gn b/ui/resources/BUILD.gn
index 8286ba5..c10eb455 100644
--- a/ui/resources/BUILD.gn
+++ b/ui/resources/BUILD.gn
@@ -5,7 +5,7 @@
 import("//build/config/jumbo.gni")
 import("//tools/grit/grit_rule.gni")
 import("//tools/grit/repack.gni")
-import("//ui/base/ui_features.gni")
+import("//ui/webui/webui_features.gni")
 
 group("resources") {
   public_deps = [
diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn
index c02520d9..5162df95 100644
--- a/ui/views/BUILD.gn
+++ b/ui/views/BUILD.gn
@@ -789,6 +789,8 @@
     "test/views_test_helper_mac.mm",
     "test/widget_test.cc",
     "test/widget_test.h",
+    "test/widget_test_api.cc",
+    "test/widget_test_api.h",
     "test/widget_test_mac.mm",
     "test/x11_property_change_waiter.cc",
     "test/x11_property_change_waiter.h",
diff --git a/ui/views/cocoa/bridged_native_widget.mm b/ui/views/cocoa/bridged_native_widget.mm
index b2b794a..d88cba9 100644
--- a/ui/views/cocoa/bridged_native_widget.mm
+++ b/ui/views/cocoa/bridged_native_widget.mm
@@ -976,7 +976,8 @@
 
 void BridgedNativeWidget::OnWindowKeyStatusChangedTo(bool is_key) {
   Widget* widget = native_widget_mac()->GetWidget();
-  widget->OnNativeWidgetActivationChanged(is_key);
+  if (!widget->OnNativeWidgetActivationChanged(is_key))
+    return;
   // The contentView is the BridgedContentView hosting the views::RootView. The
   // focus manager will already know if a native subview has focus.
   if ([window_ contentView] == [window_ firstResponder]) {
diff --git a/ui/views/test/widget_test_api.cc b/ui/views/test/widget_test_api.cc
new file mode 100644
index 0000000..ef465fa
--- /dev/null
+++ b/ui/views/test/widget_test_api.cc
@@ -0,0 +1,13 @@
+// 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 "ui/views/widget/widget.h"
+
+namespace views {
+
+void DisableActivationChangeHandlingForTests() {
+  Widget::g_disable_activation_change_handling_ = true;
+}
+
+}  // namespace views
diff --git a/ui/views/test/widget_test_api.h b/ui/views/test/widget_test_api.h
new file mode 100644
index 0000000..fa3221d
--- /dev/null
+++ b/ui/views/test/widget_test_api.h
@@ -0,0 +1,17 @@
+// 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 UI_VIEWS_TEST_WIDGET_TEST_API_H_
+#define UI_VIEWS_TEST_WIDGET_TEST_API_H_
+
+namespace views {
+
+// Makes Widget::OnNativeWidgetActivationChanged return false, which prevents
+// handling of the corresponding event (if the native widget implementation
+// takes this into account).
+void DisableActivationChangeHandlingForTests();
+
+}  // namespace views
+
+#endif  // UI_VIEWS_TEST_WIDGET_TEST_API_H_
diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
index cde45a41..73514706 100644
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
@@ -348,7 +348,8 @@
 }
 
 void DesktopNativeWidgetAura::HandleActivationChanged(bool active) {
-  native_widget_delegate_->OnNativeWidgetActivationChanged(active);
+  if (!native_widget_delegate_->OnNativeWidgetActivationChanged(active))
+    return;
   wm::ActivationClient* activation_client =
       wm::GetActivationClient(host_->window());
   if (!activation_client)
diff --git a/ui/views/widget/native_widget_delegate.h b/ui/views/widget/native_widget_delegate.h
index 8f2e56a..018bc2ce 100644
--- a/ui/views/widget/native_widget_delegate.h
+++ b/ui/views/widget/native_widget_delegate.h
@@ -56,7 +56,8 @@
   virtual bool IsAlwaysRenderAsActive() const = 0;
 
   // Called when the activation state of a window has changed.
-  virtual void OnNativeWidgetActivationChanged(bool active) = 0;
+  // Returns true if this event should be handled.
+  virtual bool OnNativeWidgetActivationChanged(bool active) = 0;
 
   // Called when native focus moves from one native view to another.
   virtual void OnNativeFocus() = 0;
diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc
index 164e0eb..7bc25d68 100644
--- a/ui/views/widget/widget.cc
+++ b/ui/views/widget/widget.cc
@@ -84,6 +84,9 @@
 
 }  // namespace
 
+// static
+bool Widget::g_disable_activation_change_handling_ = false;
+
 // A default implementation of WidgetDelegate, used by Widget when no
 // WidgetDelegate is supplied.
 class DefaultWidgetDelegate : public WidgetDelegate {
@@ -1033,7 +1036,10 @@
   return always_render_as_active_;
 }
 
-void Widget::OnNativeWidgetActivationChanged(bool active) {
+bool Widget::OnNativeWidgetActivationChanged(bool active) {
+  if (g_disable_activation_change_handling_)
+    return false;
+
   // On windows we may end up here before we've completed initialization (from
   // an WM_NCACTIVATE). If that happens the WidgetDelegate likely doesn't know
   // the Widget and will crash attempting to access it.
@@ -1045,6 +1051,8 @@
 
   if (non_client_view())
     non_client_view()->frame_view()->ActivationChanged(active);
+
+  return true;
 }
 
 void Widget::OnNativeFocus() {
diff --git a/ui/views/widget/widget.h b/ui/views/widget/widget.h
index 6c0c6080..899e16e 100644
--- a/ui/views/widget/widget.h
+++ b/ui/views/widget/widget.h
@@ -789,7 +789,7 @@
   bool CanActivate() const override;
   bool IsAlwaysRenderAsActive() const override;
   void SetAlwaysRenderAsActive(bool always_render_as_active) override;
-  void OnNativeWidgetActivationChanged(bool active) override;
+  bool OnNativeWidgetActivationChanged(bool active) override;
   void OnNativeFocus() override;
   void OnNativeBlur() override;
   void OnNativeWidgetVisibilityChanging(bool visible) override;
@@ -858,6 +858,7 @@
   friend class ButtonTest;
   friend class TextfieldTest;
   friend class ViewAuraTest;
+  friend void DisableActivationChangeHandlingForTests();
 
   // Persists the window's restored position and "show" state using the
   // window delegate.
@@ -883,6 +884,8 @@
   // layer.
   const View::Views& GetViewsWithLayers();
 
+  static bool g_disable_activation_change_handling_;
+
   internal::NativeWidgetPrivate* native_widget_;
 
   base::ObserverList<WidgetObserver> observers_;
diff --git a/ui/views/widget/widget_interactive_uitest.cc b/ui/views/widget/widget_interactive_uitest.cc
index 1cad461..21e41dac 100644
--- a/ui/views/widget/widget_interactive_uitest.cc
+++ b/ui/views/widget/widget_interactive_uitest.cc
@@ -845,8 +845,9 @@
 
   ~WidgetActivationTest() override {}
 
-  void OnNativeWidgetActivationChanged(bool active) override {
+  bool OnNativeWidgetActivationChanged(bool active) override {
     active_ = active;
+    return true;
   }
 
   bool active() const { return active_; }
diff --git a/ui/webui/webui_features.gni b/ui/webui/webui_features.gni
new file mode 100644
index 0000000..c20d7c3
--- /dev/null
+++ b/ui/webui/webui_features.gni
@@ -0,0 +1,15 @@
+# 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.
+
+declare_args() {
+  # Optimize parts of Chrome's UI written with web technologies (HTML/CSS/JS)
+  # for runtime performance purposes. This does more work at compile time for
+  # speed benefits at runtime (so we skip in debug builds).
+  optimize_webui = !is_debug
+
+  # Enable closure type-checking for Chrome's web technology-based UI. This
+  # enables the webui_closure_compile target which does a no-op without this
+  # flag enabled. Requires Java.
+  closure_compile = is_chromeos || is_linux || is_android
+}