diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-08 17:49:05 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-08 17:49:05 +0000 |
commit | 63597e4ebc117bb561b93f4d775d787120e6728a (patch) | |
tree | a4825625ef2ff06b339e56a30fa5ae80aea29160 /chrome/browser/shell_integration.cc | |
parent | c48abb01ae7e295e283f190bd05270e835b8d37f (diff) | |
download | chromium_src-63597e4ebc117bb561b93f4d775d787120e6728a.zip chromium_src-63597e4ebc117bb561b93f4d775d787120e6728a.tar.gz chromium_src-63597e4ebc117bb561b93f4d775d787120e6728a.tar.bz2 |
Deprecate most of the remaining wstring file_util functions.
These still exist on Windows due to being used by the installer,
but by moving them into the Windows-only block we prevent them
from being used in new code. (I am already finding new code using
some of these! I am glad to be rid of them.)
BUG=24672
Review URL: http://codereview.chromium.org/2850042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51862 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/shell_integration.cc')
-rw-r--r-- | chrome/browser/shell_integration.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/chrome/browser/shell_integration.cc b/chrome/browser/shell_integration.cc index 23d9fcb..492bb06 100644 --- a/chrome/browser/shell_integration.cc +++ b/chrome/browser/shell_integration.cc @@ -18,13 +18,15 @@ std::string ShellIntegration::GetCommandLineArgumentsCommon(const GURL& url, std::wstring arguments_w; // Use the same UserDataDir for new launches that we currently have set. - std::wstring user_data_dir = cmd.GetSwitchValue(switches::kUserDataDir); - if (!user_data_dir.empty()) { + FilePath user_data_dir = cmd.GetSwitchValuePath(switches::kUserDataDir); + if (!user_data_dir.value().empty()) { // Make sure user_data_dir is an absolute path. if (file_util::AbsolutePath(&user_data_dir) && - file_util::PathExists(FilePath::FromWStringHack(user_data_dir))) { + file_util::PathExists(user_data_dir)) { + // TODO: This is wrong in pathological quoting scenarios; we shouldn't be + // passing around command lines as strings at all. arguments_w += std::wstring(L"--") + ASCIIToWide(switches::kUserDataDir) + - L"=\"" + user_data_dir + L"\" "; + L"=\"" + user_data_dir.ToWStringHack() + L"\" "; } } |