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

Side by Side Diff: services/device/public/cpp/generic_sensor/sensor_reading.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/public/cpp/sensor_reading.h" 5 #include "services/device/public/cpp/generic_sensor/sensor_reading.h"
6 6
7 namespace device { 7 namespace device {
8 8
9 SensorReading::SensorReading() = default; 9 SensorReading::SensorReading() = default;
10 SensorReading::SensorReading(const SensorReading& other) = default; 10 SensorReading::SensorReading(const SensorReading& other) = default;
11 SensorReading::~SensorReading() = default; 11 SensorReading::~SensorReading() = default;
12 12
13 SensorReadingSharedBuffer::SensorReadingSharedBuffer() = default; 13 SensorReadingSharedBuffer::SensorReadingSharedBuffer() = default;
14 SensorReadingSharedBuffer::~SensorReadingSharedBuffer() = default; 14 SensorReadingSharedBuffer::~SensorReadingSharedBuffer() = default;
15 15
16 // static 16 // static
17 uint64_t SensorReadingSharedBuffer::GetOffset(mojom::SensorType type) { 17 uint64_t SensorReadingSharedBuffer::GetOffset(mojom::SensorType type) {
18 return (static_cast<uint64_t>(mojom::SensorType::LAST) - 18 return (static_cast<uint64_t>(mojom::SensorType::LAST) -
19 static_cast<uint64_t>(type)) * 19 static_cast<uint64_t>(type)) *
20 sizeof(SensorReadingSharedBuffer); 20 sizeof(SensorReadingSharedBuffer);
21 } 21 }
22 22
23 } // namespace device 23 } // namespace device
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698