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

Side by Side Diff: content/browser/device_sensors/data_fetcher_shared_memory_base.h

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 | « no previous file | content/browser/device_sensors/data_fetcher_shared_memory_base.cc » ('j') | 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 #ifndef CONTENT_BROWSER_DEVICE_SENSORS_DATA_FETCHER_SHARED_MEMORY_BASE_H_ 5 #ifndef CONTENT_BROWSER_DEVICE_SENSORS_DATA_FETCHER_SHARED_MEMORY_BASE_H_
6 #define CONTENT_BROWSER_DEVICE_SENSORS_DATA_FETCHER_SHARED_MEMORY_BASE_H_ 6 #define CONTENT_BROWSER_DEVICE_SENSORS_DATA_FETCHER_SHARED_MEMORY_BASE_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 13 matching lines...) Expand all
24 public: 24 public:
25 // Starts updating the shared memory buffer with sensor data at 25 // Starts updating the shared memory buffer with sensor data at
26 // regular intervals. Returns true if the relevant sensors could 26 // regular intervals. Returns true if the relevant sensors could
27 // be successfully activated. 27 // be successfully activated.
28 bool StartFetchingDeviceData(ConsumerType consumer_type); 28 bool StartFetchingDeviceData(ConsumerType consumer_type);
29 29
30 // Stops updating the shared memory buffer. Returns true if the 30 // Stops updating the shared memory buffer. Returns true if the
31 // relevant sensors could be successfully deactivated. 31 // relevant sensors could be successfully deactivated.
32 bool StopFetchingDeviceData(ConsumerType consumer_type); 32 bool StopFetchingDeviceData(ConsumerType consumer_type);
33 33
34 // Should be called before destruction to make sure all active
35 // sensors are unregistered.
36 void StopFetchingAllDeviceData();
37
34 // Returns the shared memory handle of the device sensor data 38 // Returns the shared memory handle of the device sensor data
35 // duplicated into the given process. This method should only be 39 // duplicated into the given process. This method should only be
36 // called after a call to StartFetchingDeviceData method with 40 // called after a call to StartFetchingDeviceData method with
37 // corresponding |consumer_type| parameter. 41 // corresponding |consumer_type| parameter.
38 base::SharedMemoryHandle GetSharedMemoryHandleForProcess( 42 base::SharedMemoryHandle GetSharedMemoryHandleForProcess(
39 ConsumerType consumer_type, base::ProcessHandle process); 43 ConsumerType consumer_type, base::ProcessHandle process);
40 44
41 enum FetcherType { 45 enum FetcherType {
42 // Fetcher runs on the same thread as its creator. 46 // Fetcher runs on the same thread as its creator.
43 FETCHER_TYPE_DEFAULT, 47 FETCHER_TYPE_DEFAULT,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // Owning pointers. Objects in the map are deleted in dtor. 93 // Owning pointers. Objects in the map are deleted in dtor.
90 typedef std::map<ConsumerType, base::SharedMemory*> SharedMemoryMap; 94 typedef std::map<ConsumerType, base::SharedMemory*> SharedMemoryMap;
91 SharedMemoryMap shared_memory_map_; 95 SharedMemoryMap shared_memory_map_;
92 96
93 DISALLOW_COPY_AND_ASSIGN(DataFetcherSharedMemoryBase); 97 DISALLOW_COPY_AND_ASSIGN(DataFetcherSharedMemoryBase);
94 }; 98 };
95 99
96 } // namespace content 100 } // namespace content
97 101
98 #endif // CONTENT_BROWSER_DEVICE_SENSORS_DATA_FETCHER_SHARED_MEMORY_BASE_H_ 102 #endif // CONTENT_BROWSER_DEVICE_SENSORS_DATA_FETCHER_SHARED_MEMORY_BASE_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/device_sensors/data_fetcher_shared_memory_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698