| Index: device/device_sensors/data_fetcher_shared_memory_default.cc
|
| diff --git a/content/browser/device_sensors/data_fetcher_shared_memory_default.cc b/device/device_sensors/data_fetcher_shared_memory_default.cc
|
| similarity index 84%
|
| rename from content/browser/device_sensors/data_fetcher_shared_memory_default.cc
|
| rename to device/device_sensors/data_fetcher_shared_memory_default.cc
|
| index 9b3a60babe8f9e85dacda3fc898e131868434012..a1155de2ea4c5e3ce9a85c13c5862a5cbe0be8ac 100644
|
| --- a/content/browser/device_sensors/data_fetcher_shared_memory_default.cc
|
| +++ b/device/device_sensors/data_fetcher_shared_memory_default.cc
|
| @@ -2,15 +2,14 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "content/browser/device_sensors/data_fetcher_shared_memory.h"
|
| +#include "device/device_sensors/data_fetcher_shared_memory.h"
|
|
|
| #include "base/logging.h"
|
| #include "base/metrics/histogram.h"
|
|
|
| namespace {
|
|
|
| -bool SetMotionBuffer(content::DeviceMotionHardwareBuffer* buffer,
|
| - bool enabled) {
|
| +bool SetMotionBuffer(device::DeviceMotionHardwareBuffer* buffer, bool enabled) {
|
| if (!buffer)
|
| return false;
|
| buffer->seqlock.WriteBegin();
|
| @@ -19,8 +18,8 @@ bool SetMotionBuffer(content::DeviceMotionHardwareBuffer* buffer,
|
| return true;
|
| }
|
|
|
| -bool SetOrientationBuffer(
|
| - content::DeviceOrientationHardwareBuffer* buffer, bool enabled) {
|
| +bool SetOrientationBuffer(device::DeviceOrientationHardwareBuffer* buffer,
|
| + bool enabled) {
|
| if (!buffer)
|
| return false;
|
| buffer->seqlock.WriteBegin();
|
| @@ -29,8 +28,7 @@ bool SetOrientationBuffer(
|
| return true;
|
| }
|
|
|
| -bool SetLightBuffer(content::DeviceLightHardwareBuffer* buffer,
|
| - double lux) {
|
| +bool SetLightBuffer(device::DeviceLightHardwareBuffer* buffer, double lux) {
|
| if (!buffer)
|
| return false;
|
| buffer->seqlock.WriteBegin();
|
| @@ -41,7 +39,7 @@ bool SetLightBuffer(content::DeviceLightHardwareBuffer* buffer,
|
|
|
| } // namespace
|
|
|
| -namespace content {
|
| +namespace device {
|
|
|
| DataFetcherSharedMemory::DataFetcherSharedMemory()
|
| : motion_buffer_(nullptr),
|
| @@ -64,7 +62,7 @@ bool DataFetcherSharedMemory::Start(ConsumerType consumer_type, void* buffer) {
|
| orientation_buffer_ =
|
| static_cast<DeviceOrientationHardwareBuffer*>(buffer);
|
| UMA_HISTOGRAM_BOOLEAN("InertialSensor.OrientationDefaultAvailable",
|
| - false);
|
| + false);
|
| return SetOrientationBuffer(orientation_buffer_, true);
|
| case CONSUMER_TYPE_LIGHT:
|
| light_buffer_ = static_cast<DeviceLightHardwareBuffer*>(buffer);
|
| @@ -90,4 +88,4 @@ bool DataFetcherSharedMemory::Stop(ConsumerType consumer_type) {
|
| return false;
|
| }
|
|
|
| -} // namespace content
|
| +} // namespace device
|
|
|