OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_AUTOFILL_PERSONAL_DATA_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_PERSONAL_DATA_MANAGER_H_ |
6 #define CHROME_BROWSER_AUTOFILL_PERSONAL_DATA_MANAGER_H_ | 6 #define CHROME_BROWSER_AUTOFILL_PERSONAL_DATA_MANAGER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 protected: | 145 protected: |
146 // Only PersonalDataManagerFactory and certain tests can create instances of | 146 // Only PersonalDataManagerFactory and certain tests can create instances of |
147 // PersonalDataManager. | 147 // PersonalDataManager. |
148 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, FirstMiddleLast); | 148 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, FirstMiddleLast); |
149 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, AutofillIsEnabledAtStartup); | 149 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, AutofillIsEnabledAtStartup); |
150 FRIEND_TEST_ALL_PREFIXES(PersonalDataManagerTest, | 150 FRIEND_TEST_ALL_PREFIXES(PersonalDataManagerTest, |
151 AggregateExistingAuxiliaryProfile); | 151 AggregateExistingAuxiliaryProfile); |
152 friend class AutofillTest; | 152 friend class AutofillTest; |
153 friend class PersonalDataManagerFactory; | 153 friend class PersonalDataManagerFactory; |
154 friend class PersonalDataManagerTest; | 154 friend class PersonalDataManagerTest; |
155 friend class scoped_ptr<PersonalDataManager>; | |
156 friend class ProfileSyncServiceAutofillTest; | 155 friend class ProfileSyncServiceAutofillTest; |
157 friend class RemoveAutofillTester; | 156 friend class RemoveAutofillTester; |
158 friend class TestingAutomationProvider; | 157 friend class TestingAutomationProvider; |
| 158 friend struct base::DefaultDeleter<PersonalDataManager>; |
159 friend void autofill_helper::SetProfiles(int, std::vector<AutofillProfile>*); | 159 friend void autofill_helper::SetProfiles(int, std::vector<AutofillProfile>*); |
160 friend void autofill_helper::SetCreditCards(int, std::vector<CreditCard>*); | 160 friend void autofill_helper::SetCreditCards(int, std::vector<CreditCard>*); |
161 | 161 |
162 PersonalDataManager(); | 162 PersonalDataManager(); |
163 virtual ~PersonalDataManager(); | 163 virtual ~PersonalDataManager(); |
164 | 164 |
165 // Sets |web_profiles_| to the contents of |profiles| and updates the web | 165 // Sets |web_profiles_| to the contents of |profiles| and updates the web |
166 // database by adding, updating and removing profiles. | 166 // database by adding, updating and removing profiles. |
167 // The relationship between this and Refresh is subtle. | 167 // The relationship between this and Refresh is subtle. |
168 // A call to |SetProfiles| could include out-of-date data that may conflict | 168 // A call to |SetProfiles| could include out-of-date data that may conflict |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 // Whether we have already logged the number of profiles this session. | 257 // Whether we have already logged the number of profiles this session. |
258 mutable bool has_logged_profile_count_; | 258 mutable bool has_logged_profile_count_; |
259 | 259 |
260 // Manages registration lifetime for NotificationObserver implementation. | 260 // Manages registration lifetime for NotificationObserver implementation. |
261 content::NotificationRegistrar notification_registrar_; | 261 content::NotificationRegistrar notification_registrar_; |
262 | 262 |
263 DISALLOW_COPY_AND_ASSIGN(PersonalDataManager); | 263 DISALLOW_COPY_AND_ASSIGN(PersonalDataManager); |
264 }; | 264 }; |
265 | 265 |
266 #endif // CHROME_BROWSER_AUTOFILL_PERSONAL_DATA_MANAGER_H_ | 266 #endif // CHROME_BROWSER_AUTOFILL_PERSONAL_DATA_MANAGER_H_ |
OLD | NEW |