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

Unified Diff: chrome/browser/sync/startup_controller.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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/startup_controller.cc
diff --git a/chrome/browser/sync/startup_controller.cc b/chrome/browser/sync/startup_controller.cc
index a609d863c92d27b9e0891bac7270bc05ca91f998..d7f6ab0cc201e6809169cc23506979889e7f9ebf 100644
--- a/chrome/browser/sync/startup_controller.cc
+++ b/chrome/browser/sync/startup_controller.cc
@@ -51,12 +51,13 @@ StartupController::StartupController(
base::TimeDelta::FromSeconds(kDeferredInitFallbackSeconds)),
first_start_(true),
weak_factory_(this) {
-
- if (CommandLine::ForCurrentProcess()->HasSwitch(
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kSyncDeferredStartupTimeoutSeconds)) {
int timeout = kDeferredInitFallbackSeconds;
- if (base::StringToInt(CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
- switches::kSyncDeferredStartupTimeoutSeconds), &timeout)) {
+ if (base::StringToInt(
+ base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ switches::kSyncDeferredStartupTimeoutSeconds),
+ &timeout)) {
DCHECK_GE(timeout, 0);
DVLOG(2) << "Sync StartupController overriding startup timeout to "
<< timeout << " seconds.";
@@ -86,7 +87,7 @@ bool StartupController::StartUp(StartUpDeferredOption deferred_option) {
start_up_time_ = base::Time::Now();
if (deferred_option == STARTUP_BACKEND_DEFERRED &&
- !CommandLine::ForCurrentProcess()->HasSwitch(
+ !base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kSyncDisableDeferredStartup) &&
sync_prefs_->GetPreferredDataTypes(registered_types_)
.Has(syncer::SESSIONS)) {
@@ -182,7 +183,7 @@ void StartupController::RecordTimeDeferred() {
}
void StartupController::OnFallbackStartupTimerExpired() {
- DCHECK(!CommandLine::ForCurrentProcess()->HasSwitch(
+ DCHECK(!base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kSyncDisableDeferredStartup));
if (!start_backend_time_.is_null())
@@ -207,7 +208,7 @@ std::string StartupController::GetBackendInitializationStateString() const {
}
void StartupController::OnDataTypeRequestsSyncStartup(syncer::ModelType type) {
- if (CommandLine::ForCurrentProcess()->HasSwitch(
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kSyncDisableDeferredStartup)) {
DVLOG(2) << "Ignoring data type request for sync startup: "
<< syncer::ModelTypeToString(type);
« no previous file with comments | « chrome/browser/sync/profile_sync_service_unittest.cc ('k') | chrome/browser/sync/startup_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698