| 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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 InternalComponentsFactory::Switches factory_switches = { | 376 InternalComponentsFactory::Switches factory_switches = { |
| 377 InternalComponentsFactory::ENCRYPTION_KEYSTORE, | 377 InternalComponentsFactory::ENCRYPTION_KEYSTORE, |
| 378 InternalComponentsFactory::BACKOFF_NORMAL | 378 InternalComponentsFactory::BACKOFF_NORMAL |
| 379 }; | 379 }; |
| 380 | 380 |
| 381 CommandLine* cl = CommandLine::ForCurrentProcess(); | 381 CommandLine* cl = CommandLine::ForCurrentProcess(); |
| 382 if (cl->HasSwitch(switches::kSyncShortInitialRetryOverride)) { | 382 if (cl->HasSwitch(switches::kSyncShortInitialRetryOverride)) { |
| 383 factory_switches.backoff_override = | 383 factory_switches.backoff_override = |
| 384 InternalComponentsFactoryImpl::BACKOFF_SHORT_INITIAL_RETRY_OVERRIDE; | 384 InternalComponentsFactoryImpl::BACKOFF_SHORT_INITIAL_RETRY_OVERRIDE; |
| 385 } | 385 } |
| 386 if (cl->HasSwitch(switches::kSyncEnableGetUpdateAvoidance)) { |
| 387 factory_switches.pre_commit_updates_policy = |
| 388 InternalComponentsFactoryImpl::FORCE_ENABLE_PRE_COMMIT_UPDATE_AVOIDANCE; |
| 389 } |
| 386 | 390 |
| 387 initialization_state_ = CREATING_SYNC_MANAGER; | 391 initialization_state_ = CREATING_SYNC_MANAGER; |
| 388 InitCore(DoInitializeOptions( | 392 InitCore(DoInitializeOptions( |
| 389 sync_thread_.message_loop(), | 393 sync_thread_.message_loop(), |
| 390 registrar_.get(), | 394 registrar_.get(), |
| 391 routing_info, | 395 routing_info, |
| 392 workers, | 396 workers, |
| 393 &extensions_activity_monitor_, | 397 &extensions_activity_monitor_, |
| 394 event_handler, | 398 event_handler, |
| 395 sync_service_url, | 399 sync_service_url, |
| (...skipping 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1627 DVLOG(1) << "Connection status changed: " | 1631 DVLOG(1) << "Connection status changed: " |
| 1628 << syncer::ConnectionStatusToString(status); | 1632 << syncer::ConnectionStatusToString(status); |
| 1629 frontend_->OnConnectionStatusChange(status); | 1633 frontend_->OnConnectionStatusChange(status); |
| 1630 } | 1634 } |
| 1631 | 1635 |
| 1632 #undef SDVLOG | 1636 #undef SDVLOG |
| 1633 | 1637 |
| 1634 #undef SLOG | 1638 #undef SLOG |
| 1635 | 1639 |
| 1636 } // namespace browser_sync | 1640 } // namespace browser_sync |
| OLD | NEW |