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

Side by Side Diff: chrome/browser/storage_monitor/storage_monitor.h

Issue 13524003: [StorageMonitor] Remove GetStorageSize. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Compiling... Created 7 years, 8 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
OLDNEW
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 #ifndef CHROME_BROWSER_STORAGE_MONITOR_STORAGE_MONITOR_H_ 5 #ifndef CHROME_BROWSER_STORAGE_MONITOR_STORAGE_MONITOR_H_
6 #define CHROME_BROWSER_STORAGE_MONITOR_STORAGE_MONITOR_H_ 6 #define CHROME_BROWSER_STORAGE_MONITOR_STORAGE_MONITOR_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 // somewhat shorter than a process Singleton. 58 // somewhat shorter than a process Singleton.
59 static StorageMonitor* GetInstance(); 59 static StorageMonitor* GetInstance();
60 60
61 // Finds the device that contains |path| and populates |device_info|. 61 // Finds the device that contains |path| and populates |device_info|.
62 // Should be able to handle any path on the local system, not just removable 62 // Should be able to handle any path on the local system, not just removable
63 // storage. Returns false if unable to find the device. 63 // storage. Returns false if unable to find the device.
64 virtual bool GetStorageInfoForPath( 64 virtual bool GetStorageInfoForPath(
65 const base::FilePath& path, 65 const base::FilePath& path,
66 StorageInfo* device_info) const = 0; 66 StorageInfo* device_info) const = 0;
67 67
68 // Returns the storage size of the device present at |location|. If the
69 // device information is unavailable, returns zero.
70 // TODO(gbillock): delete this in favor of GetStorageInfoForPath.
71 virtual uint64 GetStorageSize(
72 const base::FilePath::StringType& location) const = 0;
73
74 // TODO(gbillock): make this either unnecessary (implementation-specific) or 68 // TODO(gbillock): make this either unnecessary (implementation-specific) or
75 // platform-independent. 69 // platform-independent.
76 #if defined(OS_WIN) 70 #if defined(OS_WIN)
77 // Gets the MTP device storage information specified by |storage_device_id|. 71 // Gets the MTP device storage information specified by |storage_device_id|.
78 // On success, returns true and fills in |device_location| with device 72 // On success, returns true and fills in |device_location| with device
79 // interface details and |storage_object_id| with the string ID that 73 // interface details and |storage_object_id| with the string ID that
80 // uniquely identifies the object on the device. This ID need not be 74 // uniquely identifies the object on the device. This ID need not be
81 // persistent across sessions. 75 // persistent across sessions.
82 virtual bool GetMTPStorageInfoFromDeviceId( 76 virtual bool GetMTPStorageInfoFromDeviceId(
83 const std::string& storage_device_id, 77 const std::string& storage_device_id,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 131
138 // Map of all the attached removable storage devices. 132 // Map of all the attached removable storage devices.
139 RemovableStorageMap storage_map_; 133 RemovableStorageMap storage_map_;
140 134
141 scoped_ptr<TransientDeviceIds> transient_device_ids_; 135 scoped_ptr<TransientDeviceIds> transient_device_ids_;
142 }; 136 };
143 137
144 } // namespace chrome 138 } // namespace chrome
145 139
146 #endif // CHROME_BROWSER_STORAGE_MONITOR_STORAGE_MONITOR_H_ 140 #endif // CHROME_BROWSER_STORAGE_MONITOR_STORAGE_MONITOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/storage_monitor/media_storage_util.cc ('k') | chrome/browser/storage_monitor/storage_monitor_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698