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. |