| 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..ae8a638e657b74dfab09702c36ff5334b9d434be 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();
|
| @@ -114,10 +114,21 @@ class PushMessagingAPI : public ProfileKeyedService {
|
| // ProfileKeyedService implementation.
|
| virtual void Shutdown() OVERRIDE;
|
|
|
| + // ProfileKeyedAPI implementation.
|
| + static ProfileKeyedAPIFactory<PushMessagingAPI>* GetFactoryInstance();
|
| +
|
| // For testing purposes.
|
| 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 +137,9 @@ class PushMessagingAPI : public ProfileKeyedService {
|
| DISALLOW_COPY_AND_ASSIGN(PushMessagingAPI);
|
| };
|
|
|
| -} // namespace extension
|
| +template <>
|
| +void ProfileKeyedAPIFactory<PushMessagingAPI>::DeclareFactoryDependencies();
|
| +
|
| +} // namespace extensions
|
|
|
| #endif // CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_API_H__
|
|
|