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

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: Added a few more comments 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..305d6afe4f5882fb07012829d591c9ca79b1aa6e 100644
--- a/chrome/browser/custom_handlers/protocol_handler_registry.h
+++ b/chrome/browser/custom_handlers/protocol_handler_registry.h
@@ -134,6 +134,9 @@ class ProtocolHandlerRegistry
// registry.
void GetRegisteredProtocols(std::vector<std::string>* output) const;
+ // Returns true if the presented scheme is a build in scheme.
+ bool IsFixedHandler(const std::string& scheme) const;
+
// Returns true if we allow websites to register handlers for the given
// scheme.
bool CanSchemeBeOverridden(const std::string& scheme) const;
@@ -194,6 +197,9 @@ class ProtocolHandlerRegistry
private:
friend class base::RefCountedThreadSafe<ProtocolHandlerRegistry>;
+ // Install the default handlers.
+ void InstallSystemDefaultHandlers();
benwells 2012/04/20 00:25:05 Can this be called InstallFixedHandlers to be cons
Mr4D (OOO till 08-26) 2012/04/20 13:44:41 Done.
+
// Puts the given handler at the top of the list of handlers for its
// protocol.
void PromoteHandler(const ProtocolHandler& handler);
@@ -277,6 +283,10 @@ class ProtocolHandlerRegistry
// Whether or not we are loading.
bool is_loading_;
+ // Once predefined defaults are set, this will be set and an overwrite of
+ // them won't be possible anymore.
+ bool locking_defaults_;
benwells 2012/04/20 00:25:05 This variable name is confusing. Can it be renamed
Mr4D (OOO till 08-26) 2012/04/20 13:44:41 Done.
+
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