Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Side by Side Diff: chrome/browser/sync/profile_sync_service.cc

Issue 1308313003: Componentize chrome/common/sync_util (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #include "chrome/browser/sync/glue/sync_start_util.h" 45 #include "chrome/browser/sync/glue/sync_start_util.h"
46 #include "chrome/browser/sync/glue/typed_url_data_type_controller.h" 46 #include "chrome/browser/sync/glue/typed_url_data_type_controller.h"
47 #include "chrome/browser/sync/sessions/notification_service_sessions_router.h" 47 #include "chrome/browser/sync/sessions/notification_service_sessions_router.h"
48 #include "chrome/browser/sync/supervised_user_signin_manager_wrapper.h" 48 #include "chrome/browser/sync/supervised_user_signin_manager_wrapper.h"
49 #include "chrome/browser/sync/sync_type_preference_provider.h" 49 #include "chrome/browser/sync/sync_type_preference_provider.h"
50 #include "chrome/browser/ui/browser.h" 50 #include "chrome/browser/ui/browser.h"
51 #include "chrome/browser/ui/browser_list.h" 51 #include "chrome/browser/ui/browser_list.h"
52 #include "chrome/browser/ui/browser_window.h" 52 #include "chrome/browser/ui/browser_window.h"
53 #include "chrome/browser/ui/global_error/global_error_service.h" 53 #include "chrome/browser/ui/global_error/global_error_service.h"
54 #include "chrome/browser/ui/global_error/global_error_service_factory.h" 54 #include "chrome/browser/ui/global_error/global_error_service_factory.h"
55 #include "chrome/common/channel_info.h"
55 #include "chrome/common/chrome_switches.h" 56 #include "chrome/common/chrome_switches.h"
56 #include "chrome/common/pref_names.h" 57 #include "chrome/common/pref_names.h"
57 #include "chrome/common/sync_util.h"
58 #include "chrome/common/url_constants.h" 58 #include "chrome/common/url_constants.h"
59 #include "chrome/grit/generated_resources.h" 59 #include "chrome/grit/generated_resources.h"
60 #include "components/autofill/core/common/autofill_pref_names.h" 60 #include "components/autofill/core/common/autofill_pref_names.h"
61 #include "components/invalidation/impl/profile_invalidation_provider.h" 61 #include "components/invalidation/impl/profile_invalidation_provider.h"
62 #include "components/invalidation/public/invalidation_service.h" 62 #include "components/invalidation/public/invalidation_service.h"
63 #include "components/password_manager/core/browser/password_store.h" 63 #include "components/password_manager/core/browser/password_store.h"
64 #include "components/pref_registry/pref_registry_syncable.h" 64 #include "components/pref_registry/pref_registry_syncable.h"
65 #include "components/signin/core/browser/about_signin_internals.h" 65 #include "components/signin/core/browser/about_signin_internals.h"
66 #include "components/signin/core/browser/profile_oauth2_token_service.h" 66 #include "components/signin/core/browser/profile_oauth2_token_service.h"
67 #include "components/signin/core/browser/signin_manager.h" 67 #include "components/signin/core/browser/signin_manager.h"
68 #include "components/signin/core/browser/signin_metrics.h" 68 #include "components/signin/core/browser/signin_metrics.h"
69 #include "components/sync_driver/backend_migrator.h" 69 #include "components/sync_driver/backend_migrator.h"
70 #include "components/sync_driver/change_processor.h" 70 #include "components/sync_driver/change_processor.h"
71 #include "components/sync_driver/data_type_controller.h" 71 #include "components/sync_driver/data_type_controller.h"
72 #include "components/sync_driver/device_info.h" 72 #include "components/sync_driver/device_info.h"
73 #include "components/sync_driver/favicon_cache.h" 73 #include "components/sync_driver/favicon_cache.h"
74 #include "components/sync_driver/pref_names.h" 74 #include "components/sync_driver/pref_names.h"
75 #include "components/sync_driver/sync_api_component_factory.h" 75 #include "components/sync_driver/sync_api_component_factory.h"
76 #include "components/sync_driver/sync_driver_switches.h"
76 #include "components/sync_driver/sync_error_controller.h" 77 #include "components/sync_driver/sync_error_controller.h"
77 #include "components/sync_driver/sync_stopped_reporter.h" 78 #include "components/sync_driver/sync_stopped_reporter.h"
79 #include "components/sync_driver/sync_util.h"
78 #include "components/sync_driver/system_encryptor.h" 80 #include "components/sync_driver/system_encryptor.h"
79 #include "components/sync_driver/user_selectable_sync_type.h" 81 #include "components/sync_driver/user_selectable_sync_type.h"
80 #include "components/version_info/version_info_values.h" 82 #include "components/version_info/version_info_values.h"
81 #include "content/public/browser/browser_thread.h" 83 #include "content/public/browser/browser_thread.h"
82 #include "content/public/browser/notification_details.h" 84 #include "content/public/browser/notification_details.h"
83 #include "content/public/browser/notification_service.h" 85 #include "content/public/browser/notification_service.h"
84 #include "content/public/browser/notification_source.h" 86 #include "content/public/browser/notification_source.h"
85 #include "net/cookies/cookie_monster.h" 87 #include "net/cookies/cookie_monster.h"
86 #include "net/url_request/url_request_context_getter.h" 88 #include "net/url_request/url_request_context_getter.h"
87 #include "sync/api/sync_error.h" 89 #include "sync/api/sync_error.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 scoped_ptr<SupervisedUserSigninManagerWrapper> signin_wrapper, 211 scoped_ptr<SupervisedUserSigninManagerWrapper> signin_wrapper,
210 ProfileOAuth2TokenService* oauth2_token_service, 212 ProfileOAuth2TokenService* oauth2_token_service,
211 ProfileSyncServiceStartBehavior start_behavior) 213 ProfileSyncServiceStartBehavior start_behavior)
212 : OAuth2TokenService::Consumer("sync"), 214 : OAuth2TokenService::Consumer("sync"),
213 last_auth_error_(AuthError::AuthErrorNone()), 215 last_auth_error_(AuthError::AuthErrorNone()),
214 passphrase_required_reason_(syncer::REASON_PASSPHRASE_NOT_REQUIRED), 216 passphrase_required_reason_(syncer::REASON_PASSPHRASE_NOT_REQUIRED),
215 factory_(factory.Pass()), 217 factory_(factory.Pass()),
216 profile_(profile), 218 profile_(profile),
217 sync_prefs_(profile_->GetPrefs()), 219 sync_prefs_(profile_->GetPrefs()),
218 sync_service_url_( 220 sync_service_url_(
219 GetSyncServiceURL(*base::CommandLine::ForCurrentProcess())), 221 GetSyncServiceURL(*base::CommandLine::ForCurrentProcess(),
222 chrome::GetChannel())),
220 is_first_time_sync_configure_(false), 223 is_first_time_sync_configure_(false),
221 backend_initialized_(false), 224 backend_initialized_(false),
222 sync_disabled_by_admin_(false), 225 sync_disabled_by_admin_(false),
223 is_auth_in_progress_(false), 226 is_auth_in_progress_(false),
224 signin_(signin_wrapper.Pass()), 227 signin_(signin_wrapper.Pass()),
225 unrecoverable_error_reason_(ERROR_REASON_UNSET), 228 unrecoverable_error_reason_(ERROR_REASON_UNSET),
226 expect_sync_configuration_aborted_(false), 229 expect_sync_configuration_aborted_(false),
227 encrypted_types_(syncer::SyncEncryptionHandler::SensitiveTypes()), 230 encrypted_types_(syncer::SyncEncryptionHandler::SensitiveTypes()),
228 encrypt_everything_allowed_(true), 231 encrypt_everything_allowed_(true),
229 encrypt_everything_(false), 232 encrypt_everything_(false),
(...skipping 2562 matching lines...) Expand 10 before | Expand all | Expand 10 after
2792 } else { 2795 } else {
2793 UMA_HISTOGRAM_COUNTS("Sync.MemoryPressureWarningBeforeCleanShutdown", 2796 UMA_HISTOGRAM_COUNTS("Sync.MemoryPressureWarningBeforeCleanShutdown",
2794 warning_received); 2797 warning_received);
2795 } 2798 }
2796 } 2799 }
2797 sync_prefs_.SetMemoryPressureWarningCount(0); 2800 sync_prefs_.SetMemoryPressureWarningCount(0);
2798 // Will set to true during a clean shutdown, so crash or something else will 2801 // Will set to true during a clean shutdown, so crash or something else will
2799 // remain this as false. 2802 // remain this as false.
2800 sync_prefs_.SetCleanShutdown(false); 2803 sync_prefs_.SetCleanShutdown(false);
2801 } 2804 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698