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

Side by Side Diff: chrome/browser/storage_monitor/storage_monitor_chromeos.h

Issue 15896007: [SystemInfo API] Rewrite storage info provider using storage monitor impl (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix comments from thestig Created 7 years, 6 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
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 // chromeos::StorageMonitorCros listens for mount point changes and notifies 5 // chromeos::StorageMonitorCros listens for mount point changes and notifies
6 // listeners about the addition and deletion of media devices. 6 // listeners about the addition and deletion of media devices.
7 // This class lives on the UI thread. 7 // This class lives on the UI thread.
8 8
9 #ifndef CHROME_BROWSER_STORAGE_MONITOR_STORAGE_MONITOR_CHROMEOS_H_ 9 #ifndef CHROME_BROWSER_STORAGE_MONITOR_STORAGE_MONITOR_CHROMEOS_H_
10 #define CHROME_BROWSER_STORAGE_MONITOR_STORAGE_MONITOR_CHROMEOS_H_ 10 #define CHROME_BROWSER_STORAGE_MONITOR_STORAGE_MONITOR_CHROMEOS_H_
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 // StorageMonitor implementation. 61 // StorageMonitor implementation.
62 virtual bool GetStorageInfoForPath( 62 virtual bool GetStorageInfoForPath(
63 const base::FilePath& path, 63 const base::FilePath& path,
64 chrome::StorageInfo* device_info) const OVERRIDE; 64 chrome::StorageInfo* device_info) const OVERRIDE;
65 virtual void EjectDevice( 65 virtual void EjectDevice(
66 const std::string& device_id, 66 const std::string& device_id,
67 base::Callback<void(EjectStatus)> callback) OVERRIDE; 67 base::Callback<void(EjectStatus)> callback) OVERRIDE;
68 virtual device::MediaTransferProtocolManager* 68 virtual device::MediaTransferProtocolManager*
69 media_transfer_protocol_manager() OVERRIDE; 69 media_transfer_protocol_manager() OVERRIDE;
70 virtual std::vector<chrome::StorageInfo>
71 GetAllAvailableStorages() const OVERRIDE;
70 72
71 private: 73 private:
72 // Mapping of mount path to removable mass storage info. 74 // Mapping of mount path to removable mass storage info.
73 typedef std::map<std::string, chrome::StorageInfo> MountMap; 75 typedef std::map<std::string, chrome::StorageInfo> MountMap;
74 76
75 // Helper method that checks existing mount points to see if they are media 77 // Helper method that checks existing mount points to see if they are media
76 // devices. Eventually calls AddMountedPath for all mount points. 78 // devices. Eventually calls AddMountedPath for all mount points.
77 void CheckExistingMountPoints(); 79 void CheckExistingMountPoints();
78 80
79 // Adds the mount point in |mount_info| to |mount_map_| and send a media 81 // Adds the mount point in |mount_info| to |mount_map_| and send a media
(...skipping 11 matching lines...) Expand all
91 media_transfer_protocol_device_observer_; 93 media_transfer_protocol_device_observer_;
92 94
93 base::WeakPtrFactory<StorageMonitorCros> weak_ptr_factory_; 95 base::WeakPtrFactory<StorageMonitorCros> weak_ptr_factory_;
94 96
95 DISALLOW_COPY_AND_ASSIGN(StorageMonitorCros); 97 DISALLOW_COPY_AND_ASSIGN(StorageMonitorCros);
96 }; 98 };
97 99
98 } // namespace chromeos 100 } // namespace chromeos
99 101
100 #endif // CHROME_BROWSER_STORAGE_MONITOR_STORAGE_MONITOR_CHROMEOS_H_ 102 #endif // CHROME_BROWSER_STORAGE_MONITOR_STORAGE_MONITOR_CHROMEOS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698