summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/app_controller_mac.mm2
-rw-r--r--chrome/browser/browser_init_browsertest.cc2
-rw-r--r--chrome/browser/extensions/extensions_service_unittest.cc4
-rw-r--r--chrome/browser/first_run_win.cc4
-rw-r--r--chrome/browser/images_uitest.cc2
-rw-r--r--chrome/browser/net/chrome_url_request_context_unittest.cc17
-rw-r--r--chrome/browser/process_singleton_win.cc3
-rw-r--r--chrome/browser/shell_integration_win.cc3
-rw-r--r--chrome/browser/user_data_manager.cc4
9 files changed, 20 insertions, 21 deletions
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index db96e05..fcbdb23 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -573,7 +573,7 @@
browser->window()->Show();
}
- CommandLine dummy((std::wstring()));
+ CommandLine dummy(CommandLine::ARGUMENTS_ONLY);
BrowserInit::LaunchWithProfile launch(std::wstring(), dummy);
launch.OpenURLsInBrowser(browser, false, urls);
}
diff --git a/chrome/browser/browser_init_browsertest.cc b/chrome/browser/browser_init_browsertest.cc
index f5337f4..5c6d60a 100644
--- a/chrome/browser/browser_init_browsertest.cc
+++ b/chrome/browser/browser_init_browsertest.cc
@@ -46,7 +46,7 @@ IN_PROC_BROWSER_TEST_F(BrowserInitTest, OpenURLsPopup) {
ASSERT_EQ(popup->type(), Browser::TYPE_POPUP);
ASSERT_EQ(popup, observer.added_browser_);
- CommandLine dummy((std::wstring()));
+ CommandLine dummy(CommandLine::ARGUMENTS_ONLY);
BrowserInit::LaunchWithProfile launch(std::wstring(), dummy);
// This should create a new window, but re-use the profile from |popup|. If
// it used a NULL or invalid profile, it would crash.
diff --git a/chrome/browser/extensions/extensions_service_unittest.cc b/chrome/browser/extensions/extensions_service_unittest.cc
index 44c35c4..45cad68 100644
--- a/chrome/browser/extensions/extensions_service_unittest.cc
+++ b/chrome/browser/extensions/extensions_service_unittest.cc
@@ -1533,7 +1533,7 @@ TEST(ExtensionsServiceTestSimple, Enabledness) {
.AppendASCII(ExtensionsService::kInstallDirectoryName);
// By default, we are enabled.
- command_line.reset(new CommandLine(L""));
+ command_line.reset(new CommandLine(CommandLine::ARGUMENTS_ONLY));
service = new ExtensionsService(&profile, command_line.get(),
profile.GetPrefs(), install_dir, &loop, &loop, false);
EXPECT_TRUE(service->extensions_enabled());
@@ -1561,7 +1561,7 @@ TEST(ExtensionsServiceTestSimple, Enabledness) {
EXPECT_TRUE(recorder.ready());
recorder.set_ready(false);
- command_line.reset(new CommandLine(L""));
+ command_line.reset(new CommandLine(CommandLine::ARGUMENTS_ONLY));
service = new ExtensionsService(&profile, command_line.get(),
profile.GetPrefs(), install_dir, &loop, &loop, false);
EXPECT_FALSE(service->extensions_enabled());
diff --git a/chrome/browser/first_run_win.cc b/chrome/browser/first_run_win.cc
index 2f608b0..6514d872 100644
--- a/chrome/browser/first_run_win.cc
+++ b/chrome/browser/first_run_win.cc
@@ -118,7 +118,7 @@ bool LaunchSetupWithParam(const std::string& param, const std::wstring& value,
exe_path = exe_path.Append(installer_util::kInstallerDir);
exe_path = exe_path.Append(installer_util::kSetupExe);
base::ProcessHandle ph;
- CommandLine cl(exe_path.ToWStringHack());
+ CommandLine cl(exe_path);
cl.AppendSwitchWithValue(param, value);
if (!base::LaunchApp(cl, false, false, &ph))
return false;
@@ -563,7 +563,7 @@ bool DecodeImportParams(const std::wstring& encoded,
bool FirstRun::ImportSettings(Profile* profile, int browser_type,
int items_to_import, HWND parent_window) {
const CommandLine& cmdline = *CommandLine::ForCurrentProcess();
- CommandLine import_cmd(cmdline.program());
+ CommandLine import_cmd(cmdline.GetProgram());
// Propagate user data directory switch.
if (cmdline.HasSwitch(switches::kUserDataDir)) {
import_cmd.AppendSwitchWithValue(
diff --git a/chrome/browser/images_uitest.cc b/chrome/browser/images_uitest.cc
index a9f7605..054ca6e 100644
--- a/chrome/browser/images_uitest.cc
+++ b/chrome/browser/images_uitest.cc
@@ -12,7 +12,7 @@ class ImagesTest : public UITest {
ImagesTest() : UITest() {
FilePath path(test_data_directory_);
path = path.AppendASCII("animated-gifs.html");
- launch_arguments_ = CommandLine(L"");
+ launch_arguments_ = CommandLine(CommandLine::ARGUMENTS_ONLY);
launch_arguments_.AppendLooseValue(path.ToWStringHack());
}
};
diff --git a/chrome/browser/net/chrome_url_request_context_unittest.cc b/chrome/browser/net/chrome_url_request_context_unittest.cc
index e756d79..4b70ca9 100644
--- a/chrome/browser/net/chrome_url_request_context_unittest.cc
+++ b/chrome/browser/net/chrome_url_request_context_unittest.cc
@@ -14,33 +14,34 @@
#define TEST_DESC(desc) StringPrintf("at line %d <%s>", __LINE__, desc)
TEST(ChromeUrlRequestContextTest, CreateProxyConfigTest) {
+ FilePath unused_path(FILE_PATH_LITERAL("foo.exe"));
// Build the input command lines here.
- CommandLine empty(L"foo.exe");
- CommandLine no_proxy(L"foo.exe");
+ CommandLine empty(unused_path);
+ CommandLine no_proxy(unused_path);
no_proxy.AppendSwitch(switches::kNoProxyServer);
- CommandLine no_proxy_extra_params(L"foo.exe");
+ CommandLine no_proxy_extra_params(unused_path);
no_proxy_extra_params.AppendSwitch(switches::kNoProxyServer);
no_proxy_extra_params.AppendSwitchWithValue(switches::kProxyServer,
L"http://proxy:8888");
- CommandLine single_proxy(L"foo.exe");
+ CommandLine single_proxy(unused_path);
single_proxy.AppendSwitchWithValue(switches::kProxyServer,
L"http://proxy:8888");
- CommandLine per_scheme_proxy(L"foo.exe");
+ CommandLine per_scheme_proxy(unused_path);
per_scheme_proxy.AppendSwitchWithValue(switches::kProxyServer,
L"http=httpproxy:8888;ftp=ftpproxy:8889");
- CommandLine per_scheme_proxy_bypass(L"foo.exe");
+ CommandLine per_scheme_proxy_bypass(unused_path);
per_scheme_proxy_bypass.AppendSwitchWithValue(switches::kProxyServer,
L"http=httpproxy:8888;ftp=ftpproxy:8889");
per_scheme_proxy_bypass.AppendSwitchWithValue(
switches::kProxyBypassList,
L".google.com, foo.com:99, 1.2.3.4:22, 127.0.0.1/8");
- CommandLine with_pac_url(L"foo.exe");
+ CommandLine with_pac_url(unused_path);
with_pac_url.AppendSwitchWithValue(switches::kProxyPacUrl,
L"http://wpad/wpad.dat");
with_pac_url.AppendSwitchWithValue(
switches::kProxyBypassList,
L".google.com, foo.com:99, 1.2.3.4:22, 127.0.0.1/8");
- CommandLine with_auto_detect(L"foo.exe");
+ CommandLine with_auto_detect(unused_path);
with_auto_detect.AppendSwitch(switches::kProxyAutoDetect);
// Inspired from proxy_config_service_win_unittest.cc.
diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc
index bf048aa..9997efd 100644
--- a/chrome/browser/process_singleton_win.cc
+++ b/chrome/browser/process_singleton_win.cc
@@ -231,8 +231,7 @@ LRESULT ProcessSingleton::OnCopyData(HWND hwnd, const COPYDATASTRUCT* cds) {
const std::wstring cmd_line =
msg.substr(second_null + 1, third_null - second_null);
- CommandLine parsed_command_line(L"");
- parsed_command_line.ParseFromString(cmd_line);
+ CommandLine parsed_command_line = CommandLine::FromString(cmd_line);
PrefService* prefs = g_browser_process->local_state();
DCHECK(prefs);
diff --git a/chrome/browser/shell_integration_win.cc b/chrome/browser/shell_integration_win.cc
index cebc421..f52a434 100644
--- a/chrome/browser/shell_integration_win.cc
+++ b/chrome/browser/shell_integration_win.cc
@@ -111,8 +111,7 @@ ShellIntegration::DefaultBrowserState ShellIntegration::IsDefaultBrowser() {
if (!key.Valid() || !key.ReadValue(L"", &value))
return UNKNOWN_DEFAULT_BROWSER;
// Need to normalize path in case it's been munged.
- CommandLine command_line(L"");
- command_line.ParseFromString(value);
+ CommandLine command_line = CommandLine::FromString(value);
std::wstring short_path;
GetShortPathName(command_line.program().c_str(),
WriteInto(&short_path, MAX_PATH), MAX_PATH);
diff --git a/chrome/browser/user_data_manager.cc b/chrome/browser/user_data_manager.cc
index 37aa55c..5e9e0e6 100644
--- a/chrome/browser/user_data_manager.cc
+++ b/chrome/browser/user_data_manager.cc
@@ -188,8 +188,8 @@ std::wstring UserDataManager::GetUserDataFolderForProfile(
void UserDataManager::LaunchChromeForProfile(
const std::wstring& profile_name) const {
std::wstring user_data_dir = GetUserDataFolderForProfile(profile_name);
- std::wstring command;
- DeprecatedPathServiceGet(base::FILE_EXE, &command);
+ FilePath command;
+ PathService::Get(base::FILE_EXE, &command);
CommandLine command_line(command);
command_line.AppendSwitch(switches::kEnableUserDataDirProfiles);
command_line.AppendSwitchWithValue(switches::kUserDataDir,