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

Unified Diff: chrome/browser/system_monitor/removable_storage_notifications.h

Issue 11297002: [Media Gallery] Added code to support mtp device media file system on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + Addressed review comment Created 7 years, 12 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/system_monitor/removable_storage_notifications.h
diff --git a/chrome/browser/system_monitor/removable_storage_notifications.h b/chrome/browser/system_monitor/removable_storage_notifications.h
index 43924db968eb31b9388164e5d363cb228e4c1f00..f44c573303dfde18d39d7b08f5727e5ef6aaf70f 100644
--- a/chrome/browser/system_monitor/removable_storage_notifications.h
+++ b/chrome/browser/system_monitor/removable_storage_notifications.h
@@ -1,37 +1,48 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_STORAGE_NOTIFICATIONS_H_
-#define CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_STORAGE_NOTIFICATIONS_H_
-
-#include "base/file_path.h"
-#include "base/system_monitor/system_monitor.h"
-
-namespace chrome {
-
-// Base class for platform-specific instances watching for removable storage
-// attachments/detachments.
-class RemovableStorageNotifications {
- public:
- virtual ~RemovableStorageNotifications() {}
-
- // Returns a pointer to an object owned by the BrowserMainParts, with lifetime
- // somewhat shorter than a process Singleton.
- static RemovableStorageNotifications* GetInstance();
-
- // Finds the device that contains |path| and populates |device_info|.
- // Should be able to handle any path on the local system, not just removable
- // storage. Returns false if unable to find the device.
- virtual bool GetDeviceInfoForPath(
- const FilePath& path,
- base::SystemMonitor::RemovableStorageInfo* device_info) const = 0;
-
- // Returns the storage size of the device present at |location|. If the
- // device information is unavailable, returns zero.
- virtual uint64 GetStorageSize(const std::string& location) const = 0;
-};
-
-} // namespace chrome
-
-#endif // CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_STORAGE_NOTIFICATIONS_H_
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_STORAGE_NOTIFICATIONS_H_
+#define CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_STORAGE_NOTIFICATIONS_H_
+
+#include "base/file_path.h"
+#include "base/system_monitor/system_monitor.h"
+
+namespace chrome {
+
+// Base class for platform-specific instances watching for removable storage
+// attachments/detachments.
+class RemovableStorageNotifications {
+ public:
+ virtual ~RemovableStorageNotifications() {}
+
+ // Returns a pointer to an object owned by the BrowserMainParts, with lifetime
+ // somewhat shorter than a process Singleton.
+ static RemovableStorageNotifications* GetInstance();
+
+ // Finds the device that contains |path| and populates |device_info|.
+ // Should be able to handle any path on the local system, not just removable
+ // storage. Returns false if unable to find the device.
+ virtual bool GetDeviceInfoForPath(
+ const FilePath& path,
+ base::SystemMonitor::RemovableStorageInfo* device_info) const = 0;
+
+ // Returns the storage size of the device present at |location|. If the
+ // device information is unavailable, returns zero.
+ virtual uint64 GetStorageSize(const std::string& location) const = 0;
+
+#if defined(OS_WIN)
+ // Gets the MTP device storage information specified by |storage_device_id|.
+ // On success, returns true and fills in |device_location| with device
+ // interface details and |storage_object_id| with storage object temporary
+ // identifier.
+ virtual bool GetMTPStorageInfoFromDeviceId(
+ const std::string& storage_device_id,
+ string16* device_location,
+ string16* storage_object_id) const = 0;
+#endif
+};
+
+} // namespace chrome
+
+#endif // CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_STORAGE_NOTIFICATIONS_H_

Powered by Google App Engine
This is Rietveld 408576698