| 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 <list> | 8 #include <list> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 void NotifyPersonalDataChanged(); | 348 void NotifyPersonalDataChanged(); |
| 349 | 349 |
| 350 // The first time this is called, logs an UMA metric for the number of | 350 // The first time this is called, logs an UMA metric for the number of |
| 351 // profiles the user has. On subsequent calls, does nothing. | 351 // profiles the user has. On subsequent calls, does nothing. |
| 352 void LogProfileCount() const; | 352 void LogProfileCount() const; |
| 353 | 353 |
| 354 // The first time this is called, logs an UMA metric for the number of local | 354 // The first time this is called, logs an UMA metric for the number of local |
| 355 // credit cards the user has. On subsequent calls, does nothing. | 355 // credit cards the user has. On subsequent calls, does nothing. |
| 356 void LogLocalCreditCardCount() const; | 356 void LogLocalCreditCardCount() const; |
| 357 | 357 |
| 358 // The first time this is called, logs an UMA metric for the number of server |
| 359 // credit cards the user has (both masked and unmasked). On subsequent calls, |
| 360 // does nothing. |
| 361 void LogServerCreditCardCounts() const; |
| 362 |
| 358 // Returns the value of the AutofillEnabled pref. | 363 // Returns the value of the AutofillEnabled pref. |
| 359 virtual bool IsAutofillEnabled() const; | 364 virtual bool IsAutofillEnabled() const; |
| 360 | 365 |
| 361 // Overrideable for testing. | 366 // Overrideable for testing. |
| 362 virtual std::string CountryCodeForCurrentTimezone() const; | 367 virtual std::string CountryCodeForCurrentTimezone() const; |
| 363 | 368 |
| 364 // Sets which PrefService to use and observe. |pref_service| is not owned by | 369 // Sets which PrefService to use and observe. |pref_service| is not owned by |
| 365 // this class and must outlive |this|. | 370 // this class and must outlive |this|. |
| 366 void SetPrefService(PrefService* pref_service); | 371 void SetPrefService(PrefService* pref_service); |
| 367 | 372 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 | 499 |
| 495 // Whether the user is currently operating in an off-the-record context. | 500 // Whether the user is currently operating in an off-the-record context. |
| 496 // Default value is false. | 501 // Default value is false. |
| 497 bool is_off_the_record_; | 502 bool is_off_the_record_; |
| 498 | 503 |
| 499 // Whether we have already logged the number of profiles this session. | 504 // Whether we have already logged the number of profiles this session. |
| 500 mutable bool has_logged_profile_count_; | 505 mutable bool has_logged_profile_count_; |
| 501 | 506 |
| 502 // Whether we have already logged the number of local credit cards this | 507 // Whether we have already logged the number of local credit cards this |
| 503 // session. | 508 // session. |
| 504 mutable bool has_logged_credit_card_count_; | 509 mutable bool has_logged_local_credit_card_count_; |
| 510 |
| 511 // Whether we have already logged the number of server credit cards this |
| 512 // session. |
| 513 mutable bool has_logged_server_credit_card_counts_; |
| 505 | 514 |
| 506 // An observer to listen for changes to prefs::kAutofillEnabled. | 515 // An observer to listen for changes to prefs::kAutofillEnabled. |
| 507 std::unique_ptr<BooleanPrefMember> enabled_pref_; | 516 std::unique_ptr<BooleanPrefMember> enabled_pref_; |
| 508 | 517 |
| 509 // An observer to listen for changes to prefs::kAutofillWalletImportEnabled. | 518 // An observer to listen for changes to prefs::kAutofillWalletImportEnabled. |
| 510 std::unique_ptr<BooleanPrefMember> wallet_enabled_pref_; | 519 std::unique_ptr<BooleanPrefMember> wallet_enabled_pref_; |
| 511 | 520 |
| 512 // Set to true if autofill profile deduplication is enabled and needs to be | 521 // Set to true if autofill profile deduplication is enabled and needs to be |
| 513 // performed on the next data refresh. | 522 // performed on the next data refresh. |
| 514 bool is_autofill_profile_dedupe_pending_ = false; | 523 bool is_autofill_profile_dedupe_pending_ = false; |
| 515 | 524 |
| 516 #if defined(OS_ANDROID) | 525 #if defined(OS_ANDROID) |
| 517 // The context for the request to be used to fetch libaddressinput's address | 526 // The context for the request to be used to fetch libaddressinput's address |
| 518 // validation rules. | 527 // validation rules. |
| 519 scoped_refptr<net::URLRequestContextGetter> context_getter_; | 528 scoped_refptr<net::URLRequestContextGetter> context_getter_; |
| 520 #endif | 529 #endif |
| 521 | 530 |
| 522 DISALLOW_COPY_AND_ASSIGN(PersonalDataManager); | 531 DISALLOW_COPY_AND_ASSIGN(PersonalDataManager); |
| 523 }; | 532 }; |
| 524 | 533 |
| 525 } // namespace autofill | 534 } // namespace autofill |
| 526 | 535 |
| 527 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_ | 536 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_ |
| OLD | NEW |