diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-01 03:19:10 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-01 03:19:10 +0000 |
commit | fcc23e84efb0aa42e00f79d5fa1798b5604d7a28 (patch) | |
tree | 374fad3d8a1b0ea31fd0e5c74372c0e76c54f78d /chrome/common | |
parent | b876c7db6bc09c93c9396c2995a5885f61dcdf9e (diff) | |
download | chromium_src-fcc23e84efb0aa42e00f79d5fa1798b5604d7a28.zip chromium_src-fcc23e84efb0aa42e00f79d5fa1798b5604d7a28.tar.gz chromium_src-fcc23e84efb0aa42e00f79d5fa1798b5604d7a28.tar.bz2 |
GTK: improve app mode .desktop file creation.
1) pass --user-data-dir when appropriate
2) don't overwrite old .desktop files that share the same name.
BUG=23353
Review URL: http://codereview.chromium.org/255016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27700 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/chrome_plugin_util.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/chrome/common/chrome_plugin_util.cc b/chrome/common/chrome_plugin_util.cc index 377dc8e..9258d98 100644 --- a/chrome/common/chrome_plugin_util.cc +++ b/chrome/common/chrome_plugin_util.cc @@ -140,8 +140,13 @@ CPError CPB_GetCommandLineArgumentsCommon(const char* url, // Use '--app=url' instead of just 'url' to launch the browser with minimal // chrome. // Note: Do not change this flag! Old Gears shortcuts will break if you do! - std::wstring url_w = UTF8ToWide(url); - arguments_w += std::wstring(L"--") + switches::kApp + L'=' + url_w; + std::string url_string(url); + ReplaceSubstringsAfterOffset(&url_string, 0, "\"", "\\\""); + ReplaceSubstringsAfterOffset(&url_string, 0, "%", "%%"); + 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 = WideToUTF8(arguments_w); |