Index: chrome/browser/ui/browser.cc |
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc |
index d8abe54a9b8395a664840d86570067995555bff3..a3ffbee801dc5d69b236ec3d1c21c1eb16702ac8 100644 |
--- a/chrome/browser/ui/browser.cc |
+++ b/chrome/browser/ui/browser.cc |
@@ -1664,6 +1664,23 @@ void Browser::RegisterProtocolHandler(WebContents* web_contents, |
} |
} |
+void Browser::UnregisterProtocolHandler(WebContents* web_contents, |
+ const std::string& protocol, |
+ const GURL& url, |
+ bool user_gesture) { |
kenrb
2014/07/11 14:38:37
This appears to be an unused argument passed from
|
+ Profile* profile = |
+ Profile::FromBrowserContext(web_contents->GetBrowserContext()); |
+ if (profile->IsOffTheRecord()) |
+ return; |
+ |
+ ProtocolHandler handler = |
+ ProtocolHandler::CreateProtocolHandler(protocol, url); |
+ |
+ ProtocolHandlerRegistry* registry = |
+ ProtocolHandlerRegistryFactory::GetForProfile(profile); |
+ registry->RemoveHandler(handler); |
+} |
+ |
void Browser::UpdatePreferredSize(WebContents* source, |
const gfx::Size& pref_size) { |
window_->UpdatePreferredSize(source, pref_size); |