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

Side by Side 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 + Fixed win compile error by implementing GetMTPStorageInfoFromDeviceId in TestStorageNotifi… Created 7 years, 11 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 | Annotate | Revision Log
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_SYSTEM_MONITOR_REMOVABLE_STORAGE_NOTIFICATIONS_H_ 5 #ifndef CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_STORAGE_NOTIFICATIONS_H_
6 #define CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_STORAGE_NOTIFICATIONS_H_ 6 #define CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_STORAGE_NOTIFICATIONS_H_
7 7
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/observer_list_threadsafe.h" 9 #include "base/observer_list_threadsafe.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // storage. Returns false if unable to find the device. 46 // storage. Returns false if unable to find the device.
47 // TODO(gbillock): Change this method signature to use StorageInfo. 47 // TODO(gbillock): Change this method signature to use StorageInfo.
48 virtual bool GetDeviceInfoForPath( 48 virtual bool GetDeviceInfoForPath(
49 const FilePath& path, 49 const FilePath& path,
50 base::SystemMonitor::RemovableStorageInfo* device_info) const = 0; 50 base::SystemMonitor::RemovableStorageInfo* device_info) const = 0;
51 51
52 // Returns the storage size of the device present at |location|. If the 52 // Returns the storage size of the device present at |location|. If the
53 // device information is unavailable, returns zero. 53 // device information is unavailable, returns zero.
54 virtual uint64 GetStorageSize(const std::string& location) const = 0; 54 virtual uint64 GetStorageSize(const std::string& location) const = 0;
55 55
56 #if defined(OS_WIN)
57 // Gets the MTP device storage information specified by |storage_device_id|.
58 // On success, returns true and fills in |device_location| with device
59 // interface details and |storage_object_id| with the string ID that
60 // uniquely identifies the object on the device. This ID need not be
61 // persistent across sessions.
62 virtual bool GetMTPStorageInfoFromDeviceId(
63 const std::string& storage_device_id,
64 string16* device_location,
65 string16* storage_object_id) const = 0;
66 #endif
67
56 // Returns information for attached removable storage. 68 // Returns information for attached removable storage.
57 std::vector<StorageInfo> GetAttachedStorage() const; 69 std::vector<StorageInfo> GetAttachedStorage() const;
58 70
59 void AddObserver(RemovableStorageObserver* obs); 71 void AddObserver(RemovableStorageObserver* obs);
60 void RemoveObserver(RemovableStorageObserver* obs); 72 void RemoveObserver(RemovableStorageObserver* obs);
61 73
62 protected: 74 protected:
63 RemovableStorageNotifications(); 75 RemovableStorageNotifications();
64 76
65 void ProcessAttach(const std::string& id, 77 void ProcessAttach(const std::string& id,
(...skipping 10 matching lines...) Expand all
76 // For manipulating removable_storage_map_ structure. 88 // For manipulating removable_storage_map_ structure.
77 mutable base::Lock storage_lock_; 89 mutable base::Lock storage_lock_;
78 90
79 // Map of all the attached removable storage devices. 91 // Map of all the attached removable storage devices.
80 RemovableStorageMap storage_map_; 92 RemovableStorageMap storage_map_;
81 }; 93 };
82 94
83 } // namespace chrome 95 } // namespace chrome
84 96
85 #endif // CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_STORAGE_NOTIFICATIONS_H_ 97 #endif // CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_STORAGE_NOTIFICATIONS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698