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

Side by Side Diff: services/device/generic_sensor/linux/sensor_device_manager.cc

Issue 2865263002: Move //device/generic_sensor to be part of the internal implementation of the Device Service. (Closed)
Patch Set: code rebase Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "device/generic_sensor/linux/sensor_device_manager.h" 5 #include "services/device/generic_sensor/linux/sensor_device_manager.h"
6 6
7 #include "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "base/threading/thread_restrictions.h" 8 #include "base/threading/thread_restrictions.h"
9 #include "base/threading/thread_task_runner_handle.h" 9 #include "base/threading/thread_task_runner_handle.h"
10 #include "device/generic_sensor/linux/sensor_data_linux.h" 10 #include "services/device/generic_sensor/linux/sensor_data_linux.h"
11 11
12 namespace device { 12 namespace device {
13 13
14 namespace { 14 namespace {
15 15
16 std::string StringOrEmptyIfNull(const char* value) { 16 std::string StringOrEmptyIfNull(const char* value) {
17 return value ? value : std::string(); 17 return value ? value : std::string();
18 } 18 }
19 19
20 } // namespace 20 } // namespace
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 return; 164 return;
165 mojom::SensorType type = sensor->second; 165 mojom::SensorType type = sensor->second;
166 sensors_by_node_.erase(sensor); 166 sensors_by_node_.erase(sensor);
167 167
168 task_runner_->PostTask( 168 task_runner_->PostTask(
169 FROM_HERE, base::Bind(&SensorDeviceManager::Delegate::OnDeviceRemoved, 169 FROM_HERE, base::Bind(&SensorDeviceManager::Delegate::OnDeviceRemoved,
170 base::Unretained(delegate_), type, device_node)); 170 base::Unretained(delegate_), type, device_node));
171 } 171 }
172 172
173 } // namespace device 173 } // namespace device
OLDNEW
« no previous file with comments | « services/device/generic_sensor/linux/sensor_device_manager.h ('k') | services/device/generic_sensor/platform_sensor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698