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

Unified Diff: chrome/browser/ui/browser.cc

Issue 8371023: Calls to rph updating existing handlers are ignored. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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 | « chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index ad7b7cda8ababdacda9160f46bc92d80a5ab7cd0..d4b217b00ea7c3352014f40f2434804daa271f71 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -2500,15 +2500,8 @@ void Browser::RegisterProtocolHandlerHelper(TabContents* tab,
ProtocolHandlerRegistry* registry =
tcw->profile()->GetProtocolHandlerRegistry();
- if (!registry->enabled() || registry->HasRegisteredEquivalent(handler) ||
- registry->HasIgnoredEquivalent(handler))
- return;
- if (!handler.IsEmpty() &&
- registry->CanSchemeBeOverridden(handler.protocol())) {
- // We don't need to show an infobar if we can silently update the handler
- if (registry->AttemptReplace(handler))
- return;
+ if (!registry->SilentlyHandleRegisterHandlerRequest(handler)) {
UserMetrics::RecordAction(
UserMetricsAction("RegisterProtocolHandler.InfoBar_Shown"));
InfoBarTabHelper* infobar_helper = tcw->infobar_tab_helper();
« no previous file with comments | « chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698