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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 connection_status_(syncer::CONNECTION_NOT_ATTEMPTED), | 235 connection_status_(syncer::CONNECTION_NOT_ATTEMPTED), |
236 last_get_token_error_(GoogleServiceAuthError::AuthErrorNone()), | 236 last_get_token_error_(GoogleServiceAuthError::AuthErrorNone()), |
237 network_resources_(new syncer::HttpBridgeNetworkResources), | 237 network_resources_(new syncer::HttpBridgeNetworkResources), |
238 backend_mode_(IDLE), | 238 backend_mode_(IDLE), |
239 need_backup_(false), | 239 need_backup_(false), |
240 backup_finished_(false), | 240 backup_finished_(false), |
241 clear_browsing_data_(base::Bind(&ClearBrowsingData)), | 241 clear_browsing_data_(base::Bind(&ClearBrowsingData)), |
242 browsing_data_remover_observer_(NULL), | 242 browsing_data_remover_observer_(NULL), |
243 weak_factory_(this), | 243 weak_factory_(this), |
244 startup_controller_weak_factory_(this) { | 244 startup_controller_weak_factory_(this) { |
| 245 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
245 DCHECK(profile); | 246 DCHECK(profile); |
246 startup_controller_.reset(new browser_sync::StartupController( | 247 startup_controller_.reset(new browser_sync::StartupController( |
247 start_behavior, | 248 start_behavior, |
248 oauth2_token_service, | 249 oauth2_token_service, |
249 &sync_prefs_, | 250 &sync_prefs_, |
250 signin_.get(), | 251 signin_.get(), |
251 base::Bind(&ProfileSyncService::StartUpSlowBackendComponents, | 252 base::Bind(&ProfileSyncService::StartUpSlowBackendComponents, |
252 startup_controller_weak_factory_.GetWeakPtr(), | 253 startup_controller_weak_factory_.GetWeakPtr(), |
253 SYNC))); | 254 SYNC))); |
254 backup_rollback_controller_.reset(new browser_sync::BackupRollbackController( | 255 backup_rollback_controller_.reset(new browser_sync::BackupRollbackController( |
(...skipping 2489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2744 | 2745 |
2745 base::MessageLoop* ProfileSyncService::GetSyncLoopForTest() const { | 2746 base::MessageLoop* ProfileSyncService::GetSyncLoopForTest() const { |
2746 if (sync_thread_) { | 2747 if (sync_thread_) { |
2747 return sync_thread_->message_loop(); | 2748 return sync_thread_->message_loop(); |
2748 } else if (backend_) { | 2749 } else if (backend_) { |
2749 return backend_->GetSyncLoopForTesting(); | 2750 return backend_->GetSyncLoopForTesting(); |
2750 } else { | 2751 } else { |
2751 return NULL; | 2752 return NULL; |
2752 } | 2753 } |
2753 } | 2754 } |
OLD | NEW |