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

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

Issue 10546083: Convert ProtocolHandlerRegistry to be a ProfileKeyedService. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Respond to review comments. Fit and finish. Created 8 years, 6 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 18f01111eedac6b82a6b48dee98f77de9c5fbccb..79a3d4fd1fe627f3b51e9744e2ad6b46be4150ee 100644
--- a/chrome/browser/custom_handlers/protocol_handler_registry.h
+++ b/chrome/browser/custom_handlers/protocol_handler_registry.h
@@ -11,7 +11,6 @@
#include <vector>
#include "base/basictypes.h"
-#include "base/memory/ref_counted.h"
#include "base/sequenced_task_runner_helpers.h"
#include "base/values.h"
#include "chrome/browser/profiles/profile.h"
@@ -28,9 +27,8 @@
// Profile::InitRegisteredProtocolHandlers(), and they should be the only
// instances of this class.
-class ProtocolHandlerRegistry
- : public base::RefCountedThreadSafe<
- ProtocolHandlerRegistry, content::BrowserThread::DeleteOnIOThread> {
+class ProtocolHandlerRegistry : public ProfileKeyedService {
+
public:
class DefaultClientObserver
: public ShellIntegration::DefaultWebClientObserver {
@@ -117,8 +115,8 @@ class ProtocolHandlerRegistry
// Returns true if this handler is the default handler for its protocol.
bool IsDefault(const ProtocolHandler& handler) const;
- // Loads a user's registered protocol handlers.
- void Load();
+ // Initializes default protocol setttings and loads them from prefs.
+ void InitProtocolSettings();
// Returns the offset in the list of handlers for a protocol of the default
// handler for that protocol.
@@ -184,7 +182,7 @@ class ProtocolHandlerRegistry
// This is called by the UI thread when the system is shutting down. This
// does finalization which must be done on the UI thread.
- void Finalize();
+ virtual void Shutdown() OVERRIDE;
// Registers the preferences that we store registered protocol handlers in.
static void RegisterPrefs(PrefService* prefService);
@@ -202,7 +200,7 @@ class ProtocolHandlerRegistry
friend class ProtocolHandlerRegistryTest;
friend class RegisterProtocolHandlerBrowserTest;
- ~ProtocolHandlerRegistry();
+ virtual ~ProtocolHandlerRegistry();
// Puts the given handler at the top of the list of handlers for its
// protocol.
« no previous file with comments | « no previous file | chrome/browser/custom_handlers/protocol_handler_registry.cc » ('j') | chrome/browser/profiles/profile.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698