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

Unified Diff: content/browser/gamepad/gamepad_provider.h

Issue 10833030: Prevent multile DoPoll() calls from being simultaneously pending (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 | content/browser/gamepad/gamepad_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gamepad/gamepad_provider.h
===================================================================
--- content/browser/gamepad/gamepad_provider.h (revision 148495)
+++ content/browser/gamepad/gamepad_provider.h (working copy)
@@ -65,6 +65,11 @@
base::Lock is_paused_lock_;
bool is_paused_;
+ // Keep track of when a polling task is schedlued, so as to prevent us from
+ // accidentally scheduling more than one at any time, when rapidly toggling
+ // |is_paused_|.
+ bool have_scheduled_do_poll_;
+
// Updated based on notification from SystemMonitor when the system devices
// have been updated, and this notification is passed on to the data fetcher
// to enable it to avoid redundant (and possibly expensive) is-connected
« no previous file with comments | « no previous file | content/browser/gamepad/gamepad_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698