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

Side by Side Diff: chrome/browser/autofill/personal_data_manager_factory.h

Issue 7967024: Profile shouldn't own PersonalDataManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addresses isherman #11 Created 9 years, 2 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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_
OLDNEW
« no previous file with comments | « chrome/browser/autofill/personal_data_manager.cc ('k') | chrome/browser/autofill/personal_data_manager_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698