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

Unified Diff: chrome/browser/android/vr_shell/vr_shell_gl.cc

Issue 2865463003: Tracks GVR version crossed with headset type using UMA. (Closed)
Patch Set: Incorporated review feedback 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_shell_gl.cc
diff --git a/chrome/browser/android/vr_shell/vr_shell_gl.cc b/chrome/browser/android/vr_shell/vr_shell_gl.cc
index a666358aa36155ced534943352afdef5f1e9d985..c48e292dcfeb9cc0f06af7d8789b346557523078 100644
--- a/chrome/browser/android/vr_shell/vr_shell_gl.cc
+++ b/chrome/browser/android/vr_shell/vr_shell_gl.cc
@@ -22,8 +22,10 @@
#include "chrome/browser/android/vr_shell/vr_controller.h"
#include "chrome/browser/android/vr_shell/vr_gl_thread.h"
#include "chrome/browser/android/vr_shell/vr_gl_util.h"
+#include "chrome/browser/android/vr_shell/vr_metrics_util.h"
#include "chrome/browser/android/vr_shell/vr_shell.h"
#include "chrome/browser/android/vr_shell/vr_shell_renderer.h"
+#include "chrome/browser/android/vr_shell/vr_usage_monitor.h"
#include "device/vr/android/gvr/gvr_delegate.h"
#include "device/vr/android/gvr/gvr_device.h"
#include "device/vr/android/gvr/gvr_gamepad_data_provider.h"
@@ -150,12 +152,6 @@ std::unique_ptr<blink::WebMouseEvent> MakeMouseEvent(WebInputEvent::Type type,
return mouse_event;
}
-enum class ViewerType {
- UNKNOWN_TYPE = 0,
- CARDBOARD = 1,
- DAYDREAM = 2,
- VIEWER_TYPE_MAX,
-};
void MatfToGvrMat(const vr::Mat4f& in, gvr::Mat4f* out) {
// If our std::array implementation doesn't have any non-data members, we can
@@ -405,21 +401,7 @@ void VrShellGl::GvrInit(gvr_context* gvr_api) {
gvr_api_ = gvr::GvrApi::WrapNonOwned(gvr_api);
controller_.reset(new VrController(gvr_api));
- ViewerType viewerType;
- switch (gvr_api_->GetViewerType()) {
- case gvr::ViewerType::GVR_VIEWER_TYPE_DAYDREAM:
- viewerType = ViewerType::DAYDREAM;
- break;
- case gvr::ViewerType::GVR_VIEWER_TYPE_CARDBOARD:
- viewerType = ViewerType::CARDBOARD;
- break;
- default:
- NOTREACHED();
- viewerType = ViewerType::UNKNOWN_TYPE;
- break;
- }
- UMA_HISTOGRAM_ENUMERATION("VRViewerType", static_cast<int>(viewerType),
- static_cast<int>(ViewerType::VIEWER_TYPE_MAX));
+ VrMetricsUtil::LogVrViewerType(gvr_api);
}
void VrShellGl::InitializeRenderer() {

Powered by Google App Engine
This is Rietveld 408576698