Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_INSTALL_TRACKER_FACTORY_H_ | |
| 6 #define CHROME_BROWSER_EXTENSIONS_INSTALL_TRACKER_FACTORY_H_ | |
| 7 | |
| 8 #include "base/memory/singleton.h" | |
| 9 #include "chrome/browser/profiles/profile_keyed_service_factory.h" | |
| 10 | |
| 11 class Profile; | |
| 12 | |
| 13 namespace extensions { | |
| 14 | |
| 15 class InstallTracker; | |
| 16 | |
| 17 // Singleton that owns all InstallTrackers and associates them with | |
| 18 // Profiles. Listens for the Profile's destruction notification and cleans up | |
| 19 // the associated InstallTracker. | |
| 20 class InstallTrackerFactory : public ProfileKeyedServiceFactory { | |
| 21 public: | |
| 22 static InstallTracker* GetForProfile(Profile* profile); | |
| 23 | |
| 24 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.
| |
| 25 | |
| 26 static InstallTrackerFactory* GetInstance(); | |
| 27 | |
| 28 private: | |
| 29 friend struct DefaultSingletonTraits<InstallTrackerFactory>; | |
| 30 | |
| 31 InstallTrackerFactory(); | |
| 32 virtual ~InstallTrackerFactory(); | |
| 33 | |
| 34 // ProfileKeyedServiceFactory: | |
|
xiyuan
2013/02/21 06:33:17
nit: ProfileKeyedServiceFactory overrides:
koz (OOO until 15th September)
2013/02/25 02:39:28
Done.
| |
| 35 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
| |
| 36 Profile* profile) const OVERRIDE; | |
| 37 virtual bool ServiceIsCreatedWithProfile() const OVERRIDE; | |
| 38 }; | |
| 39 | |
| 40 } // namespace extensions; | |
| 41 | |
| 42 #endif // CHROME_BROWSER_EXTENSIONS_INSTALL_TRACKER_FACTORY_H_ | |
| OLD | NEW |