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

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

Issue 12163003: Add FilePath to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/system_monitor/removable_device_notifications_linux.h
diff --git a/chrome/browser/system_monitor/removable_device_notifications_linux.h b/chrome/browser/system_monitor/removable_device_notifications_linux.h
index cd595c99eab9d365b0e104a412b7c595e169ad1d..dea7424907587f3597cf68aae38148336fff9f32 100644
--- a/chrome/browser/system_monitor/removable_device_notifications_linux.h
+++ b/chrome/browser/system_monitor/removable_device_notifications_linux.h
@@ -25,11 +25,13 @@
#include "chrome/browser/system_monitor/removable_storage_notifications.h"
#include "content/public/browser/browser_thread.h"
+namespace base {
class FilePath;
+}
// Gets device information given a |device_path|. On success, fills in
// |unique_id|, |name|, |removable| and |partition_size_in_bytes|.
-typedef void (*GetDeviceInfoFunc)(const FilePath& device_path,
+typedef void (*GetDeviceInfoFunc)(const base::FilePath& device_path,
std::string* unique_id,
string16* name,
bool* removable,
@@ -43,7 +45,7 @@ class RemovableDeviceNotificationsLinux
content::BrowserThread::DeleteOnFileThread> {
public:
// Should only be called by browser start up code. Use GetInstance() instead.
- explicit RemovableDeviceNotificationsLinux(const FilePath& path);
+ explicit RemovableDeviceNotificationsLinux(const base::FilePath& path);
// Must be called for RemovableDeviceNotificationsLinux to work.
void Init();
@@ -51,7 +53,7 @@ class RemovableDeviceNotificationsLinux
// Finds the device that contains |path| and populates |device_info|.
// Returns false if unable to find the device.
virtual bool GetDeviceInfoForPath(
- const FilePath& path,
+ const base::FilePath& path,
StorageInfo* device_info) const OVERRIDE;
// Returns the storage partition size of the device present at |location|.
@@ -60,7 +62,7 @@ class RemovableDeviceNotificationsLinux
protected:
// Only for use in unit tests.
- RemovableDeviceNotificationsLinux(const FilePath& path,
+ RemovableDeviceNotificationsLinux(const base::FilePath& path,
GetDeviceInfoFunc getDeviceInfo);
// Avoids code deleting the object while there are references to it.
@@ -69,7 +71,7 @@ class RemovableDeviceNotificationsLinux
// error.
virtual ~RemovableDeviceNotificationsLinux();
- virtual void OnFilePathChanged(const FilePath& path, bool error);
+ virtual void OnFilePathChanged(const base::FilePath& path, bool error);
private:
friend class base::RefCountedThreadSafe<RemovableDeviceNotificationsLinux>;
@@ -82,24 +84,24 @@ class RemovableDeviceNotificationsLinux
struct MountPointInfo {
MountPointInfo();
- FilePath mount_device;
+ base::FilePath mount_device;
std::string device_id;
string16 device_name;
uint64 partition_size_in_bytes;
};
// Mapping of mount points to MountPointInfo.
- typedef std::map<FilePath, MountPointInfo> MountMap;
+ typedef std::map<base::FilePath, MountPointInfo> MountMap;
// (mount point, priority)
// For devices that are mounted to multiple mount points, this helps us track
// which one we've notified system monitor about.
- typedef std::map<FilePath, bool> ReferencedMountPoint;
+ typedef std::map<base::FilePath, bool> ReferencedMountPoint;
// (mount device, map of known mount points)
// For each mount device, track the places it is mounted and which one (if
// any) we have notified system monitor about.
- typedef std::map<FilePath, ReferencedMountPoint> MountPriorityMap;
+ typedef std::map<base::FilePath, ReferencedMountPoint> MountPriorityMap;
// Do initialization on the File Thread.
void InitOnFileThread();
@@ -109,13 +111,13 @@ class RemovableDeviceNotificationsLinux
// Adds |mount_device| as mounted on |mount_point|. If the device is a new
// device any listeners are notified.
- void AddNewMount(const FilePath& mount_device, const FilePath& mount_point);
+ void AddNewMount(const base::FilePath& mount_device, const base::FilePath& mount_point);
// Whether Init() has been called or not.
bool initialized_;
// Mtab file that lists the mount points.
- const FilePath mtab_path_;
+ const base::FilePath mtab_path_;
// Watcher for |mtab_path_|.
base::FilePathWatcher file_watcher_;

Powered by Google App Engine
This is Rietveld 408576698