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 // StorageMonitorLinux processes mount point change events, notifies listeners | 5 // StorageMonitorLinux processes mount point change events, notifies listeners |
6 // about the addition and deletion of media devices, and answers queries about | 6 // about the addition and deletion of media devices, and answers queries about |
7 // mounted devices. | 7 // mounted devices. |
8 // StorageMonitorLinux lives on the UI thread, and uses a MtabWatcherLinux on | 8 // StorageMonitorLinux lives on the UI thread, and uses a MtabWatcherLinux on |
9 // the FILE thread to get mount point change events. | 9 // the FILE thread to get mount point change events. |
10 | 10 |
11 #ifndef COMPONENTS_STORAGE_MONITOR_STORAGE_MONITOR_LINUX_H_ | 11 #ifndef COMPONENTS_STORAGE_MONITOR_STORAGE_MONITOR_LINUX_H_ |
12 #define COMPONENTS_STORAGE_MONITOR_STORAGE_MONITOR_LINUX_H_ | 12 #define COMPONENTS_STORAGE_MONITOR_STORAGE_MONITOR_LINUX_H_ |
13 | 13 |
14 #if defined(OS_CHROMEOS) | 14 #if defined(OS_CHROMEOS) |
15 #error "Use the ChromeOS-specific implementation instead." | 15 #error "Use the ChromeOS-specific implementation instead." |
16 #endif | 16 #endif |
17 | 17 |
18 #include <map> | 18 #include <map> |
19 #include <string> | 19 #include <string> |
20 | 20 |
21 #include "base/compiler_specific.h" | 21 #include "base/compiler_specific.h" |
22 #include "base/files/file_path.h" | 22 #include "base/files/file_path.h" |
23 #include "base/files/file_path_watcher.h" | 23 #include "base/files/file_path_watcher.h" |
24 #include "base/macros.h" | 24 #include "base/macros.h" |
25 #include "base/memory/scoped_ptr.h" | 25 #include "base/memory/scoped_ptr.h" |
26 #include "base/memory/weak_ptr.h" | 26 #include "base/memory/weak_ptr.h" |
| 27 #include "build/build_config.h" |
27 #include "components/storage_monitor/mtab_watcher_linux.h" | 28 #include "components/storage_monitor/mtab_watcher_linux.h" |
28 #include "components/storage_monitor/storage_monitor.h" | 29 #include "components/storage_monitor/storage_monitor.h" |
29 #include "content/public/browser/browser_thread.h" | 30 #include "content/public/browser/browser_thread.h" |
30 | 31 |
31 namespace storage_monitor { | 32 namespace storage_monitor { |
32 | 33 |
33 class MediaTransferProtocolDeviceObserverLinux; | 34 class MediaTransferProtocolDeviceObserverLinux; |
34 | 35 |
35 class StorageMonitorLinux : public StorageMonitor, | 36 class StorageMonitorLinux : public StorageMonitor, |
36 public MtabWatcherLinux::Delegate { | 37 public MtabWatcherLinux::Delegate { |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 scoped_ptr<MtabWatcherLinux, MtabWatcherLinuxDeleter> mtab_watcher_; | 138 scoped_ptr<MtabWatcherLinux, MtabWatcherLinuxDeleter> mtab_watcher_; |
138 | 139 |
139 base::WeakPtrFactory<StorageMonitorLinux> weak_ptr_factory_; | 140 base::WeakPtrFactory<StorageMonitorLinux> weak_ptr_factory_; |
140 | 141 |
141 DISALLOW_COPY_AND_ASSIGN(StorageMonitorLinux); | 142 DISALLOW_COPY_AND_ASSIGN(StorageMonitorLinux); |
142 }; | 143 }; |
143 | 144 |
144 } // namespace storage_monitor | 145 } // namespace storage_monitor |
145 | 146 |
146 #endif // COMPONENTS_STORAGE_MONITOR_STORAGE_MONITOR_LINUX_H_ | 147 #endif // COMPONENTS_STORAGE_MONITOR_STORAGE_MONITOR_LINUX_H_ |
OLD | NEW |