summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/autofill/content/renderer/password_autofill_agent.cc4
-rw-r--r--components/autofill/core/browser/autofill_manager.cc2
-rw-r--r--components/copresence/rpc/rpc_handler.cc2
-rw-r--r--components/password_manager/core/browser/password_manager.cc2
-rw-r--r--components/password_manager/core/common/experiments.cc2
-rw-r--r--components/policy/core/browser/browser_policy_connector.cc2
-rw-r--r--components/policy/core/common/cloud/cloud_policy_constants.cc4
-rw-r--r--components/policy/core/common/cloud/cloud_policy_manager.cc2
-rw-r--r--components/precache/content/precache_manager.cc3
-rw-r--r--components/precache/content/precache_manager_unittest.cc4
-rw-r--r--components/precache/core/precache_fetcher.cc6
-rw-r--r--components/precache/core/precache_fetcher_unittest.cc12
-rw-r--r--components/proximity_auth/cryptauth/cryptauth_client.cc2
-rw-r--r--components/search/search.cc4
-rw-r--r--components/search/search_android_unittest.cc2
-rw-r--r--components/search_engines/template_url.cc2
-rw-r--r--components/search_engines/template_url_prepopulate_data_unittest.cc4
-rw-r--r--components/search_engines/template_url_unittest.cc4
-rw-r--r--components/session_manager/core/session_manager.cc2
-rw-r--r--components/signin/core/browser/account_tracker_service.cc2
-rw-r--r--components/signin/core/browser/signin_manager_base.cc2
-rw-r--r--components/signin/core/common/profile_management_switches.cc29
-rw-r--r--components/translate/core/browser/translate_download_manager.cc2
-rw-r--r--components/translate/core/browser/translate_manager.cc2
-rw-r--r--components/translate/core/browser/translate_script.cc3
-rw-r--r--components/translate/core/browser/translate_script_unittest.cc2
-rw-r--r--components/translate/core/common/translate_util.cc2
-rw-r--r--components/translate/core/common/translate_util_unittest.cc2
-rw-r--r--components/user_manager/user_manager_base.cc2
-rw-r--r--components/variations/variations_seed_processor.cc2
-rw-r--r--components/variations/variations_seed_processor_unittest.cc18
-rw-r--r--components/wallpaper/wallpaper_manager_base.cc8
-rw-r--r--components/web_resource/resource_request_allowed_notifier.cc3
-rw-r--r--components/wifi/wifi_test.cc7
34 files changed, 78 insertions, 73 deletions
diff --git a/components/autofill/content/renderer/password_autofill_agent.cc b/components/autofill/content/renderer/password_autofill_agent.cc
index 8a6f523..148514e 100644
--- a/components/autofill/content/renderer/password_autofill_agent.cc
+++ b/components/autofill/content/renderer/password_autofill_agent.cc
@@ -132,12 +132,12 @@ bool ShouldFillOnAccountSelect() {
std::string group_name =
base::FieldTrialList::FindFullName(kFillOnAccountSelectFieldTrialName);
- if (CommandLine::ForCurrentProcess()->HasSwitch(
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableFillOnAccountSelect)) {
return false;
}
- if (CommandLine::ForCurrentProcess()->HasSwitch(
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableFillOnAccountSelect)) {
return true;
}
diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc
index 6b227f1..d6c41fe 100644
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
@@ -289,7 +289,7 @@ int AutofillManager::AccessAddressBookPromptCount() {
bool AutofillManager::ShouldShowScanCreditCard(const FormData& form,
const FormFieldData& field) {
- if (CommandLine::ForCurrentProcess()->HasSwitch(
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
autofill::switches::kDisableCreditCardScan)) {
return false;
}
diff --git a/components/copresence/rpc/rpc_handler.cc b/components/copresence/rpc/rpc_handler.cc
index 28276ea8..991bdaaa 100644
--- a/components/copresence/rpc/rpc_handler.cc
+++ b/components/copresence/rpc/rpc_handler.cc
@@ -622,7 +622,7 @@ void RpcHandler::SendHttpPost(net::URLRequestContextGetter* url_context_getter,
scoped_ptr<MessageLite> request_proto,
const PostCleanupCallback& callback) {
// Create the base URL to call.
- CommandLine* command_line = CommandLine::ForCurrentProcess();
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
const std::string copresence_server_host =
command_line->HasSwitch(switches::kCopresenceServer) ?
command_line->GetSwitchValueASCII(switches::kCopresenceServer) :
diff --git a/components/password_manager/core/browser/password_manager.cc b/components/password_manager/core/browser/password_manager.cc
index a9b95a4..f2d1418 100644
--- a/components/password_manager/core/browser/password_manager.cc
+++ b/components/password_manager/core/browser/password_manager.cc
@@ -71,7 +71,7 @@ bool ShouldDropSyncCredential() {
std::string group_name =
base::FieldTrialList::FindFullName("PasswordManagerDropSyncCredential");
- CommandLine* command_line = CommandLine::ForCurrentProcess();
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kEnableDropSyncCredential))
return true;
diff --git a/components/password_manager/core/common/experiments.cc b/components/password_manager/core/common/experiments.cc
index 8a49e36..94fd32f 100644
--- a/components/password_manager/core/common/experiments.cc
+++ b/components/password_manager/core/common/experiments.cc
@@ -14,7 +14,7 @@ bool ManageAccountLinkExperimentEnabled() {
std::string group_name =
base::FieldTrialList::FindFullName("PasswordLinkInSettings");
- CommandLine* command_line = CommandLine::ForCurrentProcess();
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kDisablePasswordLink))
return false;
diff --git a/components/policy/core/browser/browser_policy_connector.cc b/components/policy/core/browser/browser_policy_connector.cc
index c057a8f..c476878 100644
--- a/components/policy/core/browser/browser_policy_connector.cc
+++ b/components/policy/core/browser/browser_policy_connector.cc
@@ -234,7 +234,7 @@ bool BrowserPolicyConnector::IsNonEnterpriseUser(const std::string& username) {
// static
std::string BrowserPolicyConnector::GetDeviceManagementUrl() {
- CommandLine* command_line = CommandLine::ForCurrentProcess();
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kDeviceManagementUrl))
return command_line->GetSwitchValueASCII(switches::kDeviceManagementUrl);
else
diff --git a/components/policy/core/common/cloud/cloud_policy_constants.cc b/components/policy/core/common/cloud/cloud_policy_constants.cc
index ef9fcfd..a87b135 100644
--- a/components/policy/core/common/cloud/cloud_policy_constants.cc
+++ b/components/policy/core/common/cloud/cloud_policy_constants.cc
@@ -88,7 +88,7 @@ const char kPolicyVerificationKeyHash[] = "1:356l7w";
std::string GetPolicyVerificationKey() {
// Disable key verification by default until production servers generate
// the proper signatures.
- CommandLine* command_line = CommandLine::ForCurrentProcess();
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kDisablePolicyKeyVerification)) {
return std::string();
} else {
@@ -99,7 +99,7 @@ std::string GetPolicyVerificationKey() {
const char* GetChromeUserPolicyType() {
#if defined(OS_ANDROID) || defined(OS_IOS)
- CommandLine* command_line = CommandLine::ForCurrentProcess();
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kFakeCloudPolicyType))
return "google/chrome/user";
#endif
diff --git a/components/policy/core/common/cloud/cloud_policy_manager.cc b/components/policy/core/common/cloud/cloud_policy_manager.cc
index 32ffbae..6ab0304 100644
--- a/components/policy/core/common/cloud/cloud_policy_manager.cc
+++ b/components/policy/core/common/cloud/cloud_policy_manager.cc
@@ -119,7 +119,7 @@ void CloudPolicyManager::CreateComponentCloudPolicyService(
// See the comments on ComponentCloudPolicyService for the details.
CHECK(!core()->client());
- if (CommandLine::ForCurrentProcess()->HasSwitch(
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableComponentCloudPolicy) ||
policy_cache_path.empty()) {
return;
diff --git a/components/precache/content/precache_manager.cc b/components/precache/content/precache_manager.cc
index 5fd21f1..62cf590 100644
--- a/components/precache/content/precache_manager.cc
+++ b/components/precache/content/precache_manager.cc
@@ -50,7 +50,8 @@ PrecacheManager::~PrecacheManager() {}
bool PrecacheManager::IsPrecachingEnabled() {
return base::FieldTrialList::FindFullName(kPrecacheFieldTrialName) ==
kPrecacheFieldTrialEnabledGroup ||
- CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnablePrecache);
+ base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnablePrecache);
}
bool PrecacheManager::IsPrecachingAllowed() {
diff --git a/components/precache/content/precache_manager_unittest.cc b/components/precache/content/precache_manager_unittest.cc
index 5517460..949ef43 100644
--- a/components/precache/content/precache_manager_unittest.cc
+++ b/components/precache/content/precache_manager_unittest.cc
@@ -143,9 +143,9 @@ class PrecacheManagerTest : public testing::Test {
void SetUp() override {
base::StatisticsRecorder::Initialize();
- CommandLine::ForCurrentProcess()->AppendSwitchASCII(
+ base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
switches::kPrecacheConfigSettingsURL, kConfigURL);
- CommandLine::ForCurrentProcess()->AppendSwitchASCII(
+ base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
switches::kPrecacheManifestURLPrefix, kManifestURLPrefix);
// Make the fetch of the precache configuration settings fail. Precaching
diff --git a/components/precache/core/precache_fetcher.cc b/components/precache/core/precache_fetcher.cc
index 70abac7..c854af8 100644
--- a/components/precache/core/precache_fetcher.cc
+++ b/components/precache/core/precache_fetcher.cc
@@ -27,7 +27,8 @@ namespace precache {
namespace {
GURL GetConfigURL() {
- const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ const base::CommandLine& command_line =
+ *base::CommandLine::ForCurrentProcess();
if (command_line.HasSwitch(switches::kPrecacheConfigSettingsURL)) {
return GURL(
command_line.GetSwitchValueASCII(switches::kPrecacheConfigSettingsURL));
@@ -43,7 +44,8 @@ GURL GetConfigURL() {
}
std::string GetManifestURLPrefix() {
- const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ const base::CommandLine& command_line =
+ *base::CommandLine::ForCurrentProcess();
if (command_line.HasSwitch(switches::kPrecacheManifestURLPrefix)) {
return command_line.GetSwitchValueASCII(
switches::kPrecacheManifestURLPrefix);
diff --git a/components/precache/core/precache_fetcher_unittest.cc b/components/precache/core/precache_fetcher_unittest.cc
index 999e51c..7788443 100644
--- a/components/precache/core/precache_fetcher_unittest.cc
+++ b/components/precache/core/precache_fetcher_unittest.cc
@@ -102,9 +102,9 @@ const char kForcedStartingURLManifestURL[] =
"http%253A%252F%252Fforced-starting-url.com%252F";
TEST_F(PrecacheFetcherTest, FullPrecache) {
- CommandLine::ForCurrentProcess()->AppendSwitchASCII(
+ base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
switches::kPrecacheConfigSettingsURL, kConfigURL);
- CommandLine::ForCurrentProcess()->AppendSwitchASCII(
+ base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
switches::kPrecacheManifestURLPrefix, kManfiestURLPrefix);
std::list<GURL> starting_urls;
@@ -164,7 +164,7 @@ TEST_F(PrecacheFetcherTest, FullPrecache) {
}
TEST_F(PrecacheFetcherTest, ConfigFetchFailure) {
- CommandLine::ForCurrentProcess()->AppendSwitchASCII(
+ base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
switches::kPrecacheConfigSettingsURL, kConfigURL);
std::list<GURL> starting_urls(1, GURL("http://starting-url.com"));
@@ -187,7 +187,7 @@ TEST_F(PrecacheFetcherTest, ConfigFetchFailure) {
}
TEST_F(PrecacheFetcherTest, BadConfig) {
- CommandLine::ForCurrentProcess()->AppendSwitchASCII(
+ base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
switches::kPrecacheConfigSettingsURL, kConfigURL);
std::list<GURL> starting_urls(1, GURL("http://starting-url.com"));
@@ -209,7 +209,7 @@ TEST_F(PrecacheFetcherTest, BadConfig) {
}
TEST_F(PrecacheFetcherTest, Cancel) {
- CommandLine::ForCurrentProcess()->AppendSwitchASCII(
+ base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
switches::kPrecacheConfigSettingsURL, kConfigURL);
std::list<GURL> starting_urls(1, GURL("http://starting-url.com"));
@@ -271,7 +271,7 @@ TEST_F(PrecacheFetcherTest, PrecacheUsingDefaultConfigSettingsURL) {
// If the default precache manifest URL prefix is defined, then test that it
// works with the PrecacheFetcher.
TEST_F(PrecacheFetcherTest, PrecacheUsingDefaultManifestURLPrefix) {
- CommandLine::ForCurrentProcess()->AppendSwitchASCII(
+ base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
switches::kPrecacheConfigSettingsURL, kConfigURL);
std::list<GURL> starting_urls(1, GURL("http://starting-url.com"));
diff --git a/components/proximity_auth/cryptauth/cryptauth_client.cc b/components/proximity_auth/cryptauth/cryptauth_client.cc
index 4919fa5..1d6426e 100644
--- a/components/proximity_auth/cryptauth/cryptauth_client.cc
+++ b/components/proximity_auth/cryptauth/cryptauth_client.cc
@@ -36,7 +36,7 @@ const char kQueryProtobuf[] = "?alt=proto";
// Creates the full CryptAuth URL for endpoint to the API with |request_path|.
GURL CreateRequestUrl(const std::string& request_path) {
- CommandLine* command_line = CommandLine::ForCurrentProcess();
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
GURL google_apis_url =
GURL(command_line->HasSwitch(switches::kCryptAuthHTTPHost)
? command_line->GetSwitchValueASCII(switches::kCryptAuthHTTPHost)
diff --git a/components/search/search.cc b/components/search/search.cc
index d7e7276..c2d4b4e 100644
--- a/components/search/search.cc
+++ b/components/search/search.cc
@@ -67,8 +67,8 @@ bool IsInstantExtendedAPIEnabled() {
// default search provider. If 0, the embedded search UI should not be enabled.
uint64 EmbeddedSearchPageVersion() {
#if defined(OS_ANDROID)
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableEmbeddedSearchAPI)) {
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableEmbeddedSearchAPI)) {
return kEmbeddedSearchEnabledVersion;
}
#endif
diff --git a/components/search/search_android_unittest.cc b/components/search/search_android_unittest.cc
index 9c67edff..772daaf 100644
--- a/components/search/search_android_unittest.cc
+++ b/components/search/search_android_unittest.cc
@@ -19,7 +19,7 @@ namespace {
TEST(SearchTest, EmbeddedSearchAPIEnabled) {
EXPECT_EQ(1ul, EmbeddedSearchPageVersion());
EXPECT_FALSE(IsInstantExtendedAPIEnabled());
- CommandLine::ForCurrentProcess()->AppendSwitch(
+ base::CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kEnableEmbeddedSearchAPI);
EXPECT_EQ(2ul, EmbeddedSearchPageVersion());
EXPECT_TRUE(IsInstantExtendedAPIEnabled());
diff --git a/components/search_engines/template_url.cc b/components/search_engines/template_url.cc
index b0e5b27..f960485 100644
--- a/components/search_engines/template_url.cc
+++ b/components/search_engines/template_url.cc
@@ -356,7 +356,7 @@ std::string TemplateURLRef::ReplaceSearchTerms(
std::vector<std::string> query_params;
if (search_terms_args.append_extra_query_params) {
std::string extra_params(
- CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
switches::kExtraSearchQueryParams));
if (!extra_params.empty())
query_params.push_back(extra_params);
diff --git a/components/search_engines/template_url_prepopulate_data_unittest.cc b/components/search_engines/template_url_prepopulate_data_unittest.cc
index 49eca46..15f3b8b 100644
--- a/components/search_engines/template_url_prepopulate_data_unittest.cc
+++ b/components/search_engines/template_url_prepopulate_data_unittest.cc
@@ -343,7 +343,7 @@ TEST_F(TemplateURLPrepopulateDataTest, GetEngineTypeAdvanced) {
// specified on the command line.
const std::string foo_url("http://www.foo.com/search?q={searchTerms}");
EXPECT_EQ(SEARCH_ENGINE_OTHER, GetEngineType(foo_url));
- CommandLine::ForCurrentProcess()->AppendSwitchASCII(switches::kGoogleBaseURL,
- "http://www.foo.com/");
+ base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
+ switches::kGoogleBaseURL, "http://www.foo.com/");
EXPECT_EQ(SEARCH_ENGINE_GOOGLE, GetEngineType(foo_url));
}
diff --git a/components/search_engines/template_url_unittest.cc b/components/search_engines/template_url_unittest.cc
index 5557832..b16e7b4 100644
--- a/components/search_engines/template_url_unittest.cc
+++ b/components/search_engines/template_url_unittest.cc
@@ -1247,7 +1247,7 @@ TEST_F(TemplateURLTest, SuggestQueryParams) {
// Add extra_query_params in the mix, and ensure it works.
search_terms.append_extra_query_params = true;
- CommandLine::ForCurrentProcess()->AppendSwitchASCII(
+ base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
switches::kExtraSearchQueryParams, "a=b");
EXPECT_EQ("http://www.google.com/search?a=b&pq=xyz&q=abc#oq=def&x",
url.url_ref().ReplaceSearchTerms(search_terms, search_terms_data_));
@@ -1276,7 +1276,7 @@ TEST_F(TemplateURLTest, ExtraQueryParams) {
url.url_ref().ReplaceSearchTerms(search_terms, search_terms_data_));
// Now append the command-line arg. This should be inserted into the query.
- CommandLine::ForCurrentProcess()->AppendSwitchASCII(
+ base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
switches::kExtraSearchQueryParams, "a=b");
EXPECT_EQ("http://www.google.com/search?a=b&q=abc#oq=def&x",
url.url_ref().ReplaceSearchTerms(search_terms, search_terms_data_));
diff --git a/components/session_manager/core/session_manager.cc b/components/session_manager/core/session_manager.cc
index f86de43..fe4669c 100644
--- a/components/session_manager/core/session_manager.cc
+++ b/components/session_manager/core/session_manager.cc
@@ -61,7 +61,7 @@ void SessionManager::Start() {
// static
bool SessionManager::HasBrowserRestarted() {
#if defined(OS_CHROMEOS)
- CommandLine* command_line = CommandLine::ForCurrentProcess();
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
return base::SysInfo::IsRunningOnChromeOS() &&
command_line->HasSwitch(chromeos::switches::kLoginUser);
#else
diff --git a/components/signin/core/browser/account_tracker_service.cc b/components/signin/core/browser/account_tracker_service.cc
index ba3a3fe..480886b 100644
--- a/components/signin/core/browser/account_tracker_service.cc
+++ b/components/signin/core/browser/account_tracker_service.cc
@@ -512,7 +512,7 @@ void AccountTrackerService::SendRefreshTokenAnnotationRequest(
// We only need to send RefreshTokenAnnotationRequest from desktop platforms.
#if !defined(OS_ANDROID) && !defined(OS_IOS)
if (IsRefreshTokenDeviceIdExperimentEnabled() ||
- CommandLine::ForCurrentProcess()->HasSwitch(
+ base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableRefreshTokenAnnotationRequest)) {
scoped_ptr<RefreshTokenAnnotationRequest> request =
RefreshTokenAnnotationRequest::SendIfNeeded(
diff --git a/components/signin/core/browser/signin_manager_base.cc b/components/signin/core/browser/signin_manager_base.cc
index 8ef3929..02cf480 100644
--- a/components/signin/core/browser/signin_manager_base.cc
+++ b/components/signin/core/browser/signin_manager_base.cc
@@ -36,7 +36,7 @@ void SigninManagerBase::Initialize(PrefService* local_state) {
// If the user is clearing the token service from the command line, then
// clear their login info also (not valid to be logged in without any
// tokens).
- CommandLine* cmd_line = CommandLine::ForCurrentProcess();
+ base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
if (cmd_line->HasSwitch(switches::kClearTokenService))
client_->GetPrefs()->ClearPref(prefs::kGoogleServicesUsername);
diff --git a/components/signin/core/common/profile_management_switches.cc b/components/signin/core/common/profile_management_switches.cc
index a696753..6d7b089 100644
--- a/components/signin/core/common/profile_management_switches.cc
+++ b/components/signin/core/common/profile_management_switches.cc
@@ -31,23 +31,21 @@ State GetProcessState() {
return STATE_OLD_AVATAR_MENU;
// Find the state of both command line args.
- bool is_new_avatar_menu =
- CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableNewAvatarMenu);
+ bool is_new_avatar_menu = base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableNewAvatarMenu);
bool is_new_profile_management =
- CommandLine::ForCurrentProcess()->HasSwitch(
+ base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableNewProfileManagement);
bool is_consistent_identity =
- CommandLine::ForCurrentProcess()->HasSwitch(
+ base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableAccountConsistency);
- bool not_new_avatar_menu =
- CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisableNewAvatarMenu);
+ bool not_new_avatar_menu = base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableNewAvatarMenu);
bool not_new_profile_management =
- CommandLine::ForCurrentProcess()->HasSwitch(
+ base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableNewProfileManagement);
bool not_consistent_identity =
- CommandLine::ForCurrentProcess()->HasSwitch(
+ base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableAccountConsistency);
int count_args = (is_new_avatar_menu ? 1 : 0) +
(is_new_profile_management ? 1 : 0) +
@@ -116,7 +114,7 @@ State GetProcessState() {
bool CheckFlag(std::string command_switch, State min_state) {
// Individiual flag settings take precedence.
- if (CommandLine::ForCurrentProcess()->HasSwitch(command_switch))
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(command_switch))
return true;
return GetProcessState() >= min_state;
@@ -131,12 +129,13 @@ bool IsEnableAccountConsistency() {
}
bool IsEnableWebBasedSignin() {
- return CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableWebBasedSignin) && !IsEnableWebviewBasedSignin();
+ return base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableWebBasedSignin) &&
+ !IsEnableWebviewBasedSignin();
}
bool IsEnableWebviewBasedSignin() {
- return CommandLine::ForCurrentProcess()->HasSwitch(
+ return base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableWebviewBasedSignin);
}
@@ -146,7 +145,7 @@ bool IsExtensionsMultiAccount() {
}
bool IsFastUserSwitching() {
- return CommandLine::ForCurrentProcess()->HasSwitch(
+ return base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kFastUserSwitching);
}
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();
diff --git a/components/user_manager/user_manager_base.cc b/components/user_manager/user_manager_base.cc
index 53c6452..08f5a07 100644
--- a/components/user_manager/user_manager_base.cc
+++ b/components/user_manager/user_manager_base.cc
@@ -1038,7 +1038,7 @@ void UserManagerBase::SetLRUUser(User* user) {
void UserManagerBase::SendGaiaUserLoginMetrics(const std::string& user_id) {
// If this isn't the first time Chrome was run after the system booted,
// assume that Chrome was restarted because a previous session ended.
- if (!CommandLine::ForCurrentProcess()->HasSwitch(
+ if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
chromeos::switches::kFirstExecAfterBoot)) {
const std::string last_email =
GetLocalState()->GetString(kLastLoggedInGaiaUser);
diff --git a/components/variations/variations_seed_processor.cc b/components/variations/variations_seed_processor.cc
index 9d2057f3..829669b 100644
--- a/components/variations/variations_seed_processor.cc
+++ b/components/variations/variations_seed_processor.cc
@@ -103,7 +103,7 @@ void VariationsSeedProcessor::CreateTrialFromStudy(
// Check if any experiments need to be forced due to a command line
// flag. Force the first experiment with an existing flag.
- CommandLine* command_line = CommandLine::ForCurrentProcess();
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
for (int i = 0; i < study.experiment_size(); ++i) {
const Study_Experiment& experiment = study.experiment(i);
if (experiment.has_forcing_flag() &&
diff --git a/components/variations/variations_seed_processor_unittest.cc b/components/variations/variations_seed_processor_unittest.cc
index 4252ca9..d1f76cc 100644
--- a/components/variations/variations_seed_processor_unittest.cc
+++ b/components/variations/variations_seed_processor_unittest.cc
@@ -136,7 +136,7 @@ class VariationsSeedProcessorTest : public ::testing::Test {
};
TEST_F(VariationsSeedProcessorTest, AllowForceGroupAndVariationId) {
- CommandLine::ForCurrentProcess()->AppendSwitch(kForcingFlag1);
+ base::CommandLine::ForCurrentProcess()->AppendSwitch(kForcingFlag1);
base::FieldTrialList field_trial_list(NULL);
@@ -154,7 +154,7 @@ TEST_F(VariationsSeedProcessorTest, AllowForceGroupAndVariationId) {
// Test that the group for kForcingFlag1 is forced.
TEST_F(VariationsSeedProcessorTest, ForceGroupWithFlag1) {
- CommandLine::ForCurrentProcess()->AppendSwitch(kForcingFlag1);
+ base::CommandLine::ForCurrentProcess()->AppendSwitch(kForcingFlag1);
base::FieldTrialList field_trial_list(NULL);
@@ -166,7 +166,7 @@ TEST_F(VariationsSeedProcessorTest, ForceGroupWithFlag1) {
// Test that the group for kForcingFlag2 is forced.
TEST_F(VariationsSeedProcessorTest, ForceGroupWithFlag2) {
- CommandLine::ForCurrentProcess()->AppendSwitch(kForcingFlag2);
+ base::CommandLine::ForCurrentProcess()->AppendSwitch(kForcingFlag2);
base::FieldTrialList field_trial_list(NULL);
@@ -178,8 +178,8 @@ TEST_F(VariationsSeedProcessorTest, ForceGroupWithFlag2) {
TEST_F(VariationsSeedProcessorTest, ForceGroup_ChooseFirstGroupWithFlag) {
// Add the flag to the command line arguments so the flag group is forced.
- CommandLine::ForCurrentProcess()->AppendSwitch(kForcingFlag1);
- CommandLine::ForCurrentProcess()->AppendSwitch(kForcingFlag2);
+ base::CommandLine::ForCurrentProcess()->AppendSwitch(kForcingFlag1);
+ base::CommandLine::ForCurrentProcess()->AppendSwitch(kForcingFlag2);
base::FieldTrialList field_trial_list(NULL);
@@ -303,7 +303,7 @@ TEST_F(VariationsSeedProcessorTest, OverrideUIStringsWithForcingFlag) {
override->set_name_hash(1234);
override->set_value("test");
- CommandLine::ForCurrentProcess()->AppendSwitch(kForcingFlag1);
+ base::CommandLine::ForCurrentProcess()->AppendSwitch(kForcingFlag1);
base::FieldTrialList field_trial_list(NULL);
EXPECT_TRUE(CreateTrialFromStudy(&study));
EXPECT_EQ(kFlagGroup1Name, base::FieldTrialList::FindFullName(study.name()));
@@ -391,7 +391,7 @@ TEST_F(VariationsSeedProcessorTest, VariationParamsWithForcingFlag) {
param->set_name("x");
param->set_value("y");
- CommandLine::ForCurrentProcess()->AppendSwitch(kForcingFlag1);
+ base::CommandLine::ForCurrentProcess()->AppendSwitch(kForcingFlag1);
base::FieldTrialList field_trial_list(NULL);
EXPECT_TRUE(CreateTrialFromStudy(&study));
EXPECT_EQ(kFlagGroup1Name, base::FieldTrialList::FindFullName(study.name()));
@@ -449,7 +449,7 @@ TEST_F(VariationsSeedProcessorTest, StartsActive) {
}
TEST_F(VariationsSeedProcessorTest, StartsActiveWithFlag) {
- CommandLine::ForCurrentProcess()->AppendSwitch(kForcingFlag1);
+ base::CommandLine::ForCurrentProcess()->AppendSwitch(kForcingFlag1);
base::FieldTrialList field_trial_list(NULL);
@@ -474,7 +474,7 @@ TEST_F(VariationsSeedProcessorTest, ForcingFlagAlreadyForced) {
base::FieldTrialList field_trial_list(NULL);
base::FieldTrialList::CreateFieldTrial(kFlagStudyName, kNonFlagGroupName);
- CommandLine::ForCurrentProcess()->AppendSwitch(kForcingFlag1);
+ base::CommandLine::ForCurrentProcess()->AppendSwitch(kForcingFlag1);
EXPECT_TRUE(CreateTrialFromStudy(&study));
// The previously forced experiment should still hold.
EXPECT_EQ(kNonFlagGroupName,
diff --git a/components/wallpaper/wallpaper_manager_base.cc b/components/wallpaper/wallpaper_manager_base.cc
index 3aca779..bad455a 100644
--- a/components/wallpaper/wallpaper_manager_base.cc
+++ b/components/wallpaper/wallpaper_manager_base.cc
@@ -759,10 +759,10 @@ void WallpaperManagerBase::SetCommandLineForTesting(
SetDefaultWallpaperPathsFromCommandLine(command_line);
}
-CommandLine* WallpaperManagerBase::GetCommandLine() {
- CommandLine* command_line = command_line_for_testing_
- ? command_line_for_testing_
- : CommandLine::ForCurrentProcess();
+base::CommandLine* WallpaperManagerBase::GetCommandLine() {
+ base::CommandLine* command_line =
+ command_line_for_testing_ ? command_line_for_testing_
+ : base::CommandLine::ForCurrentProcess();
return command_line;
}
diff --git a/components/web_resource/resource_request_allowed_notifier.cc b/components/web_resource/resource_request_allowed_notifier.cc
index 2192943..4842a43 100644
--- a/components/web_resource/resource_request_allowed_notifier.cc
+++ b/components/web_resource/resource_request_allowed_notifier.cc
@@ -44,7 +44,8 @@ void ResourceRequestAllowedNotifier::Init(Observer* observer) {
ResourceRequestAllowedNotifier::State
ResourceRequestAllowedNotifier::GetResourceRequestsAllowedState() {
if (disable_network_switch_ &&
- CommandLine::ForCurrentProcess()->HasSwitch(disable_network_switch_)) {
+ base::CommandLine::ForCurrentProcess()->HasSwitch(
+ disable_network_switch_)) {
return DISALLOWED_COMMAND_LINE_DISABLED;
}
diff --git a/components/wifi/wifi_test.cc b/components/wifi/wifi_test.cc
index 84c4f0a..2fa07c3 100644
--- a/components/wifi/wifi_test.cc
+++ b/components/wifi/wifi_test.cc
@@ -105,8 +105,9 @@ WiFiTest::Result WiFiTest::Main(int argc, const char* argv[]) {
}
bool WiFiTest::ParseCommandLine(int argc, const char* argv[]) {
- CommandLine::Init(argc, argv);
- const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
+ base::CommandLine::Init(argc, argv);
+ const base::CommandLine& parsed_command_line =
+ *base::CommandLine::ForCurrentProcess();
std::string network_guid =
parsed_command_line.GetSwitchValueASCII("network_guid");
std::string frequency =
@@ -237,7 +238,7 @@ bool WiFiTest::ParseCommandLine(int argc, const char* argv[]) {
} // namespace wifi
int main(int argc, const char* argv[]) {
- CommandLine::Init(argc, argv);
+ base::CommandLine::Init(argc, argv);
logging::LoggingSettings settings;
settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
logging::InitLogging(settings);