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

Unified Diff: chrome/browser/geolocation/chrome_geolocation_permission_context_factory.h

Issue 11587003: Make ChromeGeolocationPermissionContextFactory a ProfileKeyedServiceFactory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 7 years, 12 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/geolocation/chrome_geolocation_permission_context_factory.h
diff --git a/chrome/browser/geolocation/chrome_geolocation_permission_context_factory.h b/chrome/browser/geolocation/chrome_geolocation_permission_context_factory.h
index 64ff446cd6bf0711fb7ac018c6737d7e0bd0fff1..377a3ce56cca5b4eb53861b94d712505ef200c24 100644
--- a/chrome/browser/geolocation/chrome_geolocation_permission_context_factory.h
+++ b/chrome/browser/geolocation/chrome_geolocation_permission_context_factory.h
@@ -5,20 +5,33 @@
#ifndef CHROME_BROWSER_GEOLOCATION_CHROME_GEOLOCATION_PERMISSION_CONTEXT_FACTORY_H_
#define CHROME_BROWSER_GEOLOCATION_CHROME_GEOLOCATION_PERMISSION_CONTEXT_FACTORY_H_
+#include "base/memory/singleton.h"
#include "base/values.h"
#include "chrome/browser/prefs/pref_service.h"
+#include "chrome/browser/profiles/profile_keyed_service_factory.h"
class ChromeGeolocationPermissionContext;
class Profile;
-class ChromeGeolocationPermissionContextFactory {
+class ChromeGeolocationPermissionContextFactory
+ : public ProfileKeyedServiceFactory {
public:
- ChromeGeolocationPermissionContextFactory() {}
- ~ChromeGeolocationPermissionContextFactory() {}
- static ChromeGeolocationPermissionContext* Create(Profile* profile);
- static void RegisterUserPrefs(PrefServiceSyncable* user_prefs);
+ static ChromeGeolocationPermissionContext* GetForProfile(Profile* profile);
+
+ static ChromeGeolocationPermissionContextFactory* GetInstance();
private:
+ friend struct
+ DefaultSingletonTraits<ChromeGeolocationPermissionContextFactory>;
+
+ ChromeGeolocationPermissionContextFactory();
+ virtual ~ChromeGeolocationPermissionContextFactory();
+
+ // |ProfileKeyedBaseFactory| methods:
+ virtual ProfileKeyedService*
+ BuildServiceInstanceFor(Profile* profile) const OVERRIDE;
+ virtual void RegisterUserPrefs(PrefServiceSyncable* user_prefs) OVERRIDE;
+ virtual bool ServiceRedirectedInIncognito() const OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(ChromeGeolocationPermissionContextFactory);
};

Powered by Google App Engine
This is Rietveld 408576698