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

Side by Side Diff: chrome/browser/chrome_browser_main_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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chrome_browser_main_mac.h" 5 #include "chrome/browser/chrome_browser_main_mac.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 #include <sys/sysctl.h> 8 #include <sys/sysctl.h>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 : ChromeBrowserMainPartsPosix(parameters) { 158 : ChromeBrowserMainPartsPosix(parameters) {
159 } 159 }
160 160
161 ChromeBrowserMainPartsMac::~ChromeBrowserMainPartsMac() { 161 ChromeBrowserMainPartsMac::~ChromeBrowserMainPartsMac() {
162 } 162 }
163 163
164 void ChromeBrowserMainPartsMac::PreEarlyInitialization() { 164 void ChromeBrowserMainPartsMac::PreEarlyInitialization() {
165 ChromeBrowserMainPartsPosix::PreEarlyInitialization(); 165 ChromeBrowserMainPartsPosix::PreEarlyInitialization();
166 166
167 if (base::mac::WasLaunchedAsLoginItemRestoreState()) { 167 if (base::mac::WasLaunchedAsLoginItemRestoreState()) {
168 CommandLine* singleton_command_line = CommandLine::ForCurrentProcess(); 168 base::CommandLine* singleton_command_line =
169 base::CommandLine::ForCurrentProcess();
169 singleton_command_line->AppendSwitch(switches::kRestoreLastSession); 170 singleton_command_line->AppendSwitch(switches::kRestoreLastSession);
170 } else if (base::mac::WasLaunchedAsHiddenLoginItem()) { 171 } else if (base::mac::WasLaunchedAsHiddenLoginItem()) {
171 CommandLine* singleton_command_line = CommandLine::ForCurrentProcess(); 172 base::CommandLine* singleton_command_line =
173 base::CommandLine::ForCurrentProcess();
172 singleton_command_line->AppendSwitch(switches::kNoStartupWindow); 174 singleton_command_line->AppendSwitch(switches::kNoStartupWindow);
173 } 175 }
174 176
175 RecordCatSixtyFour(); 177 RecordCatSixtyFour();
176 } 178 }
177 179
178 void ChromeBrowserMainPartsMac::PreMainMessageLoopStart() { 180 void ChromeBrowserMainPartsMac::PreMainMessageLoopStart() {
179 MacStartupProfiler::GetInstance()->Profile( 181 MacStartupProfiler::GetInstance()->Profile(
180 MacStartupProfiler::PRE_MAIN_MESSAGE_LOOP_START); 182 MacStartupProfiler::PRE_MAIN_MESSAGE_LOOP_START);
181 ChromeBrowserMainPartsPosix::PreMainMessageLoopStart(); 183 ChromeBrowserMainPartsPosix::PreMainMessageLoopStart();
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 MacStartupProfiler::POST_PROFILE_INIT); 284 MacStartupProfiler::POST_PROFILE_INIT);
283 ChromeBrowserMainPartsPosix::PostProfileInit(); 285 ChromeBrowserMainPartsPosix::PostProfileInit();
284 g_browser_process->metrics_service()->RecordBreakpadRegistration( 286 g_browser_process->metrics_service()->RecordBreakpadRegistration(
285 breakpad::IsCrashReporterEnabled()); 287 breakpad::IsCrashReporterEnabled());
286 } 288 }
287 289
288 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { 290 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() {
289 AppController* appController = [NSApp delegate]; 291 AppController* appController = [NSApp delegate];
290 [appController didEndMainMessageLoop]; 292 [appController didEndMainMessageLoop];
291 } 293 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main_android.cc ('k') | chrome/browser/chrome_browser_main_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698