OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/sync/profile_sync_service.h" | 5 #include "chrome/browser/sync/profile_sync_service.h" |
6 | 6 |
7 #include <cstddef> | 7 #include <cstddef> |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 #include "chrome/browser/ui/browser.h" | 55 #include "chrome/browser/ui/browser.h" |
56 #include "chrome/browser/ui/browser_list.h" | 56 #include "chrome/browser/ui/browser_list.h" |
57 #include "chrome/browser/ui/browser_window.h" | 57 #include "chrome/browser/ui/browser_window.h" |
58 #include "chrome/browser/ui/global_error/global_error_service.h" | 58 #include "chrome/browser/ui/global_error/global_error_service.h" |
59 #include "chrome/browser/ui/global_error/global_error_service_factory.h" | 59 #include "chrome/browser/ui/global_error/global_error_service_factory.h" |
60 #include "chrome/common/chrome_switches.h" | 60 #include "chrome/common/chrome_switches.h" |
61 #include "chrome/common/chrome_version_info.h" | 61 #include "chrome/common/chrome_version_info.h" |
62 #include "chrome/common/pref_names.h" | 62 #include "chrome/common/pref_names.h" |
63 #include "chrome/common/url_constants.h" | 63 #include "chrome/common/url_constants.h" |
64 #include "chrome/grit/generated_resources.h" | 64 #include "chrome/grit/generated_resources.h" |
| 65 #include "components/autofill/core/common/autofill_pref_names.h" |
65 #include "components/gcm_driver/gcm_driver.h" | 66 #include "components/gcm_driver/gcm_driver.h" |
66 #include "components/invalidation/invalidation_service.h" | 67 #include "components/invalidation/invalidation_service.h" |
67 #include "components/invalidation/profile_invalidation_provider.h" | 68 #include "components/invalidation/profile_invalidation_provider.h" |
68 #include "components/password_manager/core/browser/password_store.h" | 69 #include "components/password_manager/core/browser/password_store.h" |
69 #include "components/pref_registry/pref_registry_syncable.h" | 70 #include "components/pref_registry/pref_registry_syncable.h" |
70 #include "components/signin/core/browser/about_signin_internals.h" | 71 #include "components/signin/core/browser/about_signin_internals.h" |
71 #include "components/signin/core/browser/profile_oauth2_token_service.h" | 72 #include "components/signin/core/browser/profile_oauth2_token_service.h" |
72 #include "components/signin/core/browser/signin_manager.h" | 73 #include "components/signin/core/browser/signin_manager.h" |
73 #include "components/signin/core/browser/signin_metrics.h" | 74 #include "components/signin/core/browser/signin_metrics.h" |
74 #include "components/sync_driver/change_processor.h" | 75 #include "components/sync_driver/change_processor.h" |
(...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1146 gcm::GCMProfileServiceFactory::GetForProfile(profile())->driver() | 1147 gcm::GCMProfileServiceFactory::GetForProfile(profile())->driver() |
1147 ->Disable(); | 1148 ->Disable(); |
1148 } else { | 1149 } else { |
1149 profile()->GetPrefs()->ClearPref(prefs::kGCMChannelEnabled); | 1150 profile()->GetPrefs()->ClearPref(prefs::kGCMChannelEnabled); |
1150 gcm::GCMProfileServiceFactory::GetForProfile(profile())->driver() | 1151 gcm::GCMProfileServiceFactory::GetForProfile(profile())->driver() |
1151 ->Enable(); | 1152 ->Enable(); |
1152 } | 1153 } |
1153 | 1154 |
1154 profile()->GetPrefs()->SetBoolean(prefs::kInvalidationServiceUseGCMChannel, | 1155 profile()->GetPrefs()->SetBoolean(prefs::kInvalidationServiceUseGCMChannel, |
1155 experiments.gcm_invalidations_enabled); | 1156 experiments.gcm_invalidations_enabled); |
| 1157 profile()->GetPrefs()->SetBoolean( |
| 1158 autofill::prefs::kAutofillWalletSyncExperimentEnabled, |
| 1159 experiments.wallet_sync_enabled); |
1156 | 1160 |
1157 if (experiments.enhanced_bookmarks_enabled) { | 1161 if (experiments.enhanced_bookmarks_enabled) { |
1158 profile_->GetPrefs()->SetString( | 1162 profile_->GetPrefs()->SetString( |
1159 sync_driver::prefs::kEnhancedBookmarksExtensionId, | 1163 sync_driver::prefs::kEnhancedBookmarksExtensionId, |
1160 experiments.enhanced_bookmarks_ext_id); | 1164 experiments.enhanced_bookmarks_ext_id); |
1161 } else { | 1165 } else { |
1162 profile_->GetPrefs()->ClearPref( | 1166 profile_->GetPrefs()->ClearPref( |
1163 sync_driver::prefs::kEnhancedBookmarksExtensionId); | 1167 sync_driver::prefs::kEnhancedBookmarksExtensionId); |
1164 } | 1168 } |
1165 UpdateBookmarksExperimentState( | 1169 UpdateBookmarksExperimentState( |
(...skipping 1588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2754 | 2758 |
2755 base::MessageLoop* ProfileSyncService::GetSyncLoopForTest() const { | 2759 base::MessageLoop* ProfileSyncService::GetSyncLoopForTest() const { |
2756 if (sync_thread_) { | 2760 if (sync_thread_) { |
2757 return sync_thread_->message_loop(); | 2761 return sync_thread_->message_loop(); |
2758 } else if (backend_) { | 2762 } else if (backend_) { |
2759 return backend_->GetSyncLoopForTesting(); | 2763 return backend_->GetSyncLoopForTesting(); |
2760 } else { | 2764 } else { |
2761 return NULL; | 2765 return NULL; |
2762 } | 2766 } |
2763 } | 2767 } |
OLD | NEW |