diff --git a/DEPS b/DEPS
index 9de95149..cbd9dbc 100644
--- a/DEPS
+++ b/DEPS
@@ -43,7 +43,7 @@
   # 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': 'a30c57cb7767baceb627e8d9e6f27955aba54c44',
+  'v8_revision': 'd53b0abddddd1e86970ce3d2f2946eb57c6b2176',
   # 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.
diff --git a/chrome/VERSION b/chrome/VERSION
index 636f02d4..e8ab594 100644
--- a/chrome/VERSION
+++ b/chrome/VERSION
@@ -1,4 +1,4 @@
 MAJOR=48
 MINOR=0
-BUILD=2559
+BUILD=2560
 PATCH=0
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index fd73bacc..5d34662 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -103,6 +103,7 @@
     "//components/autofill/core/browser",
     "//components/bookmarks/browser",
     "//components/bookmarks/managed",
+    "//components/browser_sync/browser",
     "//components/browser_sync/common",
     "//components/captive_portal",
     "//components/certificate_reporting",
diff --git a/chrome/browser/android/contextualsearch/contextual_search_delegate.cc b/chrome/browser/android/contextualsearch/contextual_search_delegate.cc
index f14cca3..b4e206e 100644
--- a/chrome/browser/android/contextualsearch/contextual_search_delegate.cc
+++ b/chrome/browser/android/contextualsearch/contextual_search_delegate.cc
@@ -17,10 +17,10 @@
 #include "chrome/browser/android/proto/client_discourse_context.pb.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/profiles/profile_manager.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/translate/translate_service.h"
 #include "chrome/common/pref_names.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/search_engines/template_url_service.h"
 #include "components/variations/net/variations_http_header_provider.h"
 #include "components/variations/variations_associated_data.h"
diff --git a/chrome/browser/android/favicon_helper.cc b/chrome/browser/android/favicon_helper.cc
index 66c5f59..2fe006e 100644
--- a/chrome/browser/android/favicon_helper.cc
+++ b/chrome/browser/android/favicon_helper.cc
@@ -18,8 +18,8 @@
 #include "chrome/browser/favicon/favicon_service_factory.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/profiles/profile_android.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/favicon/core/favicon_service.h"
 #include "components/favicon/core/favicon_util.h"
 #include "components/favicon_base/favicon_util.h"
diff --git a/chrome/browser/android/foreign_session_helper.cc b/chrome/browser/android/foreign_session_helper.cc
index 0a2ffdfd..299d1576 100644
--- a/chrome/browser/android/foreign_session_helper.cc
+++ b/chrome/browser/android/foreign_session_helper.cc
@@ -13,12 +13,12 @@
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/profiles/profile_android.h"
 #include "chrome/browser/sessions/session_restore.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/ui/android/tab_model/tab_model.h"
 #include "chrome/browser/ui/android/tab_model/tab_model_list.h"
 #include "chrome/common/pref_names.h"
 #include "chrome/common/url_constants.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/sync_driver/open_tabs_ui_delegate.h"
 #include "content/public/browser/notification_details.h"
 #include "content/public/browser/notification_service.h"
diff --git a/chrome/browser/android/most_visited_sites.cc b/chrome/browser/android/most_visited_sites.cc
index b462b17..4253e54 100644
--- a/chrome/browser/android/most_visited_sites.cc
+++ b/chrome/browser/android/most_visited_sites.cc
@@ -25,11 +25,11 @@
 #include "chrome/browser/profiles/profile_android.h"
 #include "chrome/browser/search/suggestions/suggestions_service_factory.h"
 #include "chrome/browser/search/suggestions/suggestions_source.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/thumbnails/thumbnail_list_source.h"
 #include "chrome/common/chrome_switches.h"
 #include "chrome/common/pref_names.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/history/core/browser/top_sites.h"
 #include "components/pref_registry/pref_registry_syncable.h"
 #include "components/suggestions/suggestions_service.h"
diff --git a/chrome/browser/android/password_ui_view_android.cc b/chrome/browser/android/password_ui_view_android.cc
index 89cce7c..22fe77aa 100644
--- a/chrome/browser/android/password_ui_view_android.cc
+++ b/chrome/browser/android/password_ui_view_android.cc
@@ -10,11 +10,11 @@
 #include "base/metrics/field_trial.h"
 #include "base/prefs/pref_service.h"
 #include "chrome/browser/profiles/profile_manager.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/common/pref_names.h"
 #include "chrome/common/url_constants.h"
 #include "components/autofill/core/common/password_form.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/password_manager/core/browser/affiliation_utils.h"
 #include "components/password_manager/core/browser/password_bubble_experiment.h"
 #include "components/password_manager/core/common/experiments.h"
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index 708f81e0..8ec1516 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -44,7 +44,6 @@
 #include "chrome/browser/signin/signin_manager_factory.h"
 #include "chrome/browser/signin/signin_promo.h"
 #include "chrome/browser/signin/signin_ui_util.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/sync_ui_util.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_command_controller.h"
@@ -81,6 +80,7 @@
 #include "chrome/common/url_constants.h"
 #include "chrome/grit/chromium_strings.h"
 #include "chrome/grit/generated_resources.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/handoff/handoff_manager.h"
 #include "components/handoff/handoff_utility.h"
 #include "components/sessions/core/tab_restore_service.h"
diff --git a/chrome/browser/app_controller_mac_unittest.mm b/chrome/browser/app_controller_mac_unittest.mm
index 5cf952c..5f96a993 100644
--- a/chrome/browser/app_controller_mac_unittest.mm
+++ b/chrome/browser/app_controller_mac_unittest.mm
@@ -14,7 +14,6 @@
 #include "chrome/browser/profiles/profile_manager.h"
 #include "chrome/browser/signin/signin_error_controller_factory.h"
 #include "chrome/browser/signin/signin_manager_factory.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/sync/profile_sync_service_mock.h"
 #include "chrome/common/chrome_constants.h"
@@ -24,6 +23,7 @@
 #include "chrome/test/base/testing_browser_process.h"
 #include "chrome/test/base/testing_profile.h"
 #include "chrome/test/base/testing_profile_manager.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/signin/core/browser/fake_auth_status_provider.h"
 #include "components/signin/core/browser/signin_error_controller.h"
 #include "components/signin/core/browser/signin_manager.h"
diff --git a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
index dd8ae4b..9619469 100644
--- a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
+++ b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
@@ -17,11 +17,11 @@
 #include "chrome/browser/history/top_sites_factory.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/search_engines/template_url_service_factory.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/common/pref_names.h"
 #include "chrome/common/url_constants.h"
 #include "components/bookmarks/common/bookmark_pref_names.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/history/core/browser/history_service.h"
 #include "components/omnibox/browser/autocomplete_classifier.h"
 #include "components/sync_driver/sync_service_utils.h"
diff --git a/chrome/browser/autocomplete/search_provider_unittest.cc b/chrome/browser/autocomplete/search_provider_unittest.cc
index 2b40c85a33e..f7259671 100644
--- a/chrome/browser/autocomplete/search_provider_unittest.cc
+++ b/chrome/browser/autocomplete/search_provider_unittest.cc
@@ -23,13 +23,13 @@
 #include "chrome/browser/search_engines/template_url_service_factory.h"
 #include "chrome/browser/signin/account_tracker_service_factory.h"
 #include "chrome/browser/signin/signin_manager_factory.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/common/chrome_switches.h"
 #include "chrome/common/pref_names.h"
 #include "chrome/test/base/testing_browser_process.h"
 #include "chrome/test/base/testing_profile.h"
 #include "components/bookmarks/common/bookmark_pref_names.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/google/core/browser/google_switches.h"
 #include "components/history/core/browser/history_service.h"
 #include "components/metrics/proto/omnibox_event.pb.h"
