| 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 "sync/internal_api/sync_manager_impl.h" | 5 #include "sync/internal_api/sync_manager_impl.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/base64.h" | 9 #include "base/base64.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 bool use_ssl, | 370 bool use_ssl, |
| 371 const scoped_refptr<base::TaskRunner>& blocking_task_runner, | 371 const scoped_refptr<base::TaskRunner>& blocking_task_runner, |
| 372 scoped_ptr<HttpPostProviderFactory> post_factory, | 372 scoped_ptr<HttpPostProviderFactory> post_factory, |
| 373 const std::vector<ModelSafeWorker*>& workers, | 373 const std::vector<ModelSafeWorker*>& workers, |
| 374 ExtensionsActivityMonitor* extensions_activity_monitor, | 374 ExtensionsActivityMonitor* extensions_activity_monitor, |
| 375 SyncManager::ChangeDelegate* change_delegate, | 375 SyncManager::ChangeDelegate* change_delegate, |
| 376 const SyncCredentials& credentials, | 376 const SyncCredentials& credentials, |
| 377 scoped_ptr<SyncNotifier> sync_notifier, | 377 scoped_ptr<SyncNotifier> sync_notifier, |
| 378 const std::string& restored_key_for_bootstrapping, | 378 const std::string& restored_key_for_bootstrapping, |
| 379 const std::string& restored_keystore_key_for_bootstrapping, | 379 const std::string& restored_keystore_key_for_bootstrapping, |
| 380 bool keystore_encryption_enabled, | |
| 381 scoped_ptr<InternalComponentsFactory> internal_components_factory, | 380 scoped_ptr<InternalComponentsFactory> internal_components_factory, |
| 382 Encryptor* encryptor, | 381 Encryptor* encryptor, |
| 383 UnrecoverableErrorHandler* unrecoverable_error_handler, | 382 UnrecoverableErrorHandler* unrecoverable_error_handler, |
| 384 ReportUnrecoverableErrorFunction report_unrecoverable_error_function) { | 383 ReportUnrecoverableErrorFunction report_unrecoverable_error_function) { |
| 385 CHECK(!initialized_); | 384 CHECK(!initialized_); |
| 386 DCHECK(thread_checker_.CalledOnValidThread()); | 385 DCHECK(thread_checker_.CalledOnValidThread()); |
| 387 DCHECK(post_factory.get()); | 386 DCHECK(post_factory.get()); |
| 388 DCHECK(!credentials.email.empty()); | 387 DCHECK(!credentials.email.empty()); |
| 389 DCHECK(!credentials.sync_token.empty()); | 388 DCHECK(!credentials.sync_token.empty()); |
| 390 DVLOG(1) << "SyncManager starting Init..."; | 389 DVLOG(1) << "SyncManager starting Init..."; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 listeners.push_back(&allstatus_); | 460 listeners.push_back(&allstatus_); |
| 462 listeners.push_back(this); | 461 listeners.push_back(this); |
| 463 session_context_ = internal_components_factory->BuildContext( | 462 session_context_ = internal_components_factory->BuildContext( |
| 464 connection_manager_.get(), | 463 connection_manager_.get(), |
| 465 directory(), | 464 directory(), |
| 466 workers, | 465 workers, |
| 467 extensions_activity_monitor, | 466 extensions_activity_monitor, |
| 468 &throttled_data_type_tracker_, | 467 &throttled_data_type_tracker_, |
| 469 listeners, | 468 listeners, |
| 470 &debug_info_event_listener_, | 469 &debug_info_event_listener_, |
| 471 &traffic_recorder_, | 470 &traffic_recorder_).Pass(); |
| 472 keystore_encryption_enabled).Pass(); | |
| 473 session_context_->set_account_name(credentials.email); | 471 session_context_->set_account_name(credentials.email); |
| 474 scheduler_ = internal_components_factory->BuildScheduler( | 472 scheduler_ = internal_components_factory->BuildScheduler( |
| 475 name_, session_context_.get()).Pass(); | 473 name_, session_context_.get()).Pass(); |
| 476 | 474 |
| 477 scheduler_->Start(SyncScheduler::CONFIGURATION_MODE); | 475 scheduler_->Start(SyncScheduler::CONFIGURATION_MODE); |
| 478 | 476 |
| 479 initialized_ = true; | 477 initialized_ = true; |
| 480 | 478 |
| 481 net::NetworkChangeNotifier::AddIPAddressObserver(this); | 479 net::NetworkChangeNotifier::AddIPAddressObserver(this); |
| 482 observing_ip_address_changes_ = true; | 480 observing_ip_address_changes_ = true; |
| (...skipping 1434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1917 int SyncManagerImpl::GetDefaultNudgeDelay() { | 1915 int SyncManagerImpl::GetDefaultNudgeDelay() { |
| 1918 return kDefaultNudgeDelayMilliseconds; | 1916 return kDefaultNudgeDelayMilliseconds; |
| 1919 } | 1917 } |
| 1920 | 1918 |
| 1921 // static. | 1919 // static. |
| 1922 int SyncManagerImpl::GetPreferencesNudgeDelay() { | 1920 int SyncManagerImpl::GetPreferencesNudgeDelay() { |
| 1923 return kPreferencesNudgeDelayMilliseconds; | 1921 return kPreferencesNudgeDelayMilliseconds; |
| 1924 } | 1922 } |
| 1925 | 1923 |
| 1926 } // namespace syncer | 1924 } // namespace syncer |
| OLD | NEW |