summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-27 19:32:35 +0000
committerkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-27 19:32:35 +0000
commitdeac3e3c9a398b41e33983b0a07b15b4bdf5d1f6 (patch)
treedaecbb410d9429743a69ee11f6edec048cea510f /chrome
parente8013b3d4636c1921e5f1a5977c3e6fa86eed8d8 (diff)
downloadchromium_src-deac3e3c9a398b41e33983b0a07b15b4bdf5d1f6.zip
chromium_src-deac3e3c9a398b41e33983b0a07b15b4bdf5d1f6.tar.gz
chromium_src-deac3e3c9a398b41e33983b0a07b15b4bdf5d1f6.tar.bz2
Add '--' to Chrome open command line
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4016 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rwxr-xr-xchrome/installer/util/shell_util.cc8
-rw-r--r--chrome/installer/util/shell_util.h5
2 files changed, 11 insertions, 2 deletions
diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc
index 8c1ed5c..d03d44a 100755
--- a/chrome/installer/util/shell_util.cc
+++ b/chrome/installer/util/shell_util.cc
@@ -48,7 +48,7 @@ class RegistryEntry {
std::wstring icon_path(chrome_exe);
ShellUtil::GetChromeIcon(icon_path);
std::wstring quoted_exe_path = L"\"" + chrome_exe + L"\"";
- std::wstring open_cmd = quoted_exe_path + L" \"%1\"";
+ std::wstring open_cmd = ShellUtil::GetChromeShellOpenCmd(chrome_exe);
entries.push_front(new RegistryEntry(L"Software\\Classes\\ChromeHTML",
L"Chrome HTML"));
@@ -191,7 +191,7 @@ bool CreateChromeRegKeysForXP(HKEY root_key, const std::wstring& chrome_exe) {
std::wstring classes_path(ShellUtil::kRegClasses);
std::wstring exe_name = file_util::GetFilenameFromPath(chrome_exe);
- std::wstring chrome_open = L"\"" + chrome_exe + L"\" \"%1\"";
+ std::wstring chrome_open = ShellUtil::GetChromeShellOpenCmd(chrome_exe);
std::wstring chrome_icon(chrome_exe);
ShellUtil::GetChromeIcon(chrome_icon);
@@ -368,6 +368,10 @@ bool ShellUtil::GetChromeIcon(std::wstring& chrome_icon) {
return true;
}
+std::wstring ShellUtil::GetChromeShellOpenCmd(const std::wstring& chrome_exe) {
+ return L"\"" + chrome_exe + L"\" -- \"%1\"";
+}
+
bool ShellUtil::GetChromeShortcutName(std::wstring* shortcut) {
BrowserDistribution* dist = BrowserDistribution::GetDistribution();
shortcut->assign(dist->GetApplicationName());
diff --git a/chrome/installer/util/shell_util.h b/chrome/installer/util/shell_util.h
index 4bb01c8..bdf77a19 100644
--- a/chrome/installer/util/shell_util.h
+++ b/chrome/installer/util/shell_util.h
@@ -122,6 +122,11 @@ class ShellUtil {
// chrome_icon: full path to chrome.exe.
static bool GetChromeIcon(std::wstring& chrome_icon);
+ // This method returns the command to open URLs/files using chrome. Typically
+ // this command is written to the registry under shell\open\command key.
+ // chrome_exe: the full path to chrome.exe
+ static std::wstring GetChromeShellOpenCmd(const std::wstring& chrome_exe);
+
// Returns the localized name of Chrome shortcut.
static bool GetChromeShortcutName(std::wstring* shortcut);