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
3 // found in the LICENSE file.
4 
5 // StorageMonitorFreeBSD processes mount point change events, notifies listeners
6 // about the addition and deletion of media devices, and answers queries about
7 // mounted devices.
8 // StorageMonitorFreeBSD lives on the UI thread, and uses ???
9 // the FILE thread to get mount point change events.
10 
11 #ifndef COMPONENTS_STORAGE_MONITOR_STORAGE_MONITOR_FREEBSD_H_
12 #define COMPONENTS_STORAGE_MONITOR_STORAGE_MONITOR_FREEBSD_H_
13 
14 #include <map>
15 #include <string>
16 
17 #include "base/compiler_specific.h"
18 #include "base/files/file_path.h"
19 #include "base/files/file_path_watcher.h"
20 #include "base/memory/weak_ptr.h"
21 #include "components/storage_monitor/storage_monitor.h"
22 #include "content/public/browser/browser_thread.h"
23 
24 namespace storage_monitor {
25 
26 class StorageMonitorFreeBSD : public StorageMonitor {
27  public:
28   // Should only be called by browser start up code.
29   // Use StorageMonitor::GetInstance() instead.
30   explicit StorageMonitorFreeBSD();
31   virtual ~StorageMonitorFreeBSD();
32 
33   // Must be called for StorageMonitorFreeBSD to work.
34   virtual void Init() override;
35  private:
36   // StorageMonitor implementation.
37   virtual bool GetStorageInfoForPath(const base::FilePath& path,
38                                      StorageInfo* device_info) const override;
39 
40   DISALLOW_COPY_AND_ASSIGN(StorageMonitorFreeBSD);
41 };
42 
43 } // namespace storage_monitor
44 
45 #endif  // COMPONENTS_STORAGE_MONITOR_STORAGE_MONITOR_FREEBSD_H_
46