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

Unified Diff: chrome/browser/android/vr_shell/vr_usage_monitor.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
Index: chrome/browser/android/vr_shell/vr_usage_monitor.cc
diff --git a/chrome/browser/android/vr_shell/vr_usage_monitor.cc b/chrome/browser/android/vr_shell/vr_usage_monitor.cc
index 1510718cc9e7a81280193cc9de04b12e10664264..f9301ae5e534dbbd8f2fa2125c44fdb7104696da 100644
--- a/chrome/browser/android/vr_shell/vr_usage_monitor.cc
+++ b/chrome/browser/android/vr_shell/vr_usage_monitor.cc
@@ -9,11 +9,6 @@
#include "components/rappor/rappor_utils.h"
#include "content/public/browser/browser_thread.h"
-// There is a dependency cycle between chrome/brower and
-// chrome/browser/android/vr_shell. To temporarily fix and unblock tests,
-// don't send rappor events.
-#define ALLOW_SENDING_RAPPOR_EVENTS 0
-
namespace vr_shell {
// minimum duration: 7 seconds for video, no minimum for headset/vr modes
@@ -84,32 +79,27 @@ inline const char* HistogramNameFromSessionType(SessionEventName name) {
void SendRapporEnteredMode(const GURL& origin, VRMode mode) {
switch (mode) {
case VRMode::VR_FULLSCREEN:
-#if ALLOW_SENDING_RAPPOR_EVENTS
- rappor::SampleDomainAndRegistryFromGURL(
- g_browser_process->rappor_service(), "VR.FullScreenMode", origin);
-#endif
+ rappor::TrySampleDomainAndRegistryWithDefaultService("VR.FullScreenMode",
+ origin);
default:
break;
}
}
void SendRapporEnteredVideoMode(const GURL& origin, VRMode mode) {
-#if ALLOW_SENDING_RAPPOR_EVENTS
switch (mode) {
case VRMode::VR_BROWSER:
- rappor::SampleDomainAndRegistryFromGURL(
- g_browser_process->rappor_service(), "VR.Video.Browser", origin);
+ rappor::TrySampleDomainAndRegistryWithDefaultService("VR.Video.Browser",
+ origin);
case VRMode::WEBVR:
- rappor::SampleDomainAndRegistryFromGURL(
- g_browser_process->rappor_service(), "VR.Video.WebVR", origin);
+ rappor::TrySampleDomainAndRegistryWithDefaultService("VR.Video.WebVR",
+ origin);
case VRMode::VR_FULLSCREEN:
- rappor::SampleDomainAndRegistryFromGURL(
- g_browser_process->rappor_service(), "VR.Video.FullScreenMode",
- origin);
+ rappor::TrySampleDomainAndRegistryWithDefaultService(
+ "VR.Video.FullScreenMode", origin);
default:
break;
}
-#endif
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698