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

Unified Diff: device/generic_sensor/sensor_provider_impl.cc

Issue 2370343002: [sensors] Ambient light sensor implementation for ChromeOS and Linux. (Closed)
Patch Set: move set task runner inside if statements 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
« no previous file with comments | « device/generic_sensor/sensor_provider_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/generic_sensor/sensor_provider_impl.cc
diff --git a/device/generic_sensor/sensor_provider_impl.cc b/device/generic_sensor/sensor_provider_impl.cc
index 8a7860cb1c971d16493ace11b16fe353f1da3dda..6f2287d8a51319e63fda3e467e717f91f498dca8 100644
--- a/device/generic_sensor/sensor_provider_impl.cc
+++ b/device/generic_sensor/sensor_provider_impl.cc
@@ -32,9 +32,12 @@ void NotifySensorCreated(
} // namespace
// static
-void SensorProviderImpl::Create(mojom::SensorProviderRequest request) {
+void SensorProviderImpl::Create(
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner,
+ mojom::SensorProviderRequest request) {
PlatformSensorProvider* provider = PlatformSensorProvider::GetInstance();
if (provider) {
+ provider->SetTaskRunner(task_runner);
Mikhail 2016/10/28 11:29:03 1) this is better to be a ctor partameter 2) it sh
mojo::MakeStrongBinding(base::WrapUnique(new SensorProviderImpl(provider)),
std::move(request));
}
« no previous file with comments | « device/generic_sensor/sensor_provider_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698