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

Unified Diff: chrome/app_shim/chrome_main_app_mode_mac.mm

Issue 819133004: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app_shim/app_mode_loader_mac.mm ('k') | chrome/app_shim/win/app_shim_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app_shim/chrome_main_app_mode_mac.mm
diff --git a/chrome/app_shim/chrome_main_app_mode_mac.mm b/chrome/app_shim/chrome_main_app_mode_mac.mm
index 47cd4420f279b9b03e6122f94181cd1922e48bec..7babb4a4c59be25a558152f0cbee4b5b917dfe87 100644
--- a/chrome/app_shim/chrome_main_app_mode_mac.mm
+++ b/chrome/app_shim/chrome_main_app_mode_mac.mm
@@ -212,9 +212,8 @@ void AppShimController::CreateChannelAndSendLaunchApp(
this,
g_io_thread->message_loop_proxy().get());
- bool launched_by_chrome =
- CommandLine::ForCurrentProcess()->HasSwitch(
- app_mode::kLaunchedByChromeProcessId);
+ bool launched_by_chrome = base::CommandLine::ForCurrentProcess()->HasSwitch(
+ app_mode::kLaunchedByChromeProcessId);
apps::AppShimLaunchType launch_type = launched_by_chrome ?
apps::APP_SHIM_LAUNCH_REGISTER_ONLY : apps::APP_SHIM_LAUNCH_NORMAL;
@@ -563,7 +562,7 @@ int ChromeAppModeStart(const app_mode::ChromeAppModeInfo* info);
} // extern "C"
int ChromeAppModeStart(const app_mode::ChromeAppModeInfo* info) {
- CommandLine::Init(info->argc, info->argv);
+ base::CommandLine::Init(info->argc, info->argv);
base::mac::ScopedNSAutoreleasePool scoped_pool;
base::AtExitManager exit_manager;
@@ -616,8 +615,9 @@ int ChromeAppModeStart(const app_mode::ChromeAppModeInfo* info) {
// Find already running instances of Chrome.
pid_t pid = -1;
- std::string chrome_process_id = CommandLine::ForCurrentProcess()->
- GetSwitchValueASCII(app_mode::kLaunchedByChromeProcessId);
+ std::string chrome_process_id =
+ base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ app_mode::kLaunchedByChromeProcessId);
if (!chrome_process_id.empty()) {
if (!base::StringToInt(chrome_process_id, &pid))
LOG(FATAL) << "Invalid PID: " << chrome_process_id;
@@ -637,11 +637,11 @@ int ChromeAppModeStart(const app_mode::ChromeAppModeInfo* info) {
// In tests, launching Chrome does nothing, and we won't get a ping response,
// so just assume the socket exists.
if (pid == -1 &&
- !CommandLine::ForCurrentProcess()->HasSwitch(
+ !base::CommandLine::ForCurrentProcess()->HasSwitch(
app_mode::kLaunchedForTest)) {
// Launch Chrome if it isn't already running.
ProcessSerialNumber psn;
- CommandLine command_line(CommandLine::NO_PROGRAM);
+ base::CommandLine command_line(base::CommandLine::NO_PROGRAM);
command_line.AppendSwitch(switches::kSilentLaunch);
// If the shim is the app launcher, pass --show-app-list when starting a new
« no previous file with comments | « chrome/app_shim/app_mode_loader_mac.mm ('k') | chrome/app_shim/win/app_shim_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698