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

Side by Side Diff: content/browser/device_sensors/device_inertial_sensor_service.cc

Issue 285373002: Cleanup unused class/includes device(motion|orientation) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/browser/device_sensors/device_inertial_sensor_service.h" 5 #include "content/browser/device_sensors/device_inertial_sensor_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "content/browser/device_sensors/data_fetcher_shared_memory.h" 10 #include "content/browser/device_sensors/data_fetcher_shared_memory.h"
11 #include "content/public/browser/render_process_host.h"
12 11
13 namespace content { 12 namespace content {
14 13
15 DeviceInertialSensorService::DeviceInertialSensorService() 14 DeviceInertialSensorService::DeviceInertialSensorService()
16 : num_motion_readers_(0), 15 : num_motion_readers_(0),
17 num_orientation_readers_(0), 16 num_orientation_readers_(0),
18 is_shutdown_(false) { 17 is_shutdown_(false) {
19 } 18 }
20 19
21 DeviceInertialSensorService::~DeviceInertialSensorService() { 20 DeviceInertialSensorService::~DeviceInertialSensorService() {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 ConsumerType consumer_type, base::ProcessHandle handle) { 83 ConsumerType consumer_type, base::ProcessHandle handle) {
85 DCHECK(thread_checker_.CalledOnValidThread()); 84 DCHECK(thread_checker_.CalledOnValidThread());
86 return data_fetcher_->GetSharedMemoryHandleForProcess(consumer_type, handle); 85 return data_fetcher_->GetSharedMemoryHandleForProcess(consumer_type, handle);
87 } 86 }
88 87
89 void DeviceInertialSensorService::Shutdown() { 88 void DeviceInertialSensorService::Shutdown() {
90 data_fetcher_.reset(); 89 data_fetcher_.reset();
91 is_shutdown_ = true; 90 is_shutdown_ = true;
92 } 91 }
93 92
94 void DeviceInertialSensorService::SetDataFetcherForTests( 93 void DeviceInertialSensorService::SetDataFetcherForTests(
timvolodine 2014/05/21 17:53:13 while we are at it, could you change this to: "Set
riju_ 2014/05/22 11:34:31 Done.
95 DataFetcherSharedMemory* test_data_fetcher) { 94 DataFetcherSharedMemory* test_data_fetcher) {
96 data_fetcher_.reset(test_data_fetcher); 95 data_fetcher_.reset(test_data_fetcher);
97 } 96 }
98 97
99 } // namespace content 98 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698