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

Unified Diff: chrome/browser/extensions/api/push_messaging/push_messaging_api_factory.h

Issue 11496004: Lazy initialization for PushMessagingEventRouter (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: nit fixed Created 8 years 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/extensions/api/push_messaging/push_messaging_api_factory.h
diff --git a/chrome/browser/extensions/api/web_navigation/web_navigation_api_factory.h b/chrome/browser/extensions/api/push_messaging/push_messaging_api_factory.h
similarity index 51%
copy from chrome/browser/extensions/api/web_navigation/web_navigation_api_factory.h
copy to chrome/browser/extensions/api/push_messaging/push_messaging_api_factory.h
index c0231aef3d665c1c04efedd168b230c20d2bb1a6..cd6c522a18b4b0dbafdb69430ac9de8ef8cfd910 100644
--- a/chrome/browser/extensions/api/web_navigation/web_navigation_api_factory.h
+++ b/chrome/browser/extensions/api/push_messaging/push_messaging_api_factory.h
@@ -2,24 +2,26 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_EXTENSIONS_API_WEB_NAVIGATION_WEB_NAVIGATION_API_FACTORY_H_
-#define CHROME_BROWSER_EXTENSIONS_API_WEB_NAVIGATION_WEB_NAVIGATION_API_FACTORY_H_
+#ifndef CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_API_FACTORY_H_
+#define CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_API_FACTORY_H_
#include "base/memory/singleton.h"
#include "chrome/browser/profiles/profile_keyed_service_factory.h"
namespace extensions {
-class WebNavigationAPI;
+class PushMessagingAPI;
-class WebNavigationAPIFactory : public ProfileKeyedServiceFactory {
+class PushMessagingAPIFactory : public ProfileKeyedServiceFactory {
public:
- static WebNavigationAPIFactory* GetInstance();
+ static PushMessagingAPI* GetForProfile(Profile* profile);
+
+ static PushMessagingAPIFactory* GetInstance();
private:
- friend struct DefaultSingletonTraits<WebNavigationAPIFactory>;
+ friend struct DefaultSingletonTraits<PushMessagingAPIFactory>;
- WebNavigationAPIFactory();
- virtual ~WebNavigationAPIFactory();
+ PushMessagingAPIFactory();
+ virtual ~PushMessagingAPIFactory();
// ProfileKeyedServiceFactory implementation.
virtual ProfileKeyedService* BuildServiceInstanceFor(
@@ -30,4 +32,4 @@ class WebNavigationAPIFactory : public ProfileKeyedServiceFactory {
} // namespace extensions
-#endif // CHROME_BROWSER_EXTENSIONS_API_WEB_NAVIGATION_WEB_NAVIGATION_API_FACTORY_H_
+#endif // CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_API_FACTORY_H_

Powered by Google App Engine
This is Rietveld 408576698