Index: chrome/browser/extensions/install_tracker_factory.h |
diff --git a/chrome/browser/extensions/install_tracker_factory.h b/chrome/browser/extensions/install_tracker_factory.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9188897c3e8f6313f07095a17207815de40ec1f7 |
--- /dev/null |
+++ b/chrome/browser/extensions/install_tracker_factory.h |
@@ -0,0 +1,42 @@ |
+// Copyright (c) 2013 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_EXTENSIONS_INSTALL_TRACKER_FACTORY_H_ |
+#define CHROME_BROWSER_EXTENSIONS_INSTALL_TRACKER_FACTORY_H_ |
+ |
+#include "base/memory/singleton.h" |
+#include "chrome/browser/profiles/profile_keyed_service_factory.h" |
+ |
+class Profile; |
+ |
+namespace extensions { |
+ |
+class InstallTracker; |
+ |
+// Singleton that owns all InstallTrackers and associates them with |
+// Profiles. Listens for the Profile's destruction notification and cleans up |
+// the associated InstallTracker. |
+class InstallTrackerFactory : public ProfileKeyedServiceFactory { |
+ public: |
+ static InstallTracker* GetForProfile(Profile* profile); |
+ |
+ static void ResetForProfile(Profile* profile); |
xiyuan
2013/02/21 06:33:17
Is this used anywhere?
koz (OOO until 15th September)
2013/02/25 02:39:28
Removed.
|
+ |
+ static InstallTrackerFactory* GetInstance(); |
+ |
+ private: |
+ friend struct DefaultSingletonTraits<InstallTrackerFactory>; |
+ |
+ InstallTrackerFactory(); |
+ virtual ~InstallTrackerFactory(); |
+ |
+ // ProfileKeyedServiceFactory: |
xiyuan
2013/02/21 06:33:17
nit: ProfileKeyedServiceFactory overrides:
koz (OOO until 15th September)
2013/02/25 02:39:28
Done.
|
+ virtual ProfileKeyedService* BuildServiceInstanceFor( |
benwells
2013/02/21 06:15:38
nit: There are some other base functions (e.g.the
koz (OOO until 15th September)
2013/02/25 02:39:28
Ah, or I could override ServiceRedirectedInIncogni
|
+ Profile* profile) const OVERRIDE; |
+ virtual bool ServiceIsCreatedWithProfile() const OVERRIDE; |
+}; |
+ |
+} // namespace extensions; |
+ |
+#endif // CHROME_BROWSER_EXTENSIONS_INSTALL_TRACKER_FACTORY_H_ |