diff options
Diffstat (limited to 'chrome')
29 files changed, 57 insertions, 57 deletions
diff --git a/chrome/app/chrome_main.cc b/chrome/app/chrome_main.cc index 3b45594..dff8ad0 100644 --- a/chrome/app/chrome_main.cc +++ b/chrome/app/chrome_main.cc @@ -608,7 +608,7 @@ int ChromeMain(int argc, char** argv) { #if defined(OS_WIN) // Must do this before any other usage of command line! - if (HasDeprecatedArguments(command_line.command_line_string())) + if (HasDeprecatedArguments(command_line.GetCommandLineString())) return 1; #endif diff --git a/chrome/browser/about_flags_unittest.cc b/chrome/browser/about_flags_unittest.cc index 21a85cb..180e46f 100644 --- a/chrome/browser/about_flags_unittest.cc +++ b/chrome/browser/about_flags_unittest.cc @@ -250,8 +250,7 @@ TEST_F(AboutFlagsTest, CheckValues) { // Convert the flags to switches. ConvertFlagsToSwitches(&prefs_, &command_line); EXPECT_TRUE(command_line.HasSwitch(kSwitch1)); - EXPECT_EQ(std::string(""), - command_line.GetSwitchValueASCII(kSwitch1)); + EXPECT_EQ(std::string(""), command_line.GetSwitchValueASCII(kSwitch1)); EXPECT_TRUE(command_line.HasSwitch(kSwitch2)); EXPECT_EQ(std::string(kValueForSwitch2), command_line.GetSwitchValueASCII(kSwitch2)); @@ -262,11 +261,11 @@ TEST_F(AboutFlagsTest, CheckValues) { std::string("="); #if defined(OS_WIN) EXPECT_EQ(std::wstring::npos, - command_line.command_line_string().find( + command_line.GetCommandLineString().find( ASCIIToWide(switch1_with_equals))); #else EXPECT_EQ(std::string::npos, - command_line.command_line_string().find(switch1_with_equals)); + command_line.GetCommandLineString().find(switch1_with_equals)); #endif // And confirm there is a '=' for switches with values. @@ -275,11 +274,11 @@ TEST_F(AboutFlagsTest, CheckValues) { std::string("="); #if defined(OS_WIN) EXPECT_NE(std::wstring::npos, - command_line.command_line_string().find( + command_line.GetCommandLineString().find( ASCIIToWide(switch2_with_equals))); #else EXPECT_NE(std::string::npos, - command_line.command_line_string().find(switch2_with_equals)); + command_line.GetCommandLineString().find(switch2_with_equals)); #endif // And it should persist diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc index 378072a..a150ee0 100644 --- a/chrome/browser/automation/testing_automation_provider.cc +++ b/chrome/browser/automation/testing_automation_provider.cc @@ -2619,7 +2619,7 @@ void TestingAutomationProvider::GetBrowserInfo( properties->SetString("HelperProcessExecutablePath", chrome::kHelperProcessExecutablePath); properties->SetString("command_line_string", - CommandLine::ForCurrentProcess()->command_line_string()); + CommandLine::ForCurrentProcess()->GetCommandLineString()); FilePath dumps_path; PathService::Get(chrome::DIR_CRASH_DUMPS, &dumps_path); properties->SetString("DIR_CRASH_DUMPS", dumps_path.value()); diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc index 8b6f8ae..65c1d08 100644 --- a/chrome/browser/browser_about_handler.cc +++ b/chrome/browser/browser_about_handler.cc @@ -1136,7 +1136,7 @@ std::string AboutVersionStrings(DictionaryValue* localized_strings, #if defined(OS_WIN) localized_strings->SetString("command_line", - WideToUTF16(CommandLine::ForCurrentProcess()->command_line_string())); + WideToUTF16(CommandLine::ForCurrentProcess()->GetCommandLineString())); #elif defined(OS_POSIX) std::string command_line = ""; typedef std::vector<std::string> ArgvList; diff --git a/chrome/browser/browser_main_win.cc b/chrome/browser/browser_main_win.cc index 0f52bea..8a27a79 100644 --- a/chrome/browser/browser_main_win.cc +++ b/chrome/browser/browser_main_win.cc @@ -199,7 +199,7 @@ void RegisterApplicationRestart(const CommandLine& parsed_command_line) { command_line.AppendArguments(parsed_command_line, false); if (!command_line.HasSwitch(switches::kRestoreLastSession)) command_line.AppendSwitch(switches::kRestoreLastSession); - if (command_line.command_line_string().length() > RESTART_MAX_CMD_LINE) { + if (command_line.GetCommandLineString().length() > RESTART_MAX_CMD_LINE) { LOG(WARNING) << "Command line too long for RegisterApplicationRestart"; return; } @@ -207,7 +207,7 @@ void RegisterApplicationRestart(const CommandLine& parsed_command_line) { // Restart Chrome if the computer is restarted as the result of an update. // This could be extended to handle crashes, hangs, and patches. HRESULT hr = register_application_restart( - command_line.command_line_string().c_str(), + command_line.GetCommandLineString().c_str(), RESTART_NO_CRASH | RESTART_NO_HANG | RESTART_NO_PATCH); DCHECK(SUCCEEDED(hr)) << "RegisterApplicationRestart failed."; } diff --git a/chrome/browser/chromeos/login/login_utils.cc b/chrome/browser/chromeos/login/login_utils.cc index 28644d5..4623533 100644 --- a/chrome/browser/chromeos/login/login_utils.cc +++ b/chrome/browser/chromeos/login/login_utils.cc @@ -543,7 +543,7 @@ std::string LoginUtilsImpl::GetOffTheRecordCommandLine( switches::kHomePage, GURL(chrome::kChromeUINewTabURL).spec()); - std::string cmd_line_str = command_line->command_line_string(); + std::string cmd_line_str = command_line->GetCommandLineString(); // Special workaround for the arguments that should be quoted. // Copying switches won't be needed when Guest mode won't need restart // http://crosbug.com/6924 diff --git a/chrome/browser/chromeos/system/name_value_pairs_parser.cc b/chrome/browser/chromeos/system/name_value_pairs_parser.cc index 700ebac..f7a4683 100644 --- a/chrome/browser/chromeos/system/name_value_pairs_parser.cc +++ b/chrome/browser/chromeos/system/name_value_pairs_parser.cc @@ -72,7 +72,7 @@ bool NameValuePairsParser::GetSingleValueFromTool(int argc, // TODO(stevenjb,satorux): Make this non blocking: crosbug.com/5603. base::ThreadRestrictions::ScopedAllowIO allow_io_for_thread_join; if (argc < 1 || !base::GetAppOutput(command_line, &output_string)) { - LOG(WARNING) << "Error excuting: " << command_line.command_line_string(); + LOG(WARNING) << "Error excuting: " << command_line.GetCommandLineString(); return false; } TrimWhitespaceASCII(output_string, TRIM_ALL, &output_string); @@ -90,12 +90,12 @@ bool NameValuePairsParser::ParseNameValuePairsFromTool( // TODO(stevenjb,satorux): Make this non blocking: crosbug.com/5603. base::ThreadRestrictions::ScopedAllowIO allow_io_for_thread_join; if (argc < 1 || !base::GetAppOutput(command_line, &output_string)) { - LOG(WARNING) << "Error excuting: " << command_line.command_line_string(); + LOG(WARNING) << "Error excuting: " << command_line.GetCommandLineString(); return false; } if (!ParseNameValuePairs(output_string, eq, delim)) { LOG(WARNING) << "Error parsing values while excuting: " - << command_line.command_line_string(); + << command_line.GetCommandLineString(); return false; } return true; diff --git a/chrome/browser/jumplist_win.cc b/chrome/browser/jumplist_win.cc index 577ccf5..1336ee6 100644 --- a/chrome/browser/jumplist_win.cc +++ b/chrome/browser/jumplist_win.cc @@ -430,7 +430,7 @@ bool UpdateJumpList(const wchar_t* app_id, if (!user_data_dir.empty()) command_line.AppendSwitchPath(switches::kUserDataDir, user_data_dir); - std::wstring chrome_switches = command_line.command_line_string(); + std::wstring chrome_switches = command_line.GetCommandLineString(); // We allocate 60% of the given JumpList slots to "most-visited" items // and 40% to "recently-closed" items, respectively. diff --git a/chrome/browser/safe_browsing/safe_browsing_test.cc b/chrome/browser/safe_browsing/safe_browsing_test.cc index 9ee6b9a..826db15 100644 --- a/chrome/browser/safe_browsing/safe_browsing_test.cc +++ b/chrome/browser/safe_browsing/safe_browsing_test.cc @@ -151,7 +151,7 @@ class SafeBrowsingTestServer { #endif if (!base::LaunchProcess(cmd_line, options, &server_handle_)) { LOG(ERROR) << "Failed to launch server: " - << cmd_line.command_line_string(); + << cmd_line.GetCommandLineString(); return false; } return true; diff --git a/chrome/browser/ui/webui/gpu_internals_ui.cc b/chrome/browser/ui/webui/gpu_internals_ui.cc index 09a01ed..ba902f9 100644 --- a/chrome/browser/ui/webui/gpu_internals_ui.cc +++ b/chrome/browser/ui/webui/gpu_internals_ui.cc @@ -467,7 +467,7 @@ Value* GpuMessageHandler::OnRequestClientInfo(const ListValue* list) { IDS_ABOUT_VERSION_UNOFFICIAL)); dict->SetString("command_line", - CommandLine::ForCurrentProcess()->command_line_string()); + CommandLine::ForCurrentProcess()->GetCommandLineString()); } dict->SetString("blacklist_version", diff --git a/chrome/browser/ui/webui/net_internals_ui.cc b/chrome/browser/ui/webui/net_internals_ui.cc index a4341b2..a742d02 100644 --- a/chrome/browser/ui/webui/net_internals_ui.cc +++ b/chrome/browser/ui/webui/net_internals_ui.cc @@ -1503,7 +1503,7 @@ Value* NetInternalsUI::GetConstants() { "unofficial"); dict->SetString("os_type", version_info.OSType()); dict->SetString("command_line", - CommandLine::ForCurrentProcess()->command_line_string()); + CommandLine::ForCurrentProcess()->GetCommandLineString()); } constants_dict->Set("clientInfo", dict); diff --git a/chrome/browser/ui/webui/options/about_page_handler.cc b/chrome/browser/ui/webui/options/about_page_handler.cc index e50e008..3ca941e 100644 --- a/chrome/browser/ui/webui/options/about_page_handler.cc +++ b/chrome/browser/ui/webui/options/about_page_handler.cc @@ -241,7 +241,7 @@ void AboutPageHandler::GetLocalizedValues(DictionaryValue* localized_strings) { #if defined(OS_WIN) localized_strings->SetString("command_line_info", - WideToUTF16(CommandLine::ForCurrentProcess()->command_line_string())); + WideToUTF16(CommandLine::ForCurrentProcess()->GetCommandLineString())); #elif defined(OS_POSIX) // TODO(viettrungluu): something horrible might happen if there are non-UTF-8 // arguments (since |SetString()| requires Unicode). diff --git a/chrome/browser/ui/webui/options/options_ui.cc b/chrome/browser/ui/webui/options/options_ui.cc index b8eb577..538bf41 100644 --- a/chrome/browser/ui/webui/options/options_ui.cc +++ b/chrome/browser/ui/webui/options/options_ui.cc @@ -300,10 +300,11 @@ void OptionsUI::RenderViewCreated(RenderViewHost* render_view_host) { std::string command_line_string; #if defined(OS_WIN) - std::wstring wstr = CommandLine::ForCurrentProcess()->command_line_string(); + std::wstring wstr = CommandLine::ForCurrentProcess()->GetCommandLineString(); command_line_string = WideToASCII(wstr); #else - command_line_string = CommandLine::ForCurrentProcess()->command_line_string(); + command_line_string = + CommandLine::ForCurrentProcess()->GetCommandLineString(); #endif render_view_host->SetWebUIProperty("commandLineString", command_line_string); diff --git a/chrome/browser/web_applications/web_app.cc b/chrome/browser/web_applications/web_app.cc index cbae635..65ffafe 100644 --- a/chrome/browser/web_applications/web_app.cc +++ b/chrome/browser/web_applications/web_app.cc @@ -334,7 +334,7 @@ bool CreateShortcutTask::CreateShortcut() { // properly quoted for a Windows command line. The method on // CommandLine should probably be renamed to better reflect that // fact. - std::wstring wide_switches(cmd_line.command_line_string()); + std::wstring wide_switches(cmd_line.GetCommandLineString()); // Sanitize description if (shortcut_info_.description.length() >= MAX_PATH) diff --git a/chrome/common/service_process_util_linux.cc b/chrome/common/service_process_util_linux.cc index fe3d04f..ab5957e 100644 --- a/chrome/common/service_process_util_linux.cc +++ b/chrome/common/service_process_util_linux.cc @@ -101,7 +101,7 @@ bool ServiceProcessState::AddToAutoRun() { return AutoStart::AddApplication( GetServiceProcessScopedName(GetBaseDesktopName()), app_name, - autorun_command_line_->command_line_string(), + autorun_command_line_->GetCommandLineString(), false); } diff --git a/chrome/common/service_process_util_win.cc b/chrome/common/service_process_util_win.cc index 1050f1e..2d5db85 100644 --- a/chrome/common/service_process_util_win.cc +++ b/chrome/common/service_process_util_win.cc @@ -153,7 +153,7 @@ bool ServiceProcessState::AddToAutoRun() { return base::win::AddCommandToAutoRun( HKEY_CURRENT_USER, UTF8ToWide(GetServiceProcessAutoRunKey()), - autorun_command_line_->command_line_string()); + autorun_command_line_->GetCommandLineString()); } bool ServiceProcessState::RemoveFromAutoRun() { diff --git a/chrome/common/switch_utils_unittest.cc b/chrome/common/switch_utils_unittest.cc index 49f2c38..74bc8af 100644 --- a/chrome/common/switch_utils_unittest.cc +++ b/chrome/common/switch_utils_unittest.cc @@ -20,7 +20,7 @@ TEST(SwitchUtilsTest, RemoveSwitches) { FILE_PATH_LITERAL("--foo"), FILE_PATH_LITERAL("--bar")}; CommandLine cmd_line(arraysize(argv), argv); - EXPECT_FALSE(cmd_line.command_line_string().empty()); + EXPECT_FALSE(cmd_line.GetCommandLineString().empty()); std::map<std::string, CommandLine::StringType> switches = cmd_line.GetSwitches(); @@ -45,7 +45,7 @@ TEST(SwitchUtilsTest, RemoveSwitchesFromString) { L" --make-default-browser" L" --foo" L" --bar"); - EXPECT_FALSE(cmd_line.command_line_string().empty()); + EXPECT_FALSE(cmd_line.GetCommandLineString().empty()); std::map<std::string, CommandLine::StringType> switches = cmd_line.GetSwitches(); diff --git a/chrome/installer/setup/install.cc b/chrome/installer/setup/install.cc index 720e346..5a619f0 100644 --- a/chrome/installer/setup/install.cc +++ b/chrome/installer/setup/install.cc @@ -167,7 +167,7 @@ bool CreateOrUpdateChromeShortcuts(const InstallerState& installer_state, ret = file_util::CreateShortcutLink(setup_exe.value().c_str(), uninstall_link.value().c_str(), NULL, - arguments.command_line_string().c_str(), + arguments.GetCommandLineString().c_str(), NULL, setup_exe.value().c_str(), 0, diff --git a/chrome/installer/setup/install_worker.cc b/chrome/installer/setup/install_worker.cc index 8027f43..60c0127 100644 --- a/chrome/installer/setup/install_worker.cc +++ b/chrome/installer/setup/install_worker.cc @@ -158,13 +158,13 @@ void AddUninstallShortcutWorkItems(const InstallerState& installer_state, installer::kUninstallStringField, installer_path.value(), true); install_list->AddSetRegValueWorkItem(reg_root, update_state_key, installer::kUninstallArgumentsField, - uninstall_arguments.command_line_string(), true); + uninstall_arguments.GetCommandLineString(), true); // MSI installations will manage their own uninstall shortcuts. if (!installer_state.is_msi() && product.ShouldCreateUninstallEntry()) { // We need to quote the command line for the Add/Remove Programs dialog. CommandLine quoted_uninstall_cmd(installer_path); - DCHECK_EQ(quoted_uninstall_cmd.command_line_string()[0], '"'); + DCHECK_EQ(quoted_uninstall_cmd.GetCommandLineString()[0], '"'); quoted_uninstall_cmd.AppendArguments(uninstall_arguments, false); std::wstring uninstall_reg = browser_dist->GetUninstallRegPath(); @@ -174,7 +174,7 @@ void AddUninstallShortcutWorkItems(const InstallerState& installer_state, browser_dist->GetAppShortCutName(), true); install_list->AddSetRegValueWorkItem(reg_root, uninstall_reg, installer::kUninstallStringField, - quoted_uninstall_cmd.command_line_string(), true); + quoted_uninstall_cmd.GetCommandLineString(), true); install_list->AddSetRegValueWorkItem(reg_root, uninstall_reg, L"InstallLocation", @@ -589,7 +589,7 @@ bool AppendPostInstallTasks(const InstallerState& installer_state, root, version_key, google_update::kRegRenameCmdField, - product_rename_cmd.command_line_string(), + product_rename_cmd.GetCommandLineString(), true); } @@ -888,17 +888,17 @@ void AddChromeFrameWorkItems(const InstallationState& original_state, list->AddSetRegValueWorkItem(root, version_key, google_update::kRegCFTempOptOutCmdField, - temp_opt_out.command_line_string(), true); + temp_opt_out.GetCommandLineString(), true); list->AddSetRegValueWorkItem(root, version_key, google_update::kRegCFEndTempOptOutCmdField, - end_temp_opt_out.command_line_string(), + end_temp_opt_out.GetCommandLineString(), true); list->AddSetRegValueWorkItem(root, version_key, google_update::kRegCFOptOutCmdField, - opt_out.command_line_string(), true); + opt_out.GetCommandLineString(), true); list->AddSetRegValueWorkItem(root, version_key, google_update::kRegCFOptInCmdField, - opt_in.command_line_string(), true); + opt_in.GetCommandLineString(), true); } else { // If Chrome is not also being uninstalled, we need to update its command // line so that it doesn't include uninstalling Chrome Frame now. @@ -1196,7 +1196,7 @@ void AddQuickEnableWorkItems(const InstallerState& installer_state, if (installer_state.verbose_logging()) cmd_line.AppendSwitch(switches::kVerboseLogging); cmd_line.AppendSwitch(switches::kChromeFrameQuickEnable); - AppCommand cmd(cmd_line.command_line_string(), true, true); + AppCommand cmd(cmd_line.GetCommandLineString(), true, true); cmd.AddWorkItems(installer_state.root_key(), cmd_key, work_item_list); } else { DCHECK(operation == REMOVE_COMMAND); diff --git a/chrome/installer/setup/setup_main.cc b/chrome/installer/setup/setup_main.cc index 7300c1e..e180b42 100644 --- a/chrome/installer/setup/setup_main.cc +++ b/chrome/installer/setup/setup_main.cc @@ -1159,7 +1159,7 @@ int WINAPI wWinMain(HINSTANCE instance, HINSTANCE prev_instance, installer::InitInstallerLogging(prefs); const CommandLine& cmd_line = *CommandLine::ForCurrentProcess(); - VLOG(1) << "Command Line: " << cmd_line.command_line_string(); + VLOG(1) << "Command Line: " << cmd_line.GetCommandLineString(); VLOG(1) << "multi install is " << prefs.is_multi_install(); bool system_install = false; diff --git a/chrome/installer/util/google_chrome_distribution.cc b/chrome/installer/util/google_chrome_distribution.cc index 5b8489d..e5efb86 100644 --- a/chrome/installer/util/google_chrome_distribution.cc +++ b/chrome/installer/util/google_chrome_distribution.cc @@ -767,7 +767,7 @@ void GoogleChromeDistribution::InactiveUserToastExperiment(int flavor, // The command line should now have the url added as: // "chrome.exe -- <url>" DCHECK_NE(std::wstring::npos, - options.command_line_string().find(L" -- " + url)); + options.GetCommandLineString().find(L" -- " + url)); } // Launch chrome now. It will show the toast UI. int32 exit_code = 0; diff --git a/chrome/installer/util/install_util.cc b/chrome/installer/util/install_util.cc index 8406c3b..95bc66c 100644 --- a/chrome/installer/util/install_util.cc +++ b/chrome/installer/util/install_util.cc @@ -118,7 +118,7 @@ bool InstallUtil::ExecuteExeAsAdmin(const CommandLine& cmd, DWORD* exit_code) { DCHECK(!program.empty()); DCHECK_NE(program[0], L'\"'); - CommandLine::StringType params(cmd.command_line_string()); + CommandLine::StringType params(cmd.GetCommandLineString()); if (params[0] == '"') { DCHECK_EQ('"', params[program.length() + 1]); DCHECK_EQ(program, params.substr(1, program.length())); diff --git a/chrome/installer/util/installation_validator.cc b/chrome/installer/util/installation_validator.cc index 5a26b0f..2d109fe 100644 --- a/chrome/installer/util/installation_validator.cc +++ b/chrome/installer/util/installation_validator.cc @@ -390,7 +390,7 @@ void InstallationValidator::ValidateCommandExpectations( << (expectation.second ? " is missing" : " has") << " \"" << expectation.first << "\"" << (expectation.second ? "" : " but shouldn't") << ": " - << command.command_line_string(); + << command.GetCommandLineString(); } } } diff --git a/chrome/installer/util/installation_validator_unittest.cc b/chrome/installer/util/installation_validator_unittest.cc index f404baa..f4ff1e5 100644 --- a/chrome/installer/util/installation_validator_unittest.cc +++ b/chrome/installer/util/installation_validator_unittest.cc @@ -211,7 +211,7 @@ void FakeProductState::AddQuickEnableCfCommand( cmd_line.AppendSwitch(installer::switches::kSystemLevel); cmd_line.AppendSwitch(installer::switches::kChromeFrameQuickEnable); commands_.Set(installer::kCmdQuickEnableCf, - AppCommand(cmd_line.command_line_string(), true, true)); + AppCommand(cmd_line.GetCommandLineString(), true, true)); } // Removes the "quick-enable-cf" Google Update product command. diff --git a/chrome/installer/util/product.cc b/chrome/installer/util/product.cc index eb5286d..63299f1 100644 --- a/chrome/installer/util/product.cc +++ b/chrome/installer/util/product.cc @@ -79,15 +79,14 @@ bool Product::LaunchChromeAndWait(const FilePath& application_path, bool success = false; STARTUPINFOW si = { sizeof(si) }; PROCESS_INFORMATION pi = {0}; - // Cast away constness of the command_line_string() since CreateProcess - // might modify the string (insert \0 to separate the program from the - // arguments). Since we're not using the cmd variable beyond this point - // we don't care. + // Create a writable copy of the command line string, since CreateProcess may + // modify the string (insert \0 to separate the program from the arguments). + std::wstring writable_command_line_string(cmd.GetCommandLineString()); if (!::CreateProcess(cmd.GetProgram().value().c_str(), - const_cast<wchar_t*>(cmd.command_line_string().c_str()), + &writable_command_line_string[0], NULL, NULL, FALSE, CREATE_NO_WINDOW, NULL, NULL, &si, &pi)) { - PLOG(ERROR) << "Failed to launch: " << cmd.command_line_string(); + PLOG(ERROR) << "Failed to launch: " << cmd.GetCommandLineString(); } else { ::CloseHandle(pi.hThread); diff --git a/chrome/installer/util/product_state_unittest.cc b/chrome/installer/util/product_state_unittest.cc index ad81ed8..1c8400d 100644 --- a/chrome/installer/util/product_state_unittest.cc +++ b/chrome/installer/util/product_state_unittest.cc @@ -283,7 +283,7 @@ TEST_F(ProductStateTest, InitializeUninstallCommand) { ApplyUninstallCommand(NULL, NULL); EXPECT_TRUE(state.Initialize(system_install_, dist_)); EXPECT_TRUE(state.GetSetupPath().empty()); - EXPECT_TRUE(state.uninstall_command().command_line_string().empty()); + EXPECT_TRUE(state.uninstall_command().GetCommandLineString().empty()); EXPECT_TRUE(state.uninstall_command().GetSwitches().empty()); } @@ -293,7 +293,7 @@ TEST_F(ProductStateTest, InitializeUninstallCommand) { ApplyUninstallCommand(L"", L""); EXPECT_TRUE(state.Initialize(system_install_, dist_)); EXPECT_TRUE(state.GetSetupPath().empty()); - EXPECT_TRUE(state.uninstall_command().command_line_string().empty()); + EXPECT_TRUE(state.uninstall_command().GetCommandLineString().empty()); EXPECT_TRUE(state.uninstall_command().GetSwitches().empty()); } @@ -303,7 +303,8 @@ TEST_F(ProductStateTest, InitializeUninstallCommand) { ApplyUninstallCommand(NULL, L"--uninstall"); EXPECT_TRUE(state.Initialize(system_install_, dist_)); EXPECT_TRUE(state.GetSetupPath().empty()); - EXPECT_EQ(L" --uninstall", state.uninstall_command().command_line_string()); + EXPECT_EQ(L" --uninstall", + state.uninstall_command().GetCommandLineString()); EXPECT_EQ(1U, state.uninstall_command().GetSwitches().size()); } @@ -313,7 +314,7 @@ TEST_F(ProductStateTest, InitializeUninstallCommand) { ApplyUninstallCommand(L"setup.exe", NULL); EXPECT_TRUE(state.Initialize(system_install_, dist_)); EXPECT_EQ(L"setup.exe", state.GetSetupPath().value()); - EXPECT_EQ(L"setup.exe", state.uninstall_command().command_line_string()); + EXPECT_EQ(L"setup.exe", state.uninstall_command().GetCommandLineString()); EXPECT_TRUE(state.uninstall_command().GetSwitches().empty()); } @@ -324,7 +325,7 @@ TEST_F(ProductStateTest, InitializeUninstallCommand) { EXPECT_TRUE(state.Initialize(system_install_, dist_)); EXPECT_EQ(L"set up.exe", state.GetSetupPath().value()); EXPECT_EQ(L"\"set up.exe\"", - state.uninstall_command().command_line_string()); + state.uninstall_command().GetCommandLineString()); EXPECT_TRUE(state.uninstall_command().GetSwitches().empty()); } @@ -335,7 +336,7 @@ TEST_F(ProductStateTest, InitializeUninstallCommand) { EXPECT_TRUE(state.Initialize(system_install_, dist_)); EXPECT_EQ(L"setup.exe", state.GetSetupPath().value()); EXPECT_EQ(L"setup.exe --uninstall", - state.uninstall_command().command_line_string()); + state.uninstall_command().GetCommandLineString()); EXPECT_EQ(1U, state.uninstall_command().GetSwitches().size()); } } diff --git a/chrome/nacl/nacl_main.cc b/chrome/nacl/nacl_main.cc index 6d882d3..fcb5f28 100644 --- a/chrome/nacl/nacl_main.cc +++ b/chrome/nacl/nacl_main.cc @@ -43,7 +43,7 @@ int NaClBrokerMain(const MainFunctionParams& parameters) { const CommandLine& parsed_command_line = parameters.command_line_; DVLOG(1) << "Started NaCL broker with " - << parsed_command_line.command_line_string(); + << parsed_command_line.GetCommandLineString(); // NOTE: this code is duplicated from browser_main.cc // IMPORTANT: This piece of code needs to run as early as possible in the diff --git a/chrome/nacl/nacl_main_platform_delegate_win.cc b/chrome/nacl/nacl_main_platform_delegate_win.cc index 02feff0..75b3dc9 100644 --- a/chrome/nacl/nacl_main_platform_delegate_win.cc +++ b/chrome/nacl/nacl_main_platform_delegate_win.cc @@ -31,7 +31,7 @@ void NaClMainPlatformDelegate::PlatformUninitialize() { void NaClMainPlatformDelegate::InitSandboxTests(bool no_sandbox) { const CommandLine& command_line = parameters_.command_line_; - DVLOG(1) << "Started NaClLdr with " << command_line.command_line_string(); + DVLOG(1) << "Started NaClLdr with " << command_line.GetCommandLineString(); sandbox::TargetServices* target_services = parameters_.sandbox_info_.TargetServices(); diff --git a/chrome/service/service_main.cc b/chrome/service/service_main.cc index 7ddddf8..9242c17 100644 --- a/chrome/service/service_main.cc +++ b/chrome/service/service_main.cc @@ -24,7 +24,7 @@ int ServiceProcessMain(const MainFunctionParams& parameters) { } VLOG(1) << "Service process launched: " - << parameters.command_line_.command_line_string(); + << parameters.command_line_.GetCommandLineString(); #if defined(OS_MACOSX) chrome_application_mac::RegisterCrApp(); |