diff --git a/chrome/browser/autofill/options_util.cc b/chrome/browser/autofill/options_util.cc
index cceccee..14a2f67 100644
--- a/chrome/browser/autofill/options_util.cc
+++ b/chrome/browser/autofill/options_util.cc
@@ -6,9 +6,9 @@
 
 #include "chrome/browser/autofill/personal_data_manager_factory.h"
 #include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "components/autofill/core/browser/options_util.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 
 namespace autofill {
 
diff --git a/chrome/browser/browsing_data/history_counter_browsertest.cc b/chrome/browser/browsing_data/history_counter_browsertest.cc
index 30bcd108..da58f67 100644
--- a/chrome/browser/browsing_data/history_counter_browsertest.cc
+++ b/chrome/browser/browsing_data/history_counter_browsertest.cc
@@ -11,10 +11,10 @@
 #include "chrome/browser/history/web_history_service_factory.h"
 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
 #include "chrome/browser/signin/signin_manager_factory.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/common/pref_names.h"
 #include "chrome/test/base/in_process_browser_test.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/history/core/browser/history_service.h"
 #include "components/history/core/browser/web_history_service.h"
 #include "components/signin/core/browser/profile_oauth2_token_service.h"
diff --git a/chrome/browser/chromeos/extensions/input_method_api.cc b/chrome/browser/chromeos/extensions/input_method_api.cc
index a98d262..b9dce24 100644
--- a/chrome/browser/chromeos/extensions/input_method_api.cc
+++ b/chrome/browser/chromeos/extensions/input_method_api.cc
@@ -16,9 +16,9 @@
 #include "chrome/browser/extensions/api/input_ime/input_ime_api.h"
 #include "chrome/browser/spellchecker/spellcheck_factory.h"
 #include "chrome/browser/spellchecker/spellcheck_service.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chromeos/chromeos_switches.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "extensions/browser/extension_function_registry.h"
 #include "extensions/browser/extension_system.h"
 #include "ui/base/ime/chromeos/extension_ime_util.h"
diff --git a/chrome/browser/chromeos/extensions/wallpaper_private_api.cc b/chrome/browser/chromeos/extensions/wallpaper_private_api.cc
index a0a3c73..705b6e26 100644
--- a/chrome/browser/chromeos/extensions/wallpaper_private_api.cc
+++ b/chrome/browser/chromeos/extensions/wallpaper_private_api.cc
@@ -28,12 +28,12 @@
 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h"
 #include "chrome/browser/chromeos/profiles/profile_helper.h"
 #include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/common/chrome_paths.h"
 #include "chrome/common/pref_names.h"
 #include "chrome/grit/generated_resources.h"
 #include "chromeos/chromeos_switches.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/user_manager/user.h"
 #include "components/user_manager/user_manager.h"
 #include "components/wallpaper/wallpaper_layout.h"
diff --git a/chrome/browser/chromeos/login/signin/auth_sync_observer.cc b/chrome/browser/chromeos/login/signin/auth_sync_observer.cc
index 99b50e53..ea167ff8 100644
--- a/chrome/browser/chromeos/login/signin/auth_sync_observer.cc
+++ b/chrome/browser/chromeos/login/signin/auth_sync_observer.cc
@@ -11,8 +11,8 @@
 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h"
 #include "chrome/browser/chromeos/login/users/supervised_user_manager.h"
 #include "chrome/browser/chromeos/profiles/profile_helper.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/user_manager/user_manager.h"
 #include "components/user_manager/user_type.h"
 #include "content/public/browser/user_metrics.h"
diff --git a/chrome/browser/chromeos/login/supervised/supervised_user_creation_controller_new.cc b/chrome/browser/chromeos/login/supervised/supervised_user_creation_controller_new.cc
index 1ad658c..8b0f7d9d 100644
--- a/chrome/browser/chromeos/login/supervised/supervised_user_creation_controller_new.cc
+++ b/chrome/browser/chromeos/login/supervised/supervised_user_creation_controller_new.cc
@@ -20,13 +20,13 @@
 #include "chrome/browser/chromeos/login/users/supervised_user_manager.h"
 #include "chrome/browser/chromeos/profiles/profile_helper.h"
 #include "chrome/browser/lifetime/application_lifetime.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chromeos/cryptohome/cryptohome_parameters.h"
 #include "chromeos/dbus/dbus_thread_manager.h"
 #include "chromeos/dbus/session_manager_client.h"
 #include "chromeos/login/auth/key.h"
 #include "chromeos/login/auth/user_context.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/signin/core/account_id/account_id.h"
 #include "components/user_manager/user.h"
 #include "components/user_manager/user_manager.h"
diff --git a/chrome/browser/drive/drive_notification_manager_factory.cc b/chrome/browser/drive/drive_notification_manager_factory.cc
index ed949b90..04806ad 100644
--- a/chrome/browser/drive/drive_notification_manager_factory.cc
+++ b/chrome/browser/drive/drive_notification_manager_factory.cc
@@ -7,8 +7,8 @@
 #include "base/logging.h"
 #include "chrome/browser/invalidation/profile_invalidation_provider_factory.h"
 #include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/drive/drive_notification_manager.h"
 #include "components/invalidation/impl/profile_invalidation_provider.h"
 #include "components/keyed_service/content/browser_context_dependency_manager.h"
diff --git a/chrome/browser/enhanced_bookmarks/bookmark_server_cluster_service_factory.cc b/chrome/browser/enhanced_bookmarks/bookmark_server_cluster_service_factory.cc
index c8dab5d..0cb53aa 100644
--- a/chrome/browser/enhanced_bookmarks/bookmark_server_cluster_service_factory.cc
+++ b/chrome/browser/enhanced_bookmarks/bookmark_server_cluster_service_factory.cc
@@ -12,8 +12,8 @@
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
 #include "chrome/browser/signin/signin_manager_factory.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/enhanced_bookmarks/bookmark_server_cluster_service.h"
 #include "components/keyed_service/content/browser_context_dependency_manager.h"
 #include "components/signin/core/browser/signin_manager.h"
diff --git a/chrome/browser/extensions/api/preferences_private/preferences_private_api.cc b/chrome/browser/extensions/api/preferences_private/preferences_private_api.cc
index 3b1ccc8b..82de6f7cf 100644
--- a/chrome/browser/extensions/api/preferences_private/preferences_private_api.cc
+++ b/chrome/browser/extensions/api/preferences_private/preferences_private_api.cc
@@ -5,9 +5,9 @@
 #include "chrome/browser/extensions/api/preferences_private/preferences_private_api.h"
 
 #include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/common/extensions/api/preferences_private.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/sync_driver/sync_prefs.h"
 
 namespace extensions {
diff --git a/chrome/browser/extensions/api/preferences_private/preferences_private_apitest.cc b/chrome/browser/extensions/api/preferences_private/preferences_private_apitest.cc
index d1de4dd..8393421 100644
--- a/chrome/browser/extensions/api/preferences_private/preferences_private_apitest.cc
+++ b/chrome/browser/extensions/api/preferences_private/preferences_private_apitest.cc
@@ -22,7 +22,6 @@
 #include "chrome/browser/profiles/profile_manager.h"
 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
 #include "chrome/browser/sync/chrome_sync_client.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/sync/profile_sync_test_util.h"
 #include "chrome/browser/ui/browser.h"
@@ -31,6 +30,7 @@
 #include "chrome/common/chrome_paths.h"
 #include "chrome/test/base/testing_profile.h"
 #include "components/bookmarks/common/bookmark_constants.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/sync_driver/signin_manager_wrapper.h"
 #include "components/sync_driver/sync_api_component_factory_mock.h"
 #include "components/sync_driver/sync_prefs.h"
diff --git a/chrome/browser/extensions/api/sessions/sessions_api.cc b/chrome/browser/extensions/api/sessions/sessions_api.cc
index 72c053a..55a983c 100644
--- a/chrome/browser/extensions/api/sessions/sessions_api.cc
+++ b/chrome/browser/extensions/api/sessions/sessions_api.cc
@@ -22,7 +22,6 @@
 #include "chrome/browser/search/search.h"
 #include "chrome/browser/sessions/session_restore.h"
 #include "chrome/browser/sessions/tab_restore_service_factory.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_finder.h"
@@ -30,6 +29,7 @@
 #include "chrome/browser/ui/host_desktop.h"
 #include "chrome/browser/ui/tabs/tab_strip_model.h"
 #include "chrome/common/pref_names.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/sessions/content/content_live_tab.h"
 #include "components/sync_driver/glue/synced_session.h"
 #include "components/sync_driver/open_tabs_ui_delegate.h"
diff --git a/chrome/browser/extensions/api/sessions/sessions_apitest.cc b/chrome/browser/extensions/api/sessions/sessions_apitest.cc
index e753ce0f1..2999003 100644
--- a/chrome/browser/extensions/api/sessions/sessions_apitest.cc
+++ b/chrome/browser/extensions/api/sessions/sessions_apitest.cc
@@ -13,7 +13,6 @@
 #include "chrome/browser/extensions/extension_function_test_utils.h"
 #include "chrome/browser/profiles/profile_manager.h"
 #include "chrome/browser/sync/chrome_sync_client.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/sync/profile_sync_service_mock.h"
 #include "chrome/common/chrome_paths.h"
@@ -21,6 +20,7 @@
 #include "chrome/test/base/in_process_browser_test.h"
 #include "chrome/test/base/test_switches.h"
 #include "chrome/test/base/testing_browser_process.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/sync_driver/local_device_info_provider_mock.h"
 #include "components/sync_driver/sync_api_component_factory_mock.h"
 #include "extensions/browser/api_test_utils.h"
diff --git a/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api.cc b/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api.cc
index 1bdc25e..2838196 100644
--- a/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api.cc
+++ b/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api.cc
@@ -9,9 +9,9 @@
 #include "base/values.h"
 #include "chrome/browser/extensions/api/signed_in_devices/id_mapping_helper.h"
 #include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/common/extensions/api/signed_in_devices.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/sync_driver/device_info_tracker.h"
 #include "components/sync_driver/local_device_info_provider.h"
 #include "extensions/browser/extension_prefs.h"
diff --git a/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_manager.cc b/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_manager.cc
index 39160c2..ff5dba5 100644
--- a/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_manager.cc
+++ b/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_manager.cc
@@ -15,9 +15,9 @@
 #include "chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api.h"
 #include "chrome/browser/extensions/extension_service.h"
 #include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/common/extensions/api/signed_in_devices.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/sync_driver/device_info.h"
 #include "extensions/browser/event_router.h"
 #include "extensions/browser/extension_registry.h"
diff --git a/chrome/browser/extensions/extension_service_sync_unittest.cc b/chrome/browser/extensions/extension_service_sync_unittest.cc
index cbf5c1e..a8ea9a23 100644
--- a/chrome/browser/extensions/extension_service_sync_unittest.cc
+++ b/chrome/browser/extensions/extension_service_sync_unittest.cc
@@ -18,12 +18,12 @@
 #include "chrome/browser/extensions/extension_sync_service.h"
 #include "chrome/browser/extensions/extension_util.h"
 #include "chrome/browser/extensions/updater/extension_updater.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/common/chrome_constants.h"
 #include "chrome/common/chrome_switches.h"
 #include "chrome/common/extensions/sync_helper.h"
 #include "chrome/test/base/testing_profile.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/crx_file/id_util.h"
 #include "extensions/browser/app_sorting.h"
 #include "extensions/browser/extension_prefs.h"
diff --git a/chrome/browser/extensions/external_pref_loader.h b/chrome/browser/extensions/external_pref_loader.h
index 5a07b98..e2265654 100644
--- a/chrome/browser/extensions/external_pref_loader.h
+++ b/chrome/browser/extensions/external_pref_loader.h
@@ -12,7 +12,7 @@
 #include "base/scoped_observer.h"
 #include "base/values.h"
 #include "chrome/browser/extensions/external_loader.h"
-#include "chrome/browser/sync/profile_sync_service.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/sync_driver/sync_service_observer.h"
 #include "components/syncable_prefs/pref_service_syncable_observer.h"
 
diff --git a/chrome/browser/extensions/external_provider_impl_chromeos_unittest.cc b/chrome/browser/extensions/external_provider_impl_chromeos_unittest.cc
index b3db0cc..0c99551 100644
--- a/chrome/browser/extensions/external_provider_impl_chromeos_unittest.cc
+++ b/chrome/browser/extensions/external_provider_impl_chromeos_unittest.cc
@@ -17,7 +17,6 @@
 #include "chrome/browser/profiles/profile_manager.h"
 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
 #include "chrome/browser/signin/signin_manager_factory.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/common/chrome_paths.h"
 #include "chrome/common/chrome_switches.h"
@@ -25,6 +24,7 @@
 #include "chrome/test/base/testing_profile.h"
 #include "chromeos/system/fake_statistics_provider.h"
 #include "chromeos/system/statistics_provider.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/browser_sync/common/browser_sync_switches.h"
 #include "components/signin/core/browser/profile_oauth2_token_service.h"
 #include "components/signin/core/browser/signin_manager_base.h"
diff --git a/chrome/browser/extensions/user_script_listener_unittest.cc b/chrome/browser/extensions/user_script_listener_unittest.cc
index b4147f7..c72a03c 100644
--- a/chrome/browser/extensions/user_script_listener_unittest.cc
+++ b/chrome/browser/extensions/user_script_listener_unittest.cc
@@ -74,13 +74,11 @@
 };
 
 // Yoinked from extension_manifest_unittest.cc.
-// TODO(Olli Raula) Make this return scoped_ptr
-base::DictionaryValue* LoadManifestFile(const base::FilePath path,
-                                        std::string* error) {
+scoped_ptr<base::DictionaryValue> LoadManifestFile(const base::FilePath path,
+                                                   std::string* error) {
   EXPECT_TRUE(base::PathExists(path));
   JSONFileValueDeserializer deserializer(path);
-  return base::DictionaryValue::From(deserializer.Deserialize(NULL, error))
-      .release();
+  return base::DictionaryValue::From(deserializer.Deserialize(NULL, error));
 }
 
 scoped_refptr<Extension> LoadExtension(const std::string& filename,
@@ -91,7 +89,7 @@
       AppendASCII("extensions").
       AppendASCII("manifest_tests").
       AppendASCII(filename.c_str());
-  scoped_ptr<base::DictionaryValue> value(LoadManifestFile(path, error));
+  scoped_ptr<base::DictionaryValue> value = LoadManifestFile(path, error);
   if (!value)
     return NULL;
   return Extension::Create(path.DirName(), Manifest::UNPACKED, *value,
diff --git a/chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc b/chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc
index 372765f8..67c026a 100644
--- a/chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc
+++ b/chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc
@@ -10,9 +10,9 @@
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h"
 #include "chrome/browser/profiles/profile_manager.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/common/channel_info.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_names.h"
 #include "components/sync_driver/about_sync_util.h"
 #include "content/public/browser/browser_thread.h"
diff --git a/chrome/browser/history/web_history_service_factory.cc b/chrome/browser/history/web_history_service_factory.cc
index 00d908d4..606b007 100644
--- a/chrome/browser/history/web_history_service_factory.cc
+++ b/chrome/browser/history/web_history_service_factory.cc
@@ -6,8 +6,8 @@
 
 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
 #include "chrome/browser/signin/signin_manager_factory.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/history/core/browser/web_history_service.h"
 #include "components/keyed_service/content/browser_context_dependency_manager.h"
 #include "components/signin/core/browser/profile_oauth2_token_service.h"
diff --git a/chrome/browser/history/web_history_service_unittest.cc b/chrome/browser/history/web_history_service_unittest.cc
index e53671d6..4ea045ab 100644
--- a/chrome/browser/history/web_history_service_unittest.cc
+++ b/chrome/browser/history/web_history_service_unittest.cc
@@ -12,10 +12,10 @@
 #include "chrome/browser/history/web_history_service_factory.h"
 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
 #include "chrome/browser/signin/signin_manager_factory.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/sync/profile_sync_service_mock.h"
 #include "chrome/test/base/testing_profile.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/signin/core/browser/profile_oauth2_token_service.h"
 #include "components/signin/core/browser/signin_manager.h"
 #include "content/public/test/test_browser_thread_bundle.h"
diff --git a/chrome/browser/password_manager/account_chooser_dialog_android.cc b/chrome/browser/password_manager/account_chooser_dialog_android.cc
index 7c8a43c..e1e5ff1 100644
--- a/chrome/browser/password_manager/account_chooser_dialog_android.cc
+++ b/chrome/browser/password_manager/account_chooser_dialog_android.cc
@@ -9,11 +9,11 @@
 #include "base/android/scoped_java_ref.h"
 #include "chrome/browser/password_manager/credential_android.h"
 #include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/ui/passwords/account_avatar_fetcher.h"
 #include "chrome/browser/ui/passwords/manage_passwords_view_utils.h"
 #include "chrome/grit/generated_resources.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/password_manager/core/browser/password_bubble_experiment.h"
 #include "components/password_manager/core/common/credential_manager_types.h"
 #include "jni/AccountChooserDialog_jni.h"
diff --git a/chrome/browser/password_manager/auto_signin_first_run_infobar_delegate.cc b/chrome/browser/password_manager/auto_signin_first_run_infobar_delegate.cc
index 510da49..42cacedf24 100644
--- a/chrome/browser/password_manager/auto_signin_first_run_infobar_delegate.cc
+++ b/chrome/browser/password_manager/auto_signin_first_run_infobar_delegate.cc
@@ -6,12 +6,12 @@
 
 #include "chrome/browser/infobars/infobar_service.h"
 #include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/ui/android/infobars/auto_signin_first_run_infobar.h"
 #include "chrome/browser/ui/passwords/manage_passwords_view_utils.h"
 #include "chrome/grit/chromium_strings.h"
 #include "chrome/grit/generated_resources.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/infobars/core/infobar.h"
 #include "components/password_manager/core/browser/password_bubble_experiment.h"
 #include "content/public/browser/web_contents.h"
diff --git a/chrome/browser/password_manager/chrome_password_manager_client.cc b/chrome/browser/password_manager/chrome_password_manager_client.cc
index f947d47..6a1c44a 100644
--- a/chrome/browser/password_manager/chrome_password_manager_client.cc
+++ b/chrome/browser/password_manager/chrome_password_manager_client.cc
@@ -15,7 +15,6 @@
 #include "chrome/browser/password_manager/password_store_factory.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/signin/signin_manager_factory.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/ui/autofill/password_generation_popup_controller_impl.h"
 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h"
@@ -27,6 +26,7 @@
 #include "components/autofill/content/common/autofill_messages.h"
 #include "components/autofill/core/browser/password_generator.h"
 #include "components/autofill/core/common/password_form.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/password_manager/content/browser/content_password_manager_driver.h"
 #include "components/password_manager/content/browser/password_manager_internals_service_factory.h"
 #include "components/password_manager/content/common/credential_manager_messages.h"
diff --git a/chrome/browser/password_manager/generated_password_saved_infobar_delegate_android.cc b/chrome/browser/password_manager/generated_password_saved_infobar_delegate_android.cc
index 33aba526..e1bbe5e 100644
--- a/chrome/browser/password_manager/generated_password_saved_infobar_delegate_android.cc
+++ b/chrome/browser/password_manager/generated_password_saved_infobar_delegate_android.cc
@@ -10,11 +10,11 @@
 #include "chrome/browser/android/chrome_application.h"
 #include "chrome/browser/infobars/infobar_service.h"
 #include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/common/url_constants.h"
 #include "chrome/grit/generated_resources.h"
 #include "chrome/grit/theme_resources.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/password_manager/core/browser/password_bubble_experiment.h"
 #include "content/public/browser/web_contents.h"
 #include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/password_manager/password_store_factory.cc b/chrome/browser/password_manager/password_store_factory.cc
index f4873fe..72da4bf 100644
--- a/chrome/browser/password_manager/password_store_factory.cc
+++ b/chrome/browser/password_manager/password_store_factory.cc
@@ -14,10 +14,10 @@
 #include "chrome/browser/profiles/incognito_helpers.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/sync/glue/sync_start_util.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/web_data_service_factory.h"
 #include "chrome/common/chrome_switches.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/keyed_service/content/browser_context_dependency_manager.h"
 #include "components/os_crypt/os_crypt_switches.h"
 #include "components/password_manager/core/browser/login_database.h"
diff --git a/chrome/browser/password_manager/save_password_infobar_delegate.cc b/chrome/browser/password_manager/save_password_infobar_delegate.cc
index afa1a7c..5d33470 100644
--- a/chrome/browser/password_manager/save_password_infobar_delegate.cc
+++ b/chrome/browser/password_manager/save_password_infobar_delegate.cc
@@ -7,11 +7,11 @@
 #include "base/metrics/histogram.h"
 #include "chrome/browser/infobars/infobar_service.h"
 #include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/ui/passwords/manage_passwords_view_utils.h"
 #include "chrome/grit/chromium_strings.h"
 #include "chrome/grit/generated_resources.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/infobars/core/infobar.h"
 #include "components/password_manager/core/browser/password_bubble_experiment.h"
 #include "components/password_manager/core/browser/password_manager_client.h"
diff --git a/chrome/browser/pdf/pdf_extension_test.cc b/chrome/browser/pdf/pdf_extension_test.cc
index 4077aaf..5477b50 100644
--- a/chrome/browser/pdf/pdf_extension_test.cc
+++ b/chrome/browser/pdf/pdf_extension_test.cc
@@ -542,8 +542,8 @@
   RunTestsInFile("material_elements_test.js", "test.pdf");
 }
 
-// http://crbug.com/550015
-IN_PROC_BROWSER_TEST_F(MaterialPDFExtensionTest, DISABLED_ToolbarManager) {
+// TODO(tsergeant): Verify that flake is fixed. http://crbug.com/550015
+IN_PROC_BROWSER_TEST_F(MaterialPDFExtensionTest, ToolbarManager) {
   RunTestsInFile("toolbar_manager_test.js", "test.pdf");
 }
 
diff --git a/chrome/browser/profiles/profile.cc b/chrome/browser/profiles/profile.cc
index 608169c..04d5e9f3 100644
--- a/chrome/browser/profiles/profile.cc
+++ b/chrome/browser/profiles/profile.cc
@@ -11,9 +11,9 @@
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/first_run/first_run.h"
 #include "chrome/browser/profiles/profile_manager.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/common/pref_names.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_prefs.h"
 #include "components/pref_registry/pref_registry_syncable.h"
 #include "components/sync_driver/sync_prefs.h"
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index ba0e44a..265cbca9 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -46,7 +46,6 @@
 #include "chrome/browser/signin/cross_device_promo_factory.h"
 #include "chrome/browser/signin/gaia_cookie_manager_service_factory.h"
 #include "chrome/browser/signin/signin_manager_factory.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_iterator.h"
@@ -61,6 +60,7 @@
 #include "components/bookmarks/browser/bookmark_model.h"
 #include "components/bookmarks/browser/startup_task_runner_service.h"
 #include "components/bookmarks/common/bookmark_pref_names.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/content_settings/core/browser/host_content_settings_map.h"
 #include "components/invalidation/impl/profile_invalidation_provider.h"
 #include "components/invalidation/public/invalidation_service.h"
diff --git a/chrome/browser/profiles/profile_window.cc b/chrome/browser/profiles/profile_window.cc
index 704dfae..99332cb3 100644
--- a/chrome/browser/profiles/profile_window.cc
+++ b/chrome/browser/profiles/profile_window.cc
@@ -19,7 +19,6 @@
 #include "chrome/browser/signin/account_tracker_service_factory.h"
 #include "chrome/browser/signin/signin_manager_factory.h"
 #include "chrome/browser/signin/signin_ui_util.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_dialogs.h"
@@ -27,6 +26,7 @@
 #include "chrome/browser/ui/user_manager.h"
 #include "chrome/common/pref_names.h"
 #include "chrome/common/url_constants.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/flags_ui/pref_service_flags_storage.h"
 #include "components/signin/core/browser/account_reconcilor.h"
 #include "components/signin/core/browser/account_tracker_service.h"
diff --git a/chrome/browser/resources/pdf/toolbar_manager.js b/chrome/browser/resources/pdf/toolbar_manager.js
index 6878279f..e5b098e 100644
--- a/chrome/browser/resources/pdf/toolbar_manager.js
+++ b/chrome/browser/resources/pdf/toolbar_manager.js
@@ -38,10 +38,11 @@
 
 /**
  * @param {MouseEvent} e Event to test.
+ * @param {Window} window Window to test against.
  * @return {boolean} True if the mouse is close to the bottom-right of the
  * screen.
  */
-function isMouseNearSideToolbar(e) {
+function isMouseNearSideToolbar(e, window) {
   var atSide = e.x > window.innerWidth - SIDE_TOOLBAR_REVEAL_DISTANCE_RIGHT;
   if (isRTL())
     atSide = e.x < SIDE_TOOLBAR_REVEAL_DISTANCE_RIGHT;
@@ -79,7 +80,7 @@
 
   handleMouseMove: function(e) {
     this.isMouseNearTopToolbar_ = this.toolbar_ && isMouseNearTopToolbar(e);
-    this.isMouseNearSideToolbar_ = isMouseNearSideToolbar(e);
+    this.isMouseNearSideToolbar_ = isMouseNearSideToolbar(e, this.window_);
 
     this.keyboardNavigationActive = false;
     var touchInteractionActive =
diff --git a/chrome/browser/signin/signin_ui_util.cc b/chrome/browser/signin/signin_ui_util.cc
index bca615f..8656309 100644
--- a/chrome/browser/signin/signin_ui_util.cc
+++ b/chrome/browser/signin/signin_ui_util.cc
@@ -13,7 +13,6 @@
 #include "chrome/browser/signin/signin_global_error.h"
 #include "chrome/browser/signin/signin_global_error_factory.h"
 #include "chrome/browser/signin/signin_manager_factory.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/sync/sync_global_error.h"
 #include "chrome/browser/sync/sync_global_error_factory.h"
@@ -22,6 +21,7 @@
 #include "chrome/common/pref_names.h"
 #include "chrome/grit/chromium_strings.h"
 #include "chrome/grit/generated_resources.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/signin/core/browser/account_tracker_service.h"
 #include "components/signin/core/browser/signin_manager.h"
 #include "components/signin/core/common/profile_management_switches.h"
diff --git a/chrome/browser/supervised_user/child_accounts/child_account_service.cc b/chrome/browser/supervised_user/child_accounts/child_account_service.cc
index 0ec2b71f..251275b 100644
--- a/chrome/browser/supervised_user/child_accounts/child_account_service.cc
+++ b/chrome/browser/supervised_user/child_accounts/child_account_service.cc
@@ -19,10 +19,10 @@
 #include "chrome/browser/supervised_user/supervised_user_service_factory.h"
 #include "chrome/browser/supervised_user/supervised_user_settings_service.h"
 #include "chrome/browser/supervised_user/supervised_user_settings_service_factory.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/common/chrome_switches.h"
 #include "chrome/common/pref_names.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/pref_registry/pref_registry_syncable.h"
 #include "components/signin/core/browser/profile_oauth2_token_service.h"
 #include "components/signin/core/browser/signin_manager.h"
diff --git a/chrome/browser/supervised_user/legacy/permission_request_creator_sync.cc b/chrome/browser/supervised_user/legacy/permission_request_creator_sync.cc
index 25c4ab6..0cfd85b 100644
--- a/chrome/browser/supervised_user/legacy/permission_request_creator_sync.cc
+++ b/chrome/browser/supervised_user/legacy/permission_request_creator_sync.cc
@@ -8,7 +8,7 @@
 #include "base/values.h"
 #include "chrome/browser/supervised_user/legacy/supervised_user_shared_settings_service.h"
 #include "chrome/browser/supervised_user/supervised_user_settings_service.h"
-#include "chrome/browser/sync/profile_sync_service.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "google_apis/gaia/google_service_auth_error.h"
 #include "net/base/escape.h"
 #include "url/gurl.h"
diff --git a/chrome/browser/supervised_user/supervised_user_service.cc b/chrome/browser/supervised_user/supervised_user_service.cc
index 0df5660..432e404f 100644
--- a/chrome/browser/supervised_user/supervised_user_service.cc
+++ b/chrome/browser/supervised_user/supervised_user_service.cc
@@ -30,7 +30,6 @@
 #include "chrome/browser/supervised_user/supervised_user_settings_service_factory.h"
 #include "chrome/browser/supervised_user/supervised_user_site_list.h"
 #include "chrome/browser/supervised_user/supervised_user_whitelist_service.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_list.h"
@@ -38,6 +37,7 @@
 #include "chrome/common/chrome_switches.h"
 #include "chrome/common/pref_names.h"
 #include "chrome/grit/generated_resources.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/pref_registry/pref_registry_syncable.h"
 #include "components/signin/core/browser/profile_oauth2_token_service.h"
 #include "components/signin/core/browser/signin_manager.h"
diff --git a/chrome/browser/supervised_user/supervised_user_service.h b/chrome/browser/supervised_user/supervised_user_service.h
index 1b698a70..f001f2aa 100644
--- a/chrome/browser/supervised_user/supervised_user_service.h
+++ b/chrome/browser/supervised_user/supervised_user_service.h
@@ -20,10 +20,10 @@
 #include "chrome/browser/supervised_user/experimental/supervised_user_blacklist.h"
 #include "chrome/browser/supervised_user/supervised_user_url_filter.h"
 #include "chrome/browser/supervised_user/supervised_users.h"
-#include "chrome/browser/sync/sync_type_preference_provider.h"
 #include "chrome/browser/ui/browser_list_observer.h"
 #include "components/keyed_service/core/keyed_service.h"
 #include "components/sync_driver/sync_service_observer.h"
+#include "components/sync_driver/sync_type_preference_provider.h"
 #include "net/url_request/url_request_context_getter.h"
 
 #if defined(ENABLE_EXTENSIONS)
diff --git a/chrome/browser/sync/chrome_sync_client.cc b/chrome/browser/sync/chrome_sync_client.cc
index e4712dc5..78e18831 100644
--- a/chrome/browser/sync/chrome_sync_client.cc
+++ b/chrome/browser/sync/chrome_sync_client.cc
@@ -17,7 +17,6 @@
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/search_engines/template_url_service_factory.h"
 #include "chrome/browser/sync/glue/sync_start_util.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/sync/sessions/notification_service_sessions_router.h"
 #include "chrome/browser/themes/theme_service.h"
@@ -32,6 +31,7 @@
 #include "components/autofill/core/browser/webdata/autofill_wallet_metadata_syncable_service.h"
 #include "components/autofill/core/browser/webdata/autofill_wallet_syncable_service.h"
 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/dom_distiller/core/dom_distiller_service.h"
 #include "components/history/core/browser/history_model_worker.h"
 #include "components/history/core/browser/history_service.h"
diff --git a/chrome/browser/sync/glue/sync_start_util.cc b/chrome/browser/sync/glue/sync_start_util.cc
index 86c336b..84c67b9 100644
--- a/chrome/browser/sync/glue/sync_start_util.cc
+++ b/chrome/browser/sync/glue/sync_start_util.cc
@@ -9,8 +9,8 @@
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/profiles/profile_manager.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "content/public/browser/browser_thread.h"
 
 namespace {
diff --git a/chrome/browser/sync/profile_sync_components_factory_impl.cc b/chrome/browser/sync/profile_sync_components_factory_impl.cc
index a7123e7..16f72143 100644
--- a/chrome/browser/sync/profile_sync_components_factory_impl.cc
+++ b/chrome/browser/sync/profile_sync_components_factory_impl.cc
@@ -12,7 +12,6 @@
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/search_engines/template_url_service_factory.h"
 #include "chrome/browser/sync/glue/theme_data_type_controller.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/common/channel_info.h"
 #include "chrome/common/chrome_switches.h"
 #include "chrome/common/pref_names.h"
@@ -21,6 +20,7 @@
 #include "components/autofill/core/browser/webdata/autofill_profile_data_type_controller.h"
 #include "components/autofill/core/common/autofill_pref_names.h"
 #include "components/autofill/core/common/autofill_switches.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/browser_sync/common/browser_sync_switches.h"
 #include "components/dom_distiller/core/dom_distiller_features.h"
 #include "components/history/core/browser/history_delete_directives_data_type_controller.h"
diff --git a/chrome/browser/sync/profile_sync_components_factory_impl_unittest.cc b/chrome/browser/sync/profile_sync_components_factory_impl_unittest.cc
index 1c138b2b..e613633 100644
--- a/chrome/browser/sync/profile_sync_components_factory_impl_unittest.cc
+++ b/chrome/browser/sync/profile_sync_components_factory_impl_unittest.cc
@@ -11,12 +11,12 @@
 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
 #include "chrome/browser/sync/chrome_sync_client.h"
 #include "chrome/browser/sync/profile_sync_components_factory_impl.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/sync/profile_sync_test_util.h"
 #include "chrome/common/channel_info.h"
 #include "chrome/common/chrome_switches.h"
 #include "chrome/test/base/testing_profile.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/browser_sync/common/browser_sync_switches.h"
 #include "components/signin/core/browser/profile_oauth2_token_service.h"
 #include "components/sync_driver/data_type_controller.h"
diff --git a/chrome/browser/sync/profile_sync_service_android.cc b/chrome/browser/sync/profile_sync_service_android.cc
index 9c14b45..b4c8083 100644
--- a/chrome/browser/sync/profile_sync_service_android.cc
+++ b/chrome/browser/sync/profile_sync_service_android.cc
@@ -18,11 +18,11 @@
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/profiles/profile_manager.h"
 #include "chrome/browser/signin/signin_manager_factory.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/sync/sync_ui_util.h"
 #include "chrome/common/channel_info.h"
 #include "chrome/grit/generated_resources.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/signin/core/browser/signin_manager.h"
 #include "components/sync_driver/about_sync_util.h"
 #include "components/sync_driver/pref_names.h"
diff --git a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
index b9e2f9b..256d726 100644
--- a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
@@ -27,7 +27,6 @@
 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
 #include "chrome/browser/signin/signin_manager_factory.h"
 #include "chrome/browser/sync/abstract_profile_sync_service_test.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/sync/profile_sync_test_util.h"
 #include "chrome/browser/sync/test_profile_sync_service.h"
@@ -45,6 +44,7 @@
 #include "components/autofill/core/browser/webdata/autofill_profile_syncable_service.h"
 #include "components/autofill/core/browser/webdata/autofill_table.h"
 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/signin/core/browser/account_tracker_service.h"
 #include "components/signin/core/browser/fake_profile_oauth2_token_service.h"
 #include "components/signin/core/browser/signin_manager.h"
diff --git a/chrome/browser/sync/profile_sync_service_factory.cc b/chrome/browser/sync/profile_sync_service_factory.cc
index 4f9e233..1478dc3 100644
--- a/chrome/browser/sync/profile_sync_service_factory.cc
+++ b/chrome/browser/sync/profile_sync_service_factory.cc
@@ -26,11 +26,11 @@
 #include "chrome/browser/signin/signin_manager_factory.h"
 #include "chrome/browser/sync/chrome_sync_client.h"
 #include "chrome/browser/sync/profile_sync_components_factory_impl.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/supervised_user_signin_manager_wrapper.h"
 #include "chrome/browser/themes/theme_service_factory.h"
 #include "chrome/browser/web_data_service_factory.h"
 #include "chrome/common/channel_info.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/keyed_service/content/browser_context_dependency_manager.h"
 #include "components/network_time/network_time_tracker.h"
 #include "components/signin/core/browser/profile_oauth2_token_service.h"
diff --git a/chrome/browser/sync/profile_sync_service_mock.h b/chrome/browser/sync/profile_sync_service_mock.h
index b6968ac..d1a4528 100644
--- a/chrome/browser/sync/profile_sync_service_mock.h
+++ b/chrome/browser/sync/profile_sync_service_mock.h
@@ -11,8 +11,8 @@
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/strings/string16.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/test/base/testing_profile.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/sync_driver/change_processor.h"
 #include "components/sync_driver/data_type_controller.h"
 #include "components/sync_driver/device_info.h"
diff --git a/chrome/browser/sync/profile_sync_service_startup_unittest.cc b/chrome/browser/sync/profile_sync_service_startup_unittest.cc
index ac3fde9..4d4fbe6d 100644
--- a/chrome/browser/sync/profile_sync_service_startup_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_startup_unittest.cc
@@ -12,7 +12,6 @@
 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
 #include "chrome/browser/signin/signin_manager_factory.h"
 #include "chrome/browser/sync/chrome_sync_client.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/sync/profile_sync_test_util.h"
 #include "chrome/browser/sync/supervised_user_signin_manager_wrapper.h"
@@ -21,6 +20,7 @@
 #include "chrome/test/base/testing_browser_process.h"
 #include "chrome/test/base/testing_profile.h"
 #include "chrome/test/base/testing_profile_manager.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/signin/core/browser/account_tracker_service.h"
 #include "components/signin/core/browser/fake_profile_oauth2_token_service.h"
 #include "components/signin/core/browser/profile_oauth2_token_service.h"
diff --git a/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc b/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
index 326b0cd6..e238961 100644
--- a/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
@@ -28,7 +28,6 @@
 #include "chrome/browser/signin/signin_manager_factory.h"
 #include "chrome/browser/sync/abstract_profile_sync_service_test.h"
 #include "chrome/browser/sync/chrome_sync_client.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/sync/profile_sync_test_util.h"
 #include "chrome/browser/sync/test_profile_sync_service.h"
@@ -36,6 +35,7 @@
 #include "chrome/test/base/testing_browser_process.h"
 #include "chrome/test/base/testing_profile.h"
 #include "chrome/test/base/testing_profile_manager.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/history/core/browser/history_backend.h"
 #include "components/history/core/browser/history_backend_client.h"
 #include "components/history/core/browser/history_backend_notifier.h"
diff --git a/chrome/browser/sync/profile_sync_service_unittest.cc b/chrome/browser/sync/profile_sync_service_unittest.cc
index 7ec32ea..5a651f7 100644
--- a/chrome/browser/sync/profile_sync_service_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_unittest.cc
@@ -21,7 +21,6 @@
 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
 #include "chrome/browser/signin/signin_manager_factory.h"
 #include "chrome/browser/sync/chrome_sync_client.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_test_util.h"
 #include "chrome/common/channel_info.h"
 #include "chrome/common/chrome_switches.h"
@@ -29,6 +28,7 @@
 #include "chrome/test/base/testing_browser_process.h"
 #include "chrome/test/base/testing_profile.h"
 #include "chrome/test/base/testing_profile_manager.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/browser_sync/common/browser_sync_switches.h"
 #include "components/invalidation/impl/profile_invalidation_provider.h"
 #include "components/invalidation/public/invalidation_service.h"
diff --git a/chrome/browser/sync/sync_error_notifier_factory_ash.cc b/chrome/browser/sync/sync_error_notifier_factory_ash.cc
index 25c12fe1..bfc1c75 100644
--- a/chrome/browser/sync/sync_error_notifier_factory_ash.cc
+++ b/chrome/browser/sync/sync_error_notifier_factory_ash.cc
@@ -7,9 +7,9 @@
 #include "ash/shell.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/sync/sync_error_notifier_ash.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/keyed_service/content/browser_context_dependency_manager.h"
 
 SyncErrorNotifierFactory::SyncErrorNotifierFactory()
diff --git a/chrome/browser/sync/sync_global_error.cc b/chrome/browser/sync/sync_global_error.cc
index 1be4d6c..fa24ce01 100644
--- a/chrome/browser/sync/sync_global_error.cc
+++ b/chrome/browser/sync/sync_global_error.cc
@@ -5,7 +5,6 @@
 #include "chrome/browser/sync/sync_global_error.h"
 
 #include "chrome/app/chrome_command_ids.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/sync_ui_util.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_commands.h"
@@ -14,6 +13,7 @@
 #include "chrome/browser/ui/webui/signin/login_ui_service.h"
 #include "chrome/common/url_constants.h"
 #include "chrome/grit/generated_resources.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "google_apis/gaia/google_service_auth_error.h"
 #include "ui/base/l10n/l10n_util.h"
 
diff --git a/chrome/browser/sync/sync_global_error_factory.cc b/chrome/browser/sync/sync_global_error_factory.cc
index 331e2f9..43fbfe7 100644
--- a/chrome/browser/sync/sync_global_error_factory.cc
+++ b/chrome/browser/sync/sync_global_error_factory.cc
@@ -6,11 +6,11 @@
 
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/sync/sync_global_error.h"
 #include "chrome/browser/ui/global_error/global_error_service_factory.h"
 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/keyed_service/content/browser_context_dependency_manager.h"
 
 #if defined(USE_ASH)
diff --git a/chrome/browser/sync/sync_startup_tracker.cc b/chrome/browser/sync/sync_startup_tracker.cc
index 00d166d8..31bd51c 100644
--- a/chrome/browser/sync/sync_startup_tracker.cc
+++ b/chrome/browser/sync/sync_startup_tracker.cc
@@ -5,8 +5,8 @@
 #include "chrome/browser/sync/sync_startup_tracker.h"
 
 #include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 
 SyncStartupTracker::SyncStartupTracker(Profile* profile, Observer* observer)
     : profile_(profile),
diff --git a/chrome/browser/sync/sync_ui_util.cc b/chrome/browser/sync/sync_ui_util.cc
index 4cfc2ea..76f4e41 100644
--- a/chrome/browser/sync/sync_ui_util.cc
+++ b/chrome/browser/sync/sync_ui_util.cc
@@ -14,7 +14,6 @@
 #include "chrome/browser/profiles/profile_manager.h"
 #include "chrome/browser/signin/signin_error_controller_factory.h"
 #include "chrome/browser/signin/signin_ui_util.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_window.h"
@@ -25,6 +24,7 @@
 #include "chrome/grit/chromium_strings.h"
 #include "chrome/grit/generated_resources.h"
 #include "chrome/grit/locale_settings.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/signin/core/browser/signin_error_controller.h"
 #include "components/signin/core/browser/signin_manager_base.h"
 #include "google_apis/gaia/google_service_auth_error.h"
diff --git a/chrome/browser/sync/test/integration/autofill_helper.cc b/chrome/browser/sync/test/integration/autofill_helper.cc
index 626f749..88f06eda 100644
--- a/chrome/browser/sync/test/integration/autofill_helper.cc
+++ b/chrome/browser/sync/test/integration/autofill_helper.cc
@@ -8,7 +8,6 @@
 #include "chrome/browser/autofill/personal_data_manager_factory.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_test_util.h"
 #include "chrome/browser/sync/test/integration/multi_client_status_change_checker.h"
 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h"
@@ -23,6 +22,7 @@
 #include "components/autofill/core/browser/webdata/autofill_table.h"
 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
 #include "components/autofill/core/common/form_field_data.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/webdata/common/web_database.h"
 
 using autofill::AutofillChangeList;
diff --git a/chrome/browser/sync/test/integration/bookmarks_helper.cc b/chrome/browser/sync/test/integration/bookmarks_helper.cc
index 4b5db5c..ccb4308 100644
--- a/chrome/browser/sync/test/integration/bookmarks_helper.cc
+++ b/chrome/browser/sync/test/integration/bookmarks_helper.cc
@@ -24,7 +24,6 @@
 #include "chrome/browser/favicon/favicon_service_factory.h"
 #include "chrome/browser/history/history_service_factory.h"
 #include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/sync/test/integration/await_match_status_change_checker.h"
 #include "chrome/browser/sync/test/integration/multi_client_status_change_checker.h"
@@ -38,6 +37,7 @@
 #include "components/bookmarks/browser/bookmark_model_observer.h"
 #include "components/bookmarks/browser/bookmark_utils.h"
 #include "components/bookmarks/managed/managed_bookmark_service.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/favicon/core/favicon_service.h"
 #include "components/favicon_base/favicon_util.h"
 #include "components/history/core/browser/history_db_task.h"
diff --git a/chrome/browser/sync/test/integration/cross_platform_sync_test.cc b/chrome/browser/sync/test/integration/cross_platform_sync_test.cc
index cfd873d..d63b7a8b 100644
--- a/chrome/browser/sync/test/integration/cross_platform_sync_test.cc
+++ b/chrome/browser/sync/test/integration/cross_platform_sync_test.cc
@@ -3,10 +3,10 @@
 // found in the LICENSE file.
 
 #include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/test/integration/bookmarks_helper.h"
 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
 #include "chrome/browser/sync/test/integration/sync_test.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 
 using bookmarks_helper::AddURL;
 using bookmarks_helper::ModelMatchesVerifier;
diff --git a/chrome/browser/sync/test/integration/enable_disable_test.cc b/chrome/browser/sync/test/integration/enable_disable_test.cc
index a3901d9..5087b869 100644
--- a/chrome/browser/sync/test/integration/enable_disable_test.cc
+++ b/chrome/browser/sync/test/integration/enable_disable_test.cc
@@ -2,9 +2,9 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
 #include "chrome/browser/sync/test/integration/sync_test.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "sync/internal_api/public/base/model_type.h"
 #include "sync/internal_api/public/read_node.h"
 #include "sync/internal_api/public/read_transaction.h"
diff --git a/chrome/browser/sync/test/integration/migration_test.cc b/chrome/browser/sync/test/integration/migration_test.cc
index ce67f4b1..77740a2 100644
--- a/chrome/browser/sync/test/integration/migration_test.cc
+++ b/chrome/browser/sync/test/integration/migration_test.cc
@@ -6,7 +6,6 @@
 #include "base/memory/scoped_vector.h"
 #include "base/prefs/scoped_user_pref_update.h"
 #include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/test/integration/bookmarks_helper.h"
 #include "chrome/browser/sync/test/integration/migration_waiter.h"
 #include "chrome/browser/sync/test/integration/migration_watcher.h"
@@ -14,6 +13,7 @@
 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
 #include "chrome/browser/sync/test/integration/sync_test.h"
 #include "chrome/common/pref_names.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/translate/core/browser/translate_prefs.h"
 
 using bookmarks_helper::AddURL;
diff --git a/chrome/browser/sync/test/integration/migration_watcher.cc b/chrome/browser/sync/test/integration/migration_watcher.cc
index 14e18d6..4e8dfc2 100644
--- a/chrome/browser/sync/test/integration/migration_watcher.cc
+++ b/chrome/browser/sync/test/integration/migration_watcher.cc
@@ -4,9 +4,9 @@
 
 #include "chrome/browser/sync/test/integration/migration_watcher.h"
 
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/test/integration/migration_waiter.h"
 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 
 MigrationWatcher::MigrationWatcher(ProfileSyncServiceHarness* harness)
     : harness_(harness), migration_waiter_(NULL) {
diff --git a/chrome/browser/sync/test/integration/multi_client_status_change_checker.cc b/chrome/browser/sync/test/integration/multi_client_status_change_checker.cc
index 98219679..0e77cee 100644
--- a/chrome/browser/sync/test/integration/multi_client_status_change_checker.cc
+++ b/chrome/browser/sync/test/integration/multi_client_status_change_checker.cc
@@ -6,7 +6,7 @@
 
 #include "base/logging.h"
 #include "base/scoped_observer.h"
-#include "chrome/browser/sync/profile_sync_service.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 
 MultiClientStatusChangeChecker::MultiClientStatusChangeChecker(
     std::vector<ProfileSyncService*> services)
diff --git a/chrome/browser/sync/test/integration/p2p_invalidation_forwarder.cc b/chrome/browser/sync/test/integration/p2p_invalidation_forwarder.cc
index 4f5ba6e6..bccfef9 100644
--- a/chrome/browser/sync/test/integration/p2p_invalidation_forwarder.cc
+++ b/chrome/browser/sync/test/integration/p2p_invalidation_forwarder.cc
@@ -4,7 +4,7 @@
 
 #include "chrome/browser/sync/test/integration/p2p_invalidation_forwarder.h"
 
-#include "chrome/browser/sync/profile_sync_service.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/invalidation/impl/p2p_invalidation_service.h"
 #include "components/sync_driver/invalidation_helper.h"
 #include "sync/internal_api/public/sessions/sync_session_snapshot.h"
diff --git a/chrome/browser/sync/test/integration/p2p_sync_refresher.cc b/chrome/browser/sync/test/integration/p2p_sync_refresher.cc
index 55acd1c9..afc1ab0 100644
--- a/chrome/browser/sync/test/integration/p2p_sync_refresher.cc
+++ b/chrome/browser/sync/test/integration/p2p_sync_refresher.cc
@@ -5,9 +5,9 @@
 #include "chrome/browser/sync/test/integration/p2p_sync_refresher.h"
 
 #include "chrome/browser/chrome_notification_types.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h"
 #include "chrome/browser/sync/test/integration/sync_test.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "content/public/browser/notification_service.h"
 #include "sync/internal_api/public/sessions/sync_session_snapshot.h"
 
diff --git a/chrome/browser/sync/test/integration/password_manager_setting_migrator_helper.cc b/chrome/browser/sync/test/integration/password_manager_setting_migrator_helper.cc
index cb0f919..2c3f1fb 100644
--- a/chrome/browser/sync/test/integration/password_manager_setting_migrator_helper.cc
+++ b/chrome/browser/sync/test/integration/password_manager_setting_migrator_helper.cc
@@ -9,9 +9,9 @@
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/password_manager/password_manager_setting_migrator_service_factory.h"
 #include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/sync/test/integration/preferences_helper.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/password_manager/core/common/password_manager_pref_names.h"
 #include "components/password_manager/sync/browser/password_manager_setting_migrator_service.h"
 #include "content/public/browser/notification_details.h"
diff --git a/chrome/browser/sync/test/integration/passwords_helper.cc b/chrome/browser/sync/test/integration/passwords_helper.cc
index 4b9de83..749532f 100644
--- a/chrome/browser/sync/test/integration/passwords_helper.cc
+++ b/chrome/browser/sync/test/integration/passwords_helper.cc
@@ -12,12 +12,12 @@
 #include "base/synchronization/waitable_event.h"
 #include "base/time/time.h"
 #include "chrome/browser/password_manager/password_store_factory.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/sync/test/integration/multi_client_status_change_checker.h"
 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
 #include "chrome/browser/sync/test/integration/single_client_status_change_checker.h"
 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/password_manager/core/browser/password_manager_test_utils.h"
 #include "components/password_manager/core/browser/password_store.h"
 #include "components/password_manager/core/browser/password_store_consumer.h"
diff --git a/chrome/browser/sync/test/integration/passwords_helper.h b/chrome/browser/sync/test/integration/passwords_helper.h
index be31d2c..f61ff4d 100644
--- a/chrome/browser/sync/test/integration/passwords_helper.h
+++ b/chrome/browser/sync/test/integration/passwords_helper.h
@@ -9,9 +9,9 @@
 
 #include "base/memory/scoped_vector.h"
 #include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/test/integration/sync_test.h"
 #include "components/autofill/core/common/password_form.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 
 namespace password_manager {
 class PasswordStore;
diff --git a/chrome/browser/sync/test/integration/profile_sync_service_harness.cc b/chrome/browser/sync/test/integration/profile_sync_service_harness.cc
index d6670c1b..ee7bf42 100644
--- a/chrome/browser/sync/test/integration/profile_sync_service_harness.cc
+++ b/chrome/browser/sync/test/integration/profile_sync_service_harness.cc
@@ -16,7 +16,6 @@
 #include "base/strings/stringprintf.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/sync/test/integration/quiesce_status_change_checker.h"
 #include "chrome/browser/sync/test/integration/single_client_status_change_checker.h"
@@ -25,6 +24,7 @@
 #include "chrome/browser/ui/webui/signin/login_ui_test_utils.h"
 #include "chrome/common/channel_info.h"
 #include "chrome/common/chrome_switches.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/invalidation/impl/p2p_invalidation_service.h"
 #include "components/signin/core/browser/profile_oauth2_token_service.h"
 #include "components/signin/core/browser/signin_manager_base.h"
diff --git a/chrome/browser/sync/test/integration/quiesce_status_change_checker.cc b/chrome/browser/sync/test/integration/quiesce_status_change_checker.cc
index c90101d3..740f8cb 100644
--- a/chrome/browser/sync/test/integration/quiesce_status_change_checker.cc
+++ b/chrome/browser/sync/test/integration/quiesce_status_change_checker.cc
@@ -8,7 +8,7 @@
 #include "base/scoped_observer.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/stringprintf.h"
-#include "chrome/browser/sync/profile_sync_service.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "sync/internal_api/public/sessions/sync_session_snapshot.h"
 
 namespace {
diff --git a/chrome/browser/sync/test/integration/sessions_helper.cc b/chrome/browser/sync/test/integration/sessions_helper.cc
index 187d9c5..ccd0c12 100644
--- a/chrome/browser/sync/test/integration/sessions_helper.cc
+++ b/chrome/browser/sync/test/integration/sessions_helper.cc
@@ -16,7 +16,6 @@
 #include "base/thread_task_runner_handle.h"
 #include "base/time/time.h"
 #include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/sync/sessions/notification_service_sessions_router.h"
 #include "chrome/browser/sync/test/integration/multi_client_status_change_checker.h"
@@ -25,6 +24,7 @@
 #include "chrome/browser/sync/test/integration/sync_test.h"
 #include "chrome/browser/ui/singleton_tabs.h"
 #include "chrome/common/chrome_switches.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/sync_driver/open_tabs_ui_delegate.h"
 #include "components/sync_driver/sync_client.h"
 #include "content/public/test/test_utils.h"
diff --git a/chrome/browser/sync/test/integration/single_client_app_list_sync_test.cc b/chrome/browser/sync/test/integration/single_client_app_list_sync_test.cc
index fcfda01..cd233dc 100644
--- a/chrome/browser/sync/test/integration/single_client_app_list_sync_test.cc
+++ b/chrome/browser/sync/test/integration/single_client_app_list_sync_test.cc
@@ -4,13 +4,13 @@
 
 #include "base/basictypes.h"
 #include "base/command_line.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/test/integration/apps_helper.h"
 #include "chrome/browser/sync/test/integration/sync_app_list_helper.h"
 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
 #include "chrome/browser/sync/test/integration/sync_test.h"
 #include "chrome/browser/ui/app_list/app_list_syncable_service.h"
 #include "chrome/browser/ui/app_list/app_list_syncable_service_factory.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "ui/app_list/app_list_switches.h"
 
 using sync_integration_test_util::AwaitCommitActivityCompletion;
diff --git a/chrome/browser/sync/test/integration/single_client_apps_sync_test.cc b/chrome/browser/sync/test/integration/single_client_apps_sync_test.cc
index 1f1404e..92fc27e8 100644
--- a/chrome/browser/sync/test/integration/single_client_apps_sync_test.cc
+++ b/chrome/browser/sync/test/integration/single_client_apps_sync_test.cc
@@ -3,10 +3,10 @@
 // found in the LICENSE file.
 
 #include "base/basictypes.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/test/integration/apps_helper.h"
 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
 #include "chrome/browser/sync/test/integration/sync_test.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 
 using apps_helper::AllProfilesHaveSameAppsAsVerifier;
 using apps_helper::InstallApp;
diff --git a/chrome/browser/sync/test/integration/single_client_backup_rollback_test.cc b/chrome/browser/sync/test/integration/single_client_backup_rollback_test.cc
index 437f946..769326a 100644
--- a/chrome/browser/sync/test/integration/single_client_backup_rollback_test.cc
+++ b/chrome/browser/sync/test/integration/single_client_backup_rollback_test.cc
@@ -13,12 +13,12 @@
 #include "chrome/browser/browsing_data/browsing_data_remover.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/sync/chrome_sync_client.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/test/integration/bookmarks_helper.h"
 #include "chrome/browser/sync/test/integration/preferences_helper.h"
 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
 #include "chrome/browser/sync/test/integration/sync_test.h"
 #include "components/bookmarks/browser/bookmark_model.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/sync_driver/sync_driver_switches.h"
 #include "sync/internal_api/public/util/sync_db_util.h"
 #include "sync/test/fake_server/fake_server_verifier.h"
diff --git a/chrome/browser/sync/test/integration/single_client_bookmarks_sync_test.cc b/chrome/browser/sync/test/integration/single_client_bookmarks_sync_test.cc
index 80587fc1..53e03e1 100644
--- a/chrome/browser/sync/test/integration/single_client_bookmarks_sync_test.cc
+++ b/chrome/browser/sync/test/integration/single_client_bookmarks_sync_test.cc
@@ -4,12 +4,12 @@
 
 #include "base/strings/utf_string_conversions.h"
 #include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/test/integration/bookmarks_helper.h"
 #include "chrome/browser/sync/test/integration/single_client_status_change_checker.h"
 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
 #include "chrome/browser/sync/test/integration/sync_test.h"
 #include "components/bookmarks/browser/bookmark_model.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "sync/test/fake_server/bookmark_entity_builder.h"
 #include "sync/test/fake_server/entity_builder_factory.h"
 #include "sync/test/fake_server/fake_server_verifier.h"
diff --git a/chrome/browser/sync/test/integration/single_client_dictionary_sync_test.cc b/chrome/browser/sync/test/integration/single_client_dictionary_sync_test.cc
index 1a918b4..aec1c94e 100644
--- a/chrome/browser/sync/test/integration/single_client_dictionary_sync_test.cc
+++ b/chrome/browser/sync/test/integration/single_client_dictionary_sync_test.cc
@@ -2,10 +2,10 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/test/integration/dictionary_helper.h"
 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
 #include "chrome/browser/sync/test/integration/sync_test.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 
 using sync_integration_test_util::AwaitCommitActivityCompletion;
 
diff --git a/chrome/browser/sync/test/integration/single_client_directory_sync_test.cc b/chrome/browser/sync/test/integration/single_client_directory_sync_test.cc
index 520742e..c5c8f45 100644
--- a/chrome/browser/sync/test/integration/single_client_directory_sync_test.cc
+++ b/chrome/browser/sync/test/integration/single_client_directory_sync_test.cc
@@ -9,11 +9,11 @@
 #include "base/synchronization/waitable_event.h"
 #include "base/thread_task_runner_handle.h"
 #include "base/time/time.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/test/integration/bookmarks_helper.h"
 #include "chrome/browser/sync/test/integration/single_client_status_change_checker.h"
 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
 #include "chrome/browser/sync/test/integration/sync_test.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "content/public/browser/browser_thread.h"
 #include "sync/syncable/directory.h"
 #include "sync/test/directory_backing_store_corruption_testing.h"
diff --git a/chrome/browser/sync/test/integration/single_client_extensions_sync_test.cc b/chrome/browser/sync/test/integration/single_client_extensions_sync_test.cc
index 29f5735..b8c36fc 100644
--- a/chrome/browser/sync/test/integration/single_client_extensions_sync_test.cc
+++ b/chrome/browser/sync/test/integration/single_client_extensions_sync_test.cc
@@ -3,10 +3,10 @@
 // found in the LICENSE file.
 
 #include "base/basictypes.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/test/integration/extensions_helper.h"
 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
 #include "chrome/browser/sync/test/integration/sync_test.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 
 using extensions_helper::AllProfilesHaveSameExtensionsAsVerifier;
 using extensions_helper::InstallExtension;
diff --git a/chrome/browser/sync/test/integration/single_client_passwords_sync_test.cc b/chrome/browser/sync/test/integration/single_client_passwords_sync_test.cc
index 00cc0f88..9be7c57 100644
--- a/chrome/browser/sync/test/integration/single_client_passwords_sync_test.cc
+++ b/chrome/browser/sync/test/integration/single_client_passwords_sync_test.cc
@@ -2,10 +2,10 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/test/integration/passwords_helper.h"
 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
 #include "chrome/browser/sync/test/integration/sync_test.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/password_manager/core/browser/password_manager_test_utils.h"
 
 using passwords_helper::AddLogin;
diff --git a/chrome/browser/sync/test/integration/single_client_preferences_sync_test.cc b/chrome/browser/sync/test/integration/single_client_preferences_sync_test.cc
index bff12d2b..3892ba9f 100644
--- a/chrome/browser/sync/test/integration/single_client_preferences_sync_test.cc
+++ b/chrome/browser/sync/test/integration/single_client_preferences_sync_test.cc
@@ -2,11 +2,11 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/test/integration/preferences_helper.h"
 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
 #include "chrome/browser/sync/test/integration/sync_test.h"
 #include "chrome/common/pref_names.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 
 using preferences_helper::BooleanPrefMatches;
 using preferences_helper::ChangeBooleanPref;
diff --git a/chrome/browser/sync/test/integration/single_client_search_engines_sync_test.cc b/chrome/browser/sync/test/integration/single_client_search_engines_sync_test.cc
index e05bc69..9f584202 100644
--- a/chrome/browser/sync/test/integration/single_client_search_engines_sync_test.cc
+++ b/chrome/browser/sync/test/integration/single_client_search_engines_sync_test.cc
@@ -2,10 +2,10 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/test/integration/search_engines_helper.h"
 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
 #include "chrome/browser/sync/test/integration/sync_test.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/search_engines/template_url_service.h"
 
 using sync_integration_test_util::AwaitCommitActivityCompletion;
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 bb103ad..2cda8304 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
@@ -3,12 +3,12 @@
 // found in the LICENSE file.
 
 #include "chrome/browser/sessions/session_service.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/test/integration/sessions_helper.h"
 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
 #include "chrome/browser/sync/test/integration/sync_test.h"
 #include "chrome/browser/sync/test/integration/typed_urls_helper.h"
 #include "chrome/common/url_constants.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/history/core/browser/history_types.h"
 #include "components/sessions/core/session_types.h"
 #include "sync/test/fake_server/fake_server_verifier.h"
diff --git a/chrome/browser/sync/test/integration/single_client_supervised_user_settings_sync_test.cc b/chrome/browser/sync/test/integration/single_client_supervised_user_settings_sync_test.cc
index 226ba92..8b66ebb 100644
--- a/chrome/browser/sync/test/integration/single_client_supervised_user_settings_sync_test.cc
+++ b/chrome/browser/sync/test/integration/single_client_supervised_user_settings_sync_test.cc
@@ -11,12 +11,12 @@
 #include "chrome/browser/supervised_user/supervised_user_service_factory.h"
 #include "chrome/browser/supervised_user/supervised_user_settings_service.h"
 #include "chrome/browser/supervised_user/supervised_user_settings_service_factory.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
 #include "chrome/browser/sync/test/integration/sync_test.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/common/chrome_switches.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 
 class SingleClientSupervisedUserSettingsSyncTest : public SyncTest {
  public:
diff --git a/chrome/browser/sync/test/integration/single_client_themes_sync_test.cc b/chrome/browser/sync/test/integration/single_client_themes_sync_test.cc
index d770259..2aa0bd3 100644
--- a/chrome/browser/sync/test/integration/single_client_themes_sync_test.cc
+++ b/chrome/browser/sync/test/integration/single_client_themes_sync_test.cc
@@ -3,10 +3,10 @@
 // found in the LICENSE file.
 
 #include "base/basictypes.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
 #include "chrome/browser/sync/test/integration/sync_test.h"
 #include "chrome/browser/sync/test/integration/themes_helper.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 
 using sync_integration_test_util::AwaitCommitActivityCompletion;
 using themes_helper::GetCustomTheme;
diff --git a/chrome/browser/sync/test/integration/single_client_typed_urls_sync_test.cc b/chrome/browser/sync/test/integration/single_client_typed_urls_sync_test.cc
index ddd2597..431abfe3 100644
--- a/chrome/browser/sync/test/integration/single_client_typed_urls_sync_test.cc
+++ b/chrome/browser/sync/test/integration/single_client_typed_urls_sync_test.cc
@@ -3,10 +3,10 @@
 // found in the LICENSE file.
 
 #include "chrome/browser/sessions/session_service.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
 #include "chrome/browser/sync/test/integration/sync_test.h"
 #include "chrome/browser/sync/test/integration/typed_urls_helper.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/history/core/browser/history_types.h"
 
 using sync_integration_test_util::AwaitCommitActivityCompletion;
diff --git a/chrome/browser/sync/test/integration/single_client_wallet_sync_test.cc b/chrome/browser/sync/test/integration/single_client_wallet_sync_test.cc
index 9acd993..69619dd9 100644
--- a/chrome/browser/sync/test/integration/single_client_wallet_sync_test.cc
+++ b/chrome/browser/sync/test/integration/single_client_wallet_sync_test.cc
@@ -8,7 +8,6 @@
 #include "base/prefs/pref_service.h"
 #include "base/strings/utf_string_conversions.h"
 #include "chrome/browser/chrome_notification_types.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/test/integration/autofill_helper.h"
 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
 #include "chrome/browser/sync/test/integration/single_client_status_change_checker.h"
@@ -19,6 +18,7 @@
 #include "components/autofill/core/browser/field_types.h"
 #include "components/autofill/core/browser/personal_data_manager.h"
 #include "components/autofill/core/common/autofill_pref_names.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "content/public/browser/notification_service.h"
 #include "sync/internal_api/public/base/model_type.h"
 #include "sync/test/fake_server/fake_server_entity.h"
diff --git a/chrome/browser/sync/test/integration/sync_auth_test.cc b/chrome/browser/sync/test/integration/sync_auth_test.cc
index 5cfcdf80..09f75ed 100644
--- a/chrome/browser/sync/test/integration/sync_auth_test.cc
+++ b/chrome/browser/sync/test/integration/sync_auth_test.cc
@@ -6,12 +6,12 @@
 #include "base/threading/platform_thread.h"
 #include "base/time/time.h"
 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/test/integration/bookmarks_helper.h"
 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
 #include "chrome/browser/sync/test/integration/single_client_status_change_checker.h"
 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
 #include "chrome/browser/sync/test/integration/sync_test.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/signin/core/browser/profile_oauth2_token_service.h"
 #include "google_apis/gaia/google_service_auth_error.h"
 #include "net/http/http_status_code.h"
diff --git a/chrome/browser/sync/test/integration/sync_errors_test.cc b/chrome/browser/sync/test/integration/sync_errors_test.cc
index a44dabea..11fb3ca1 100644
--- a/chrome/browser/sync/test/integration/sync_errors_test.cc
+++ b/chrome/browser/sync/test/integration/sync_errors_test.cc
@@ -5,7 +5,6 @@
 #include "base/prefs/pref_member.h"
 #include "base/prefs/pref_service.h"
 #include "base/run_loop.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/test/integration/bookmarks_helper.h"
 #include "chrome/browser/sync/test/integration/passwords_helper.h"
 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
@@ -13,6 +12,7 @@
 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
 #include "chrome/browser/sync/test/integration/sync_test.h"
 #include "chrome/common/pref_names.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "google_apis/gaia/google_service_auth_error.h"
 #include "sync/protocol/sync_protocol_error.h"
 
diff --git a/chrome/browser/sync/test/integration/sync_exponential_backoff_test.cc b/chrome/browser/sync/test/integration/sync_exponential_backoff_test.cc
index 5245ffb..3b981988 100644
--- a/chrome/browser/sync/test/integration/sync_exponential_backoff_test.cc
+++ b/chrome/browser/sync/test/integration/sync_exponential_backoff_test.cc
@@ -4,12 +4,12 @@
 
 #include "base/bind.h"
 #include "base/strings/stringprintf.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/test/integration/bookmarks_helper.h"
 #include "chrome/browser/sync/test/integration/retry_verifier.h"
 #include "chrome/browser/sync/test/integration/single_client_status_change_checker.h"
 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
 #include "chrome/browser/sync/test/integration/sync_test.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 
 namespace {
 
diff --git a/chrome/browser/sync/test/integration/sync_integration_test_util.cc b/chrome/browser/sync/test/integration/sync_integration_test_util.cc
index 248d051c..c84e948 100644
--- a/chrome/browser/sync/test/integration/sync_integration_test_util.cc
+++ b/chrome/browser/sync/test/integration/sync_integration_test_util.cc
@@ -4,9 +4,9 @@
 
 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
 
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/test/integration/single_client_status_change_checker.h"
 #include "chrome/browser/sync/test/integration/updated_progress_marker_checker.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 
 namespace sync_integration_test_util {
 
diff --git a/chrome/browser/sync/test/integration/sync_test.cc b/chrome/browser/sync/test/integration/sync_test.cc
index daa5313c..88d6f5c9 100644
--- a/chrome/browser/sync/test/integration/sync_test.cc
+++ b/chrome/browser/sync/test/integration/sync_test.cc
@@ -32,7 +32,6 @@
 #include "chrome/browser/search_engines/template_url_service_factory.h"
 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
 #include "chrome/browser/signin/signin_manager_factory.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/sync/test/integration/fake_server_invalidation_service.h"
 #include "chrome/browser/sync/test/integration/p2p_invalidation_forwarder.h"
@@ -55,6 +54,7 @@
 #include "chrome/test/base/testing_browser_process.h"
 #include "chrome/test/base/ui_test_utils.h"
 #include "components/bookmarks/test/bookmark_test_helpers.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/google/core/browser/google_url_tracker.h"
 #include "components/invalidation/impl/invalidation_switches.h"
 #include "components/invalidation/impl/p2p_invalidation_service.h"
diff --git a/chrome/browser/sync/test/integration/updated_progress_marker_checker.cc b/chrome/browser/sync/test/integration/updated_progress_marker_checker.cc
index cce8084..418965d 100644
--- a/chrome/browser/sync/test/integration/updated_progress_marker_checker.cc
+++ b/chrome/browser/sync/test/integration/updated_progress_marker_checker.cc
@@ -4,7 +4,7 @@
 
 #include "chrome/browser/sync/test/integration/updated_progress_marker_checker.h"
 
-#include "chrome/browser/sync/profile_sync_service.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "sync/internal_api/public/sessions/sync_session_snapshot.h"
 
 UpdatedProgressMarkerChecker::UpdatedProgressMarkerChecker(
diff --git a/chrome/browser/sync/test_profile_sync_service.h b/chrome/browser/sync/test_profile_sync_service.h
index 25771b0..8eafbd6d 100644
--- a/chrome/browser/sync/test_profile_sync_service.h
+++ b/chrome/browser/sync/test_profile_sync_service.h
@@ -10,7 +10,7 @@
 #include "base/callback.h"
 #include "base/compiler_specific.h"
 #include "base/memory/weak_ptr.h"
-#include "chrome/browser/sync/profile_sync_service.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/signin/core/browser/profile_oauth2_token_service.h"
 #include "components/sync_driver/data_type_manager_impl.h"
 #include "components/sync_driver/glue/sync_backend_host_impl.h"
diff --git a/chrome/browser/ui/android/tab_model/tab_model.cc b/chrome/browser/ui/android/tab_model/tab_model.cc
index aab2a95..c20b0ab 100644
--- a/chrome/browser/ui/android/tab_model/tab_model.cc
+++ b/chrome/browser/ui/android/tab_model/tab_model.cc
@@ -9,9 +9,9 @@
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/sync/glue/synced_window_delegate_android.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/ui/toolbar/toolbar_model_impl.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "content/public/browser/notification_service.h"
 
 using content::NotificationService;
diff --git a/chrome/browser/ui/app_list/search/suggestions/suggestions_search_provider.cc b/chrome/browser/ui/app_list/search/suggestions/suggestions_search_provider.cc
index 0643691b..671fc64 100644
--- a/chrome/browser/ui/app_list/search/suggestions/suggestions_search_provider.cc
+++ b/chrome/browser/ui/app_list/search/suggestions/suggestions_search_provider.cc
@@ -9,9 +9,9 @@
 #include "chrome/browser/favicon/favicon_service_factory.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/search/suggestions/suggestions_service_factory.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/ui/app_list/search/suggestions/url_suggestion_result.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/favicon/core/favicon_service.h"
 #include "components/suggestions/proto/suggestions.pb.h"
 #include "components/suggestions/suggestions_service.h"
diff --git a/chrome/browser/ui/ash/app_sync_ui_state.cc b/chrome/browser/ui/ash/app_sync_ui_state.cc
index d4390933..92404d64 100644
--- a/chrome/browser/ui/ash/app_sync_ui_state.cc
+++ b/chrome/browser/ui/ash/app_sync_ui_state.cc
@@ -8,10 +8,10 @@
 #include "chrome/browser/extensions/extension_service.h"
 #include "chrome/browser/extensions/pending_extension_manager.h"
 #include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/ui/ash/app_sync_ui_state_factory.h"
 #include "chrome/browser/ui/ash/app_sync_ui_state_observer.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "extensions/browser/extension_registry.h"
 #include "extensions/browser/extension_system.h"
 
diff --git a/chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc b/chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc
index 935a338..bdc57b8 100644
--- a/chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc
+++ b/chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc
@@ -12,7 +12,6 @@
 #include "base/strings/utf_string_conversion_utils.h"
 #include "base/strings/utf_string_conversions.h"
 #include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/ui/autofill/password_generation_popup_observer.h"
 #include "chrome/browser/ui/autofill/password_generation_popup_view.h"
@@ -24,6 +23,7 @@
 #include "chrome/grit/generated_resources.h"
 #include "components/autofill/content/common/autofill_messages.h"
 #include "components/autofill/core/browser/password_generator.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/password_manager/core/browser/password_bubble_experiment.h"
 #include "components/password_manager/core/browser/password_manager.h"
 #include "content/public/browser/native_web_keyboard_event.h"
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 4f6a754..29e4088e 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -77,7 +77,6 @@
 #include "chrome/browser/sessions/session_tab_helper.h"
 #include "chrome/browser/sessions/tab_restore_service_factory.h"
 #include "chrome/browser/ssl/security_state_model.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/sync/sync_ui_util.h"
 #include "chrome/browser/tab_contents/retargeting_details.h"
@@ -158,6 +157,7 @@
 #include "components/bookmarks/browser/bookmark_model.h"
 #include "components/bookmarks/browser/bookmark_utils.h"
 #include "components/bookmarks/common/bookmark_pref_names.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/content_settings/core/browser/host_content_settings_map.h"
 #include "components/favicon/content/content_favicon_driver.h"
 #include "components/history/core/browser/top_sites.h"
diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui/browser_command_controller.cc
index 0ccd5eae..83ecc0b 100644
--- a/chrome/browser/ui/browser_command_controller.cc
+++ b/chrome/browser/ui/browser_command_controller.cc
@@ -19,7 +19,6 @@
 #include "chrome/browser/sessions/tab_restore_service_factory.h"
 #include "chrome/browser/shell_integration.h"
 #include "chrome/browser/signin/signin_promo.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h"
 #include "chrome/browser/ui/browser.h"
@@ -33,6 +32,7 @@
 #include "chrome/common/pref_names.h"
 #include "chrome/common/profiling.h"
 #include "components/bookmarks/common/bookmark_pref_names.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/dom_distiller/core/dom_distiller_switches.h"
 #include "components/sessions/core/tab_restore_service.h"
 #include "components/signin/core/common/signin_pref_names.h"
diff --git a/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller_unittest.mm b/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller_unittest.mm
index 58bdd6e2..3e00ef63 100644
--- a/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller_unittest.mm
@@ -8,7 +8,6 @@
 #include "base/strings/sys_string_conversions.h"
 #include "base/strings/utf_string_conversions.h"
 #include "chrome/app/chrome_command_ids.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/ui/browser_list.h"
 #include "chrome/browser/ui/browser_list_observer.h"
@@ -24,6 +23,7 @@
 #include "chrome/common/chrome_switches.h"
 #include "chrome/grit/generated_resources.h"
 #include "chrome/test/base/testing_profile.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/sync_driver/local_device_info_provider_mock.h"
 #include "components/sync_driver/sync_client.h"
 #include "components/sync_driver/sync_prefs.h"
diff --git a/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc b/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc
index 627ff319..bcf6f73e 100644
--- a/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc
+++ b/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc
@@ -13,13 +13,13 @@
 #include "base/strings/utf_string_conversions.h"
 #include "chrome/browser/password_manager/password_store_factory.h"
 #include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h"
 #include "chrome/browser/ui/passwords/manage_passwords_view_utils.h"
 #include "chrome/common/url_constants.h"
 #include "chrome/grit/chromium_strings.h"
 #include "chrome/grit/generated_resources.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/password_manager/core/browser/password_bubble_experiment.h"
 #include "components/password_manager/core/browser/password_store.h"
 #include "components/password_manager/core/common/credential_manager_types.h"
diff --git a/chrome/browser/ui/passwords/manage_passwords_view_utils_desktop_unittest.cc b/chrome/browser/ui/passwords/manage_passwords_view_utils_desktop_unittest.cc
index e392602..caf103a 100644
--- a/chrome/browser/ui/passwords/manage_passwords_view_utils_desktop_unittest.cc
+++ b/chrome/browser/ui/passwords/manage_passwords_view_utils_desktop_unittest.cc
@@ -7,11 +7,11 @@
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/test/mock_entropy_provider.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/sync/profile_sync_service_mock.h"
 #include "chrome/grit/generated_resources.h"
 #include "chrome/test/base/testing_profile.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "content/public/test/test_browser_thread_bundle.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/ui/passwords/password_manager_presenter.cc b/chrome/browser/ui/passwords/password_manager_presenter.cc
index dd7759c..ec667047 100644
--- a/chrome/browser/ui/passwords/password_manager_presenter.cc
+++ b/chrome/browser/ui/passwords/password_manager_presenter.cc
@@ -14,7 +14,6 @@
 #include "chrome/browser/password_manager/password_store_factory.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/signin/signin_manager_factory.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/ui/passwords/manage_passwords_view_utils.h"
 #include "chrome/browser/ui/passwords/password_ui_view.h"
@@ -22,6 +21,7 @@
 #include "chrome/common/pref_names.h"
 #include "chrome/common/url_constants.h"
 #include "components/autofill/core/common/password_form.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/password_manager/core/browser/affiliation_utils.h"
 #include "components/password_manager/core/common/password_manager_pref_names.h"
 #include "components/password_manager/sync/browser/password_sync_util.h"
diff --git a/chrome/browser/ui/search/search_tab_helper.cc b/chrome/browser/ui/search/search_tab_helper.cc
index b90872377..6ae2211 100644
--- a/chrome/browser/ui/search/search_tab_helper.cc
+++ b/chrome/browser/ui/search/search_tab_helper.cc
@@ -16,7 +16,6 @@
 #include "chrome/browser/search/instant_service_factory.h"
 #include "chrome/browser/search/search.h"
 #include "chrome/browser/signin/signin_manager_factory.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/ui/app_list/app_list_util.h"
 #include "chrome/browser/ui/browser_window.h"
@@ -30,6 +29,7 @@
 #include "chrome/browser/ui/webui/ntp/ntp_user_data_logger.h"
 #include "chrome/common/url_constants.h"
 #include "chrome/grit/generated_resources.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/google/core/browser/google_util.h"
 #include "components/omnibox/browser/omnibox_edit_model.h"
 #include "components/omnibox/browser/omnibox_popup_model.h"
diff --git a/chrome/browser/ui/search/search_tab_helper_unittest.cc b/chrome/browser/ui/search/search_tab_helper_unittest.cc
index 29469cb..678c8340 100644
--- a/chrome/browser/ui/search/search_tab_helper_unittest.cc
+++ b/chrome/browser/ui/search/search_tab_helper_unittest.cc
@@ -16,7 +16,6 @@
 #include "chrome/browser/search_engines/template_url_service_factory.h"
 #include "chrome/browser/signin/fake_signin_manager_builder.h"
 #include "chrome/browser/signin/signin_manager_factory.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/sync/profile_sync_service_mock.h"
 #include "chrome/browser/ui/search/search_ipc_router.h"
@@ -29,6 +28,7 @@
 #include "chrome/test/base/browser_with_test_window_test.h"
 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
 #include "chrome/test/base/testing_profile.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/omnibox/common/omnibox_focus_state.h"
 #include "components/search_engines/template_url_service.h"
 #include "content/public/browser/navigation_controller.h"
diff --git a/chrome/browser/ui/sync/one_click_signin_sync_observer.cc b/chrome/browser/ui/sync/one_click_signin_sync_observer.cc
index 9e79c31..69069dd 100644
--- a/chrome/browser/ui/sync/one_click_signin_sync_observer.cc
+++ b/chrome/browser/ui/sync/one_click_signin_sync_observer.cc
@@ -10,8 +10,8 @@
 #include "base/thread_task_runner_handle.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/signin/signin_promo.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "content/public/browser/web_contents.h"
 #include "content/public/browser/web_contents_delegate.h"
 
diff --git a/chrome/browser/ui/sync/one_click_signin_sync_starter.cc b/chrome/browser/ui/sync/one_click_signin_sync_starter.cc
index bcabb924..8767ed9 100644
--- a/chrome/browser/ui/sync/one_click_signin_sync_starter.cc
+++ b/chrome/browser/ui/sync/one_click_signin_sync_starter.cc
@@ -22,7 +22,6 @@
 #include "chrome/browser/profiles/profile_window.h"
 #include "chrome/browser/signin/signin_manager_factory.h"
 #include "chrome/browser/signin/signin_tracker_factory.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_finder.h"
@@ -37,6 +36,7 @@
 #include "chrome/common/url_constants.h"
 #include "chrome/grit/chromium_strings.h"
 #include "chrome/grit/generated_resources.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/signin/core/browser/signin_manager.h"
 #include "components/signin/core/browser/signin_metrics.h"
 #include "components/sync_driver/sync_prefs.h"
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 ffa3f42c..0a58406 100644
--- a/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc
+++ b/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc
@@ -15,7 +15,6 @@
 #include "chrome/browser/search/search.h"
 #include "chrome/browser/sessions/session_restore.h"
 #include "chrome/browser/sessions/tab_restore_service_factory.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_commands.h"
@@ -23,6 +22,7 @@
 #include "chrome/browser/ui/tabs/tab_strip_model.h"
 #include "chrome/browser/ui/toolbar/app_menu_model.h"
 #include "chrome/grit/generated_resources.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/favicon_base/favicon_types.h"
 #include "components/sessions/core/tab_restore_service.h"
 #include "components/sync_driver/glue/synced_session.h"
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
index ee8d786..9fc0fe4ff 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
@@ -25,7 +25,6 @@
 #include "chrome/browser/defaults.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/search/search.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/themes/theme_properties.h"
 #include "chrome/browser/ui/bookmarks/bookmark_bar_constants.h"
@@ -54,6 +53,7 @@
 #include "components/bookmarks/browser/bookmark_utils.h"
 #include "components/bookmarks/common/bookmark_pref_names.h"
 #include "components/bookmarks/managed/managed_bookmark_service.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/metrics/metrics_service.h"
 #include "components/omnibox/browser/omnibox_popup_model.h"
 #include "components/omnibox/browser/omnibox_view.h"
diff --git a/chrome/browser/ui/webui/app_launcher_login_handler.cc b/chrome/browser/ui/webui/app_launcher_login_handler.cc
index b2821c9f..c5cdb44 100644
--- a/chrome/browser/ui/webui/app_launcher_login_handler.cc
+++ b/chrome/browser/ui/webui/app_launcher_login_handler.cc
@@ -19,7 +19,6 @@
 #include "chrome/browser/profiles/profile_metrics.h"
 #include "chrome/browser/signin/signin_manager_factory.h"
 #include "chrome/browser/signin/signin_promo.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_finder.h"
@@ -31,6 +30,7 @@
 #include "chrome/common/url_constants.h"
 #include "chrome/grit/chromium_strings.h"
 #include "chrome/grit/generated_resources.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/signin/core/browser/signin_manager.h"
 #include "components/web_resource/promo_resource_service.h"
 #include "content/public/browser/host_zoom_map.h"
diff --git a/chrome/browser/ui/webui/favicon_source.cc b/chrome/browser/ui/webui/favicon_source.cc
index 6b64f092..847d330 100644
--- a/chrome/browser/ui/webui/favicon_source.cc
+++ b/chrome/browser/ui/webui/favicon_source.cc
@@ -13,10 +13,10 @@
 #include "chrome/browser/history/top_sites_factory.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/search/instant_io_context.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/common/url_constants.h"
 #include "chrome/grit/locale_settings.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/favicon_base/favicon_url_parser.h"
 #include "components/history/core/browser/top_sites.h"
 #include "components/sync_driver/open_tabs_ui_delegate.h"
diff --git a/chrome/browser/ui/webui/foreign_session_handler.cc b/chrome/browser/ui/webui/foreign_session_handler.cc
index 3fbf4fe9..ff18d1b 100644
--- a/chrome/browser/ui/webui/foreign_session_handler.cc
+++ b/chrome/browser/ui/webui/foreign_session_handler.cc
@@ -20,12 +20,12 @@
 #include "base/values.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/sessions/session_restore.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/ui/host_desktop.h"
 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
 #include "chrome/common/pref_names.h"
 #include "chrome/common/url_constants.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/pref_registry/pref_registry_syncable.h"
 #include "components/strings/grit/components_strings.h"
 #include "content/public/browser/url_data_source.h"
diff --git a/chrome/browser/ui/webui/history_ui.cc b/chrome/browser/ui/webui/history_ui.cc
index 637b24f..d910fd5 100644
--- a/chrome/browser/ui/webui/history_ui.cc
+++ b/chrome/browser/ui/webui/history_ui.cc
@@ -30,7 +30,6 @@
 #include "chrome/browser/prefs/incognito_mode_prefs.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/signin/signin_manager_factory.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/ui/browser_finder.h"
 #include "chrome/browser/ui/chrome_pages.h"
@@ -42,6 +41,7 @@
 #include "chrome/grit/generated_resources.h"
 #include "components/bookmarks/browser/bookmark_model.h"
 #include "components/bookmarks/browser/bookmark_utils.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/history/core/browser/history_service.h"
 #include "components/history/core/browser/history_types.h"
 #include "components/history/core/browser/web_history_service.h"
diff --git a/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc b/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc
index b914a5c..059af69 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc
@@ -11,10 +11,10 @@
 #include "base/prefs/pref_service.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
 #include "chrome/browser/web_resource/notification_promo_helper.h"
 #include "chrome/common/pref_names.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/pref_registry/pref_registry_syncable.h"
 #include "content/public/browser/notification_service.h"
 #include "content/public/browser/web_ui.h"
diff --git a/chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.cc b/chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.cc
index 340aaaf..d30cd2e6 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.cc
@@ -16,7 +16,6 @@
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/signin/signin_manager_factory.h"
 #include "chrome/browser/signin/signin_promo.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_finder.h"
@@ -25,6 +24,7 @@
 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h"
 #include "chrome/common/pref_names.h"
 #include "chrome/grit/generated_resources.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/signin/core/browser/signin_manager.h"
 #include "components/signin/core/common/signin_pref_names.h"
 #include "content/public/browser/render_view_host.h"
diff --git a/chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.h b/chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.h
index 0e77680..d3e8d853 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.h
+++ b/chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.h
@@ -9,8 +9,8 @@
 
 #include "base/gtest_prod_util.h"
 #include "base/prefs/pref_change_registrar.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/sync_ui_util.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "content/public/browser/web_ui_message_handler.h"
 
 namespace base {
diff --git a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
index 58352f5c..5215c67 100644
--- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
+++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
@@ -22,7 +22,6 @@
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/search/search.h"
 #include "chrome/browser/signin/signin_manager_factory.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/themes/theme_properties.h"
 #include "chrome/browser/themes/theme_service.h"
@@ -42,6 +41,7 @@
 #include "chrome/grit/generated_resources.h"
 #include "chrome/grit/locale_settings.h"
 #include "components/bookmarks/common/bookmark_pref_names.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/google/core/browser/google_util.h"
 #include "components/signin/core/browser/signin_manager.h"
 #include "components/web_resource/notification_promo.h"
diff --git a/chrome/browser/ui/webui/options/autofill_options_handler.h b/chrome/browser/ui/webui/options/autofill_options_handler.h
index 079318c..b569cb6 100644
--- a/chrome/browser/ui/webui/options/autofill_options_handler.h
+++ b/chrome/browser/ui/webui/options/autofill_options_handler.h
@@ -10,9 +10,9 @@
 #include "base/compiler_specific.h"
 #include "base/gtest_prod_util.h"
 #include "base/scoped_observer.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/ui/webui/options/options_ui.h"
 #include "components/autofill/core/browser/personal_data_manager_observer.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/sync_driver/sync_service_observer.h"
 
 namespace autofill {
diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc
index 4ef734b9..199a534 100644
--- a/chrome/browser/ui/webui/options/browser_options_handler.cc
+++ b/chrome/browser/ui/webui/options/browser_options_handler.cc
@@ -50,7 +50,6 @@
 #include "chrome/browser/search_engines/template_url_service_factory.h"
 #include "chrome/browser/signin/easy_unlock_service.h"
 #include "chrome/browser/signin/signin_manager_factory.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/sync/sync_ui_util.h"
 #include "chrome/browser/themes/theme_service.h"
@@ -70,6 +69,7 @@
 #include "chrome/grit/chromium_strings.h"
 #include "chrome/grit/generated_resources.h"
 #include "chrome/grit/locale_settings.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/metrics/metrics_pref_names.h"
 #include "components/policy/core/common/policy_map.h"
 #include "components/policy/core/common/policy_namespace.h"
diff --git a/chrome/browser/ui/webui/options/clear_browser_data_handler.h b/chrome/browser/ui/webui/options/clear_browser_data_handler.h
index 3f08e32..32c9628 100644
--- a/chrome/browser/ui/webui/options/clear_browser_data_handler.h
+++ b/chrome/browser/ui/webui/options/clear_browser_data_handler.h
@@ -9,8 +9,8 @@
 #include "base/prefs/pref_member.h"
 #include "chrome/browser/browsing_data/browsing_data_counter.h"
 #include "chrome/browser/browsing_data/browsing_data_remover.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/ui/webui/options/options_ui.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 
 namespace options {
 
diff --git a/chrome/browser/ui/webui/options/create_profile_handler.cc b/chrome/browser/ui/webui/options/create_profile_handler.cc
index 33f38cf..21d6a535 100644
--- a/chrome/browser/ui/webui/options/create_profile_handler.cc
+++ b/chrome/browser/ui/webui/options/create_profile_handler.cc
@@ -16,11 +16,11 @@
 #include "chrome/browser/profiles/profile_manager.h"
 #include "chrome/browser/profiles/profile_metrics.h"
 #include "chrome/browser/profiles/profiles_state.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/ui/webui/options/options_handlers_helper.h"
 #include "chrome/common/pref_names.h"
 #include "chrome/grit/generated_resources.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "content/public/browser/web_ui.h"
 #include "ui/base/l10n/l10n_util.h"
 
diff --git a/chrome/browser/ui/webui/options/manage_profile_handler.cc b/chrome/browser/ui/webui/options/manage_profile_handler.cc
index e9125964..43e5f87 100644
--- a/chrome/browser/ui/webui/options/manage_profile_handler.cc
+++ b/chrome/browser/ui/webui/options/manage_profile_handler.cc
@@ -25,7 +25,6 @@
 #include "chrome/browser/profiles/profile_window.h"
 #include "chrome/browser/profiles/profiles_state.h"
 #include "chrome/browser/signin/signin_manager_factory.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/ui/browser_finder.h"
 #include "chrome/browser/ui/webui/options/options_handlers_helper.h"
@@ -33,6 +32,7 @@
 #include "chrome/common/url_constants.h"
 #include "chrome/grit/chromium_strings.h"
 #include "chrome/grit/generated_resources.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/signin/core/browser/signin_manager.h"
 #include "components/signin/core/common/profile_management_switches.h"
 #include "content/public/browser/browser_thread.h"
diff --git a/chrome/browser/ui/webui/options/password_manager_handler.cc b/chrome/browser/ui/webui/options/password_manager_handler.cc
index 239cc92..9f77081 100644
--- a/chrome/browser/ui/webui/options/password_manager_handler.cc
+++ b/chrome/browser/ui/webui/options/password_manager_handler.cc
@@ -13,17 +13,14 @@
 #include "base/values.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
-#if defined(OS_WIN) && defined(USE_ASH)
-#include "chrome/browser/ui/ash/ash_util.h"
-#endif
 #include "chrome/common/pref_names.h"
 #include "chrome/common/url_constants.h"
 #include "chrome/grit/generated_resources.h"
 #include "components/autofill/core/common/password_form.h"
-#include <components/password_manager/core/browser/password_ui_utils.h>
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/password_manager/core/browser/password_bubble_experiment.h"
+#include "components/password_manager/core/browser/password_ui_utils.h"
 #include "components/password_manager/core/common/experiments.h"
 #include "components/url_formatter/url_formatter.h"
 #include "content/public/browser/notification_details.h"
@@ -36,6 +33,10 @@
 #include "net/base/net_util.h"
 #include "ui/base/l10n/l10n_util.h"
 
+#if defined(OS_WIN) && defined(USE_ASH)
+#include "chrome/browser/ui/ash/ash_util.h"
+#endif
+
 namespace options {
 
 namespace {
diff --git a/chrome/browser/ui/webui/options/sync_setup_handler.cc b/chrome/browser/ui/webui/options/sync_setup_handler.cc
index 5c9a6179..142ab3c48 100644
--- a/chrome/browser/ui/webui/options/sync_setup_handler.cc
+++ b/chrome/browser/ui/webui/options/sync_setup_handler.cc
@@ -26,7 +26,6 @@
 #include "chrome/browser/signin/signin_error_controller_factory.h"
 #include "chrome/browser/signin/signin_manager_factory.h"
 #include "chrome/browser/signin/signin_promo.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/ui/browser_finder.h"
 #include "chrome/browser/ui/browser_window.h"
@@ -39,6 +38,7 @@
 #include "chrome/grit/chromium_strings.h"
 #include "chrome/grit/generated_resources.h"
 #include "chrome/grit/locale_settings.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/google/core/browser/google_util.h"
 #include "components/signin/core/browser/signin_error_controller.h"
 #include "components/signin/core/browser/signin_header_helper.h"
diff --git a/chrome/browser/ui/webui/settings/sync_handler.cc b/chrome/browser/ui/webui/settings/sync_handler.cc
index 702d649..02a70cb 100644
--- a/chrome/browser/ui/webui/settings/sync_handler.cc
+++ b/chrome/browser/ui/webui/settings/sync_handler.cc
@@ -23,7 +23,6 @@
 #include "chrome/browser/signin/signin_error_controller_factory.h"
 #include "chrome/browser/signin/signin_manager_factory.h"
 #include "chrome/browser/signin/signin_promo.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/ui/browser_finder.h"
 #include "chrome/browser/ui/browser_window.h"
@@ -33,6 +32,7 @@
 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h"
 #include "chrome/common/chrome_switches.h"
 #include "chrome/grit/generated_resources.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/signin/core/browser/signin_error_controller.h"
 #include "components/signin/core/browser/signin_header_helper.h"
 #include "components/signin/core/browser/signin_metrics.h"
diff --git a/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc b/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc
index 5f2c00d..ab035240 100644
--- a/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc
+++ b/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc
@@ -28,7 +28,6 @@
 #include "chrome/browser/signin/signin_error_controller_factory.h"
 #include "chrome/browser/signin/signin_manager_factory.h"
 #include "chrome/browser/signin/signin_promo.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/ui/browser_finder.h"
 #include "chrome/browser/ui/browser_window.h"
@@ -43,6 +42,7 @@
 #include "chrome/common/url_constants.h"
 #include "chrome/grit/chromium_strings.h"
 #include "chrome/grit/generated_resources.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/signin/core/browser/about_signin_internals.h"
 #include "components/signin/core/browser/account_tracker_service.h"
 #include "components/signin/core/browser/profile_oauth2_token_service.h"
diff --git a/chrome/browser/ui/webui/sync_internals_message_handler.cc b/chrome/browser/ui/webui/sync_internals_message_handler.cc
index c6dc05aaa..9adbcc22 100644
--- a/chrome/browser/ui/webui/sync_internals_message_handler.cc
+++ b/chrome/browser/ui/webui/sync_internals_message_handler.cc
@@ -8,9 +8,9 @@
 
 #include "base/logging.h"
 #include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/sync/profile_sync_service.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/common/channel_info.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 #include "components/sync_driver/about_sync_util.h"
 #include "components/sync_driver/about_sync_util.h"
 #include "content/public/browser/browser_thread.h"
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index 3855ee3..7c2fe9e 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -2890,8 +2890,6 @@
       'browser/sync/glue/synced_window_delegates_getter_android.h',
       'browser/sync/profile_sync_components_factory_impl.cc',
       'browser/sync/profile_sync_components_factory_impl.h',
-      'browser/sync/profile_sync_service.cc',
-      'browser/sync/profile_sync_service.h',
       'browser/sync/profile_sync_service_android.cc',
       'browser/sync/profile_sync_service_android.h',
       'browser/sync/profile_sync_service_factory.cc',
@@ -2902,7 +2900,6 @@
       'browser/sync/supervised_user_signin_manager_wrapper.h',
       'browser/sync/sync_startup_tracker.cc',
       'browser/sync/sync_startup_tracker.h',
-      'browser/sync/sync_type_preference_provider.h',
     ],
     'chrome_browser_task_manager_sources': [
       # Stats collection for CAPS (uses old task manager):
@@ -3068,6 +3065,7 @@
         '../components/components.gyp:autofill_core_browser',
         '../components/components.gyp:bookmarks_browser',
         '../components/components.gyp:bookmarks_managed',
+        '../components/components.gyp:browser_sync_browser',
         '../components/components.gyp:browser_sync_common',
         '../components/components.gyp:captive_portal',
         '../components/components.gyp:cloud_devices_common',
diff --git a/chrome/test/data/pdf/toolbar_manager_test.js b/chrome/test/data/pdf/toolbar_manager_test.js
index 7055479..f946198 100644
--- a/chrome/test/data/pdf/toolbar_manager_test.js
+++ b/chrome/test/data/pdf/toolbar_manager_test.js
@@ -126,18 +126,19 @@
     toolbarManager.showToolbarsForKeyboardNavigation();
     chrome.test.assertTrue(toolbar.opened);
     mockWindow.runTimeout();
-    chrome.test.assertTrue(toolbar.opened);
+    chrome.test.assertTrue(
+        toolbar.opened, 'toolbar stays open after keyboard navigation');
 
     // Hit escape -> Toolbars close.
     toolbarManager.hideSingleToolbarLayer();
-    chrome.test.assertFalse(toolbar.opened);
+    chrome.test.assertFalse(toolbar.opened, 'toolbars close on escape key');
 
     // Show toolbars, use mouse, run timeout -> Toolbars close.
     toolbarManager.showToolbarsForKeyboardNavigation();
     mouseMove(200, 200, 800, 800, 5);
     chrome.test.assertTrue(toolbar.opened);
     mockWindow.runTimeout();
-    chrome.test.assertFalse(toolbar.opened);
+    chrome.test.assertFalse(toolbar.opened, 'toolbars close after mouse move');
 
     chrome.test.succeed();
   },
diff --git a/chromeos/CHROMEOS_LKGM b/chromeos/CHROMEOS_LKGM
index 03056240..2b42eb8 100644
--- a/chromeos/CHROMEOS_LKGM
+++ b/chromeos/CHROMEOS_LKGM
@@ -1 +1 @@
-7621.0.0
\ No newline at end of file
+7624.0.0
\ No newline at end of file
diff --git a/components/browser_sync.gypi b/components/browser_sync.gypi
index c10ce0d..104db10 100644
--- a/components/browser_sync.gypi
+++ b/components/browser_sync.gypi
@@ -5,6 +5,39 @@
 {
   'targets': [
     {
+      # GN version: //components/browser_sync_browser
+      'target_name': 'browser_sync_browser',
+      'type': 'static_library',
+      'dependencies': [
+        '../base/base.gyp:base',
+        '../google_apis/google_apis.gyp:google_apis',
+        '../net/net.gyp:net',
+        '../sync/sync.gyp:sync',
+        '../ui/base/ui_base.gyp:ui_base',
+        'autofill_core_common',
+        'browser_sync_common',
+        'components_strings.gyp:components_strings',
+        'history_core_browser',
+        'invalidation_impl',
+        'invalidation_public',
+        'keyed_service_core',
+        'pref_registry',
+        'signin_core_browser',
+        'syncable_prefs',
+        'sync_driver',
+        'sync_sessions',
+        'version_info',
+      ],
+      'include_dirs': [
+        '..',
+      ],
+      'sources': [
+        # Note: file list duplicated in GN build.
+        'browser_sync/browser/profile_sync_service.cc',
+        'browser_sync/browser/profile_sync_service.h',
+      ],
+    },
+    {
       # GN version: //components/browser_sync_common
       'target_name': 'browser_sync_common',
       'type': 'static_library',
diff --git a/components/browser_sync/browser/BUILD.gn b/components/browser_sync/browser/BUILD.gn
new file mode 100644
index 0000000..fa0add6c
--- /dev/null
+++ b/components/browser_sync/browser/BUILD.gn
@@ -0,0 +1,32 @@
+# Copyright 2015 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/features.gni")
+
+source_set("browser") {
+  sources = [
+    "profile_sync_service.cc",
+    "profile_sync_service.h",
+  ]
+
+  deps = [
+    "//base",
+    "//base:prefs",
+    "//components/history/core/browser",
+    "//components/invalidation/impl",
+    "//components/invalidation/public",
+    "//components/keyed_service/core",
+    "//components/pref_registry",
+    "//components/signin/core/browser",
+    "//components/strings",
+    "//components/syncable_prefs",
+    "//components/sync_driver",
+    "//components/sync_sessions",
+    "//components/version_info",
+    "//google_apis",
+    "//net",
+    "//sync",
+    "//ui/base",
+  ]
+}
diff --git a/components/browser_sync/browser/DEPS b/components/browser_sync/browser/DEPS
new file mode 100644
index 0000000..4cb7215
--- /dev/null
+++ b/components/browser_sync/browser/DEPS
@@ -0,0 +1,17 @@
+include_rules = [
+  "+components/autofill/core/common",
+  "+components/history/core/browser",
+  "+components/invalidation",
+  "+components/keyed_service/core",
+  "+components/pref_registry",
+  "+components/signin/core/browser",
+  "+components/syncable_prefs",
+  "+components/sync_driver",
+  "+components/sync_sessions",
+  "+components/strings",
+  "+components/version_info",
+  "+google_apis",
+  "+net",
+  "+sync",
+  "+ui/base/l10n",
+]
diff --git a/chrome/browser/sync/profile_sync_service.cc b/components/browser_sync/browser/profile_sync_service.cc
similarity index 99%
rename from chrome/browser/sync/profile_sync_service.cc
rename to components/browser_sync/browser/profile_sync_service.cc
index e574bf9a..f24df73a 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/components/browser_sync/browser/profile_sync_service.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 "chrome/browser/sync/profile_sync_service.h"
+#include "components/browser_sync/browser/profile_sync_service.h"
 
 #include <cstddef>
 #include <map>
@@ -27,7 +27,6 @@
 #include "base/threading/thread_restrictions.h"
 #include "base/time/time.h"
 #include "build/build_config.h"
-#include "chrome/browser/sync/sync_type_preference_provider.h"
 #include "components/autofill/core/common/autofill_pref_names.h"
 #include "components/browser_sync/common/browser_sync_switches.h"
 #include "components/history/core/browser/typed_url_data_type_controller.h"
@@ -53,6 +52,7 @@
 #include "components/sync_driver/sync_driver_switches.h"
 #include "components/sync_driver/sync_error_controller.h"
 #include "components/sync_driver/sync_stopped_reporter.h"
+#include "components/sync_driver/sync_type_preference_provider.h"
 #include "components/sync_driver/sync_util.h"
 #include "components/sync_driver/system_encryptor.h"
 #include "components/sync_driver/user_selectable_sync_type.h"
diff --git a/chrome/browser/sync/profile_sync_service.h b/components/browser_sync/browser/profile_sync_service.h
similarity index 99%
rename from chrome/browser/sync/profile_sync_service.h
rename to components/browser_sync/browser/profile_sync_service.h
index 67e91aa4..9909a29 100644
--- a/chrome/browser/sync/profile_sync_service.h
+++ b/components/browser_sync/browser/profile_sync_service.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 CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_
-#define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_
+#ifndef COMPONENTS_BROWSER_SYNC_BROWSER_PROFILE_SYNC_SERVICE_H_
+#define COMPONENTS_BROWSER_SYNC_BROWSER_PROFILE_SYNC_SERVICE_H_
 
 #include <set>
 #include <string>
@@ -1013,4 +1013,4 @@
     const syncer::SyncProtocolError& error);
 
 
-#endif  // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_
+#endif  // COMPONENTS_BROWSER_SYNC_BROWSER_PROFILE_SYNC_SERVICE_H_
diff --git a/components/sync_driver.gypi b/components/sync_driver.gypi
index 2a326d2..9df6a18 100644
--- a/components/sync_driver.gypi
+++ b/components/sync_driver.gypi
@@ -137,6 +137,7 @@
         'sync_driver/sync_service_utils.h',
         'sync_driver/sync_stopped_reporter.cc',
         'sync_driver/sync_stopped_reporter.h',
+        'sync_driver/sync_type_preference_provider.h',
         'sync_driver/sync_util.cc',
         'sync_driver/sync_util.h',
         'sync_driver/system_encryptor.cc',
diff --git a/components/sync_driver/BUILD.gn b/components/sync_driver/BUILD.gn
index da46e626..23c8cb9 100644
--- a/components/sync_driver/BUILD.gn
+++ b/components/sync_driver/BUILD.gn
@@ -117,6 +117,7 @@
     "sync_service_utils.h",
     "sync_stopped_reporter.cc",
     "sync_stopped_reporter.h",
+    "sync_type_preference_provider.h",
     "sync_util.cc",
     "sync_util.h",
     "system_encryptor.cc",
diff --git a/chrome/browser/sync/sync_type_preference_provider.h b/components/sync_driver/sync_type_preference_provider.h
similarity index 66%
rename from chrome/browser/sync/sync_type_preference_provider.h
rename to components/sync_driver/sync_type_preference_provider.h
index a38591f..14308cd 100644
--- a/chrome/browser/sync/sync_type_preference_provider.h
+++ b/components/sync_driver/sync_type_preference_provider.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 CHROME_BROWSER_SYNC_SYNC_TYPE_PREFERENCE_PROVIDER_H_
-#define CHROME_BROWSER_SYNC_SYNC_TYPE_PREFERENCE_PROVIDER_H_
+#ifndef COMPONENTS_SYNC_DRIVER_SYNC_TYPE_PREFERENCE_PROVIDER_H_
+#define COMPONENTS_SYNC_DRIVER_SYNC_TYPE_PREFERENCE_PROVIDER_H_
 
 #include "sync/internal_api/public/base/model_type.h"
 
@@ -15,4 +15,4 @@
   virtual ~SyncTypePreferenceProvider() {}
 };
 
-#endif  // CHROME_BROWSER_SYNC_SYNC_TYPE_PREFERENCE_PROVIDER_H_
+#endif  // COMPONENTS_SYNC_DRIVER_SYNC_TYPE_PREFERENCE_PROVIDER_H_
diff --git a/content/common/gpu/media/h264_decoder.cc b/content/common/gpu/media/h264_decoder.cc
index 6caedb5..35e9681b 100644
--- a/content/common/gpu/media/h264_decoder.cc
+++ b/content/common/gpu/media/h264_decoder.cc
@@ -1392,6 +1392,17 @@
         break;
       }
 
+      case media::H264NALU::kAUD:
+      case media::H264NALU::kEOSeq:
+      case media::H264NALU::kEOStream:
+        if (state_ != kDecoding)
+          break;
+
+        if (!FinishPrevFrameIfPresent())
+          SET_ERROR_AND_RETURN();
+
+        break;
+
       default:
         DVLOG(4) << "Skipping NALU type: " << curr_nalu_->nal_unit_type;
         break;
diff --git a/content/common/gpu/media/video_encode_accelerator_unittest.cc b/content/common/gpu/media/video_encode_accelerator_unittest.cc
index e22bd429..1775614 100644
--- a/content/common/gpu/media/video_encode_accelerator_unittest.cc
+++ b/content/common/gpu/media/video_encode_accelerator_unittest.cc
@@ -98,8 +98,9 @@
 // The syntax of multiple test streams is:
 //  test-stream1;test-stream2;test-stream3
 // The syntax of each test stream is:
-// "in_filename:width:height:out_filename:requested_bitrate:requested_framerate
-//  :requested_subsequent_bitrate:requested_subsequent_framerate"
+// "in_filename:width:height:profile:out_filename:requested_bitrate
+//  :requested_framerate:requested_subsequent_bitrate
+//  :requested_subsequent_framerate"
 // - |in_filename| must be an I420 (YUV planar) raw stream
 //   (see http://www.fourcc.org/yuv.php#IYUV).
 // - |width| and |height| are in pixels.
diff --git a/third_party/WebKit/LayoutTests/editing/input/reveal-contenteditable-on-input-vertically.html b/third_party/WebKit/LayoutTests/editing/input/reveal-contenteditable-on-input-vertically.html
index d2339e40..fe0dd03 100644
--- a/third_party/WebKit/LayoutTests/editing/input/reveal-contenteditable-on-input-vertically.html
+++ b/third_party/WebKit/LayoutTests/editing/input/reveal-contenteditable-on-input-vertically.html
@@ -18,6 +18,8 @@
 
 if (window.testRunner)
     testRunner.dumpAsText();
+if (window.internals)
+    internals.settings.setScrollAnimatorEnabled(false);
 performVerticalScrollingInputTest();
 assertInputIsInTheMiddleOfViewport();
 
diff --git a/third_party/WebKit/LayoutTests/editing/input/reveal-edit-on-input-vertically.html b/third_party/WebKit/LayoutTests/editing/input/reveal-edit-on-input-vertically.html
index 34f140b..f5c461dd 100644
--- a/third_party/WebKit/LayoutTests/editing/input/reveal-edit-on-input-vertically.html
+++ b/third_party/WebKit/LayoutTests/editing/input/reveal-edit-on-input-vertically.html
@@ -18,6 +18,8 @@
 
 if (window.testRunner)
     testRunner.dumpAsText();
+if (window.internals)
+    internals.settings.setScrollAnimatorEnabled(false);
 performVerticalScrollingInputTest();
 assertInputIsInTheMiddleOfViewport();
 
diff --git a/third_party/WebKit/LayoutTests/fast/dom/vertical-scrollbar-in-rtl-expected.txt b/third_party/WebKit/LayoutTests/fast/dom/vertical-scrollbar-in-rtl-expected.txt
index 917a494..cb62a63 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/vertical-scrollbar-in-rtl-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/dom/vertical-scrollbar-in-rtl-expected.txt
@@ -3,6 +3,10 @@
 continuously call window.scrollY : Success
 zoom in and out preserve scroll position: Success
 resize preserves scroll position: Success
-KeyDown HOME move y-scroll position to bottom for RTL page: -3425
-KeyDown END move y-scroll position to bottom for RTL page: 0
+PASS window.scrollY == -3425 became true
+PASS window.scrollY == 0 became true
 selectAll selects all document: Success
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/third_party/WebKit/LayoutTests/fast/dom/vertical-scrollbar-in-rtl.html b/third_party/WebKit/LayoutTests/fast/dom/vertical-scrollbar-in-rtl.html
index 3134f59..afcff036 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/vertical-scrollbar-in-rtl.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/vertical-scrollbar-in-rtl.html
@@ -1,6 +1,9 @@
 <html dir=rtl style="-webkit-writing-mode:vertical-lr">
     <head>
+        <script src="../../resources/js-test.js"></script>
         <script language="javascript">
+            window.jsTestIsAsync = true;
+
             function log(str)
             {
                 var li = document.createElement("li");
@@ -8,24 +11,24 @@
                 var console = document.getElementById("console");
                 console.appendChild(li);
             }
-            
+
             function assertEqual(message, actual, expected)
             {
                 if (actual != expected)
-                    log("\n" + message + ": Failure, actual: " + actual + "; expected: " + expected);
+                    log(message + ": Failure, actual: " + actual + "; expected: " + expected);
                 else
-                    log("\n" + message + ": Success");
+                    log(message + ": Success");
             }
-            
+
             function assertClose(message, actual, expected)
             {
                 if ((actual >= expected && actual - expected < 5) ||
                     (expected >= actual && expected - actual < 5))
-                    log("\n" + message + ": Success");
+                    log(message + ": Success");
                 else
-                    log("\n" + message + ": Failure, actual: " + actual + "; expected: " + expected);
+                    log(message + ": Failure, actual: " + actual + "; expected: " + expected);
             }
-            
+
             var expectedScrollX = 500;
             var expectedScrollY = -1000;
 
@@ -36,13 +39,13 @@
 
                 // Test vertical scrollbar presence and that it is initially at the bottom for RTL page.
                 assertEqual("original scroll y for RTL page ", window.scrollY, 0);
-            
+
                 // Test horizontal scroll.
                 window.scrollTo(expectedScrollX, expectedScrollY);
                 assertEqual("vertical scroll: ", window.scrollY, expectedScrollY);
                 // Test calling window.scrollY continuously wont change the scrollY position.
                 assertEqual("continuously call window.scrollY ", window.scrollY, expectedScrollY);
-            
+
 
                 // Test zooming wont reset scroll position.
                 if (window.eventSender) {
@@ -51,36 +54,44 @@
                     eventSender.zoomPageOut();
                     assertClose("zoom in and out preserve scroll position", window.scrollY, expectedScrollY);
                 }
-               
+
                 // Test resize wont reset scroll position.
                 window.resizeTo(window.innerWidth, 1000);
                 window.scrollTo(expectedScrollX, expectedScrollY);
                 window.resizeTo(window.innerWidth, 2000);
                 assertEqual("resize preserves scroll position", window.scrollY, expectedScrollY);
-                
+
                 // Test HOME/END operation.
                 if (window.eventSender) {
-                    // Not using assert equal here since the behavior is different in each port. 
-                    // For example, in Mac, HOME/END key reset both x and y scroll position. 
+                    // Not using assert equal here since the behavior is different in each port.
+                    // For example, in Mac, HOME/END key reset both x and y scroll position.
                     // In Chromium, HOME/END key only reset y scroll position, and x scroll position is preserved.
-                    window.scrollTo(expectedScrollX, expectedScrollY);
-                    eventSender.keyDown("home");
-                    log("KeyDown HOME move y-scroll position to bottom for RTL page: " + window.scrollY, 0);
-                    window.scrollTo(expectedScrollX, expectedScrollY);
-                    eventSender.keyDown("end");
-                    log("KeyDown END move y-scroll position to bottom for RTL page: " + window.scrollY, 0);
+                    function testEnd() {
+                        window.scrollTo(expectedScrollX, expectedScrollY);
+                        eventSender.keyDown("end");
+                        shouldBecomeEqual('window.scrollY == 0', 'true', testSelectAll);
+                    }
+                    function testHome() {
+                        window.scrollTo(expectedScrollX, expectedScrollY);
+                        eventSender.keyDown("home");
+                        shouldBecomeEqual('window.scrollY == -3425', 'true', testEnd);
+                    }
+                    testHome();
                 }
-            
-                // Test select all selects all document content.
-                window.resizeTo(500, 500);
-                var div = document.getElementById("div");
-                div.focus();
-                document.execCommand("SelectAll");
-                var selection = window.getSelection();
-                assertEqual("selectAll selects all document", selection.toString().substring(0, div.innerHTML.length), div.innerHTML);
 
-                div.style.display = "none";
-               
+                function testSelectAll() {
+                    // Test select all selects all document content.
+                    window.resizeTo(500, 500);
+                    var div = document.getElementById("div");
+                    div.focus();
+                    document.execCommand("SelectAll");
+                    var selection = window.getSelection();
+                    assertEqual("selectAll selects all document", selection.toString().substring(0, div.innerHTML.length), div.innerHTML);
+
+                    div.style.display = "none";
+
+                    finishJSTest();
+                }
             }
         </script>
     </head>
diff --git a/third_party/WebKit/LayoutTests/fast/events/continuous-platform-wheelevent-in-scrolling-div-expected.txt b/third_party/WebKit/LayoutTests/fast/events/continuous-platform-wheelevent-in-scrolling-div-expected.txt
index 76662f26..61fd4332 100644
--- a/third_party/WebKit/LayoutTests/fast/events/continuous-platform-wheelevent-in-scrolling-div-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/events/continuous-platform-wheelevent-in-scrolling-div-expected.txt
@@ -1,9 +1,8 @@
-PASS successfullyParsed is true
-
-TEST COMPLETE
 PASS event.wheelDeltaY is window.expectedScrollTop*-3
 PASS event.wheelDeltaX is window.expectedScrollLeft*-3
 PASS event.wheelDelta is window.expectedScrollTop*-3
-PASS div.scrollTop is window.expectedScrollTop
-PASS div.scrollLeft is window.expectedScrollLeft
+PASS div.scrollTop == window.expectedScrollTop && div.scrollLeft == window.expectedScrollLeft became true
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
diff --git a/third_party/WebKit/LayoutTests/fast/events/continuous-platform-wheelevent-in-scrolling-div.html b/third_party/WebKit/LayoutTests/fast/events/continuous-platform-wheelevent-in-scrolling-div.html
index 809c51e..05ce7fb8 100644
--- a/third_party/WebKit/LayoutTests/fast/events/continuous-platform-wheelevent-in-scrolling-div.html
+++ b/third_party/WebKit/LayoutTests/fast/events/continuous-platform-wheelevent-in-scrolling-div.html
@@ -2,16 +2,13 @@
     <head>
         <script src="../../resources/js-test.js"></script>
         <script>
+            window.jsTestIsAsync = true;
             var expectedScrollTop = 200;
             var expectedScrollLeft = 100;
             var event;
             var div;
 
-            if (window.testRunner) {
-                testRunner.waitUntilDone();
-            }
-
-            function dispatchWheelEvent()
+            function runTest()
             {
                 var overflowElement = document.getElementById("overflow");
                 if (overflowElement)
@@ -22,17 +19,9 @@
                     eventSender.continuousMouseScrollBy(-window.expectedScrollLeft, -window.expectedScrollTop);
                 }
 
-                setTimeout('checkOffsets();', 100);
-            }
-
-            function checkOffsets()
-            {
                 div = document.getElementById("overflow");
-                shouldBe("div.scrollTop", "window.expectedScrollTop");
-                shouldBe("div.scrollLeft", "window.expectedScrollLeft");
-
-                if (window.testRunner)
-                    window.testRunner.notifyDone();
+                shouldBecomeEqual("div.scrollTop == window.expectedScrollTop && " +
+                    "div.scrollLeft == window.expectedScrollLeft", "true", finishJSTest);
             }
 
             function mousewheelHandler(e)
@@ -49,7 +38,7 @@
         </script>
     </head>
 
-    <body style="margin:0" onload="setTimeout('dispatchWheelEvent();', 100)">
+    <body style="margin:0" onload="runTest()">
         <div id="overflow" style="border:2px solid black;overflow:auto;height:200px;width:200px;">
             <div style="background-color:red;height:200px;width:400px;"></div>
             <div style="background-color:green;height:200px;width:400px;"></div>
diff --git a/third_party/WebKit/LayoutTests/fast/events/gesture-pinch-zoom-scroll-bubble-expected.txt b/third_party/WebKit/LayoutTests/fast/events/gesture-pinch-zoom-scroll-bubble-expected.txt
index a0bef355..fb03ece 100644
--- a/third_party/WebKit/LayoutTests/fast/events/gesture-pinch-zoom-scroll-bubble-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/events/gesture-pinch-zoom-scroll-bubble-expected.txt
@@ -2,12 +2,9 @@
 PASS internals.visualViewportHeight() is 300
 PASS internals.visualViewportScrollX() is 200
 PASS internals.visualViewportScrollY() is 300
-PASS internals.visualViewportScrollX() is 200
-PASS internals.visualViewportScrollY() is 301
-PASS internals.visualViewportScrollX() is 201
-PASS internals.visualViewportScrollY() is 301
-PASS internals.visualViewportScrollX() is 199
-PASS internals.visualViewportScrollY() is 299
+PASS internals.visualViewportScrollX() == 200 && internals.visualViewportScrollY() == 301 became true
+PASS internals.visualViewportScrollX() == 201 && internals.visualViewportScrollY() == 301 became true
+PASS internals.visualViewportScrollX() == 199 && internals.visualViewportScrollY() == 299 became true
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/fast/events/gesture-pinch-zoom-scroll-bubble.html b/third_party/WebKit/LayoutTests/fast/events/gesture-pinch-zoom-scroll-bubble.html
index af16fd7e9..2cb634ac 100644
--- a/third_party/WebKit/LayoutTests/fast/events/gesture-pinch-zoom-scroll-bubble.html
+++ b/third_party/WebKit/LayoutTests/fast/events/gesture-pinch-zoom-scroll-bubble.html
@@ -2,6 +2,32 @@
 <script src="../../resources/js-test.js"></script>
 <div style="margin: 0px 0; width: 100px; height: 1000px; background-color: blue;"></div>
 <script>
+window.jsTestIsAsync = true;
+
+function testVerticalScroll() {
+  // Do a purely vertical scroll. This will scroll contents only.
+  eventSender.continuousMouseScrollBy(0, -1);
+  shouldBecomeEqual('internals.visualViewportScrollX() == 200 && ' +
+    'internals.visualViewportScrollY() == 301', 'true', testHorizontalScroll);
+}
+
+function testHorizontalScroll() {
+  // Do a purely horizontal scroll. This will change pinch virtual viewport
+  // offset only.
+  eventSender.continuousMouseScrollBy(-1, 0);
+  shouldBecomeEqual('internals.visualViewportScrollX() == 201 && ' +
+    'internals.visualViewportScrollY() == 301', 'true', testDiagonalScroll);
+}
+
+function testDiagonalScroll() {
+  // Do a diagonal scroll. This will scroll the contents, and then bubble the
+  // result up to the visual viewport, where it will change the pinch
+  // virtual viewport offset.
+  eventSender.continuousMouseScrollBy(2, 2);
+  shouldBecomeEqual('internals.visualViewportScrollX() == 199 && ' +
+    'internals.visualViewportScrollY() == 299', 'true', finishJSTest);
+}
+
 // TODO: This test just verifies that scrollX and scrollY end up with the right
 // values after a scroll. It does not verify whether these values are coming
 // from content scroll or from viewport moving. This should be added.
@@ -15,22 +41,9 @@
   shouldBe('internals.visualViewportScrollX()', '200');
   shouldBe('internals.visualViewportScrollY()', '300');
 
-  // Do a purely vertical scroll. This will scroll contents only.
-  eventSender.continuousMouseScrollBy(0, -1);
-  shouldBe('internals.visualViewportScrollX()', '200');
-  shouldBe('internals.visualViewportScrollY()', '301');
-
-  // Do a purely horizontal scroll. This will change pinch virtual viewport
-  // offset only.
-  eventSender.continuousMouseScrollBy(-1, 0);
-  shouldBe('internals.visualViewportScrollX()', '201');
-  shouldBe('internals.visualViewportScrollY()', '301');
-
-  // Do a diagonal scroll. This will scroll the contents, and then bubble the
-  // result up to the visual viewport, where it will change the pinch
-  // virtual viewport offset.
-  eventSender.continuousMouseScrollBy(2, 2);
-  shouldBe('internals.visualViewportScrollX()', '199');
-  shouldBe('internals.visualViewportScrollY()', '299');
+  testVerticalScroll();
+} else {
+  testFailed("This test requires the event sender and internals");
+  finishJSTest();
 }
 </script>
diff --git a/third_party/WebKit/LayoutTests/fast/events/node-event-anchor-lock.html b/third_party/WebKit/LayoutTests/fast/events/node-event-anchor-lock.html
index 47fab0d..4920cae 100644
--- a/third_party/WebKit/LayoutTests/fast/events/node-event-anchor-lock.html
+++ b/third_party/WebKit/LayoutTests/fast/events/node-event-anchor-lock.html
@@ -17,13 +17,17 @@
     testRunner.waitUntilDone();
 }
 
+if (window.internals) {
+    internals.settings.setScrollAnimatorEnabled(false);
+}
+
 if (window.eventSender) {
     // Lock to the anchor inside the div
     var target = document.getElementById("startLink");
     eventSender.mouseMoveTo(target.offsetLeft + 2, target.offsetTop + 2);
     eventSender.mouseDown();
     eventSender.mouseUp();
- 
+
     // Perform a page down to be handled by div, should release anchor lock
     var divInfo = document.getElementById("parentDiv");
     eventSender.mouseMoveTo(divInfo.offsetLeft + 2, divInfo.offsetTop + 2);
diff --git a/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-in-scrolling-div-expected.txt b/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-in-scrolling-div-expected.txt
index d8e049f..86c25fa 100644
--- a/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-in-scrolling-div-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-in-scrolling-div-expected.txt
@@ -1,9 +1,8 @@
-PASS successfullyParsed is true
-
-TEST COMPLETE
 PASS event.wheelDeltaY is window.expectedScrollTop*-120
 PASS event.wheelDeltaX is window.expectedScrollLeft*-120
 PASS event.wheelDelta is window.expectedScrollTop*-120
-PASS div.scrollTop is window.expectedScrollTop*window.pixelsPerWheelTick
-PASS div.scrollLeft is window.expectedScrollLeft*window.pixelsPerWheelTick
+PASS div.scrollTop == expectedScrollTop*40 && div.scrollLeft == expectedScrollLeft*40 became true
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
diff --git a/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-in-scrolling-div.html b/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-in-scrolling-div.html
index f2a8a624..82aee84 100644
--- a/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-in-scrolling-div.html
+++ b/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-in-scrolling-div.html
@@ -2,16 +2,13 @@
     <head>
         <script src="../../resources/js-test.js"></script>
         <script>
+            window.jsTestIsAsync = true;
             var expectedScrollTop = 5;
             var expectedScrollLeft = 3;
-            var pixelsPerWheelTick = 40;
             var event;
             var div;
 
-            if (window.testRunner)
-                testRunner.waitUntilDone();
-
-            function dispatchWheelEvent()
+            function runTest()
             {
                 var overflowElement = document.getElementById("overflow");
                 if (overflowElement)
@@ -22,17 +19,10 @@
                     eventSender.mouseScrollBy(-window.expectedScrollLeft, -window.expectedScrollTop);
                 }
 
-                setTimeout('checkOffsets();', 100);
-            }
-
-            function checkOffsets()
-            {
                 div = document.getElementById("overflow");
-                shouldBe("div.scrollTop", "window.expectedScrollTop*window.pixelsPerWheelTick");
-                shouldBe("div.scrollLeft", "window.expectedScrollLeft*window.pixelsPerWheelTick");
-
-                if (window.testRunner)
-                    window.testRunner.notifyDone();
+                // Note that there are 40 pixels per wheel tick.
+                shouldBecomeEqual("div.scrollTop == expectedScrollTop*40 && " +
+                    "div.scrollLeft == expectedScrollLeft*40", "true", finishJSTest);
             }
 
             function mousewheelHandler(e)
@@ -49,7 +39,7 @@
         </script>
     </head>
 
-    <body style="margin:0" onload="setTimeout('dispatchWheelEvent();', 100)">
+    <body style="margin:0" onload="runTest()">
         <div id="overflow" style="border:2px solid black;overflow:auto;height:200px;width:200px;">
             <div style="background-color:red;height:200px;width:400px;"></div>
             <div style="background-color:green;height:200px;width:400px;"></div>
diff --git a/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-x-in-scrolling-div-expected.txt b/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-x-in-scrolling-div-expected.txt
index 80e39b70..64f34ec 100644
--- a/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-x-in-scrolling-div-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-x-in-scrolling-div-expected.txt
@@ -1,9 +1,8 @@
-PASS successfullyParsed is true
-
-TEST COMPLETE
 PASS event.wheelDeltaY is 0
 PASS event.wheelDeltaX is window.givenScrollLeft * -3
 PASS event.wheelDelta is window.givenScrollLeft * -3
-PASS div.scrollTop is window.expectedScrollTop
-PASS div.scrollLeft is window.expectedScrollLeft
+PASS div.scrollTop == window.expectedScrollTop && div.scrollLeft == window.expectedScrollLeft became true
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
diff --git a/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-x-in-scrolling-div.html b/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-x-in-scrolling-div.html
index eb5aae9a..9c7fd46 100644
--- a/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-x-in-scrolling-div.html
+++ b/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-x-in-scrolling-div.html
@@ -2,6 +2,7 @@
     <head>
         <script src="../../resources/js-test.js"></script>
         <script>
+            window.jsTestIsAsync = true;
             var givenScrollTop = 0;
             var givenScrollLeft = 2;
             var expectedScrollTop = 0;
@@ -9,10 +10,7 @@
             var event;
             var div;
 
-            if (window.testRunner)
-                testRunner.waitUntilDone();
-
-            function dispatchWheelEvent()
+            function runTest()
             {
                 var overflowElement = document.getElementById("overflow");
                 if (overflowElement)
@@ -23,17 +21,9 @@
                     eventSender.continuousMouseScrollBy(-window.givenScrollLeft, -window.givenScrollTop, true);
                 }
 
-                setTimeout('checkOffsets();', 100);
-            }
-
-            function checkOffsets()
-            {
                 div = document.getElementById("overflow");
-                shouldBe("div.scrollTop", "window.expectedScrollTop");
-                shouldBe("div.scrollLeft", "window.expectedScrollLeft");
-
-                if (window.testRunner)
-                    window.testRunner.notifyDone();
+                shouldBecomeEqual("div.scrollTop == window.expectedScrollTop && " +
+                    "div.scrollLeft == window.expectedScrollLeft", "true", finishJSTest);
             }
 
             function mousewheelHandler(e)
@@ -50,7 +40,7 @@
         </script>
     </head>
 
-    <body style="margin:0" onload="setTimeout('dispatchWheelEvent();', 100)">
+    <body style="margin:0" onload="runTest()">
          <!-- This div is 200 pixels high. The content results in scrool bars on
           both edges, resulting in an effective content area of 185 x 185 on
           linux. The paging context overlap is 24 pixels. So one page of scroll
diff --git a/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-x-in-scrolling-page.html b/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-x-in-scrolling-page.html
index ced4f392..f6cc300 100644
--- a/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-x-in-scrolling-page.html
+++ b/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-x-in-scrolling-page.html
@@ -2,6 +2,7 @@
     <head>
         <script src="../../resources/js-test.js"></script>
         <script>
+            window.jsTestIsAsync = true;
             var givenScrollTop = 0;
             var givenScrollLeft = 2; // When paging, this is ignored. Every event is one page.
             var expectedScrollTop = 0;
@@ -9,11 +10,7 @@
             var event;
             var div;
 
-            window.jsTestIsAsync = true;
-            if (window.testRunner)
-                testRunner.waitUntilDone();
-
-            function dispatchWheelEvent()
+            function runTest()
             {
                 document.body.addEventListener("mousewheel", mousewheelHandler, false);
 
@@ -22,14 +19,9 @@
                     eventSender.continuousMouseScrollBy(-window.givenScrollLeft, -window.givenScrollTop, true);
                 }
 
-                setTimeout('checkOffsets();', 100);
-            }
-
-            function checkOffsets()
-            {
-                shouldBe("document.scrollingElement.scrollTop", "window.expectedScrollTop");
-                shouldBe("document.scrollingElement.scrollLeft", "window.expectedScrollLeft");
-                finishJSTest();
+                // This test expects failure on mac: crbug.com/552694.
+                shouldBecomeEqual("document.scrollingElement.scrollTop == window.expectedScrollTop && " +
+                    "document.scrollingElement.scrollLeft == window.expectedScrollLeft", "true", finishJSTest);
             }
 
             function mousewheelHandler(e)
@@ -46,7 +38,7 @@
         </script>
     </head>
 
-    <body style="margin:0;padding:0" onload="setTimeout('dispatchWheelEvent();', 100)">
+    <body style="margin:0;padding:0" onload="runTest()">
         <div style="margin:0;padding:0;height:200px;width:2400px">
           <div style="margin:0;padding:0;background-color:red;height:200px;width:1200px;position:relative;left:0px;top:0px"></div>
           <div style="margin:0;padding:0;background-color:green;height:200px;width:1200px;position:relative;left:1200px;top:-200px"></div>
diff --git a/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-div-expected.txt b/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-div-expected.txt
index 0ff12508..65fea26a 100644
--- a/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-div-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-div-expected.txt
@@ -1,9 +1,8 @@
-PASS successfullyParsed is true
-
-TEST COMPLETE
 PASS event.wheelDeltaY is window.givenScrollTop * -3
 PASS event.wheelDeltaX is window.givenScrollLeft * -3
 PASS event.wheelDelta is window.givenScrollTop * -3
-PASS div.scrollTop is window.expectedScrollTop
-PASS div.scrollLeft is window.expectedScrollLeft
+PASS div.scrollTop == window.expectedScrollTop && div.scrollLeft == window.expectedScrollLeft became true
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
diff --git a/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-div.html b/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-div.html
index c98c221e..ad14733 100644
--- a/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-div.html
+++ b/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-div.html
@@ -2,6 +2,7 @@
     <head>
         <script src="../../resources/js-test.js"></script>
         <script>
+            window.jsTestIsAsync = true;
             var givenScrollTop = 1;
             var givenScrollLeft = 2;
             var expectedScrollTop = 161;
@@ -9,10 +10,7 @@
             var event;
             var div;
 
-            if (window.testRunner)
-                testRunner.waitUntilDone();
-
-            function dispatchWheelEvent()
+            function runTest()
             {
                 var overflowElement = document.getElementById("overflow");
                 if (overflowElement)
@@ -23,17 +21,9 @@
                     eventSender.continuousMouseScrollBy(-window.givenScrollLeft, -window.givenScrollTop, true);
                 }
 
-                setTimeout('checkOffsets();', 100);
-            }
-
-            function checkOffsets()
-            {
                 div = document.getElementById("overflow");
-                shouldBe("div.scrollTop", "window.expectedScrollTop");
-                shouldBe("div.scrollLeft", "window.expectedScrollLeft");
-
-                if (window.testRunner)
-                    window.testRunner.notifyDone();
+                shouldBecomeEqual("div.scrollTop == window.expectedScrollTop && " +
+                    "div.scrollLeft == window.expectedScrollLeft", "true", finishJSTest);
             }
 
             function mousewheelHandler(e)
@@ -50,7 +40,7 @@
         </script>
     </head>
 
-    <body style="margin:0" onload="setTimeout('dispatchWheelEvent();', 100)">
+    <body style="margin:0" onload="runTest()">
          <!-- This div is 200 pixels high. The content results in scrool bars on
           both edges, resulting in an effective content area of 185 x 185 on
           linux. The paging context overlap is 24 pixels. So one page of scroll
diff --git a/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-page-expected.txt b/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-page-expected.txt
index 04548d6..89dfb7a 100644
--- a/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-page-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-page-expected.txt
@@ -1,8 +1,7 @@
 PASS event.wheelDeltaY is window.givenScrollTop * -3
 PASS event.wheelDeltaX is window.givenScrollLeft * -3
 PASS event.wheelDelta is window.givenScrollTop * -3
-PASS document.scrollingElement.scrollTop is window.expectedScrollTop
-PASS document.scrollingElement.scrollLeft is window.expectedScrollLeft
+PASS document.scrollingElement.scrollTop == window.expectedScrollTop && document.scrollingElement.scrollLeft == window.expectedScrollLeft became true
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-page.html b/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-page.html
index 5c12c89..03611197 100644
--- a/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-page.html
+++ b/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-page.html
@@ -2,6 +2,7 @@
     <head>
         <script src="../../resources/js-test.js"></script>
         <script>
+            window.jsTestIsAsync = true;
             var isMacOSX = navigator.userAgent.indexOf("Mac OS X") >= 0;
 
             var givenScrollTop = 2; // Only one page per event, so this should be interpreted as 1
@@ -22,11 +23,7 @@
             var event;
             var div;
 
-            window.jsTestIsAsync = true;
-            if (window.testRunner)
-                testRunner.waitUntilDone();
-
-            function dispatchWheelEvent()
+            function runTest()
             {
                 document.body.addEventListener("mousewheel", mousewheelHandler, false);
 
@@ -35,14 +32,8 @@
                     eventSender.continuousMouseScrollBy(-window.givenScrollLeft, -window.givenScrollTop, true);
                 }
 
-                setTimeout('checkOffsets();', 100);
-            }
-
-            function checkOffsets()
-            {
-                shouldBe("document.scrollingElement.scrollTop", "window.expectedScrollTop");
-                shouldBe("document.scrollingElement.scrollLeft", "window.expectedScrollLeft");
-                finishJSTest();
+                shouldBecomeEqual("document.scrollingElement.scrollTop == window.expectedScrollTop && " +
+                    "document.scrollingElement.scrollLeft == window.expectedScrollLeft", "true", finishJSTest)
             }
 
             function mousewheelHandler(e)
@@ -59,7 +50,7 @@
         </script>
     </head>
 
-    <body style="margin:0" onload="setTimeout('dispatchWheelEvent();', 100)">
+    <body style="margin:0" onload="runTest()">
         <div style="height:900px;width:2400px">
           <div style="background-color:red;height:900px;width:1200px;position:relative;left:0px;top:0px"></div>
           <div style="background-color:green;height:900px;width:1200px;position:relative;left:1200px;top:-900px"></div>
diff --git a/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-y-in-scrolling-div-expected.txt b/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-y-in-scrolling-div-expected.txt
index 21f104a..0468b3edb 100644
--- a/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-y-in-scrolling-div-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-y-in-scrolling-div-expected.txt
@@ -1,9 +1,8 @@
-PASS successfullyParsed is true
-
-TEST COMPLETE
 PASS event.wheelDeltaY is window.givenScrollTop * -3
 PASS event.wheelDeltaX is 0
 PASS event.wheelDelta is window.givenScrollTop * -3
-PASS div.scrollTop is window.expectedScrollTop
-PASS div.scrollLeft is window.expectedScrollLeft
+PASS div.scrollTop == window.expectedScrollTop && div.scrollLeft == window.expectedScrollLeft became true
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
diff --git a/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-y-in-scrolling-div.html b/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-y-in-scrolling-div.html
index 3b281d14..ef3042649 100644
--- a/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-y-in-scrolling-div.html
+++ b/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-y-in-scrolling-div.html
@@ -2,6 +2,7 @@
     <head>
         <script src="../../resources/js-test.js"></script>
         <script>
+            window.jsTestIsAsync = true;
             var givenScrollTop = 2;
             var givenScrollLeft = 0;
             var expectedScrollTop = 322; // 2 pages, 161 * 2, see comment in HTML below.
@@ -9,10 +10,7 @@
             var event;
             var div;
 
-            if (window.testRunner)
-                testRunner.waitUntilDone();
-
-            function dispatchWheelEvent()
+            function runTest()
             {
                 var overflowElement = document.getElementById("overflow");
                 if (overflowElement)
@@ -23,17 +21,9 @@
                     eventSender.continuousMouseScrollBy(-window.givenScrollLeft, -window.givenScrollTop, true);
                 }
 
-                setTimeout('checkOffsets();', 100);
-            }
-
-            function checkOffsets()
-            {
                 div = document.getElementById("overflow");
-                shouldBe("div.scrollTop", "window.expectedScrollTop");
-                shouldBe("div.scrollLeft", "window.expectedScrollLeft");
-
-                if (window.testRunner)
-                    window.testRunner.notifyDone();
+                shouldBecomeEqual("div.scrollTop == window.expectedScrollTop && " +
+                    "div.scrollLeft == window.expectedScrollLeft", "true", finishJSTest);
             }
 
             function mousewheelHandler(e)
@@ -50,7 +40,7 @@
         </script>
     </head>
 
-    <body style="margin:0" onload="setTimeout('dispatchWheelEvent();', 100)">
+    <body style="margin:0" onload="runTest()">
         <!-- This div is 200 pixels high. The content results in scrool bars on
           both edges, resulting in an effective content area of 185 x 185 on
           linux. The paging context overlap is 24 pixels. So one page of scroll
diff --git a/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-y-in-scrolling-page.html b/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-y-in-scrolling-page.html
index c6c6572..c109a6f0 100644
--- a/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-y-in-scrolling-page.html
+++ b/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-y-in-scrolling-page.html
@@ -2,6 +2,7 @@
     <head>
         <script src="../../resources/js-test.js"></script>
         <script>
+            window.jsTestIsAsync = true;
             var givenScrollTop = 2; // Only page is scrolled per event, regardless of this number.
             var givenScrollLeft = 0;
             var expectedScrollTop = 525; // Window is 800x600. Scroll 87.5% of visible.
@@ -9,11 +10,7 @@
             var event;
             var div;
 
-            window.jsTestIsAsync = true;
-            if (window.testRunner)
-                testRunner.waitUntilDone();
-
-            function dispatchWheelEvent()
+            function runTest()
             {
                 document.body.addEventListener("mousewheel", mousewheelHandler, false);
 
@@ -22,14 +19,9 @@
                     eventSender.continuousMouseScrollBy(-window.givenScrollLeft, -window.givenScrollTop, true);
                 }
 
-                setTimeout('checkOffsets();', 100);
-            }
-
-            function checkOffsets()
-            {
-                shouldBe("document.scrollingElement.scrollTop", "window.expectedScrollTop");
-                shouldBe("document.scrollingElement.scrollLeft", "window.expectedScrollLeft");
-                finishJSTest();
+                // This test expects failure on mac: crbug.com/552694.
+                shouldBecomeEqual("document.scrollingElement.scrollTop == window.expectedScrollTop && " +
+                    "document.scrollingElement.scrollLeft == window.expectedScrollLeft", "true", finishJSTest);
             }
 
             function mousewheelHandler(e)
@@ -46,7 +38,7 @@
         </script>
     </head>
 
-    <body style="margin:0" onload="setTimeout('dispatchWheelEvent();', 100)">
+    <body style="margin:0" onload="runTest()">
         <div style="height:900px;width:400px">
           <div style="background-color:red;height:900px;width:200px;position:relative;left:0px;top:0px"></div>
           <div style="background-color:green;height:900px;width:200px;position:relative;left:200px;top:-900px"></div>
diff --git a/third_party/WebKit/LayoutTests/fast/events/scroll-after-click-on-tab-index-expected.txt b/third_party/WebKit/LayoutTests/fast/events/scroll-after-click-on-tab-index-expected.txt
index 9e958ed5..0cecef6 100644
--- a/third_party/WebKit/LayoutTests/fast/events/scroll-after-click-on-tab-index-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/events/scroll-after-click-on-tab-index-expected.txt
@@ -1,10 +1,10 @@
 ALERT: Scroll position 0
 Click the text below and then try to scroll.
+Scroll position is more than 0
+PASS document.scrollingElement.scrollTop > 0 became true
 PASS successfullyParsed is true
 
 TEST COMPLETE
-Scroll position is more than 0
-PASS document.scrollingElement.scrollTop > 0 is true
 
 
 
diff --git a/third_party/WebKit/LayoutTests/fast/events/scroll-after-click-on-tab-index.html b/third_party/WebKit/LayoutTests/fast/events/scroll-after-click-on-tab-index.html
index 78058fe3..98cf400 100644
--- a/third_party/WebKit/LayoutTests/fast/events/scroll-after-click-on-tab-index.html
+++ b/third_party/WebKit/LayoutTests/fast/events/scroll-after-click-on-tab-index.html
@@ -1,6 +1,8 @@
 <html>
 <script src="../../resources/js-test.js"></script>
 <script>
+window.jsTestIsAsync = true;
+
 function getCenterFor(element)
 {
   var rect = element.getBoundingClientRect();
@@ -23,14 +25,9 @@
   eventSender.mouseDown();
   eventSender.mouseUp();
   eventSender.keyDown("downArrow");
-  setTimeout(verifyScrolling, 15);
-}
 
-function verifyScrolling()
-{
   debug("Scroll position is more than 0");
-  shouldBe("document.scrollingElement.scrollTop > 0", "true");
-  testRunner.notifyDone();
+  shouldBecomeEqual("document.scrollingElement.scrollTop > 0", "true", finishJSTest);
 }
 
 </script>
diff --git a/third_party/WebKit/LayoutTests/fast/events/wheelevent-basic-expected.txt b/third_party/WebKit/LayoutTests/fast/events/wheelevent-basic-expected.txt
index f8e28df2..d189f863 100644
--- a/third_party/WebKit/LayoutTests/fast/events/wheelevent-basic-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/events/wheelevent-basic-expected.txt
@@ -23,10 +23,7 @@
 PASS testEvent.__proto__.__proto__ is MouseEvent.prototype
 PASS testEvent.deltaZ is 0
 PASS testEvent.deltaMode is WheelEvent.DOM_DELTA_PIXEL
-PASS deltaX > 0 is true
-PASS deltaX is expectedDeltaX
-PASS deltaY > 0 is true
-PASS deltaY is expectedDeltaY
+PASS deltaX > 0 && deltaY > 0 && deltaX == testDiv.scrollLeft && deltaY == testDiv.scrollTop became true
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/fast/events/wheelevent-basic.html b/third_party/WebKit/LayoutTests/fast/events/wheelevent-basic.html
index e91d4e1a..166f31d0 100644
--- a/third_party/WebKit/LayoutTests/fast/events/wheelevent-basic.html
+++ b/third_party/WebKit/LayoutTests/fast/events/wheelevent-basic.html
@@ -4,10 +4,10 @@
 <link rel="help" href="http://www.w3.org/TR/DOM-Level-3-Events/#events-WheelEvent">
 <script src="../../resources/js-test.js"></script>
 <script>
+window.jsTestIsAsync = true;
+
 var deltaX = 0;
 var deltaY = 0;
-var expectedDeltaX;
-var expectedDeltaY;
 
 var testDiv;
 function runTest() {
@@ -26,12 +26,9 @@
     if (window.eventSender) {
         eventSender.mouseMoveTo(testDiv.offsetLeft + 5, testDiv.offsetTop + 5);
         eventSender.mouseScrollBy(-1, -2);
-        expectedDeltaX = testDiv.scrollLeft;
-        expectedDeltaY = testDiv.scrollTop;
-        shouldBeTrue("deltaX > 0");
-        shouldBe("deltaX", "expectedDeltaX");
-        shouldBeTrue("deltaY > 0");
-        shouldBe("deltaY", "expectedDeltaY");
+        var positive = "deltaX > 0 && deltaY > 0";
+        var correct = "deltaX == testDiv.scrollLeft && deltaY == testDiv.scrollTop";
+        shouldBecomeEqual(positive + " && " + correct , "true", finishJSTest);
     } else {
         debug("FAIL: This test requires window.eventSender.");
     }
diff --git a/third_party/WebKit/LayoutTests/fast/events/wheelevent-in-horizontal-scrollbar-in-rtl-expected.txt b/third_party/WebKit/LayoutTests/fast/events/wheelevent-in-horizontal-scrollbar-in-rtl-expected.txt
index 4fd95e7f..2e56675 100644
--- a/third_party/WebKit/LayoutTests/fast/events/wheelevent-in-horizontal-scrollbar-in-rtl-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/events/wheelevent-in-horizontal-scrollbar-in-rtl-expected.txt
@@ -1,6 +1,9 @@
 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+PASS window.scrollX == -90 && window.scrollY == 100 became true
+PASS window.scrollX == -120 && window.scrollY == 100 became true
+PASS window.scrollX == -120 && window.scrollY == 110 became true
+PASS window.scrollX == -120 && window.scrollY == 80 became true
 PASS successfullyParsed is true
 
 TEST COMPLETE
-window.scrollX: -120
-window.scrollY: 80
+
diff --git a/third_party/WebKit/LayoutTests/fast/events/wheelevent-in-horizontal-scrollbar-in-rtl.html b/third_party/WebKit/LayoutTests/fast/events/wheelevent-in-horizontal-scrollbar-in-rtl.html
index fd88b28..2aa27f6a 100644
--- a/third_party/WebKit/LayoutTests/fast/events/wheelevent-in-horizontal-scrollbar-in-rtl.html
+++ b/third_party/WebKit/LayoutTests/fast/events/wheelevent-in-horizontal-scrollbar-in-rtl.html
@@ -1,55 +1,40 @@
 <html dir=rtl>
-    <head>
-        <script src="../../resources/js-test.js"></script>
-        <script>
 
-            function log(str)
-            {
-                var li = document.createElement("li");
-                li.appendChild(document.createTextNode(str));
-                var console = document.getElementById("console");
-                console.appendChild(li);
-            }
-            
+<script src="../../resources/js-test.js"></script>
+<script>
+    var testScrolls = [
+        {x: -10, y: 0, expectedX: -90, expectedY: 100},
+        {x: 30, y: 0, expectedX: -120, expectedY: 100},
+        {x: 0, y: -10, expectedX: -120, expectedY: 110},
+        {x: 0, y: 30, expectedX: -120, expectedY: 80},
+    ];
+    var currentTest = -1;
+    window.jsTestIsAsync = true;
 
-            if (window.testRunner) {
-                testRunner.waitUntilDone();
-            }
+    function startNextTestCase() {
+        currentTest++;
+        if (currentTest >= testScrolls.length) {
+            finishJSTest();
+            return;
+        }
+        var testCase = testScrolls[currentTest];
+        eventSender.mouseMoveTo(100, 100);
+        eventSender.continuousMouseScrollBy(testCase.x, testCase.y);
+        shouldBecomeEqual("window.scrollX == " + testCase.expectedX + " && " +
+            "window.scrollY == " + testCase.expectedY, "true", startNextTestCase);
+    }
 
-            function dispatchWheelEvent()
-            {
-               window.addEventListener("mousewheel", mousewheelHandler, false);
+    window.onload = function() {
+        if (!window.testRunner)
+            return;
+        window.addEventListener("mousewheel", function (e){}, false);
+        window.scrollTo(-100, 100);
+        startNextTestCase();
+    }
+</script>
 
-               window.scrollTo(-100, 100);
-               if (window.eventSender) {
-                    eventSender.mouseMoveTo(100, 100);
-                    eventSender.continuousMouseScrollBy(-10, 0);
-                    eventSender.continuousMouseScrollBy(30, 0);
-                    eventSender.continuousMouseScrollBy(0, -10);
-                    eventSender.continuousMouseScrollBy(0, 30);
-                }
-
-                setTimeout('checkOffsets();', 100);
-            }
-
-            function checkOffsets()
-            {
-                log("window.scrollX: " + window.scrollX);
-                log("window.scrollY: " + window.scrollY);
-
-                if (window.testRunner)
-                    window.testRunner.notifyDone();
-            }
-
-            function mousewheelHandler(e)
-            {
-            }
-        </script>
-    </head>
-
-    <body style="margin:0" onload="setTimeout('dispatchWheelEvent();', 100)">
-
-        <div id="div" style="whitespace:nowrap; width: 4000px; height: 1000px; border: 1px solid red;">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."</div>
-        <div id="console"></div>
-    </body>
+<body style="margin:0">
+    <div id="div" style="whitespace:nowrap; width: 4000px; height: 1000px; border: 1px solid red;">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."</div>
+    <div id="console"></div>
+</body>
 </html>
diff --git a/third_party/WebKit/LayoutTests/fast/events/wheelevent-in-scrolling-div-expected.txt b/third_party/WebKit/LayoutTests/fast/events/wheelevent-in-scrolling-div-expected.txt
index 10e4fd02..f07f1e3 100644
--- a/third_party/WebKit/LayoutTests/fast/events/wheelevent-in-scrolling-div-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/events/wheelevent-in-scrolling-div-expected.txt
@@ -1,11 +1,10 @@
-PASS successfullyParsed is true
-
-TEST COMPLETE
 PASS event.deltaY is window.expectedScrollTop
 PASS event.deltaX is window.expectedScrollLeft
 PASS event.wheelDeltaY is -5*120
 PASS event.wheelDeltaX is -2.5*120
 PASS event.wheelDelta is -5*120
-PASS div.scrollTop is window.expectedScrollTop
-PASS div.scrollLeft is window.expectedScrollLeft
+PASS div.scrollTop == window.expectedScrollTop && div.scrollLeft == window.expectedScrollLeft became true
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
diff --git a/third_party/WebKit/LayoutTests/fast/events/wheelevent-in-scrolling-div.html b/third_party/WebKit/LayoutTests/fast/events/wheelevent-in-scrolling-div.html
index 2b935fb1..c83f2f9c9 100644
--- a/third_party/WebKit/LayoutTests/fast/events/wheelevent-in-scrolling-div.html
+++ b/third_party/WebKit/LayoutTests/fast/events/wheelevent-in-scrolling-div.html
@@ -2,15 +2,13 @@
     <head>
         <script src="../../resources/js-test.js"></script>
         <script>
+            window.jsTestIsAsync = true;
             var expectedScrollTop = 200;
             var expectedScrollLeft = 100;
             var event;
             var div;
 
-            if (window.testRunner)
-                testRunner.waitUntilDone();
-
-            function dispatchWheelEvent()
+            function runTest()
             {
                 var overflowElement = document.getElementById("overflow");
                 if (overflowElement) {
@@ -21,17 +19,9 @@
                     eventSender.mouseScrollBy(-2.5, -5);
                 }
 
-                setTimeout('checkOffsets();', 100);
-            }
-
-            function checkOffsets()
-            {
                 div = document.getElementById("overflow");
-                shouldBe("div.scrollTop", "window.expectedScrollTop");
-                shouldBe("div.scrollLeft", "window.expectedScrollLeft");
-
-                if (window.testRunner)
-                    window.testRunner.notifyDone();
+                shouldBecomeEqual("div.scrollTop == window.expectedScrollTop && " +
+                    "div.scrollLeft == window.expectedScrollLeft", "true", finishJSTest);
             }
 
             function mousewheelHandler(e)
@@ -50,7 +40,7 @@
         </script>
     </head>
 
-    <body style="margin:0" onload="setTimeout('dispatchWheelEvent();', 100)">
+    <body style="margin:0" onload="runTest()">
         <div id="overflow" style="border:2px solid black;overflow:auto;height:200px;width:200px;">
             <div style="background-color:red;height:200px;width:400px;"></div>
             <div style="background-color:green;height:200px;width:400px;"></div>
diff --git a/third_party/WebKit/LayoutTests/fast/events/wheelevent-in-vertical-scrollbar-in-rtl-expected.txt b/third_party/WebKit/LayoutTests/fast/events/wheelevent-in-vertical-scrollbar-in-rtl-expected.txt
index 7002b636..1c7c5523 100644
--- a/third_party/WebKit/LayoutTests/fast/events/wheelevent-in-vertical-scrollbar-in-rtl-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/events/wheelevent-in-vertical-scrollbar-in-rtl-expected.txt
@@ -1,6 +1,9 @@
 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+PASS window.scrollX == 110 && window.scrollY == -100 became true
+PASS window.scrollX == 80 && window.scrollY == -100 became true
+PASS window.scrollX == 80 && window.scrollY == -90 became true
+PASS window.scrollX == 80 && window.scrollY == -120 became true
 PASS successfullyParsed is true
 
 TEST COMPLETE
-window.scrollX: 80
-window.scrollY: -120
+
diff --git a/third_party/WebKit/LayoutTests/fast/events/wheelevent-in-vertical-scrollbar-in-rtl.html b/third_party/WebKit/LayoutTests/fast/events/wheelevent-in-vertical-scrollbar-in-rtl.html
index 86465755..ada7d4a1 100644
--- a/third_party/WebKit/LayoutTests/fast/events/wheelevent-in-vertical-scrollbar-in-rtl.html
+++ b/third_party/WebKit/LayoutTests/fast/events/wheelevent-in-vertical-scrollbar-in-rtl.html
@@ -1,54 +1,41 @@
 <html dir=rtl style="-webkit-writing-mode:vertical-lr">
-    <head>
-        <script src="../../resources/js-test.js"></script>
-        <script>
 
-            function log(str)
-            {
-                var li = document.createElement("li");
-                li.appendChild(document.createTextNode(str));
-                var console = document.getElementById("console");
-                console.appendChild(li);
-            }
-            
-            if (window.testRunner) {
-                testRunner.waitUntilDone();
-            }
+<script src="../../resources/js-test.js"></script>
+<script>
+    var testScrolls = [
+        {x: -10, y: 0, expectedX: 110, expectedY: -100},
+        {x: 30, y: 0, expectedX: 80, expectedY: -100},
+        {x: 0, y: -10, expectedX: 80, expectedY: -90},
+        {x: 0, y: 30, expectedX: 80, expectedY: -120},
+    ];
+    var currentTest = -1;
+    window.jsTestIsAsync = true;
 
-            function dispatchWheelEvent()
-            {
-                window.addEventListener("mousewheel", mousewheelHandler, false);
+    function startNextTestCase() {
+        currentTest++;
+        if (currentTest >= testScrolls.length) {
+            finishJSTest();
+            return;
+        }
+        var testCase = testScrolls[currentTest];
+        eventSender.mouseMoveTo(100, 100);
+        eventSender.continuousMouseScrollBy(testCase.x, testCase.y);
+        shouldBecomeEqual("window.scrollX == " + testCase.expectedX + " && " +
+            "window.scrollY == " + testCase.expectedY, "true", startNextTestCase);
+    }
 
-               window.scrollTo(100, -100);
-               if (window.eventSender) {
-                    eventSender.mouseMoveTo(100, 100);
-                    eventSender.continuousMouseScrollBy(-10, 0);
-                    eventSender.continuousMouseScrollBy(30, 0);
-                    eventSender.continuousMouseScrollBy(0, -10);
-                    eventSender.continuousMouseScrollBy(0, 30);
-                }
+    window.onload = function() {
+        if (!window.testRunner)
+            return;
+        window.addEventListener("mousewheel", function (e){}, false);
+        window.scrollTo(100, -100);
+        startNextTestCase();
+    }
+</script>
 
-                setTimeout('checkOffsets();', 100);
-            }
+<body style="margin:0">
 
-            function checkOffsets()
-            {
-                log("window.scrollX: " + window.scrollX);
-                log("window.scrollY: " + window.scrollY);
-
-                if (window.testRunner)
-                    window.testRunner.notifyDone();
-            }
-
-            function mousewheelHandler(e)
-            {
-            }
-        </script>
-    </head>
-
-    <body style="margin:0" onload="setTimeout('dispatchWheelEvent();', 100)">
-
-        <div id="div" style="whitespace:nowrap; width: 4000px; height: 1000px; border: 1px solid red;">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."</div>
-        <div id="console"></div>
-    </body>
+    <div id="div" style="whitespace:nowrap; width: 4000px; height: 1000px; border: 1px solid red;">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."</div>
+    <div id="console"></div>
+</body>
 </html>
diff --git a/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/date-suggestion-picker-mouse-operations-expected.txt b/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/date-suggestion-picker-mouse-operations-expected.txt
index e15a7bb..9f2930a0 100644
--- a/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/date-suggestion-picker-mouse-operations-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/date-suggestion-picker-mouse-operations-expected.txt
@@ -10,8 +10,8 @@
 PASS $("mock-page-popup") is null
 PASS document.getElementById("date").value is "2012-01-03"
 Check that you can scroll using the mouse wheel.
-PASS scrollTopBeforeWheelEvent < scrollTopAfterWheelEvent is true
-PASS scrollTopBeforeWheelEvent > scrollTopAfterWheelEvent is true
+PASS scrollTopBeforeWheelEvent < suggestionList.scrollTop became true
+PASS scrollTopBeforeWheelEvent > suggestionList.scrollTop became true
 PASS $("mock-page-popup") is null
 Check that you can scroll using the scroll bar.
 PASS scrollTopBeforeWheelEvent < scrollTopAfterWheelEvent is true
diff --git a/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/date-suggestion-picker-mouse-operations.html b/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/date-suggestion-picker-mouse-operations.html
index 39bc6d91..9ecbd7c5 100644
--- a/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/date-suggestion-picker-mouse-operations.html
+++ b/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/date-suggestion-picker-mouse-operations.html
@@ -84,6 +84,7 @@
     <option>foo</option> <!--invalid-->
 </datalist>
 <script>
+
 debug('Check that page popup doesn\'t exist at first.');
 shouldBeNull('$("mock-page-popup")');
 
@@ -115,25 +116,32 @@
 
 var scrollTopBeforeWheelEvent = 0;
 var scrollTopAfterWheelEvent = 0;
+var suggestionList;
 
 function test2() {
-    var suggestionList = popupWindow.document.getElementsByClassName("suggestion-list")[0];
+    suggestionList = popupWindow.document.getElementsByClassName("suggestion-list")[0];
 
     debug('Check that you can scroll using the mouse wheel.');
 
-    scrollTopBeforeWheelEvent = suggestionList.scrollTop;
-    dispatchWheelEvent(suggestionList, 0, -100);
-    scrollTopAfterWheelEvent = suggestionList.scrollTop;
-    shouldBeTrue('scrollTopBeforeWheelEvent < scrollTopAfterWheelEvent');
+    function finishTest() {
+        popupWindow.focus();
+        eventSender.keyDown('escape');
+        waitUntilClosing(test2AfterClosing);
+    }
 
-    scrollTopBeforeWheelEvent = suggestionList.scrollTop;
-    dispatchWheelEvent(suggestionList, 0, 100);
-    scrollTopAfterWheelEvent = suggestionList.scrollTop;
-    shouldBeTrue('scrollTopBeforeWheelEvent > scrollTopAfterWheelEvent');
+    function scrollUp() {
+        scrollTopBeforeWheelEvent = suggestionList.scrollTop;
+        dispatchWheelEvent(suggestionList, 0, 100);
+        shouldBecomeEqual('scrollTopBeforeWheelEvent > suggestionList.scrollTop', 'true', finishTest);
+    }
 
-    popupWindow.focus();
-    eventSender.keyDown('escape');
-    waitUntilClosing(test2AfterClosing);
+    function scrollDown() {
+        scrollTopBeforeWheelEvent = suggestionList.scrollTop;
+        dispatchWheelEvent(suggestionList, 0, -100);
+        shouldBecomeEqual('scrollTopBeforeWheelEvent < suggestionList.scrollTop', 'true', scrollUp);
+    }
+
+    scrollDown();
 }
 
 function test2AfterClosing() {
diff --git a/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/datetimelocal-suggestion-picker-mouse-operations-expected.txt b/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/datetimelocal-suggestion-picker-mouse-operations-expected.txt
index ce3b28a..88ef8c1 100644
--- a/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/datetimelocal-suggestion-picker-mouse-operations-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/datetimelocal-suggestion-picker-mouse-operations-expected.txt
@@ -10,8 +10,8 @@
 PASS document.getElementById("mock-page-popup") is null
 PASS document.getElementById("datetime-local").value is "2012-11-22T01:03"
 Check that you can scroll using the mouse wheel.
-PASS scrollTopBeforeWheelEvent < scrollTopAfterWheelEvent is true
-PASS scrollTopBeforeWheelEvent > scrollTopAfterWheelEvent is true
+PASS scrollTopBeforeWheelEvent < suggestionList.scrollTop became true
+PASS scrollTopBeforeWheelEvent > suggestionList.scrollTop became true
 PASS $("mock-page-popup") is null
 Check that you can scroll using the scroll bar.
 PASS scrollTopBeforeWheelEvent < scrollTopAfterWheelEvent is true
diff --git a/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/datetimelocal-suggestion-picker-mouse-operations.html b/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/datetimelocal-suggestion-picker-mouse-operations.html
index 85e767b..55cb2ab 100644
--- a/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/datetimelocal-suggestion-picker-mouse-operations.html
+++ b/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/datetimelocal-suggestion-picker-mouse-operations.html
@@ -69,25 +69,32 @@
 
 var scrollTopBeforeWheelEvent = 0;
 var scrollTopAfterWheelEvent = 0;
+var suggestionList;
 
 function test2() {
-    var suggestionList = popupWindow.document.getElementsByClassName('suggestion-list')[0];
+    suggestionList = popupWindow.document.getElementsByClassName("suggestion-list")[0];
 
     debug('Check that you can scroll using the mouse wheel.');
 
-    scrollTopBeforeWheelEvent = suggestionList.scrollTop;
-    dispatchWheelEvent(suggestionList, 0, -100);
-    scrollTopAfterWheelEvent = suggestionList.scrollTop;
-    shouldBeTrue('scrollTopBeforeWheelEvent < scrollTopAfterWheelEvent');
+    function finishTest() {
+        popupWindow.focus();
+        eventSender.keyDown('escape');
+        waitUntilClosing(test2AfterClosing);
+    }
 
-    scrollTopBeforeWheelEvent = suggestionList.scrollTop;
-    dispatchWheelEvent(suggestionList, 0, 100);
-    scrollTopAfterWheelEvent = suggestionList.scrollTop;
-    shouldBeTrue('scrollTopBeforeWheelEvent > scrollTopAfterWheelEvent');
+    function scrollUp() {
+        scrollTopBeforeWheelEvent = suggestionList.scrollTop;
+        dispatchWheelEvent(suggestionList, 0, 100);
+        shouldBecomeEqual('scrollTopBeforeWheelEvent > suggestionList.scrollTop', 'true', finishTest)
+    }
 
-    popupWindow.focus();
-    eventSender.keyDown('escape');
-    waitUntilClosing(test2AfterClosing);
+    function scrollDown() {
+        scrollTopBeforeWheelEvent = suggestionList.scrollTop;
+        dispatchWheelEvent(suggestionList, 0, -100);
+        shouldBecomeEqual('scrollTopBeforeWheelEvent < suggestionList.scrollTop', 'true', scrollUp);
+    }
+
+    scrollDown();
 }
 
 function test2AfterClosing() {
diff --git a/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/month-suggestion-picker-mouse-operations-expected.txt b/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/month-suggestion-picker-mouse-operations-expected.txt
index 121c627..4c6ea78 100644
--- a/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/month-suggestion-picker-mouse-operations-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/month-suggestion-picker-mouse-operations-expected.txt
@@ -10,8 +10,8 @@
 PASS $("mock-page-popup") is null
 PASS document.getElementById("month").value is "2012-03"
 Check that you can scroll using the mouse wheel.
-PASS scrollTopBeforeWheelEvent < scrollTopAfterWheelEvent is true
-PASS scrollTopBeforeWheelEvent > scrollTopAfterWheelEvent is true
+PASS scrollTopBeforeWheelEvent < suggestionList.scrollTop became true
+PASS scrollTopBeforeWheelEvent > suggestionList.scrollTop became true
 PASS $("mock-page-popup") is null
 Check that you can scroll using the scroll bar.
 PASS scrollTopBeforeWheelEvent < scrollTopAfterWheelEvent is true
diff --git a/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/month-suggestion-picker-mouse-operations.html b/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/month-suggestion-picker-mouse-operations.html
index d84c7083..e7b5c46 100644
--- a/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/month-suggestion-picker-mouse-operations.html
+++ b/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/month-suggestion-picker-mouse-operations.html
@@ -96,25 +96,32 @@
 
 var scrollTopBeforeWheelEvent = 0;
 var scrollTopAfterWheelEvent = 0;
+var suggestionList;
 
 function test2() {
-    var suggestionList = popupWindow.document.getElementsByClassName("suggestion-list")[0];
+    suggestionList = popupWindow.document.getElementsByClassName("suggestion-list")[0];
 
     debug('Check that you can scroll using the mouse wheel.');
 
-    scrollTopBeforeWheelEvent = suggestionList.scrollTop;
-    dispatchWheelEvent(suggestionList, 0, -100);
-    scrollTopAfterWheelEvent = suggestionList.scrollTop;
-    shouldBeTrue('scrollTopBeforeWheelEvent < scrollTopAfterWheelEvent');
+    function finishTest() {
+        popupWindow.focus();
+        eventSender.keyDown('escape');
+        waitUntilClosing(test2AfterClosing);
+    }
 
-    scrollTopBeforeWheelEvent = suggestionList.scrollTop;
-    dispatchWheelEvent(suggestionList, 0, 100);
-    scrollTopAfterWheelEvent = suggestionList.scrollTop;
-    shouldBeTrue('scrollTopBeforeWheelEvent > scrollTopAfterWheelEvent');
+    function scrollUp() {
+        scrollTopBeforeWheelEvent = suggestionList.scrollTop;
+        dispatchWheelEvent(suggestionList, 0, 100);
+        shouldBecomeEqual('scrollTopBeforeWheelEvent > suggestionList.scrollTop', 'true', finishTest)
+    }
 
-    popupWindow.focus();
-    eventSender.keyDown('escape');
-    waitUntilClosing(test2AfterClosing);
+    function scrollDown() {
+        scrollTopBeforeWheelEvent = suggestionList.scrollTop;
+        dispatchWheelEvent(suggestionList, 0, -100);
+        shouldBecomeEqual('scrollTopBeforeWheelEvent < suggestionList.scrollTop', 'true', scrollUp);
+    }
+
+    scrollDown();
 }
 
 function test2AfterClosing() {
diff --git a/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/time-suggestion-picker-mouse-operations-expected.txt b/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/time-suggestion-picker-mouse-operations-expected.txt
index 1557ea8..2dcfae1 100644
--- a/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/time-suggestion-picker-mouse-operations-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/time-suggestion-picker-mouse-operations-expected.txt
@@ -12,8 +12,8 @@
 PASS document.getElementById("mock-page-popup") is null
 PASS document.getElementById("time").value is "01:03"
 Check that you can scroll using the mouse wheel.
-PASS scrollTopBeforeWheelEvent < scrollTopAfterWheelEvent is true
-PASS scrollTopBeforeWheelEvent > scrollTopAfterWheelEvent is true
+PASS scrollTopBeforeWheelEvent < suggestionList.scrollTop became true
+PASS scrollTopBeforeWheelEvent > suggestionList.scrollTop became true
 PASS $("mock-page-popup") is null
 Check that you can scroll using the scroll bar.
 PASS scrollTopBeforeWheelEvent < scrollTopAfterWheelEvent is true
diff --git a/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/time-suggestion-picker-mouse-operations.html b/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/time-suggestion-picker-mouse-operations.html
index c3949d0..59cbf01 100644
--- a/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/time-suggestion-picker-mouse-operations.html
+++ b/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/time-suggestion-picker-mouse-operations.html
@@ -72,25 +72,32 @@
 
 var scrollTopBeforeWheelEvent = 0;
 var scrollTopAfterWheelEvent = 0;
+var suggestionList;
 
 function test2() {
-    var suggestionList = popupWindow.document.getElementsByClassName("suggestion-list")[0];
+    suggestionList = popupWindow.document.getElementsByClassName("suggestion-list")[0];
 
     debug('Check that you can scroll using the mouse wheel.');
 
-    scrollTopBeforeWheelEvent = suggestionList.scrollTop;
-    dispatchWheelEvent(suggestionList, 0, -100);
-    scrollTopAfterWheelEvent = suggestionList.scrollTop;
-    shouldBeTrue('scrollTopBeforeWheelEvent < scrollTopAfterWheelEvent');
+    function finishTest() {
+        popupWindow.focus();
+        eventSender.keyDown('escape');
+        waitUntilClosing(test2AfterClosing);
+    }
 
-    scrollTopBeforeWheelEvent = suggestionList.scrollTop;
-    dispatchWheelEvent(suggestionList, 0, 100);
-    scrollTopAfterWheelEvent = suggestionList.scrollTop;
-    shouldBeTrue('scrollTopBeforeWheelEvent > scrollTopAfterWheelEvent');
+    function scrollUp() {
+        scrollTopBeforeWheelEvent = suggestionList.scrollTop;
+        dispatchWheelEvent(suggestionList, 0, 100);
+        shouldBecomeEqual('scrollTopBeforeWheelEvent > suggestionList.scrollTop', 'true', finishTest)
+    }
 
-    popupWindow.focus();
-    eventSender.keyDown('escape');
-    waitUntilClosing(test2AfterClosing);
+    function scrollDown() {
+        scrollTopBeforeWheelEvent = suggestionList.scrollTop;
+        dispatchWheelEvent(suggestionList, 0, -100);
+        shouldBecomeEqual('scrollTopBeforeWheelEvent < suggestionList.scrollTop', 'true', scrollUp);
+    }
+
+    scrollDown();
 }
 
 function test2AfterClosing() {
diff --git a/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/week-suggestion-picker-mouse-operations-expected.txt b/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/week-suggestion-picker-mouse-operations-expected.txt
index 35af1b34..705b944 100644
--- a/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/week-suggestion-picker-mouse-operations-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/week-suggestion-picker-mouse-operations-expected.txt
@@ -10,8 +10,8 @@
 PASS $("mock-page-popup") is null
 PASS document.getElementById("week").value is "2012-W03"
 Check that you can scroll using the mouse wheel.
-PASS scrollTopBeforeWheelEvent < scrollTopAfterWheelEvent is true
-PASS scrollTopBeforeWheelEvent > scrollTopAfterWheelEvent is true
+PASS scrollTopBeforeWheelEvent < suggestionList.scrollTop became true
+PASS scrollTopBeforeWheelEvent > suggestionList.scrollTop became true
 PASS $("mock-page-popup") is null
 Check that you can scroll using the scroll bar.
 PASS scrollTopBeforeWheelEvent < scrollTopAfterWheelEvent is true
diff --git a/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/week-suggestion-picker-mouse-operations.html b/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/week-suggestion-picker-mouse-operations.html
index 41f27f6c7..4d8b53aa 100644
--- a/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/week-suggestion-picker-mouse-operations.html
+++ b/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/week-suggestion-picker-mouse-operations.html
@@ -115,25 +115,32 @@
 
 var scrollTopBeforeWheelEvent = 0;
 var scrollTopAfterWheelEvent = 0;
+var suggestionList;
 
 function test2() {
-    var suggestionList = popupWindow.document.getElementsByClassName('suggestion-list')[0];
+    suggestionList = popupWindow.document.getElementsByClassName("suggestion-list")[0];
 
     debug('Check that you can scroll using the mouse wheel.');
 
-    scrollTopBeforeWheelEvent = suggestionList.scrollTop;
-    dispatchWheelEvent(suggestionList, 0, -100);
-    scrollTopAfterWheelEvent = suggestionList.scrollTop;
-    shouldBeTrue('scrollTopBeforeWheelEvent < scrollTopAfterWheelEvent');
+    function finishTest() {
+        popupWindow.focus();
+        eventSender.keyDown('escape');
+        waitUntilClosing(test2AfterClosing);
+    }
 
-    scrollTopBeforeWheelEvent = suggestionList.scrollTop;
-    dispatchWheelEvent(suggestionList, 0, 100);
-    scrollTopAfterWheelEvent = suggestionList.scrollTop;
-    shouldBeTrue('scrollTopBeforeWheelEvent > scrollTopAfterWheelEvent');
+    function scrollUp() {
+        scrollTopBeforeWheelEvent = suggestionList.scrollTop;
+        dispatchWheelEvent(suggestionList, 0, 100);
+        shouldBecomeEqual('scrollTopBeforeWheelEvent > suggestionList.scrollTop', 'true', finishTest)
+    }
 
-    popupWindow.focus();
-    eventSender.keyDown('escape');
-    waitUntilClosing(test2AfterClosing);
+    function scrollDown() {
+        scrollTopBeforeWheelEvent = suggestionList.scrollTop;
+        dispatchWheelEvent(suggestionList, 0, -100);
+        shouldBecomeEqual('scrollTopBeforeWheelEvent < suggestionList.scrollTop', 'true', scrollUp);
+    }
+
+    scrollDown();
 }
 
 function test2AfterClosing() {
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/overflow-auto-in-overflow-auto-scrolled.html b/third_party/WebKit/LayoutTests/fast/repaint/overflow-auto-in-overflow-auto-scrolled.html
index bf381e9..ba711ea 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/overflow-auto-in-overflow-auto-scrolled.html
+++ b/third_party/WebKit/LayoutTests/fast/repaint/overflow-auto-in-overflow-auto-scrolled.html
@@ -7,6 +7,9 @@
         if (window.eventSender) {
             testRunner.dumpAsTextWithPixelResults();
 
+            if (window.internals)
+                internals.settings.setScrollAnimatorEnabled(false);
+
             // Scroll the #outerDiv until we reach the #innerDiv.
             eventSender.mouseMoveTo(50, 50);
             eventSender.mouseScrollBy(0, -8);
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/overflow-scroll-in-overflow-scroll-scrolled.html b/third_party/WebKit/LayoutTests/fast/repaint/overflow-scroll-in-overflow-scroll-scrolled.html
index 8b3b87b..73a8d04 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/overflow-scroll-in-overflow-scroll-scrolled.html
+++ b/third_party/WebKit/LayoutTests/fast/repaint/overflow-scroll-in-overflow-scroll-scrolled.html
@@ -25,6 +25,9 @@
 if (window.eventSender) {
     testRunner.dumpAsTextWithPixelResults();
 
+    if (window.internals)
+        internals.settings.setScrollAnimatorEnabled(false);
+
     // Scroll the #outerDiv until we reach the #innerDiv.
     eventSender.mouseMoveTo(50, 50);
     eventSender.mouseScrollBy(0, -8);
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/table-overflow-auto-in-overflow-auto-scrolled.html b/third_party/WebKit/LayoutTests/fast/repaint/table-overflow-auto-in-overflow-auto-scrolled.html
index ac3c68fd..2d17f20 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/table-overflow-auto-in-overflow-auto-scrolled.html
+++ b/third_party/WebKit/LayoutTests/fast/repaint/table-overflow-auto-in-overflow-auto-scrolled.html
@@ -27,6 +27,9 @@
 if (window.eventSender) {
     testRunner.dumpAsTextWithPixelResults();
 
+    if (window.internals)
+        internals.settings.setScrollAnimatorEnabled(false);
+
     // Scroll the #outerDiv until we reach the #innerDiv.
     eventSender.mouseMoveTo(50, 50);
     eventSender.mouseScrollBy(0, -8);
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/table-overflow-scroll-in-overflow-scroll-scrolled.html b/third_party/WebKit/LayoutTests/fast/repaint/table-overflow-scroll-in-overflow-scroll-scrolled.html
index f746e801..7f160e0 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/table-overflow-scroll-in-overflow-scroll-scrolled.html
+++ b/third_party/WebKit/LayoutTests/fast/repaint/table-overflow-scroll-in-overflow-scroll-scrolled.html
@@ -27,6 +27,9 @@
 if (window.eventSender) {
     testRunner.dumpAsTextWithPixelResults();
 
+    if (window.internals)
+        internals.settings.setScrollAnimatorEnabled(false);
+
     // Scroll the #outerDiv until we reach the #innerDiv.
     eventSender.mouseMoveTo(50, 50);
     eventSender.mouseScrollBy(0, -8);
diff --git a/third_party/WebKit/LayoutTests/fast/scroll-behavior/visual-viewport-scroll-no-onscroll-event.html b/third_party/WebKit/LayoutTests/fast/scroll-behavior/visual-viewport-scroll-no-onscroll-event.html
index 341994f..d10ea60 100644
--- a/third_party/WebKit/LayoutTests/fast/scroll-behavior/visual-viewport-scroll-no-onscroll-event.html
+++ b/third_party/WebKit/LayoutTests/fast/scroll-behavior/visual-viewport-scroll-no-onscroll-event.html
@@ -26,6 +26,8 @@
             return;
         }
 
+        internals.settings.setScrollAnimatorEnabled(false);
+
         window.internals.setPageScaleFactor(2.0);
         var target = document.getElementById('target');
 
diff --git a/third_party/WebKit/LayoutTests/fast/scrolling/absolute-position-behind-scrollbar-expected.txt b/third_party/WebKit/LayoutTests/fast/scrolling/absolute-position-behind-scrollbar-expected.txt
index 2762301..e6d7f84 100644
--- a/third_party/WebKit/LayoutTests/fast/scrolling/absolute-position-behind-scrollbar-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/scrolling/absolute-position-behind-scrollbar-expected.txt
@@ -1,4 +1,4 @@
-PASS true is true
+PASS scrollY > 0 became true
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/fast/scrolling/absolute-position-behind-scrollbar.html b/third_party/WebKit/LayoutTests/fast/scrolling/absolute-position-behind-scrollbar.html
index 9f16790..e45a560 100644
--- a/third_party/WebKit/LayoutTests/fast/scrolling/absolute-position-behind-scrollbar.html
+++ b/third_party/WebKit/LayoutTests/fast/scrolling/absolute-position-behind-scrollbar.html
@@ -13,11 +13,14 @@
 Tests that the scrollbar can be clicked even when it clips absolute-positioned content.
 <div id="a"></div>
 <script>
+window.jsTestIsAsync = true;
 
-eventSender.mouseMoveTo(790, 500);
-eventSender.mouseDown();
-eventSender.mouseUp();
+function runTest() {
+  eventSender.mouseMoveTo(790, 500);
+  eventSender.mouseDown();
+  eventSender.mouseUp();
+  shouldBecomeEqual('scrollY > 0', 'true', finishJSTest);
+}
 
-shouldBeTrue(String(scrollY > 0));
-
+onload = runTest;
 </script>
diff --git a/third_party/WebKit/LayoutTests/fast/scrolling/editor-command-scroll-page-scale.html b/third_party/WebKit/LayoutTests/fast/scrolling/editor-command-scroll-page-scale.html
index 703c642..3da76c78 100644
--- a/third_party/WebKit/LayoutTests/fast/scrolling/editor-command-scroll-page-scale.html
+++ b/third_party/WebKit/LayoutTests/fast/scrolling/editor-command-scroll-page-scale.html
@@ -58,6 +58,7 @@
         'scroll to see the divs at the bounds.)');
 
     if (window.internals) {
+      internals.settings.setScrollAnimatorEnabled(false);
       reset();
       debug('');
       debug('Testing Document Scrolling:');
diff --git a/third_party/WebKit/LayoutTests/fast/scrolling/fixed-position-behind-scrollbar-expected.txt b/third_party/WebKit/LayoutTests/fast/scrolling/fixed-position-behind-scrollbar-expected.txt
index 97851878..e935530 100644
--- a/third_party/WebKit/LayoutTests/fast/scrolling/fixed-position-behind-scrollbar-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/scrolling/fixed-position-behind-scrollbar-expected.txt
@@ -1,4 +1,4 @@
-PASS true is true
+PASS scrollY > 0 became true
 PASS 205,205 is 205,205
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/fast/scrolling/fixed-position-behind-scrollbar.html b/third_party/WebKit/LayoutTests/fast/scrolling/fixed-position-behind-scrollbar.html
index df860f2..a6c3a220 100644
--- a/third_party/WebKit/LayoutTests/fast/scrolling/fixed-position-behind-scrollbar.html
+++ b/third_party/WebKit/LayoutTests/fast/scrolling/fixed-position-behind-scrollbar.html
@@ -19,14 +19,21 @@
 the element's position.
 <div id="f"></div>
 <script>
+window.jsTestIsAsync = true;
 
-eventSender.mouseMoveTo(790, 500);
-eventSender.mouseDown();
-eventSender.mouseUp();
+function finishTest() {
+  var rect = document.querySelector("#f").getBoundingClientRect();
+  shouldBe(rect.left + "," + rect.top, "205,205");
+  finishJSTest();
+}
 
-var rect = document.querySelector("#f").getBoundingClientRect();
+function runTest() {
+  eventSender.mouseMoveTo(790, 500);
+  eventSender.mouseDown();
+  eventSender.mouseUp();
+  shouldBecomeEqual('scrollY > 0', 'true', finishTest);
+}
 
-shouldBeTrue(String(scrollY > 0));
-shouldBe(rect.left + "," + rect.top, "205,205");
+onload = runTest;
 
 </script>
diff --git a/third_party/WebKit/LayoutTests/fast/scrolling/hover-during-scroll-expected.txt b/third_party/WebKit/LayoutTests/fast/scrolling/hover-during-scroll-expected.txt
index 0dda9d0..eeb6cab 100644
--- a/third_party/WebKit/LayoutTests/fast/scrolling/hover-during-scroll-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/scrolling/hover-during-scroll-expected.txt
@@ -43,12 +43,14 @@
 PASS array[2].innerHTML is "hover over me"
 Mouse is visible, scrolling page so the mouse ends up on the third div.
 PASS document.scrollingElement.scrollTop is 0
+PASS document.scrollingElement.scrollTop == elementHeight became true
 PASS array[0].innerHTML is "was hovered"
 PASS array[1].innerHTML is "was hovered"
 PASS array[2].innerHTML is "currently hovered"
 PASS array[3].innerHTML is "hover over me"
 Mouse is not visible, scrolling page so the mouse ends up on the fourth div.
 PASS document.scrollingElement.scrollTop is 50
+PASS document.scrollingElement.scrollTop == elementHeight*2 became true
 PASS array[0].innerHTML is "was hovered"
 PASS array[1].innerHTML is "was hovered"
 PASS array[2].innerHTML is "currently hovered"
diff --git a/third_party/WebKit/LayoutTests/fast/scrolling/hover-during-scroll.html b/third_party/WebKit/LayoutTests/fast/scrolling/hover-during-scroll.html
index dd43bcd4..ec78794 100644
--- a/third_party/WebKit/LayoutTests/fast/scrolling/hover-during-scroll.html
+++ b/third_party/WebKit/LayoutTests/fast/scrolling/hover-during-scroll.html
@@ -45,11 +45,8 @@
 
 function scrolledWhileCursorVisible()
 {
-    // The delay is necessary to guarantee that the fake mouse move
-    // event timer has fired. But since the cursor is visible, we
-    // can stop waiting as soon as the hover effect has been invoked.
     var elementHovered = array[2].innerHTML == textWhenHovered;
-    if (!elementHovered && Date.now() - startTime < fakeMouseMoveTimerDelay) {
+    if (!elementHovered) {
         window.setTimeout(scrolledWhileCursorVisible, 10);
         return;
     }
@@ -64,13 +61,13 @@
     internals.setIsCursorVisible(document, false);
     startTime = Date.now();
     eventSender.continuousMouseScrollBy(0, -elementHeight);
-    scrolledWhileCursorNotVisible();
+    shouldBecomeEqual('document.scrollingElement.scrollTop == elementHeight*2', 'true', scrolledWhileCursorNotVisible);
 }
 
 var array;
 var numHoverElements = 30;
 var elementHeight = 50;
-var fakeMouseMoveTimerDelay = 150;
+var fakeMouseMoveTimerDelay = 500;
 var textWhenNotHovered = "hover over me";
 var textWhenHovered = "currently hovered";
 var textWhenWasHovered = "was hovered";
@@ -119,7 +116,7 @@
     shouldBe("document.scrollingElement.scrollTop", "0");
     startTime = Date.now();
     eventSender.continuousMouseScrollBy(0, -elementHeight);
-    scrolledWhileCursorVisible();
+    shouldBecomeEqual('document.scrollingElement.scrollTop == elementHeight', 'true', scrolledWhileCursorVisible);
 }
 
 function buildPage()
diff --git a/third_party/WebKit/LayoutTests/fast/scrolling/keyboard-scroll-page-scale.html b/third_party/WebKit/LayoutTests/fast/scrolling/keyboard-scroll-page-scale.html
index fa65fc8f..252b588 100644
--- a/third_party/WebKit/LayoutTests/fast/scrolling/keyboard-scroll-page-scale.html
+++ b/third_party/WebKit/LayoutTests/fast/scrolling/keyboard-scroll-page-scale.html
@@ -110,6 +110,7 @@
         'scroll to see the divs at the bounds.)');
 
     if (window.eventSender && window.internals) {
+      internals.settings.setScrollAnimatorEnabled(false);
       reset();
       debug('Testing arrow keys:');
       testArrowKeys();
diff --git a/third_party/WebKit/LayoutTests/fast/scrolling/listbox-wheel-event.html b/third_party/WebKit/LayoutTests/fast/scrolling/listbox-wheel-event.html
index 19259a8..b6a6f0d6 100644
--- a/third_party/WebKit/LayoutTests/fast/scrolling/listbox-wheel-event.html
+++ b/third_party/WebKit/LayoutTests/fast/scrolling/listbox-wheel-event.html
@@ -12,6 +12,7 @@
 <body onload="test()">
     <select multiple id="sel" style="width:500px; height:300px;"></select>
     <script>
+        internals.settings.setScrollAnimatorEnabled(false);
         sel = document.getElementById("sel");
         for (var i = 0; i < 50; i++) {
             option = document.createElement("option");
diff --git a/third_party/WebKit/LayoutTests/fast/scrolling/overflow-scrollability-expected.txt b/third_party/WebKit/LayoutTests/fast/scrolling/overflow-scrollability-expected.txt
index 90b22e5b..587351a 100644
--- a/third_party/WebKit/LayoutTests/fast/scrolling/overflow-scrollability-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/scrolling/overflow-scrollability-expected.txt
@@ -3,33 +3,17 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+PASS div.scrollTop == window.pixelsPerWheelTick && div.scrollLeft == window.pixelsPerWheelTick became true
+PASS div.scrollTop == window.pixelsPerWheelTick && div.scrollLeft == window.pixelsPerWheelTick became true
+PASS div.scrollTop == 0 && div.scrollLeft == 0 became true
+PASS div.scrollTop == window.pixelsPerWheelTick && div.scrollLeft == window.pixelsPerWheelTick became true
+PASS div.scrollTop == 0 && div.scrollLeft == 0 became true
+PASS div.scrollTop == 0 && div.scrollLeft == 0 became true
+PASS div.scrollTop == 0 && div.scrollLeft == 0 became true
+PASS div.scrollTop == 0 && div.scrollLeft == 0 became true
 PASS successfullyParsed is true
 
 TEST COMPLETE
-===overflow:scroll with overflow
-PASS div.scrollTop is window.pixelsPerWheelTick
-PASS div.scrollLeft is window.pixelsPerWheelTick
-===overflow:auto with overflow
-PASS div.scrollTop is window.pixelsPerWheelTick
-PASS div.scrollLeft is window.pixelsPerWheelTick
-===overflow:hidden with overflow
-PASS div.scrollTop is 0
-PASS div.scrollLeft is 0
-===overflow:overlay with overflow
-PASS div.scrollTop is window.pixelsPerWheelTick
-PASS div.scrollLeft is window.pixelsPerWheelTick
-===overflow:scroll without overflow
-PASS div.scrollTop is 0
-PASS div.scrollLeft is 0
-===overflow:auto without overflow
-PASS div.scrollTop is 0
-PASS div.scrollLeft is 0
-===overflow:hidden without overflow
-PASS div.scrollTop is 0
-PASS div.scrollLeft is 0
-===overflow:overlay without overflow
-PASS div.scrollTop is 0
-PASS div.scrollLeft is 0
 scroll with overflow
 Content
 auto with overflow
diff --git a/third_party/WebKit/LayoutTests/fast/scrolling/overflow-scrollability.html b/third_party/WebKit/LayoutTests/fast/scrolling/overflow-scrollability.html
index 8eff4c4..a50b09d 100644
--- a/third_party/WebKit/LayoutTests/fast/scrolling/overflow-scrollability.html
+++ b/third_party/WebKit/LayoutTests/fast/scrolling/overflow-scrollability.html
@@ -3,6 +3,9 @@
 <head>
     <script src="../../resources/js-test.js"></script>
     <script>
+        window.jsTestIsAsync = true;
+        var testScrolls = [];
+        var currentTest = -1;
         var div;
         var pixelsPerWheelTick = 40;
 
@@ -12,80 +15,40 @@
             eventSender.mouseScrollBy(-1,0);
         }
 
-        function checkOffsets() {
-            div = document.getElementById("overflow-1");
-            debug("===overflow:scroll with overflow");
-            shouldBe('div.scrollTop', 'window.pixelsPerWheelTick');
-            shouldBe('div.scrollLeft', 'window.pixelsPerWheelTick');
-
-            div = document.getElementById("overflow-2");
-            debug("===overflow:auto with overflow");
-            shouldBe('div.scrollTop', 'window.pixelsPerWheelTick');
-            shouldBe('div.scrollLeft', 'window.pixelsPerWheelTick');
-
-            div = document.getElementById("overflow-3");
-            debug("===overflow:hidden with overflow");
-            shouldBe('div.scrollTop', '0');
-            shouldBe('div.scrollLeft', '0');
-
-            div = document.getElementById("overflow-4");
-            debug("===overflow:overlay with overflow");
-            shouldBe('div.scrollTop', 'window.pixelsPerWheelTick');
-            shouldBe('div.scrollLeft', 'window.pixelsPerWheelTick');
-
-            div = document.getElementById("no-overflow-1");
-            debug("===overflow:scroll without overflow");
-            shouldBe('div.scrollTop', '0');
-            shouldBe('div.scrollLeft', '0');
-
-            div = document.getElementById("no-overflow-2");
-            debug("===overflow:auto without overflow");
-            shouldBe('div.scrollTop', '0');
-            shouldBe('div.scrollLeft', '0');
-
-            div = document.getElementById("no-overflow-3");
-            debug("===overflow:hidden without overflow");
-            shouldBe('div.scrollTop', '0');
-            shouldBe('div.scrollLeft', '0');
-
-            div = document.getElementById("no-overflow-4");
-            debug("===overflow:overlay without overflow");
-            shouldBe('div.scrollTop', '0');
-            shouldBe('div.scrollLeft', '0');
-
-            testRunner.notifyDone();
+        function startNextTestCase() {
+            currentTest++;
+            if (currentTest >= testScrolls.length) {
+                finishJSTest();
+                return;
+            }
+            var testCase = testScrolls[currentTest];
+            div = document.getElementById(testCase.elem);
+            tryScroll();
+            shouldBecomeEqual("div.scrollTop == " + testCase.expTop + " && " +
+                "div.scrollLeft == " + testCase.expLeft, "true", startNextTestCase);
         }
 
         function test() {
             if (window.eventSender && window.testRunner) {
                 testRunner.waitUntilDone();
-
                 description('This tests that scrollable areas with the appropriate overflow mode set'
                         + ' are in fact scrollable by the user.');
 
-                div = document.getElementById("overflow-1");
-                tryScroll();
-                div = document.getElementById("overflow-2");
-                tryScroll();
-                div = document.getElementById("overflow-3");
-                tryScroll();
-                div = document.getElementById("overflow-4");
-                tryScroll();
-                div = document.getElementById("no-overflow-1");
-                tryScroll();
-                div = document.getElementById("no-overflow-2");
-                tryScroll();
-                div = document.getElementById("no-overflow-3");
-                tryScroll();
-                div = document.getElementById("no-overflow-4");
-                tryScroll();
-
-                setTimeout('checkOffsets();', 100);
+                testScrolls = [
+                    {elem: "overflow-1", expLeft: "window.pixelsPerWheelTick" , expTop: "window.pixelsPerWheelTick"},
+                    {elem: "overflow-2", expLeft: "window.pixelsPerWheelTick" , expTop: "window.pixelsPerWheelTick"},
+                    {elem: "overflow-3", expLeft: 0 , expTop: 0},
+                    {elem: "overflow-4", expLeft: "window.pixelsPerWheelTick" , expTop: "window.pixelsPerWheelTick"},
+                    {elem: "no-overflow-1", expLeft: 0 , expTop: 0},
+                    {elem: "no-overflow-2", expLeft: 0 , expTop: 0},
+                    {elem: "no-overflow-3", expLeft: 0 , expTop: 0},
+                    {elem: "no-overflow-4", expLeft: 0 , expTop: 0},
+                ];
+                startNextTestCase();
             } else {
                 debug("FAIL: This test requires window.eventSender.");
             }
         }
-
     </script>
 </head>
 <body style="margin: 0" onload="test()">
diff --git a/third_party/WebKit/LayoutTests/fast/scrolling/scrollbar-prevent-default-expected.txt b/third_party/WebKit/LayoutTests/fast/scrolling/scrollbar-prevent-default-expected.txt
index c139d63..7e03694 100644
--- a/third_party/WebKit/LayoutTests/fast/scrolling/scrollbar-prevent-default-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/scrolling/scrollbar-prevent-default-expected.txt
@@ -3,10 +3,10 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS window.scrollY is 0
 PASS receivedMousedownEvent is true
-PASS subframe.scrollTop is 0
+PASS window.scrollY became 0
 PASS receivedMousedownEvent is true
+PASS subframe.scrollTop became 0
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/fast/scrolling/scrollbar-prevent-default.html b/third_party/WebKit/LayoutTests/fast/scrolling/scrollbar-prevent-default.html
index 847e772..aafc4b4a 100644
--- a/third_party/WebKit/LayoutTests/fast/scrolling/scrollbar-prevent-default.html
+++ b/third_party/WebKit/LayoutTests/fast/scrolling/scrollbar-prevent-default.html
@@ -26,6 +26,8 @@
     <pre id="console"></pre>
 </body>
 <script>
+    jsTestIsAsync = true;
+
     description('This tests that scrollbars always receive events even when there is an element underneath the scrollbar which swallows the event. In this case an event handler is added to the window which swallows the event but this may also happen with elements underneath of overlay scrollbars.');
     if (window.testRunner)
         testRunner.dumpAsText();
@@ -39,27 +41,35 @@
         receivedMousedownEvent = true;
     });
 
-    // Test the frame scrollbar.
-    window.scrollTo(0, 10);
-    if (window.eventSender) {
-        eventSender.mouseMoveTo(window.innerWidth - 5, 1);
-        eventSender.mouseDown();
-        eventSender.mouseUp();
+    function testFrameScrollbar() {
+        // Test the frame scrollbar.
+        window.scrollTo(0, 10);
+        if (window.eventSender) {
+            eventSender.mouseMoveTo(window.innerWidth - 5, 1);
+            eventSender.mouseDown();
+            eventSender.mouseUp();
+        }
+        shouldBe('receivedMousedownEvent', 'true');
+        shouldBecomeEqual('window.scrollY', '0', function() {
+            testDivScrollbar();
+        });
     }
 
-    shouldBe('window.scrollY', '0');
-    shouldBe('receivedMousedownEvent', 'true');
-
-    // Test a div scrollbar.
-    receivedMousedownEvent = false;
-    var subframe = document.getElementById('subframe');
-    subframe.scrollTop = 10;
-    if (window.eventSender) {
-        eventSender.mouseMoveTo(100 - 5, 1);
-        eventSender.mouseDown();
-        eventSender.mouseUp();
+    function testDivScrollbar() {
+        // Test a div scrollbar.
+        receivedMousedownEvent = false;
+        var subframe = document.getElementById('subframe');
+        subframe.scrollTop = 10;
+        if (window.eventSender) {
+            eventSender.mouseMoveTo(100 - 5, 1);
+            eventSender.mouseDown();
+            eventSender.mouseUp();
+        }
+        shouldBe('receivedMousedownEvent', 'true');
+        shouldBecomeEqual('subframe.scrollTop', '0', function(){
+            finishJSTest();
+        });
     }
 
-    shouldBe('subframe.scrollTop', '0');
-    shouldBe('receivedMousedownEvent', 'true');
+    testFrameScrollbar();
 </script>
diff --git a/third_party/WebKit/LayoutTests/http/tests/navigation/same-document-scroll-position-restore-expected.txt b/third_party/WebKit/LayoutTests/http/tests/navigation/same-document-scroll-position-restore-expected.txt
index f76fb77f..5b099ef 100644
--- a/third_party/WebKit/LayoutTests/http/tests/navigation/same-document-scroll-position-restore-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/navigation/same-document-scroll-position-restore-expected.txt
@@ -1,2 +1,6 @@
+PASS window.scrollY == 800 became true
+PASS successfullyParsed is true
+
+TEST COMPLETE
 Link to bottom
 scrollY should be 800: PASS
diff --git a/third_party/WebKit/LayoutTests/http/tests/navigation/same-document-scroll-position-restore.html b/third_party/WebKit/LayoutTests/http/tests/navigation/same-document-scroll-position-restore.html
index e4ff424..a7f9c4d 100644
--- a/third_party/WebKit/LayoutTests/http/tests/navigation/same-document-scroll-position-restore.html
+++ b/third_party/WebKit/LayoutTests/http/tests/navigation/same-document-scroll-position-restore.html
@@ -3,23 +3,28 @@
 <a id="a" href="#bottom">Link to bottom</a>
 <div style="height: 1000px"></div>
 <a name="bottom"></a>
+<script src="/js-test-resources/js-test.js"></script>
 <script>
 if (window.testRunner) {
+    window.jsTestIsAsync = true;
     testRunner.dumpAsText();
     testRunner.waitUntilDone();
 }
 
 window.onload = function() {
     if (window.eventSender) {
-        eventSender.mouseScrollBy(0, -20);
-        var a = document.getElementById("a");
-        eventSender.mouseMoveTo(a.offsetLeft + 2, a.offsetTop - 798);
-        eventSender.mouseDown();
-        eventSender.mouseUp();
+        function clickLink() {
+            var a = document.getElementById("a");
+            eventSender.mouseMoveTo(a.offsetLeft + 2, a.offsetTop - 798);
+            eventSender.mouseDown();
+            eventSender.mouseUp();
+        }
+        eventSender.continuousMouseScrollBy(0, -800);
+        shouldBecomeEqual("window.scrollY == 800", "true", clickLink);
     }
 };
 
-var haveSeenHashChange = false;
+var haveSeenHashChange =  false;
 
 window.onhashchange = function() {
     if (!haveSeenHashChange) {
@@ -27,8 +32,7 @@
         history.back();
     } else {
         document.body.appendChild(document.createTextNode("scrollY should be 800: " + (window.scrollY == 800 ? "PASS" : "FAIL")));
-        if (window.testRunner)
-            testRunner.notifyDone();
+        finishJSTest();
     }
 }
 </script>
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/editing/spelling/inline-spelling-markers-hidpi-composited-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/editing/spelling/inline-spelling-markers-hidpi-composited-expected.png
index 80c35b6..a5e7870cd 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-lion/editing/spelling/inline-spelling-markers-hidpi-composited-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac-lion/editing/spelling/inline-spelling-markers-hidpi-composited-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mavericks/editing/spelling/inline-spelling-markers-hidpi-composited-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mavericks/editing/spelling/inline-spelling-markers-hidpi-composited-expected.png
index 7ab3ac5b..b1fa1ebb 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mavericks/editing/spelling/inline-spelling-markers-hidpi-composited-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac-mavericks/editing/spelling/inline-spelling-markers-hidpi-composited-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/editing/spelling/inline-spelling-markers-hidpi-composited-expected.png b/third_party/WebKit/LayoutTests/platform/mac/editing/spelling/inline-spelling-markers-hidpi-composited-expected.png
index 2ad50ec..001f1e6c 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/editing/spelling/inline-spelling-markers-hidpi-composited-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/editing/spelling/inline-spelling-markers-hidpi-composited-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/events/platform-wheelevent-paging-x-in-scrolling-page-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/events/platform-wheelevent-paging-x-in-scrolling-page-expected.txt
index f657136..b1b20a5 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/events/platform-wheelevent-paging-x-in-scrolling-page-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/events/platform-wheelevent-paging-x-in-scrolling-page-expected.txt
@@ -1,8 +1,7 @@
 PASS event.wheelDeltaY is 0
 PASS event.wheelDeltaX is window.givenScrollLeft * -3
 PASS event.wheelDelta is window.givenScrollLeft * -3
-PASS document.scrollingElement.scrollTop is window.expectedScrollTop
-FAIL document.scrollingElement.scrollLeft should be 700. Was 760.
+FAIL document.scrollingElement.scrollTop == window.expectedScrollTop && document.scrollingElement.scrollLeft == window.expectedScrollLeft failed to change to true in 0.5 seconds.
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/events/platform-wheelevent-paging-y-in-scrolling-page-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/events/platform-wheelevent-paging-y-in-scrolling-page-expected.txt
index 08b6feb..64e2df2 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/events/platform-wheelevent-paging-y-in-scrolling-page-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/events/platform-wheelevent-paging-y-in-scrolling-page-expected.txt
@@ -1,8 +1,7 @@
 PASS event.wheelDeltaY is window.givenScrollTop * -3
 PASS event.wheelDeltaX is 0
 PASS event.wheelDelta is window.givenScrollTop * -3
-FAIL document.scrollingElement.scrollTop should be 525. Was 560.
-PASS document.scrollingElement.scrollLeft is window.expectedScrollLeft
+FAIL document.scrollingElement.scrollTop == window.expectedScrollTop && document.scrollingElement.scrollLeft == window.expectedScrollLeft failed to change to true in 0.5 seconds.
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/events/platform-wheelevent-paging-x-in-scrolling-page-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/events/platform-wheelevent-paging-x-in-scrolling-page-expected.txt
index 14c98ce..2ddfc34 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/events/platform-wheelevent-paging-x-in-scrolling-page-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/events/platform-wheelevent-paging-x-in-scrolling-page-expected.txt
@@ -1,8 +1,7 @@
 PASS event.wheelDeltaY is 0
 PASS event.wheelDeltaX is window.givenScrollLeft * -3
 PASS event.wheelDelta is window.givenScrollLeft * -3
-PASS document.scrollingElement.scrollTop is window.expectedScrollTop
-PASS document.scrollingElement.scrollLeft is window.expectedScrollLeft
+PASS document.scrollingElement.scrollTop == window.expectedScrollTop && document.scrollingElement.scrollLeft == window.expectedScrollLeft became true
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/events/platform-wheelevent-paging-y-in-scrolling-page-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/events/platform-wheelevent-paging-y-in-scrolling-page-expected.txt
index 411e24b..8e1ecfc 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/events/platform-wheelevent-paging-y-in-scrolling-page-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/events/platform-wheelevent-paging-y-in-scrolling-page-expected.txt
@@ -1,8 +1,7 @@
 PASS event.wheelDeltaY is window.givenScrollTop * -3
 PASS event.wheelDeltaX is 0
 PASS event.wheelDelta is window.givenScrollTop * -3
-PASS document.scrollingElement.scrollTop is window.expectedScrollTop
-PASS document.scrollingElement.scrollLeft is window.expectedScrollLeft
+PASS document.scrollingElement.scrollTop == window.expectedScrollTop && document.scrollingElement.scrollLeft == window.expectedScrollLeft became true
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/resources/js-test.js b/third_party/WebKit/LayoutTests/resources/js-test.js
index ba1d8ac..2811201 100644
--- a/third_party/WebKit/LayoutTests/resources/js-test.js
+++ b/third_party/WebKit/LayoutTests/resources/js-test.js
@@ -269,7 +269,7 @@
     testFailed(_a + " should be " + _bv + " (of type " + typeof _bv + "). Was " + _av + " (of type " + typeof _av + ").");
 }
 
-// Execute condition every 5 milliseconds until it succeed or failureTime is reached.
+// Execute condition every animation frame until it succeeds or failureTime is reached.
 // completionHandler is executed on success, failureHandler is executed on timeout.
 function _waitForCondition(condition, failureTime, completionHandler, failureHandler)
 {
@@ -278,7 +278,9 @@
   } else if (Date.now() > failureTime) {
     failureHandler();
   } else {
-    setTimeout(_waitForCondition, 5, condition, failureTime, completionHandler, failureHandler);
+    requestAnimationFrame(function() {
+      _waitForCondition(condition, failureTime, completionHandler, failureHandler);
+    });
   }
 }
 
diff --git a/third_party/WebKit/Source/core/css/CSSProperty.cpp b/third_party/WebKit/Source/core/css/CSSProperty.cpp
index e64f93a..2b10755 100644
--- a/third_party/WebKit/Source/core/css/CSSProperty.cpp
+++ b/third_party/WebKit/Source/core/css/CSSProperty.cpp
@@ -28,7 +28,7 @@
 
 struct SameSizeAsCSSProperty {
     uint32_t bitfields;
-    void* value;
+    RawPtrWillBeMember<void*> value;
 };
 
 static_assert(sizeof(CSSProperty) == sizeof(SameSizeAsCSSProperty), "CSSProperty should stay small");
diff --git a/third_party/WebKit/Source/core/css/RuleSet.h b/third_party/WebKit/Source/core/css/RuleSet.h
index 203d177..d0ff80e1 100644
--- a/third_party/WebKit/Source/core/css/RuleSet.h
+++ b/third_party/WebKit/Source/core/css/RuleSet.h
@@ -111,7 +111,7 @@
 
 struct SameSizeAsRuleData {
     DISALLOW_NEW();
-    void* a;
+    RawPtrWillBeMember<void*> a;
     unsigned b;
     unsigned c;
     unsigned d[4];
diff --git a/third_party/WebKit/Source/core/dom/ElementData.cpp b/third_party/WebKit/Source/core/dom/ElementData.cpp
index 706dba0..29dc6f3 100644
--- a/third_party/WebKit/Source/core/dom/ElementData.cpp
+++ b/third_party/WebKit/Source/core/dom/ElementData.cpp
@@ -39,7 +39,8 @@
 
 struct SameSizeAsElementData : public RefCountedWillBeGarbageCollectedFinalized<SameSizeAsElementData> {
     unsigned bitfield;
-    void* pointers[3];
+    RawPtrWillBeMember<void*> willbeMember;
+    void* pointers[2];
 };
 
 static_assert(sizeof(ElementData) == sizeof(SameSizeAsElementData), "ElementData should stay small");
diff --git a/third_party/WebKit/Source/core/dom/ElementRareData.cpp b/third_party/WebKit/Source/core/dom/ElementRareData.cpp
index d17b534..edd8ba49 100644
--- a/third_party/WebKit/Source/core/dom/ElementRareData.cpp
+++ b/third_party/WebKit/Source/core/dom/ElementRareData.cpp
@@ -39,8 +39,9 @@
     short indices[2];
     LayoutSize sizeForResizing;
     IntSize scrollOffset;
-    void* pointers[12];
-    PersistentWillBeMember<void*> member[1];
+    void* pointer;
+    RawPtrWillBeMember<void*> willbeMember[11];
+    PersistentWillBeMember<void*> persistent[1];
 };
 
 CSSStyleDeclaration& ElementRareData::ensureInlineCSSStyleDeclaration(Element* ownerElement)
diff --git a/third_party/WebKit/Source/core/dom/Node.cpp b/third_party/WebKit/Source/core/dom/Node.cpp
index ce58a2e..9c1b87a5 100644
--- a/third_party/WebKit/Source/core/dom/Node.cpp
+++ b/third_party/WebKit/Source/core/dom/Node.cpp
@@ -99,7 +99,8 @@
 
 struct SameSizeAsNode : NODE_BASE_CLASSES {
     uint32_t m_nodeFlags;
-    void* m_pointer[5];
+    RawPtrWillBeMember<void*> m_willbeMember[4];
+    void* m_pointer;
 };
 
 static_assert(sizeof(Node) <= sizeof(SameSizeAsNode), "Node should stay small");
diff --git a/third_party/WebKit/Source/core/dom/NodeRareData.cpp b/third_party/WebKit/Source/core/dom/NodeRareData.cpp
index d31d5037..b70a454 100644
--- a/third_party/WebKit/Source/core/dom/NodeRareData.cpp
+++ b/third_party/WebKit/Source/core/dom/NodeRareData.cpp
@@ -40,8 +40,8 @@
 namespace blink {
 
 struct SameSizeAsNodeRareData {
-    void* m_pointer[2];
-    OwnPtrWillBeMember<NodeMutationObserverData> m_mutationObserverData;
+    void* m_pointer;
+    RawPtrWillBeMember<void*> m_willbeMember[2];
     unsigned m_bitfields;
 };
 
diff --git a/third_party/WebKit/Source/core/dom/shadow/ComposedTreeTraversal.cpp b/third_party/WebKit/Source/core/dom/shadow/ComposedTreeTraversal.cpp
index 6421ed9..927472a 100644
--- a/third_party/WebKit/Source/core/dom/shadow/ComposedTreeTraversal.cpp
+++ b/third_party/WebKit/Source/core/dom/shadow/ComposedTreeTraversal.cpp
@@ -35,84 +35,61 @@
 
 static inline ElementShadow* shadowFor(const Node& node)
 {
-    return node.isElementNode() ? toElement(node).shadow() : 0;
+    return node.isElementNode() ? toElement(node).shadow() : nullptr;
 }
 
 Node* ComposedTreeTraversal::traverseChild(const Node& node, TraversalDirection direction)
 {
     ElementShadow* shadow = shadowFor(node);
-    return shadow ? traverseLightChildren(shadow->youngestShadowRoot(), direction)
-        : traverseLightChildren(node, direction);
+    if (shadow) {
+        ShadowRoot& shadowRoot = shadow->youngestShadowRoot();
+        return resolveDistributionStartingAt(direction == TraversalDirectionForward ? shadowRoot.firstChild() : shadowRoot.lastChild(), direction);
+    }
+    return resolveDistributionStartingAt(direction == TraversalDirectionForward ? node.firstChild() : node.lastChild(), direction);
 }
 
-Node* ComposedTreeTraversal::traverseLightChildren(const Node& node, TraversalDirection direction)
-{
-    return traverseSiblings(direction == TraversalDirectionForward ? node.firstChild() : node.lastChild(), direction);
-}
-
-Node* ComposedTreeTraversal::traverseSiblings(const Node* node, TraversalDirection direction)
+Node* ComposedTreeTraversal::resolveDistributionStartingAt(const Node* node, TraversalDirection direction)
 {
     for (const Node* sibling = node; sibling; sibling = (direction == TraversalDirectionForward ? sibling->nextSibling() : sibling->previousSibling())) {
-        if (Node* found = traverseNode(*sibling, direction))
+        if (!isActiveInsertionPoint(*sibling))
+            return const_cast<Node*>(sibling);
+        const InsertionPoint& insertionPoint = toInsertionPoint(*sibling);
+        if (Node* found = (direction == TraversalDirectionForward ? insertionPoint.firstDistributedNode() : insertionPoint.lastDistributedNode()))
             return found;
+        ASSERT(isHTMLShadowElement(insertionPoint) || (isHTMLContentElement(insertionPoint) && !insertionPoint.hasChildren()));
     }
-    return 0;
+    return nullptr;
 }
 
-Node* ComposedTreeTraversal::traverseNode(const Node& node, TraversalDirection direction)
-{
-    if (!isActiveInsertionPoint(node))
-        return const_cast<Node*>(&node);
-    const InsertionPoint& insertionPoint = toInsertionPoint(node);
-    if (Node* found = traverseDistributedNodes(direction == TraversalDirectionForward ? insertionPoint.firstDistributedNode() : insertionPoint.lastDistributedNode(), insertionPoint, direction))
-        return found;
-    ASSERT(isHTMLShadowElement(node) || (isHTMLContentElement(node) && !node.hasChildren()));
-    return 0;
-}
-
-Node* ComposedTreeTraversal::traverseDistributedNodes(const Node* node, const InsertionPoint& insertionPoint, TraversalDirection direction)
-{
-    for (const Node* next = node; next; next = (direction == TraversalDirectionForward ? insertionPoint.distributedNodeNextTo(next) : insertionPoint.distributedNodePreviousTo(next))) {
-        if (Node* found = traverseNode(*next, direction))
-            return found;
-    }
-    return 0;
-}
-
-Node* ComposedTreeTraversal::traverseSiblingOrBackToInsertionPoint(const Node& node, TraversalDirection direction)
+// TODO(hayato): This may return a wrong result for a node which is not in a
+// document composed tree.  See ComposedTreeTraversalTest's redistribution test for details.
+Node* ComposedTreeTraversal::traverseSiblings(const Node& node, TraversalDirection direction)
 {
     if (!shadowWhereNodeCanBeDistributed(node))
-        return traverseSiblingInCurrentTree(node, direction);
+        return traverseSiblingsOrShadowInsertionPointSiblings(node, direction);
 
-    const InsertionPoint* insertionPoint = resolveReprojection(&node);
-    if (!insertionPoint)
+    const InsertionPoint* finalDestination = resolveReprojection(&node);
+    if (!finalDestination)
         return nullptr;
-
-    if (Node* found = traverseDistributedNodes(direction == TraversalDirectionForward ? insertionPoint->distributedNodeNextTo(&node) : insertionPoint->distributedNodePreviousTo(&node), *insertionPoint, direction))
+    if (Node* found = (direction == TraversalDirectionForward ? finalDestination->distributedNodeNextTo(&node) : finalDestination->distributedNodePreviousTo(&node)))
         return found;
-    return traverseSiblingOrBackToInsertionPoint(*insertionPoint, direction);
+    return traverseSiblings(*finalDestination, direction);
 }
 
-Node* ComposedTreeTraversal::traverseSiblingInCurrentTree(const Node& node, TraversalDirection direction)
+Node* ComposedTreeTraversal::traverseSiblingsOrShadowInsertionPointSiblings(const Node& node, TraversalDirection direction)
 {
-    if (Node* found = traverseSiblings(direction == TraversalDirectionForward ? node.nextSibling() : node.previousSibling(), direction))
+    if (Node* found = resolveDistributionStartingAt(direction == TraversalDirectionForward ? node.nextSibling() : node.previousSibling(), direction))
         return found;
-    if (Node* next = traverseBackToYoungerShadowRoot(node, direction))
-        return next;
-    return 0;
-}
 
-Node* ComposedTreeTraversal::traverseBackToYoungerShadowRoot(const Node& node, TraversalDirection direction)
-{
     if (node.parentNode() && node.parentNode()->isShadowRoot()) {
         ShadowRoot* parentShadowRoot = toShadowRoot(node.parentNode());
         if (!parentShadowRoot->isYoungest()) {
             HTMLShadowElement* assignedInsertionPoint = parentShadowRoot->shadowInsertionPointOfYoungerShadowRoot();
             ASSERT(assignedInsertionPoint);
-            return traverseSiblingInCurrentTree(*assignedInsertionPoint, direction);
+            return traverseSiblingsOrShadowInsertionPointSiblings(*assignedInsertionPoint, direction);
         }
     }
-    return 0;
+    return nullptr;
 }
 
 // FIXME: Use an iterative algorithm so that it can be inlined.
diff --git a/third_party/WebKit/Source/core/dom/shadow/ComposedTreeTraversal.h b/third_party/WebKit/Source/core/dom/shadow/ComposedTreeTraversal.h
index 4e0c111..bb9d0e8 100644
--- a/third_party/WebKit/Source/core/dom/shadow/ComposedTreeTraversal.h
+++ b/third_party/WebKit/Source/core/dom/shadow/ComposedTreeTraversal.h
@@ -138,8 +138,7 @@
 #endif
     }
 
-    static Node* traverseNode(const Node&, TraversalDirection);
-    static Node* traverseLightChildren(const Node&, TraversalDirection);
+    static Node* resolveDistributionStartingAt(const Node*, TraversalDirection);
 
     static Node* traverseNext(const Node&);
     static Node* traverseNext(const Node&, const Node* stayWithin);
@@ -155,13 +154,8 @@
     static Node* traverseNextSibling(const Node&);
     static Node* traversePreviousSibling(const Node&);
 
-    static Node* traverseSiblingOrBackToInsertionPoint(const Node&, TraversalDirection);
-    static Node* traverseSiblingInCurrentTree(const Node&, TraversalDirection);
-
-    static Node* traverseSiblings(const Node*, TraversalDirection);
-    static Node* traverseDistributedNodes(const Node*, const InsertionPoint&, TraversalDirection);
-
-    static Node* traverseBackToYoungerShadowRoot(const Node&, TraversalDirection);
+    static Node* traverseSiblings(const Node&, TraversalDirection);
+    static Node* traverseSiblingsOrShadowInsertionPointSiblings(const Node&, TraversalDirection);
 
     static ContainerNode* traverseParentOrHost(const Node&);
     static Node* traverseNextAncestorSibling(const Node&);
@@ -185,7 +179,7 @@
 inline Node* ComposedTreeTraversal::nextSibling(const Node& node)
 {
     assertPrecondition(node);
-    Node* result = traverseSiblingOrBackToInsertionPoint(node, TraversalDirectionForward);
+    Node* result = traverseSiblings(node, TraversalDirectionForward);
     assertPostcondition(result);
     return result;
 }
@@ -193,7 +187,7 @@
 inline Node* ComposedTreeTraversal::previousSibling(const Node& node)
 {
     assertPrecondition(node);
-    Node* result = traverseSiblingOrBackToInsertionPoint(node, TraversalDirectionBackward);
+    Node* result = traverseSiblings(node, TraversalDirectionBackward);
     assertPostcondition(result);
     return result;
 }
@@ -230,7 +224,7 @@
         if (Node* sibling = traverseNextSibling(*next))
             return sibling;
     }
-    return 0;
+    return nullptr;
 }
 
 inline Node* ComposedTreeTraversal::traverseNext(const Node& node, const Node* stayWithin)
@@ -292,12 +286,12 @@
 
 inline Node* ComposedTreeTraversal::traverseNextSibling(const Node& node)
 {
-    return traverseSiblingOrBackToInsertionPoint(node, TraversalDirectionForward);
+    return traverseSiblings(node, TraversalDirectionForward);
 }
 
 inline Node* ComposedTreeTraversal::traversePreviousSibling(const Node& node)
 {
-    return traverseSiblingOrBackToInsertionPoint(node, TraversalDirectionBackward);
+    return traverseSiblings(node, TraversalDirectionBackward);
 }
 
 inline Node* ComposedTreeTraversal::traverseFirstChild(const Node& node)
diff --git a/third_party/WebKit/Source/core/dom/shadow/ComposedTreeTraversalTest.cpp b/third_party/WebKit/Source/core/dom/shadow/ComposedTreeTraversalTest.cpp
index ce2d9a2..faf40e9c 100644
--- a/third_party/WebKit/Source/core/dom/shadow/ComposedTreeTraversalTest.cpp
+++ b/third_party/WebKit/Source/core/dom/shadow/ComposedTreeTraversalTest.cpp
@@ -35,6 +35,8 @@
     // calling member functions in |ComposedTreeTraversal|.
     void setupSampleHTML(const char* mainHTML, const char* shadowHTML, unsigned);
 
+    void attachV0ShadowRoot(Element& shadowHost, const char* shadowInnerHTML);
+
 private:
     void SetUp() override;
 
@@ -64,6 +66,13 @@
     body->updateDistribution();
 }
 
+void ComposedTreeTraversalTest::attachV0ShadowRoot(Element& shadowHost, const char* shadowInnerHTML)
+{
+    RefPtrWillBeRawPtr<ShadowRoot> shadowRoot = shadowHost.createShadowRootInternal(ShadowRootType::V0, ASSERT_NO_EXCEPTION);
+    shadowRoot->setInnerHTML(String::fromUTF8(shadowInnerHTML), ASSERT_NO_EXCEPTION);
+    document().body()->updateDistribution();
+}
+
 void testCommonAncestor(Node* expectedResult, const Node& nodeA, const Node& nodeB)
 {
     Node* result1 = ComposedTreeTraversal::commonAncestor(nodeA, nodeB);
@@ -392,4 +401,47 @@
     EXPECT_EQ(nullptr, ComposedTreeTraversal::previousSibling(*m10));
 }
 
+TEST_F(ComposedTreeTraversalTest, redistribution)
+{
+    const char* mainHTML =
+        "<div id='m0'>m0</div>"
+        "<div id='m1'>"
+        "<span id='m10'>m10</span>"
+        "<span id='m11'>m11</span>"
+        "</div>"
+        "<div id='m2'>m2</div>";
+    const char* shadowHTML1 =
+        "<div id='s1'>"
+        "<content></content>"
+        "</div>";
+
+    setupSampleHTML(mainHTML, shadowHTML1, 1);
+
+    const char* shadowHTML2 =
+        "<div id='s2'>"
+        "<content select='#m10'></content>"
+        "<span id='s21'>s21</span>"
+        "</div>";
+
+    RefPtrWillBeRawPtr<Element> body = document().body();
+    RefPtrWillBeRawPtr<Element> m1 = body->querySelector("#m1", ASSERT_NO_EXCEPTION);
+    RefPtrWillBeRawPtr<Element> m10 = body->querySelector("#m10", ASSERT_NO_EXCEPTION);
+
+    RefPtrWillBeRawPtr<ShadowRoot> shadowRoot1 = m1->openShadowRoot();
+    RefPtrWillBeRawPtr<Element> s1 = shadowRoot1->querySelector("#s1", ASSERT_NO_EXCEPTION);
+
+    attachV0ShadowRoot(*s1, shadowHTML2);
+
+    RefPtrWillBeRawPtr<ShadowRoot> shadowRoot2 = s1->openShadowRoot();
+    RefPtrWillBeRawPtr<Element> s21 = shadowRoot2->querySelector("#s21", ASSERT_NO_EXCEPTION);
+
+    EXPECT_EQ(s21.get(), ComposedTreeTraversal::nextSibling(*m10));
+    EXPECT_EQ(m10.get(), ComposedTreeTraversal::previousSibling(*s21));
+
+    // ComposedTreeTraversal::traverseSiblings does not work for a node which is not in a document composed tree.
+    // e.g. The following test fails. The result of ComposedTreeTraversal::previousSibling(*m11)) will be #m10, instead of nullptr.
+    // RefPtrWillBeRawPtr<Element> m11 = body->querySelector("#m11", ASSERT_NO_EXCEPTION);
+    // EXPECT_EQ(nullptr, ComposedTreeTraversal::previousSibling(*m11));
+}
+
 } // namespace blink
diff --git a/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp b/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp
index ef36e27..0ad8b55 100644
--- a/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp
+++ b/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp
@@ -47,7 +47,7 @@
 #if ENABLE(OILPAN)
     char emptyClassFieldsDueToGCMixinMarker[1];
 #endif
-    void* pointers[3];
+    RawPtrWillBeMember<void*> willbeMember[3];
     unsigned countersAndFlags[1];
 };
 
diff --git a/third_party/WebKit/Source/platform/heap/Heap.cpp b/third_party/WebKit/Source/platform/heap/Heap.cpp
index 66850722..fd2b765e 100644
--- a/third_party/WebKit/Source/platform/heap/Heap.cpp
+++ b/third_party/WebKit/Source/platform/heap/Heap.cpp
@@ -75,28 +75,9 @@
     GCScope(ThreadState* state, BlinkGC::StackState stackState, BlinkGC::GCType gcType)
         : m_state(state)
         , m_gcForbiddenScope(state)
-        // See collectGarbageForTerminatingThread() comment on why a
-        // safepoint scope isn't entered for its GCScope.
-        , m_safePointScope(stackState, gcType != BlinkGC::ThreadTerminationGC ? state : nullptr)
-        , m_gcType(gcType)
-        , m_parkedAllThreads(false)
     {
-        TRACE_EVENT0("blink_gc", "Heap::GCScope");
-        const char* samplingState = TRACE_EVENT_GET_SAMPLING_STATE();
-        if (m_state->isMainThread())
-            TRACE_EVENT_SET_SAMPLING_STATE("blink_gc", "BlinkGCWaiting");
-
         ASSERT(m_state->checkThread());
 
-        double startTime = WTF::currentTimeMS();
-        // TODO(haraken): In an unlikely coincidence that two threads decide
-        // to collect garbage at the same time, avoid doing two GCs in
-        // a row.
-        if (LIKELY(gcType != BlinkGC::ThreadTerminationGC && ThreadState::stopThreads()))
-            m_parkedAllThreads = true;
-        double timeForStoppingThreads = WTF::currentTimeMS() - startTime;
-        Platform::current()->histogramCustomCounts("BlinkGC.TimeForStoppingThreads", timeForStoppingThreads, 1, 1000, 50);
-
         switch (gcType) {
         case BlinkGC::GCWithSweep:
         case BlinkGC::GCWithoutSweep:
@@ -111,33 +92,58 @@
         default:
             ASSERT_NOT_REACHED();
         }
-
-        if (m_state->isMainThread())
-            TRACE_EVENT_SET_NONCONST_SAMPLING_STATE(samplingState);
     }
 
-    bool allThreadsParked() const { return m_parkedAllThreads; }
-    Visitor* visitor() const { return m_visitor.get(); }
-
     ~GCScope()
     {
-        // Only cleanup if we parked all threads in which case the GC happened
-        // and we need to resume the other threads.
-        if (LIKELY(m_gcType != BlinkGC::ThreadTerminationGC && m_parkedAllThreads))
-            ThreadState::resumeThreads();
     }
 
+    bool parkAllThreads(BlinkGC::StackState stackState, BlinkGC::GCType gcType)
+    {
+        TRACE_EVENT0("blink_gc", "Heap::GCScope");
+        const char* samplingState = TRACE_EVENT_GET_SAMPLING_STATE();
+        if (m_state->isMainThread())
+            TRACE_EVENT_SET_SAMPLING_STATE("blink_gc", "BlinkGCWaiting");
+
+        // TODO(haraken): In an unlikely coincidence that two threads decide
+        // to collect garbage at the same time, avoid doing two GCs in
+        // a row and return false.
+        double startTime = WTF::currentTimeMS();
+        bool allParked = gcType != BlinkGC::ThreadTerminationGC && ThreadState::stopThreads();
+        double timeForStoppingThreads = WTF::currentTimeMS() - startTime;
+        Platform::current()->histogramCustomCounts("BlinkGC.TimeForStoppingThreads", timeForStoppingThreads, 1, 1000, 50);
+
+        if (m_state->isMainThread())
+            TRACE_EVENT_SET_NONCONST_SAMPLING_STATE(samplingState);
+
+        return allParked;
+    }
+
+    Visitor* visitor() const { return m_visitor.get(); }
+
 private:
     ThreadState* m_state;
-    // The ordering of the two scope objects matters: GCs must first be forbidden
-    // before entering the safe point scope. Prior to reaching the safe point,
-    // ThreadState::runScheduledGC() is called. See its comment why we need
-    // to be in a GC forbidden scope when doing so.
+    // See ThreadState::runScheduledGC() why we need to already be in a
+    // GCForbiddenScope before any safe point is entered.
     GCForbiddenScope m_gcForbiddenScope;
-    SafePointScope m_safePointScope;
-    BlinkGC::GCType m_gcType;
     OwnPtr<Visitor> m_visitor;
-    bool m_parkedAllThreads; // False if we fail to park all threads
+};
+
+class ResumeThreadScope {
+public:
+    explicit ResumeThreadScope(BlinkGC::GCType gcType)
+        : m_resumeThreads(gcType != BlinkGC::ThreadTerminationGC)
+    {
+    }
+    ~ResumeThreadScope()
+    {
+        // Only cleanup if we parked all threads in which case the GC happened
+        // and we need to resume the other threads.
+        if (m_resumeThreads)
+            ThreadState::resumeThreads();
+    }
+private:
+    bool m_resumeThreads;
 };
 
 void Heap::flushHeapDoesNotContainCache()
@@ -381,11 +387,17 @@
     state->completeSweep();
 
     GCScope gcScope(state, stackState, gcType);
-    // Check if we successfully parked the other threads.  If not we bail out of
-    // the GC.
-    if (!gcScope.allThreadsParked())
+    // See collectGarbageForTerminatingThread() comment on why a
+    // safepoint scope isn't entered for it.
+    SafePointScope safePointScope(stackState, gcType != BlinkGC::ThreadTerminationGC ? state : nullptr);
+
+    // Try to park the other threads. If we're unable to, bail out of the GC.
+    if (!gcScope.parkAllThreads(stackState, gcType))
         return;
 
+    // Resume all parked threads upon leaving this scope.
+    ResumeThreadScope resumeThreads(gcType);
+
     if (state->isMainThread())
         ScriptForbiddenScope::enter();
 
diff --git a/tools/android/forwarder2/pipe_notifier.cc b/tools/android/forwarder2/pipe_notifier.cc
index ff944fbc3..9be8bfb7 100644
--- a/tools/android/forwarder2/pipe_notifier.cc
+++ b/tools/android/forwarder2/pipe_notifier.cc
@@ -4,6 +4,7 @@
 
 #include "tools/android/forwarder2/pipe_notifier.h"
 
+#include <errno.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <sys/socket.h>
diff --git a/tools/android/forwarder2/socket.cc b/tools/android/forwarder2/socket.cc
index 23ff886..ae8a6c0 100644
--- a/tools/android/forwarder2/socket.cc
+++ b/tools/android/forwarder2/socket.cc
@@ -5,6 +5,7 @@
 #include "tools/android/forwarder2/socket.h"
 
 #include <arpa/inet.h>
+#include <errno.h>
 #include <fcntl.h>
 #include <netdb.h>
 #include <netinet/in.h>