Index: components/autofill/core/browser/autofill_ukm.h |
diff --git a/components/autofill/core/browser/autofill_ukm.h b/components/autofill/core/browser/autofill_ukm.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d632b2844ac8e870c45504263bacb0c540443d1a |
--- /dev/null |
+++ b/components/autofill/core/browser/autofill_ukm.h |
@@ -0,0 +1,35 @@ |
+// Copyright 2017 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_UKM_H_ |
+#define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_UKM_H_ |
+ |
+#include "base/macros.h" |
+#include "components/autofill/core/browser/autofill_metrics.h" |
+ |
+class GURL; |
+ |
+namespace ukm { |
+class UkmService; |
+} // namespace ukm |
+ |
+namespace autofill { |
+ |
+// A class to log Autofill related Url Keyed Metrics. |
+class AutofillUkm { |
Mathieu
2017/03/09 18:40:49
I don't think we need the class, right? LogUkm cou
sebsg
2017/03/09 19:57:04
Done.
|
+ public: |
+ // Logs the the |ukm| with the specified |url| and the specified |metrics|. |
+ // Returns whether the ukm was sucessfully logged. |
+ static bool LogUkm(ukm::UkmService* ukm_service, |
+ const GURL& url, |
+ const std::string& ukm, |
+ const std::map<std::string, int>& metrics); |
+ |
+ private: |
+ AutofillUkm(){}; |
+}; |
+ |
+} // namespace autofill |
+ |
+#endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_UKM_H_ |