From 0fd23af4dea39eb8abc01d4202e6e4fb6bc37cc1 Mon Sep 17 00:00:00 2001 From: "msw@chromium.org" Date: Sun, 20 Feb 2011 06:33:04 +0000 Subject: Register Application Restart with Windows Restart Manager on browser_main startup for Windows Vista / Server 2008 and beyond. This launches Chrome and restores tabs if the computer is restarted as the result of an update. Use GetFunctionPointer/GetProcAddress to avoid XP link and run errors. Make changes to support necessary CommandLine operations. Other minor cleanup and refactoring. BUG=70824 TEST=Reboot from update or ::ExitWindowsEx(EWX_RESTARTAPPS... Chrome should restart and restore tabs on login. Test launching Chrome with a variety of command-line switches and arguments. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=75405 Review URL: http://codereview.chromium.org/6462024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75516 0039d316-1c4b-4281-b951-d872f2087c98 --- base/command_line.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'base/command_line.h') diff --git a/base/command_line.h b/base/command_line.h index b8bbba9..db61458 100644 --- a/base/command_line.h +++ b/base/command_line.h @@ -129,11 +129,13 @@ class CommandLine { void AppendSwitch(const std::string& switch_string); // Append a switch and value to the command line. + // CAUTION! Appending a switch after the "--" kSwitchTerminator is futile! void AppendSwitchPath(const std::string& switch_string, const FilePath& path); void AppendSwitchNative(const std::string& switch_string, const StringType& value); void AppendSwitchASCII(const std::string& switch_string, const std::string& value); + void AppendSwitches(const CommandLine& other); // Append an argument to the command line. // Note on quoting: the argument will be quoted properly such that it is @@ -143,6 +145,7 @@ class CommandLine { void AppendArg(const std::string& value); void AppendArgPath(const FilePath& value); void AppendArgNative(const StringType& value); + void AppendArgs(const CommandLine& other); // Append the arguments from another command line to this one. // If |include_program| is true, include |other|'s program as well. -- cgit v1.1