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

Unified Diff: chrome/browser/shell_integration_win.cc

Issue 2172573002: [win] Fallback to registry when finding external handlers for a protocol (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweaked Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/shell_integration_win.cc
diff --git a/chrome/browser/shell_integration_win.cc b/chrome/browser/shell_integration_win.cc
index b2bcf2997b54e28cff61ef8a37fd84f39a9699c8..6c889d3c69aa1456e54a98d444387ea11a1fc7e8 100644
--- a/chrome/browser/shell_integration_win.cc
+++ b/chrome/browser/shell_integration_win.cc
@@ -521,11 +521,15 @@ bool IsElevationNeededForSettingDefaultProtocolClient() {
}
base::string16 GetApplicationNameForProtocol(const GURL& url) {
- // Windows 8 or above requires a new protocol association query.
- if (base::win::GetVersion() >= base::win::VERSION_WIN8)
- return GetAppForProtocolUsingAssocQuery(url);
- else
- return GetAppForProtocolUsingRegistry(url);
+ base::string16 application_name;
+ // Windows 8 or above has a new protocol association query.
+ if (base::win::GetVersion() >= base::win::VERSION_WIN8) {
+ application_name = GetAppForProtocolUsingAssocQuery(url);
+ if (!application_name.empty())
+ return application_name;
+ }
+
+ return GetAppForProtocolUsingRegistry(url);
}
DefaultWebClientState GetDefaultBrowser() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698