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

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

Issue 293983004: Modify ProtocolHandlerRegistry to make room for policy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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 523a8226026bfb0c27972fccc42bb179725d050a..ebb4025b342f81e1f59d0ce4f271f6425b7bee28 100644
--- a/chrome/browser/custom_handlers/protocol_handler_registry.h
+++ b/chrome/browser/custom_handlers/protocol_handler_registry.h
@@ -287,7 +287,8 @@ class ProtocolHandlerRegistry : public KeyedService {
void NotifyChanged();
// Registers a new protocol handler.
- void RegisterProtocolHandler(const ProtocolHandler& handler);
+ void RegisterProtocolHandler(const ProtocolHandler& handler,
+ const bool policy_managed);
koz (OOO until 15th September) 2014/05/22 00:51:31 Can you replace the bool here with an enum, e.g.
kaliamoorthi 2014/05/30 10:01:09 Done.
// Get the DictionaryValues stored under the given pref name that are valid
// ProtocolHandler values.
@@ -295,7 +296,19 @@ class ProtocolHandlerRegistry : public KeyedService {
const char* pref_name) const;
// Ignores future requests to register the given protocol handler.
- void IgnoreProtocolHandler(const ProtocolHandler& handler);
+ void IgnoreProtocolHandler(const ProtocolHandler& handler,
+ const bool policy_managed);
+
+ bool HandlerExists(const ProtocolHandler& handler,
+ ProtocolHandlerMultiMap* map);
+
+ bool HandlerExists(const ProtocolHandler& handler,
+ const ProtocolHandlerList& list);
+
+ void EraseHandler(const ProtocolHandler& handler,
+ ProtocolHandlerMultiMap* map);
+
+ void EraseHandler(const ProtocolHandler& handler, ProtocolHandlerList* list);
// Map from protocols (strings) to protocol handlers.
ProtocolHandlerMultiMap protocol_handlers_;
@@ -303,6 +316,14 @@ class ProtocolHandlerRegistry : public KeyedService {
// Protocol handlers that the user has told us to ignore.
ProtocolHandlerList ignored_protocol_handlers_;
+ // User/policy specific Map from protocols (strings) to protocol handlers.
+ ProtocolHandlerMultiMap user_protocol_handlers_;
koz (OOO until 15th September) 2014/05/22 00:51:31 I think this comment could be a bit clearer, e.g.
kaliamoorthi 2014/05/30 10:01:09 Done.
+ ProtocolHandlerMultiMap policy_protocol_handlers_;
+
+ // Protocol handlers that the user/policy has told us to ignore.
+ ProtocolHandlerList user_ignored_protocol_handlers_;
+ ProtocolHandlerList policy_ignored_protocol_handlers_;
+
// Protocol handlers that are the defaults for a given protocol.
ProtocolHandlerMap default_handlers_;

Powered by Google App Engine
This is Rietveld 408576698