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

Unified Diff: chrome/browser/shell_integration.cc

Issue 10963004: Fix registerProtocolHandler OS registration on Windows 8 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed blank line Created 8 years, 3 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/browser/shell_integration.cc
diff --git a/chrome/browser/shell_integration.cc b/chrome/browser/shell_integration.cc
index 08a9684792eb3730b4f55d9ee39f401d013fc05a..3c8387e6b5bb833d35543290979a279f88e5d705 100644
--- a/chrome/browser/shell_integration.cc
+++ b/chrome/browser/shell_integration.cc
@@ -97,6 +97,12 @@ CommandLine ShellIntegration::CommandLineArgsForLauncher(
bool ShellIntegration::SetAsDefaultBrowserInteractive() {
return false;
}
+
+// static
+bool ShellIntegration::SetAsDefaultProtocolClientInteractive(
+ const std::string& protocol) {
+ return false;
+}
#endif
bool ShellIntegration::DefaultWebClientObserver::IsOwnedByWorker() {
@@ -264,5 +270,20 @@ ShellIntegration::DefaultProtocolClientWorker::CheckIsDefault() {
bool ShellIntegration::DefaultProtocolClientWorker::SetAsDefault(
bool interactive_permitted) {
- return ShellIntegration::SetAsDefaultProtocolClient(protocol_);
+ bool result = false;
+ switch (ShellIntegration::CanSetAsDefaultProtocolClient()) {
+ case ShellIntegration::SET_DEFAULT_UNATTENDED:
+ result = ShellIntegration::SetAsDefaultProtocolClient(protocol_);
+ break;
+ case ShellIntegration::SET_DEFAULT_INTERACTIVE:
+ if (interactive_permitted) {
+ result = ShellIntegration::SetAsDefaultProtocolClientInteractive(
+ protocol_);
+ }
+ break;
+ default:
+ NOTREACHED();
+ }
+
+ return result;
}

Powered by Google App Engine
This is Rietveld 408576698