summaryrefslogtreecommitdiffstats
path: root/chrome/browser/storage_monitor
diff options
context:
space:
mode:
authortommycli@chromium.org <tommycli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-24 06:56:15 +0000
committertommycli@chromium.org <tommycli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-24 06:56:15 +0000
commit193854e53c819c67940dc30e6290d7d85bdc463e (patch)
treea398519ef84024f6854d4e5724985695cfa47130 /chrome/browser/storage_monitor
parentefcf2059d2fc17cd03bb821bcde2491ce5e330e6 (diff)
downloadchromium_src-193854e53c819c67940dc30e6290d7d85bdc463e.zip
chromium_src-193854e53c819c67940dc30e6290d7d85bdc463e.tar.gz
chromium_src-193854e53c819c67940dc30e6290d7d85bdc463e.tar.bz2
Add Picasa import hooks into MediaFileSystemRegistry.
BUG=151701 Review URL: https://chromiumcodereview.appspot.com/15511009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201997 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/storage_monitor')
-rw-r--r--chrome/browser/storage_monitor/storage_info.cc12
-rw-r--r--chrome/browser/storage_monitor/storage_info.h4
2 files changed, 16 insertions, 0 deletions
diff --git a/chrome/browser/storage_monitor/storage_info.cc b/chrome/browser/storage_monitor/storage_info.cc
index 3f066c3..b05fd7a 100644
--- a/chrome/browser/storage_monitor/storage_info.cc
+++ b/chrome/browser/storage_monitor/storage_info.cc
@@ -130,4 +130,16 @@ bool StorageInfo::IsMassStorageDevice(const std::string& device_id) {
type == PICASA);
}
+// static
+bool StorageInfo::IsITunesDevice(const std::string& device_id) {
+ Type type;
+ return CrackDeviceId(device_id, &type, NULL) && type == ITUNES;
+}
+
+// static
+bool StorageInfo::IsPicasaDevice(const std::string& device_id) {
+ Type type;
+ return CrackDeviceId(device_id, &type, NULL) && type == PICASA;
+}
+
} // namespace chrome
diff --git a/chrome/browser/storage_monitor/storage_info.h b/chrome/browser/storage_monitor/storage_info.h
index 706b6a2..94759ef 100644
--- a/chrome/browser/storage_monitor/storage_info.h
+++ b/chrome/browser/storage_monitor/storage_info.h
@@ -62,6 +62,10 @@ struct StorageInfo {
// (type isn't MTP_OR_PTP).
static bool IsMassStorageDevice(const std::string& device_id);
+ static bool IsITunesDevice(const std::string& device_id);
+
+ static bool IsPicasaDevice(const std::string& device_id);
+
// Unique device id - persists between device attachments.
// This is the string that should be used as the label for a particular
// storage device when interacting with the API. Clients should treat