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..b928fe605909e85cc603df6f3644b8c23b3ac1b7 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); |
}; |