Skip to content

Commit

Permalink
[sensors](CrOS/Linux) Rename SensorDeviceManager cc and h files.
Browse files Browse the repository at this point in the history
It is a followup patch to https://codereview.chromium.org/2533793002/
In addition to renaming this CL fixes a typo in code where sensor
cache in erased.

BUG=606766

Review-Url: https://codereview.chromium.org/2560263002
Cr-Commit-Position: refs/heads/master@{#437778}
  • Loading branch information
maksim.sisov authored and Commit bot committed Dec 10, 2016
1 parent 3c957a5 commit fac225c
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions device/generic_sensor/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ component("generic_sensor") {
]

sources += [
"linux/platform_sensor_manager.cc",
"linux/platform_sensor_manager.h",
"linux/sensor_device_manager.cc",
"linux/sensor_device_manager.h",
"platform_sensor_provider_linux.cc",
"platform_sensor_provider_linux.h",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "device/generic_sensor/linux/platform_sensor_manager.h"
#include "device/generic_sensor/linux/sensor_device_manager.h"

#include "base/strings/string_number_conversions.h"
#include "base/threading/thread_restrictions.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef DEVICE_GENERIC_SENSOR_LINUX_PLATFORM_SENSOR_MANAGER_H_
#define DEVICE_GENERIC_SENSOR_LINUX_PLATFORM_SENSOR_MANAGER_H_
#ifndef DEVICE_GENERIC_SENSOR_LINUX_SENSOR_DEVICE_MANAGER_H_
#define DEVICE_GENERIC_SENSOR_LINUX_SENSOR_DEVICE_MANAGER_H_

#include "base/scoped_observer.h"

Expand Down Expand Up @@ -80,4 +80,4 @@ class DEVICE_GENERIC_SENSOR_EXPORT SensorDeviceManager

} // namespace device

#endif // DEVICE_GENERIC_SENSOR_LINUX_PLATFORM_SENSOR_MANAGER_H_
#endif // DEVICE_GENERIC_SENSOR_LINUX_SENSOR_DEVICE_MANAGER_H_
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#include "base/strings/string_util.h"

#include "device/generic_sensor/generic_sensor_consts.h"
#include "device/generic_sensor/linux/platform_sensor_manager.h"
#include "device/generic_sensor/linux/sensor_data_linux.h"
#include "device/generic_sensor/linux/sensor_device_manager.h"
#include "device/generic_sensor/platform_sensor_provider_linux.h"

#include "testing/gmock/include/gmock/gmock.h"
Expand Down
2 changes: 1 addition & 1 deletion device/generic_sensor/platform_sensor_provider_linux.cc
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ void PlatformSensorProviderLinux::OnDeviceRemoved(
const std::string& device_node) {
DCHECK(CalledOnValidThread());
auto it = sensor_devices_by_type_.find(type);
if (it == sensor_devices_by_type_.end() &&
if (it != sensor_devices_by_type_.end() &&
it->second->device_node == device_node)
sensor_devices_by_type_.erase(it);
}
Expand Down
2 changes: 1 addition & 1 deletion device/generic_sensor/platform_sensor_provider_linux.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include "device/generic_sensor/platform_sensor_provider.h"

#include "device/generic_sensor/linux/platform_sensor_manager.h"
#include "device/generic_sensor/linux/sensor_device_manager.h"

namespace base {
template <typename T>
Expand Down

0 comments on commit fac225c

Please sign in to comment.