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

Unified Diff: chrome/browser/media_gallery/media_storage_util.h

Issue 10871049: Connect MediaFileSystemRegistry with MediaGalleriesPreferences (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/media_gallery/media_storage_util.h
diff --git a/chrome/browser/media_gallery/media_storage_util.h b/chrome/browser/media_gallery/media_storage_util.h
index 8efeb945a7b57eb6f6ee8bdf93dd31444f4bd6b1..995987ba37255911b97d41c39ce7498cc0fe5a4a 100644
--- a/chrome/browser/media_gallery/media_storage_util.h
+++ b/chrome/browser/media_gallery/media_storage_util.h
@@ -30,7 +30,6 @@ class MediaStorageUtil {
};
typedef base::Callback<void(bool)> BoolCallback;
- typedef base::Callback<void(FilePath)> FilePathCallback;
// Returns a device id given properties of the device. A prefix dependent on
// |type| is added so |unique_id| need only be unique within the given type.
@@ -50,6 +49,10 @@ class MediaStorageUtil {
// (type isn't FIXED_MASS_STORAGE).
static bool IsRemovableDevice(const std::string& device_id);
+ // Looks inside |device_id| to determine if it is a mass storage device
+ // (type isn't MTP_OR_PTP).
+ static bool IsMassStorageDevice(const std::string& device_id);
+
// Determines if the device is attached to the computer.
static void IsDeviceAttached(const std::string& device_id,
const BoolCallback& callback);
@@ -61,10 +64,10 @@ class MediaStorageUtil {
string16* device_name,
FilePath* relative_path);
- // Get a FilePath for the given |device_id|. If the device isn't connected
- // or isn't a mass storage type, the FilePath will be empty.
- static void FindDevicePathById(const std::string& device_id,
- const FilePathCallback& callback);
+ // Get a FilePath for the given |device_id|. If the device isn't a mass
+ // storage type, the FilePath will be empty. This does not check that
+ // the device is connected.
+ static FilePath FindDevicePathById(const std::string& device_id);
protected:
typedef void (*GetDeviceInfoFromPathFunction)(const FilePath& path,

Powered by Google App Engine
This is Rietveld 408576698