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

Unified Diff: chrome/browser/custom_handlers/protocol_handler_registry.h

Issue 10139002: Preventing our default handlers for ChromeOS to show up or confuse the user (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Resolving merge issues Created 8 years, 8 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/custom_handlers/protocol_handler_registry.h
diff --git a/chrome/browser/custom_handlers/protocol_handler_registry.h b/chrome/browser/custom_handlers/protocol_handler_registry.h
index 508a44c1cdf8cc9557bd245ec863632cf790d8d7..de90791a3bf2a0971dc230c9b2b7c20e6f06a6e3 100644
--- a/chrome/browser/custom_handlers/protocol_handler_registry.h
+++ b/chrome/browser/custom_handlers/protocol_handler_registry.h
@@ -191,6 +191,10 @@ class ProtocolHandlerRegistry
bool enabled() const { return enabled_; }
+ // Add a predefined protocol handler. This has to be called before the first
+ // load command was issued, otherwise the command will be ignored.
+ void AddDefaultHandler(const ProtocolHandler& handler);
+
private:
friend class base::DeleteHelper<ProtocolHandlerRegistry>;
friend struct content::BrowserThread::DeleteOnThread<
@@ -280,6 +284,10 @@ class ProtocolHandlerRegistry
// Whether or not we are loading.
bool is_loading_;
+ // When the table gets loaded this flag will be set and any further calls to
+ // AddDefaultHandler will be rejected.
+ bool is_loaded_;
tony 2012/04/27 22:17:15 Nit: has_loaded_ is more grammatically correct.
+
DefaultClientObserverList default_client_observers_;
// Copy of default_handlers_ that is only accessed on the IO thread.

Powered by Google App Engine
This is Rietveld 408576698