| Index: components/autofill/core/browser/personal_data_manager.h
|
| diff --git a/components/autofill/core/browser/personal_data_manager.h b/components/autofill/core/browser/personal_data_manager.h
|
| index 84fc604a3bb50ea24f203e4414320bc21da74d27..2f608e61c5924d3a30f9ca1f999a8ffddd2eaaa2 100644
|
| --- a/components/autofill/core/browser/personal_data_manager.h
|
| +++ b/components/autofill/core/browser/personal_data_manager.h
|
| @@ -18,6 +18,7 @@
|
| #include "base/observer_list.h"
|
| #include "base/strings/string16.h"
|
| #include "build/build_config.h"
|
| +#include "components/autofill/core/browser/autofill_metrics.h"
|
| #include "components/autofill/core/browser/autofill_profile.h"
|
| #include "components/autofill/core/browser/credit_card.h"
|
| #include "components/autofill/core/browser/field_types.h"
|
| @@ -40,6 +41,7 @@ class SigninManagerBase;
|
| namespace autofill {
|
| class AutofillInteractiveTest;
|
| class AutofillTest;
|
| +class AutofillUkm;
|
| class FormStructure;
|
| class PersonalDataManagerObserver;
|
| class PersonalDataManagerFactory;
|
| @@ -54,6 +56,10 @@ namespace syncer {
|
| class SyncService;
|
| } // namespace syncer
|
|
|
| +namespace ukm {
|
| +class UkmService;
|
| +} // namespace ukm
|
| +
|
| namespace autofill {
|
|
|
| extern const char kFrecencyFieldTrialName[];
|
| @@ -67,7 +73,8 @@ class PersonalDataManager : public KeyedService,
|
| public WebDataServiceConsumer,
|
| public AutofillWebDataServiceObserverOnUIThread {
|
| public:
|
| - explicit PersonalDataManager(const std::string& app_locale);
|
| + explicit PersonalDataManager(const std::string& app_locale,
|
| + ukm::UkmService* ukm_service);
|
| ~PersonalDataManager() override;
|
|
|
| // Kicks off asynchronous loading of profiles and credit cards.
|
| @@ -269,6 +276,14 @@ class PersonalDataManager : public KeyedService,
|
| static void DedupeCreditCardToSuggest(
|
| std::list<CreditCard*>* cards_to_suggest);
|
|
|
| + // Sets the URL to be used when logging the next card upload decision metric.
|
| + void SetCardUploadDecisionMetricUrlUkm(const GURL& url);
|
| +
|
| + // Logs the card upload decision metric based on the set URL. Does nothing if
|
| + // no URL is set. Resets the URL after the log.
|
| + void LogCardUploadDecisionMetricUkm(
|
| + AutofillMetrics::CardUploadDecisionMetric upload_decision);
|
| +
|
| // Notifies test observers that personal data has changed.
|
| void NotifyPersonalDataChangedForTest() {
|
| NotifyPersonalDataChanged();
|
| @@ -574,6 +589,8 @@ class PersonalDataManager : public KeyedService,
|
| // Whether new information was received from the sync server.
|
| bool has_synced_new_data_ = false;
|
|
|
| + std::unique_ptr<AutofillUkm> autofill_ukm_;
|
| +
|
| #if defined(OS_ANDROID)
|
| // The context for the request to be used to fetch libaddressinput's address
|
| // validation rules.
|
|
|