| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 // Auxiliary profiles. | 224 // Auxiliary profiles. |
| 225 mutable ScopedVector<AutofillProfile> auxiliary_profiles_; | 225 mutable ScopedVector<AutofillProfile> auxiliary_profiles_; |
| 226 | 226 |
| 227 // Storage for combined web and auxiliary profiles. Contents are weak | 227 // Storage for combined web and auxiliary profiles. Contents are weak |
| 228 // references. Lifetime managed by |web_profiles_| and |auxiliary_profiles_|. | 228 // references. Lifetime managed by |web_profiles_| and |auxiliary_profiles_|. |
| 229 mutable std::vector<AutofillProfile*> profiles_; | 229 mutable std::vector<AutofillProfile*> profiles_; |
| 230 | 230 |
| 231 // The loaded credit cards. | 231 // The loaded credit cards. |
| 232 ScopedVector<CreditCard> credit_cards_; | 232 ScopedVector<CreditCard> credit_cards_; |
| 233 | 233 |
| 234 // The hash of the password used to store the credit card. This is empty if | |
| 235 // no password exists. | |
| 236 string16 password_hash_; | |
| 237 | |
| 238 // When the manager makes a request from WebDataService, the database | 234 // When the manager makes a request from WebDataService, the database |
| 239 // is queried on another thread, we record the query handle until we | 235 // is queried on another thread, we record the query handle until we |
| 240 // get called back. We store handles for both profile and credit card queries | 236 // get called back. We store handles for both profile and credit card queries |
| 241 // so they can be loaded at the same time. | 237 // so they can be loaded at the same time. |
| 242 WebDataService::Handle pending_profiles_query_; | 238 WebDataService::Handle pending_profiles_query_; |
| 243 WebDataService::Handle pending_creditcards_query_; | 239 WebDataService::Handle pending_creditcards_query_; |
| 244 | 240 |
| 245 // The observers. | 241 // The observers. |
| 246 ObserverList<Observer> observers_; | 242 ObserverList<Observer> observers_; |
| 247 | 243 |
| 248 private: | 244 private: |
| 249 // For logging UMA metrics. Overridden by metrics tests. | 245 // For logging UMA metrics. Overridden by metrics tests. |
| 250 scoped_ptr<const AutofillMetrics> metric_logger_; | 246 scoped_ptr<const AutofillMetrics> metric_logger_; |
| 251 | 247 |
| 252 // Whether we have already logged the number of profiles this session. | 248 // Whether we have already logged the number of profiles this session. |
| 253 mutable bool has_logged_profile_count_; | 249 mutable bool has_logged_profile_count_; |
| 254 | 250 |
| 255 DISALLOW_COPY_AND_ASSIGN(PersonalDataManager); | 251 DISALLOW_COPY_AND_ASSIGN(PersonalDataManager); |
| 256 }; | 252 }; |
| 257 | 253 |
| 258 #endif // CHROME_BROWSER_AUTOFILL_PERSONAL_DATA_MANAGER_H_ | 254 #endif // CHROME_BROWSER_AUTOFILL_PERSONAL_DATA_MANAGER_H_ |
| OLD | NEW |