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 // chrome::MediaStorageUtil provides information about storage devices attached | 5 // chrome::MediaStorageUtil provides information about storage devices attached |
6 // to the computer. | 6 // to the computer. |
7 | 7 |
8 #ifndef CHROME_BROWSER_STORAGE_MONITOR_MEDIA_STORAGE_UTIL_H_ | 8 #ifndef CHROME_BROWSER_STORAGE_MONITOR_MEDIA_STORAGE_UTIL_H_ |
9 #define CHROME_BROWSER_STORAGE_MONITOR_MEDIA_STORAGE_UTIL_H_ | 9 #define CHROME_BROWSER_STORAGE_MONITOR_MEDIA_STORAGE_UTIL_H_ |
10 | 10 |
11 #include <set> | 11 #include <set> |
12 #include <string> | 12 #include <string> |
13 | 13 |
14 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
15 #include "base/callback_forward.h" | 15 #include "base/callback_forward.h" |
16 #include "base/files/file_path.h" | 16 #include "base/files/file_path.h" |
17 | 17 |
18 namespace chrome { | 18 namespace chrome { |
19 | 19 |
20 struct StorageInfo; | 20 class StorageInfo; |
21 | 21 |
22 class MediaStorageUtil { | 22 class MediaStorageUtil { |
23 public: | 23 public: |
24 typedef std::set<std::string /*device id*/> DeviceIdSet; | 24 typedef std::set<std::string /*device id*/> DeviceIdSet; |
25 | 25 |
26 // Check if the file system at the passed mount point looks like a media | 26 // Check if the file system at the passed mount point looks like a media |
27 // device using the existence of DCIM directory. | 27 // device using the existence of DCIM directory. |
28 // Returns true if it looks like a media device, otherwise returns false. | 28 // Returns true if it looks like a media device, otherwise returns false. |
29 // Mac OS X behaves similarly, but this is not the only heuristic it uses. | 29 // Mac OS X behaves similarly, but this is not the only heuristic it uses. |
30 // TODO(vandebo) Try to figure out how Mac OS X decides this, and rename | 30 // TODO(vandebo) Try to figure out how Mac OS X decides this, and rename |
(...skipping 30 matching lines...) Expand all Loading... |
61 // currently attached. | 61 // currently attached. |
62 static bool IsRemovableStorageAttached(const std::string& id); | 62 static bool IsRemovableStorageAttached(const std::string& id); |
63 | 63 |
64 private: | 64 private: |
65 DISALLOW_IMPLICIT_CONSTRUCTORS(MediaStorageUtil); | 65 DISALLOW_IMPLICIT_CONSTRUCTORS(MediaStorageUtil); |
66 }; | 66 }; |
67 | 67 |
68 } // namespace chrome | 68 } // namespace chrome |
69 | 69 |
70 #endif // CHROME_BROWSER_STORAGE_MONITOR_MEDIA_STORAGE_UTIL_H_ | 70 #endif // CHROME_BROWSER_STORAGE_MONITOR_MEDIA_STORAGE_UTIL_H_ |
OLD | NEW |