| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2011 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_AUTOFILL_PERSONAL_DATA_MANAGER_FACTORY_H_ |
| 6 #define CHROME_BROWSER_AUTOFILL_PERSONAL_DATA_MANAGER_FACTORY_H_ |
| 7 |
| 8 #include "base/compiler_specific.h" |
| 9 #include "chrome/browser/profiles/profile_keyed_service_factory.h" |
| 10 |
| 11 template <typename T> struct DefaultSingletonTraits; |
| 12 class PersonalDataManager; |
| 13 class Profile; |
| 14 |
| 15 // Singleton that owns all PersonalDataManagers and associates them with |
| 16 // Profiles. |
| 17 // Listens for the Profile's destruction notification and cleans up the |
| 18 // associated PersonalDataManager. |
| 19 class PersonalDataManagerFactory : public ProfileKeyedServiceFactory { |
| 20 public: |
| 21 // Returns the PersonalDataManager for |profile|, creating it if it is not |
| 22 // yet created. |
| 23 static PersonalDataManager* GetForProfile(Profile* profile); |
| 24 |
| 25 static PersonalDataManagerFactory* GetInstance(); |
| 26 |
| 27 private: |
| 28 friend struct DefaultSingletonTraits<PersonalDataManagerFactory>; |
| 29 |
| 30 PersonalDataManagerFactory(); |
| 31 virtual ~PersonalDataManagerFactory(); |
| 32 |
| 33 // ProfileKeyedServiceFactory: |
| 34 virtual ProfileKeyedService* BuildServiceInstanceFor( |
| 35 Profile* profile) const OVERRIDE; |
| 36 }; |
| 37 |
| 38 #endif // CHROME_BROWSER_AUTOFILL_PERSONAL_DATA_MANAGER_FACTORY_H_ |
| OLD | NEW |