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

Unified Diff: content/browser/device_sensors/device_sensor_host.cc

Issue 2410123002: Remove content::BrowserThread knowledge from Device Sensors (Closed)
Patch Set: Handle DeviceSensorService's ThreadChecker Created 4 years, 2 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: content/browser/device_sensors/device_sensor_host.cc
diff --git a/content/browser/device_sensors/device_sensor_host.cc b/content/browser/device_sensors/device_sensor_host.cc
index e4b806967e5c16aac8448233141f422249d19874..fd94e0cc60203adb19d1519d99758fca868c09d4 100644
--- a/content/browser/device_sensors/device_sensor_host.cc
+++ b/content/browser/device_sensors/device_sensor_host.cc
@@ -4,8 +4,8 @@
#include "content/browser/device_sensors/device_sensor_host.h"
+#include "base/message_loop/message_loop.h"
#include "content/browser/device_sensors/device_sensor_service.h"
-#include "content/public/browser/browser_thread.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
namespace content {
@@ -21,7 +21,8 @@ void DeviceSensorHost<MojoInterface, consumer_type>::Create(
template <typename MojoInterface, ConsumerType consumer_type>
DeviceSensorHost<MojoInterface, consumer_type>::DeviceSensorHost()
: is_started_(false) {
- DCHECK_CURRENTLY_ON(BrowserThread::IO);
+ DCHECK(base::MessageLoopForIO::IsCurrent());
+ DeviceSensorService::GetInstance()->InitOnIOThread();
}
template <typename MojoInterface, ConsumerType consumer_type>

Powered by Google App Engine
This is Rietveld 408576698