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

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

Issue 578863002: Fix the indirect pure virtual calls in DataFetcherSharedMemoryBase destructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unsigned 0 compilation Created 6 years, 3 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
« no previous file with comments | « content/browser/device_sensors/data_fetcher_shared_memory_base.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 } 79 }
80 80
81 base::SharedMemoryHandle 81 base::SharedMemoryHandle
82 DeviceInertialSensorService::GetSharedMemoryHandleForProcess( 82 DeviceInertialSensorService::GetSharedMemoryHandleForProcess(
83 ConsumerType consumer_type, base::ProcessHandle handle) { 83 ConsumerType consumer_type, base::ProcessHandle handle) {
84 DCHECK(thread_checker_.CalledOnValidThread()); 84 DCHECK(thread_checker_.CalledOnValidThread());
85 return data_fetcher_->GetSharedMemoryHandleForProcess(consumer_type, handle); 85 return data_fetcher_->GetSharedMemoryHandleForProcess(consumer_type, handle);
86 } 86 }
87 87
88 void DeviceInertialSensorService::Shutdown() { 88 void DeviceInertialSensorService::Shutdown() {
89 data_fetcher_.reset(); 89 if (data_fetcher_) {
90 data_fetcher_->StopFetchingAllDeviceData();
91 data_fetcher_.reset();
92 }
90 is_shutdown_ = true; 93 is_shutdown_ = true;
91 } 94 }
92 95
93 void DeviceInertialSensorService::SetDataFetcherForTesting( 96 void DeviceInertialSensorService::SetDataFetcherForTesting(
94 DataFetcherSharedMemory* test_data_fetcher) { 97 DataFetcherSharedMemory* test_data_fetcher) {
98 if (data_fetcher_)
99 data_fetcher_->StopFetchingAllDeviceData();
95 data_fetcher_.reset(test_data_fetcher); 100 data_fetcher_.reset(test_data_fetcher);
96 } 101 }
97 102
98 } // namespace content 103 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/device_sensors/data_fetcher_shared_memory_base.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698