diff options
author | rniwa@chromium.org <rniwa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-23 04:39:02 +0000 |
---|---|---|
committer | rniwa@chromium.org <rniwa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-23 04:39:02 +0000 |
commit | 5523c7e022eb70eda6bf797d52d39d3aa20d9c4a (patch) | |
tree | 87992f77c270a66af6dbaebd888a5c4e5b1c61dd /chrome/browser/chromeos/cros/mount_library.h | |
parent | c7ccb1fe2a01cea59980f2cb73cca36f0b67d909 (diff) | |
download | chromium_src-5523c7e022eb70eda6bf797d52d39d3aa20d9c4a.zip chromium_src-5523c7e022eb70eda6bf797d52d39d3aa20d9c4a.tar.gz chromium_src-5523c7e022eb70eda6bf797d52d39d3aa20d9c4a.tar.bz2 |
Revert 93754 - Adding support for mount point different from removable devices to MountLibrary
(work in progress..have to add GetMountPoints support)
tested on ChromeOS with these three patches: http://gerrit.chromium.org/gerrit/#change,4447
http://gerrit.chromium.org/gerrit/#change,4449
http://gerrit.chromium.org/gerrit/#change,4544
BUG=chromium-os:17673,chromium-os:17783
TEST=Made sure mounting devices still works and that
MountCompleted event gets through to
file_browser_event_router (checking ui and chrome logs
for mount completed entries)
Review URL: http://codereview.chromium.org/7457001
TBR=tbarzic@chromium.org
Review URL: http://codereview.chromium.org/7493040
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93775 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/cros/mount_library.h')
-rw-r--r-- | chrome/browser/chromeos/cros/mount_library.h | 36 |
1 files changed, 3 insertions, 33 deletions
diff --git a/chrome/browser/chromeos/cros/mount_library.h b/chrome/browser/chromeos/cros/mount_library.h index c6dc15e..b735d3d 100644 --- a/chrome/browser/chromeos/cros/mount_library.h +++ b/chrome/browser/chromeos/cros/mount_library.h @@ -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" @@ -32,10 +32,6 @@ typedef enum MountLibraryEventType { // library class like this: chromeos::CrosLibrary::Get()->GetMountLibrary() class MountLibrary { public: - enum MountEvent { - MOUNTING, - UNMOUNTING - }; // Used to house an instance of each found mount device. class Disk { public: @@ -101,22 +97,6 @@ class MountLibrary { }; typedef std::map<std::string, Disk*> DiskMap; - // MountPointInfo: {mount_path, mount_type}. - struct MountPointInfo { - std::string source_path; - std::string mount_path; - MountType mount_type; - - MountPointInfo(const char* source, const char* mount, const MountType type) - : source_path(source ? source : ""), - mount_path(mount ? mount : ""), - mount_type(type) { - } - }; - - // MountPointMap key is source_path. - typedef std::map<std::string, MountPointInfo> MountPointMap; - typedef void(*UnmountDeviceRecursiveCallbackType)(void*, bool); class Observer { @@ -127,26 +107,16 @@ class MountLibrary { const Disk* disk) = 0; virtual void DeviceChanged(MountLibraryEventType event, const std::string& device_path ) = 0; - virtual void MountCompleted(MountEvent event_type, - MountError error_code, - const MountPointInfo& mount_info) = 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 std::string MountTypeToString(MountType type) const = 0; - virtual MountType MountTypeFromString(const std::string& type_str) const = 0; virtual void RequestMountInfoRefresh() = 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; + virtual void MountPath(const char* device_path) = 0; + virtual void UnmountPath(const char* device_path) = 0; // Unmounts device_poath and all of its known children. virtual void UnmountDeviceRecursive(const char* device_path, |