diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-09 20:45:07 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-09 20:45:07 +0000 |
commit | fa7b1e3db23e140dd31a332fb510420449ce09e4 (patch) | |
tree | 39ad1f8688bd7612a206e90d479b29dfdf287218 /chrome/common | |
parent | 8807162a05ecd0c6d6c4659047b1763058cad3c3 (diff) | |
download | chromium_src-fa7b1e3db23e140dd31a332fb510420449ce09e4.zip chromium_src-fa7b1e3db23e140dd31a332fb510420449ce09e4.tar.gz chromium_src-fa7b1e3db23e140dd31a332fb510420449ce09e4.tar.bz2 |
Remove deprecated AbsolutePath function.
Review URL: http://codereview.chromium.org/271037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28593 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/chrome_plugin_util.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/chrome/common/chrome_plugin_util.cc b/chrome/common/chrome_plugin_util.cc index 9258d98..405d885 100644 --- a/chrome/common/chrome_plugin_util.cc +++ b/chrome/common/chrome_plugin_util.cc @@ -127,13 +127,15 @@ CPError CPB_GetCommandLineArgumentsCommon(const char* 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 = FilePath::FromWStringHack( + cmd.GetSwitchValue(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(user_data_dir)) { - arguments_w += std::wstring(L"--") + switches::kUserDataDir + - L"=\"" + user_data_dir + L"\" "; + arguments_w += CommandLine::PrefixedSwitchStringWithValue( + switches::kUserDataDir, + user_data_dir.ToWStringHack()) + L" "; } } @@ -146,7 +148,8 @@ CPError CPB_GetCommandLineArgumentsCommon(const char* url, ReplaceSubstringsAfterOffset(&url_string, 0, ";", ""); ReplaceSubstringsAfterOffset(&url_string, 0, "$", ""); std::wstring url_w = UTF8ToWide(url_string); - arguments_w += std::wstring(L"--") + switches::kApp + L"=\"" + url_w + L"\""; + arguments_w += + CommandLine::PrefixedSwitchStringWithValue(switches::kApp, url_w); *arguments = WideToUTF8(arguments_w); |