Index: chrome/browser/extensions/api/push_messaging/push_messaging_api.h |
diff --git a/chrome/browser/extensions/api/push_messaging/push_messaging_api.h b/chrome/browser/extensions/api/push_messaging/push_messaging_api.h |
index ac57fb9a946fb030b1db4944945cda40819235bf..b4e4c6566047e078d8b8d4cef0a7697ee9f4d3c8 100644 |
--- a/chrome/browser/extensions/api/push_messaging/push_messaging_api.h |
+++ b/chrome/browser/extensions/api/push_messaging/push_messaging_api.h |
@@ -11,10 +11,10 @@ |
#include "base/compiler_specific.h" |
#include "base/gtest_prod_util.h" |
#include "base/memory/scoped_ptr.h" |
+#include "chrome/browser/extensions/api/profile_keyed_api_factory.h" |
#include "chrome/browser/extensions/api/push_messaging/obfuscated_gaia_id_fetcher.h" |
#include "chrome/browser/extensions/api/push_messaging/push_messaging_invalidation_handler_delegate.h" |
#include "chrome/browser/extensions/extension_function.h" |
-#include "chrome/browser/profiles/profile_keyed_service.h" |
#include "chrome/browser/ui/webui/signin/login_ui_service.h" |
#include "content/public/browser/notification_observer.h" |
#include "content/public/browser/notification_registrar.h" |
@@ -103,7 +103,7 @@ class PushMessagingGetChannelIdFunction |
DISALLOW_COPY_AND_ASSIGN(PushMessagingGetChannelIdFunction); |
}; |
-class PushMessagingAPI : public ProfileKeyedService { |
+class PushMessagingAPI : public ProfileKeyedAPI { |
public: |
explicit PushMessagingAPI(Profile* profile); |
virtual ~PushMessagingAPI(); |
@@ -118,6 +118,14 @@ class PushMessagingAPI : public ProfileKeyedService { |
PushMessagingEventRouter* GetEventRouterForTest(); |
private: |
+ friend class ProfileKeyedAPIFactory<PushMessagingAPI>; |
+ |
+ // ProfileKeyedAPI implementation. |
+ static const char* service_name() { |
+ return "PushMessagingAPI"; |
+ } |
+ static const bool kServiceIsNULLWhileTesting = true; |
+ |
void InitializeEventRouter(); |
// Created at ExtensionService startup. |
@@ -126,6 +134,13 @@ class PushMessagingAPI : public ProfileKeyedService { |
DISALLOW_COPY_AND_ASSIGN(PushMessagingAPI); |
}; |
-} // namespace extension |
+template <> |
+ProfileKeyedAPIFactory<PushMessagingAPI>* |
+ProfileKeyedAPIFactory<PushMessagingAPI>::GetInstance(); |
+ |
+template <> |
+void ProfileKeyedAPIFactory<PushMessagingAPI>::DeclareFactoryDependencies(); |
+ |
+} // namespace extensions |
#endif // CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_API_H__ |