OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "base/basictypes.h" | 21 #include "base/basictypes.h" |
22 #include "base/compiler_specific.h" | 22 #include "base/compiler_specific.h" |
23 #include "base/files/file_path.h" | 23 #include "base/files/file_path.h" |
24 #include "base/files/file_path_watcher.h" | 24 #include "base/files/file_path_watcher.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 "chrome/browser/storage_monitor/mtab_watcher_linux.h" | 27 #include "chrome/browser/storage_monitor/mtab_watcher_linux.h" |
28 #include "chrome/browser/storage_monitor/storage_monitor.h" | 28 #include "chrome/browser/storage_monitor/storage_monitor.h" |
29 #include "content/public/browser/browser_thread.h" | 29 #include "content/public/browser/browser_thread.h" |
30 | 30 |
31 namespace chrome { | |
32 | |
33 class MediaTransferProtocolDeviceObserverLinux; | 31 class MediaTransferProtocolDeviceObserverLinux; |
34 | 32 |
35 class StorageMonitorLinux : public StorageMonitor, | 33 class StorageMonitorLinux : public StorageMonitor, |
36 public MtabWatcherLinux::Delegate { | 34 public MtabWatcherLinux::Delegate { |
37 public: | 35 public: |
38 // Should only be called by browser start up code. | 36 // Should only be called by browser start up code. |
39 // Use StorageMonitor::GetInstance() instead. | 37 // Use StorageMonitor::GetInstance() instead. |
40 // |mtab_file_path| is the path to a mtab file to watch for mount points. | 38 // |mtab_file_path| is the path to a mtab file to watch for mount points. |
41 explicit StorageMonitorLinux(const base::FilePath& mtab_file_path); | 39 explicit StorageMonitorLinux(const base::FilePath& mtab_file_path); |
42 virtual ~StorageMonitorLinux(); | 40 virtual ~StorageMonitorLinux(); |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 scoped_ptr<MediaTransferProtocolDeviceObserverLinux> | 132 scoped_ptr<MediaTransferProtocolDeviceObserverLinux> |
135 media_transfer_protocol_device_observer_; | 133 media_transfer_protocol_device_observer_; |
136 | 134 |
137 scoped_ptr<MtabWatcherLinux, MtabWatcherLinuxDeleter> mtab_watcher_; | 135 scoped_ptr<MtabWatcherLinux, MtabWatcherLinuxDeleter> mtab_watcher_; |
138 | 136 |
139 base::WeakPtrFactory<StorageMonitorLinux> weak_ptr_factory_; | 137 base::WeakPtrFactory<StorageMonitorLinux> weak_ptr_factory_; |
140 | 138 |
141 DISALLOW_COPY_AND_ASSIGN(StorageMonitorLinux); | 139 DISALLOW_COPY_AND_ASSIGN(StorageMonitorLinux); |
142 }; | 140 }; |
143 | 141 |
144 } // namespace chrome | |
145 | |
146 #endif // CHROME_BROWSER_STORAGE_MONITOR_STORAGE_MONITOR_LINUX_H_ | 142 #endif // CHROME_BROWSER_STORAGE_MONITOR_STORAGE_MONITOR_LINUX_H_ |
OLD | NEW |