Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Side by Side Diff: chrome/browser/sync/glue/sync_backend_host_impl.cc

Issue 816403003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "chrome/browser/sync/glue/sync_backend_host_impl.h" 5 #include "chrome/browser/sync/glue/sync_backend_host_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/profiler/scoped_tracker.h" 9 #include "base/profiler/scoped_tracker.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 registrar_->GetWorkers(&workers); 128 registrar_->GetWorkers(&workers);
129 // TODO(pavely): Remove ScopedTracker below once crbug.com/426272 is fixed. 129 // TODO(pavely): Remove ScopedTracker below once crbug.com/426272 is fixed.
130 tracked_objects::ScopedTracker tracker3(FROM_HERE_WITH_EXPLICIT_FUNCTION( 130 tracked_objects::ScopedTracker tracker3(FROM_HERE_WITH_EXPLICIT_FUNCTION(
131 "426272 SyncBackendHostImpl::Initialize init")); 131 "426272 SyncBackendHostImpl::Initialize init"));
132 132
133 InternalComponentsFactory::Switches factory_switches = { 133 InternalComponentsFactory::Switches factory_switches = {
134 InternalComponentsFactory::ENCRYPTION_KEYSTORE, 134 InternalComponentsFactory::ENCRYPTION_KEYSTORE,
135 InternalComponentsFactory::BACKOFF_NORMAL 135 InternalComponentsFactory::BACKOFF_NORMAL
136 }; 136 };
137 137
138 CommandLine* cl = CommandLine::ForCurrentProcess(); 138 base::CommandLine* cl = base::CommandLine::ForCurrentProcess();
139 if (cl->HasSwitch(switches::kSyncShortInitialRetryOverride)) { 139 if (cl->HasSwitch(switches::kSyncShortInitialRetryOverride)) {
140 factory_switches.backoff_override = 140 factory_switches.backoff_override =
141 InternalComponentsFactory::BACKOFF_SHORT_INITIAL_RETRY_OVERRIDE; 141 InternalComponentsFactory::BACKOFF_SHORT_INITIAL_RETRY_OVERRIDE;
142 } 142 }
143 if (cl->HasSwitch(switches::kSyncEnableGetUpdateAvoidance)) { 143 if (cl->HasSwitch(switches::kSyncEnableGetUpdateAvoidance)) {
144 factory_switches.pre_commit_updates_policy = 144 factory_switches.pre_commit_updates_policy =
145 InternalComponentsFactory::FORCE_ENABLE_PRE_COMMIT_UPDATE_AVOIDANCE; 145 InternalComponentsFactory::FORCE_ENABLE_PRE_COMMIT_UPDATE_AVOIDANCE;
146 } 146 }
147 147
148 scoped_ptr<DoInitializeOptions> init_opts(new DoInitializeOptions( 148 scoped_ptr<DoInitializeOptions> init_opts(new DoInitializeOptions(
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 879
880 base::MessageLoop* SyncBackendHostImpl::GetSyncLoopForTesting() { 880 base::MessageLoop* SyncBackendHostImpl::GetSyncLoopForTesting() {
881 return registrar_->sync_thread()->message_loop(); 881 return registrar_->sync_thread()->message_loop();
882 } 882 }
883 883
884 } // namespace browser_sync 884 } // namespace browser_sync
885 885
886 #undef SDVLOG 886 #undef SDVLOG
887 887
888 #undef SLOG 888 #undef SLOG
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698