Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(809)

Unified Diff: components/autofill/core/browser/autofill_ukm.h

Issue 2740633002: [Autofill] Add upstreaming UKM (Closed)
Patch Set: Re-do Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698