| 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 25 matching lines...) Expand all Loading... |
| 36 #include "chrome/browser/signin/signin_manager_factory.h" | 36 #include "chrome/browser/signin/signin_manager_factory.h" |
| 37 #include "chrome/browser/sync/glue/sync_backend_host.h" | 37 #include "chrome/browser/sync/glue/sync_backend_host.h" |
| 38 #include "chrome/browser/sync/glue/sync_backend_host_impl.h" | 38 #include "chrome/browser/sync/glue/sync_backend_host_impl.h" |
| 39 #include "chrome/browser/sync/glue/sync_start_util.h" | 39 #include "chrome/browser/sync/glue/sync_start_util.h" |
| 40 #include "chrome/browser/sync/sessions/notification_service_sessions_router.h" | 40 #include "chrome/browser/sync/sessions/notification_service_sessions_router.h" |
| 41 #include "chrome/browser/sync/supervised_user_signin_manager_wrapper.h" | 41 #include "chrome/browser/sync/supervised_user_signin_manager_wrapper.h" |
| 42 #include "chrome/browser/sync/sync_type_preference_provider.h" | 42 #include "chrome/browser/sync/sync_type_preference_provider.h" |
| 43 #include "chrome/browser/ui/sync/browser_synced_window_delegates_getter.h" | 43 #include "chrome/browser/ui/sync/browser_synced_window_delegates_getter.h" |
| 44 #include "chrome/common/channel_info.h" | 44 #include "chrome/common/channel_info.h" |
| 45 #include "chrome/common/chrome_switches.h" | 45 #include "chrome/common/chrome_switches.h" |
| 46 #include "chrome/common/pref_names.h" | |
| 47 #include "chrome/grit/generated_resources.h" | 46 #include "chrome/grit/generated_resources.h" |
| 48 #include "components/autofill/core/common/autofill_pref_names.h" | 47 #include "components/autofill/core/common/autofill_pref_names.h" |
| 49 #include "components/history/core/browser/typed_url_data_type_controller.h" | 48 #include "components/history/core/browser/typed_url_data_type_controller.h" |
| 49 #include "components/invalidation/impl/invalidation_prefs.h" |
| 50 #include "components/invalidation/impl/profile_invalidation_provider.h" | 50 #include "components/invalidation/impl/profile_invalidation_provider.h" |
| 51 #include "components/invalidation/public/invalidation_service.h" | 51 #include "components/invalidation/public/invalidation_service.h" |
| 52 #include "components/password_manager/core/browser/password_store.h" | 52 #include "components/password_manager/core/browser/password_store.h" |
| 53 #include "components/pref_registry/pref_registry_syncable.h" | 53 #include "components/pref_registry/pref_registry_syncable.h" |
| 54 #include "components/signin/core/browser/about_signin_internals.h" | 54 #include "components/signin/core/browser/about_signin_internals.h" |
| 55 #include "components/signin/core/browser/profile_oauth2_token_service.h" | 55 #include "components/signin/core/browser/profile_oauth2_token_service.h" |
| 56 #include "components/signin/core/browser/signin_manager.h" | 56 #include "components/signin/core/browser/signin_manager.h" |
| 57 #include "components/signin/core/browser/signin_metrics.h" | 57 #include "components/signin/core/browser/signin_metrics.h" |
| 58 #include "components/sync_driver/backend_migrator.h" | 58 #include "components/sync_driver/backend_migrator.h" |
| 59 #include "components/sync_driver/change_processor.h" | 59 #include "components/sync_driver/change_processor.h" |
| (...skipping 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1151 NotifySyncCycleCompleted(); | 1151 NotifySyncCycleCompleted(); |
| 1152 } | 1152 } |
| 1153 | 1153 |
| 1154 void ProfileSyncService::OnExperimentsChanged( | 1154 void ProfileSyncService::OnExperimentsChanged( |
| 1155 const syncer::Experiments& experiments) { | 1155 const syncer::Experiments& experiments) { |
| 1156 if (current_experiments_.Matches(experiments)) | 1156 if (current_experiments_.Matches(experiments)) |
| 1157 return; | 1157 return; |
| 1158 | 1158 |
| 1159 current_experiments_ = experiments; | 1159 current_experiments_ = experiments; |
| 1160 | 1160 |
| 1161 profile()->GetPrefs()->SetBoolean(prefs::kInvalidationServiceUseGCMChannel, | 1161 profile()->GetPrefs()->SetBoolean( |
| 1162 experiments.gcm_invalidations_enabled); | 1162 invalidation::prefs::kInvalidationServiceUseGCMChannel, |
| 1163 experiments.gcm_invalidations_enabled); |
| 1163 profile()->GetPrefs()->SetBoolean( | 1164 profile()->GetPrefs()->SetBoolean( |
| 1164 autofill::prefs::kAutofillWalletSyncExperimentEnabled, | 1165 autofill::prefs::kAutofillWalletSyncExperimentEnabled, |
| 1165 experiments.wallet_sync_enabled); | 1166 experiments.wallet_sync_enabled); |
| 1166 } | 1167 } |
| 1167 | 1168 |
| 1168 void ProfileSyncService::UpdateAuthErrorState(const AuthError& error) { | 1169 void ProfileSyncService::UpdateAuthErrorState(const AuthError& error) { |
| 1169 is_auth_in_progress_ = false; | 1170 is_auth_in_progress_ = false; |
| 1170 last_auth_error_ = error; | 1171 last_auth_error_ = error; |
| 1171 | 1172 |
| 1172 NotifyObservers(); | 1173 NotifyObservers(); |
| (...skipping 1565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2738 } | 2739 } |
| 2739 | 2740 |
| 2740 std::string ProfileSyncService::unrecoverable_error_message() const { | 2741 std::string ProfileSyncService::unrecoverable_error_message() const { |
| 2741 return unrecoverable_error_message_; | 2742 return unrecoverable_error_message_; |
| 2742 } | 2743 } |
| 2743 | 2744 |
| 2744 tracked_objects::Location ProfileSyncService::unrecoverable_error_location() | 2745 tracked_objects::Location ProfileSyncService::unrecoverable_error_location() |
| 2745 const { | 2746 const { |
| 2746 return unrecoverable_error_location_; | 2747 return unrecoverable_error_location_; |
| 2747 } | 2748 } |
| OLD | NEW |