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

Unified Diff: device/sensors/data_fetcher_shared_memory_default.cc

Issue 2646093002: Move //content/browser/device_sensor/ into device/sensors (Closed)
Patch Set: update git log Created 3 years, 11 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: device/sensors/data_fetcher_shared_memory_default.cc
diff --git a/content/browser/device_sensors/data_fetcher_shared_memory_default.cc b/device/sensors/data_fetcher_shared_memory_default.cc
similarity index 83%
rename from content/browser/device_sensors/data_fetcher_shared_memory_default.cc
rename to device/sensors/data_fetcher_shared_memory_default.cc
index 9e8dc3de3a9b501419fb71f6212247c49100f08f..354879f26ef090f0f1559bcd539dfb5ea2eead13 100644
--- a/content/browser/device_sensors/data_fetcher_shared_memory_default.cc
+++ b/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/sensors/data_fetcher_shared_memory.h"
#include "base/logging.h"
#include "base/metrics/histogram_macros.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,12 +39,11 @@ bool SetLightBuffer(content::DeviceLightHardwareBuffer* buffer,
} // namespace
-namespace content {
+namespace device {
DataFetcherSharedMemory::DataFetcherSharedMemory() {}
-DataFetcherSharedMemory::~DataFetcherSharedMemory() {
-}
+DataFetcherSharedMemory::~DataFetcherSharedMemory() {}
bool DataFetcherSharedMemory::Start(ConsumerType consumer_type, void* buffer) {
DCHECK(buffer);
@@ -60,7 +57,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_ORIENTATION_ABSOLUTE:
orientation_absolute_buffer_ =
@@ -92,4 +89,4 @@ bool DataFetcherSharedMemory::Stop(ConsumerType consumer_type) {
return false;
}
-} // namespace content
+} // namespace device

Powered by Google App Engine
This is Rietveld 408576698