| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_ |
| 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 // Loads the saved credit cards from the web database. | 287 // Loads the saved credit cards from the web database. |
| 288 virtual void LoadCreditCards(); | 288 virtual void LoadCreditCards(); |
| 289 | 289 |
| 290 // Cancels a pending query to the web database. |handle| is a pointer to the | 290 // Cancels a pending query to the web database. |handle| is a pointer to the |
| 291 // query handle. | 291 // query handle. |
| 292 void CancelPendingQuery(WebDataServiceBase::Handle* handle); | 292 void CancelPendingQuery(WebDataServiceBase::Handle* handle); |
| 293 | 293 |
| 294 // Notifies observers that personal data has changed. | 294 // Notifies observers that personal data has changed. |
| 295 void NotifyPersonalDataChanged(); | 295 void NotifyPersonalDataChanged(); |
| 296 | 296 |
| 297 // The first time this is called, logs an UMA metrics for the number of | 297 // The first time this is called, logs an UMA metric for the number of |
| 298 // profiles the user has. On subsequent calls, does nothing. | 298 // profiles the user has. On subsequent calls, does nothing. |
| 299 void LogProfileCount() const; | 299 void LogProfileCount() const; |
| 300 | 300 |
| 301 // The first time this is called, logs an UMA metric for the number of local |
| 302 // credit cards the user has. On subsequent calls, does nothing. |
| 303 void LogLocalCreditCardCount() const; |
| 304 |
| 301 // Returns the value of the AutofillEnabled pref. | 305 // Returns the value of the AutofillEnabled pref. |
| 302 virtual bool IsAutofillEnabled() const; | 306 virtual bool IsAutofillEnabled() const; |
| 303 | 307 |
| 304 // Overrideable for testing. | 308 // Overrideable for testing. |
| 305 virtual std::string CountryCodeForCurrentTimezone() const; | 309 virtual std::string CountryCodeForCurrentTimezone() const; |
| 306 | 310 |
| 307 // Sets which PrefService to use and observe. |pref_service| is not owned by | 311 // Sets which PrefService to use and observe. |pref_service| is not owned by |
| 308 // this class and must outlive |this|. | 312 // this class and must outlive |this|. |
| 309 void SetPrefService(PrefService* pref_service); | 313 void SetPrefService(PrefService* pref_service); |
| 310 | 314 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 // The signin manager that this instance uses. Must outlive this instance. | 404 // The signin manager that this instance uses. Must outlive this instance. |
| 401 SigninManagerBase* signin_manager_; | 405 SigninManagerBase* signin_manager_; |
| 402 | 406 |
| 403 // Whether the user is currently operating in an off-the-record context. | 407 // Whether the user is currently operating in an off-the-record context. |
| 404 // Default value is false. | 408 // Default value is false. |
| 405 bool is_off_the_record_; | 409 bool is_off_the_record_; |
| 406 | 410 |
| 407 // Whether we have already logged the number of profiles this session. | 411 // Whether we have already logged the number of profiles this session. |
| 408 mutable bool has_logged_profile_count_; | 412 mutable bool has_logged_profile_count_; |
| 409 | 413 |
| 414 // Whether we have already logged the number of local credit cards this |
| 415 // session. |
| 416 mutable bool has_logged_credit_card_count_; |
| 417 |
| 410 // An observer to listen for changes to prefs::kAutofillEnabled. | 418 // An observer to listen for changes to prefs::kAutofillEnabled. |
| 411 scoped_ptr<BooleanPrefMember> enabled_pref_; | 419 scoped_ptr<BooleanPrefMember> enabled_pref_; |
| 412 | 420 |
| 413 // An observer to listen for changes to prefs::kAutofillWalletImportEnabled. | 421 // An observer to listen for changes to prefs::kAutofillWalletImportEnabled. |
| 414 scoped_ptr<BooleanPrefMember> wallet_enabled_pref_; | 422 scoped_ptr<BooleanPrefMember> wallet_enabled_pref_; |
| 415 | 423 |
| 416 DISALLOW_COPY_AND_ASSIGN(PersonalDataManager); | 424 DISALLOW_COPY_AND_ASSIGN(PersonalDataManager); |
| 417 }; | 425 }; |
| 418 | 426 |
| 419 } // namespace autofill | 427 } // namespace autofill |
| 420 | 428 |
| 421 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_ | 429 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_ |
| OLD | NEW |