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

Unified Diff: device/vr/android/gvr/gvr_device_provider.cc

Issue 2705653005: Fix WebVR getDevices promise not resolving when VR Services are not compatible. (Closed)
Patch Set: rebase Created 3 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/vr/android/gvr/gvr_device_provider.cc
diff --git a/device/vr/android/gvr/gvr_device_provider.cc b/device/vr/android/gvr/gvr_device_provider.cc
index 971fd7fcb9156864949e52b9379a2a5a7dee3e2d..4aff6ce54860890f749df2ec638836a32b48f671 100644
--- a/device/vr/android/gvr/gvr_device_provider.cc
+++ b/device/vr/android/gvr/gvr_device_provider.cc
@@ -34,7 +34,8 @@ GvrDeviceProvider::~GvrDeviceProvider() {
void GvrDeviceProvider::GetDevices(std::vector<VRDevice*>* devices) {
Initialize();
- devices->push_back(vr_device_.get());
+ if (initialized_)
+ devices->push_back(vr_device_.get());
}
void GvrDeviceProvider::Initialize() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698