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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java

Issue 2865463003: Tracks GVR version crossed with headset type using UMA. (Closed)
Patch Set: Fixed comments Created 3 years, 6 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/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java
index 4debec59ab4641db031e49bea713768e971c1777..34778265b8fbd690ab806bbfe9a71b43fc035901 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java
@@ -1001,14 +1001,14 @@ public class VrShellDelegate implements ApplicationStatus.ActivityStateListener,
private static boolean isVrCoreCompatible(
VrCoreVersionChecker versionChecker, Tab tabToShowInfobarIn) {
- int vrCoreCompatibility = versionChecker.getVrCoreCompatibility();
+ int vrCoreCompatibility = versionChecker.getVrCoreInfo().compatibility;
- if (vrCoreCompatibility == VrCoreVersionChecker.VR_NOT_AVAILABLE
- || vrCoreCompatibility == VrCoreVersionChecker.VR_OUT_OF_DATE) {
+ if (vrCoreCompatibility == VrCoreCompatibility.VR_NOT_AVAILABLE
+ || vrCoreCompatibility == VrCoreCompatibility.VR_OUT_OF_DATE) {
promptToUpdateVrServices(vrCoreCompatibility, tabToShowInfobarIn);
}
- return vrCoreCompatibility == VrCoreVersionChecker.VR_READY;
+ return vrCoreCompatibility == VrCoreCompatibility.VR_READY;
}
private static void promptToUpdateVrServices(int vrCoreCompatibility, Tab tab) {
@@ -1018,11 +1018,11 @@ public class VrShellDelegate implements ApplicationStatus.ActivityStateListener,
final Activity activity = tab.getActivity();
String infobarText;
String buttonText;
- if (vrCoreCompatibility == VrCoreVersionChecker.VR_NOT_AVAILABLE) {
+ if (vrCoreCompatibility == VrCoreCompatibility.VR_NOT_AVAILABLE) {
// Supported, but not installed. Ask user to install instead of upgrade.
infobarText = activity.getString(R.string.vr_services_check_infobar_install_text);
buttonText = activity.getString(R.string.vr_services_check_infobar_install_button);
- } else if (vrCoreCompatibility == VrCoreVersionChecker.VR_OUT_OF_DATE) {
+ } else if (vrCoreCompatibility == VrCoreCompatibility.VR_OUT_OF_DATE) {
infobarText = activity.getString(R.string.vr_services_check_infobar_update_text);
buttonText = activity.getString(R.string.vr_services_check_infobar_update_button);
} else {
@@ -1149,6 +1149,12 @@ public class VrShellDelegate implements ApplicationStatus.ActivityStateListener,
return mNativeVrShellDelegate;
}
+ @CalledByNative
+ private long getVrCoreInfo() {
+ assert mVrCoreVersionChecker != null;
+ return mVrCoreVersionChecker.getVrCoreInfo().makeNativeVrCoreInfo();
+ }
+
private void destroy() {
if (sInstance == null) return;
shutdownVr(false /* disableVrMode */, false /* canReenter */, false /* stayingInChrome */);

Powered by Google App Engine
This is Rietveld 408576698