diff options
-rw-r--r-- | chrome/app/chrome_dll_main.cc | 4 | ||||
-rw-r--r-- | chrome/browser/browser_main.cc | 4 | ||||
-rw-r--r-- | chrome/plugin/plugin_thread.cc | 5 | ||||
-rw-r--r-- | chrome/test/automated_ui_tests/automated_ui_tests.cc | 6 | ||||
-rw-r--r-- | chrome/test/memory_test/memory_test.cc | 6 | ||||
-rw-r--r-- | chrome/test/reliability/page_load_test.cc | 19 | ||||
-rw-r--r-- | webkit/tools/test_shell/node_leak_test.cc | 7 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_main.cc | 4 |
8 files changed, 23 insertions, 32 deletions
diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc index 8d62ddb..c075d88 100644 --- a/chrome/app/chrome_dll_main.cc +++ b/chrome/app/chrome_dll_main.cc @@ -495,8 +495,8 @@ int ChromeMain(int argc, char** argv) { #endif // Notice a user data directory override if any - const FilePath user_data_dir = FilePath::FromWStringHack( - parsed_command_line.GetSwitchValue(switches::kUserDataDir)); + const FilePath user_data_dir = + parsed_command_line.GetSwitchValuePath(switches::kUserDataDir); if (!user_data_dir.empty()) CHECK(PathService::Override(chrome::DIR_USER_DATA, user_data_dir)); diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index 81d8c7c..b61007a 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -452,8 +452,8 @@ int BrowserMain(const MainFunctionParams& parameters) { // inherit and reset the user's setting. if (!local_state_file_exists && parsed_command_line.HasSwitch(switches::kParentProfile)) { - FilePath parent_profile = FilePath::FromWStringHack( - parsed_command_line.GetSwitchValue(switches::kParentProfile)); + FilePath parent_profile = + parsed_command_line.GetSwitchValuePath(switches::kParentProfile); PrefService parent_local_state(parent_profile); parent_local_state.RegisterStringPref(prefs::kApplicationLocale, std::wstring()); diff --git a/chrome/plugin/plugin_thread.cc b/chrome/plugin/plugin_thread.cc index 6106ee4..914a8ce 100644 --- a/chrome/plugin/plugin_thread.cc +++ b/chrome/plugin/plugin_thread.cc @@ -27,8 +27,9 @@ static base::LazyInstance<base::ThreadLocalPointer<PluginThread> > lazy_tls( PluginThread::PluginThread() : preloaded_plugin_module_(NULL) { - plugin_path_ = FilePath::FromWStringHack( - CommandLine::ForCurrentProcess()->GetSwitchValue(switches::kPluginPath)); + plugin_path_ = + CommandLine::ForCurrentProcess()->GetSwitchValuePath( + switches::kPluginPath); lazy_tls.Pointer()->Set(this); #if defined(OS_LINUX) diff --git a/chrome/test/automated_ui_tests/automated_ui_tests.cc b/chrome/test/automated_ui_tests/automated_ui_tests.cc index b4c8c29..ae7df5d 100644 --- a/chrome/test/automated_ui_tests/automated_ui_tests.cc +++ b/chrome/test/automated_ui_tests/automated_ui_tests.cc @@ -73,8 +73,7 @@ void SilentRuntimeReportHandler(const std::string& str) { FilePath GetInputFilePath() { const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); if (parsed_command_line.HasSwitch(kInputFilePathSwitch)) { - return FilePath::FromWStringHack( - parsed_command_line.GetSwitchValue(kInputFilePathSwitch)); + return parsed_command_line.GetSwitchValuePath(kInputFilePathSwitch); } else { return FilePath(kDefaultInputFilePath); } @@ -83,8 +82,7 @@ FilePath GetInputFilePath() { FilePath GetOutputFilePath() { const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); if (parsed_command_line.HasSwitch(kOutputFilePathSwitch)) { - return FilePath::FromWStringHack( - parsed_command_line.GetSwitchValue(kOutputFilePathSwitch)); + return parsed_command_line.GetSwitchValuePath(kOutputFilePathSwitch); } else { return FilePath(kDefaultOutputFilePath); } diff --git a/chrome/test/memory_test/memory_test.cc b/chrome/test/memory_test/memory_test.cc index 40920ee..966a999 100644 --- a/chrome/test/memory_test/memory_test.cc +++ b/chrome/test/memory_test/memory_test.cc @@ -83,9 +83,9 @@ class MemoryTest : public UITest { launch_arguments_.AppendSwitch(switches::kNoEvents); // Get the specified user data dir (optional) - FilePath profile_dir = FilePath::FromWStringHack( - CommandLine::ForCurrentProcess()->GetSwitchValue( - switches::kUserDataDir)); + FilePath profile_dir = + CommandLine::ForCurrentProcess()->GetSwitchValuePath( + switches::kUserDataDir); if (profile_dir.empty()) { if (!SetupTempDirectory(GetUserDataDirSource())) { diff --git a/chrome/test/reliability/page_load_test.cc b/chrome/test/reliability/page_load_test.cc index ef7f66d..a4d0e5f 100644 --- a/chrome/test/reliability/page_load_test.cc +++ b/chrome/test/reliability/page_load_test.cc @@ -667,10 +667,8 @@ void SetPageRange(const CommandLine& parsed_command_line) { ASSERT_TRUE(g_end_index >= g_start_index); - if (parsed_command_line.HasSwitch(kListSwitch)) { - g_url_file_path = FilePath::FromWStringHack( - parsed_command_line.GetSwitchValue(kListSwitch)); - } + if (parsed_command_line.HasSwitch(kListSwitch)) + g_url_file_path = parsed_command_line.GetSwitchValuePath(kListSwitch); if (parsed_command_line.HasSwitch(kIterationSwitch)) { ASSERT_TRUE( @@ -690,11 +688,8 @@ void SetPageRange(const CommandLine& parsed_command_line) { parsed_command_line.GetSwitchValue(kEndURLSwitch)); } - if (parsed_command_line.HasSwitch(kLogFileSwitch)) { - g_log_file_path = - FilePath::FromWStringHack( - parsed_command_line.GetSwitchValue(kLogFileSwitch)); - } + if (parsed_command_line.HasSwitch(kLogFileSwitch)) + g_log_file_path = parsed_command_line.GetSwitchValuePath(kLogFileSwitch); if (parsed_command_line.HasSwitch(kTimeoutSwitch)) { ASSERT_TRUE( @@ -721,11 +716,9 @@ void SetPageRange(const CommandLine& parsed_command_line) { CommandLine v8_command_line( parsed_command_line.GetSwitchValuePath(switches::kJavaScriptFlags)); if (v8_command_line.HasSwitch(kV8LogFileSwitch)) { - g_v8_log_path = FilePath::FromWStringHack( - v8_command_line.GetSwitchValue(kV8LogFileSwitch)); - if (!file_util::AbsolutePath(&g_v8_log_path)) { + g_v8_log_path = v8_command_line.GetSwitchValuePath(kV8LogFileSwitch); + if (!file_util::AbsolutePath(&g_v8_log_path)) g_v8_log_path = FilePath(); - } } } } diff --git a/webkit/tools/test_shell/node_leak_test.cc b/webkit/tools/test_shell/node_leak_test.cc index bfa0408..ded1f03 100644 --- a/webkit/tools/test_shell/node_leak_test.cc +++ b/webkit/tools/test_shell/node_leak_test.cc @@ -32,8 +32,8 @@ class NodeLeakTest : public TestShellTest { virtual void SetUp() { const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); - FilePath cache_path = FilePath::FromWStringHack( - parsed_command_line.GetSwitchValue(test_shell::kCacheDir)); + FilePath cache_path = + parsed_command_line.GetSwitchValuePath(test_shell::kCacheDir); if (cache_path.empty()) { PathService::Get(base::DIR_EXE, &cache_path); cache_path = cache_path.AppendASCII("cache"); @@ -75,9 +75,8 @@ class NodeLeakTest : public TestShellTest { TEST_F(NodeLeakTest, TestURL) { const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); - if (parsed_command_line.HasSwitch(kTestUrlSwitch)) { + if (parsed_command_line.HasSwitch(kTestUrlSwitch)) NavigateToURL(parsed_command_line.GetSwitchValue(kTestUrlSwitch).c_str()); - } } } // namespace diff --git a/webkit/tools/test_shell/test_shell_main.cc b/webkit/tools/test_shell/test_shell_main.cc index bd9a5b0..d3db465 100644 --- a/webkit/tools/test_shell/test_shell_main.cc +++ b/webkit/tools/test_shell/test_shell_main.cc @@ -135,8 +135,8 @@ int main(int argc, char* argv[]) { parsed_command_line.HasSwitch(test_shell::kEnableFileCookies)) net::CookieMonster::EnableFileScheme(); - FilePath cache_path = FilePath::FromWStringHack( - parsed_command_line.GetSwitchValue(test_shell::kCacheDir)); + FilePath cache_path = + parsed_command_line.GetSwitchValuePath(test_shell::kCacheDir); // If the cache_path is empty and it's layout_test_mode, leave it empty // so we use an in-memory cache. This makes running multiple test_shells // in parallel less flaky. |