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

Unified Diff: device/gamepad/gamepad_data_fetcher_manager.cc

Issue 2351573002: Added support for GVR controllers (Closed)
Patch Set: Added appropriate Webkit dep to device/vr/BUILD.gn Created 4 years, 3 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 | device/gamepad/gamepad_pad_state_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/gamepad/gamepad_data_fetcher_manager.cc
diff --git a/device/gamepad/gamepad_data_fetcher_manager.cc b/device/gamepad/gamepad_data_fetcher_manager.cc
index 6b46eb80978a2307afea2a6d5c9440b329c95e99..cb91e165d314f7199a49a19c365bdca32624605b 100644
--- a/device/gamepad/gamepad_data_fetcher_manager.cc
+++ b/device/gamepad/gamepad_data_fetcher_manager.cc
@@ -38,11 +38,13 @@ void GamepadDataFetcherManager::RemoveSourceFactory(GamepadSource source) {
if (provider_)
provider_->RemoveSourceGamepadDataFetcher(source);
- for (FactoryVector::iterator it = factories_.begin(); it != factories_.end();
- ++it) {
+ for (FactoryVector::iterator it = factories_.begin();
+ it != factories_.end();) {
if ((*it)->source() == source) {
delete (*it);
- factories_.erase(it);
+ it = factories_.erase(it);
+ } else {
+ ++it;
}
}
}
« no previous file with comments | « no previous file | device/gamepad/gamepad_pad_state_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698