| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/sync/driver/glue/sync_backend_host_impl.h" | 5 #include "components/sync/driver/glue/sync_backend_host_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 | 104 |
| 105 base::CommandLine* cl = base::CommandLine::ForCurrentProcess(); | 105 base::CommandLine* cl = base::CommandLine::ForCurrentProcess(); |
| 106 if (cl->HasSwitch(switches::kSyncShortInitialRetryOverride)) { | 106 if (cl->HasSwitch(switches::kSyncShortInitialRetryOverride)) { |
| 107 factory_switches.backoff_override = | 107 factory_switches.backoff_override = |
| 108 EngineComponentsFactory::BACKOFF_SHORT_INITIAL_RETRY_OVERRIDE; | 108 EngineComponentsFactory::BACKOFF_SHORT_INITIAL_RETRY_OVERRIDE; |
| 109 } | 109 } |
| 110 if (cl->HasSwitch(switches::kSyncEnableGetUpdateAvoidance)) { | 110 if (cl->HasSwitch(switches::kSyncEnableGetUpdateAvoidance)) { |
| 111 factory_switches.pre_commit_updates_policy = | 111 factory_switches.pre_commit_updates_policy = |
| 112 EngineComponentsFactory::FORCE_ENABLE_PRE_COMMIT_UPDATE_AVOIDANCE; | 112 EngineComponentsFactory::FORCE_ENABLE_PRE_COMMIT_UPDATE_AVOIDANCE; |
| 113 } | 113 } |
| 114 if (cl->HasSwitch(switches::kSyncShortNudgeDelayForTest)) { |
| 115 factory_switches.nudge_delay = |
| 116 EngineComponentsFactory::NudgeDelay::SHORT_NUDGE_DELAY; |
| 117 } |
| 114 | 118 |
| 115 std::map<ModelType, int64_t> invalidation_versions; | 119 std::map<ModelType, int64_t> invalidation_versions; |
| 116 sync_prefs_->GetInvalidationVersions(&invalidation_versions); | 120 sync_prefs_->GetInvalidationVersions(&invalidation_versions); |
| 117 | 121 |
| 118 std::unique_ptr<DoInitializeOptions> init_opts(new DoInitializeOptions( | 122 std::unique_ptr<DoInitializeOptions> init_opts(new DoInitializeOptions( |
| 119 registrar_->sync_thread()->message_loop(), registrar_.get(), workers, | 123 registrar_->sync_thread()->message_loop(), registrar_.get(), workers, |
| 120 sync_client_->GetExtensionsActivity(), event_handler, sync_service_url, | 124 sync_client_->GetExtensionsActivity(), event_handler, sync_service_url, |
| 121 sync_user_agent, http_post_provider_factory_getter.Run( | 125 sync_user_agent, http_post_provider_factory_getter.Run( |
| 122 core_->GetRequestContextCancelationSignal()), | 126 core_->GetRequestContextCancelationSignal()), |
| 123 credentials, invalidator_ ? invalidator_->GetInvalidatorClientId() : "", | 127 credentials, invalidator_ ? invalidator_->GetInvalidatorClientId() : "", |
| (...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 818 const SyncManager::ClearServerDataCallback& frontend_callback) { | 822 const SyncManager::ClearServerDataCallback& frontend_callback) { |
| 819 DCHECK(ui_thread_->BelongsToCurrentThread()); | 823 DCHECK(ui_thread_->BelongsToCurrentThread()); |
| 820 frontend_callback.Run(); | 824 frontend_callback.Run(); |
| 821 } | 825 } |
| 822 | 826 |
| 823 } // namespace syncer | 827 } // namespace syncer |
| 824 | 828 |
| 825 #undef SDVLOG | 829 #undef SDVLOG |
| 826 | 830 |
| 827 #undef SLOG | 831 #undef SLOG |
| OLD | NEW |