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

Unified Diff: components/ukm/ukm_service.h

Issue 2719823003: Convert first contentful paint logging to the new UKM client API (Closed)
Patch Set: migrate to int32_t 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
Index: components/ukm/ukm_service.h
diff --git a/components/ukm/ukm_service.h b/components/ukm/ukm_service.h
index 1775d16a1b7fb69218939aeb0f1686f9e12e7306..98984f56cc96f8f84f1a7e108e0740a0bb36e413 100644
--- a/components/ukm/ukm_service.h
+++ b/components/ukm/ukm_service.h
@@ -83,6 +83,10 @@ class UkmService : public base::SupportsWeakPtr<UkmService> {
// the provided PrefRegistry.
static void RegisterPrefs(PrefRegistrySimple* registry);
+ // Allocates a new source id. The allocated source id is guaranteed to be
+ // unique for the duration of this browser session.
+ static int32_t NewSourceId();
+
using AddEntryCallback = base::Callback<void(std::unique_ptr<UkmEntry>)>;
protected:
@@ -90,6 +94,10 @@ class UkmService : public base::SupportsWeakPtr<UkmService> {
return sources_;
}
+ const std::vector<std::unique_ptr<UkmEntry>>& entries_for_testing() const {
+ return entries_;
+ }
+
private:
friend UkmPageLoadMetricsObserver;
FRIEND_TEST_ALL_PREFIXES(UkmServiceTest, AddEntryOnlyWithNonEmptyMetrics);

Powered by Google App Engine
This is Rietveld 408576698