Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Side by Side Diff: components/storage_monitor/media_storage_util.h

Issue 168293002: StorageMonitor: Make StorageInfo a class. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase after move Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | components/storage_monitor/storage_info.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // MediaStorageUtil provides information about storage devices attached 5 // MediaStorageUtil provides information about storage devices attached
6 // to the computer. 6 // to the computer.
7 7
8 #ifndef COMPONENTS_STORAGE_MONITOR_MEDIA_STORAGE_UTIL_H_ 8 #ifndef COMPONENTS_STORAGE_MONITOR_MEDIA_STORAGE_UTIL_H_
9 #define COMPONENTS_STORAGE_MONITOR_MEDIA_STORAGE_UTIL_H_ 9 #define COMPONENTS_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 struct StorageInfo; 18 class StorageInfo;
19 19
20 class MediaStorageUtil { 20 class MediaStorageUtil {
21 public: 21 public:
22 typedef std::set<std::string /*device id*/> DeviceIdSet; 22 typedef std::set<std::string /*device id*/> DeviceIdSet;
23 23
24 // Check if the file system at the passed mount point looks like a media 24 // Check if the file system at the passed mount point looks like a media
25 // device using the existence of DCIM directory. 25 // device using the existence of DCIM directory.
26 // Returns true if it looks like a media device, otherwise returns false. 26 // Returns true if it looks like a media device, otherwise returns false.
27 // Mac OS X behaves similarly, but this is not the only heuristic it uses. 27 // Mac OS X behaves similarly, but this is not the only heuristic it uses.
28 // TODO(vandebo) Try to figure out how Mac OS X decides this, and rename 28 // TODO(vandebo) Try to figure out how Mac OS X decides this, and rename
(...skipping 28 matching lines...) Expand all
57 57
58 // Returns true if the |id| is both a removable device and also 58 // Returns true if the |id| is both a removable device and also
59 // currently attached. 59 // currently attached.
60 static bool IsRemovableStorageAttached(const std::string& id); 60 static bool IsRemovableStorageAttached(const std::string& id);
61 61
62 private: 62 private:
63 DISALLOW_IMPLICIT_CONSTRUCTORS(MediaStorageUtil); 63 DISALLOW_IMPLICIT_CONSTRUCTORS(MediaStorageUtil);
64 }; 64 };
65 65
66 #endif // COMPONENTS_STORAGE_MONITOR_MEDIA_STORAGE_UTIL_H_ 66 #endif // COMPONENTS_STORAGE_MONITOR_MEDIA_STORAGE_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | components/storage_monitor/storage_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698