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

Side by Side Diff: chrome/browser/browser_main_win.cc

Issue 7386002: Rename CommandLine::GetCommandLineString(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge. Created 9 years, 5 months 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/browser_about_handler.cc ('k') | chrome/browser/chromeos/login/login_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser_main.h" 5 #include "chrome/browser/browser_main.h"
6 #include "chrome/browser/browser_main_win.h" 6 #include "chrome/browser/browser_main_win.h"
7 7
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 10
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 if (!register_application_restart) { 192 if (!register_application_restart) {
193 LOG(WARNING) << "Cannot find RegisterApplicationRestart in kernel32.dll"; 193 LOG(WARNING) << "Cannot find RegisterApplicationRestart in kernel32.dll";
194 return; 194 return;
195 } 195 }
196 // The Windows Restart Manager expects a string of command line flags only, 196 // The Windows Restart Manager expects a string of command line flags only,
197 // without the program. 197 // without the program.
198 CommandLine command_line(CommandLine::NO_PROGRAM); 198 CommandLine command_line(CommandLine::NO_PROGRAM);
199 command_line.AppendArguments(parsed_command_line, false); 199 command_line.AppendArguments(parsed_command_line, false);
200 if (!command_line.HasSwitch(switches::kRestoreLastSession)) 200 if (!command_line.HasSwitch(switches::kRestoreLastSession))
201 command_line.AppendSwitch(switches::kRestoreLastSession); 201 command_line.AppendSwitch(switches::kRestoreLastSession);
202 if (command_line.command_line_string().length() > RESTART_MAX_CMD_LINE) { 202 if (command_line.GetCommandLineString().length() > RESTART_MAX_CMD_LINE) {
203 LOG(WARNING) << "Command line too long for RegisterApplicationRestart"; 203 LOG(WARNING) << "Command line too long for RegisterApplicationRestart";
204 return; 204 return;
205 } 205 }
206 206
207 // Restart Chrome if the computer is restarted as the result of an update. 207 // Restart Chrome if the computer is restarted as the result of an update.
208 // This could be extended to handle crashes, hangs, and patches. 208 // This could be extended to handle crashes, hangs, and patches.
209 HRESULT hr = register_application_restart( 209 HRESULT hr = register_application_restart(
210 command_line.command_line_string().c_str(), 210 command_line.GetCommandLineString().c_str(),
211 RESTART_NO_CRASH | RESTART_NO_HANG | RESTART_NO_PATCH); 211 RESTART_NO_CRASH | RESTART_NO_HANG | RESTART_NO_PATCH);
212 DCHECK(SUCCEEDED(hr)) << "RegisterApplicationRestart failed."; 212 DCHECK(SUCCEEDED(hr)) << "RegisterApplicationRestart failed.";
213 } 213 }
214 214
215 // This method handles the --hide-icons and --show-icons command line options 215 // This method handles the --hide-icons and --show-icons command line options
216 // for chrome that get triggered by Windows from registry entries 216 // for chrome that get triggered by Windows from registry entries
217 // HideIconsCommand & ShowIconsCommand. Chrome doesn't support hide icons 217 // HideIconsCommand & ShowIconsCommand. Chrome doesn't support hide icons
218 // functionality so we just ask the users if they want to uninstall Chrome. 218 // functionality so we just ask the users if they want to uninstall Chrome.
219 int HandleIconsCommands(const CommandLine& parsed_command_line) { 219 int HandleIconsCommands(const CommandLine& parsed_command_line) {
220 if (parsed_command_line.HasSwitch(switches::kHideIcons)) { 220 if (parsed_command_line.HasSwitch(switches::kHideIcons)) {
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 crypto::EnsureNSPRInit(); 313 crypto::EnsureNSPRInit();
314 } 314 }
315 } 315 }
316 }; 316 };
317 317
318 // static 318 // static
319 BrowserMainParts* BrowserMainParts::CreateBrowserMainParts( 319 BrowserMainParts* BrowserMainParts::CreateBrowserMainParts(
320 const MainFunctionParams& parameters) { 320 const MainFunctionParams& parameters) {
321 return new BrowserMainPartsWin(parameters); 321 return new BrowserMainPartsWin(parameters);
322 } 322 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_about_handler.cc ('k') | chrome/browser/chromeos/login/login_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698