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

Unified Diff: content/browser/browser_main_loop.cc

Issue 10912062: Implement the gamepad API in the IPC proxy (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | content/browser/gamepad/data_fetcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_main_loop.cc
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index c9a409a84366080919510b2baa62585c25cd27a8..fd67b56b58740e8999654cb2a8e1141a3dcb6d1a 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -507,8 +507,6 @@ void BrowserMainLoop::ShutdownThreadsAndCleanUp() {
#endif
BrowserGpuChannelHostFactory::Terminate();
- GamepadService::GetInstance()->Terminate();
-
// The device monitors are using |system_monitor_| as dependency, so delete
// them before |system_monitor_| goes away.
// On Mac and windows, the monitor needs to be destroyed on the same thread
@@ -608,6 +606,10 @@ void BrowserMainLoop::ShutdownThreadsAndCleanUp() {
// more head start for those operations to finish.
BrowserThreadImpl::ShutdownThreadPool();
+ // Must happen after the I/O thread is shutdown since this class lives on the
+ // I/O thread and isn't threadsafe.
+ GamepadService::GetInstance()->Terminate();
+
if (parts_.get())
parts_->PostDestroyThreads();
}
« no previous file with comments | « no previous file | content/browser/gamepad/data_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698