summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoravi <avi@chromium.org>2014-12-22 12:54:48 -0800
committerCommit bot <commit-bot@chromium.org>2014-12-22 20:55:44 +0000
commitf38ab65ea940c2c3bc56a1eab38d61a1802a79cd (patch)
tree30caccf8bd86c71fab184578f1c5dcbdd98aeb2d
parent9a3381c7761c03a5aba2a7703a759dcc9b8b6d8b (diff)
downloadchromium_src-f38ab65ea940c2c3bc56a1eab38d61a1802a79cd.zip
chromium_src-f38ab65ea940c2c3bc56a1eab38d61a1802a79cd.tar.gz
chromium_src-f38ab65ea940c2c3bc56a1eab38d61a1802a79cd.tar.bz2
Make callers of CommandLine use it via the base:: namespace.
Covers android_webview/, ash/, athena/, chromeos/. BUG=422426 TEST=none TBR=ben@chromium.org Review URL: https://codereview.chromium.org/825473002 Cr-Commit-Position: refs/heads/master@{#309459}
-rw-r--r--android_webview/lib/main/webview_tests.cc3
-rw-r--r--ash/virtual_keyboard_controller.cc2
-rw-r--r--ash/virtual_keyboard_controller_unittest.cc2
-rw-r--r--athena/content/web_activity.cc5
-rw-r--r--chromeos/dbus/dbus_client_bundle.cc2
-rw-r--r--chromeos/dbus/dbus_thread_manager.cc8
-rw-r--r--chromeos/dbus/fake_shill_manager_client.cc2
-rw-r--r--chromeos/dbus/fake_sms_client.cc4
-rw-r--r--chromeos/dbus/power_manager_client.cc2
-rw-r--r--chromeos/dbus/update_engine_client.cc3
-rw-r--r--chromeos/login/login_state.cc3
-rw-r--r--chromeos/network/network_sms_handler_unittest.cc2
-rw-r--r--chromeos/process_proxy/process_proxy.cc4
-rw-r--r--chromeos/settings/cros_settings_provider.cc3
-rw-r--r--chromeos/system/statistics_provider.cc4
-rw-r--r--chromeos/tools/onc_validator/onc_validator.cc7
16 files changed, 31 insertions, 25 deletions
diff --git a/android_webview/lib/main/webview_tests.cc b/android_webview/lib/main/webview_tests.cc
index 0fe4b6b..ec849c8 100644
--- a/android_webview/lib/main/webview_tests.cc
+++ b/android_webview/lib/main/webview_tests.cc
@@ -11,7 +11,8 @@
int main(int argc, char** argv) {
android_webview::RegisterJni(base::android::AttachCurrentThread());
- CommandLine::ForCurrentProcess()->AppendSwitch(switches::kSingleProcess);
+ base::CommandLine::ForCurrentProcess()->AppendSwitch(
+ switches::kSingleProcess);
gfx::GLSurface::InitializeOneOffForTests();
return base::TestSuite(argc, argv).Run();
}
diff --git a/ash/virtual_keyboard_controller.cc b/ash/virtual_keyboard_controller.cc
index a078157..188a10f 100644
--- a/ash/virtual_keyboard_controller.cc
+++ b/ash/virtual_keyboard_controller.cc
@@ -23,7 +23,7 @@ namespace {
// Checks whether smart deployment is enabled.
bool IsSmartVirtualKeyboardEnabled() {
- return !CommandLine::ForCurrentProcess()->HasSwitch(
+ return !base::CommandLine::ForCurrentProcess()->HasSwitch(
keyboard::switches::kDisableSmartVirtualKeyboard);
}
diff --git a/ash/virtual_keyboard_controller_unittest.cc b/ash/virtual_keyboard_controller_unittest.cc
index 6b57a50..ef27108 100644
--- a/ash/virtual_keyboard_controller_unittest.cc
+++ b/ash/virtual_keyboard_controller_unittest.cc
@@ -40,7 +40,7 @@ class VirtualKeyboardControllerTest : public AshTestBase {
}
void SetUp() override {
- CommandLine::ForCurrentProcess()->AppendSwitch(
+ base::CommandLine::ForCurrentProcess()->AppendSwitch(
keyboard::switches::kDisableSmartVirtualKeyboard);
AshTestBase::SetUp();
UpdateKeyboardDevices(std::vector<ui::KeyboardDevice>());
diff --git a/athena/content/web_activity.cc b/athena/content/web_activity.cc
index d5f1c29..3944af3 100644
--- a/athena/content/web_activity.cc
+++ b/athena/content/web_activity.cc
@@ -269,8 +269,9 @@ class AthenaWebView : public views::WebView {
}
bool CanOverscrollContent() const override {
- const std::string value = CommandLine::ForCurrentProcess()->
- GetSwitchValueASCII(switches::kOverscrollHistoryNavigation);
+ const std::string value =
+ base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ switches::kOverscrollHistoryNavigation);
return value != "0";
}
diff --git a/chromeos/dbus/dbus_client_bundle.cc b/chromeos/dbus/dbus_client_bundle.cc
index 1293f84..f80e2d29 100644
--- a/chromeos/dbus/dbus_client_bundle.cc
+++ b/chromeos/dbus/dbus_client_bundle.cc
@@ -222,7 +222,7 @@ DBusClientBundle::DBusClientBundle(DBusClientTypeMask unstub_client_mask)
} else {
FakeGsmSMSClient* gsm_sms_client = new FakeGsmSMSClient();
gsm_sms_client->set_sms_test_message_switch_present(
- CommandLine::ForCurrentProcess()->HasSwitch(
+ base::CommandLine::ForCurrentProcess()->HasSwitch(
chromeos::switches::kSmsTestMessages));
gsm_sms_client_.reset(gsm_sms_client);
}
diff --git a/chromeos/dbus/dbus_thread_manager.cc b/chromeos/dbus/dbus_thread_manager.cc
index a42a7b0..fdcc202 100644
--- a/chromeos/dbus/dbus_thread_manager.cc
+++ b/chromeos/dbus/dbus_thread_manager.cc
@@ -354,14 +354,14 @@ void DBusThreadManager::Initialize() {
CHECK(!g_dbus_thread_manager);
bool use_dbus_stub = !base::SysInfo::IsRunningOnChromeOS() ||
- CommandLine::ForCurrentProcess()->HasSwitch(
- chromeos::switches::kDbusStub);
- bool force_unstub_clients = CommandLine::ForCurrentProcess()->HasSwitch(
+ base::CommandLine::ForCurrentProcess()->HasSwitch(
+ chromeos::switches::kDbusStub);
+ bool force_unstub_clients = base::CommandLine::ForCurrentProcess()->HasSwitch(
chromeos::switches::kDbusUnstubClients);
// Determine whether we use stub or real client implementations.
if (force_unstub_clients) {
InitializeWithPartialStub(
- CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
chromeos::switches::kDbusUnstubClients));
} else if (use_dbus_stub) {
InitializeWithStubs();
diff --git a/chromeos/dbus/fake_shill_manager_client.cc b/chromeos/dbus/fake_shill_manager_client.cc
index 2ef8327..7a8e633 100644
--- a/chromeos/dbus/fake_shill_manager_client.cc
+++ b/chromeos/dbus/fake_shill_manager_client.cc
@@ -977,7 +977,7 @@ void FakeShillManagerClient::ParseCommandLineSwitch() {
SetInitialNetworkState(shill::kTypeVPN, shill::kStateIdle);
// Parse additional options
- CommandLine* command_line = CommandLine::ForCurrentProcess();
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
if (!command_line->HasSwitch(switches::kShillStub))
return;
diff --git a/chromeos/dbus/fake_sms_client.cc b/chromeos/dbus/fake_sms_client.cc
index eb3c8ab..6f2c996 100644
--- a/chromeos/dbus/fake_sms_client.cc
+++ b/chromeos/dbus/fake_sms_client.cc
@@ -26,8 +26,8 @@ void FakeSMSClient::Init(dbus::Bus* bus) {}
void FakeSMSClient::GetAll(const std::string& service_name,
const dbus::ObjectPath& object_path,
const GetAllCallback& callback) {
- if (!CommandLine::ForCurrentProcess()->HasSwitch(
- chromeos::switches::kSmsTestMessages))
+ if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
+ chromeos::switches::kSmsTestMessages))
return;
// Ownership passed to callback
diff --git a/chromeos/dbus/power_manager_client.cc b/chromeos/dbus/power_manager_client.cc
index d1c9f2c..374af7f 100644
--- a/chromeos/dbus/power_manager_client.cc
+++ b/chromeos/dbus/power_manager_client.cc
@@ -957,7 +957,7 @@ class PowerManagerClientStubImpl : public PowerManagerClient {
}
void ParseCommandLineSwitch() {
- CommandLine* command_line = CommandLine::ForCurrentProcess();
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
if (!command_line || !command_line->HasSwitch(switches::kPowerStub))
return;
std::string option_str =
diff --git a/chromeos/dbus/update_engine_client.cc b/chromeos/dbus/update_engine_client.cc
index 19f3e06..321b247 100644
--- a/chromeos/dbus/update_engine_client.cc
+++ b/chromeos/dbus/update_engine_client.cc
@@ -564,7 +564,8 @@ UpdateEngineClient* UpdateEngineClient::Create(
if (type == REAL_DBUS_CLIENT_IMPLEMENTATION)
return new UpdateEngineClientImpl();
DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type);
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestAutoUpdateUI))
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kTestAutoUpdateUI))
return new UpdateEngineClientFakeImpl();
else
return new UpdateEngineClientStubImpl();
diff --git a/chromeos/login/login_state.cc b/chromeos/login/login_state.cc
index 04f72a3..ae8403c 100644
--- a/chromeos/login/login_state.cc
+++ b/chromeos/login/login_state.cc
@@ -19,7 +19,8 @@ namespace {
// logged in.
bool AlwaysLoggedInByDefault() {
return !base::SysInfo::IsRunningOnChromeOS() &&
- !CommandLine::ForCurrentProcess()->HasSwitch(switches::kLoginManager);
+ !base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kLoginManager);
}
} // namespace
diff --git a/chromeos/network/network_sms_handler_unittest.cc b/chromeos/network/network_sms_handler_unittest.cc
index 199e70f..8550b60 100644
--- a/chromeos/network/network_sms_handler_unittest.cc
+++ b/chromeos/network/network_sms_handler_unittest.cc
@@ -56,7 +56,7 @@ class NetworkSmsHandlerTest : public testing::Test {
virtual void SetUp() override {
// Append '--sms-test-messages' to the command line to tell
// SMSClientStubImpl to generate a series of test SMS messages.
- CommandLine* command_line = CommandLine::ForCurrentProcess();
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
command_line->AppendSwitch(chromeos::switches::kSmsTestMessages);
// Initialize DBusThreadManager with a stub implementation.
diff --git a/chromeos/process_proxy/process_proxy.cc b/chromeos/process_proxy/process_proxy.cc
index b1021f4..913f074 100644
--- a/chromeos/process_proxy/process_proxy.cc
+++ b/chromeos/process_proxy/process_proxy.cc
@@ -231,8 +231,8 @@ bool ProcessProxy::LaunchProcess(const std::string& command, int slave_fd,
options.environ["TERM"] = "xterm";
// Launch the process.
- return base::LaunchProcess(CommandLine(base::FilePath(command)), options,
- pid);
+ return base::LaunchProcess(base::CommandLine(base::FilePath(command)),
+ options, pid);
}
void ProcessProxy::CloseAllFdPairs() {
diff --git a/chromeos/settings/cros_settings_provider.cc b/chromeos/settings/cros_settings_provider.cc
index 66ca64c..98faf71 100644
--- a/chromeos/settings/cros_settings_provider.cc
+++ b/chromeos/settings/cros_settings_provider.cc
@@ -25,7 +25,8 @@ void CrosSettingsProvider::Set(const std::string& path,
// We don't allow changing any of the cros settings without prefix
// "cros.session." in the guest mode.
// It should not reach here from UI in the guest mode, but just in case.
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession) &&
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kGuestSession) &&
!::StartsWithASCII(path, "cros.session.", true)) {
LOG(ERROR) << "Ignoring the guest request to change: " << path;
return;
diff --git a/chromeos/system/statistics_provider.cc b/chromeos/system/statistics_provider.cc
index e533dd7..7ac8863 100644
--- a/chromeos/system/statistics_provider.cc
+++ b/chromeos/system/statistics_provider.cc
@@ -62,7 +62,7 @@ const char kVpdDelim[] = "\n";
const int kTimeoutSecs = 3;
// The location of OEM manifest file used to trigger OOBE flow for kiosk mode.
-const CommandLine::CharType kOemManifestFilePath[] =
+const base::CommandLine::CharType kOemManifestFilePath[] =
FILE_PATH_LITERAL("/usr/share/oem/oobe/manifest.json");
} // namespace
@@ -298,7 +298,7 @@ void StatisticsProviderImpl::LoadMachineStatistics(bool load_oem_manifest) {
if (load_oem_manifest) {
// If kAppOemManifestFile switch is specified, load OEM Manifest file.
- CommandLine* command_line = CommandLine::ForCurrentProcess();
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kAppOemManifestFile)) {
LoadOemManifestFromFile(
command_line->GetSwitchValuePath(switches::kAppOemManifestFile));
diff --git a/chromeos/tools/onc_validator/onc_validator.cc b/chromeos/tools/onc_validator/onc_validator.cc
index fab8b4a..d47597e 100644
--- a/chromeos/tools/onc_validator/onc_validator.cc
+++ b/chromeos/tools/onc_validator/onc_validator.cc
@@ -107,10 +107,11 @@ scoped_ptr<base::DictionaryValue> ReadDictionary(std::string filename) {
}
int main(int argc, const char* argv[]) {
- CommandLine::Init(argc, argv);
+ base::CommandLine::Init(argc, argv);
- const CommandLine& command_line = *CommandLine::ForCurrentProcess();
- CommandLine::StringVector args = command_line.GetArgs();
+ const base::CommandLine& command_line =
+ *base::CommandLine::ForCurrentProcess();
+ base::CommandLine::StringVector args = command_line.GetArgs();
if (args.size() != 2) {
PrintHelp();
return kStatusArgumentError;