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

Side by Side Diff: components/storage_monitor/media_transfer_protocol_device_observer_linux.h

Issue 287613002: Fill |model_name| and |vendor_name| fields of StorageInfo for MTP devices. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Test for the newly filled members. Created 6 years, 7 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
« no previous file with comments | « no previous file | components/storage_monitor/media_transfer_protocol_device_observer_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_STORAGE_MONITOR_MEDIA_TRANSFER_PROTOCOL_DEVICE_OBSERVER_LINUX _H_ 5 #ifndef COMPONENTS_STORAGE_MONITOR_MEDIA_TRANSFER_PROTOCOL_DEVICE_OBSERVER_LINUX _H_
6 #define COMPONENTS_STORAGE_MONITOR_MEDIA_TRANSFER_PROTOCOL_DEVICE_OBSERVER_LINUX _H_ 6 #define COMPONENTS_STORAGE_MONITOR_MEDIA_TRANSFER_PROTOCOL_DEVICE_OBSERVER_LINUX _H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "base/strings/string16.h" 11 #include "base/strings/string16.h"
12 #include "components/storage_monitor/storage_monitor.h" 12 #include "components/storage_monitor/storage_monitor.h"
13 #include "device/media_transfer_protocol/media_transfer_protocol_manager.h" 13 #include "device/media_transfer_protocol/media_transfer_protocol_manager.h"
14 14
15 namespace base { 15 namespace base {
16 class FilePath; 16 class FilePath;
17 } 17 }
18 18
19 namespace storage_monitor { 19 namespace storage_monitor {
20 20
21 // Gets the mtp device information given a |storage_name|. On success, 21 // Gets the mtp device information given a |storage_name|. On success,
22 // fills in |id|, |name| and |location|. 22 // fills in |id|, |name|, |location|, |vendor_name|, and |product_name|.
23 typedef void (*GetStorageInfoFunc)( 23 typedef void (*GetStorageInfoFunc)(
24 const std::string& storage_name, 24 const std::string& storage_name,
25 device::MediaTransferProtocolManager* mtp_manager, 25 device::MediaTransferProtocolManager* mtp_manager,
26 std::string* id, 26 std::string* id,
27 base::string16* name, 27 base::string16* name,
28 std::string* location); 28 std::string* location,
29 base::string16* vendor_name,
30 base::string16* product_name);
29 31
30 // Helper class to send MTP storage attachment and detachment events to 32 // Helper class to send MTP storage attachment and detachment events to
31 // StorageMonitor. 33 // StorageMonitor.
32 class MediaTransferProtocolDeviceObserverLinux 34 class MediaTransferProtocolDeviceObserverLinux
33 : public device::MediaTransferProtocolManager::Observer { 35 : public device::MediaTransferProtocolManager::Observer {
34 public: 36 public:
35 MediaTransferProtocolDeviceObserverLinux( 37 MediaTransferProtocolDeviceObserverLinux(
36 StorageMonitor::Receiver* receiver, 38 StorageMonitor::Receiver* receiver,
37 device::MediaTransferProtocolManager* mtp_manager); 39 device::MediaTransferProtocolManager* mtp_manager);
38 virtual ~MediaTransferProtocolDeviceObserverLinux(); 40 virtual ~MediaTransferProtocolDeviceObserverLinux();
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // The notifications object to use to signal newly attached devices. 85 // The notifications object to use to signal newly attached devices.
84 // Guaranteed to outlive this class. 86 // Guaranteed to outlive this class.
85 StorageMonitor::Receiver* const notifications_; 87 StorageMonitor::Receiver* const notifications_;
86 88
87 DISALLOW_COPY_AND_ASSIGN(MediaTransferProtocolDeviceObserverLinux); 89 DISALLOW_COPY_AND_ASSIGN(MediaTransferProtocolDeviceObserverLinux);
88 }; 90 };
89 91
90 } // namespace storage_monitor 92 } // namespace storage_monitor
91 93
92 #endif // COMPONENTS_STORAGE_MONITOR_MEDIA_TRANSFER_PROTOCOL_DEVICE_OBSERVER_LI NUX_H_ 94 #endif // COMPONENTS_STORAGE_MONITOR_MEDIA_TRANSFER_PROTOCOL_DEVICE_OBSERVER_LI NUX_H_
OLDNEW
« no previous file with comments | « no previous file | components/storage_monitor/media_transfer_protocol_device_observer_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698