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

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: Addressed 4th review 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 edfb7ab6327372f319afaec84e7d5fe26b2650a6..4df4d6a0f73e3a5caacd289559f84d99afbcae76 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 AddFixedHandler(const ProtocolHandler& handler);
+
private:
friend class base::RefCountedThreadSafe<ProtocolHandlerRegistry>;
@@ -277,6 +281,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
+ // AddFixedHandler will be rejected.
+ bool is_loaded_;
benwells 2012/04/26 00:34:42 Why is this necessary?
Mr4D (OOO till 08-26) 2012/04/26 13:46:35 It is a "debugging" helper: Default handlers can o
+
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