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

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

Issue 12912013: Storage Monitor Linux: Do not try to initialize MediaTransferProtocolManager during unit tests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 9 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 | chrome/browser/storage_monitor/storage_monitor_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 (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 // StorageMonitorLinux listens for mount point changes, notifies listeners 5 // StorageMonitorLinux listens for mount point changes, notifies listeners
6 // about the addition and deletion of media devices, and answers queries about 6 // about the addition and deletion of media devices, and answers queries about
7 // mounted devices. 7 // mounted devices.
8 8
9 #ifndef CHROME_BROWSER_STORAGE_MONITOR_STORAGE_MONITOR_LINUX_H_ 9 #ifndef CHROME_BROWSER_STORAGE_MONITOR_STORAGE_MONITOR_LINUX_H_
10 #define CHROME_BROWSER_STORAGE_MONITOR_STORAGE_MONITOR_LINUX_H_ 10 #define CHROME_BROWSER_STORAGE_MONITOR_STORAGE_MONITOR_LINUX_H_
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 // (mount point, priority) 98 // (mount point, priority)
99 // For devices that are mounted to multiple mount points, this helps us track 99 // For devices that are mounted to multiple mount points, this helps us track
100 // which one we've notified system monitor about. 100 // which one we've notified system monitor about.
101 typedef std::map<base::FilePath, bool> ReferencedMountPoint; 101 typedef std::map<base::FilePath, bool> ReferencedMountPoint;
102 102
103 // (mount device, map of known mount points) 103 // (mount device, map of known mount points)
104 // For each mount device, track the places it is mounted and which one (if 104 // For each mount device, track the places it is mounted and which one (if
105 // any) we have notified system monitor about. 105 // any) we have notified system monitor about.
106 typedef std::map<base::FilePath, ReferencedMountPoint> MountPriorityMap; 106 typedef std::map<base::FilePath, ReferencedMountPoint> MountPriorityMap;
107 107
108 // Returns true if this StorageMonitorLinux instance is used for a test.
109 virtual bool IsRunningTest() const;
Greg Billock 2013/03/26 16:03:43 Instead of this, can we make some virtuals that se
110
108 // Do initialization on the File Thread. 111 // Do initialization on the File Thread.
109 void InitOnFileThread(); 112 void InitOnFileThread();
110 113
111 // Parses mtab file and find all changes. 114 // Parses mtab file and find all changes.
112 void UpdateMtab(); 115 void UpdateMtab();
113 116
114 // Adds |mount_device| as mounted on |mount_point|. If the device is a new 117 // Adds |mount_device| as mounted on |mount_point|. If the device is a new
115 // device any listeners are notified. 118 // device any listeners are notified.
116 void AddNewMount(const base::FilePath& mount_device, 119 void AddNewMount(const base::FilePath& mount_device,
117 const base::FilePath& mount_point); 120 const base::FilePath& mount_point);
(...skipping 27 matching lines...) Expand all
145 148
146 scoped_ptr<MediaTransferProtocolDeviceObserverLinux> 149 scoped_ptr<MediaTransferProtocolDeviceObserverLinux>
147 media_transfer_protocol_device_observer_; 150 media_transfer_protocol_device_observer_;
148 151
149 DISALLOW_COPY_AND_ASSIGN(StorageMonitorLinux); 152 DISALLOW_COPY_AND_ASSIGN(StorageMonitorLinux);
150 }; 153 };
151 154
152 } // namespace chrome 155 } // namespace chrome
153 156
154 #endif // CHROME_BROWSER_STORAGE_MONITOR_STORAGE_MONITOR_LINUX_H_ 157 #endif // CHROME_BROWSER_STORAGE_MONITOR_STORAGE_MONITOR_LINUX_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/storage_monitor/storage_monitor_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698