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

Unified Diff: components/ukm/ukm_source.h

Issue 2717413003: Add support for logging additional metrics in UKM. (Closed)
Patch Set: record URL at nav start Created 3 years, 10 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
« no previous file with comments | « components/ukm/ukm_service_unittest.cc ('k') | components/ukm/ukm_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ukm/ukm_source.h
diff --git a/components/ukm/ukm_source.h b/components/ukm/ukm_source.h
index 854dd05337f0c8fe2db064290baa8cbfa7316910..a38ea0f6a7234352c30d55c4297e731d820f3702 100644
--- a/components/ukm/ukm_source.h
+++ b/components/ukm/ukm_source.h
@@ -8,6 +8,7 @@
#include <stddef.h>
#include "base/macros.h"
+#include "base/optional.h"
#include "base/time/time.h"
#include "url/gurl.h"
@@ -21,24 +22,44 @@ class UkmSource {
UkmSource();
~UkmSource();
- const GURL& committed_url() const { return committed_url_; }
- void set_committed_url(const GURL& committed_url) {
- committed_url_ = committed_url;
+ const GURL& url() const { return url_; }
+ void set_url(const GURL& url) { url_ = url; }
+
+ const base::Optional<base::TimeDelta>& parse_start() const {
+ return parse_start_;
+ }
+ void set_parse_start(base::TimeDelta parse_start) {
+ parse_start_ = parse_start;
}
- base::TimeDelta first_contentful_paint() const {
+ const base::Optional<base::TimeDelta>& first_contentful_paint() const {
return first_contentful_paint_;
}
void set_first_contentful_paint(base::TimeDelta first_contentful_paint) {
first_contentful_paint_ = first_contentful_paint;
}
+ const base::Optional<base::TimeDelta>& first_meaningful_paint() const {
+ return first_meaningful_paint_;
+ }
+ void set_first_meaningful_paint(base::TimeDelta first_meaningful_paint) {
+ first_meaningful_paint_ = first_meaningful_paint;
+ }
+
+ const base::Optional<base::TimeDelta>& total_time() const {
+ return total_time_;
+ }
+ void set_total_time(base::TimeDelta total_time) { total_time_ = total_time; }
+
// Serializes the members of the class into the supplied proto.
void PopulateProto(Source* proto_source);
private:
- GURL committed_url_;
- base::TimeDelta first_contentful_paint_;
+ GURL url_;
+ base::Optional<base::TimeDelta> parse_start_;
+ base::Optional<base::TimeDelta> first_contentful_paint_;
+ base::Optional<base::TimeDelta> first_meaningful_paint_;
+ base::Optional<base::TimeDelta> total_time_;
DISALLOW_COPY_AND_ASSIGN(UkmSource);
};
« no previous file with comments | « components/ukm/ukm_service_unittest.cc ('k') | components/ukm/ukm_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698