summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoravi <avi@chromium.org>2014-12-22 15:49:53 -0800
committerCommit bot <commit-bot@chromium.org>2014-12-22 23:50:37 +0000
commit9ab037205876578d14c5686f491c37bab680eccb (patch)
tree0ab316d7023d4e6bc6243734f5407ac01a8a8f06
parentfdb146cf261d909613a1d1b11e70d0ba96280ffe (diff)
downloadchromium_src-9ab037205876578d14c5686f491c37bab680eccb.zip
chromium_src-9ab037205876578d14c5686f491c37bab680eccb.tar.gz
chromium_src-9ab037205876578d14c5686f491c37bab680eccb.tar.bz2
Make callers of CommandLine use it via the base:: namespace.
Covers courgette/, dbus/, device/, extensions/, gin/, google_apis/, and gpu/. BUG=422426 TEST=none TBR=ben@chromium.org Review URL: https://codereview.chromium.org/819193002 Cr-Commit-Position: refs/heads/master@{#309490}
-rw-r--r--courgette/courgette_tool.cc7
-rw-r--r--dbus/test_server.cc2
-rw-r--r--device/test/usb_test_gadget_impl.cc2
-rw-r--r--extensions/browser/api/app_window/app_window_api.cc2
-rw-r--r--extensions/browser/api/bluetooth/bluetooth_private_apitest.cc2
-rw-r--r--extensions/browser/api/cast_channel/cast_channel_apitest.cc2
-rw-r--r--extensions/browser/api/test/test_api.cc2
-rw-r--r--extensions/browser/app_window/app_window.cc9
-rw-r--r--extensions/browser/extension_prefs_factory.cc3
-rw-r--r--extensions/common/extension.cc4
-rw-r--r--extensions/common/feature_switch.cc6
-rw-r--r--extensions/common/features/simple_feature.cc4
-rw-r--r--extensions/common/manifest_handlers/background_info.cc4
-rw-r--r--extensions/common/manifest_handlers/permissions_parser.cc2
-rw-r--r--extensions/common/user_script.cc4
-rw-r--r--extensions/renderer/app_window_custom_bindings.cc4
-rw-r--r--extensions/renderer/dispatcher.cc5
-rw-r--r--extensions/renderer/process_info_native_handler.cc2
-rw-r--r--extensions/shell/app/shell_main_delegate.cc2
-rw-r--r--extensions/shell/browser/default_shell_browser_main_delegate.cc7
-rw-r--r--extensions/shell/browser/shell_browser_main_parts.cc4
-rw-r--r--extensions/shell/browser/shell_content_browser_client.cc9
-rw-r--r--gin/shell/gin_main.cc7
-rw-r--r--gin/shell/gin_shell_unittest.cc2
-rw-r--r--google_apis/gaia/gaia_urls.cc2
-rw-r--r--google_apis/gcm/tools/mcs_probe.cc11
-rw-r--r--google_apis/google_api_keys.cc4
-rw-r--r--gpu/angle_end2end_tests_main.cc2
-rw-r--r--gpu/angle_unittest_main.cc2
-rw-r--r--gpu/command_buffer/client/gles2_implementation.cc2
-rw-r--r--gpu/command_buffer/common/unittest_main.cc2
-rw-r--r--gpu/command_buffer/service/async_pixel_transfer_manager_linux.cc2
-rw-r--r--gpu/command_buffer/service/context_group.cc2
-rw-r--r--gpu/command_buffer/service/feature_info.cc6
-rw-r--r--gpu/command_buffer/service/feature_info_unittest.cc13
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder.cc25
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc2
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc2
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc2
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc4
-rw-r--r--gpu/command_buffer/service/logger.cc2
-rw-r--r--gpu/command_buffer/service/memory_program_cache.cc7
-rw-r--r--gpu/command_buffer/service/program_manager.cc8
-rw-r--r--gpu/command_buffer/service/shader_translator.cc4
-rw-r--r--gpu/command_buffer/tests/gl_clear_framebuffer_unittest.cc2
-rw-r--r--gpu/command_buffer/tests/gl_tests_main.cc4
-rw-r--r--gpu/config/gpu_driver_bug_list.cc3
-rw-r--r--gpu/config/gpu_driver_bug_list.h3
-rw-r--r--gpu/config/gpu_info_collector_linux.cc2
-rw-r--r--gpu/config/gpu_info_collector_win.cc5
-rw-r--r--gpu/config/gpu_util.cc6
-rw-r--r--gpu/gles2_conform_support/egl/egl.cc2
-rw-r--r--gpu/gles2_conform_support/gles2_conform_test.cc6
-rw-r--r--gpu/gles2_conform_support/native/main.cc6
-rw-r--r--gpu/khronos_glcts_support/khronos_glcts_test.cc2
-rw-r--r--gpu/khronos_glcts_support/native/main.cc2
-rw-r--r--gpu/tools/compositor_model_bench/compositor_model_bench.cc4
57 files changed, 129 insertions, 119 deletions
diff --git a/courgette/courgette_tool.cc b/courgette/courgette_tool.cc
index a756987..962e078 100644
--- a/courgette/courgette_tool.cc
+++ b/courgette/courgette_tool.cc
@@ -426,8 +426,9 @@ void ApplyBSDiffPatch(const base::FilePath& old_file,
int main(int argc, const char* argv[]) {
base::AtExitManager at_exit_manager;
- CommandLine::Init(argc, argv);
- const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ base::CommandLine::Init(argc, argv);
+ const base::CommandLine& command_line =
+ *base::CommandLine::ForCurrentProcess();
logging::LoggingSettings settings;
settings.logging_dest = logging::LOG_TO_ALL;
@@ -447,7 +448,7 @@ int main(int argc, const char* argv[]) {
bool cmd_spread_1_unadjusted = command_line.HasSwitch("gen1u");
std::vector<base::FilePath> values;
- const CommandLine::StringVector& args = command_line.GetArgs();
+ const base::CommandLine::StringVector& args = command_line.GetArgs();
for (size_t i = 0; i < args.size(); ++i) {
values.push_back(base::FilePath(args[i]));
}
diff --git a/dbus/test_server.cc b/dbus/test_server.cc
index 88f751f..7e4722d 100644
--- a/dbus/test_server.cc
+++ b/dbus/test_server.cc
@@ -10,7 +10,7 @@
int main(int argc, char** argv) {
base::AtExitManager exit_manager;
- CommandLine::Init(argc, argv);
+ base::CommandLine::Init(argc, argv);
TestTimeouts::Initialize();
base::Thread* dbus_thread = new base::Thread("D-Bus Thread");
diff --git a/device/test/usb_test_gadget_impl.cc b/device/test/usb_test_gadget_impl.cc
index 0e8aa74..4a69265 100644
--- a/device/test/usb_test_gadget_impl.cc
+++ b/device/test/usb_test_gadget_impl.cc
@@ -123,7 +123,7 @@ class UsbTestGadgetImpl : public UsbTestGadget {
} // namespace
bool UsbTestGadget::IsTestEnabled() {
- base::CommandLine* command_line = CommandLine::ForCurrentProcess();
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
return command_line->HasSwitch(kCommandLineSwitch);
}
diff --git a/extensions/browser/api/app_window/app_window_api.cc b/extensions/browser/api/app_window/app_window_api.cc
index f0a4e83..456723e4 100644
--- a/extensions/browser/api/app_window/app_window_api.cc
+++ b/extensions/browser/api/app_window/app_window_api.cc
@@ -491,7 +491,7 @@ AppWindow::Frame AppWindowCreateFunction::GetFrameFromString(
if (frame_string == kHtmlFrameOption &&
(extension()->permissions_data()->HasAPIPermission(
APIPermission::kExperimental) ||
- CommandLine::ForCurrentProcess()->HasSwitch(
+ base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableExperimentalExtensionApis))) {
inject_html_titlebar_ = true;
return AppWindow::FRAME_NONE;
diff --git a/extensions/browser/api/bluetooth/bluetooth_private_apitest.cc b/extensions/browser/api/bluetooth/bluetooth_private_apitest.cc
index 1fad1d4..9359296 100644
--- a/extensions/browser/api/bluetooth/bluetooth_private_apitest.cc
+++ b/extensions/browser/api/bluetooth/bluetooth_private_apitest.cc
@@ -47,7 +47,7 @@ class BluetoothPrivateApiTest : public ExtensionApiTest {
~BluetoothPrivateApiTest() override {}
void SetUpOnMainThread() override {
- CommandLine::ForCurrentProcess()->AppendSwitchASCII(
+ base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
switches::kWhitelistedExtensionID, kTestExtensionId);
mock_adapter_ = new NiceMock<MockBluetoothAdapter>();
event_router()->SetAdapterForTest(mock_adapter_.get());
diff --git a/extensions/browser/api/cast_channel/cast_channel_apitest.cc b/extensions/browser/api/cast_channel/cast_channel_apitest.cc
index 5a66cf3..2b5fa6b 100644
--- a/extensions/browser/api/cast_channel/cast_channel_apitest.cc
+++ b/extensions/browser/api/cast_channel/cast_channel_apitest.cc
@@ -124,7 +124,7 @@ class CastChannelAPITest : public ExtensionApiTest {
public:
CastChannelAPITest() : ip_endpoint_(CreateIPEndPointForTest()) {}
- void SetUpCommandLine(CommandLine* command_line) override {
+ void SetUpCommandLine(base::CommandLine* command_line) override {
ExtensionApiTest::SetUpCommandLine(command_line);
command_line->AppendSwitchASCII(
extensions::switches::kWhitelistedExtensionID,
diff --git a/extensions/browser/api/test/test_api.cc b/extensions/browser/api/test/test_api.cc
index 4faaa03..23de740e 100644
--- a/extensions/browser/api/test/test_api.cc
+++ b/extensions/browser/api/test/test_api.cc
@@ -38,7 +38,7 @@ namespace WaitForRoundTrip = core_api::test::WaitForRoundTrip;
TestExtensionFunction::~TestExtensionFunction() {}
bool TestExtensionFunction::RunSync() {
- if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestType)) {
+ if (!base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestType)) {
error_ = kNotTestProcessError;
return false;
}
diff --git a/extensions/browser/app_window/app_window.cc b/extensions/browser/app_window/app_window.cc
index 285ca2d..9ed0342 100644
--- a/extensions/browser/app_window/app_window.cc
+++ b/extensions/browser/app_window/app_window.cc
@@ -254,7 +254,7 @@ void AppWindow::Init(const GURL& url,
// Initialize the render interface and web contents
app_window_contents_.reset(app_window_contents);
app_window_contents_->Initialize(browser_context(), url);
- if (CommandLine::ForCurrentProcess()->HasSwitch(
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableAppsShowOnFirstPaint)) {
content::WebContentsObserver::Observe(web_contents());
}
@@ -334,7 +334,7 @@ void AppWindow::Init(const GURL& url,
app_window_contents_->LoadContents(new_params.creator_process_id);
- if (CommandLine::ForCurrentProcess()->HasSwitch(
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
extensions::switches::kEnableAppsShowOnFirstPaint)) {
// We want to show the window only when the content has been painted. For
// that to happen, we need to define a size for the content, otherwise the
@@ -659,7 +659,7 @@ void AppWindow::Show(ShowType show_type) {
bool was_hidden = is_hidden_ || !has_been_shown_;
is_hidden_ = false;
- if (CommandLine::ForCurrentProcess()->HasSwitch(
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableAppsShowOnFirstPaint)) {
show_on_first_paint_ = true;
@@ -882,7 +882,8 @@ void AppWindow::SendOnWindowShownIfShown() {
if (!can_send_events_ || !has_been_shown_)
return;
- if (CommandLine::ForCurrentProcess()->HasSwitch(::switches::kTestType)) {
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ ::switches::kTestType)) {
app_window_contents_->DispatchWindowShownForTests();
}
}
diff --git a/extensions/browser/extension_prefs_factory.cc b/extensions/browser/extension_prefs_factory.cc
index d67bcc2..c07229cb 100644
--- a/extensions/browser/extension_prefs_factory.cc
+++ b/extensions/browser/extension_prefs_factory.cc
@@ -51,7 +51,8 @@ KeyedService* ExtensionPrefsFactory::BuildServiceInstanceFor(
context->GetPath().AppendASCII(extensions::kInstallDirectoryName),
ExtensionPrefValueMapFactory::GetForBrowserContext(context),
client->CreateAppSorting().Pass(),
- client->AreExtensionsDisabled(*CommandLine::ForCurrentProcess(), context),
+ client->AreExtensionsDisabled(*base::CommandLine::ForCurrentProcess(),
+ context),
prefs_observers);
}
diff --git a/extensions/common/extension.cc b/extensions/common/extension.cc
index 88cc084..b721406 100644
--- a/extensions/common/extension.cc
+++ b/extensions/common/extension.cc
@@ -341,7 +341,7 @@ bool Extension::ShouldNotBeVisible() const {
// Don't show component extensions because they are only extensions as an
// implementation detail of Chrome.
if (extensions::Manifest::IsComponentLocation(location()) &&
- !CommandLine::ForCurrentProcess()->HasSwitch(
+ !base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kShowComponentExtensionOptions)) {
return true;
}
@@ -714,7 +714,7 @@ bool Extension::LoadManifestVersion(base::string16* error) {
manifest_version_ = manifest_->GetManifestVersion();
if (manifest_version_ < kModernManifestVersion &&
((creation_flags_ & REQUIRE_MODERN_MANIFEST_VERSION &&
- !CommandLine::ForCurrentProcess()->HasSwitch(
+ !base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kAllowLegacyExtensionManifests)) ||
GetType() == Manifest::TYPE_PLATFORM_APP)) {
*error = ErrorUtils::FormatErrorMessageUTF16(
diff --git a/extensions/common/feature_switch.cc b/extensions/common/feature_switch.cc
index c81a2d2..1d51b77 100644
--- a/extensions/common/feature_switch.cc
+++ b/extensions/common/feature_switch.cc
@@ -110,16 +110,16 @@ FeatureSwitch::ScopedOverride::~ScopedOverride() {
FeatureSwitch::FeatureSwitch(const char* switch_name,
DefaultValue default_value) {
- Init(CommandLine::ForCurrentProcess(), switch_name, default_value);
+ Init(base::CommandLine::ForCurrentProcess(), switch_name, default_value);
}
-FeatureSwitch::FeatureSwitch(const CommandLine* command_line,
+FeatureSwitch::FeatureSwitch(const base::CommandLine* command_line,
const char* switch_name,
DefaultValue default_value) {
Init(command_line, switch_name, default_value);
}
-void FeatureSwitch::Init(const CommandLine* command_line,
+void FeatureSwitch::Init(const base::CommandLine* command_line,
const char* switch_name,
DefaultValue default_value) {
command_line_ = command_line;
diff --git a/extensions/common/features/simple_feature.cc b/extensions/common/features/simple_feature.cc
index 2219ace..d21ec0e 100644
--- a/extensions/common/features/simple_feature.cc
+++ b/extensions/common/features/simple_feature.cc
@@ -353,12 +353,12 @@ Feature::Availability SimpleFeature::IsAvailableToManifest(
if (!IsIdInWhitelist(extension_id)) {
// TODO(aa): This is gross. There should be a better way to test the
// whitelist.
- CommandLine* command_line = CommandLine::ForCurrentProcess();
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
if (!command_line->HasSwitch(switches::kWhitelistedExtensionID))
return CreateAvailability(NOT_FOUND_IN_WHITELIST, type);
std::string whitelist_switch_value =
- CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
switches::kWhitelistedExtensionID);
if (extension_id != whitelist_switch_value)
return CreateAvailability(NOT_FOUND_IN_WHITELIST, type);
diff --git a/extensions/common/manifest_handlers/background_info.cc b/extensions/common/manifest_handlers/background_info.cc
index 230eba1..3d57568 100644
--- a/extensions/common/manifest_handlers/background_info.cc
+++ b/extensions/common/manifest_handlers/background_info.cc
@@ -170,8 +170,8 @@ bool BackgroundInfo::LoadBackgroundPage(const Extension* extension,
}
if (!(background_url_.SchemeIs("https") ||
- (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kAllowHTTPBackgroundPage) &&
+ (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kAllowHTTPBackgroundPage) &&
background_url_.SchemeIs("http")))) {
*error = ASCIIToUTF16(errors::kInvalidBackgroundInHostedApp);
return false;
diff --git a/extensions/common/manifest_handlers/permissions_parser.cc b/extensions/common/manifest_handlers/permissions_parser.cc
index 42d5c61..f8ef11c 100644
--- a/extensions/common/manifest_handlers/permissions_parser.cc
+++ b/extensions/common/manifest_handlers/permissions_parser.cc
@@ -63,7 +63,7 @@ bool CanSpecifyHostPermission(const Extension* extension,
if (PermissionsData::CanExecuteScriptEverywhere(extension))
return true;
- if (CommandLine::ForCurrentProcess()->HasSwitch(
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kExtensionsOnChromeURLs)) {
return true;
}
diff --git a/extensions/common/user_script.cc b/extensions/common/user_script.cc
index 6f79887..4410290 100644
--- a/extensions/common/user_script.cc
+++ b/extensions/common/user_script.cc
@@ -60,8 +60,8 @@ int UserScript::ValidUserScriptSchemes(bool canExecuteScriptEverywhere) {
if (canExecuteScriptEverywhere)
return URLPattern::SCHEME_ALL;
int valid_schemes = kValidUserScriptSchemes;
- if (!CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kExtensionsOnChromeURLs)) {
+ if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kExtensionsOnChromeURLs)) {
valid_schemes &= ~URLPattern::SCHEME_CHROMEUI;
}
return valid_schemes;
diff --git a/extensions/renderer/app_window_custom_bindings.cc b/extensions/renderer/app_window_custom_bindings.cc
index 9d7fbec..b822587 100644
--- a/extensions/renderer/app_window_custom_bindings.cc
+++ b/extensions/renderer/app_window_custom_bindings.cc
@@ -112,8 +112,8 @@ void AppWindowCustomBindings::GetWindowControlsHtmlTemplate(
CHECK_EQ(args.Length(), 0);
v8::Handle<v8::Value> result = v8::String::Empty(args.GetIsolate());
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableAppWindowControls)) {
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableAppWindowControls)) {
base::StringValue value(
ResourceBundle::GetSharedInstance()
.GetRawDataResource(IDR_WINDOW_CONTROLS_TEMPLATE_HTML)
diff --git a/extensions/renderer/dispatcher.cc b/extensions/renderer/dispatcher.cc
index 54805aa..49c399f 100644
--- a/extensions/renderer/dispatcher.cc
+++ b/extensions/renderer/dispatcher.cc
@@ -189,7 +189,8 @@ Dispatcher::Dispatcher(DispatcherDelegate* delegate)
is_webkit_initialized_(false),
user_script_set_manager_observer_(this),
webrequest_used_(false) {
- const CommandLine& command_line = *(CommandLine::ForCurrentProcess());
+ const base::CommandLine& command_line =
+ *(base::CommandLine::ForCurrentProcess());
is_extension_process_ =
command_line.HasSwitch(switches::kExtensionProcess) ||
command_line.HasSwitch(::switches::kSingleProcess);
@@ -1148,7 +1149,7 @@ void Dispatcher::UpdateBindingsForContext(ScriptContext* context) {
// Skip chrome.test if this isn't a test.
if (api_name == "test" &&
- !CommandLine::ForCurrentProcess()->HasSwitch(
+ !base::CommandLine::ForCurrentProcess()->HasSwitch(
::switches::kTestType)) {
continue;
}
diff --git a/extensions/renderer/process_info_native_handler.cc b/extensions/renderer/process_info_native_handler.cc
index 3c7ba78..2a8f52b 100644
--- a/extensions/renderer/process_info_native_handler.cc
+++ b/extensions/renderer/process_info_native_handler.cc
@@ -78,7 +78,7 @@ void ProcessInfoNativeHandler::IsSendRequestDisabled(
void ProcessInfoNativeHandler::HasSwitch(
const v8::FunctionCallbackInfo<v8::Value>& args) {
CHECK(args.Length() == 1 && args[0]->IsString());
- bool has_switch = CommandLine::ForCurrentProcess()->HasSwitch(
+ bool has_switch = base::CommandLine::ForCurrentProcess()->HasSwitch(
*v8::String::Utf8Value(args[0]));
args.GetReturnValue().Set(v8::Boolean::New(args.GetIsolate(), has_switch));
}
diff --git a/extensions/shell/app/shell_main_delegate.cc b/extensions/shell/app/shell_main_delegate.cc
index 51390f9..fb762e9 100644
--- a/extensions/shell/app/shell_main_delegate.cc
+++ b/extensions/shell/app/shell_main_delegate.cc
@@ -99,7 +99,7 @@ bool ShellMainDelegate::BasicStartupComplete(int* exit_code) {
void ShellMainDelegate::PreSandboxStartup() {
std::string process_type =
- CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
switches::kProcessType);
if (ProcessNeedsResourceBundle(process_type))
InitializeResourceBundle();
diff --git a/extensions/shell/browser/default_shell_browser_main_delegate.cc b/extensions/shell/browser/default_shell_browser_main_delegate.cc
index eb86cc4..bbd237f 100644
--- a/extensions/shell/browser/default_shell_browser_main_delegate.cc
+++ b/extensions/shell/browser/default_shell_browser_main_delegate.cc
@@ -35,14 +35,13 @@ void DefaultShellBrowserMainDelegate::Start(
ExtensionSystem::Get(browser_context));
extension_system->Init();
- CommandLine::StringType path_list =
+ base::CommandLine::StringType path_list =
command_line->GetSwitchValueNative(switches::kLoadApps);
- base::StringTokenizerT<CommandLine::StringType,
- CommandLine::StringType::const_iterator>
+ base::StringTokenizerT<base::CommandLine::StringType,
+ base::CommandLine::StringType::const_iterator>
tokenizer(path_list, FILE_PATH_LITERAL(","));
-
std::string launch_id;
while (tokenizer.GetNext()) {
base::FilePath app_absolute_dir =
diff --git a/extensions/shell/browser/shell_browser_main_parts.cc b/extensions/shell/browser/shell_browser_main_parts.cc
index 8c02ccf..453474b 100644
--- a/extensions/shell/browser/shell_browser_main_parts.cc
+++ b/extensions/shell/browser/shell_browser_main_parts.cc
@@ -109,7 +109,7 @@ void ShellBrowserMainParts::PostMainMessageLoopStart() {
chromeos::NetworkHandler::Initialize();
network_controller_.reset(new ShellNetworkController(
- CommandLine::ForCurrentProcess()->GetSwitchValueNative(
+ base::CommandLine::ForCurrentProcess()->GetSwitchValueNative(
switches::kAppShellPreferredNetwork)));
#else
// Non-Chrome OS platforms are for developer convenience, so use a test IME.
@@ -185,7 +185,7 @@ void ShellBrowserMainParts::PreMainMessageLoopRun() {
browser_context_.get());
// Initialize OAuth2 support from command line.
- CommandLine* cmd = CommandLine::ForCurrentProcess();
+ base::CommandLine* cmd = base::CommandLine::ForCurrentProcess();
oauth2_token_service_.reset(new ShellOAuth2TokenService(
browser_context_.get(),
cmd->GetSwitchValueASCII(switches::kAppShellUser),
diff --git a/extensions/shell/browser/shell_content_browser_client.cc b/extensions/shell/browser/shell_content_browser_client.cc
index 2dd7c45..4637685 100644
--- a/extensions/shell/browser/shell_content_browser_client.cc
+++ b/extensions/shell/browser/shell_content_browser_client.cc
@@ -185,7 +185,7 @@ void ShellContentBrowserClient::SiteInstanceDeleting(
}
void ShellContentBrowserClient::AppendExtraCommandLineSwitches(
- CommandLine* command_line,
+ base::CommandLine* command_line,
int child_process_id) {
std::string process_type =
command_line->GetSwitchValueASCII(::switches::kProcessType);
@@ -235,7 +235,7 @@ ShellBrowserMainParts* ShellContentBrowserClient::CreateShellBrowserMainParts(
}
void ShellContentBrowserClient::AppendRendererSwitches(
- CommandLine* command_line) {
+ base::CommandLine* command_line) {
// TODO(jamescook): Should we check here if the process is in the extension
// service process map, or can we assume all renderers are extension
// renderers?
@@ -247,9 +247,8 @@ void ShellContentBrowserClient::AppendRendererSwitches(
static const char* const kSwitchNames[] = {
::switches::kEnableNaClDebug,
};
- command_line->CopySwitchesFrom(*CommandLine::ForCurrentProcess(),
- kSwitchNames,
- arraysize(kSwitchNames));
+ command_line->CopySwitchesFrom(*base::CommandLine::ForCurrentProcess(),
+ kSwitchNames, arraysize(kSwitchNames));
#endif // !defined(DISABLE_NACL)
}
diff --git a/gin/shell/gin_main.cc b/gin/shell/gin_main.cc
index d0fe119..532f996 100644
--- a/gin/shell/gin_main.cc
+++ b/gin/shell/gin_main.cc
@@ -57,7 +57,7 @@ class GinShellRunnerDelegate : public ModuleRunnerDelegate {
int main(int argc, char** argv) {
base::AtExitManager at_exit;
- CommandLine::Init(argc, argv);
+ base::CommandLine::Init(argc, argv);
base::i18n::InitializeICU();
#ifdef V8_USE_EXTERNAL_STARTUP_DATA
gin::IsolateHolder::LoadV8Snapshot();
@@ -77,8 +77,9 @@ int main(int argc, char** argv) {
v8::V8::SetCaptureStackTraceForUncaughtExceptions(true);
}
- CommandLine::StringVector args = CommandLine::ForCurrentProcess()->GetArgs();
- for (CommandLine::StringVector::const_iterator it = args.begin();
+ base::CommandLine::StringVector args =
+ base::CommandLine::ForCurrentProcess()->GetArgs();
+ for (base::CommandLine::StringVector::const_iterator it = args.begin();
it != args.end(); ++it) {
base::MessageLoop::current()->PostTask(FROM_HERE, base::Bind(
gin::Run, runner.GetWeakPtr(), base::FilePath(*it)));
diff --git a/gin/shell/gin_shell_unittest.cc b/gin/shell/gin_shell_unittest.cc
index 50e2ba3..2be2519 100644
--- a/gin/shell/gin_shell_unittest.cc
+++ b/gin/shell/gin_shell_unittest.cc
@@ -30,7 +30,7 @@ TEST(GinShellTest, HelloWorld) {
ASSERT_TRUE(base::PathExists(gin_shell_path));
ASSERT_TRUE(base::PathExists(hello_world_path));
- CommandLine cmd(gin_shell_path);
+ base::CommandLine cmd(gin_shell_path);
cmd.AppendArgPath(hello_world_path);
std::string output;
ASSERT_TRUE(base::GetAppOutput(cmd, &output));
diff --git a/google_apis/gaia/gaia_urls.cc b/google_apis/gaia/gaia_urls.cc
index 15afe2c4..c54aaaa 100644
--- a/google_apis/gaia/gaia_urls.cc
+++ b/google_apis/gaia/gaia_urls.cc
@@ -49,7 +49,7 @@ const char kOAuthUserInfoUrlSuffix[] = "oauth2/v1/userinfo";
void GetSwitchValueWithDefault(const char* switch_value,
const char* default_value,
std::string* output_value) {
- CommandLine* command_line = CommandLine::ForCurrentProcess();
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switch_value)) {
*output_value = command_line->GetSwitchValueASCII(switch_value);
} else {
diff --git a/google_apis/gcm/tools/mcs_probe.cc b/google_apis/gcm/tools/mcs_probe.cc
index cbee95f..7eea9a6 100644
--- a/google_apis/gcm/tools/mcs_probe.cc
+++ b/google_apis/gcm/tools/mcs_probe.cc
@@ -187,7 +187,7 @@ class MyTestCertVerifier : public net::CertVerifier {
class MCSProbe {
public:
MCSProbe(
- const CommandLine& command_line,
+ const base::CommandLine& command_line,
scoped_refptr<net::URLRequestContextGetter> url_request_context_getter);
~MCSProbe();
@@ -210,7 +210,7 @@ class MCSProbe {
base::DefaultClock clock_;
- CommandLine command_line_;
+ base::CommandLine command_line_;
base::FilePath gcm_store_path_;
uint64 android_id_;
@@ -246,7 +246,7 @@ class MCSProbe {
};
MCSProbe::MCSProbe(
- const CommandLine& command_line,
+ const base::CommandLine& command_line,
scoped_refptr<net::URLRequestContextGetter> url_request_context_getter)
: command_line_(command_line),
gcm_store_path_(base::FilePath(FILE_PATH_LITERAL("gcm_store"))),
@@ -470,7 +470,7 @@ void MCSProbe::StartMCSLogin() {
int MCSProbeMain(int argc, char* argv[]) {
base::AtExitManager exit_manager;
- CommandLine::Init(argc, argv);
+ base::CommandLine::Init(argc, argv);
logging::LoggingSettings settings;
settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
logging::InitLogging(settings);
@@ -482,7 +482,8 @@ int MCSProbeMain(int argc, char* argv[]) {
new MyTestURLRequestContextGetter(
base::MessageLoop::current()->message_loop_proxy());
- const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ const base::CommandLine& command_line =
+ *base::CommandLine::ForCurrentProcess();
MCSProbe mcs_probe(command_line, context_getter);
mcs_probe.Start();
diff --git a/google_apis/google_api_keys.cc b/google_apis/google_api_keys.cc
index 60f0b30..6a2dd3de 100644
--- a/google_apis/google_api_keys.cc
+++ b/google_apis/google_api_keys.cc
@@ -81,7 +81,7 @@ class APIKeyCache {
public:
APIKeyCache() {
scoped_ptr<base::Environment> environment(base::Environment::Create());
- CommandLine* command_line = CommandLine::ForCurrentProcess();
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
api_key_ = CalculateKeyValue(GOOGLE_API_KEY,
STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY),
@@ -211,7 +211,7 @@ class APIKeyCache {
const char* command_line_switch,
const std::string& default_if_unset,
base::Environment* environment,
- CommandLine* command_line) {
+ base::CommandLine* command_line) {
std::string key_value = baked_in_value;
std::string temp;
if (environment->GetVar(environment_variable_name, &temp)) {
diff --git a/gpu/angle_end2end_tests_main.cc b/gpu/angle_end2end_tests_main.cc
index a611a7c..24bd9b5 100644
--- a/gpu/angle_end2end_tests_main.cc
+++ b/gpu/angle_end2end_tests_main.cc
@@ -22,7 +22,7 @@ int RunHelper(base::TestSuite* test_suite) {
} // namespace
int main(int argc, char** argv) {
- CommandLine::Init(argc, argv);
+ base::CommandLine::Init(argc, argv);
testing::InitGoogleMock(&argc, argv);
testing::AddGlobalTestEnvironment(new ANGLETestEnvironment());
base::TestSuite test_suite(argc, argv);
diff --git a/gpu/angle_unittest_main.cc b/gpu/angle_unittest_main.cc
index e7667f6..7187829 100644
--- a/gpu/angle_unittest_main.cc
+++ b/gpu/angle_unittest_main.cc
@@ -22,7 +22,7 @@ int RunHelper(base::TestSuite* test_suite) {
} // namespace
int main(int argc, char** argv) {
- CommandLine::Init(argc, argv);
+ base::CommandLine::Init(argc, argv);
testing::InitGoogleMock(&argc, argv);
ShInitialize();
base::TestSuite test_suite(argc, argv);
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc
index 88b9c72..ccbb457 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -111,7 +111,7 @@ GLES2Implementation::GLES2Implementation(
this_in_hex_ = ss.str();
GPU_CLIENT_LOG_CODE_BLOCK({
- debug_ = CommandLine::ForCurrentProcess()->HasSwitch(
+ debug_ = base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableGPUClientLogging);
});
diff --git a/gpu/command_buffer/common/unittest_main.cc b/gpu/command_buffer/common/unittest_main.cc
index 2d6a2d1..874bae7 100644
--- a/gpu/command_buffer/common/unittest_main.cc
+++ b/gpu/command_buffer/common/unittest_main.cc
@@ -32,7 +32,7 @@ int main(int argc, char** argv) {
#if !defined(OS_ANDROID)
base::AtExitManager exit_manager;
#endif
- CommandLine::Init(argc, argv);
+ base::CommandLine::Init(argc, argv);
testing::InitGoogleMock(&argc, argv);
return base::LaunchUnitTests(argc,
argv,
diff --git a/gpu/command_buffer/service/async_pixel_transfer_manager_linux.cc b/gpu/command_buffer/service/async_pixel_transfer_manager_linux.cc
index 8d25f00..b2be97d 100644
--- a/gpu/command_buffer/service/async_pixel_transfer_manager_linux.cc
+++ b/gpu/command_buffer/service/async_pixel_transfer_manager_linux.cc
@@ -17,7 +17,7 @@ namespace gpu {
AsyncPixelTransferManager* AsyncPixelTransferManager::Create(
gfx::GLContext* context) {
TRACE_EVENT0("gpu", "AsyncPixelTransferManager::Create");
- if (CommandLine::ForCurrentProcess()->HasSwitch(
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableShareGroupAsyncTextureUpload)) {
DCHECK(context);
return static_cast<AsyncPixelTransferManager*> (
diff --git a/gpu/command_buffer/service/context_group.cc b/gpu/command_buffer/service/context_group.cc
index 9b46b024..e9af883 100644
--- a/gpu/command_buffer/service/context_group.cc
+++ b/gpu/command_buffer/service/context_group.cc
@@ -40,7 +40,7 @@ ContextGroup::ContextGroup(
shader_translator_cache_(shader_translator_cache),
subscription_ref_set_(subscription_ref_set),
pending_valuebuffer_state_(pending_valuebuffer_state),
- enforce_gl_minimums_(CommandLine::ForCurrentProcess()->HasSwitch(
+ enforce_gl_minimums_(base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnforceGLMinimums)),
bind_generates_resource_(bind_generates_resource),
max_vertex_attribs_(0u),
diff --git a/gpu/command_buffer/service/feature_info.cc b/gpu/command_buffer/service/feature_info.cc
index e5df2eb..a225478 100644
--- a/gpu/command_buffer/service/feature_info.cc
+++ b/gpu/command_buffer/service/feature_info.cc
@@ -161,14 +161,14 @@ FeatureInfo::Workarounds::Workarounds() :
}
FeatureInfo::FeatureInfo() {
- InitializeBasicState(*CommandLine::ForCurrentProcess());
+ InitializeBasicState(*base::CommandLine::ForCurrentProcess());
}
-FeatureInfo::FeatureInfo(const CommandLine& command_line) {
+FeatureInfo::FeatureInfo(const base::CommandLine& command_line) {
InitializeBasicState(command_line);
}
-void FeatureInfo::InitializeBasicState(const CommandLine& command_line) {
+void FeatureInfo::InitializeBasicState(const base::CommandLine& command_line) {
if (command_line.HasSwitch(switches::kGpuDriverBugWorkarounds)) {
std::string types = command_line.GetSwitchValueASCII(
switches::kGpuDriverBugWorkarounds);
diff --git a/gpu/command_buffer/service/feature_info_unittest.cc b/gpu/command_buffer/service/feature_info_unittest.cc
index 06f3d11..f5440e0 100644
--- a/gpu/command_buffer/service/feature_info_unittest.cc
+++ b/gpu/command_buffer/service/feature_info_unittest.cc
@@ -54,13 +54,14 @@ class FeatureInfoTest : public GpuServiceTest {
info_->Initialize();
}
- void SetupWithCommandLine(const CommandLine& command_line) {
+ void SetupWithCommandLine(const base::CommandLine& command_line) {
GpuServiceTest::SetUp();
info_ = new FeatureInfo(command_line);
}
void SetupInitExpectationsWithCommandLine(
- const char* extensions, const CommandLine& command_line) {
+ const char* extensions,
+ const base::CommandLine& command_line) {
GpuServiceTest::SetUpWithGLVersion("2.0", extensions);
TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion(
gl_.get(), extensions, "", "");
@@ -1210,7 +1211,7 @@ TEST_F(FeatureInfoTest, InitializeOES_element_index_uint) {
}
TEST_F(FeatureInfoTest, InitializeVAOsWithClientSideArrays) {
- CommandLine command_line(0, NULL);
+ base::CommandLine command_line(0, NULL);
command_line.AppendSwitchASCII(
switches::kGpuDriverBugWorkarounds,
base::IntToString(gpu::USE_CLIENT_SIDE_ARRAYS_FOR_STREAM_BUFFERS));
@@ -1302,7 +1303,7 @@ TEST_F(FeatureInfoTest, InitializeWithoutSamplers) {
}
TEST_F(FeatureInfoTest, ParseDriverBugWorkaroundsSingle) {
- CommandLine command_line(0, NULL);
+ base::CommandLine command_line(0, NULL);
command_line.AppendSwitchASCII(
switches::kGpuDriverBugWorkarounds,
base::IntToString(gpu::EXIT_ON_CONTEXT_LOST));
@@ -1312,7 +1313,7 @@ TEST_F(FeatureInfoTest, ParseDriverBugWorkaroundsSingle) {
}
TEST_F(FeatureInfoTest, ParseDriverBugWorkaroundsMultiple) {
- CommandLine command_line(0, NULL);
+ base::CommandLine command_line(0, NULL);
command_line.AppendSwitchASCII(
switches::kGpuDriverBugWorkarounds,
base::IntToString(gpu::EXIT_ON_CONTEXT_LOST) + "," +
@@ -1351,7 +1352,7 @@ TEST_F(FeatureInfoTest, InitializeWithPreferredEXTDrawBuffers) {
}
TEST_F(FeatureInfoTest, ARBSyncDisabled) {
- CommandLine command_line(0, NULL);
+ base::CommandLine command_line(0, NULL);
command_line.AppendSwitchASCII(
switches::kGpuDriverBugWorkarounds,
base::IntToString(gpu::DISABLE_ARB_SYNC));
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index f55ff3b..9ad567a 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -2385,7 +2385,7 @@ GLES2DecoderImpl::GLES2DecoderImpl(ContextGroup* group)
shader_texture_lod_explicitly_enabled_(false),
compile_shader_always_succeeds_(false),
lose_context_when_out_of_memory_(false),
- service_logging_(CommandLine::ForCurrentProcess()->HasSwitch(
+ service_logging_(base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableGPUServiceLoggingGPU)),
viewport_max_width_(0),
viewport_max_height_(0),
@@ -2417,7 +2417,7 @@ GLES2DecoderImpl::GLES2DecoderImpl(ContextGroup* group)
// tests because GLES2DecoderWithShaderTest.GetShaderInfoLogValidArgs passes
// the empty string to CompileShader and this is not a valid shader.
if (gfx::GetGLImplementation() == gfx::kGLImplementationMockGL ||
- CommandLine::ForCurrentProcess()->HasSwitch(
+ base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableGLSLTranslator)) {
use_shader_translator_ = false;
}
@@ -2443,23 +2443,24 @@ bool GLES2DecoderImpl::Initialize(
gpu_tracer_.reset(new GPUTracer(this));
gpu_state_tracer_ = GPUStateTracer::Create(&state_);
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableGPUDebugging)) {
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableGPUDebugging)) {
set_debug(true);
}
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableGPUCommandLogging)) {
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableGPUCommandLogging)) {
set_log_commands(true);
}
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableUnsafeES3APIs)) {
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableUnsafeES3APIs)) {
set_unsafe_es3_apis_enabled(true);
}
- compile_shader_always_succeeds_ = CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kCompileShaderAlwaysSucceeds);
+ compile_shader_always_succeeds_ =
+ base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kCompileShaderAlwaysSucceeds);
// Take ownership of the context and surface. The surface can be replaced with
// SetSurface.
@@ -2960,8 +2961,8 @@ bool GLES2DecoderImpl::InitializeShaderTranslator() {
if (workarounds().regenerate_struct_names)
driver_bug_workarounds |= SH_REGENERATE_STRUCT_NAMES;
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEmulateShaderPrecision))
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEmulateShaderPrecision))
resources.WEBGL_debug_shader_precision = true;
vertex_translator_ = shader_translator_cache()->GetTranslator(
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
index ef37c90..390107f 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
@@ -57,7 +57,7 @@ using namespace cmds;
void GLES2DecoderRGBBackbufferTest::SetUp() {
// Test codepath with workaround clear_alpha_in_readpixels because
// ReadPixelsEmulator emulates the incorrect driver behavior.
- CommandLine command_line(0, NULL);
+ base::CommandLine command_line(0, NULL);
command_line.AppendSwitchASCII(
switches::kGpuDriverBugWorkarounds,
base::IntToString(gpu::CLEAR_ALPHA_IN_READPIXELS));
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc
index 0bfefd4..baff353 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc
@@ -858,7 +858,7 @@ TEST_P(GLES2DecoderWithShaderTest, DrawArraysValidAttributesSucceeds) {
// Same as DrawArraysValidAttributesSucceeds, but with workaround
// |init_vertex_attributes|.
TEST_P(GLES2DecoderManualInitTest, InitVertexAttributes) {
- CommandLine command_line(0, NULL);
+ base::CommandLine command_line(0, NULL);
command_line.AppendSwitchASCII(
switches::kGpuDriverBugWorkarounds,
base::IntToString(gpu::INIT_VERTEX_ATTRIBUTES));
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc
index 05cb9ff..e663bdf 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc
@@ -981,7 +981,7 @@ TEST_P(GLES2DecoderWithShaderTest, BindUniformLocationCHROMIUMBucket) {
}
TEST_P(GLES2DecoderManualInitTest, ClearUniformsBeforeFirstProgramUse) {
- CommandLine command_line(0, NULL);
+ base::CommandLine command_line(0, NULL);
command_line.AppendSwitchASCII(
switches::kGpuDriverBugWorkarounds,
base::IntToString(gpu::CLEAR_UNIFORMS_BEFORE_FIRST_PROGRAM_USE));
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc
index 82d5653..b0e8e8c 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc
@@ -126,7 +126,7 @@ TEST_P(GLES2DecoderTest, GenerateMipmapClearsUnclearedTexture) {
// Same as GenerateMipmapClearsUnclearedTexture, but with workaround
// |set_texture_filters_before_generating_mipmap|.
TEST_P(GLES2DecoderManualInitTest, SetTextureFiltersBeforeGenerateMipmap) {
- CommandLine command_line(0, NULL);
+ base::CommandLine command_line(0, NULL);
command_line.AppendSwitchASCII(
switches::kGpuDriverBugWorkarounds,
base::IntToString(gpu::SET_TEXTURE_FILTER_BEFORE_GENERATING_MIPMAP));
@@ -1627,7 +1627,7 @@ TEST_P(GLES2DecoderTest, TexSubImage2DDoesNotClearAfterTexImage2DNULLThenData) {
TEST_P(
GLES2DecoderManualInitTest,
TexSubImage2DDoesNotClearAfterTexImage2DNULLThenDataWithTexImage2DIsFaster) {
- CommandLine command_line(0, NULL);
+ base::CommandLine command_line(0, NULL);
command_line.AppendSwitchASCII(
switches::kGpuDriverBugWorkarounds,
base::IntToString(gpu::TEXSUBIMAGE2D_FASTER_THAN_TEXIMAGE2D));
diff --git a/gpu/command_buffer/service/logger.cc b/gpu/command_buffer/service/logger.cc
index 1fd2933..d8311f1 100644
--- a/gpu/command_buffer/service/logger.cc
+++ b/gpu/command_buffer/service/logger.cc
@@ -27,7 +27,7 @@ Logger::~Logger() {}
void Logger::LogMessage(
const char* filename, int line, const std::string& msg) {
if (log_message_count_ < kMaxLogMessages ||
- CommandLine::ForCurrentProcess()->HasSwitch(
+ base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableGLErrorLimit)) {
std::string prefixed_msg(std::string("[") + GetLogPrefix() + "]" + msg);
++log_message_count_;
diff --git a/gpu/command_buffer/service/memory_program_cache.cc b/gpu/command_buffer/service/memory_program_cache.cc
index 86fffd3..4bf16e3 100644
--- a/gpu/command_buffer/service/memory_program_cache.cc
+++ b/gpu/command_buffer/service/memory_program_cache.cc
@@ -21,7 +21,8 @@
namespace {
size_t GetCacheSizeBytes() {
- const CommandLine* command_line = CommandLine::ForCurrentProcess();
+ const base::CommandLine* command_line =
+ base::CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kGpuProgramCacheSizeKb)) {
size_t size;
if (base::StringToSizeT(
@@ -215,7 +216,7 @@ ProgramCache::ProgramLoadResult MemoryProgramCache::LoadLinkedProgram(
shader_b->set_varying_map(value->varying_map_1());
if (!shader_callback.is_null() &&
- !CommandLine::ForCurrentProcess()->HasSwitch(
+ !base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableGpuShaderDiskCache)) {
scoped_ptr<GpuProgramProto> proto(
GpuProgramProto::default_instance().New());
@@ -284,7 +285,7 @@ void MemoryProgramCache::SaveLinkedProgram(
}
if (!shader_callback.is_null() &&
- !CommandLine::ForCurrentProcess()->HasSwitch(
+ !base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableGpuShaderDiskCache)) {
scoped_ptr<GpuProgramProto> proto(
GpuProgramProto::default_instance().New());
diff --git a/gpu/command_buffer/service/program_manager.cc b/gpu/command_buffer/service/program_manager.cc
index 1de61bb..634fbc0 100644
--- a/gpu/command_buffer/service/program_manager.cc
+++ b/gpu/command_buffer/service/program_manager.cc
@@ -404,8 +404,8 @@ void Program::Update() {
}
#if !defined(NDEBUG)
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableGPUServiceLoggingGPU)) {
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableGPUServiceLoggingGPU)) {
DVLOG(1) << "----: attribs for service_id: " << service_id();
for (size_t ii = 0; ii < attrib_infos_.size(); ++ii) {
const VertexAttrib& info = attrib_infos_[ii];
@@ -482,8 +482,8 @@ void Program::Update() {
}
#if !defined(NDEBUG)
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableGPUServiceLoggingGPU)) {
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableGPUServiceLoggingGPU)) {
DVLOG(1) << "----: uniforms for service_id: " << service_id();
for (size_t ii = 0; ii < uniform_infos_.size(); ++ii) {
const UniformInfo& info = uniform_infos_[ii];
diff --git a/gpu/command_buffer/service/shader_translator.cc b/gpu/command_buffer/service/shader_translator.cc
index d7def00..74b183b 100644
--- a/gpu/command_buffer/service/shader_translator.cc
+++ b/gpu/command_buffer/service/shader_translator.cc
@@ -135,8 +135,8 @@ int ShaderTranslator::GetCompileOptions() const {
SH_LIMIT_EXPRESSION_COMPLEXITY | SH_LIMIT_CALL_STACK_DEPTH |
SH_CLAMP_INDIRECT_ARRAY_BOUNDS;
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kGLShaderIntermOutput))
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kGLShaderIntermOutput))
compile_options |= SH_INTERMEDIATE_TREE;
compile_options |= driver_bug_workarounds_;
diff --git a/gpu/command_buffer/tests/gl_clear_framebuffer_unittest.cc b/gpu/command_buffer/tests/gl_clear_framebuffer_unittest.cc
index 8a925c8..fdad315 100644
--- a/gpu/command_buffer/tests/gl_clear_framebuffer_unittest.cc
+++ b/gpu/command_buffer/tests/gl_clear_framebuffer_unittest.cc
@@ -31,7 +31,7 @@ class GLClearFramebufferTest : public testing::TestWithParam<bool> {
void SetUp() override {
if (GetParam()) {
// Force the glClear() workaround so we can test it here.
- CommandLine command_line(base::CommandLine::NO_PROGRAM);
+ base::CommandLine command_line(base::CommandLine::NO_PROGRAM);
command_line.AppendSwitchASCII(switches::kGpuDriverBugWorkarounds,
base::IntToString(gpu::GL_CLEAR_BROKEN));
gl_.InitializeWithCommandLine(GLManager::Options(), &command_line);
diff --git a/gpu/command_buffer/tests/gl_tests_main.cc b/gpu/command_buffer/tests/gl_tests_main.cc
index 8952e44..7b7d8d86 100644
--- a/gpu/command_buffer/tests/gl_tests_main.cc
+++ b/gpu/command_buffer/tests/gl_tests_main.cc
@@ -35,13 +35,13 @@ int main(int argc, char** argv) {
ui::gl::android::RegisterJni(base::android::AttachCurrentThread());
#endif
base::TestSuite test_suite(argc, argv);
- CommandLine::Init(argc, argv);
+ base::CommandLine::Init(argc, argv);
#if defined(OS_MACOSX)
base::mac::ScopedNSAutoreleasePool pool;
#endif
gfx::GLSurface::InitializeOneOff();
::gles2::Initialize();
- gpu::ApplyGpuDriverBugWorkarounds(CommandLine::ForCurrentProcess());
+ gpu::ApplyGpuDriverBugWorkarounds(base::CommandLine::ForCurrentProcess());
testing::InitGoogleMock(&argc, argv);
return base::LaunchUnitTestsSerially(
argc,
diff --git a/gpu/config/gpu_driver_bug_list.cc b/gpu/config/gpu_driver_bug_list.cc
index a091c42..b0d82eb 100644
--- a/gpu/config/gpu_driver_bug_list.cc
+++ b/gpu/config/gpu_driver_bug_list.cc
@@ -55,7 +55,8 @@ std::string GpuDriverBugWorkaroundTypeToString(
// static
void GpuDriverBugList::AppendWorkaroundsFromCommandLine(
- std::set<int>* workarounds, const CommandLine& command_line) {
+ std::set<int>* workarounds,
+ const base::CommandLine& command_line) {
DCHECK(workarounds);
for (int i = 0; i < NUMBER_OF_GPU_DRIVER_BUG_WORKAROUND_TYPES; i++) {
if (!command_line.HasSwitch(kFeatureList[i].name))
diff --git a/gpu/config/gpu_driver_bug_list.h b/gpu/config/gpu_driver_bug_list.h
index 8830cac..ba24944 100644
--- a/gpu/config/gpu_driver_bug_list.h
+++ b/gpu/config/gpu_driver_bug_list.h
@@ -24,7 +24,8 @@ class GPU_EXPORT GpuDriverBugList : public GpuControlList {
// Append |workarounds| with these passed in through the
// |command_line|.
static void AppendWorkaroundsFromCommandLine(
- std::set<int>* workarounds, const CommandLine& command_line);
+ std::set<int>* workarounds,
+ const base::CommandLine& command_line);
private:
GpuDriverBugList();
diff --git a/gpu/config/gpu_info_collector_linux.cc b/gpu/config/gpu_info_collector_linux.cc
index ac5660a..35dd88a 100644
--- a/gpu/config/gpu_info_collector_linux.cc
+++ b/gpu/config/gpu_info_collector_linux.cc
@@ -163,7 +163,7 @@ CollectInfoResult CollectContextGraphicsInfo(GPUInfo* gpu_info) {
TRACE_EVENT0("gpu", "gpu_info_collector::CollectGraphicsInfo");
- if (CommandLine::ForCurrentProcess()->HasSwitch(
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kGpuNoContextLost)) {
gpu_info->can_lose_context = false;
} else {
diff --git a/gpu/config/gpu_info_collector_win.cc b/gpu/config/gpu_info_collector_win.cc
index eabf9b2..d38a026 100644
--- a/gpu/config/gpu_info_collector_win.cc
+++ b/gpu/config/gpu_info_collector_win.cc
@@ -466,9 +466,10 @@ CollectInfoResult CollectContextGraphicsInfo(GPUInfo* gpu_info) {
DCHECK(gpu_info);
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseGL)) {
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseGL)) {
std::string requested_implementation_name =
- CommandLine::ForCurrentProcess()->GetSwitchValueASCII(switches::kUseGL);
+ base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ switches::kUseGL);
if (requested_implementation_name == "swiftshader") {
gpu_info->software_rendering = true;
gpu_info->context_info_state = kCollectInfoNonFatalFailure;
diff --git a/gpu/config/gpu_util.cc b/gpu/config/gpu_util.cc
index 4605981..0fb8a7f 100644
--- a/gpu/config/gpu_util.cc
+++ b/gpu/config/gpu_util.cc
@@ -53,15 +53,15 @@ void MergeFeatureSets(std::set<int>* dst, const std::set<int>& src) {
dst->insert(src.begin(), src.end());
}
-void ApplyGpuDriverBugWorkarounds(CommandLine* command_line) {
+void ApplyGpuDriverBugWorkarounds(base::CommandLine* command_line) {
GPUInfo gpu_info;
CollectBasicGraphicsInfo(&gpu_info);
ApplyGpuDriverBugWorkarounds(gpu_info, command_line);
}
-void ApplyGpuDriverBugWorkarounds(
- const GPUInfo& gpu_info, CommandLine* command_line) {
+void ApplyGpuDriverBugWorkarounds(const GPUInfo& gpu_info,
+ base::CommandLine* command_line) {
scoped_ptr<GpuDriverBugList> list(GpuDriverBugList::Create());
list->LoadList(kGpuDriverBugListJson,
GpuControlList::kCurrentOsOnly);
diff --git a/gpu/gles2_conform_support/egl/egl.cc b/gpu/gles2_conform_support/egl/egl.cc
index 3827229..f23cf76 100644
--- a/gpu/gles2_conform_support/egl/egl.cc
+++ b/gpu/gles2_conform_support/egl/egl.cc
@@ -106,7 +106,7 @@ EGLBoolean eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor) {
const char* const argv[] = {
"dummy"
};
- CommandLine::Init(argc, argv);
+ base::CommandLine::Init(argc, argv);
gfx::GLSurface::InitializeOneOff();
*major = 1;
diff --git a/gpu/gles2_conform_support/gles2_conform_test.cc b/gpu/gles2_conform_support/gles2_conform_test.cc
index 46a5115..906e1af 100644
--- a/gpu/gles2_conform_support/gles2_conform_test.cc
+++ b/gpu/gles2_conform_support/gles2_conform_test.cc
@@ -63,8 +63,8 @@ bool RunGLES2ConformTest(const char* path) {
base::FilePath program(test_path.Append(FILE_PATH_LITERAL(
"gles2_conform_test_windowless")));
- CommandLine* currentCmdLine = CommandLine::ForCurrentProcess();
- CommandLine cmdline(program);
+ base::CommandLine* currentCmdLine = base::CommandLine::ForCurrentProcess();
+ base::CommandLine cmdline(program);
cmdline.AppendArguments(*currentCmdLine, false);
cmdline.AppendSwitch(std::string("--"));
cmdline.AppendArg(std::string("-run=") + path);
@@ -85,7 +85,7 @@ bool RunGLES2ConformTest(const char* path) {
int main(int argc, char** argv) {
base::AtExitManager exit_manager;
- CommandLine::Init(argc, argv);
+ base::CommandLine::Init(argc, argv);
#if defined(OS_MACOSX)
base::mac::ScopedNSAutoreleasePool pool;
#endif
diff --git a/gpu/gles2_conform_support/native/main.cc b/gpu/gles2_conform_support/native/main.cc
index d0d05d8..1dc377b 100644
--- a/gpu/gles2_conform_support/native/main.cc
+++ b/gpu/gles2_conform_support/native/main.cc
@@ -23,11 +23,11 @@ extern "C" {
int main(int argc, char *argv[]) {
base::AtExitManager at_exit;
- CommandLine::Init(argc, argv);
+ base::CommandLine::Init(argc, argv);
base::MessageLoopForUI message_loop;
- CommandLine::StringVector args =
- CommandLine::ForCurrentProcess()->GetArgs();
+ base::CommandLine::StringVector args =
+ base::CommandLine::ForCurrentProcess()->GetArgs();
#if defined(OS_MACOSX)
base::mac::ScopedNSAutoreleasePool pool;
diff --git a/gpu/khronos_glcts_support/khronos_glcts_test.cc b/gpu/khronos_glcts_support/khronos_glcts_test.cc
index 5491b15..287b5d0 100644
--- a/gpu/khronos_glcts_support/khronos_glcts_test.cc
+++ b/gpu/khronos_glcts_support/khronos_glcts_test.cc
@@ -67,7 +67,7 @@ bool RunKhronosGLCTSTest(const char* test_name) {
g_deqp_log_dir.AppendASCII(test_info->name()).
AddExtension(FILE_PATH_LITERAL(".log"));
- CommandLine cmdline(program);
+ base::CommandLine cmdline(program);
cmdline.AppendSwitchPath("--deqp-log-filename", log);
cmdline.AppendSwitchPath("--deqp-archive-dir", archive);
cmdline.AppendArg("--deqp-gl-config-id=-1");
diff --git a/gpu/khronos_glcts_support/native/main.cc b/gpu/khronos_glcts_support/native/main.cc
index 8ffde05..62d9b11 100644
--- a/gpu/khronos_glcts_support/native/main.cc
+++ b/gpu/khronos_glcts_support/native/main.cc
@@ -43,7 +43,7 @@ void GTFMain(int argc, char* argv[]) {
int main(int argc, char *argv[]) {
base::AtExitManager at_exit;
- CommandLine::Init(argc, argv);
+ base::CommandLine::Init(argc, argv);
base::MessageLoopForUI message_loop;
GTFMain(argc, argv);
diff --git a/gpu/tools/compositor_model_bench/compositor_model_bench.cc b/gpu/tools/compositor_model_bench/compositor_model_bench.cc
index 375bce2..8042392 100644
--- a/gpu/tools/compositor_model_bench/compositor_model_bench.cc
+++ b/gpu/tools/compositor_model_bench/compositor_model_bench.cc
@@ -353,8 +353,8 @@ class Simulator {
};
int main(int argc, char* argv[]) {
- CommandLine::Init(argc, argv);
- const CommandLine* cl = CommandLine::ForCurrentProcess();
+ base::CommandLine::Init(argc, argv);
+ const base::CommandLine* cl = base::CommandLine::ForCurrentProcess();
if (argc != 3 && argc != 4) {
LOG(INFO) << "Usage: \n" <<