Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4171)

Unified Diff: chrome/common/chrome_plugin_util.cc

Issue 18248: CommandLine API rework (Closed)
Patch Set: fixes Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/chrome_plugin_lib.cc ('k') | chrome/common/common_glue.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/chrome_plugin_util.cc
diff --git a/chrome/common/chrome_plugin_util.cc b/chrome/common/chrome_plugin_util.cc
index 56b1f54b3680774adf254e947424293410da385c..610c0b9004c14dd039487c8352c9062574df1efe 100644
--- a/chrome/common/chrome_plugin_util.cc
+++ b/chrome/common/chrome_plugin_util.cc
@@ -121,7 +121,7 @@ int PluginResponseUtils::GetResponseInfo(
CPError CPB_GetCommandLineArgumentsCommon(const char* url,
std::string* arguments) {
- CommandLine cmd;
+ const CommandLine cmd = *CommandLine::ForCurrentProcess();
std::wstring arguments_w;
// Use the same UserDataDir for new launches that we currently have set.
@@ -131,8 +131,8 @@ CPError CPB_GetCommandLineArgumentsCommon(const char* url,
wchar_t user_data_dir_full[MAX_PATH];
if (_wfullpath(user_data_dir_full, user_data_dir.c_str(), MAX_PATH) &&
file_util::PathExists(user_data_dir_full)) {
- CommandLine::AppendSwitchWithValue(
- &arguments_w, switches::kUserDataDir, user_data_dir_full);
+ arguments_w += std::wstring(L"--") + switches::kUserDataDir +
+ L'=' + user_data_dir_full;
}
}
@@ -140,7 +140,7 @@ CPError CPB_GetCommandLineArgumentsCommon(const char* url,
// chrome.
// Note: Do not change this flag! Old Gears shortcuts will break if you do!
std::wstring url_w = UTF8ToWide(url);
- CommandLine::AppendSwitchWithValue(&arguments_w, switches::kApp, url_w);
+ arguments_w += std::wstring(L"--") + switches::kApp + L'=' + url_w;
*arguments = WideToUTF8(arguments_w);
« no previous file with comments | « chrome/common/chrome_plugin_lib.cc ('k') | chrome/common/common_glue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698