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

Unified Diff: chrome/browser/chrome_to_mobile/receive/chrome_to_mobile_receive_service_factory.h

Issue 11038063: Support chrome_to_mobile job receiving Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix format Created 8 years, 1 month 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/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_

Powered by Google App Engine
This is Rietveld 408576698