Index: chrome/browser/chrome_to_mobile/receive/chrome_to_mobile_receive_service_factory.h |
diff --git a/chrome/browser/chrome_to_mobile/receive/chrome_to_mobile_receive_service_factory.h b/chrome/browser/chrome_to_mobile/receive/chrome_to_mobile_receive_service_factory.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1ac9fb4769ee214c806975e0b92e4617a0147a90 |
--- /dev/null |
+++ b/chrome/browser/chrome_to_mobile/receive/chrome_to_mobile_receive_service_factory.h |
@@ -0,0 +1,37 @@ |
+// Copyright 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_CHROME_TO_MOBILE_RECEIVE_CHROME_TO_MOBILE_RECEIVE_SERVICE_FACTORY_H_ |
+#define CHROME_BROWSER_CHROME_TO_MOBILE_RECEIVE_CHROME_TO_MOBILE_RECEIVE_SERVICE_FACTORY_H_ |
+ |
+#include "base/basictypes.h" |
+#include "base/memory/singleton.h" |
+#include "chrome/browser/profiles/profile_keyed_service_factory.h" |
+ |
+class ChromeToMobileReceiveService; |
+class Profile; |
+ |
+// Singleton that owns all |ChromeToMobileReceiveService|s and associates them |
+// with |Profile|s. Listens for the |Profile|'s destruction notification and |
+// cleans up the associated |ChromeToMobileReceiveService|. |
+class ChromeToMobileReceiveServiceFactory : public ProfileKeyedServiceFactory { |
+ public: |
+ static ChromeToMobileReceiveService* GetForProfile(Profile* profile); |
+ static ChromeToMobileReceiveServiceFactory* GetInstance(); |
+ |
+ private: |
+ friend struct DefaultSingletonTraits<ChromeToMobileReceiveServiceFactory>; |
+ |
+ ChromeToMobileReceiveServiceFactory(); |
+ virtual ~ChromeToMobileReceiveServiceFactory(); |
+ |
+ // |ProfileKeyedServiceFactory| |
+ virtual ProfileKeyedService* BuildServiceInstanceFor(Profile* profile) const |
+ OVERRIDE; |
+ virtual bool ServiceIsNULLWhileTesting() const OVERRIDE; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ChromeToMobileReceiveServiceFactory); |
+}; |
+ |
+#endif // CHROME_BROWSER_CHROME_TO_MOBILE_RECEIVE_CHROME_TO_MOBILE_RECEIVE_SERVICE_FACTORY_H_ |