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

Unified Diff: chrome/installer/setup/setup_main.cc

Issue 6961013: Allow chrome to become the os default handler for arbitrary protocols on mac/win. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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
Index: chrome/installer/setup/setup_main.cc
diff --git a/chrome/installer/setup/setup_main.cc b/chrome/installer/setup/setup_main.cc
index 15e08477d8f16faf9119d7e38c665825deb21ef1..5563a23ae0a6b29a58ca67ebcba79f957e53d5bb 100644
--- a/chrome/installer/setup/setup_main.cc
+++ b/chrome/installer/setup/setup_main.cc
@@ -848,8 +848,17 @@ bool HandleNonInstallCmdLineOptions(const InstallationState& original_state,
suffix = cmd_line.GetSwitchValueNative(
installer::switches::kRegisterChromeBrowserSuffix);
}
- *exit_code = ShellUtil::RegisterChromeBrowser(
- chrome_install->distribution(), chrome_exe, suffix, false);
+ if (cmd_line.HasSwitch(
+ installer::switches::kRegisterURLProtocol)) {
+ std::wstring protocol = cmd_line.GetSwitchValueNative(
+ installer::switches::kRegisterURLProtocol);
+ *exit_code = ShellUtil::RegisterChromeForProtocol(
+ chrome_install->distribution(), chrome_exe, suffix, protocol,
+ false);
+ } else {
+ *exit_code = ShellUtil::RegisterChromeBrowser(
+ chrome_install->distribution(), chrome_exe, suffix, false);
+ }
} else {
LOG(DFATAL) << "Can't register browser - Chrome distribution not found";
*exit_code = installer::UNKNOWN_STATUS;

Powered by Google App Engine
This is Rietveld 408576698