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

Unified Diff: components/rappor/rappor_utils.cc

Issue 2526643002: Re-enable rappor for vrshell (Closed)
Patch Set: CR feedback Created 4 years, 1 month 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/rappor/rappor_utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/rappor/rappor_utils.cc
diff --git a/components/rappor/rappor_utils.cc b/components/rappor/rappor_utils.cc
index 89e4576b7ba30837fe5ba8e2d3e947fbfb5efd02..639ba259a52db79a7394f6fa9ba9ff2033d904c8 100644
--- a/components/rappor/rappor_utils.cc
+++ b/components/rappor/rappor_utils.cc
@@ -45,4 +45,15 @@ void SampleDomainAndRegistryFromGURL(RapporService* rappor_service,
GetDomainAndRegistrySampleFromGURL(gurl));
}
+RapporService* (*g_GetDefaultService)() = nullptr;
+
+RapporService* GetDefaultService() {
+ return (g_GetDefaultService != nullptr) ? g_GetDefaultService() : nullptr;
+}
+
+void SetDefaultServiceAccessor(RapporService* (*getDefaultService)()) {
+ DCHECK(g_GetDefaultService == nullptr);
+ g_GetDefaultService = getDefaultService;
+}
+
} // namespace rappor
« no previous file with comments | « components/rappor/rappor_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698