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

Unified Diff: components/rappor/rappor_utils.cc

Issue 2526643002: Re-enable rappor for vrshell (Closed)
Patch Set: 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
« components/rappor/rappor_utils.h ('K') | « 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..5ee673f1dfe147bf8f04bea697c7ec5c402a964e 100644
--- a/components/rappor/rappor_utils.cc
+++ b/components/rappor/rappor_utils.cc
@@ -45,4 +45,16 @@ void SampleDomainAndRegistryFromGURL(RapporService* rappor_service,
GetDomainAndRegistrySampleFromGURL(gurl));
}
+void TrySampleDomainAndRegistryWithDefaultService(const std::string& metric,
ddorwin 2016/11/28 21:45:42 Since we don't even check whether there is a defau
billorr 2016/11/28 23:13:03 Done.
+ const GURL& gurl) {
+ RapporService* defaultService = TryGetDefaultService();
+ SampleDomainAndRegistryFromGURL(defaultService, metric, gurl);
+}
+
+RapporService* TryGetDefaultService() {
+ return (GetDefaultService != nullptr) ? GetDefaultService() : nullptr;
+}
+
+RapporService* (*GetDefaultService)() = nullptr;
+
} // namespace rappor
« components/rappor/rappor_utils.h ('K') | « components/rappor/rappor_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698