Index: chrome/browser/extensions/api/preference/preference_api.h |
diff --git a/chrome/browser/extensions/api/preference/preference_api.h b/chrome/browser/extensions/api/preference/preference_api.h |
index f7a799aec8cdfa5b432ce294c60cc94813843ebb..d37a78ac4c894aedf8888d4e6ad3a21f8608808b 100644 |
--- a/chrome/browser/extensions/api/preference/preference_api.h |
+++ b/chrome/browser/extensions/api/preference/preference_api.h |
@@ -8,9 +8,9 @@ |
#include <string> |
#include "base/prefs/public/pref_change_registrar.h" |
+#include "chrome/browser/extensions/api/profile_keyed_api_factory.h" |
#include "chrome/browser/extensions/event_router.h" |
#include "chrome/browser/extensions/extension_function.h" |
-#include "chrome/browser/profiles/profile_keyed_service.h" |
#include "content/public/browser/notification_observer.h" |
class PrefService; |
@@ -39,7 +39,7 @@ class PreferenceEventRouter { |
DISALLOW_COPY_AND_ASSIGN(PreferenceEventRouter); |
}; |
-class PreferenceAPI : public ProfileKeyedService, |
+class PreferenceAPI : public ProfileKeyedAPI, |
public EventRouter::Observer { |
public: |
explicit PreferenceAPI(Profile* profile); |
@@ -48,14 +48,27 @@ class PreferenceAPI : public ProfileKeyedService, |
// ProfileKeyedService implementation. |
virtual void Shutdown() OVERRIDE; |
+ // ProfileKeyedAPI implementation. |
+ static ProfileKeyedAPIFactory<PreferenceAPI>* GetFactoryInstance(); |
+ |
// EventRouter::Observer implementation. |
virtual void OnListenerAdded(const EventListenerInfo& details) OVERRIDE; |
private: |
+ friend class ProfileKeyedAPIFactory<PreferenceAPI>; |
+ |
Profile* profile_; |
+ // ProfileKeyedAPI implementation. |
+ static const char* service_name() { |
+ return "PreferenceAPI"; |
+ } |
+ static const bool kServiceIsNULLWhileTesting = true; |
+ |
// Created lazily upon OnListenerAdded. |
scoped_ptr<PreferenceEventRouter> preference_event_router_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(PreferenceAPI); |
}; |
class PrefTransformerInterface { |