summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsdefresne <sdefresne@chromium.org>2015-09-18 02:47:51 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-18 09:48:29 +0000
commit50c1e529587af459c14828ebe48d2e018d4b8e98 (patch)
treefce899626a1def4c171c4e348101d67746058eca
parentc956799bbab4a8ef3c3f223f5179847a89d2eda1 (diff)
downloadchromium_src-50c1e529587af459c14828ebe48d2e018d4b8e98.zip
chromium_src-50c1e529587af459c14828ebe48d2e018d4b8e98.tar.gz
chromium_src-50c1e529587af459c14828ebe48d2e018d4b8e98.tar.bz2
Add syncable_prefs namespace.
Move all the code in the syncable_prefs components into the namespace syncable_prefs and fix usage. Change automated with tools/git/mffr.py with manual fixes for the class forward-declaration. BUG=520542 TBR=jochen@chromium.org Review URL: https://codereview.chromium.org/1353913003 Cr-Commit-Position: refs/heads/master@{#349638}
-rw-r--r--chrome/browser/apps/drive/drive_app_mapping_unittest.cc4
-rw-r--r--chrome/browser/autofill/content_autofill_driver_browsertest.cc2
-rw-r--r--chrome/browser/bookmarks/managed_bookmark_service_unittest.cc2
-rw-r--r--chrome/browser/chromeos/customization/customization_document_unittest.cc4
-rw-r--r--chrome/browser/chromeos/events/event_rewriter_unittest.cc50
-rw-r--r--chrome/browser/chromeos/file_system_provider/registry_unittest.cc8
-rw-r--r--chrome/browser/chromeos/input_method/input_method_persistence_unittest.cc2
-rw-r--r--chrome/browser/chromeos/input_method/input_method_syncer.cc5
-rw-r--r--chrome/browser/chromeos/input_method/input_method_syncer.h10
-rw-r--r--chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager_unittest.cc11
-rw-r--r--chrome/browser/chromeos/login/users/avatar/user_image_sync_observer.h15
-rw-r--r--chrome/browser/chromeos/policy/consumer_enrollment_handler_unittest.cc2
-rw-r--r--chrome/browser/chromeos/policy/recommendation_restorer_unittest.cc13
-rw-r--r--chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_unittest.cc7
-rw-r--r--chrome/browser/chromeos/power/power_prefs_unittest.cc4
-rw-r--r--chrome/browser/chromeos/preferences.cc7
-rw-r--r--chrome/browser/chromeos/preferences.h16
-rw-r--r--chrome/browser/chromeos/preferences_unittest.cc2
-rw-r--r--chrome/browser/content_settings/content_settings_policy_provider_unittest.cc18
-rw-r--r--chrome/browser/content_settings/content_settings_pref_provider_unittest.cc17
-rw-r--r--chrome/browser/content_settings/host_content_settings_map_unittest.cc15
-rw-r--r--chrome/browser/download/chrome_download_manager_delegate_unittest.cc2
-rw-r--r--chrome/browser/extensions/component_loader_unittest.cc2
-rw-r--r--chrome/browser/extensions/extension_service_test_base.cc6
-rw-r--r--chrome/browser/extensions/extension_service_unittest.cc4
-rw-r--r--chrome/browser/extensions/external_pref_loader.cc9
-rw-r--r--chrome/browser/extensions/external_pref_loader.h14
-rw-r--r--chrome/browser/extensions/test_extension_prefs.cc2
-rw-r--r--chrome/browser/extensions/test_extension_prefs.h7
-rw-r--r--chrome/browser/font_family_cache_unittest.cc3
-rw-r--r--chrome/browser/invalidation/invalidator_storage_unittest.cc2
-rw-r--r--chrome/browser/net/ssl_config_service_manager_pref_unittest.cc6
-rw-r--r--chrome/browser/notifications/extension_welcome_notification.cc4
-rw-r--r--chrome/browser/notifications/extension_welcome_notification.h7
-rw-r--r--chrome/browser/password_manager/chrome_password_manager_client_unittest.cc2
-rw-r--r--chrome/browser/password_manager/password_store_proxy_mac_unittest.cc2
-rw-r--r--chrome/browser/plugins/plugin_info_message_filter_unittest.cc3
-rw-r--r--chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc7
-rw-r--r--chrome/browser/prefs/chrome_pref_model_associator_client.h5
-rw-r--r--chrome/browser/prefs/chrome_pref_service_factory.cc10
-rw-r--r--chrome/browser/prefs/chrome_pref_service_factory.h8
-rw-r--r--chrome/browser/prefs/chrome_pref_service_unittest.cc2
-rw-r--r--chrome/browser/prefs/command_line_pref_store_proxy_unittest.cc2
-rw-r--r--chrome/browser/prefs/incognito_mode_prefs_unittest.cc2
-rw-r--r--chrome/browser/prefs/pref_metrics_service.cc9
-rw-r--r--chrome/browser/prefs/pref_metrics_service.h3
-rw-r--r--chrome/browser/prefs/pref_service_syncable_util.cc15
-rw-r--r--chrome/browser/prefs/pref_service_syncable_util.h27
-rw-r--r--chrome/browser/prefs/proxy_policy_unittest.cc4
-rw-r--r--chrome/browser/prefs/session_startup_pref_unittest.cc4
-rw-r--r--chrome/browser/prefs/synced_pref_change_registrar_browsertest.cc10
-rw-r--r--chrome/browser/printing/cloud_print/cloud_print_proxy_service_unittest.cc30
-rw-r--r--chrome/browser/profile_resetter/automatic_profile_resetter_unittest.cc3
-rw-r--r--chrome/browser/profiles/gaia_info_update_service_unittest.cc6
-rw-r--r--chrome/browser/profiles/off_the_record_profile_impl.h4
-rw-r--r--chrome/browser/profiles/profile_destroyer_unittest.cc2
-rw-r--r--chrome/browser/profiles/profile_impl.h10
-rw-r--r--chrome/browser/profiles/profile_info_cache_unittest.cc2
-rw-r--r--chrome/browser/safe_browsing/incident_reporting/incident_reporting_service_unittest.cc4
-rw-r--r--chrome/browser/safe_browsing/incident_reporting/last_download_finder_unittest.cc4
-rw-r--r--chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector_unittest.cc4
-rw-r--r--chrome/browser/safe_browsing/incident_reporting/platform_state_store_win_unittest.cc7
-rw-r--r--chrome/browser/safe_browsing/incident_reporting/state_store_unittest.cc2
-rw-r--r--chrome/browser/signin/account_reconcilor_unittest.cc2
-rw-r--r--chrome/browser/signin/cross_device_promo_unittest.cc9
-rw-r--r--chrome/browser/signin/signin_global_error_unittest.cc2
-rw-r--r--chrome/browser/sync/profile_sync_service_autofill_unittest.cc2
-rw-r--r--chrome/browser/sync/profile_sync_service_startup_unittest.cc2
-rw-r--r--chrome/browser/sync/profile_sync_service_typed_url_unittest.cc2
-rw-r--r--chrome/browser/sync/profile_sync_service_unittest.cc2
-rw-r--r--chrome/browser/ui/app_list/search/suggestions/suggestions_search_provider_unittest.cc2
-rw-r--r--chrome/browser/ui/app_list/speech_auth_helper_unittest.cc2
-rw-r--r--chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc13
-rw-r--r--chrome/browser/ui/ash/launcher/chrome_launcher_controller.h25
-rw-r--r--chrome/browser/ui/bookmarks/bookmark_context_menu_controller_unittest.cc3
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm3
-rw-r--r--chrome/browser/ui/cocoa/cocoa_profile_test.mm2
-rw-r--r--chrome/browser/ui/cocoa/profiles/avatar_icon_controller_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/profiles/avatar_menu_bubble_controller_unittest.mm24
-rw-r--r--chrome/browser/ui/cocoa/profiles/profile_chooser_controller_unittest.mm31
-rw-r--r--chrome/browser/ui/cocoa/profiles/profile_menu_controller_unittest.mm11
-rw-r--r--chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc13
-rw-r--r--chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc3
-rw-r--r--chrome/test/base/testing_profile.cc9
-rw-r--r--chrome/test/base/testing_profile.h21
-rw-r--r--chrome/test/base/testing_profile_manager.cc5
-rw-r--r--chrome/test/base/testing_profile_manager.h7
-rw-r--r--components/syncable_prefs/pref_model_associator.cc4
-rw-r--r--components/syncable_prefs/pref_model_associator.h16
-rw-r--r--components/syncable_prefs/pref_model_associator_client.h4
-rw-r--r--components/syncable_prefs/pref_model_associator_unittest.cc4
-rw-r--r--components/syncable_prefs/pref_service_mock_factory.cc4
-rw-r--r--components/syncable_prefs/pref_service_mock_factory.h4
-rw-r--r--components/syncable_prefs/pref_service_syncable.cc4
-rw-r--r--components/syncable_prefs/pref_service_syncable.h10
-rw-r--r--components/syncable_prefs/pref_service_syncable_factory.cc4
-rw-r--r--components/syncable_prefs/pref_service_syncable_factory.h10
-rw-r--r--components/syncable_prefs/pref_service_syncable_observer.h4
-rw-r--r--components/syncable_prefs/pref_service_syncable_unittest.cc4
-rw-r--r--components/syncable_prefs/synced_pref_change_registrar.cc4
-rw-r--r--components/syncable_prefs/synced_pref_change_registrar.h4
-rw-r--r--components/syncable_prefs/synced_pref_observer.h4
-rw-r--r--components/syncable_prefs/testing_pref_service_syncable.cc13
-rw-r--r--components/syncable_prefs/testing_pref_service_syncable.h11
-rw-r--r--ios/chrome/browser/prefs/ios_chrome_pref_model_associator_client.h5
-rw-r--r--ios/chrome/browser/prefs/ios_chrome_pref_service_factory.cc15
-rw-r--r--ios/chrome/browser/prefs/ios_chrome_pref_service_factory.h12
-rw-r--r--ios/public/provider/chrome/browser/browser_state/chrome_browser_state.h9
108 files changed, 488 insertions, 335 deletions
diff --git a/chrome/browser/apps/drive/drive_app_mapping_unittest.cc b/chrome/browser/apps/drive/drive_app_mapping_unittest.cc
index 25777aa..7719a2d 100644
--- a/chrome/browser/apps/drive/drive_app_mapping_unittest.cc
+++ b/chrome/browser/apps/drive/drive_app_mapping_unittest.cc
@@ -16,7 +16,7 @@ class DriveAppMappingTest : public testing::Test {
// testing::Test:
void SetUp() override {
- pref_service_.reset(new TestingPrefServiceSyncable);
+ pref_service_.reset(new syncable_prefs::TestingPrefServiceSyncable);
DriveAppMapping::RegisterProfilePrefs(pref_service_->registry());
mapping_.reset(new DriveAppMapping(pref_service_.get()));
@@ -25,7 +25,7 @@ class DriveAppMappingTest : public testing::Test {
DriveAppMapping* mapping() { return mapping_.get(); }
private:
- scoped_ptr<TestingPrefServiceSyncable> pref_service_;
+ scoped_ptr<syncable_prefs::TestingPrefServiceSyncable> pref_service_;
scoped_ptr<DriveAppMapping> mapping_;
DISALLOW_COPY_AND_ASSIGN(DriveAppMappingTest);
diff --git a/chrome/browser/autofill/content_autofill_driver_browsertest.cc b/chrome/browser/autofill/content_autofill_driver_browsertest.cc
index 8d64dfb..22ab2bc 100644
--- a/chrome/browser/autofill/content_autofill_driver_browsertest.cc
+++ b/chrome/browser/autofill/content_autofill_driver_browsertest.cc
@@ -47,7 +47,7 @@ class MockAutofillClient : public TestAutofillClient {
MOCK_METHOD0(HideAutofillPopup, void());
private:
- TestingPrefServiceSyncable prefs_;
+ syncable_prefs::TestingPrefServiceSyncable prefs_;
DISALLOW_COPY_AND_ASSIGN(MockAutofillClient);
};
diff --git a/chrome/browser/bookmarks/managed_bookmark_service_unittest.cc b/chrome/browser/bookmarks/managed_bookmark_service_unittest.cc
index f6d5d7d..ab173f5 100644
--- a/chrome/browser/bookmarks/managed_bookmark_service_unittest.cc
+++ b/chrome/browser/bookmarks/managed_bookmark_service_unittest.cc
@@ -131,7 +131,7 @@ class ManagedBookmarkServiceTest : public testing::Test {
content::TestBrowserThreadBundle thread_bundle_;
TestingProfile profile_;
- TestingPrefServiceSyncable* prefs_;
+ syncable_prefs::TestingPrefServiceSyncable* prefs_;
bookmarks::MockBookmarkModelObserver observer_;
ManagedBookmarkService* managed_;
BookmarkModel* model_;
diff --git a/chrome/browser/chromeos/customization/customization_document_unittest.cc b/chrome/browser/chromeos/customization/customization_document_unittest.cc
index 35b60df..9bc7d88 100644
--- a/chrome/browser/chromeos/customization/customization_document_unittest.cc
+++ b/chrome/browser/chromeos/customization/customization_document_unittest.cc
@@ -282,10 +282,10 @@ class ServicesCustomizationDocumentTest : public testing::Test {
scoped_ptr<TestingProfile> CreateProfile() {
TestingProfile::Builder profile_builder;
- PrefServiceMockFactory factory;
+ syncable_prefs::PrefServiceMockFactory factory;
scoped_refptr<user_prefs::PrefRegistrySyncable> registry(
new user_prefs::PrefRegistrySyncable);
- scoped_ptr<PrefServiceSyncable> prefs(
+ scoped_ptr<syncable_prefs::PrefServiceSyncable> prefs(
factory.CreateSyncable(registry.get()));
chrome::RegisterUserProfilePrefs(registry.get());
profile_builder.SetPrefService(prefs.Pass());
diff --git a/chrome/browser/chromeos/events/event_rewriter_unittest.cc b/chrome/browser/chromeos/events/event_rewriter_unittest.cc
index bb27bb2..2149b91 100644
--- a/chrome/browser/chromeos/events/event_rewriter_unittest.cc
+++ b/chrome/browser/chromeos/events/event_rewriter_unittest.cc
@@ -160,7 +160,7 @@ class EventRewriterTest : public ash::test::AshTestBase {
TEST_F(EventRewriterTest, TestRewriteCommandToControl) {
// First, test with a PC keyboard.
- TestingPrefServiceSyncable prefs;
+ syncable_prefs::TestingPrefServiceSyncable prefs;
EventRewriter rewriter(NULL);
rewriter.KeyboardDeviceAddedForTesting(kKeyboardDeviceId, "PC Keyboard");
rewriter.set_last_keyboard_device_id_for_testing(kKeyboardDeviceId);
@@ -256,7 +256,7 @@ TEST_F(EventRewriterTest, TestRewriteCommandToControl) {
// For crbug.com/133896.
TEST_F(EventRewriterTest, TestRewriteCommandToControlWithControlRemapped) {
// Remap Control to Alt.
- TestingPrefServiceSyncable prefs;
+ syncable_prefs::TestingPrefServiceSyncable prefs;
chromeos::Preferences::RegisterProfilePrefs(prefs.registry());
IntegerPrefMember control;
control.Init(prefs::kLanguageRemapControlKeyTo, &prefs);
@@ -308,7 +308,7 @@ TEST_F(EventRewriterTest, TestRewriteCommandToControlWithControlRemapped) {
}
void EventRewriterTest::TestRewriteNumPadKeys() {
- TestingPrefServiceSyncable prefs;
+ syncable_prefs::TestingPrefServiceSyncable prefs;
EventRewriter rewriter(NULL);
rewriter.KeyboardDeviceAddedForTesting(kKeyboardDeviceId, "PC Keyboard");
rewriter.set_last_keyboard_device_id_for_testing(kKeyboardDeviceId);
@@ -500,7 +500,7 @@ TEST_F(EventRewriterTest, TestRewriteNumPadKeysWithDiamondKeyFlag) {
// Tests if the rewriter can handle a Command + Num Pad event.
void EventRewriterTest::TestRewriteNumPadKeysOnAppleKeyboard() {
- TestingPrefServiceSyncable prefs;
+ syncable_prefs::TestingPrefServiceSyncable prefs;
EventRewriter rewriter(NULL);
rewriter.KeyboardDeviceAddedForTesting(kKeyboardDeviceId, "Apple Keyboard");
rewriter.set_last_keyboard_device_id_for_testing(kKeyboardDeviceId);
@@ -545,7 +545,7 @@ TEST_F(EventRewriterTest,
}
TEST_F(EventRewriterTest, TestRewriteModifiersNoRemap) {
- TestingPrefServiceSyncable prefs;
+ syncable_prefs::TestingPrefServiceSyncable prefs;
EventRewriter rewriter(NULL);
rewriter.KeyboardDeviceAddedForTesting(kKeyboardDeviceId, "PC Keyboard");
rewriter.set_pref_service_for_testing(&prefs);
@@ -596,7 +596,7 @@ TEST_F(EventRewriterTest, TestRewriteModifiersNoRemap) {
}
TEST_F(EventRewriterTest, TestRewriteModifiersNoRemapMultipleKeys) {
- TestingPrefServiceSyncable prefs;
+ syncable_prefs::TestingPrefServiceSyncable prefs;
EventRewriter rewriter(NULL);
rewriter.KeyboardDeviceAddedForTesting(kKeyboardDeviceId, "PC Keyboard");
rewriter.set_pref_service_for_testing(&prefs);
@@ -642,7 +642,7 @@ TEST_F(EventRewriterTest, TestRewriteModifiersNoRemapMultipleKeys) {
TEST_F(EventRewriterTest, TestRewriteModifiersDisableSome) {
// Disable Search and Control keys.
- TestingPrefServiceSyncable prefs;
+ syncable_prefs::TestingPrefServiceSyncable prefs;
chromeos::Preferences::RegisterProfilePrefs(prefs.registry());
IntegerPrefMember search;
search.Init(prefs::kLanguageRemapSearchKeyTo, &prefs);
@@ -735,7 +735,7 @@ TEST_F(EventRewriterTest, TestRewriteModifiersDisableSome) {
TEST_F(EventRewriterTest, TestRewriteModifiersRemapToControl) {
// Remap Search to Control.
- TestingPrefServiceSyncable prefs;
+ syncable_prefs::TestingPrefServiceSyncable prefs;
chromeos::Preferences::RegisterProfilePrefs(prefs.registry());
IntegerPrefMember search;
search.Init(prefs::kLanguageRemapSearchKeyTo, &prefs);
@@ -813,7 +813,7 @@ TEST_F(EventRewriterTest, TestRewriteModifiersRemapToControl) {
TEST_F(EventRewriterTest, TestRewriteModifiersRemapToEscape) {
// Remap Search to ESC.
- TestingPrefServiceSyncable prefs;
+ syncable_prefs::TestingPrefServiceSyncable prefs;
chromeos::Preferences::RegisterProfilePrefs(prefs.registry());
IntegerPrefMember search;
search.Init(prefs::kLanguageRemapSearchKeyTo, &prefs);
@@ -838,7 +838,7 @@ TEST_F(EventRewriterTest, TestRewriteModifiersRemapToEscape) {
TEST_F(EventRewriterTest, TestRewriteModifiersRemapMany) {
// Remap Search to Alt.
- TestingPrefServiceSyncable prefs;
+ syncable_prefs::TestingPrefServiceSyncable prefs;
chromeos::Preferences::RegisterProfilePrefs(prefs.registry());
IntegerPrefMember search;
search.Init(prefs::kLanguageRemapSearchKeyTo, &prefs);
@@ -944,7 +944,7 @@ TEST_F(EventRewriterTest, TestRewriteModifiersRemapMany) {
TEST_F(EventRewriterTest, TestRewriteModifiersRemapToCapsLock) {
// Remap Search to Caps Lock.
- TestingPrefServiceSyncable prefs;
+ syncable_prefs::TestingPrefServiceSyncable prefs;
chromeos::Preferences::RegisterProfilePrefs(prefs.registry());
IntegerPrefMember search;
search.Init(prefs::kLanguageRemapSearchKeyTo, &prefs);
@@ -1035,7 +1035,7 @@ TEST_F(EventRewriterTest, TestRewriteModifiersRemapToCapsLock) {
}
TEST_F(EventRewriterTest, TestRewriteCapsLock) {
- TestingPrefServiceSyncable prefs;
+ syncable_prefs::TestingPrefServiceSyncable prefs;
chromeos::Preferences::RegisterProfilePrefs(prefs.registry());
chromeos::input_method::FakeImeKeyboard ime_keyboard;
@@ -1057,7 +1057,7 @@ TEST_F(EventRewriterTest, TestRewriteCapsLock) {
}
TEST_F(EventRewriterTest, TestRewriteDiamondKey) {
- TestingPrefServiceSyncable prefs;
+ syncable_prefs::TestingPrefServiceSyncable prefs;
chromeos::Preferences::RegisterProfilePrefs(prefs.registry());
chromeos::input_method::FakeImeKeyboard ime_keyboard;
@@ -1098,7 +1098,7 @@ TEST_F(EventRewriterTest, TestRewriteDiamondKeyWithFlag) {
base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
chromeos::switches::kHasChromeOSDiamondKey, "");
- TestingPrefServiceSyncable prefs;
+ syncable_prefs::TestingPrefServiceSyncable prefs;
chromeos::Preferences::RegisterProfilePrefs(prefs.registry());
chromeos::input_method::FakeImeKeyboard ime_keyboard;
@@ -1251,7 +1251,7 @@ TEST_F(EventRewriterTest, TestRewriteDiamondKeyWithFlag) {
TEST_F(EventRewriterTest, TestRewriteCapsLockToControl) {
// Remap CapsLock to Control.
- TestingPrefServiceSyncable prefs;
+ syncable_prefs::TestingPrefServiceSyncable prefs;
chromeos::Preferences::RegisterProfilePrefs(prefs.registry());
IntegerPrefMember control;
control.Init(prefs::kLanguageRemapCapsLockKeyTo, &prefs);
@@ -1294,7 +1294,7 @@ TEST_F(EventRewriterTest, TestRewriteCapsLockToControl) {
TEST_F(EventRewriterTest, TestRewriteCapsLockMod3InUse) {
// Remap CapsLock to Control.
- TestingPrefServiceSyncable prefs;
+ syncable_prefs::TestingPrefServiceSyncable prefs;
chromeos::Preferences::RegisterProfilePrefs(prefs.registry());
IntegerPrefMember control;
control.Init(prefs::kLanguageRemapCapsLockKeyTo, &prefs);
@@ -1318,7 +1318,7 @@ TEST_F(EventRewriterTest, TestRewriteCapsLockMod3InUse) {
}
TEST_F(EventRewriterTest, TestRewriteExtendedKeys) {
- TestingPrefServiceSyncable prefs;
+ syncable_prefs::TestingPrefServiceSyncable prefs;
chromeos::Preferences::RegisterProfilePrefs(prefs.registry());
EventRewriter rewriter(NULL);
rewriter.KeyboardDeviceAddedForTesting(kKeyboardDeviceId, "PC Keyboard");
@@ -1464,7 +1464,7 @@ TEST_F(EventRewriterTest, TestRewriteExtendedKeys) {
}
TEST_F(EventRewriterTest, TestRewriteFunctionKeys) {
- TestingPrefServiceSyncable prefs;
+ syncable_prefs::TestingPrefServiceSyncable prefs;
chromeos::Preferences::RegisterProfilePrefs(prefs.registry());
EventRewriter rewriter(NULL);
rewriter.KeyboardDeviceAddedForTesting(kKeyboardDeviceId, "PC Keyboard");
@@ -1780,7 +1780,7 @@ TEST_F(EventRewriterTest, TestRewriteFunctionKeys) {
TEST_F(EventRewriterTest, TestRewriteExtendedKeysWithSearchRemapped) {
// Remap Search to Control.
- TestingPrefServiceSyncable prefs;
+ syncable_prefs::TestingPrefServiceSyncable prefs;
chromeos::Preferences::RegisterProfilePrefs(prefs.registry());
IntegerPrefMember search;
search.Init(prefs::kLanguageRemapSearchKeyTo, &prefs);
@@ -1812,7 +1812,7 @@ TEST_F(EventRewriterTest, TestRewriteExtendedKeysWithSearchRemapped) {
TEST_F(EventRewriterTest, TestRewriteKeyEventSentByXSendEvent) {
// Remap Control to Alt.
- TestingPrefServiceSyncable prefs;
+ syncable_prefs::TestingPrefServiceSyncable prefs;
chromeos::Preferences::RegisterProfilePrefs(prefs.registry());
IntegerPrefMember control;
control.Init(prefs::kLanguageRemapControlKeyTo, &prefs);
@@ -1854,7 +1854,7 @@ TEST_F(EventRewriterTest, TestRewriteKeyEventSentByXSendEvent) {
TEST_F(EventRewriterTest, TestRewriteNonNativeEvent) {
// Remap Control to Alt.
- TestingPrefServiceSyncable prefs;
+ syncable_prefs::TestingPrefServiceSyncable prefs;
chromeos::Preferences::RegisterProfilePrefs(prefs.registry());
IntegerPrefMember control;
control.Init(prefs::kLanguageRemapControlKeyTo, &prefs);
@@ -1962,7 +1962,7 @@ class EventRewriterAshTest : public ash::test::AshTestBase {
}
protected:
- TestingPrefServiceSyncable* prefs() { return &prefs_; }
+ syncable_prefs::TestingPrefServiceSyncable* prefs() { return &prefs_; }
void PopEvents(ScopedVector<ui::Event>* events) { buffer_.PopEvents(events); }
@@ -1996,7 +1996,7 @@ class EventRewriterAshTest : public ash::test::AshTestBase {
user_manager::FakeUserManager* fake_user_manager_; // Not owned.
chromeos::ScopedUserManagerEnabler user_manager_enabler_;
- TestingPrefServiceSyncable prefs_;
+ syncable_prefs::TestingPrefServiceSyncable prefs_;
DISALLOW_COPY_AND_ASSIGN(EventRewriterAshTest);
};
@@ -2058,7 +2058,7 @@ TEST_F(EventRewriterTest, TestRewrittenModifierClick) {
ui::TouchFactory::GetInstance()->SetPointerDeviceForTest(device_list);
// Remap Control to Alt.
- TestingPrefServiceSyncable prefs;
+ syncable_prefs::TestingPrefServiceSyncable prefs;
chromeos::Preferences::RegisterProfilePrefs(prefs.registry());
IntegerPrefMember control;
control.Init(prefs::kLanguageRemapControlKeyTo, &prefs);
@@ -2097,7 +2097,7 @@ TEST_F(EventRewriterTest, DontRewriteIfNotRewritten) {
device_list.push_back(11);
ui::TouchFactory::GetInstance()->SetPointerDeviceForTest(device_list);
#endif
- TestingPrefServiceSyncable prefs;
+ syncable_prefs::TestingPrefServiceSyncable prefs;
EventRewriter rewriter(NULL);
rewriter.set_pref_service_for_testing(&prefs);
const int kLeftAndAltFlag = ui::EF_LEFT_MOUSE_BUTTON | ui::EF_ALT_DOWN;
diff --git a/chrome/browser/chromeos/file_system_provider/registry_unittest.cc b/chrome/browser/chromeos/file_system_provider/registry_unittest.cc
index 9665dbd..292460d 100644
--- a/chrome/browser/chromeos/file_system_provider/registry_unittest.cc
+++ b/chrome/browser/chromeos/file_system_provider/registry_unittest.cc
@@ -50,7 +50,7 @@ void RememberFakeFileSystem(TestingProfile* profile,
const Watcher& watcher) {
// Warning. Updating this code means that backward compatibility may be
// broken, what is unexpected and should be avoided.
- TestingPrefServiceSyncable* const pref_service =
+ syncable_prefs::TestingPrefServiceSyncable* const pref_service =
profile->GetTestingPrefService();
ASSERT_TRUE(pref_service);
@@ -167,7 +167,7 @@ TEST_F(FileSystemProviderRegistryTest, RememberFileSystem) {
registry_->RememberFileSystem(file_system_info, watchers);
- TestingPrefServiceSyncable* const pref_service =
+ syncable_prefs::TestingPrefServiceSyncable* const pref_service =
profile_->GetTestingPrefService();
ASSERT_TRUE(pref_service);
@@ -255,7 +255,7 @@ TEST_F(FileSystemProviderRegistryTest, ForgetFileSystem) {
registry_->ForgetFileSystem(kExtensionId, kFileSystemId);
- TestingPrefServiceSyncable* const pref_service =
+ syncable_prefs::TestingPrefServiceSyncable* const pref_service =
profile_->GetTestingPrefService();
ASSERT_TRUE(pref_service);
@@ -286,7 +286,7 @@ TEST_F(FileSystemProviderRegistryTest, UpdateWatcherTag) {
fake_watcher_.last_tag = "updated-tag";
registry_->UpdateWatcherTag(file_system_info, fake_watcher_);
- TestingPrefServiceSyncable* const pref_service =
+ syncable_prefs::TestingPrefServiceSyncable* const pref_service =
profile_->GetTestingPrefService();
ASSERT_TRUE(pref_service);
diff --git a/chrome/browser/chromeos/input_method/input_method_persistence_unittest.cc b/chrome/browser/chromeos/input_method/input_method_persistence_unittest.cc
index b73f429..4811cac 100644
--- a/chrome/browser/chromeos/input_method/input_method_persistence_unittest.cc
+++ b/chrome/browser/chromeos/input_method/input_method_persistence_unittest.cc
@@ -70,7 +70,7 @@ class InputMethodPersistenceTest : public testing::Test {
}
content::TestBrowserThreadBundle thread_bundle_;
- TestingPrefServiceSyncable* mock_user_prefs_;
+ syncable_prefs::TestingPrefServiceSyncable* mock_user_prefs_;
MockInputMethodManager mock_manager_;
TestingProfileManager mock_profile_manager_;
chromeos::FakeChromeUserManager* fake_user_manager_;
diff --git a/chrome/browser/chromeos/input_method/input_method_syncer.cc b/chrome/browser/chromeos/input_method/input_method_syncer.cc
index 61cccf3..90b2db0 100644
--- a/chrome/browser/chromeos/input_method/input_method_syncer.cc
+++ b/chrome/browser/chromeos/input_method/input_method_syncer.cc
@@ -113,13 +113,12 @@ void MergeLists(std::vector<std::string>* dest,
} // anonymous namespace
InputMethodSyncer::InputMethodSyncer(
- PrefServiceSyncable* prefs,
+ syncable_prefs::PrefServiceSyncable* prefs,
scoped_refptr<input_method::InputMethodManager::State> ime_state)
: prefs_(prefs),
ime_state_(ime_state),
merging_(false),
- weak_factory_(this) {
-}
+ weak_factory_(this) {}
InputMethodSyncer::~InputMethodSyncer() {
prefs_->RemoveObserver(this);
diff --git a/chrome/browser/chromeos/input_method/input_method_syncer.h b/chrome/browser/chromeos/input_method/input_method_syncer.h
index e01fffd..f68910b 100644
--- a/chrome/browser/chromeos/input_method/input_method_syncer.h
+++ b/chrome/browser/chromeos/input_method/input_method_syncer.h
@@ -13,7 +13,9 @@
#include "components/syncable_prefs/pref_service_syncable_observer.h"
#include "ui/base/ime/chromeos/input_method_manager.h"
+namespace syncable_prefs {
class PrefServiceSyncable;
+}
namespace user_prefs {
class PrefRegistrySyncable;
@@ -28,10 +30,10 @@ namespace input_method {
// except once: when the user first logs into the device.
// Thus, the user's most recent changes to language and input method preferences
// will be brought down when signing in to a new device but not in future syncs.
-class InputMethodSyncer : public PrefServiceSyncableObserver {
+class InputMethodSyncer : public syncable_prefs::PrefServiceSyncableObserver {
public:
InputMethodSyncer(
- PrefServiceSyncable* prefs,
+ syncable_prefs::PrefServiceSyncable* prefs,
scoped_refptr<input_method::InputMethodManager::State> ime_state);
~InputMethodSyncer() override;
@@ -63,7 +65,7 @@ class InputMethodSyncer : public PrefServiceSyncableObserver {
// the local pref values.
void OnPreferenceChanged(const std::string& pref_name);
- // PrefServiceSyncableObserver implementation.
+ // syncable_prefs::PrefServiceSyncableObserver implementation.
void OnIsSyncingChanged() override;
StringPrefMember preferred_languages_;
@@ -77,7 +79,7 @@ class InputMethodSyncer : public PrefServiceSyncableObserver {
StringPrefMember preload_engines_syncable_;
StringPrefMember enabled_extension_imes_syncable_;
- PrefServiceSyncable* prefs_;
+ syncable_prefs::PrefServiceSyncable* prefs_;
scoped_refptr<input_method::InputMethodManager::State> ime_state_;
// Used to ignore PrefChanged events while InputMethodManager is merging.
diff --git a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager_unittest.cc b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager_unittest.cc
index 58648ec..40462b3 100644
--- a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager_unittest.cc
+++ b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager_unittest.cc
@@ -207,17 +207,14 @@ class EasyUnlockTpmKeyManagerTest : public testing::Test {
signin_profile_ = profile_manager_.CreateTestingProfile(
chrome::kInitialProfile,
- scoped_ptr<TestingPrefServiceSyncable>(),
- base::UTF8ToUTF16(chrome::kInitialProfile),
- 0 /* avatar id */,
+ scoped_ptr<syncable_prefs::TestingPrefServiceSyncable>(),
+ base::UTF8ToUTF16(chrome::kInitialProfile), 0 /* avatar id */,
std::string() /* supervized user id */,
TestingProfile::TestingFactories());
user_profile_ = profile_manager_.CreateTestingProfile(
- kTestUserId,
- scoped_ptr<TestingPrefServiceSyncable>(),
- base::UTF8ToUTF16(kTestUserId),
- 0 /* avatar id */,
+ kTestUserId, scoped_ptr<syncable_prefs::TestingPrefServiceSyncable>(),
+ base::UTF8ToUTF16(kTestUserId), 0 /* avatar id */,
std::string() /* supervized user id */,
TestingProfile::TestingFactories());
}
diff --git a/chrome/browser/chromeos/login/users/avatar/user_image_sync_observer.h b/chrome/browser/chromeos/login/users/avatar/user_image_sync_observer.h
index d2939f4..b972ed8 100644
--- a/chrome/browser/chromeos/login/users/avatar/user_image_sync_observer.h
+++ b/chrome/browser/chromeos/login/users/avatar/user_image_sync_observer.h
@@ -13,12 +13,16 @@
#include "content/public/browser/notification_observer.h"
class PrefChangeRegistrar;
-class PrefServiceSyncable;
class Profile;
namespace content {
class NotificationRegistrar;
}
+
+namespace syncable_prefs {
+class PrefServiceSyncable;
+}
+
namespace user_prefs {
class PrefRegistrySyncable;
}
@@ -31,8 +35,9 @@ namespace chromeos {
// This class is responsible for keeping local user image synced with
// image saved in syncable preference.
-class UserImageSyncObserver: public PrefServiceSyncableObserver,
- public content::NotificationObserver {
+class UserImageSyncObserver
+ : public syncable_prefs::PrefServiceSyncableObserver,
+ public content::NotificationObserver {
public:
class Observer {
public:
@@ -59,7 +64,7 @@ class UserImageSyncObserver: public PrefServiceSyncableObserver,
void RemoveObserver(Observer* observer);
private:
- // PrefServiceSyncableObserver implementation.
+ // syncable_prefs::PrefServiceSyncableObserver implementation.
void OnIsSyncingChanged() override;
// content::NotificationObserver implementation.
@@ -92,7 +97,7 @@ class UserImageSyncObserver: public PrefServiceSyncableObserver,
const user_manager::User* user_;
scoped_ptr<PrefChangeRegistrar> pref_change_registrar_;
scoped_ptr<content::NotificationRegistrar> notification_registrar_;
- PrefServiceSyncable* prefs_;
+ syncable_prefs::PrefServiceSyncable* prefs_;
bool is_synced_;
// Indicates if local user image changed during initialization.
bool local_image_changed_;
diff --git a/chrome/browser/chromeos/policy/consumer_enrollment_handler_unittest.cc b/chrome/browser/chromeos/policy/consumer_enrollment_handler_unittest.cc
index fa0acf2..7116c61 100644
--- a/chrome/browser/chromeos/policy/consumer_enrollment_handler_unittest.cc
+++ b/chrome/browser/chromeos/policy/consumer_enrollment_handler_unittest.cc
@@ -74,7 +74,7 @@ class ConsumerEnrollmentHandlerTest : public testing::Test {
std::make_pair(ProfileOAuth2TokenServiceFactory::GetInstance(),
BuildAutoIssuingFakeProfileOAuth2TokenService));
profile_ = testing_profile_manager_->CreateTestingProfile(
- kTestUser, scoped_ptr<PrefServiceSyncable>(),
+ kTestUser, scoped_ptr<syncable_prefs::PrefServiceSyncable>(),
base::UTF8ToUTF16(kTestUser), 0, std::string(), factories);
// Set up the authenticated user name and ID.
diff --git a/chrome/browser/chromeos/policy/recommendation_restorer_unittest.cc b/chrome/browser/chromeos/policy/recommendation_restorer_unittest.cc
index ef3a11a..bd8c9d2 100644
--- a/chrome/browser/chromeos/policy/recommendation_restorer_unittest.cc
+++ b/chrome/browser/chromeos/policy/recommendation_restorer_unittest.cc
@@ -67,14 +67,14 @@ class RecommendationRestorerTest : public testing::Test {
void VerifyTimerIsRunning() const;
TestingPrefStore* recommended_prefs_; // Not owned.
- TestingPrefServiceSyncable* prefs_; // Not owned.
+ syncable_prefs::TestingPrefServiceSyncable* prefs_; // Not owned.
RecommendationRestorer* restorer_; // Not owned.
scoped_refptr<base::TestSimpleTaskRunner> runner_;
base::ThreadTaskRunnerHandle runner_handler_;
private:
- scoped_ptr<PrefServiceSyncable> prefs_owner_;
+ scoped_ptr<syncable_prefs::PrefServiceSyncable> prefs_owner_;
TestingProfileManager profile_manager_;
@@ -83,7 +83,7 @@ class RecommendationRestorerTest : public testing::Test {
RecommendationRestorerTest::RecommendationRestorerTest()
: recommended_prefs_(new TestingPrefStore),
- prefs_(new TestingPrefServiceSyncable(
+ prefs_(new syncable_prefs::TestingPrefServiceSyncable(
new TestingPrefStore,
new TestingPrefStore,
recommended_prefs_,
@@ -93,8 +93,7 @@ RecommendationRestorerTest::RecommendationRestorerTest()
runner_(new base::TestSimpleTaskRunner),
runner_handler_(runner_),
prefs_owner_(prefs_),
- profile_manager_(TestingBrowserProcess::GetGlobal()) {
-}
+ profile_manager_(TestingBrowserProcess::GetGlobal()) {}
void RecommendationRestorerTest::SetUp() {
testing::Test::SetUp();
@@ -167,7 +166,7 @@ void RecommendationRestorerTest::NotifyOfUserActivity() {
void RecommendationRestorerTest::VerifyPrefFollowsUser(
const char* pref_name,
const base::Value& expected_value) const {
- const PrefServiceSyncable::Preference* pref =
+ const syncable_prefs::PrefServiceSyncable::Preference* pref =
prefs_->FindPreference(pref_name);
ASSERT_TRUE(pref);
EXPECT_TRUE(pref->HasUserSetting());
@@ -194,7 +193,7 @@ void RecommendationRestorerTest::VerifyPrefsFollowUser() const {
void RecommendationRestorerTest::VerifyPrefFollowsRecommendation(
const char* pref_name,
const base::Value& expected_value) const {
- const PrefServiceSyncable::Preference* pref =
+ const syncable_prefs::PrefServiceSyncable::Preference* pref =
prefs_->FindPreference(pref_name);
ASSERT_TRUE(pref);
EXPECT_TRUE(pref->IsRecommended());
diff --git a/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_unittest.cc b/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_unittest.cc
index 59bbadb..8acc4ab 100644
--- a/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_unittest.cc
+++ b/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_unittest.cc
@@ -98,11 +98,8 @@ class UserCloudPolicyManagerChromeOSTest : public testing::Test {
BuildFakeProfileOAuth2TokenService));
profile_ = profile_manager_->CreateTestingProfile(
chrome::kInitialProfile,
- scoped_ptr<PrefServiceSyncable>(),
- base::UTF8ToUTF16(""),
- 0,
- std::string(),
- factories);
+ scoped_ptr<syncable_prefs::PrefServiceSyncable>(),
+ base::UTF8ToUTF16(""), 0, std::string(), factories);
// Usually the signin Profile and the main Profile are separate, but since
// the signin Profile is an OTR Profile then for this test it suffices to
// attach it to the main Profile.
diff --git a/chrome/browser/chromeos/power/power_prefs_unittest.cc b/chrome/browser/chromeos/power/power_prefs_unittest.cc
index 9574f8c..00586c3 100644
--- a/chrome/browser/chromeos/power/power_prefs_unittest.cc
+++ b/chrome/browser/chromeos/power/power_prefs_unittest.cc
@@ -172,8 +172,8 @@ bool PowerPrefsTest::GetExpectedAllowScreenWakeLocksForProfile(
TEST_F(PowerPrefsTest, LoginScreen) {
// Set up login profile.
- scoped_ptr<TestingPrefServiceSyncable> login_profile_prefs(
- new TestingPrefServiceSyncable);
+ scoped_ptr<syncable_prefs::TestingPrefServiceSyncable> login_profile_prefs(
+ new syncable_prefs::TestingPrefServiceSyncable);
chrome::RegisterLoginProfilePrefs(login_profile_prefs->registry());
TestingProfile::Builder builder;
builder.SetPath(
diff --git a/chrome/browser/chromeos/preferences.cc b/chrome/browser/chromeos/preferences.cc
index c34a92e..b6ed2db 100644
--- a/chrome/browser/chromeos/preferences.cc
+++ b/chrome/browser/chromeos/preferences.cc
@@ -285,7 +285,7 @@ void Preferences::RegisterProfilePrefs(
registry->RegisterBooleanPref(prefs::kForceMaximizeOnFirstRun, false);
}
-void Preferences::InitUserPrefs(PrefServiceSyncable* prefs) {
+void Preferences::InitUserPrefs(syncable_prefs::PrefServiceSyncable* prefs) {
prefs_ = prefs;
BooleanPrefMember::NamedChangeCallback callback =
@@ -333,7 +333,8 @@ void Preferences::InitUserPrefs(PrefServiceSyncable* prefs) {
void Preferences::Init(Profile* profile, const user_manager::User* user) {
DCHECK(profile);
DCHECK(user);
- PrefServiceSyncable* prefs = PrefServiceSyncableFromProfile(profile);
+ syncable_prefs::PrefServiceSyncable* prefs =
+ PrefServiceSyncableFromProfile(profile);
// This causes OnIsSyncingChanged to be called when the value of
// PrefService::IsSyncing() changes.
prefs->AddObserver(this);
@@ -370,7 +371,7 @@ void Preferences::Init(Profile* profile, const user_manager::User* user) {
}
void Preferences::InitUserPrefsForTesting(
- PrefServiceSyncable* prefs,
+ syncable_prefs::PrefServiceSyncable* prefs,
const user_manager::User* user,
scoped_refptr<input_method::InputMethodManager::State> ime_state) {
user_ = user;
diff --git a/chrome/browser/chromeos/preferences.h b/chrome/browser/chromeos/preferences.h
index 3dffa2d..f3df661 100644
--- a/chrome/browser/chromeos/preferences.h
+++ b/chrome/browser/chromeos/preferences.h
@@ -18,10 +18,12 @@
class PrefRegistrySimple;
class PrefService;
-class PrefServiceSyncable;
-
class TracingManager;
+namespace syncable_prefs {
+class PrefServiceSyncable;
+}
+
namespace user_prefs {
class PrefRegistrySyncable;
}
@@ -39,7 +41,7 @@ class InputMethodSyncer;
// is first initialized, it will initialize the OS settings to what's stored in
// the preferences. These include touchpad settings, etc.
// When the preferences change, we change the settings to reflect the new value.
-class Preferences : public PrefServiceSyncableObserver,
+class Preferences : public syncable_prefs::PrefServiceSyncableObserver,
public ash::ShellObserver,
public user_manager::UserManager::UserSessionStateObserver {
public:
@@ -57,7 +59,7 @@ class Preferences : public PrefServiceSyncableObserver,
void Init(Profile* profile, const user_manager::User* user);
void InitUserPrefsForTesting(
- PrefServiceSyncable* prefs,
+ syncable_prefs::PrefServiceSyncable* prefs,
const user_manager::User* user,
scoped_refptr<input_method::InputMethodManager::State> ime_state);
void SetInputMethodListForTesting();
@@ -70,7 +72,7 @@ class Preferences : public PrefServiceSyncableObserver,
};
// Initializes all member prefs.
- void InitUserPrefs(PrefServiceSyncable* prefs);
+ void InitUserPrefs(syncable_prefs::PrefServiceSyncable* prefs);
// Callback method for preference changes.
void OnPreferenceChanged(const std::string& pref_name);
@@ -101,7 +103,7 @@ class Preferences : public PrefServiceSyncableObserver,
// on the cmd line.
void ForceNaturalScrollDefault();
- // PrefServiceSyncableObserver implementation.
+ // syncable_prefs::PrefServiceSyncableObserver implementation.
void OnIsSyncingChanged() override;
// Overriden from ash::ShellObserver.
@@ -112,7 +114,7 @@ class Preferences : public PrefServiceSyncableObserver,
void ActivateInputMethods(const user_manager::User* active_user);
- PrefServiceSyncable* prefs_;
+ syncable_prefs::PrefServiceSyncable* prefs_;
input_method::InputMethodManager* input_method_manager_;
scoped_ptr<TracingManager> tracing_manager_;
diff --git a/chrome/browser/chromeos/preferences_unittest.cc b/chrome/browser/chromeos/preferences_unittest.cc
index 7554ef2..27af983 100644
--- a/chrome/browser/chromeos/preferences_unittest.cc
+++ b/chrome/browser/chromeos/preferences_unittest.cc
@@ -203,7 +203,7 @@ class PreferencesTest : public testing::Test {
// Not owned.
const user_manager::User* test_user_;
TestingProfile* test_profile_;
- TestingPrefServiceSyncable* pref_service_;
+ syncable_prefs::TestingPrefServiceSyncable* pref_service_;
input_method::MyMockInputMethodManager* mock_manager_;
private:
diff --git a/chrome/browser/content_settings/content_settings_policy_provider_unittest.cc b/chrome/browser/content_settings/content_settings_policy_provider_unittest.cc
index 024627b..a40cdfb 100644
--- a/chrome/browser/content_settings/content_settings_policy_provider_unittest.cc
+++ b/chrome/browser/content_settings/content_settings_policy_provider_unittest.cc
@@ -37,7 +37,8 @@ class PolicyProviderTest : public testing::Test {
TEST_F(PolicyProviderTest, DefaultGeolocationContentSetting) {
TestingProfile profile;
- TestingPrefServiceSyncable* prefs = profile.GetTestingPrefService();
+ syncable_prefs::TestingPrefServiceSyncable* prefs =
+ profile.GetTestingPrefService();
PolicyProvider provider(prefs);
Rules rules;
@@ -71,7 +72,8 @@ TEST_F(PolicyProviderTest, DefaultGeolocationContentSetting) {
TEST_F(PolicyProviderTest, ManagedDefaultContentSettings) {
TestingProfile profile;
- TestingPrefServiceSyncable* prefs = profile.GetTestingPrefService();
+ syncable_prefs::TestingPrefServiceSyncable* prefs =
+ profile.GetTestingPrefService();
PolicyProvider provider(prefs);
prefs->SetManagedPref(prefs::kManagedDefaultPluginsSetting,
@@ -98,7 +100,8 @@ TEST_F(PolicyProviderTest, ManagedDefaultContentSettings) {
// if the managed setting is removed.
TEST_F(PolicyProviderTest, ObserveManagedSettingsChange) {
TestingProfile profile;
- TestingPrefServiceSyncable* prefs = profile.GetTestingPrefService();
+ syncable_prefs::TestingPrefServiceSyncable* prefs =
+ profile.GetTestingPrefService();
PolicyProvider provider(prefs);
MockObserver mock_observer;
@@ -125,7 +128,8 @@ TEST_F(PolicyProviderTest, ObserveManagedSettingsChange) {
TEST_F(PolicyProviderTest, GettingManagedContentSettings) {
TestingProfile profile;
- TestingPrefServiceSyncable* prefs = profile.GetTestingPrefService();
+ syncable_prefs::TestingPrefServiceSyncable* prefs =
+ profile.GetTestingPrefService();
base::ListValue* value = new base::ListValue();
value->Append(new base::StringValue("[*.]google.com"));
@@ -197,7 +201,8 @@ TEST_F(PolicyProviderTest, GettingManagedContentSettings) {
TEST_F(PolicyProviderTest, ResourceIdentifier) {
TestingProfile profile;
- TestingPrefServiceSyncable* prefs = profile.GetTestingPrefService();
+ syncable_prefs::TestingPrefServiceSyncable* prefs =
+ profile.GetTestingPrefService();
base::ListValue* value = new base::ListValue();
value->Append(new base::StringValue("[*.]google.com"));
@@ -234,7 +239,8 @@ TEST_F(PolicyProviderTest, ResourceIdentifier) {
TEST_F(PolicyProviderTest, AutoSelectCertificateList) {
TestingProfile profile;
- TestingPrefServiceSyncable* prefs = profile.GetTestingPrefService();
+ syncable_prefs::TestingPrefServiceSyncable* prefs =
+ profile.GetTestingPrefService();
PolicyProvider provider(prefs);
GURL google_url("https://mail.google.com");
diff --git a/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc b/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc
index 3535afb..fee5ea0 100644
--- a/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc
+++ b/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc
@@ -139,20 +139,20 @@ TEST_F(PrefProviderTest, Incognito) {
OverlayUserPrefStore* otr_user_prefs =
new OverlayUserPrefStore(user_prefs);
- PrefServiceMockFactory factory;
+ syncable_prefs::PrefServiceMockFactory factory;
factory.set_user_prefs(make_scoped_refptr(user_prefs));
scoped_refptr<user_prefs::PrefRegistrySyncable> registry(
new user_prefs::PrefRegistrySyncable);
- PrefServiceSyncable* regular_prefs =
+ syncable_prefs::PrefServiceSyncable* regular_prefs =
factory.CreateSyncable(registry.get()).release();
chrome::RegisterUserProfilePrefs(registry.get());
- PrefServiceMockFactory otr_factory;
+ syncable_prefs::PrefServiceMockFactory otr_factory;
otr_factory.set_user_prefs(make_scoped_refptr(otr_user_prefs));
scoped_refptr<user_prefs::PrefRegistrySyncable> otr_registry(
new user_prefs::PrefRegistrySyncable);
- PrefServiceSyncable* otr_prefs =
+ syncable_prefs::PrefServiceSyncable* otr_prefs =
otr_factory.CreateSyncable(otr_registry.get()).release();
chrome::RegisterUserProfilePrefs(otr_registry.get());
@@ -391,7 +391,8 @@ TEST_F(PrefProviderTest, ResourceIdentifier) {
TEST_F(PrefProviderTest, AutoSubmitCertificateContentSetting) {
TestingProfile profile;
- TestingPrefServiceSyncable* prefs = profile.GetTestingPrefService();
+ syncable_prefs::TestingPrefServiceSyncable* prefs =
+ profile.GetTestingPrefService();
GURL primary_url("https://www.example.com");
GURL secondary_url("https://www.sample.com");
@@ -424,7 +425,7 @@ TEST_F(PrefProviderTest, AutoSubmitCertificateContentSetting) {
// http://crosbug.com/17760
TEST_F(PrefProviderTest, Deadlock) {
- TestingPrefServiceSyncable prefs;
+ syncable_prefs::TestingPrefServiceSyncable prefs;
PrefProvider::RegisterProfilePrefs(prefs.registry());
// Chain of events: a preference changes, |PrefProvider| notices it, and reads
@@ -483,7 +484,7 @@ TEST_F(PrefProviderTest, LastUsage) {
}
TEST_F(PrefProviderTest, IncognitoInheritsValueMap) {
- TestingPrefServiceSyncable prefs;
+ syncable_prefs::TestingPrefServiceSyncable prefs;
PrefProvider::RegisterProfilePrefs(prefs.registry());
ContentSettingsPattern pattern_1 =
@@ -550,7 +551,7 @@ TEST_F(PrefProviderTest, IncognitoInheritsValueMap) {
}
TEST_F(PrefProviderTest, ClearAllContentSettingsRules) {
- TestingPrefServiceSyncable prefs;
+ syncable_prefs::TestingPrefServiceSyncable prefs;
PrefProvider::RegisterProfilePrefs(prefs.registry());
ContentSettingsPattern pattern =
diff --git a/chrome/browser/content_settings/host_content_settings_map_unittest.cc b/chrome/browser/content_settings/host_content_settings_map_unittest.cc
index 352610b..772215e 100644
--- a/chrome/browser/content_settings/host_content_settings_map_unittest.cc
+++ b/chrome/browser/content_settings/host_content_settings_map_unittest.cc
@@ -759,7 +759,8 @@ TEST_F(HostContentSettingsMapTest, ManagedDefaultContentSetting) {
TestingProfile profile;
HostContentSettingsMap* host_content_settings_map =
HostContentSettingsMapFactory::GetForProfile(&profile);
- TestingPrefServiceSyncable* prefs = profile.GetTestingPrefService();
+ syncable_prefs::TestingPrefServiceSyncable* prefs =
+ profile.GetTestingPrefService();
EXPECT_EQ(CONTENT_SETTING_ALLOW,
host_content_settings_map->GetDefaultContentSetting(
@@ -799,7 +800,8 @@ TEST_F(HostContentSettingsMapTest,
TestingProfile profile;
HostContentSettingsMap* host_content_settings_map =
HostContentSettingsMapFactory::GetForProfile(&profile);
- TestingPrefServiceSyncable* prefs = profile.GetTestingPrefService();
+ syncable_prefs::TestingPrefServiceSyncable* prefs =
+ profile.GetTestingPrefService();
// Set pattern for JavaScript setting.
ContentSettingsPattern pattern =
@@ -835,7 +837,8 @@ TEST_F(HostContentSettingsMapTest,
TestingProfile profile;
HostContentSettingsMap* host_content_settings_map =
HostContentSettingsMapFactory::GetForProfile(&profile);
- TestingPrefServiceSyncable* prefs = profile.GetTestingPrefService();
+ syncable_prefs::TestingPrefServiceSyncable* prefs =
+ profile.GetTestingPrefService();
// Block all JavaScript.
host_content_settings_map->SetDefaultContentSetting(
@@ -880,7 +883,8 @@ TEST_F(HostContentSettingsMapTest, OverwrittenDefaultContentSetting) {
TestingProfile profile;
HostContentSettingsMap* host_content_settings_map =
HostContentSettingsMapFactory::GetForProfile(&profile);
- TestingPrefServiceSyncable* prefs = profile.GetTestingPrefService();
+ syncable_prefs::TestingPrefServiceSyncable* prefs =
+ profile.GetTestingPrefService();
// Set user defined default-content-setting for Cookies.
host_content_settings_map->SetDefaultContentSetting(
@@ -910,7 +914,8 @@ TEST_F(HostContentSettingsMapTest, SettingDefaultContentSettingsWhenManaged) {
TestingProfile profile;
HostContentSettingsMap* host_content_settings_map =
HostContentSettingsMapFactory::GetForProfile(&profile);
- TestingPrefServiceSyncable* prefs = profile.GetTestingPrefService();
+ syncable_prefs::TestingPrefServiceSyncable* prefs =
+ profile.GetTestingPrefService();
prefs->SetManagedPref(prefs::kManagedDefaultPluginsSetting,
new base::FundamentalValue(CONTENT_SETTING_ALLOW));
diff --git a/chrome/browser/download/chrome_download_manager_delegate_unittest.cc b/chrome/browser/download/chrome_download_manager_delegate_unittest.cc
index e466de1..530915a 100644
--- a/chrome/browser/download/chrome_download_manager_delegate_unittest.cc
+++ b/chrome/browser/download/chrome_download_manager_delegate_unittest.cc
@@ -161,7 +161,7 @@ class ChromeDownloadManagerDelegateTest
DownloadPrefs* download_prefs();
private:
- TestingPrefServiceSyncable* pref_service_;
+ syncable_prefs::TestingPrefServiceSyncable* pref_service_;
base::ScopedTempDir test_download_dir_;
scoped_ptr<content::MockDownloadManager> download_manager_;
scoped_ptr<TestChromeDownloadManagerDelegate> delegate_;
diff --git a/chrome/browser/extensions/component_loader_unittest.cc b/chrome/browser/extensions/component_loader_unittest.cc
index ebe5392..58d13b9 100644
--- a/chrome/browser/extensions/component_loader_unittest.cc
+++ b/chrome/browser/extensions/component_loader_unittest.cc
@@ -110,7 +110,7 @@ class ComponentLoaderTest : public testing::Test {
content::TestBrowserThreadBundle thread_bundle_;
TestingProfile profile_;
MockExtensionService extension_service_;
- TestingPrefServiceSyncable prefs_;
+ syncable_prefs::TestingPrefServiceSyncable prefs_;
TestingPrefServiceSimple local_state_;
ComponentLoader component_loader_;
diff --git a/chrome/browser/extensions/extension_service_test_base.cc b/chrome/browser/extensions/extension_service_test_base.cc
index e76013a..7e8052c 100644
--- a/chrome/browser/extensions/extension_service_test_base.cc
+++ b/chrome/browser/extensions/extension_service_test_base.cc
@@ -43,15 +43,15 @@ scoped_ptr<TestingProfile> BuildTestingProfile(
const ExtensionServiceTestBase::ExtensionServiceInitParams& params) {
TestingProfile::Builder profile_builder;
// Create a PrefService that only contains user defined preference values.
- PrefServiceMockFactory factory;
+ syncable_prefs::PrefServiceMockFactory factory;
// If pref_file is empty, TestingProfile automatically creates
- // TestingPrefServiceSyncable instance.
+ // syncable_prefs::TestingPrefServiceSyncable instance.
if (!params.pref_file.empty()) {
factory.SetUserPrefsFile(params.pref_file,
base::ThreadTaskRunnerHandle::Get().get());
scoped_refptr<user_prefs::PrefRegistrySyncable> registry(
new user_prefs::PrefRegistrySyncable);
- scoped_ptr<PrefServiceSyncable> prefs(
+ scoped_ptr<syncable_prefs::PrefServiceSyncable> prefs(
factory.CreateSyncable(registry.get()));
chrome::RegisterUserProfilePrefs(registry.get());
profile_builder.SetPrefService(prefs.Pass());
diff --git a/chrome/browser/extensions/extension_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc
index ac0294b..68f9429 100644
--- a/chrome/browser/extensions/extension_service_unittest.cc
+++ b/chrome/browser/extensions/extension_service_unittest.cc
@@ -1167,8 +1167,8 @@ class ExtensionServiceTest : public extensions::ExtensionServiceTestBase,
}
protected:
- typedef extensions::ExtensionManagementPrefUpdater<TestingPrefServiceSyncable>
- ManagementPrefUpdater;
+ typedef extensions::ExtensionManagementPrefUpdater<
+ syncable_prefs::TestingPrefServiceSyncable> ManagementPrefUpdater;
extensions::ExtensionList loaded_;
std::string unloaded_id_;
UnloadedExtensionInfo::Reason unloaded_reason_;
diff --git a/chrome/browser/extensions/external_pref_loader.cc b/chrome/browser/extensions/external_pref_loader.cc
index 2d734dc..c0775d2 100644
--- a/chrome/browser/extensions/external_pref_loader.cc
+++ b/chrome/browser/extensions/external_pref_loader.cc
@@ -122,7 +122,8 @@ void ExternalPrefLoader::StartLoading() {
(profile_ && profile_->IsSyncAllowed())) {
if (!PostLoadIfPrioritySyncReady()) {
DCHECK(profile_);
- PrefServiceSyncable* prefs = PrefServiceSyncableFromProfile(profile_);
+ syncable_prefs::PrefServiceSyncable* prefs =
+ PrefServiceSyncableFromProfile(profile_);
DCHECK(prefs);
syncable_pref_observer_.Add(prefs);
ProfileSyncService* service =
@@ -160,7 +161,8 @@ bool ExternalPrefLoader::PostLoadIfPrioritySyncReady() {
DCHECK(options_ & DELAY_LOAD_UNTIL_PRIORITY_SYNC);
DCHECK(profile_);
- PrefServiceSyncable* prefs = PrefServiceSyncableFromProfile(profile_);
+ syncable_prefs::PrefServiceSyncable* prefs =
+ PrefServiceSyncableFromProfile(profile_);
DCHECK(prefs);
if (prefs->IsPrioritySyncing()) {
PostLoadAndRemoveObservers();
@@ -171,7 +173,8 @@ bool ExternalPrefLoader::PostLoadIfPrioritySyncReady() {
}
void ExternalPrefLoader::PostLoadAndRemoveObservers() {
- PrefServiceSyncable* prefs = PrefServiceSyncableFromProfile(profile_);
+ syncable_prefs::PrefServiceSyncable* prefs =
+ PrefServiceSyncableFromProfile(profile_);
DCHECK(prefs);
syncable_pref_observer_.Remove(prefs);
diff --git a/chrome/browser/extensions/external_pref_loader.h b/chrome/browser/extensions/external_pref_loader.h
index 3695a0a..5a07b98 100644
--- a/chrome/browser/extensions/external_pref_loader.h
+++ b/chrome/browser/extensions/external_pref_loader.h
@@ -16,9 +16,12 @@
#include "components/sync_driver/sync_service_observer.h"
#include "components/syncable_prefs/pref_service_syncable_observer.h"
-class PrefServiceSyncable;
class Profile;
+namespace syncable_prefs {
+class PrefServiceSyncable;
+}
+
namespace extensions {
// A specialization of the ExternalLoader that uses a json file to
@@ -26,7 +29,7 @@ namespace extensions {
// Instances of this class are expected to be created and destroyed on the UI
// thread and they are expecting public method calls from the UI thread.
class ExternalPrefLoader : public ExternalLoader,
- public PrefServiceSyncableObserver,
+ public syncable_prefs::PrefServiceSyncableObserver,
public sync_driver::SyncServiceObserver {
public:
enum Options {
@@ -67,7 +70,7 @@ class ExternalPrefLoader : public ExternalLoader,
private:
friend class base::RefCountedThreadSafe<ExternalLoader>;
- // PrefServiceSyncableObserver:
+ // syncable_prefs::PrefServiceSyncableObserver:
void OnIsSyncingChanged() override;
// sync_driver::SyncServiceObserver
@@ -105,8 +108,9 @@ class ExternalPrefLoader : public ExternalLoader,
// Needed for waiting for waiting priority sync.
Profile* profile_;
- // Used for registering observer for PrefServiceSyncable.
- ScopedObserver<PrefServiceSyncable, PrefServiceSyncableObserver>
+ // Used for registering observer for syncable_prefs::PrefServiceSyncable.
+ ScopedObserver<syncable_prefs::PrefServiceSyncable,
+ syncable_prefs::PrefServiceSyncableObserver>
syncable_pref_observer_;
DISALLOW_COPY_AND_ASSIGN(ExternalPrefLoader);
diff --git a/chrome/browser/extensions/test_extension_prefs.cc b/chrome/browser/extensions/test_extension_prefs.cc
index 0e0529e..bdd5dab 100644
--- a/chrome/browser/extensions/test_extension_prefs.cc
+++ b/chrome/browser/extensions/test_extension_prefs.cc
@@ -115,7 +115,7 @@ void TestExtensionPrefs::RecreateExtensionPrefs() {
}
extension_pref_value_map_.reset(new ExtensionPrefValueMap);
- PrefServiceMockFactory factory;
+ syncable_prefs::PrefServiceMockFactory factory;
factory.SetUserPrefsFile(preferences_file_, task_runner_.get());
factory.set_extension_prefs(
new ExtensionPrefStore(extension_pref_value_map_.get(), false));
diff --git a/chrome/browser/extensions/test_extension_prefs.h b/chrome/browser/extensions/test_extension_prefs.h
index 6477280..29855ec 100644
--- a/chrome/browser/extensions/test_extension_prefs.h
+++ b/chrome/browser/extensions/test_extension_prefs.h
@@ -15,13 +15,16 @@
class ExtensionPrefValueMap;
class PrefService;
-class PrefServiceSyncable;
namespace base {
class DictionaryValue;
class SequencedTaskRunner;
}
+namespace syncable_prefs {
+class PrefServiceSyncable;
+}
+
namespace user_prefs {
class PrefRegistrySyncable;
}
@@ -94,7 +97,7 @@ class TestExtensionPrefs {
base::FilePath preferences_file_;
base::FilePath extensions_dir_;
scoped_refptr<user_prefs::PrefRegistrySyncable> pref_registry_;
- scoped_ptr<PrefServiceSyncable> pref_service_;
+ scoped_ptr<syncable_prefs::PrefServiceSyncable> pref_service_;
scoped_ptr<ExtensionPrefValueMap> extension_pref_value_map_;
const scoped_refptr<base::SequencedTaskRunner> task_runner_;
diff --git a/chrome/browser/font_family_cache_unittest.cc b/chrome/browser/font_family_cache_unittest.cc
index c11471c..412f2bf 100644
--- a/chrome/browser/font_family_cache_unittest.cc
+++ b/chrome/browser/font_family_cache_unittest.cc
@@ -35,7 +35,8 @@ TEST(FontFamilyCacheTest, Caching) {
content::TestBrowserThreadBundle thread_bundle_;
TestingProfile profile;
TestingFontFamilyCache cache(&profile);
- TestingPrefServiceSyncable* prefs = profile.GetTestingPrefService();
+ syncable_prefs::TestingPrefServiceSyncable* prefs =
+ profile.GetTestingPrefService();
std::string font1("font 1");
std::string font2("font 2");
diff --git a/chrome/browser/invalidation/invalidator_storage_unittest.cc b/chrome/browser/invalidation/invalidator_storage_unittest.cc
index 815e221..ea89a3b 100644
--- a/chrome/browser/invalidation/invalidator_storage_unittest.cc
+++ b/chrome/browser/invalidation/invalidator_storage_unittest.cc
@@ -21,7 +21,7 @@ class InvalidatorStorageTest : public testing::Test {
}
protected:
- TestingPrefServiceSyncable pref_service_;
+ syncable_prefs::TestingPrefServiceSyncable pref_service_;
};
// Clearing the storage should erase all version map entries, bootstrap data,
diff --git a/chrome/browser/net/ssl_config_service_manager_pref_unittest.cc b/chrome/browser/net/ssl_config_service_manager_pref_unittest.cc
index 70037c5..88506b9 100644
--- a/chrome/browser/net/ssl_config_service_manager_pref_unittest.cc
+++ b/chrome/browser/net/ssl_config_service_manager_pref_unittest.cc
@@ -133,7 +133,7 @@ TEST_F(SSLConfigServiceManagerPrefTest, BadDisabledCipherSuites) {
TEST_F(SSLConfigServiceManagerPrefTest, NoCommandLinePrefs) {
scoped_refptr<TestingPrefStore> local_state_store(new TestingPrefStore());
- PrefServiceMockFactory factory;
+ syncable_prefs::PrefServiceMockFactory factory;
factory.set_user_prefs(local_state_store);
scoped_refptr<PrefRegistrySimple> registry = new PrefRegistrySimple;
scoped_ptr<PrefService> local_state(factory.Create(registry.get()));
@@ -177,7 +177,7 @@ TEST_F(SSLConfigServiceManagerPrefTest, CommandLinePrefs) {
command_line.AppendSwitchASCII(switches::kSSLVersionMin, "tls1.1");
command_line.AppendSwitchASCII(switches::kSSLVersionMax, "tls1");
- PrefServiceMockFactory factory;
+ syncable_prefs::PrefServiceMockFactory factory;
factory.set_user_prefs(local_state_store);
factory.set_command_line_prefs(new CommandLinePrefStore(&command_line));
scoped_refptr<PrefRegistrySimple> registry = new PrefRegistrySimple;
@@ -221,7 +221,7 @@ TEST_F(SSLConfigServiceManagerPrefTest, NoSSL3) {
base::CommandLine command_line(base::CommandLine::NO_PROGRAM);
command_line.AppendSwitchASCII(switches::kSSLVersionMin, "ssl3");
- PrefServiceMockFactory factory;
+ syncable_prefs::PrefServiceMockFactory factory;
factory.set_user_prefs(local_state_store);
factory.set_command_line_prefs(new CommandLinePrefStore(&command_line));
scoped_refptr<PrefRegistrySimple> registry = new PrefRegistrySimple;
diff --git a/chrome/browser/notifications/extension_welcome_notification.cc b/chrome/browser/notifications/extension_welcome_notification.cc
index 7ea0bb7..383107f 100644
--- a/chrome/browser/notifications/extension_welcome_notification.cc
+++ b/chrome/browser/notifications/extension_welcome_notification.cc
@@ -173,7 +173,7 @@ ExtensionWelcomeNotification::~ExtensionWelcomeNotification() {
void ExtensionWelcomeNotification::OnIsSyncingChanged() {
DCHECK(delayed_notification_);
- PrefServiceSyncable* const pref_service_syncable =
+ syncable_prefs::PrefServiceSyncable* const pref_service_syncable =
PrefServiceSyncableFromProfile(profile_);
if (pref_service_syncable->IsSyncing()) {
pref_service_syncable->RemoveObserver(this);
@@ -186,7 +186,7 @@ void ExtensionWelcomeNotification::OnIsSyncingChanged() {
void ExtensionWelcomeNotification::ShowWelcomeNotificationIfNecessary(
const Notification& notification) {
if ((notification.notifier_id() == notifier_id_) && !delayed_notification_) {
- PrefServiceSyncable* const pref_service_syncable =
+ syncable_prefs::PrefServiceSyncable* const pref_service_syncable =
PrefServiceSyncableFromProfile(profile_);
if (pref_service_syncable->IsSyncing()) {
PrefService* const pref_service = profile_->GetPrefs();
diff --git a/chrome/browser/notifications/extension_welcome_notification.h b/chrome/browser/notifications/extension_welcome_notification.h
index 00bc40c..728a1b9 100644
--- a/chrome/browser/notifications/extension_welcome_notification.h
+++ b/chrome/browser/notifications/extension_welcome_notification.h
@@ -41,8 +41,9 @@ class Profile;
// connectivity.
//
// This class expects to be created and called from the UI thread.
-class ExtensionWelcomeNotification : public KeyedService,
- public PrefServiceSyncableObserver {
+class ExtensionWelcomeNotification
+ : public KeyedService,
+ public syncable_prefs::PrefServiceSyncableObserver {
public:
// Allows for overriding global calls.
class Delegate {
@@ -75,7 +76,7 @@ class ExtensionWelcomeNotification : public KeyedService,
static ExtensionWelcomeNotification* Create(Profile* const profile,
Delegate* const delegate);
- // PrefServiceSyncableObserver
+ // syncable_prefs::PrefServiceSyncableObserver
void OnIsSyncingChanged() override;
// Adds in the welcome notification if required for components built
diff --git a/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc b/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc
index a9b07df..366f001 100644
--- a/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc
+++ b/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc
@@ -79,7 +79,7 @@ class ChromePasswordManagerClientTest : public ChromeRenderViewHostTestHarness {
: service_(nullptr), field_trial_list_(nullptr) {}
void SetUp() override;
- TestingPrefServiceSyncable* prefs() {
+ syncable_prefs::TestingPrefServiceSyncable* prefs() {
return profile()->GetTestingPrefService();
}
diff --git a/chrome/browser/password_manager/password_store_proxy_mac_unittest.cc b/chrome/browser/password_manager/password_store_proxy_mac_unittest.cc
index cac736a..d1bc400 100644
--- a/chrome/browser/password_manager/password_store_proxy_mac_unittest.cc
+++ b/chrome/browser/password_manager/password_store_proxy_mac_unittest.cc
@@ -125,7 +125,7 @@ class PasswordStoreProxyMacTest
base::ScopedTempDir db_dir_;
scoped_refptr<PasswordStoreProxyMac> store_;
- TestingPrefServiceSyncable testing_prefs_;
+ syncable_prefs::TestingPrefServiceSyncable testing_prefs_;
};
PasswordStoreProxyMacTest::PasswordStoreProxyMacTest() {
diff --git a/chrome/browser/plugins/plugin_info_message_filter_unittest.cc b/chrome/browser/plugins/plugin_info_message_filter_unittest.cc
index cf51bb0..d9bbb9e 100644
--- a/chrome/browser/plugins/plugin_info_message_filter_unittest.cc
+++ b/chrome/browser/plugins/plugin_info_message_filter_unittest.cc
@@ -258,7 +258,8 @@ TEST_F(PluginInfoMessageFilterTest, GetPluginContentSetting) {
true, false);
// Block plugins via policy.
- TestingPrefServiceSyncable* prefs = profile()->GetTestingPrefService();
+ syncable_prefs::TestingPrefServiceSyncable* prefs =
+ profile()->GetTestingPrefService();
prefs->SetManagedPref(prefs::kManagedDefaultPluginsSetting,
new base::FundamentalValue(CONTENT_SETTING_BLOCK));
diff --git a/chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc b/chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc
index bd3fd0a..3295fc7 100644
--- a/chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc
+++ b/chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc
@@ -154,8 +154,8 @@ class UserPolicySigninServiceTest : public testing::Test {
// Create a testing profile with cloud-policy-on-signin enabled, and bring
// up a UserCloudPolicyManager with a MockUserCloudPolicyStore.
- scoped_ptr<TestingPrefServiceSyncable> prefs(
- new TestingPrefServiceSyncable());
+ scoped_ptr<syncable_prefs::TestingPrefServiceSyncable> prefs(
+ new syncable_prefs::TestingPrefServiceSyncable());
chrome::RegisterUserProfilePrefs(prefs->registry());
// UserCloudPolicyManagerFactory isn't a real
@@ -166,7 +166,8 @@ class UserPolicySigninServiceTest : public testing::Test {
UserCloudPolicyManagerFactory::GetInstance()->RegisterTestingFactory(
BuildCloudPolicyManager);
TestingProfile::Builder builder;
- builder.SetPrefService(scoped_ptr<PrefServiceSyncable>(prefs.Pass()));
+ builder.SetPrefService(
+ scoped_ptr<syncable_prefs::PrefServiceSyncable>(prefs.Pass()));
builder.AddTestingFactory(SigninManagerFactory::GetInstance(),
BuildFakeSigninManagerBase);
builder.AddTestingFactory(ProfileOAuth2TokenServiceFactory::GetInstance(),
diff --git a/chrome/browser/prefs/chrome_pref_model_associator_client.h b/chrome/browser/prefs/chrome_pref_model_associator_client.h
index 3895aea..f0b6c94 100644
--- a/chrome/browser/prefs/chrome_pref_model_associator_client.h
+++ b/chrome/browser/prefs/chrome_pref_model_associator_client.h
@@ -15,7 +15,8 @@ template <typename T>
struct DefaultSingletonTraits;
}
-class ChromePrefModelAssociatorClient : public PrefModelAssociatorClient {
+class ChromePrefModelAssociatorClient
+ : public syncable_prefs::PrefModelAssociatorClient {
public:
// Returns the global instance.
static ChromePrefModelAssociatorClient* GetInstance();
@@ -26,7 +27,7 @@ class ChromePrefModelAssociatorClient : public PrefModelAssociatorClient {
ChromePrefModelAssociatorClient();
~ChromePrefModelAssociatorClient() override;
- // PrefModelAssociatorClient implementation.
+ // syncable_prefs::PrefModelAssociatorClient implementation.
bool IsMergeableListPreference(const std::string& pref_name) const override;
bool IsMergeableDictionaryPreference(
const std::string& pref_name) const override;
diff --git a/chrome/browser/prefs/chrome_pref_service_factory.cc b/chrome/browser/prefs/chrome_pref_service_factory.cc
index c1935c9..95f26a0 100644
--- a/chrome/browser/prefs/chrome_pref_service_factory.cc
+++ b/chrome/browser/prefs/chrome_pref_service_factory.cc
@@ -420,7 +420,7 @@ scoped_ptr<ProfilePrefStoreManager> CreateProfilePrefStoreManager(
}
void PrepareFactory(
- PrefServiceSyncableFactory* factory,
+ syncable_prefs::PrefServiceSyncableFactory* factory,
policy::PolicyService* policy_service,
SupervisedUserSettingsService* supervised_user_settings,
scoped_refptr<PersistentPrefStore> user_pref_store,
@@ -478,7 +478,7 @@ scoped_ptr<PrefService> CreateLocalState(
policy::PolicyService* policy_service,
const scoped_refptr<PrefRegistry>& pref_registry,
bool async) {
- PrefServiceSyncableFactory factory;
+ syncable_prefs::PrefServiceSyncableFactory factory;
PrepareFactory(
&factory,
policy_service,
@@ -490,7 +490,7 @@ scoped_ptr<PrefService> CreateLocalState(
return factory.Create(pref_registry.get());
}
-scoped_ptr<PrefServiceSyncable> CreateProfilePrefs(
+scoped_ptr<syncable_prefs::PrefServiceSyncable> CreateProfilePrefs(
const base::FilePath& profile_path,
base::SequencedTaskRunner* pref_io_task_runner,
TrackedPreferenceValidationDelegate* validation_delegate,
@@ -512,7 +512,7 @@ scoped_ptr<PrefServiceSyncable> CreateProfilePrefs(
base::Bind(sync_start_util::GetFlareForSyncableService(profile_path),
syncer::PREFERENCES);
- PrefServiceSyncableFactory factory;
+ syncable_prefs::PrefServiceSyncableFactory factory;
scoped_refptr<PersistentPrefStore> user_pref_store(
CreateProfilePrefStoreManager(profile_path)
->CreateProfilePrefStore(pref_io_task_runner,
@@ -524,7 +524,7 @@ scoped_ptr<PrefServiceSyncable> CreateProfilePrefs(
user_pref_store,
extension_prefs,
async);
- scoped_ptr<PrefServiceSyncable> pref_service =
+ scoped_ptr<syncable_prefs::PrefServiceSyncable> pref_service =
factory.CreateSyncable(pref_registry.get());
ConfigureDefaultSearchPrefMigrationToDictionaryValue(pref_service.get());
diff --git a/chrome/browser/prefs/chrome_pref_service_factory.h b/chrome/browser/prefs/chrome_pref_service_factory.h
index 425aef4..f126719 100644
--- a/chrome/browser/prefs/chrome_pref_service_factory.h
+++ b/chrome/browser/prefs/chrome_pref_service_factory.h
@@ -19,6 +19,10 @@ namespace policy {
class PolicyService;
}
+namespace syncable_prefs {
+class PrefServiceSyncable;
+}
+
namespace user_prefs {
class PrefRegistrySyncable;
}
@@ -27,7 +31,7 @@ class PrefHashStore;
class PrefRegistry;
class PrefRegistrySimple;
class PrefService;
-class PrefServiceSyncable;
+
class PrefStore;
class Profile;
class SupervisedUserSettingsService;
@@ -67,7 +71,7 @@ scoped_ptr<PrefService> CreateLocalState(
const scoped_refptr<PrefRegistry>& pref_registry,
bool async);
-scoped_ptr<PrefServiceSyncable> CreateProfilePrefs(
+scoped_ptr<syncable_prefs::PrefServiceSyncable> CreateProfilePrefs(
const base::FilePath& pref_filename,
base::SequencedTaskRunner* pref_io_task_runner,
TrackedPreferenceValidationDelegate* validation_delegate,
diff --git a/chrome/browser/prefs/chrome_pref_service_unittest.cc b/chrome/browser/prefs/chrome_pref_service_unittest.cc
index 4f8ec87..b54d543 100644
--- a/chrome/browser/prefs/chrome_pref_service_unittest.cc
+++ b/chrome/browser/prefs/chrome_pref_service_unittest.cc
@@ -98,7 +98,7 @@ class ChromePrefServiceWebKitPrefs : public ChromeRenderViewHostTestHarness {
// harness is not supposed to overwrite a profile if it's already created.
// Set some (WebKit) user preferences.
- TestingPrefServiceSyncable* pref_services =
+ syncable_prefs::TestingPrefServiceSyncable* pref_services =
profile()->GetTestingPrefService();
pref_services->SetUserPref(prefs::kDefaultCharset,
new base::StringValue("utf8"));
diff --git a/chrome/browser/prefs/command_line_pref_store_proxy_unittest.cc b/chrome/browser/prefs/command_line_pref_store_proxy_unittest.cc
index eff0459..01aa882 100644
--- a/chrome/browser/prefs/command_line_pref_store_proxy_unittest.cc
+++ b/chrome/browser/prefs/command_line_pref_store_proxy_unittest.cc
@@ -170,7 +170,7 @@ class CommandLinePrefStoreProxyTest
}
scoped_refptr<PrefRegistrySimple> registry = new PrefRegistrySimple;
PrefProxyConfigTrackerImpl::RegisterPrefs(registry.get());
- PrefServiceMockFactory factory;
+ syncable_prefs::PrefServiceMockFactory factory;
factory.set_command_line_prefs(new CommandLinePrefStore(&command_line_));
pref_service_ = factory.Create(registry.get()).Pass();
PrefProxyConfigTrackerImpl::ReadPrefConfig(pref_service_.get(),
diff --git a/chrome/browser/prefs/incognito_mode_prefs_unittest.cc b/chrome/browser/prefs/incognito_mode_prefs_unittest.cc
index 3f45d4ee..67268cb 100644
--- a/chrome/browser/prefs/incognito_mode_prefs_unittest.cc
+++ b/chrome/browser/prefs/incognito_mode_prefs_unittest.cc
@@ -14,7 +14,7 @@ class IncognitoModePrefsTest : public testing::Test {
IncognitoModePrefs::RegisterProfilePrefs(prefs_.registry());
}
- TestingPrefServiceSyncable prefs_;
+ syncable_prefs::TestingPrefServiceSyncable prefs_;
};
TEST_F(IncognitoModePrefsTest, IntToAvailability) {
diff --git a/chrome/browser/prefs/pref_metrics_service.cc b/chrome/browser/prefs/pref_metrics_service.cc
index 644bc27..14745d8 100644
--- a/chrome/browser/prefs/pref_metrics_service.cc
+++ b/chrome/browser/prefs/pref_metrics_service.cc
@@ -55,8 +55,10 @@ PrefMetricsService::PrefMetricsService(Profile* profile)
weak_factory_(this) {
RecordLaunchPrefs();
- PrefServiceSyncable* prefs = PrefServiceSyncableFromProfile(profile_);
- synced_pref_change_registrar_.reset(new SyncedPrefChangeRegistrar(prefs));
+ syncable_prefs::PrefServiceSyncable* prefs =
+ PrefServiceSyncableFromProfile(profile_);
+ synced_pref_change_registrar_.reset(
+ new syncable_prefs::SyncedPrefChangeRegistrar(prefs));
RegisterSyncedPrefObservers();
}
@@ -177,7 +179,8 @@ void PrefMetricsService::OnPrefChanged(
const LogHistogramValueCallback& callback,
const std::string& path,
bool from_sync) {
- PrefServiceSyncable* prefs = PrefServiceSyncableFromProfile(profile_);
+ syncable_prefs::PrefServiceSyncable* prefs =
+ PrefServiceSyncableFromProfile(profile_);
const PrefService::Preference* pref = prefs->FindPreference(path.c_str());
DCHECK(pref);
std::string source_name(
diff --git a/chrome/browser/prefs/pref_metrics_service.h b/chrome/browser/prefs/pref_metrics_service.h
index eb1c508..db7fea3 100644
--- a/chrome/browser/prefs/pref_metrics_service.h
+++ b/chrome/browser/prefs/pref_metrics_service.h
@@ -83,7 +83,8 @@ class PrefMetricsService : public KeyedService {
PrefService* prefs_;
PrefService* local_state_;
- scoped_ptr<SyncedPrefChangeRegistrar> synced_pref_change_registrar_;
+ scoped_ptr<syncable_prefs::SyncedPrefChangeRegistrar>
+ synced_pref_change_registrar_;
base::WeakPtrFactory<PrefMetricsService> weak_factory_;
diff --git a/chrome/browser/prefs/pref_service_syncable_util.cc b/chrome/browser/prefs/pref_service_syncable_util.cc
index 1beb4308..49cadee 100644
--- a/chrome/browser/prefs/pref_service_syncable_util.cc
+++ b/chrome/browser/prefs/pref_service_syncable_util.cc
@@ -16,16 +16,19 @@
#include "components/proxy_config/proxy_config_pref_names.h"
#endif
-PrefServiceSyncable* PrefServiceSyncableFromProfile(Profile* profile) {
- return static_cast<PrefServiceSyncable*>(profile->GetPrefs());
+syncable_prefs::PrefServiceSyncable* PrefServiceSyncableFromProfile(
+ Profile* profile) {
+ return static_cast<syncable_prefs::PrefServiceSyncable*>(profile->GetPrefs());
}
-PrefServiceSyncable* PrefServiceSyncableIncognitoFromProfile(Profile* profile) {
- return static_cast<PrefServiceSyncable*>(profile->GetOffTheRecordPrefs());
+syncable_prefs::PrefServiceSyncable* PrefServiceSyncableIncognitoFromProfile(
+ Profile* profile) {
+ return static_cast<syncable_prefs::PrefServiceSyncable*>(
+ profile->GetOffTheRecordPrefs());
}
-PrefServiceSyncable* CreateIncognitoPrefServiceSyncable(
- PrefServiceSyncable* pref_service,
+syncable_prefs::PrefServiceSyncable* CreateIncognitoPrefServiceSyncable(
+ syncable_prefs::PrefServiceSyncable* pref_service,
PrefStore* incognito_extension_pref_store) {
// List of keys that cannot be changed in the user prefs file by the incognito
// profile. All preferences that store information about the browsing history
diff --git a/chrome/browser/prefs/pref_service_syncable_util.h b/chrome/browser/prefs/pref_service_syncable_util.h
index dfa40965..a27a4ca 100644
--- a/chrome/browser/prefs/pref_service_syncable_util.h
+++ b/chrome/browser/prefs/pref_service_syncable_util.h
@@ -5,28 +5,33 @@
#ifndef CHROME_BROWSER_PREFS_PREF_SERVICE_SYNCABLE_UTIL_H_
#define CHROME_BROWSER_PREFS_PREF_SERVICE_SYNCABLE_UTIL_H_
-class PrefServiceSyncable;
class PrefStore;
class Profile;
-// PrefServiceSyncable is a PrefService with added integration for
-// sync, and knowledge of how to create an incognito
-// PrefService. For code that does not need to know about the sync
-// integration, you should use only the plain PrefService type.
+namespace syncable_prefs {
+class PrefServiceSyncable;
+}
+
+// syncable_prefs::PrefServiceSyncable is a PrefService with added integration
+// for sync, and knowledge of how to create an incognito PrefService. For code
+// that does not need to know about the sync integration, you should use only
+// the plain PrefService type.
//
// For this reason, Profile does not expose an accessor for the
-// PrefServiceSyncable type. Instead, you can use the utilities
-// below to retrieve the PrefServiceSyncable (or its incognito
+// syncable_prefs::PrefServiceSyncable type. Instead, you can use the utilities
+// below to retrieve the syncable_prefs::PrefServiceSyncable (or its incognito
// version) from a Profile.
-PrefServiceSyncable* PrefServiceSyncableFromProfile(Profile* profile);
-PrefServiceSyncable* PrefServiceSyncableIncognitoFromProfile(Profile* profile);
+syncable_prefs::PrefServiceSyncable* PrefServiceSyncableFromProfile(
+ Profile* profile);
+syncable_prefs::PrefServiceSyncable* PrefServiceSyncableIncognitoFromProfile(
+ Profile* profile);
// Creates an incognito copy of |pref_service| that shares most prefs but uses
// a fresh non-persistent overlay for the user pref store and an individual
// extension pref store (to cache the effective extension prefs for incognito
// windows).
-PrefServiceSyncable* CreateIncognitoPrefServiceSyncable(
- PrefServiceSyncable* pref_service,
+syncable_prefs::PrefServiceSyncable* CreateIncognitoPrefServiceSyncable(
+ syncable_prefs::PrefServiceSyncable* pref_service,
PrefStore* incognito_extension_pref_store);
#endif // CHROME_BROWSER_PREFS_PREF_SERVICE_SYNCABLE_UTIL_H_
diff --git a/chrome/browser/prefs/proxy_policy_unittest.cc b/chrome/browser/prefs/proxy_policy_unittest.cc
index 5ec8013..09b6d83 100644
--- a/chrome/browser/prefs/proxy_policy_unittest.cc
+++ b/chrome/browser/prefs/proxy_policy_unittest.cc
@@ -98,7 +98,7 @@ class ProxyPolicyTest : public testing::Test {
void TearDown() override { provider_.Shutdown(); }
scoped_ptr<PrefService> CreatePrefService(bool with_managed_policies) {
- PrefServiceMockFactory factory;
+ syncable_prefs::PrefServiceMockFactory factory;
factory.set_command_line_prefs(new CommandLinePrefStore(&command_line_));
if (with_managed_policies) {
factory.SetManagedPolicies(policy_service_.get(),
@@ -107,7 +107,7 @@ class ProxyPolicyTest : public testing::Test {
scoped_refptr<user_prefs::PrefRegistrySyncable> registry(
new user_prefs::PrefRegistrySyncable);
- scoped_ptr<PrefServiceSyncable> prefs =
+ scoped_ptr<syncable_prefs::PrefServiceSyncable> prefs =
factory.CreateSyncable(registry.get());
chrome::RegisterUserProfilePrefs(registry.get());
return prefs.Pass();
diff --git a/chrome/browser/prefs/session_startup_pref_unittest.cc b/chrome/browser/prefs/session_startup_pref_unittest.cc
index a2f2713..1e8d221 100644
--- a/chrome/browser/prefs/session_startup_pref_unittest.cc
+++ b/chrome/browser/prefs/session_startup_pref_unittest.cc
@@ -13,7 +13,7 @@
class SessionStartupPrefTest : public testing::Test {
public:
void SetUp() override {
- pref_service_.reset(new TestingPrefServiceSyncable);
+ pref_service_.reset(new syncable_prefs::TestingPrefServiceSyncable);
SessionStartupPref::RegisterProfilePrefs(registry());
registry()->RegisterBooleanPref(prefs::kHomePageIsNewTabPage, true);
}
@@ -31,7 +31,7 @@ class SessionStartupPrefTest : public testing::Test {
return pref_service_->registry();
}
- scoped_ptr<TestingPrefServiceSyncable> pref_service_;
+ scoped_ptr<syncable_prefs::TestingPrefServiceSyncable> pref_service_;
};
TEST_F(SessionStartupPrefTest, URLListIsFixedUp) {
diff --git a/chrome/browser/prefs/synced_pref_change_registrar_browsertest.cc b/chrome/browser/prefs/synced_pref_change_registrar_browsertest.cc
index 29942ba..6e6390a 100644
--- a/chrome/browser/prefs/synced_pref_change_registrar_browsertest.cc
+++ b/chrome/browser/prefs/synced_pref_change_registrar_browsertest.cc
@@ -85,11 +85,11 @@ class SyncedPrefChangeRegistrarTest : public InProcessBrowserTest {
return prefs_->GetBoolean(name.c_str());
}
- PrefServiceSyncable* prefs() const {
+ syncable_prefs::PrefServiceSyncable* prefs() const {
return prefs_;
}
- SyncedPrefChangeRegistrar* registrar() const {
+ syncable_prefs::SyncedPrefChangeRegistrar* registrar() const {
return registrar_.get();
}
@@ -112,16 +112,16 @@ class SyncedPrefChangeRegistrarTest : public InProcessBrowserTest {
scoped_ptr<syncer::SyncChangeProcessor>(
new syncer::FakeSyncChangeProcessor),
scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock));
- registrar_.reset(new SyncedPrefChangeRegistrar(prefs_));
+ registrar_.reset(new syncable_prefs::SyncedPrefChangeRegistrar(prefs_));
}
void TearDownOnMainThread() override { registrar_.reset(); }
- PrefServiceSyncable* prefs_;
+ syncable_prefs::PrefServiceSyncable* prefs_;
syncer::SyncableService* syncer_;
int next_sync_data_id_;
- scoped_ptr<SyncedPrefChangeRegistrar> registrar_;
+ scoped_ptr<syncable_prefs::SyncedPrefChangeRegistrar> registrar_;
#if defined(ENABLE_CONFIGURATION_POLICY)
policy::MockConfigurationPolicyProvider policy_provider_;
#endif
diff --git a/chrome/browser/printing/cloud_print/cloud_print_proxy_service_unittest.cc b/chrome/browser/printing/cloud_print/cloud_print_proxy_service_unittest.cc
index 293dcfc..a299a83 100644
--- a/chrome/browser/printing/cloud_print/cloud_print_proxy_service_unittest.cc
+++ b/chrome/browser/printing/cloud_print/cloud_print_proxy_service_unittest.cc
@@ -242,7 +242,8 @@ TEST_F(CloudPrintProxyPolicyTest, StartWithNoPolicyProxyDisabled) {
service.GetMockServiceProcessControl()->SetConnectSuccessMockExpectations(
MockServiceProcessControl::kServiceStateDisabled, false);
- TestingPrefServiceSyncable* prefs = profile_.GetTestingPrefService();
+ syncable_prefs::TestingPrefServiceSyncable* prefs =
+ profile_.GetTestingPrefService();
prefs->SetUserPref(
prefs::kCloudPrintEmail,
new base::StringValue(MockServiceProcessControl::EnabledUserId()));
@@ -258,7 +259,8 @@ TEST_F(CloudPrintProxyPolicyTest, StartWithNoPolicyProxyEnabled) {
service.GetMockServiceProcessControl()->SetConnectSuccessMockExpectations(
MockServiceProcessControl::kServiceStateEnabled, false);
- TestingPrefServiceSyncable* prefs = profile_.GetTestingPrefService();
+ syncable_prefs::TestingPrefServiceSyncable* prefs =
+ profile_.GetTestingPrefService();
prefs->SetUserPref(prefs::kCloudPrintEmail,
new base::StringValue(std::string()));
@@ -275,7 +277,8 @@ TEST_F(CloudPrintProxyPolicyTest, StartWithPolicySetProxyDisabled) {
service.GetMockServiceProcessControl()->SetConnectSuccessMockExpectations(
MockServiceProcessControl::kServiceStateDisabled, false);
- TestingPrefServiceSyncable* prefs = profile_.GetTestingPrefService();
+ syncable_prefs::TestingPrefServiceSyncable* prefs =
+ profile_.GetTestingPrefService();
prefs->SetUserPref(prefs::kCloudPrintEmail,
new base::StringValue(std::string()));
prefs->SetManagedPref(prefs::kCloudPrintProxyEnabled,
@@ -293,7 +296,8 @@ TEST_F(CloudPrintProxyPolicyTest, StartWithPolicySetProxyEnabled) {
MockServiceProcessControl::kServiceStateEnabled, false);
service.GetMockServiceProcessControl()->SetWillBeDisabledExpectations();
- TestingPrefServiceSyncable* prefs = profile_.GetTestingPrefService();
+ syncable_prefs::TestingPrefServiceSyncable* prefs =
+ profile_.GetTestingPrefService();
prefs->SetUserPref(prefs::kCloudPrintEmail,
new base::StringValue(std::string()));
prefs->SetManagedPref(prefs::kCloudPrintProxyEnabled,
@@ -310,7 +314,8 @@ TEST_F(CloudPrintProxyPolicyTest, StartWithNoPolicyProxyDisabledThenSetPolicy) {
service.GetMockServiceProcessControl()->SetConnectSuccessMockExpectations(
MockServiceProcessControl::kServiceStateDisabled, false);
- TestingPrefServiceSyncable* prefs = profile_.GetTestingPrefService();
+ syncable_prefs::TestingPrefServiceSyncable* prefs =
+ profile_.GetTestingPrefService();
prefs->SetUserPref(
prefs::kCloudPrintEmail,
new base::StringValue(MockServiceProcessControl::EnabledUserId()));
@@ -331,7 +336,8 @@ TEST_F(CloudPrintProxyPolicyTest, StartWithNoPolicyProxyEnabledThenSetPolicy) {
service.GetMockServiceProcessControl()->SetConnectSuccessMockExpectations(
MockServiceProcessControl::kServiceStateEnabled, false);
- TestingPrefServiceSyncable* prefs = profile_.GetTestingPrefService();
+ syncable_prefs::TestingPrefServiceSyncable* prefs =
+ profile_.GetTestingPrefService();
prefs->SetUserPref(prefs::kCloudPrintEmail,
new base::StringValue(std::string()));
@@ -355,7 +361,8 @@ TEST_F(CloudPrintProxyPolicyTest,
service.GetMockServiceProcessControl()->SetConnectSuccessMockExpectations(
MockServiceProcessControl::kServiceStateDisabled, false);
- TestingPrefServiceSyncable* prefs = profile_.GetTestingPrefService();
+ syncable_prefs::TestingPrefServiceSyncable* prefs =
+ profile_.GetTestingPrefService();
prefs->SetUserPref(prefs::kCloudPrintEmail,
new base::StringValue(std::string()));
prefs->SetManagedPref(prefs::kCloudPrintProxyEnabled,
@@ -376,7 +383,8 @@ TEST_F(CloudPrintProxyPolicyTest,
MockServiceProcessControl::kServiceStateEnabled, false);
service.GetMockServiceProcessControl()->SetWillBeDisabledExpectations();
- TestingPrefServiceSyncable* prefs = profile_.GetTestingPrefService();
+ syncable_prefs::TestingPrefServiceSyncable* prefs =
+ profile_.GetTestingPrefService();
prefs->SetUserPref(prefs::kCloudPrintEmail,
new base::StringValue(std::string()));
prefs->SetManagedPref(prefs::kCloudPrintProxyEnabled,
@@ -395,7 +403,8 @@ TEST_F(CloudPrintProxyPolicyTest, StartWithNoPolicyProxyDisabledThenEnable) {
service.GetMockServiceProcessControl()->SetConnectSuccessMockExpectations(
MockServiceProcessControl::kServiceStateDisabled, false);
- TestingPrefServiceSyncable* prefs = profile_.GetTestingPrefService();
+ syncable_prefs::TestingPrefServiceSyncable* prefs =
+ profile_.GetTestingPrefService();
prefs->SetUserPref(
prefs::kCloudPrintEmail,
new base::StringValue(MockServiceProcessControl::EnabledUserId()));
@@ -418,7 +427,8 @@ TEST_F(CloudPrintProxyPolicyTest,
MockServiceProcessControl::kServiceStateEnabled, false);
service.GetMockServiceProcessControl()->SetWillBeDisabledExpectations();
- TestingPrefServiceSyncable* prefs = profile_.GetTestingPrefService();
+ syncable_prefs::TestingPrefServiceSyncable* prefs =
+ profile_.GetTestingPrefService();
prefs->SetUserPref(prefs::kCloudPrintEmail,
new base::StringValue(std::string()));
prefs->SetManagedPref(prefs::kCloudPrintProxyEnabled,
diff --git a/chrome/browser/profile_resetter/automatic_profile_resetter_unittest.cc b/chrome/browser/profile_resetter/automatic_profile_resetter_unittest.cc
index 873ce05..046d7de 100644
--- a/chrome/browser/profile_resetter/automatic_profile_resetter_unittest.cc
+++ b/chrome/browser/profile_resetter/automatic_profile_resetter_unittest.cc
@@ -1268,7 +1268,8 @@ TEST_F(AutomaticProfileResetterTest, InputManagedUserPreferencesCorrect) {
SetTestingProgram(ConstructProgramToCheckPreferences());
SetTestingHashSeed(kTestHashSeed);
- TestingPrefServiceSyncable* prefs = profile()->GetTestingPrefService();
+ syncable_prefs::TestingPrefServiceSyncable* prefs =
+ profile()->GetTestingPrefService();
prefs->SetManagedPref(kTestPreferencePath,
new base::StringValue(kTestPreferenceValue));
diff --git a/chrome/browser/profiles/gaia_info_update_service_unittest.cc b/chrome/browser/profiles/gaia_info_update_service_unittest.cc
index 3d741bd..531fe73 100644
--- a/chrome/browser/profiles/gaia_info_update_service_unittest.cc
+++ b/chrome/browser/profiles/gaia_info_update_service_unittest.cc
@@ -79,9 +79,9 @@ class GAIAInfoUpdateServiceTest : public ProfileInfoCacheTest {
testing_factories.push_back(std::make_pair(
ChromeSigninClientFactory::GetInstance(),
signin::BuildTestSigninClient));
- Profile* profile = testing_profile_manager_.CreateTestingProfile(name,
- scoped_ptr<PrefServiceSyncable>(), base::UTF8ToUTF16(name), 0,
- std::string(), testing_factories);
+ Profile* profile = testing_profile_manager_.CreateTestingProfile(
+ name, scoped_ptr<syncable_prefs::PrefServiceSyncable>(),
+ base::UTF8ToUTF16(name), 0, std::string(), testing_factories);
// The testing manager sets the profile name manually, which counts as
// a user-customized profile name. Reset this to match the default name
// we are actually using.
diff --git a/chrome/browser/profiles/off_the_record_profile_impl.h b/chrome/browser/profiles/off_the_record_profile_impl.h
index 49684dc..7be8038 100644
--- a/chrome/browser/profiles/off_the_record_profile_impl.h
+++ b/chrome/browser/profiles/off_the_record_profile_impl.h
@@ -19,7 +19,9 @@
using base::Time;
using base::TimeDelta;
+namespace syncable_prefs {
class PrefServiceSyncable;
+}
////////////////////////////////////////////////////////////////////////////////
//
@@ -126,7 +128,7 @@ class OffTheRecordProfileImpl : public Profile {
Profile* profile_;
// Weak pointer owned by |profile_|.
- PrefServiceSyncable* prefs_;
+ syncable_prefs::PrefServiceSyncable* prefs_;
scoped_ptr<content::HostZoomMap::Subscription> track_zoom_subscription_;
scoped_ptr<ChromeZoomLevelPrefs::DefaultZoomLevelSubscription>
diff --git a/chrome/browser/profiles/profile_destroyer_unittest.cc b/chrome/browser/profiles/profile_destroyer_unittest.cc
index 8ffcab2..3a0b5fe 100644
--- a/chrome/browser/profiles/profile_destroyer_unittest.cc
+++ b/chrome/browser/profiles/profile_destroyer_unittest.cc
@@ -15,7 +15,7 @@ class TestingOffTheRecordDestructionProfile : public TestingProfile {
: TestingProfile(base::FilePath(),
NULL,
scoped_refptr<ExtensionSpecialStoragePolicy>()
- scoped_ptr<PrefServiceSyncable>(),
+ scoped_ptr<syncable_prefs::PrefServiceSyncable>(),
true,
TestingFactories()),
destroyed_otr_profile_(false) {
diff --git a/chrome/browser/profiles/profile_impl.h b/chrome/browser/profiles/profile_impl.h
index 5f41bd3..8bbf7e1 100644
--- a/chrome/browser/profiles/profile_impl.h
+++ b/chrome/browser/profiles/profile_impl.h
@@ -23,7 +23,7 @@
class NetPrefObserver;
class PrefService;
-class PrefServiceSyncable;
+
class ShortcutsBackend;
class SSLConfigServiceManager;
class TrackedPreferenceValidationDelegate;
@@ -55,6 +55,10 @@ class ProfilePolicyConnector;
class SchemaRegistryService;
}
+namespace syncable_prefs {
+class PrefServiceSyncable;
+}
+
namespace user_prefs {
class refRegistrySyncable;
}
@@ -223,8 +227,8 @@ class ProfileImpl : public Profile {
// |net_pref_observer_|, |io_data_| and others store pointers to |prefs_| and
// shall be destructed first.
scoped_refptr<user_prefs::PrefRegistrySyncable> pref_registry_;
- scoped_ptr<PrefServiceSyncable> prefs_;
- scoped_ptr<PrefServiceSyncable> otr_prefs_;
+ scoped_ptr<syncable_prefs::PrefServiceSyncable> prefs_;
+ scoped_ptr<syncable_prefs::PrefServiceSyncable> otr_prefs_;
ProfileImplIOData::Handle io_data_;
#if defined(ENABLE_EXTENSIONS)
scoped_refptr<ExtensionSpecialStoragePolicy>
diff --git a/chrome/browser/profiles/profile_info_cache_unittest.cc b/chrome/browser/profiles/profile_info_cache_unittest.cc
index d6e7b53..9272f6e 100644
--- a/chrome/browser/profiles/profile_info_cache_unittest.cc
+++ b/chrome/browser/profiles/profile_info_cache_unittest.cc
@@ -486,7 +486,7 @@ TEST_F(ProfileInfoCacheTest, CreateSupervisedTestingProfile) {
testing_profile_manager_.CreateTestingProfile("default");
base::string16 supervised_user_name = ASCIIToUTF16("Supervised User");
testing_profile_manager_.CreateTestingProfile(
- "test1", scoped_ptr<PrefServiceSyncable>(),
+ "test1", scoped_ptr<syncable_prefs::PrefServiceSyncable>(),
supervised_user_name, 0, "TEST_ID", TestingProfile::TestingFactories());
for (size_t i = 0; i < GetCache()->GetNumberOfProfiles(); i++) {
bool is_supervised =
diff --git a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service_unittest.cc b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service_unittest.cc
index ba50384..15d1038 100644
--- a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service_unittest.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service_unittest.cc
@@ -207,8 +207,8 @@ class IncidentReportingServiceTest : public testing::Test {
OnProfileAdditionAction on_addition_action,
scoped_ptr<base::Value> incidents_sent) {
// Create prefs for the profile with safe browsing enabled or not.
- scoped_ptr<TestingPrefServiceSyncable> prefs(
- new TestingPrefServiceSyncable);
+ scoped_ptr<syncable_prefs::TestingPrefServiceSyncable> prefs(
+ new syncable_prefs::TestingPrefServiceSyncable);
chrome::RegisterUserProfilePrefs(prefs->registry());
prefs->SetBoolean(prefs::kSafeBrowsingEnabled,
safe_browsing_opt_in == SAFE_BROWSING_OPT_IN);
diff --git a/chrome/browser/safe_browsing/incident_reporting/last_download_finder_unittest.cc b/chrome/browser/safe_browsing/incident_reporting/last_download_finder_unittest.cc
index af77ab1..74299bd 100644
--- a/chrome/browser/safe_browsing/incident_reporting/last_download_finder_unittest.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/last_download_finder_unittest.cc
@@ -173,8 +173,8 @@ class LastDownloadFinderTest : public testing::Test {
NULL)));
// Create prefs for the profile with safe browsing enabled or not.
- scoped_ptr<TestingPrefServiceSyncable> prefs(
- new TestingPrefServiceSyncable);
+ scoped_ptr<syncable_prefs::TestingPrefServiceSyncable> prefs(
+ new syncable_prefs::TestingPrefServiceSyncable);
chrome::RegisterUserProfilePrefs(prefs->registry());
prefs->SetBoolean(prefs::kSafeBrowsingEnabled,
safe_browsing_opt_in == SAFE_BROWSING_OPT_IN);
diff --git a/chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector_unittest.cc b/chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector_unittest.cc
index 87a92dc..af6a2bf 100644
--- a/chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector_unittest.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector_unittest.cc
@@ -325,8 +325,8 @@ class OffDomainInclusionDetectorTest : public testing::TestWithParam<TestCase> {
NULL)));
// Create default prefs for the test profile.
- scoped_ptr<TestingPrefServiceSyncable> prefs(
- new TestingPrefServiceSyncable);
+ scoped_ptr<syncable_prefs::TestingPrefServiceSyncable> prefs(
+ new syncable_prefs::TestingPrefServiceSyncable);
chrome::RegisterUserProfilePrefs(prefs->registry());
// |testing_profile_| is owned by |profile_manager_|.
diff --git a/chrome/browser/safe_browsing/incident_reporting/platform_state_store_win_unittest.cc b/chrome/browser/safe_browsing/incident_reporting/platform_state_store_win_unittest.cc
index 0627189..5a35414 100644
--- a/chrome/browser/safe_browsing/incident_reporting/platform_state_store_win_unittest.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/platform_state_store_win_unittest.cc
@@ -59,9 +59,10 @@ class PlatformStateStoreWinTest : public ::testing::Test {
new_profile ? PersistentPrefStore::PREF_READ_ERROR_NO_FILE
: PersistentPrefStore::PREF_READ_ERROR_NONE);
// Ownership of |user_pref_store| is passed to the service.
- scoped_ptr<TestingPrefServiceSyncable> prefs(new TestingPrefServiceSyncable(
- new TestingPrefStore(), user_pref_store, new TestingPrefStore(),
- new user_prefs::PrefRegistrySyncable(), new PrefNotifierImpl()));
+ scoped_ptr<syncable_prefs::TestingPrefServiceSyncable> prefs(
+ new syncable_prefs::TestingPrefServiceSyncable(
+ new TestingPrefStore(), user_pref_store, new TestingPrefStore(),
+ new user_prefs::PrefRegistrySyncable(), new PrefNotifierImpl()));
chrome::RegisterUserProfilePrefs(prefs->registry());
profile_ = profile_manager_.CreateTestingProfile(
kProfileName_, prefs.Pass(), base::UTF8ToUTF16(kProfileName_), 0,
diff --git a/chrome/browser/safe_browsing/incident_reporting/state_store_unittest.cc b/chrome/browser/safe_browsing/incident_reporting/state_store_unittest.cc
index c714c27..25774ff 100644
--- a/chrome/browser/safe_browsing/incident_reporting/state_store_unittest.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/state_store_unittest.cc
@@ -102,7 +102,7 @@ class StateStoreTest : public PlatformStateStoreTestBase {
void CreateProfile() {
ASSERT_EQ(nullptr, profile_);
// Create the testing profile with a file-backed user pref store.
- PrefServiceSyncableFactory factory;
+ syncable_prefs::PrefServiceSyncableFactory factory;
factory.SetUserPrefsFile(GetPrefsPath(), task_runner_.get());
user_prefs::PrefRegistrySyncable* pref_registry =
new user_prefs::PrefRegistrySyncable();
diff --git a/chrome/browser/signin/account_reconcilor_unittest.cc b/chrome/browser/signin/account_reconcilor_unittest.cc
index 6c89dc0..db58148 100644
--- a/chrome/browser/signin/account_reconcilor_unittest.cc
+++ b/chrome/browser/signin/account_reconcilor_unittest.cc
@@ -184,7 +184,7 @@ void AccountReconcilorTest::SetUp() {
MockAccountReconcilor::Build));
profile_ = testing_profile_manager_.get()->CreateTestingProfile("name",
- scoped_ptr<PrefServiceSyncable>(),
+ scoped_ptr<syncable_prefs::PrefServiceSyncable>(),
base::UTF8ToUTF16("name"), 0, std::string(),
factories);
diff --git a/chrome/browser/signin/cross_device_promo_unittest.cc b/chrome/browser/signin/cross_device_promo_unittest.cc
index aa7b51b..636cd78 100644
--- a/chrome/browser/signin/cross_device_promo_unittest.cc
+++ b/chrome/browser/signin/cross_device_promo_unittest.cc
@@ -90,7 +90,7 @@ class CrossDevicePromoTest : public ::testing::Test {
TestingProfile* profile() { return profile_; }
FakeSigninManagerForTesting* signin_manager() { return signin_manager_; }
base::HistogramTester* histogram_tester() { return &histogram_tester_; }
- TestingPrefServiceSyncable* prefs() { return pref_service_; }
+ syncable_prefs::TestingPrefServiceSyncable* prefs() { return pref_service_; }
FakeGaiaCookieManagerService* cookie_manager_service() {
return cookie_manager_service_;
}
@@ -104,7 +104,7 @@ class CrossDevicePromoTest : public ::testing::Test {
TestingProfile* profile_;
FakeSigninManagerForTesting* signin_manager_;
FakeGaiaCookieManagerService* cookie_manager_service_;
- TestingPrefServiceSyncable* pref_service_;
+ syncable_prefs::TestingPrefServiceSyncable* pref_service_;
scoped_ptr<TestingProfileManager> testing_profile_manager_;
base::HistogramTester histogram_tester_;
scoped_ptr<base::FieldTrialList> field_trial_list_;
@@ -131,11 +131,12 @@ void CrossDevicePromoTest::SetUp() {
factories.push_back(std::make_pair(SigninManagerFactory::GetInstance(),
BuildFakeSigninManagerBase));
- pref_service_ = new TestingPrefServiceSyncable();
+ pref_service_ = new syncable_prefs::TestingPrefServiceSyncable();
chrome::RegisterUserProfilePrefs(pref_service_->registry());
profile_ = testing_profile_manager_.get()->CreateTestingProfile(
- "name", make_scoped_ptr<PrefServiceSyncable>(pref_service_),
+ "name",
+ make_scoped_ptr<syncable_prefs::PrefServiceSyncable>(pref_service_),
base::UTF8ToUTF16("name"), 0, std::string(), factories);
cookie_manager_service_ = static_cast<FakeGaiaCookieManagerService*>(
diff --git a/chrome/browser/signin/signin_global_error_unittest.cc b/chrome/browser/signin/signin_global_error_unittest.cc
index dfd1cf0..2255b16 100644
--- a/chrome/browser/signin/signin_global_error_unittest.cc
+++ b/chrome/browser/signin/signin_global_error_unittest.cc
@@ -50,7 +50,7 @@ class SigninGlobalErrorTest : public testing::Test {
testing_factories.push_back(std::make_pair(
SigninManagerFactory::GetInstance(), BuildFakeSigninManagerBase));
profile_ = profile_manager_.CreateTestingProfile(
- "Person 1", scoped_ptr<PrefServiceSyncable>(),
+ "Person 1", scoped_ptr<syncable_prefs::PrefServiceSyncable>(),
base::UTF8ToUTF16("Person 1"), 0, std::string(), testing_factories);
SigninManagerFactory::GetForProfile(profile())
diff --git a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
index 34235af..74075bf 100644
--- a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
@@ -440,7 +440,7 @@ class ProfileSyncServiceAutofillTest
BuildAutoIssuingFakeProfileOAuth2TokenService));
profile_ = profile_manager_.CreateTestingProfile(
kTestProfileName,
- scoped_ptr<PrefServiceSyncable>(),
+ scoped_ptr<syncable_prefs::PrefServiceSyncable>(),
base::UTF8ToUTF16(kTestProfileName),
0,
std::string(),
diff --git a/chrome/browser/sync/profile_sync_service_startup_unittest.cc b/chrome/browser/sync/profile_sync_service_startup_unittest.cc
index b4defd9..8e6e216 100644
--- a/chrome/browser/sync/profile_sync_service_startup_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_startup_unittest.cc
@@ -114,7 +114,7 @@ class ProfileSyncServiceStartupTest : public testing::Test {
BuildService));
profile_ = profile_manager_.CreateTestingProfile(
- "sync-startup-test", scoped_ptr<PrefServiceSyncable>(),
+ "sync-startup-test", scoped_ptr<syncable_prefs::PrefServiceSyncable>(),
base::UTF8ToUTF16("sync-startup-test"), 0, std::string(),
testing_facotries);
}
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 76f6faf..a11f16e 100644
--- a/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
@@ -233,7 +233,7 @@ class ProfileSyncServiceTypedUrlTest : public AbstractProfileSyncServiceTest {
BuildAutoIssuingFakeProfileOAuth2TokenService));
profile_ = profile_manager_.CreateTestingProfile(
kTestProfileName,
- scoped_ptr<PrefServiceSyncable>(),
+ scoped_ptr<syncable_prefs::PrefServiceSyncable>(),
base::UTF8ToUTF16(kTestProfileName),
0,
std::string(),
diff --git a/chrome/browser/sync/profile_sync_service_unittest.cc b/chrome/browser/sync/profile_sync_service_unittest.cc
index f9532c4..ecebca9 100644
--- a/chrome/browser/sync/profile_sync_service_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_unittest.cc
@@ -247,7 +247,7 @@ class ProfileSyncServiceTest : public ::testing::Test {
BuildFakeProfileInvalidationProvider));
profile_ = profile_manager_.CreateTestingProfile(
- "sync-service-test", scoped_ptr<PrefServiceSyncable>(),
+ "sync-service-test", scoped_ptr<syncable_prefs::PrefServiceSyncable>(),
base::UTF8ToUTF16("sync-service-test"), 0, std::string(),
testing_factories);
}
diff --git a/chrome/browser/ui/app_list/search/suggestions/suggestions_search_provider_unittest.cc b/chrome/browser/ui/app_list/search/suggestions/suggestions_search_provider_unittest.cc
index d24bfa3..dede321 100644
--- a/chrome/browser/ui/app_list/search/suggestions/suggestions_search_provider_unittest.cc
+++ b/chrome/browser/ui/app_list/search/suggestions/suggestions_search_provider_unittest.cc
@@ -59,7 +59,7 @@ class SuggestionsSearchProviderTest : public AppListTestBase {
suggestions_search_.reset(
new SuggestionsSearchProvider(profile_.get(), NULL));
- TestingPrefServiceSyncable* pref_service =
+ syncable_prefs::TestingPrefServiceSyncable* pref_service =
profile_->GetTestingPrefService();
suggestions_store_.reset(new SuggestionsStore(pref_service));
}
diff --git a/chrome/browser/ui/app_list/speech_auth_helper_unittest.cc b/chrome/browser/ui/app_list/speech_auth_helper_unittest.cc
index 0b06c18..18c1ed6 100644
--- a/chrome/browser/ui/app_list/speech_auth_helper_unittest.cc
+++ b/chrome/browser/ui/app_list/speech_auth_helper_unittest.cc
@@ -47,7 +47,7 @@ class SpeechAuthHelperTest : public testing::Test {
ASSERT_TRUE(testing_profile_manager_->SetUp());
profile_ = testing_profile_manager_->CreateTestingProfile(
kTestUser,
- scoped_ptr<PrefServiceSyncable>(),
+ scoped_ptr<syncable_prefs::PrefServiceSyncable>(),
base::UTF8ToUTF16(kTestUser),
0,
std::string(),
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
index 806e26f..69567f1 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
@@ -248,9 +248,10 @@ ash::ShelfAlignment GetShelfAlignmentFromPrefs(Profile* profile,
// If prefs have synced and no user-set value exists at |local_path|, the value
// from |synced_path| is copied to |local_path|.
-void MaybePropagatePrefToLocal(PrefServiceSyncable* pref_service,
- const char* local_path,
- const char* synced_path) {
+void MaybePropagatePrefToLocal(
+ syncable_prefs::PrefServiceSyncable* pref_service,
+ const char* local_path,
+ const char* synced_path) {
if (!pref_service->FindPreference(local_path)->HasUserSetting() &&
pref_service->IsSyncing()) {
// First time the user is using this machine, propagate from remote to
@@ -479,7 +480,8 @@ void ChromeLauncherController::Init() {
#if defined(OS_CHROMEOS)
SetVirtualKeyboardBehaviorFromPrefs();
#endif // defined(OS_CHROMEOS)
- PrefServiceSyncable* prefs = PrefServiceSyncableFromProfile(profile_);
+ syncable_prefs::PrefServiceSyncable* prefs =
+ PrefServiceSyncableFromProfile(profile_);
if (!prefs->FindPreference(prefs::kShelfAlignmentLocal)->HasUserSetting() ||
!prefs->FindPreference(prefs::kShelfAutoHideBehaviorLocal)->
HasUserSetting()) {
@@ -1239,7 +1241,8 @@ void ChromeLauncherController::OnDisplayConfigurationChanged() {
}
void ChromeLauncherController::OnIsSyncingChanged() {
- PrefServiceSyncable* prefs = PrefServiceSyncableFromProfile(profile_);
+ syncable_prefs::PrefServiceSyncable* prefs =
+ PrefServiceSyncableFromProfile(profile_);
MaybePropagatePrefToLocal(prefs,
prefs::kShelfAlignmentLocal,
prefs::kShelfAlignment);
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.h b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.h
index 0c48e45..7cdf3a3 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.h
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.h
@@ -83,17 +83,18 @@ typedef ScopedVector<ChromeLauncherAppMenuItem> ChromeLauncherAppMenuItems;
// * App windows have AppWindowLauncherItemController, owned by
// AppWindowLauncherController.
// * Shortcuts have no LauncherItemController.
-class ChromeLauncherController : public ash::ShelfDelegate,
- public ash::ShelfModelObserver,
- public ash::ShellObserver,
- public ash::WindowTreeHostManager::Observer,
- public extensions::ExtensionRegistryObserver,
- public extensions::AppIconLoader::Delegate,
- public PrefServiceSyncableObserver,
- public AppSyncUIStateObserver,
- public ExtensionEnableFlowDelegate,
- public ash::ShelfLayoutManagerObserver,
- public ash::ShelfItemDelegateManagerObserver {
+class ChromeLauncherController
+ : public ash::ShelfDelegate,
+ public ash::ShelfModelObserver,
+ public ash::ShellObserver,
+ public ash::WindowTreeHostManager::Observer,
+ public extensions::ExtensionRegistryObserver,
+ public extensions::AppIconLoader::Delegate,
+ public syncable_prefs::PrefServiceSyncableObserver,
+ public AppSyncUIStateObserver,
+ public ExtensionEnableFlowDelegate,
+ public ash::ShelfLayoutManagerObserver,
+ public ash::ShelfItemDelegateManagerObserver {
public:
// Indicates if a shelf item is incognito or not.
enum IncognitoState {
@@ -318,7 +319,7 @@ class ChromeLauncherController : public ash::ShelfDelegate,
const extensions::Extension* extension,
extensions::UnloadedExtensionInfo::Reason reason) override;
- // PrefServiceSyncableObserver:
+ // syncable_prefs::PrefServiceSyncableObserver:
void OnIsSyncingChanged() override;
// AppSyncUIStateObserver:
diff --git a/chrome/browser/ui/bookmarks/bookmark_context_menu_controller_unittest.cc b/chrome/browser/ui/bookmarks/bookmark_context_menu_controller_unittest.cc
index 1b5a723..6475732 100644
--- a/chrome/browser/ui/bookmarks/bookmark_context_menu_controller_unittest.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_context_menu_controller_unittest.cc
@@ -344,7 +344,8 @@ TEST_F(BookmarkContextMenuControllerTest,
std::vector<const BookmarkNode*>());
// By default, the pref is not managed and the command is enabled.
- TestingPrefServiceSyncable* prefs = profile_->GetTestingPrefService();
+ syncable_prefs::TestingPrefServiceSyncable* prefs =
+ profile_->GetTestingPrefService();
EXPECT_FALSE(prefs->IsManagedPreference(
bookmarks::prefs::kShowAppsShortcutInBookmarkBar));
EXPECT_TRUE(
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm
index 3d97538..7f42e9b 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm
@@ -1656,7 +1656,8 @@ TEST_F(BookmarkBarControllerTest, BookmarksWithoutAppsPageShortcut) {
TEST_F(BookmarkBarControllerTest, ManagedShowAppsShortcutInBookmarksBar) {
// By default the pref is not managed and the apps shortcut is shown.
- TestingPrefServiceSyncable* prefs = profile()->GetTestingPrefService();
+ syncable_prefs::TestingPrefServiceSyncable* prefs =
+ profile()->GetTestingPrefService();
EXPECT_FALSE(prefs->IsManagedPreference(
bookmarks::prefs::kShowAppsShortcutInBookmarkBar));
EXPECT_FALSE([bar_ appsPageShortcutButtonIsHidden]);
diff --git a/chrome/browser/ui/cocoa/cocoa_profile_test.mm b/chrome/browser/ui/cocoa/cocoa_profile_test.mm
index de1f9cc..28853eb 100644
--- a/chrome/browser/ui/cocoa/cocoa_profile_test.mm
+++ b/chrome/browser/ui/cocoa/cocoa_profile_test.mm
@@ -57,7 +57,7 @@ void CocoaProfileTest::SetUp() {
ASSERT_TRUE(profile_manager_.SetUp());
profile_ = profile_manager_.CreateTestingProfile(
- "Person 1", scoped_ptr<PrefServiceSyncable>(),
+ "Person 1", scoped_ptr<syncable_prefs::PrefServiceSyncable>(),
base::UTF8ToUTF16("Person 1"), 0, std::string(),
testing_factories_);
ASSERT_TRUE(profile_);
diff --git a/chrome/browser/ui/cocoa/profiles/avatar_icon_controller_unittest.mm b/chrome/browser/ui/cocoa/profiles/avatar_icon_controller_unittest.mm
index ad410bc..8c70080 100644
--- a/chrome/browser/ui/cocoa/profiles/avatar_icon_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/profiles/avatar_icon_controller_unittest.mm
@@ -102,8 +102,8 @@ TEST_F(AvatarIconControllerTest, SupervisedUserLabel) {
// Create a second, supervised profile to enable the avatar menu.
std::string name = "p2";
TestingProfile* profile = testing_profile_manager()->CreateTestingProfile(
- name, scoped_ptr<PrefServiceSyncable>(), base::ASCIIToUTF16(name), 0,
- "asdf", TestingProfile::TestingFactories());
+ name, scoped_ptr<syncable_prefs::PrefServiceSyncable>(),
+ base::ASCIIToUTF16(name), 0, "asdf", TestingProfile::TestingFactories());
EXPECT_TRUE(profile->IsSupervised());
// http://crbug.com/39725
diff --git a/chrome/browser/ui/cocoa/profiles/avatar_menu_bubble_controller_unittest.mm b/chrome/browser/ui/cocoa/profiles/avatar_menu_bubble_controller_unittest.mm
index 79fbcf3..1ededed 100644
--- a/chrome/browser/ui/cocoa/profiles/avatar_menu_bubble_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/profiles/avatar_menu_bubble_controller_unittest.mm
@@ -35,14 +35,14 @@ class AvatarMenuBubbleControllerTest : public CocoaTest {
CocoaTest::SetUp();
ASSERT_TRUE(manager_.SetUp());
- manager_.CreateTestingProfile("test1", scoped_ptr<PrefServiceSyncable>(),
- base::ASCIIToUTF16("Test 1"), 1,
- std::string(),
- TestingProfile::TestingFactories());
- manager_.CreateTestingProfile("test2", scoped_ptr<PrefServiceSyncable>(),
- base::ASCIIToUTF16("Test 2"), 0,
- std::string(),
- TestingProfile::TestingFactories());
+ manager_.CreateTestingProfile(
+ "test1", scoped_ptr<syncable_prefs::PrefServiceSyncable>(),
+ base::ASCIIToUTF16("Test 1"), 1, std::string(),
+ TestingProfile::TestingFactories());
+ manager_.CreateTestingProfile(
+ "test2", scoped_ptr<syncable_prefs::PrefServiceSyncable>(),
+ base::ASCIIToUTF16("Test 2"), 0, std::string(),
+ TestingProfile::TestingFactories());
menu_ = new AvatarMenu(manager_.profile_info_cache(), NULL, NULL);
menu_->RebuildMenu();
@@ -132,10 +132,10 @@ TEST_F(AvatarMenuBubbleControllerTest, PerformLayout) {
base::scoped_nsobject<NSMutableArray> oldItems([[controller() items] copy]);
// Now create a new profile and notify the delegate.
- manager()->CreateTestingProfile("test3", scoped_ptr<PrefServiceSyncable>(),
- base::ASCIIToUTF16("Test 3"), 0,
- std::string(),
- TestingProfile::TestingFactories());
+ manager()->CreateTestingProfile(
+ "test3", scoped_ptr<syncable_prefs::PrefServiceSyncable>(),
+ base::ASCIIToUTF16("Test 3"), 0, std::string(),
+ TestingProfile::TestingFactories());
// Testing the bridge is not worth the effort...
[controller() performLayout];
diff --git a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller_unittest.mm b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller_unittest.mm
index 3a9969ee..5d13036 100644
--- a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller_unittest.mm
@@ -59,14 +59,13 @@ class ProfileChooserControllerTest : public CocoaProfileTest {
gcm::GCMProfileServiceFactory::GetInstance()->SetTestingFactory(
browser()->profile(), gcm::FakeGCMProfileService::Build);
- testing_profile_manager()->
- CreateTestingProfile("test1", scoped_ptr<PrefServiceSyncable>(),
- base::ASCIIToUTF16("Test 1"), 0, std::string(),
- testing_factories());
- testing_profile_manager()->
- CreateTestingProfile("test2", scoped_ptr<PrefServiceSyncable>(),
- base::ASCIIToUTF16("Test 2"), 1, std::string(),
- TestingProfile::TestingFactories());
+ testing_profile_manager()->CreateTestingProfile(
+ "test1", scoped_ptr<syncable_prefs::PrefServiceSyncable>(),
+ base::ASCIIToUTF16("Test 1"), 0, std::string(), testing_factories());
+ testing_profile_manager()->CreateTestingProfile(
+ "test2", scoped_ptr<syncable_prefs::PrefServiceSyncable>(),
+ base::ASCIIToUTF16("Test 2"), 1, std::string(),
+ TestingProfile::TestingFactories());
menu_ = new AvatarMenu(testing_profile_manager()->profile_info_cache(),
NULL, NULL);
@@ -286,14 +285,14 @@ TEST_F(ProfileChooserControllerTest, OtherProfilesSortedAlphabetically) {
// Add two extra profiles, to make sure sorting is alphabetical and not
// by order of creation.
- testing_profile_manager()->
- CreateTestingProfile("test3", scoped_ptr<PrefServiceSyncable>(),
- base::ASCIIToUTF16("New Profile"), 1, std::string(),
- TestingProfile::TestingFactories());
- testing_profile_manager()->
- CreateTestingProfile("test4", scoped_ptr<PrefServiceSyncable>(),
- base::ASCIIToUTF16("Another Test"), 1, std::string(),
- TestingProfile::TestingFactories());
+ testing_profile_manager()->CreateTestingProfile(
+ "test3", scoped_ptr<syncable_prefs::PrefServiceSyncable>(),
+ base::ASCIIToUTF16("New Profile"), 1, std::string(),
+ TestingProfile::TestingFactories());
+ testing_profile_manager()->CreateTestingProfile(
+ "test4", scoped_ptr<syncable_prefs::PrefServiceSyncable>(),
+ base::ASCIIToUTF16("Another Test"), 1, std::string(),
+ TestingProfile::TestingFactories());
StartFastUserSwitcher();
NSArray* subviews = [[[controller() window] contentView] subviews];
diff --git a/chrome/browser/ui/cocoa/profiles/profile_menu_controller_unittest.mm b/chrome/browser/ui/cocoa/profiles/profile_menu_controller_unittest.mm
index 98f0dc7..71ef63e 100644
--- a/chrome/browser/ui/cocoa/profiles/profile_menu_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/profiles/profile_menu_controller_unittest.mm
@@ -246,13 +246,10 @@ TEST_F(ProfileMenuControllerTest, DeleteActiveProfile) {
TEST_F(ProfileMenuControllerTest, SupervisedProfile) {
TestingProfileManager* manager = testing_profile_manager();
- TestingProfile* supervised_profile =
- manager->CreateTestingProfile("test1",
- scoped_ptr<PrefServiceSyncable>(),
- base::ASCIIToUTF16("Supervised User"),
- 0,
- "TEST_ID",
- TestingProfile::TestingFactories());
+ TestingProfile* supervised_profile = manager->CreateTestingProfile(
+ "test1", scoped_ptr<syncable_prefs::PrefServiceSyncable>(),
+ base::ASCIIToUTF16("Supervised User"), 0, "TEST_ID",
+ TestingProfile::TestingFactories());
// The supervised profile is initially marked as omitted from the avatar menu
// (in non-test code, until we have confirmation that it has actually been
// created on the server). For the test, just tell the cache to un-hide it.
diff --git a/chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc b/chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc
index 71dc298..52516c3 100644
--- a/chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc
+++ b/chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc
@@ -130,14 +130,13 @@ class ProfileSigninConfirmationHelperTest : public testing::Test {
// Create the profile.
TestingProfile::Builder builder;
user_prefs_ = new TestingPrefStoreWithCustomReadError;
- TestingPrefServiceSyncable* pref_service = new TestingPrefServiceSyncable(
- new TestingPrefStore(),
- user_prefs_,
- new TestingPrefStore(),
- new user_prefs::PrefRegistrySyncable(),
- new PrefNotifierImpl());
+ syncable_prefs::TestingPrefServiceSyncable* pref_service =
+ new syncable_prefs::TestingPrefServiceSyncable(
+ new TestingPrefStore(), user_prefs_, new TestingPrefStore(),
+ new user_prefs::PrefRegistrySyncable(), new PrefNotifierImpl());
chrome::RegisterUserProfilePrefs(pref_service->registry());
- builder.SetPrefService(make_scoped_ptr<PrefServiceSyncable>(pref_service));
+ builder.SetPrefService(
+ make_scoped_ptr<syncable_prefs::PrefServiceSyncable>(pref_service));
profile_ = builder.Build();
// Initialize the services we check.
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc
index 4f2647c..d0fe7da 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc
@@ -333,7 +333,8 @@ TEST_F(BookmarkBarViewTest, ChangeTitle) {
TEST_F(BookmarkBarViewTest, ManagedShowAppsShortcutInBookmarksBar) {
CreateBookmarkModelAndBookmarkBarView();
// By default, the pref is not managed and the apps shortcut is shown.
- TestingPrefServiceSyncable* prefs = profile()->GetTestingPrefService();
+ syncable_prefs::TestingPrefServiceSyncable* prefs =
+ profile()->GetTestingPrefService();
EXPECT_FALSE(prefs->IsManagedPreference(
bookmarks::prefs::kShowAppsShortcutInBookmarkBar));
EXPECT_TRUE(test_helper_->apps_page_shortcut()->visible());
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc
index ac2177f..7b31c30 100644
--- a/chrome/test/base/testing_profile.cc
+++ b/chrome/test/base/testing_profile.cc
@@ -309,7 +309,7 @@ TestingProfile::TestingProfile(
#if defined(ENABLE_EXTENSIONS)
scoped_refptr<ExtensionSpecialStoragePolicy> extension_policy,
#endif
- scoped_ptr<PrefServiceSyncable> prefs,
+ scoped_ptr<syncable_prefs::PrefServiceSyncable> prefs,
TestingProfile* parent,
bool guest_session,
const std::string& supervised_user_id,
@@ -633,7 +633,8 @@ scoped_refptr<base::SequencedTaskRunner> TestingProfile::GetIOTaskRunner() {
return base::MessageLoop::current()->task_runner();
}
-TestingPrefServiceSyncable* TestingProfile::GetTestingPrefService() {
+syncable_prefs::TestingPrefServiceSyncable*
+TestingProfile::GetTestingPrefService() {
DCHECK(prefs_);
DCHECK(testing_prefs_);
return testing_prefs_;
@@ -734,7 +735,7 @@ net::CookieMonster* TestingProfile::GetCookieMonster() {
void TestingProfile::CreateTestingPrefService() {
DCHECK(!prefs_.get());
- testing_prefs_ = new TestingPrefServiceSyncable();
+ testing_prefs_ = new syncable_prefs::TestingPrefServiceSyncable();
prefs_.reset(testing_prefs_);
user_prefs::UserPrefs::Set(this, prefs_.get());
chrome::RegisterUserProfilePrefs(testing_prefs_->registry());
@@ -989,7 +990,7 @@ void TestingProfile::Builder::SetExtensionSpecialStoragePolicy(
#endif
void TestingProfile::Builder::SetPrefService(
- scoped_ptr<PrefServiceSyncable> prefs) {
+ scoped_ptr<syncable_prefs::PrefServiceSyncable> prefs) {
pref_service_ = prefs.Pass();
}
diff --git a/chrome/test/base/testing_profile.h b/chrome/test/base/testing_profile.h
index c941cd8..6663fa5 100644
--- a/chrome/test/base/testing_profile.h
+++ b/chrome/test/base/testing_profile.h
@@ -16,6 +16,10 @@
#include "components/domain_reliability/clear_mode.h"
#include "components/keyed_service/content/browser_context_keyed_service_factory.h"
+class BrowserContextDependencyManager;
+class ExtensionSpecialStoragePolicy;
+class HostContentSettingsMap;
+
namespace content {
class MockResourceContext;
class SSLHostStateDelegate;
@@ -37,11 +41,10 @@ namespace storage {
class SpecialStoragePolicy;
}
-class BrowserContextDependencyManager;
-class ExtensionSpecialStoragePolicy;
-class HostContentSettingsMap;
+namespace syncable_prefs {
class PrefServiceSyncable;
class TestingPrefServiceSyncable;
+}
class TestingProfile : public Profile {
public:
@@ -94,7 +97,7 @@ class TestingProfile : public Profile {
void SetPath(const base::FilePath& path);
// Sets the PrefService to be used by this profile.
- void SetPrefService(scoped_ptr<PrefServiceSyncable> prefs);
+ void SetPrefService(scoped_ptr<syncable_prefs::PrefServiceSyncable> prefs);
// Makes the Profile being built a guest profile.
void SetGuestSession();
@@ -119,7 +122,7 @@ class TestingProfile : public Profile {
bool build_called_;
// Various staging variables where values are held until Build() is invoked.
- scoped_ptr<PrefServiceSyncable> pref_service_;
+ scoped_ptr<syncable_prefs::PrefServiceSyncable> pref_service_;
#if defined(ENABLE_EXTENSIONS)
scoped_refptr<ExtensionSpecialStoragePolicy> extension_policy_;
#endif
@@ -153,7 +156,7 @@ class TestingProfile : public Profile {
#if defined(ENABLE_EXTENSIONS)
scoped_refptr<ExtensionSpecialStoragePolicy> extension_policy,
#endif
- scoped_ptr<PrefServiceSyncable> prefs,
+ scoped_ptr<syncable_prefs::PrefServiceSyncable> prefs,
TestingProfile* parent,
bool guest_session,
const std::string& supervised_user_id,
@@ -196,7 +199,7 @@ class TestingProfile : public Profile {
// Allow setting a profile as Guest after-the-fact to simplify some tests.
void SetGuestSession(bool guest);
- TestingPrefServiceSyncable* GetTestingPrefService();
+ syncable_prefs::TestingPrefServiceSyncable* GetTestingPrefService();
// Called on the parent of an incognito |profile|. Usually called from the
// constructor of an incognito TestingProfile, but can also be used by tests
@@ -321,9 +324,9 @@ class TestingProfile : public Profile {
protected:
base::Time start_time_;
- scoped_ptr<PrefServiceSyncable> prefs_;
+ scoped_ptr<syncable_prefs::PrefServiceSyncable> prefs_;
// ref only for right type, lifecycle is managed by prefs_
- TestingPrefServiceSyncable* testing_prefs_;
+ syncable_prefs::TestingPrefServiceSyncable* testing_prefs_;
private:
// Creates a temporary directory for use by this profile.
diff --git a/chrome/test/base/testing_profile_manager.cc b/chrome/test/base/testing_profile_manager.cc
index 6964623..c55037b 100644
--- a/chrome/test/base/testing_profile_manager.cc
+++ b/chrome/test/base/testing_profile_manager.cc
@@ -55,7 +55,7 @@ bool TestingProfileManager::SetUp() {
TestingProfile* TestingProfileManager::CreateTestingProfile(
const std::string& profile_name,
- scoped_ptr<PrefServiceSyncable> prefs,
+ scoped_ptr<syncable_prefs::PrefServiceSyncable> prefs,
const base::string16& user_name,
int avatar_id,
const std::string& supervised_user_id,
@@ -109,7 +109,8 @@ TestingProfile* TestingProfileManager::CreateTestingProfile(
TestingProfile* TestingProfileManager::CreateTestingProfile(
const std::string& name) {
DCHECK(called_set_up_);
- return CreateTestingProfile(name, scoped_ptr<PrefServiceSyncable>(),
+ return CreateTestingProfile(name,
+ scoped_ptr<syncable_prefs::PrefServiceSyncable>(),
base::UTF8ToUTF16(name), 0, std::string(),
TestingProfile::TestingFactories());
}
diff --git a/chrome/test/base/testing_profile_manager.h b/chrome/test/base/testing_profile_manager.h
index e051379..421075d 100644
--- a/chrome/test/base/testing_profile_manager.h
+++ b/chrome/test/base/testing_profile_manager.h
@@ -16,12 +16,15 @@
#include "chrome/test/base/scoped_testing_local_state.h"
#include "chrome/test/base/testing_profile.h"
-class PrefServiceSyncable;
class ProfileInfoCache;
class ProfileManager;
class TestingBrowserProcess;
class TestingProfile;
+namespace syncable_prefs {
+class PrefServiceSyncable;
+}
+
// The TestingProfileManager is a TestingProfile factory for a multi-profile
// environment. It will bring up a full ProfileManager and attach it to the
// TestingBrowserProcess set up in your test.
@@ -51,7 +54,7 @@ class TestingProfileManager {
// |factories| contains BCKSs to use with the newly created profile.
TestingProfile* CreateTestingProfile(
const std::string& profile_name,
- scoped_ptr<PrefServiceSyncable> prefs,
+ scoped_ptr<syncable_prefs::PrefServiceSyncable> prefs,
const base::string16& user_name,
int avatar_id,
const std::string& supervised_user_id,
diff --git a/components/syncable_prefs/pref_model_associator.cc b/components/syncable_prefs/pref_model_associator.cc
index b4448f3..9379a80 100644
--- a/components/syncable_prefs/pref_model_associator.cc
+++ b/components/syncable_prefs/pref_model_associator.cc
@@ -23,6 +23,8 @@
using syncer::PREFERENCES;
using syncer::PRIORITY_PREFERENCES;
+namespace syncable_prefs {
+
namespace {
const sync_pb::PreferenceSpecifics& GetSpecifics(const syncer::SyncData& pref) {
@@ -622,3 +624,5 @@ void PrefModelAssociator::NotifySyncedPrefObservers(const std::string& path,
FOR_EACH_OBSERVER(SyncedPrefObserver, *observers,
OnSyncedPrefChanged(path, from_sync));
}
+
+} // namespace syncable_prefs
diff --git a/components/syncable_prefs/pref_model_associator.h b/components/syncable_prefs/pref_model_associator.h
index 09f63e6..de92ec8 100644
--- a/components/syncable_prefs/pref_model_associator.h
+++ b/components/syncable_prefs/pref_model_associator.h
@@ -19,17 +19,19 @@
#include "sync/api/sync_data.h"
#include "sync/api/syncable_service.h"
-class PrefModelAssociatorClient;
-class PrefRegistrySyncable;
-class PrefServiceSyncable;
+namespace base {
+class Value;
+}
namespace sync_pb {
class PreferenceSpecifics;
}
-namespace base {
-class Value;
-}
+namespace syncable_prefs {
+
+class PrefModelAssociatorClient;
+class PrefRegistrySyncable;
+class PrefServiceSyncable;
// Contains all preference sync related logic.
// TODO(sync): Merge this into PrefService once we separate the profile
@@ -197,4 +199,6 @@ class PrefModelAssociator
DISALLOW_COPY_AND_ASSIGN(PrefModelAssociator);
};
+} // namespace syncable_prefs
+
#endif // COMPONENTS_SYNCABLE_PREFS_PREF_MODEL_ASSOCIATOR_H_
diff --git a/components/syncable_prefs/pref_model_associator_client.h b/components/syncable_prefs/pref_model_associator_client.h
index 923d5d1..0c71ad6 100644
--- a/components/syncable_prefs/pref_model_associator_client.h
+++ b/components/syncable_prefs/pref_model_associator_client.h
@@ -9,6 +9,8 @@
#include "base/macros.h"
+namespace syncable_prefs {
+
// This class allows the embedder to configure the PrefModelAssociator to
// have a different behaviour when receiving preference synchronisations
// events from the server.
@@ -42,4 +44,6 @@ class PrefModelAssociatorClient {
DISALLOW_COPY_AND_ASSIGN(PrefModelAssociatorClient);
};
+} // namespace syncable_prefs
+
#endif // COMPONENTS_SYNCABLE_PREFS_PREF_MODEL_ASSOCIATOR_CLIENT_H_
diff --git a/components/syncable_prefs/pref_model_associator_unittest.cc b/components/syncable_prefs/pref_model_associator_unittest.cc
index 75e90ff..84523db 100644
--- a/components/syncable_prefs/pref_model_associator_unittest.cc
+++ b/components/syncable_prefs/pref_model_associator_unittest.cc
@@ -13,6 +13,8 @@
#include "components/syncable_prefs/pref_service_syncable.h"
#include "testing/gtest/include/gtest/gtest.h"
+namespace syncable_prefs {
+
namespace {
const char kStringPrefName[] = "pref.string";
@@ -470,3 +472,5 @@ TEST_F(IndividualPreferenceMergeTest, ListPreference) {
}
} // namespace
+
+} // namespace syncable_prefs
diff --git a/components/syncable_prefs/pref_service_mock_factory.cc b/components/syncable_prefs/pref_service_mock_factory.cc
index c176b50..8468d05 100644
--- a/components/syncable_prefs/pref_service_mock_factory.cc
+++ b/components/syncable_prefs/pref_service_mock_factory.cc
@@ -6,8 +6,12 @@
#include "base/prefs/testing_pref_store.h"
+namespace syncable_prefs {
+
PrefServiceMockFactory::PrefServiceMockFactory() {
user_prefs_ = new TestingPrefStore;
}
PrefServiceMockFactory::~PrefServiceMockFactory() {}
+
+} // namespace syncable_prefs
diff --git a/components/syncable_prefs/pref_service_mock_factory.h b/components/syncable_prefs/pref_service_mock_factory.h
index 0ea6e10..f5b5d32 100644
--- a/components/syncable_prefs/pref_service_mock_factory.h
+++ b/components/syncable_prefs/pref_service_mock_factory.h
@@ -7,6 +7,8 @@
#include "components/syncable_prefs/pref_service_syncable_factory.h"
+namespace syncable_prefs {
+
// A helper that allows convenient building of custom PrefServices in tests.
class PrefServiceMockFactory : public PrefServiceSyncableFactory {
public:
@@ -17,4 +19,6 @@ class PrefServiceMockFactory : public PrefServiceSyncableFactory {
DISALLOW_COPY_AND_ASSIGN(PrefServiceMockFactory);
};
+} // namespace syncable_prefs
+
#endif // COMPONENTS_SYNCABLE_PREFS_PREF_SERVICE_MOCK_FACTORY_H_
diff --git a/components/syncable_prefs/pref_service_syncable.cc b/components/syncable_prefs/pref_service_syncable.cc
index 46f7ec7..b538a1d 100644
--- a/components/syncable_prefs/pref_service_syncable.cc
+++ b/components/syncable_prefs/pref_service_syncable.cc
@@ -18,6 +18,8 @@
#include "components/syncable_prefs/pref_model_associator.h"
#include "components/syncable_prefs/pref_service_syncable_observer.h"
+namespace syncable_prefs {
+
PrefServiceSyncable::PrefServiceSyncable(
PrefNotifierImpl* pref_notifier,
PrefValueStore* pref_value_store,
@@ -180,3 +182,5 @@ void PrefServiceSyncable::ProcessPrefChange(const std::string& name) {
pref_sync_associator_.ProcessPrefChange(name);
priority_pref_sync_associator_.ProcessPrefChange(name);
}
+
+} // namespace syncable_prefs
diff --git a/components/syncable_prefs/pref_service_syncable.h b/components/syncable_prefs/pref_service_syncable.h
index b3cfe84..81224ac 100644
--- a/components/syncable_prefs/pref_service_syncable.h
+++ b/components/syncable_prefs/pref_service_syncable.h
@@ -13,13 +13,15 @@
#include "components/syncable_prefs/pref_model_associator.h"
#include "components/syncable_prefs/synced_pref_observer.h"
-class PrefModelAssociatorClient;
-class PrefServiceSyncableObserver;
-
namespace syncer {
class SyncableService;
}
+namespace syncable_prefs {
+
+class PrefModelAssociatorClient;
+class PrefServiceSyncableObserver;
+
// A PrefService that can be synced. Users are forced to declare
// whether preferences are syncable or not when registering them to
// this PrefService.
@@ -109,4 +111,6 @@ class PrefServiceSyncable : public PrefService {
DISALLOW_COPY_AND_ASSIGN(PrefServiceSyncable);
};
+} // namespace syncable_prefs
+
#endif // COMPONENTS_SYNCABLE_PREFS_PREF_SERVICE_SYNCABLE_H_
diff --git a/components/syncable_prefs/pref_service_syncable_factory.cc b/components/syncable_prefs/pref_service_syncable_factory.cc
index 4e3ae2d..6ec2880 100644
--- a/components/syncable_prefs/pref_service_syncable_factory.cc
+++ b/components/syncable_prefs/pref_service_syncable_factory.cc
@@ -18,6 +18,8 @@
#include "components/policy/core/common/policy_types.h"
#endif
+namespace syncable_prefs {
+
PrefServiceSyncableFactory::PrefServiceSyncableFactory() {
}
@@ -67,3 +69,5 @@ scoped_ptr<PrefServiceSyncable> PrefServiceSyncableFactory::CreateSyncable(
async_));
return pref_service.Pass();
}
+
+} // namespace syncable_prefs
diff --git a/components/syncable_prefs/pref_service_syncable_factory.h b/components/syncable_prefs/pref_service_syncable_factory.h
index 9896831..5b28e3c 100644
--- a/components/syncable_prefs/pref_service_syncable_factory.h
+++ b/components/syncable_prefs/pref_service_syncable_factory.h
@@ -7,9 +7,6 @@
#include "base/prefs/pref_service_factory.h"
-class PrefModelAssociatorClient;
-class PrefServiceSyncable;
-
namespace base {
class CommandLine;
}
@@ -23,6 +20,11 @@ namespace user_prefs {
class PrefRegistrySyncable;
}
+namespace syncable_prefs {
+
+class PrefModelAssociatorClient;
+class PrefServiceSyncable;
+
// A PrefServiceFactory that also knows how to build a
// PrefServiceSyncable, and may know about Chrome concepts such as
// PolicyService.
@@ -51,4 +53,6 @@ class PrefServiceSyncableFactory : public base::PrefServiceFactory {
DISALLOW_COPY_AND_ASSIGN(PrefServiceSyncableFactory);
};
+} // namespace syncable_prefs
+
#endif // COMPONENTS_SYNCABLE_PREFS_PREF_SERVICE_SYNCABLE_FACTORY_H_
diff --git a/components/syncable_prefs/pref_service_syncable_observer.h b/components/syncable_prefs/pref_service_syncable_observer.h
index ba32463..92ba143 100644
--- a/components/syncable_prefs/pref_service_syncable_observer.h
+++ b/components/syncable_prefs/pref_service_syncable_observer.h
@@ -5,6 +5,8 @@
#ifndef COMPONENTS_SYNCABLE_PREFS_PREF_SERVICE_SYNCABLE_OBSERVER_H_
#define COMPONENTS_SYNCABLE_PREFS_PREF_SERVICE_SYNCABLE_OBSERVER_H_
+namespace syncable_prefs {
+
class PrefServiceSyncableObserver {
public:
// Invoked when PrefService::IsSyncing() changes.
@@ -14,4 +16,6 @@ class PrefServiceSyncableObserver {
virtual ~PrefServiceSyncableObserver() {}
};
+} // namespace syncable_prefs
+
#endif // COMPONENTS_SYNCABLE_PREFS_PREF_SERVICE_SYNCABLE_OBSERVER_H_
diff --git a/components/syncable_prefs/pref_service_syncable_unittest.cc b/components/syncable_prefs/pref_service_syncable_unittest.cc
index 013e611..948d8c5 100644
--- a/components/syncable_prefs/pref_service_syncable_unittest.cc
+++ b/components/syncable_prefs/pref_service_syncable_unittest.cc
@@ -27,6 +27,8 @@
using syncer::SyncChange;
using syncer::SyncData;
+namespace syncable_prefs {
+
namespace {
const char kExampleUrl0[] = "http://example.com/0";
@@ -739,3 +741,5 @@ TEST_F(PrefServiceSyncableTest, DeletePreference) {
}
} // namespace
+
+} // namespace syncable_prefs
diff --git a/components/syncable_prefs/synced_pref_change_registrar.cc b/components/syncable_prefs/synced_pref_change_registrar.cc
index 96602ba..57999e6 100644
--- a/components/syncable_prefs/synced_pref_change_registrar.cc
+++ b/components/syncable_prefs/synced_pref_change_registrar.cc
@@ -6,6 +6,8 @@
#include "base/bind.h"
+namespace syncable_prefs {
+
namespace {
void InvokeUnnamedCallback(
@@ -64,3 +66,5 @@ void SyncedPrefChangeRegistrar::OnSyncedPrefChanged(const std::string& path,
return;
iter->second.Run(path, from_sync);
}
+
+} // namespace syncable_prefs
diff --git a/components/syncable_prefs/synced_pref_change_registrar.h b/components/syncable_prefs/synced_pref_change_registrar.h
index 8e06cd1..7c4a541 100644
--- a/components/syncable_prefs/synced_pref_change_registrar.h
+++ b/components/syncable_prefs/synced_pref_change_registrar.h
@@ -12,6 +12,8 @@
#include "components/syncable_prefs/pref_service_syncable.h"
#include "components/syncable_prefs/synced_pref_observer.h"
+namespace syncable_prefs {
+
// Manages the registration of one or more SyncedPrefObservers on a
// PrefServiceSyncable. This is modeled after base::PrefChangeRegistrar, and
// it should be used whenever it's necessary to determine whether a pref change
@@ -53,4 +55,6 @@ class SyncedPrefChangeRegistrar : public SyncedPrefObserver {
DISALLOW_COPY_AND_ASSIGN(SyncedPrefChangeRegistrar);
};
+} // namespace syncable_prefs
+
#endif // COMPONENTS_SYNCABLE_PREFS_SYNCED_PREF_CHANGE_REGISTRAR_H_
diff --git a/components/syncable_prefs/synced_pref_observer.h b/components/syncable_prefs/synced_pref_observer.h
index 4377eb4..b8f387d 100644
--- a/components/syncable_prefs/synced_pref_observer.h
+++ b/components/syncable_prefs/synced_pref_observer.h
@@ -7,9 +7,13 @@
#include <string>
+namespace syncable_prefs {
+
class SyncedPrefObserver {
public:
virtual void OnSyncedPrefChanged(const std::string& path, bool from_sync) = 0;
};
+} // namespace syncable_prefs
+
#endif // COMPONENTS_SYNCABLE_PREFS_SYNCED_PREF_OBSERVER_H_
diff --git a/components/syncable_prefs/testing_pref_service_syncable.cc b/components/syncable_prefs/testing_pref_service_syncable.cc
index 81e71fb..7c61f51 100644
--- a/components/syncable_prefs/testing_pref_service_syncable.cc
+++ b/components/syncable_prefs/testing_pref_service_syncable.cc
@@ -11,13 +11,14 @@
#include "testing/gtest/include/gtest/gtest.h"
template <>
-TestingPrefServiceBase<PrefServiceSyncable, user_prefs::PrefRegistrySyncable>::
+TestingPrefServiceBase<syncable_prefs::PrefServiceSyncable,
+ user_prefs::PrefRegistrySyncable>::
TestingPrefServiceBase(TestingPrefStore* managed_prefs,
TestingPrefStore* user_prefs,
TestingPrefStore* recommended_prefs,
user_prefs::PrefRegistrySyncable* pref_registry,
PrefNotifierImpl* pref_notifier)
- : PrefServiceSyncable(
+ : syncable_prefs::PrefServiceSyncable(
pref_notifier,
new PrefValueStore(managed_prefs,
nullptr, // supervised_user_prefs
@@ -31,13 +32,15 @@ TestingPrefServiceBase<PrefServiceSyncable, user_prefs::PrefRegistrySyncable>::
pref_registry,
nullptr, // pref_model_associator_client
base::Bind(&TestingPrefServiceBase<
- PrefServiceSyncable,
- user_prefs::PrefRegistrySyncable>::HandleReadError),
+ PrefServiceSyncable,
+ user_prefs::PrefRegistrySyncable>::HandleReadError),
false),
managed_prefs_(managed_prefs),
user_prefs_(user_prefs),
recommended_prefs_(recommended_prefs) {}
+namespace syncable_prefs {
+
TestingPrefServiceSyncable::TestingPrefServiceSyncable()
: TestingPrefServiceBase<PrefServiceSyncable,
user_prefs::PrefRegistrySyncable>(
@@ -70,3 +73,5 @@ user_prefs::PrefRegistrySyncable* TestingPrefServiceSyncable::registry() {
return static_cast<user_prefs::PrefRegistrySyncable*>(
DeprecatedGetPrefRegistry());
}
+
+} // namespace syncable_prefs
diff --git a/components/syncable_prefs/testing_pref_service_syncable.h b/components/syncable_prefs/testing_pref_service_syncable.h
index 440b417..8235c6e 100644
--- a/components/syncable_prefs/testing_pref_service_syncable.h
+++ b/components/syncable_prefs/testing_pref_service_syncable.h
@@ -9,12 +9,14 @@
#include "base/prefs/testing_pref_service.h"
#include "components/syncable_prefs/pref_service_syncable.h"
-class PrefModelAssociatorClient;
-
namespace user_prefs {
class PrefRegistrySyncable;
}
+namespace syncable_prefs {
+
+class PrefModelAssociatorClient;
+
// Test version of PrefServiceSyncable.
class TestingPrefServiceSyncable
: public TestingPrefServiceBase<PrefServiceSyncable,
@@ -39,8 +41,11 @@ class TestingPrefServiceSyncable
DISALLOW_COPY_AND_ASSIGN(TestingPrefServiceSyncable);
};
+} // namespace syncable_prefs
+
template <>
-TestingPrefServiceBase<PrefServiceSyncable, user_prefs::PrefRegistrySyncable>::
+TestingPrefServiceBase<syncable_prefs::PrefServiceSyncable,
+ user_prefs::PrefRegistrySyncable>::
TestingPrefServiceBase(TestingPrefStore* managed_prefs,
TestingPrefStore* user_prefs,
TestingPrefStore* recommended_prefs,
diff --git a/ios/chrome/browser/prefs/ios_chrome_pref_model_associator_client.h b/ios/chrome/browser/prefs/ios_chrome_pref_model_associator_client.h
index c43e937..b4ba80d 100644
--- a/ios/chrome/browser/prefs/ios_chrome_pref_model_associator_client.h
+++ b/ios/chrome/browser/prefs/ios_chrome_pref_model_associator_client.h
@@ -15,7 +15,8 @@ template <typename T>
struct DefaultSingletonTraits;
}
-class IOSChromePrefModelAssociatorClient : public PrefModelAssociatorClient {
+class IOSChromePrefModelAssociatorClient
+ : public syncable_prefs::PrefModelAssociatorClient {
public:
// Returns the global instance.
static IOSChromePrefModelAssociatorClient* GetInstance();
@@ -27,7 +28,7 @@ class IOSChromePrefModelAssociatorClient : public PrefModelAssociatorClient {
IOSChromePrefModelAssociatorClient();
~IOSChromePrefModelAssociatorClient() override;
- // PrefModelAssociatorClient implementation.
+ // syncable_prefs::PrefModelAssociatorClient implementation.
bool IsMergeableListPreference(const std::string& pref_name) const override;
bool IsMergeableDictionaryPreference(
const std::string& pref_name) const override;
diff --git a/ios/chrome/browser/prefs/ios_chrome_pref_service_factory.cc b/ios/chrome/browser/prefs/ios_chrome_pref_service_factory.cc
index 4fb2569..85e7dc3 100644
--- a/ios/chrome/browser/prefs/ios_chrome_pref_service_factory.cc
+++ b/ios/chrome/browser/prefs/ios_chrome_pref_service_factory.cc
@@ -31,7 +31,7 @@ void HandleReadError(PersistentPrefStore::PrefReadError error) {
PersistentPrefStore::PREF_READ_ERROR_MAX_ENUM);
}
-void PrepareFactory(PrefServiceSyncableFactory* factory,
+void PrepareFactory(syncable_prefs::PrefServiceSyncableFactory* factory,
policy::PolicyService* policy_service,
const base::FilePath& pref_filename,
base::SequencedTaskRunner* pref_io_task_runner,
@@ -60,13 +60,13 @@ scoped_ptr<PrefService> CreateLocalState(
policy::PolicyService* policy_service,
const scoped_refptr<PrefRegistry>& pref_registry,
bool async) {
- PrefServiceSyncableFactory factory;
+ syncable_prefs::PrefServiceSyncableFactory factory;
PrepareFactory(&factory, policy_service, pref_filename, pref_io_task_runner,
async);
return factory.Create(pref_registry.get());
}
-scoped_ptr<PrefServiceSyncable> CreateBrowserStatePrefs(
+scoped_ptr<syncable_prefs::PrefServiceSyncable> CreateBrowserStatePrefs(
const base::FilePath& browser_state_path,
base::SequencedTaskRunner* pref_io_task_runner,
TrackedPreferenceValidationDelegate* validation_delegate,
@@ -78,18 +78,19 @@ scoped_ptr<PrefServiceSyncable> CreateBrowserStatePrefs(
// preference modifications (as applications are sand-boxed), it can use a
// simple JsonPrefStore to store them (which is what PrefStoreManager uses
// on platforms that do not track preference modifications).
- PrefServiceSyncableFactory factory;
+ syncable_prefs::PrefServiceSyncableFactory factory;
PrepareFactory(&factory, policy_service,
browser_state_path.Append(kPreferencesFilename),
pref_io_task_runner, async);
- scoped_ptr<PrefServiceSyncable> pref_service =
+ scoped_ptr<syncable_prefs::PrefServiceSyncable> pref_service =
factory.CreateSyncable(pref_registry.get());
ConfigureDefaultSearchPrefMigrationToDictionaryValue(pref_service.get());
return pref_service.Pass();
}
-scoped_ptr<PrefServiceSyncable> CreateIncognitoBrowserStatePrefs(
- PrefServiceSyncable* pref_service) {
+scoped_ptr<syncable_prefs::PrefServiceSyncable>
+CreateIncognitoBrowserStatePrefs(
+ syncable_prefs::PrefServiceSyncable* pref_service) {
// List of keys that cannot be changed in the user prefs file by the incognito
// browser state. All preferences that store information about the browsing
// history or behaviour of the user should have this property.
diff --git a/ios/chrome/browser/prefs/ios_chrome_pref_service_factory.h b/ios/chrome/browser/prefs/ios_chrome_pref_service_factory.h
index a777c7d..5168d29 100644
--- a/ios/chrome/browser/prefs/ios_chrome_pref_service_factory.h
+++ b/ios/chrome/browser/prefs/ios_chrome_pref_service_factory.h
@@ -10,7 +10,6 @@
class PrefRegistry;
class PrefService;
-class PrefServiceSyncable;
class PrefStore;
class TrackedPreferenceValidationDelegate;
@@ -27,6 +26,10 @@ namespace policy {
class PolicyService;
}
+namespace syncable_prefs {
+class PrefServiceSyncable;
+}
+
namespace user_prefs {
class PrefRegistrySyncable;
}
@@ -44,7 +47,7 @@ scoped_ptr<PrefService> CreateLocalState(
const scoped_refptr<PrefRegistry>& pref_registry,
bool async);
-scoped_ptr<PrefServiceSyncable> CreateBrowserStatePrefs(
+scoped_ptr<syncable_prefs::PrefServiceSyncable> CreateBrowserStatePrefs(
const base::FilePath& browser_state_path,
base::SequencedTaskRunner* pref_io_task_runner,
TrackedPreferenceValidationDelegate* validation_delegate,
@@ -54,7 +57,8 @@ scoped_ptr<PrefServiceSyncable> CreateBrowserStatePrefs(
// Creates an incognito copy of |pref_service| that shares most prefs but uses
// a fresh non-persistent overlay for the user pref store.
-scoped_ptr<PrefServiceSyncable> CreateIncognitoBrowserStatePrefs(
- PrefServiceSyncable* main_pref_store);
+scoped_ptr<syncable_prefs::PrefServiceSyncable>
+CreateIncognitoBrowserStatePrefs(
+ syncable_prefs::PrefServiceSyncable* main_pref_store);
#endif // IOS_CHROME_BROWSER_PREFS_IOS_CHROME_PREF_SERVICE_FACTORY_H_
diff --git a/ios/public/provider/chrome/browser/browser_state/chrome_browser_state.h b/ios/public/provider/chrome/browser/browser_state/chrome_browser_state.h
index dd3c72f..36e7f54 100644
--- a/ios/public/provider/chrome/browser/browser_state/chrome_browser_state.h
+++ b/ios/public/provider/chrome/browser/browser_state/chrome_browser_state.h
@@ -11,12 +11,15 @@
#include "ios/web/public/browser_state.h"
class PrefService;
-class PrefServiceSyncable;
namespace base {
class SequencedTaskRunner;
}
+namespace syncable_prefs {
+class PrefServiceSyncable;
+}
+
namespace web {
class WebUIIOS;
}
@@ -62,8 +65,8 @@ class ChromeBrowserState : public web::BrowserState {
virtual PrefService* GetPrefs() = 0;
// Retrieves a pointer to the PrefService that manages the preferences as
- // a PrefServiceSyncable.
- virtual PrefServiceSyncable* GetSyncablePrefs() = 0;
+ // a syncable_prefs::PrefServiceSyncable.
+ virtual syncable_prefs::PrefServiceSyncable* GetSyncablePrefs() = 0;
protected:
ChromeBrowserState() {}