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

Side by Side Diff: chromeos/disks/disk_mount_manager.h

Issue 2201023002: Change access mode of disk devices when mounting based on config. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo. Created 4 years, 4 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
« no previous file with comments | « chrome/common/pref_names.cc ('k') | chromeos/disks/disk_mount_manager.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 #ifndef CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_ 5 #ifndef CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_
6 #define CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_ 6 #define CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 // Gets the list of mount points. 247 // Gets the list of mount points.
248 virtual const MountPointMap& mount_points() const = 0; 248 virtual const MountPointMap& mount_points() const = 0;
249 249
250 // Refreshes all the information about mounting if it is not yet done and 250 // Refreshes all the information about mounting if it is not yet done and
251 // invokes |callback| when finished. If the information is already refreshed 251 // invokes |callback| when finished. If the information is already refreshed
252 // and |force| is false, it just runs |callback| immediately. 252 // and |force| is false, it just runs |callback| immediately.
253 virtual void EnsureMountInfoRefreshed( 253 virtual void EnsureMountInfoRefreshed(
254 const EnsureMountInfoRefreshedCallback& callback, 254 const EnsureMountInfoRefreshedCallback& callback,
255 bool force) = 0; 255 bool force) = 0;
256 256
257 // Mounts a device. 257 // Mounts a device or an archive file.
258 // |source_path| specifies either a device or an archive file path.
259 // When |type|=MOUNT_TYPE_ARCHIVE, caller may set two optional arguments:
260 // |source_format| and |mount_label|. See CrosDisksClient::Mount for detail.
261 // |access_mode| specifies read-only or read-write mount mode for a device.
258 // Note that the mount operation may fail. To find out the result, one should 262 // Note that the mount operation may fail. To find out the result, one should
259 // observe DiskMountManager for |Observer::OnMountEvent| event, which will be 263 // observe DiskMountManager for |Observer::OnMountEvent| event, which will be
260 // raised upon the mount operation completion. 264 // raised upon the mount operation completion.
261 virtual void MountPath(const std::string& source_path, 265 virtual void MountPath(const std::string& source_path,
262 const std::string& source_format, 266 const std::string& source_format,
263 const std::string& mount_label, 267 const std::string& mount_label,
264 MountType type) = 0; 268 MountType type,
269 MountAccessMode access_mode) = 0;
265 270
266 // Unmounts a mounted disk. 271 // Unmounts a mounted disk.
267 // |UnmountOptions| enum defined in chromeos/dbus/cros_disks_client.h. 272 // |UnmountOptions| enum defined in chromeos/dbus/cros_disks_client.h.
268 // When the method is complete, |callback| will be called and observers' 273 // When the method is complete, |callback| will be called and observers'
269 // |OnMountEvent| will be raised. 274 // |OnMountEvent| will be raised.
270 // 275 //
271 // |callback| may be empty, in which case it gets ignored. 276 // |callback| may be empty, in which case it gets ignored.
272 virtual void UnmountPath(const std::string& mount_path, 277 virtual void UnmountPath(const std::string& mount_path,
273 UnmountOptions options, 278 UnmountOptions options,
274 const UnmountPathCallback& callback) = 0; 279 const UnmountPathCallback& callback) = 0;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 312
308 // Returns a pointer to the global DiskMountManager instance. 313 // Returns a pointer to the global DiskMountManager instance.
309 // Initialize() should already have been called. 314 // Initialize() should already have been called.
310 static DiskMountManager* GetInstance(); 315 static DiskMountManager* GetInstance();
311 }; 316 };
312 317
313 } // namespace disks 318 } // namespace disks
314 } // namespace chromeos 319 } // namespace chromeos
315 320
316 #endif // CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_ 321 #endif // CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/common/pref_names.cc ('k') | chromeos/disks/disk_mount_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698