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

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

Issue 368243009: Implement unregisterProtocolHandler() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merged content changes Created 6 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 | « chrome/browser/ui/browser.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | 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 d8abe54a9b8395a664840d86570067995555bff3..4512bec6838658983d6a3df1e645aebbbdb6c8f7 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,
jochen (gone - plz use gerrit) 2014/07/11 09:39:11 nit. please clang-format
pals 2014/07/11 11:25:19 Done.
+ const GURL& url,
+ bool user_gesture) {
+ 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);
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698