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

Unified Diff: chrome/browser/shell_integration_win.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_win.cc
diff --git a/chrome/browser/shell_integration_win.cc b/chrome/browser/shell_integration_win.cc
index 08b988589ea6495f6b697c69de3544ed9be5ba21..5f2cf7fc15685325843db6496a83793069eeeae8 100644
--- a/chrome/browser/shell_integration_win.cc
+++ b/chrome/browser/shell_integration_win.cc
@@ -431,7 +431,7 @@ bool ShellIntegration::SetAsDefaultProtocolClient(const std::string& protocol) {
return false;
}
- string16 wprotocol = UTF8ToUTF16(protocol);
+ string16 wprotocol(UTF8ToUTF16(protocol));
BrowserDistribution* dist = BrowserDistribution::GetDistribution();
if (!ShellUtil::MakeChromeDefaultProtocolClient(dist, chrome_exe.value(),
wprotocol)) {
@@ -457,7 +457,27 @@ bool ShellIntegration::SetAsDefaultBrowserInteractive() {
return false;
}
- VLOG(1) << "Set-as-default Windows UI triggered.";
+ VLOG(1) << "Set-default-browser Windows UI completed.";
+ return true;
+}
+
+bool ShellIntegration::SetAsDefaultProtocolClientInteractive(
+ const std::string& protocol) {
+ FilePath chrome_exe;
+ if (!PathService::Get(base::FILE_EXE, &chrome_exe)) {
+ NOTREACHED() << "Error getting app exe path";
+ return false;
+ }
+
+ BrowserDistribution* dist = BrowserDistribution::GetDistribution();
+ string16 wprotocol(UTF8ToUTF16(protocol));
+ if (!ShellUtil::ShowMakeChromeDefaultProtocolClientSystemUI(
+ dist, chrome_exe.value(), wprotocol)) {
+ LOG(ERROR) << "Failed to launch the set-default-client Windows UI.";
+ return false;
+ }
+
+ VLOG(1) << "Set-default-client Windows UI completed.";
return true;
}

Powered by Google App Engine
This is Rietveld 408576698