| 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/glue/sync_backend_host.h" | 5 #include "chrome/browser/sync/glue/sync_backend_host.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 InternalComponentsFactory::Switches factory_switches = { | 370 InternalComponentsFactory::Switches factory_switches = { |
| 371 InternalComponentsFactory::ENCRYPTION_KEYSTORE, | 371 InternalComponentsFactory::ENCRYPTION_KEYSTORE, |
| 372 InternalComponentsFactory::BACKOFF_NORMAL | 372 InternalComponentsFactory::BACKOFF_NORMAL |
| 373 }; | 373 }; |
| 374 | 374 |
| 375 CommandLine* cl = CommandLine::ForCurrentProcess(); | 375 CommandLine* cl = CommandLine::ForCurrentProcess(); |
| 376 if (cl->HasSwitch(switches::kSyncShortInitialRetryOverride)) { | 376 if (cl->HasSwitch(switches::kSyncShortInitialRetryOverride)) { |
| 377 factory_switches.backoff_override = | 377 factory_switches.backoff_override = |
| 378 InternalComponentsFactoryImpl::BACKOFF_SHORT_INITIAL_RETRY_OVERRIDE; | 378 InternalComponentsFactoryImpl::BACKOFF_SHORT_INITIAL_RETRY_OVERRIDE; |
| 379 } | 379 } |
| 380 if (cl->HasSwitch(switches::kSyncEnableGetUpdateAvoidance)) { |
| 381 factory_switches.pre_commit_updates_policy_override = |
| 382 InternalComponentsFactoryImpl::FORCE_ENABLE_PRE_COMMIT_UPDATE_AVOIDANCE; |
| 383 } |
| 380 | 384 |
| 381 initialization_state_ = CREATING_SYNC_MANAGER; | 385 initialization_state_ = CREATING_SYNC_MANAGER; |
| 382 InitCore(DoInitializeOptions( | 386 InitCore(DoInitializeOptions( |
| 383 registrar_->sync_thread()->message_loop(), | 387 registrar_->sync_thread()->message_loop(), |
| 384 registrar_.get(), | 388 registrar_.get(), |
| 385 routing_info, | 389 routing_info, |
| 386 workers, | 390 workers, |
| 387 &extensions_activity_monitor_, | 391 &extensions_activity_monitor_, |
| 388 event_handler, | 392 event_handler, |
| 389 sync_service_url, | 393 sync_service_url, |
| (...skipping 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1583 | 1587 |
| 1584 base::MessageLoop* SyncBackendHost::GetSyncLoopForTesting() { | 1588 base::MessageLoop* SyncBackendHost::GetSyncLoopForTesting() { |
| 1585 return registrar_->sync_thread()->message_loop(); | 1589 return registrar_->sync_thread()->message_loop(); |
| 1586 } | 1590 } |
| 1587 | 1591 |
| 1588 #undef SDVLOG | 1592 #undef SDVLOG |
| 1589 | 1593 |
| 1590 #undef SLOG | 1594 #undef SLOG |
| 1591 | 1595 |
| 1592 } // namespace browser_sync | 1596 } // namespace browser_sync |
| OLD | NEW |