| OLD | NEW |
| 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 COMPONENTS_STORAGE_MONITOR_STORAGE_MONITOR_H_ | 5 #ifndef COMPONENTS_STORAGE_MONITOR_STORAGE_MONITOR_H_ |
| 6 #define COMPONENTS_STORAGE_MONITOR_STORAGE_MONITOR_H_ | 6 #define COMPONENTS_STORAGE_MONITOR_STORAGE_MONITOR_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 friend class ReceiverImpl; | 163 friend class ReceiverImpl; |
| 164 | 164 |
| 165 // Key: device id. | 165 // Key: device id. |
| 166 typedef std::map<std::string, StorageInfo> StorageMap; | 166 typedef std::map<std::string, StorageInfo> StorageMap; |
| 167 | 167 |
| 168 void ProcessAttach(const StorageInfo& storage); | 168 void ProcessAttach(const StorageInfo& storage); |
| 169 void ProcessDetach(const std::string& id); | 169 void ProcessDetach(const std::string& id); |
| 170 | 170 |
| 171 scoped_ptr<Receiver> receiver_; | 171 scoped_ptr<Receiver> receiver_; |
| 172 | 172 |
| 173 scoped_refptr<ObserverListThreadSafe<RemovableStorageObserver> > | 173 scoped_refptr<base::ObserverListThreadSafe<RemovableStorageObserver>> |
| 174 observer_list_; | 174 observer_list_; |
| 175 | 175 |
| 176 // Used to make sure we call initialize from the same thread as creation. | 176 // Used to make sure we call initialize from the same thread as creation. |
| 177 base::ThreadChecker thread_checker_; | 177 base::ThreadChecker thread_checker_; |
| 178 | 178 |
| 179 bool initializing_; | 179 bool initializing_; |
| 180 bool initialized_; | 180 bool initialized_; |
| 181 std::vector<base::Closure> on_initialize_callbacks_; | 181 std::vector<base::Closure> on_initialize_callbacks_; |
| 182 | 182 |
| 183 // For manipulating storage_map_ structure. | 183 // For manipulating storage_map_ structure. |
| 184 mutable base::Lock storage_lock_; | 184 mutable base::Lock storage_lock_; |
| 185 | 185 |
| 186 // Map of all known storage devices,including fixed and removable storages. | 186 // Map of all known storage devices,including fixed and removable storages. |
| 187 StorageMap storage_map_; | 187 StorageMap storage_map_; |
| 188 | 188 |
| 189 scoped_ptr<TransientDeviceIds> transient_device_ids_; | 189 scoped_ptr<TransientDeviceIds> transient_device_ids_; |
| 190 }; | 190 }; |
| 191 | 191 |
| 192 } // namespace storage_monitor | 192 } // namespace storage_monitor |
| 193 | 193 |
| 194 #endif // COMPONENTS_STORAGE_MONITOR_STORAGE_MONITOR_H_ | 194 #endif // COMPONENTS_STORAGE_MONITOR_STORAGE_MONITOR_H_ |
| OLD | NEW |