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

Unified Diff: components/storage_monitor/storage_info.cc

Issue 246293011: Mount MTP devices in Chrome OS Files.app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + fix test (handle null StorageMonitor in some tests) Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/storage_monitor/storage_info.h ('k') | webkit/browser/fileapi/external_mount_points.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/storage_monitor/storage_info.cc
diff --git a/components/storage_monitor/storage_info.cc b/components/storage_monitor/storage_info.cc
index 52ae0c2502f908a48beb5e4d3b032aa40331c213..19d59b680519896875dc0b53973eccab2fd86430 100644
--- a/components/storage_monitor/storage_info.cc
+++ b/components/storage_monitor/storage_info.cc
@@ -180,6 +180,12 @@ bool StorageInfo::IsPicasaDevice(const std::string& device_id) {
return CrackDeviceId(device_id, &type, NULL) && type == PICASA;
}
+// static
+bool StorageInfo::IsMTPDevice(const std::string& device_id) {
+ Type type;
+ return CrackDeviceId(device_id, &type, NULL) && type == MTP_OR_PTP;
+}
+
base::string16 StorageInfo::GetDisplayName(bool with_size) const {
return GetDisplayNameWithOverride(base::string16(), with_size);
}
« no previous file with comments | « components/storage_monitor/storage_info.h ('k') | webkit/browser/fileapi/external_mount_points.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698