diff options
author | avi <avi@chromium.org> | 2014-12-22 14:42:33 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-22 22:43:10 +0000 |
commit | 1772c1ae7194b0efdbd3c65d1654902daabb1c51 (patch) | |
tree | 7a73b091425a9f636a2f4efb101eb7e0a19ab84d /components/translate | |
parent | 520ae85e967f776f4134277cb14e487894421226 (diff) | |
download | chromium_src-1772c1ae7194b0efdbd3c65d1654902daabb1c51.zip chromium_src-1772c1ae7194b0efdbd3c65d1654902daabb1c51.tar.gz chromium_src-1772c1ae7194b0efdbd3c65d1654902daabb1c51.tar.bz2 |
Make callers of CommandLine use it via the base:: namespace.
Covers cloud_print/ and components/.
BUG=422426
TEST=none
TBR=ben@chromium.org
Review URL: https://codereview.chromium.org/818103002
Cr-Commit-Position: refs/heads/master@{#309475}
Diffstat (limited to 'components/translate')
6 files changed, 7 insertions, 6 deletions
diff --git a/components/translate/core/browser/translate_download_manager.cc b/components/translate/core/browser/translate_download_manager.cc index 9daf2d5..b953547 100644 --- a/components/translate/core/browser/translate_download_manager.cc +++ b/components/translate/core/browser/translate_download_manager.cc @@ -45,7 +45,7 @@ void TranslateDownloadManager::RequestLanguageList() { void TranslateDownloadManager::RequestLanguageList(PrefService* prefs) { // We don't want to do this when translate is disabled. DCHECK(prefs != NULL); - if (CommandLine::ForCurrentProcess()->HasSwitch( + if (base::CommandLine::ForCurrentProcess()->HasSwitch( translate::switches::kDisableTranslate) || !prefs->GetBoolean(prefs::kEnableTranslate)) { return; diff --git a/components/translate/core/browser/translate_manager.cc b/components/translate/core/browser/translate_manager.cc index 065e102..d836e09 100644 --- a/components/translate/core/browser/translate_manager.cc +++ b/components/translate/core/browser/translate_manager.cc @@ -107,7 +107,7 @@ void TranslateManager::InitiateTranslation(const std::string& page_lang) { // Allow disabling of translate from the command line to assist with // automated browser testing. - if (CommandLine::ForCurrentProcess()->HasSwitch( + if (base::CommandLine::ForCurrentProcess()->HasSwitch( translate::switches::kDisableTranslate)) { TranslateBrowserMetrics::ReportInitiationStatus( TranslateBrowserMetrics::INITIATION_STATUS_DISABLED_BY_SWITCH); diff --git a/components/translate/core/browser/translate_script.cc b/components/translate/core/browser/translate_script.cc index 8c25320..83f693a 100644 --- a/components/translate/core/browser/translate_script.cc +++ b/components/translate/core/browser/translate_script.cc @@ -66,7 +66,8 @@ void TranslateScript::Request(const RequestCallback& callback) { GURL translate_script_url; // Check if command-line contains an alternative URL for translate service. - const CommandLine& command_line = *CommandLine::ForCurrentProcess(); + const base::CommandLine& command_line = + *base::CommandLine::ForCurrentProcess(); if (command_line.HasSwitch(translate::switches::kTranslateScriptURL)) { translate_script_url = GURL(command_line.GetSwitchValueASCII( translate::switches::kTranslateScriptURL)); diff --git a/components/translate/core/browser/translate_script_unittest.cc b/components/translate/core/browser/translate_script_unittest.cc index a211b68..288b59b 100644 --- a/components/translate/core/browser/translate_script_unittest.cc +++ b/components/translate/core/browser/translate_script_unittest.cc @@ -104,7 +104,7 @@ TEST_F(TranslateScriptTest, CheckScriptParameters) { TEST_F(TranslateScriptTest, CheckScriptURL) { const std::string script_url("http://www.tamurayukari.com/mero-n.js"); - CommandLine* command_line = CommandLine::ForCurrentProcess(); + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); command_line->AppendSwitchASCII(translate::switches::kTranslateScriptURL, script_url); diff --git a/components/translate/core/common/translate_util.cc b/components/translate/core/common/translate_util.cc index 2c30489..35c54a9 100644 --- a/components/translate/core/common/translate_util.cc +++ b/components/translate/core/common/translate_util.cc @@ -137,7 +137,7 @@ void ToChromeLanguageSynonym(std::string* language) { GURL GetTranslateSecurityOrigin() { std::string security_origin(kSecurityOrigin); - CommandLine* command_line = CommandLine::ForCurrentProcess(); + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); if (command_line->HasSwitch(switches::kTranslateSecurityOrigin)) { security_origin = command_line->GetSwitchValueASCII(switches::kTranslateSecurityOrigin); diff --git a/components/translate/core/common/translate_util_unittest.cc b/components/translate/core/common/translate_util_unittest.cc index e3754ff..f6ef869 100644 --- a/components/translate/core/common/translate_util_unittest.cc +++ b/components/translate/core/common/translate_util_unittest.cc @@ -62,7 +62,7 @@ TEST_F(TranslateUtilTest, SecurityOrigin) { EXPECT_EQ(std::string(translate::kSecurityOrigin), origin.spec()); const std::string running_origin("http://www.tamurayukari.com/"); - CommandLine* command_line = CommandLine::ForCurrentProcess(); + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); command_line->AppendSwitchASCII(translate::switches::kTranslateSecurityOrigin, running_origin); GURL modified_origin = translate::GetTranslateSecurityOrigin(); |