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

Unified Diff: chrome/browser/android/vr_shell/vr_usage_monitor.h

Issue 2865463003: Tracks GVR version crossed with headset type using UMA. (Closed)
Patch Set: Rebased on ToT, changed logging to UMA_HISTOGRAM_SPARSE_SLOWLY Created 3 years, 7 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: chrome/browser/android/vr_shell/vr_usage_monitor.h
diff --git a/chrome/browser/android/vr_shell/vr_usage_monitor.h b/chrome/browser/android/vr_shell/vr_usage_monitor.h
index 594f34841f07235fb3327585e4050f6857269520..21fa392d144d9ef0e33371d090ab2096d193a449 100644
--- a/chrome/browser/android/vr_shell/vr_usage_monitor.h
+++ b/chrome/browser/android/vr_shell/vr_usage_monitor.h
@@ -12,6 +12,10 @@
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
+#ifdef ANDROID
+#include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/gvr.h"
ddorwin 2017/05/16 00:15:51 We should avoid adding GVR dependencies to more fi
tiborg 2017/05/23 15:47:25 Ok, moved it to a separate file.
+#include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/gvr_types.h"
+#endif // ANDROID
namespace vr_shell {
@@ -53,6 +57,34 @@ class SessionTimer {
DISALLOW_COPY_AND_ASSIGN(SessionTimer);
};
+enum class ViewerType {
+ UNKNOWN_TYPE = 0,
+ CARDBOARD = 1,
+ DAYDREAM = 2,
+ VIEWER_TYPE_MAX,
+};
+
+enum GvrVersionStatus { OLDER, UNKNOWN, PRECISE };
+
+class VrMetricsUtil {
+ public:
+#ifdef ANDROID
+ static void LogGvrVersionForVrViewerType(gvr_context* context,
+ GvrVersionStatus version_status,
+ gvr_version version);
+ static void LogVrViewerType(gvr_context* context);
+#endif // ANDROID
+
+ private:
+#ifdef ANDROID
+ static ViewerType GetVrViewerType(gvr_context* context);
+
+ static bool logged_gvr_version_;
ddorwin 2017/05/16 00:15:51 has_...
tiborg 2017/05/23 15:47:25 Done.
+#endif // ANDROID
+
+ DISALLOW_IMPLICIT_CONSTRUCTORS(VrMetricsUtil);
+};
+
// This class is not threadsafe and must only be used from the main thread.
class VrMetricsHelper : public content::WebContentsObserver {
public:

Powered by Google App Engine
This is Rietveld 408576698