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 18 matching lines...) Expand all Loading... | |
29 class Browser; | 29 class Browser; |
30 class PrefService; | 30 class PrefService; |
31 class RemoveAutofillTester; | 31 class RemoveAutofillTester; |
32 class SigninManagerBase; | 32 class SigninManagerBase; |
33 | 33 |
34 #if defined(OS_IOS) | 34 #if defined(OS_IOS) |
35 // TODO(crbug.com/513344): Remove this once Chrome on iOS is unforked. | 35 // TODO(crbug.com/513344): Remove this once Chrome on iOS is unforked. |
36 class PersonalDataManagerFactory; | 36 class PersonalDataManagerFactory; |
37 #endif | 37 #endif |
38 | 38 |
39 namespace sync_driver { | |
40 class SyncService; | |
41 } | |
42 | |
39 namespace autofill { | 43 namespace autofill { |
40 class AutofillInteractiveTest; | 44 class AutofillInteractiveTest; |
41 class AutofillTest; | 45 class AutofillTest; |
42 class FormStructure; | 46 class FormStructure; |
43 class PersonalDataManagerObserver; | 47 class PersonalDataManagerObserver; |
44 class PersonalDataManagerFactory; | 48 class PersonalDataManagerFactory; |
45 } // namespace autofill | 49 } // namespace autofill |
46 | 50 |
47 namespace autofill_helper { | 51 namespace autofill_helper { |
48 void SetProfiles(int, std::vector<autofill::AutofillProfile>*); | 52 void SetProfiles(int, std::vector<autofill::AutofillProfile>*); |
(...skipping 19 matching lines...) Expand all Loading... | |
68 // Kicks off asynchronous loading of profiles and credit cards. | 72 // Kicks off asynchronous loading of profiles and credit cards. |
69 // |pref_service| must outlive this instance. |is_off_the_record| informs | 73 // |pref_service| must outlive this instance. |is_off_the_record| informs |
70 // this instance whether the user is currently operating in an off-the-record | 74 // this instance whether the user is currently operating in an off-the-record |
71 // context. | 75 // context. |
72 void Init(scoped_refptr<AutofillWebDataService> database, | 76 void Init(scoped_refptr<AutofillWebDataService> database, |
73 PrefService* pref_service, | 77 PrefService* pref_service, |
74 AccountTrackerService* account_tracker, | 78 AccountTrackerService* account_tracker, |
75 SigninManagerBase* signin_manager, | 79 SigninManagerBase* signin_manager, |
76 bool is_off_the_record); | 80 bool is_off_the_record); |
77 | 81 |
82 // Called once the sync service is known to be instantiated and configured. | |
83 // Note that it may not be started, but it's preferences can be queried. | |
84 void OnSyncServiceConfigured(sync_driver::SyncService* sync_service); | |
Nicolas Zea
2016/07/12 20:04:47
Perhaps rename this OnSyncServiceInitialized? "Con
Roger McFarlane (Chromium)
2016/07/12 21:23:26
Done.
| |
85 | |
78 // WebDataServiceConsumer: | 86 // WebDataServiceConsumer: |
79 void OnWebDataServiceRequestDone(WebDataServiceBase::Handle h, | 87 void OnWebDataServiceRequestDone(WebDataServiceBase::Handle h, |
80 const WDTypedResult* result) override; | 88 const WDTypedResult* result) override; |
81 | 89 |
82 // AutofillWebDataServiceObserverOnUIThread: | 90 // AutofillWebDataServiceObserverOnUIThread: |
83 void AutofillMultipleChanged() override; | 91 void AutofillMultipleChanged() override; |
84 | 92 |
85 // Adds a listener to be notified of PersonalDataManager events. | 93 // Adds a listener to be notified of PersonalDataManager events. |
86 virtual void AddObserver(PersonalDataManagerObserver* observer); | 94 virtual void AddObserver(PersonalDataManagerObserver* observer); |
87 | 95 |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
477 // Whether we have already logged the number of local credit cards this | 485 // Whether we have already logged the number of local credit cards this |
478 // session. | 486 // session. |
479 mutable bool has_logged_credit_card_count_; | 487 mutable bool has_logged_credit_card_count_; |
480 | 488 |
481 // An observer to listen for changes to prefs::kAutofillEnabled. | 489 // An observer to listen for changes to prefs::kAutofillEnabled. |
482 std::unique_ptr<BooleanPrefMember> enabled_pref_; | 490 std::unique_ptr<BooleanPrefMember> enabled_pref_; |
483 | 491 |
484 // An observer to listen for changes to prefs::kAutofillWalletImportEnabled. | 492 // An observer to listen for changes to prefs::kAutofillWalletImportEnabled. |
485 std::unique_ptr<BooleanPrefMember> wallet_enabled_pref_; | 493 std::unique_ptr<BooleanPrefMember> wallet_enabled_pref_; |
486 | 494 |
495 // Set to true if autofill profile deduplication is enabled and needs to be | |
496 // performed on the next data refresh. | |
497 bool is_autofill_profile_dedupe_pending_ = false; | |
498 | |
487 DISALLOW_COPY_AND_ASSIGN(PersonalDataManager); | 499 DISALLOW_COPY_AND_ASSIGN(PersonalDataManager); |
488 }; | 500 }; |
489 | 501 |
490 } // namespace autofill | 502 } // namespace autofill |
491 | 503 |
492 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_ | 504 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_ |
OLD | NEW |