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

Unified Diff: chrome/browser/chromeos/cros/mount_library.h

Issue 7457001: Adding support for mount point different from removable devices to MountLibrary (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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/chromeos/cros/mount_library.h
===================================================================
--- chrome/browser/chromeos/cros/mount_library.h (revision 93425)
+++ chrome/browser/chromeos/cros/mount_library.h (working copy)
@@ -6,8 +6,8 @@
#define CHROME_BROWSER_CHROMEOS_CROS_MOUNT_LIBRARY_H_
#pragma once
+#include <map>
#include <string>
-#include <map>
#include "base/memory/singleton.h"
#include "base/observer_list.h"
@@ -97,6 +97,19 @@
};
typedef std::map<std::string, Disk*> DiskMap;
+ // MountPointInfo: {mount_path, mount_type}.
+ struct MountPointInfo {
Oleg Eterevsky 2011/07/22 13:34:53 Maybe add something like device_path to this struc
tbarzic 2011/07/22 17:21:29 Done.
+ std::string mount_path;
+ MountType mount_type;
Oleg Eterevsky 2011/07/22 13:34:53 Where do you declare MountType? Probably you could
tbarzic 2011/07/22 17:21:29 It's in libcros... I'll add MountTypeToString and
+
+ MountPointInfo(const char* path, MountType type)
+ : mount_path(path), mount_type(type) {
+ }
+ };
+
+ // MountPointMap key is source_path.
+ typedef std::map<std::string, MountPointInfo> MountPointMap;
+
typedef void(*UnmountDeviceRecursiveCallbackType)(void*, bool);
class Observer {
@@ -107,16 +120,24 @@
const Disk* disk) = 0;
virtual void DeviceChanged(MountLibraryEventType event,
const std::string& device_path ) = 0;
+ virtual void MountCompleted(MountError error_code,
+ const std::string& source,
+ MountType mount_type,
+ const std::string& mount_path) = 0;
};
virtual ~MountLibrary() {}
virtual void AddObserver(Observer* observer) = 0;
virtual void RemoveObserver(Observer* observer) = 0;
virtual const DiskMap& disks() const = 0;
+ virtual const MountPointMap& mount_points() const = 0;
virtual void RequestMountInfoRefresh() = 0;
- virtual void MountPath(const char* device_path) = 0;
- virtual void UnmountPath(const char* device_path) = 0;
+ virtual void MountPath(const char* source_path,
+ MountType type,
+ const MountPathOptions& options) = 0;
+ // |path| may be source od mount path.
+ virtual void UnmountPath(const char* path) = 0;
// Unmounts device_poath and all of its known children.
virtual void UnmountDeviceRecursive(const char* device_path,

Powered by Google App Engine
This is Rietveld 408576698