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

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

Issue 2392503002: Allow to pass remount option to Mount method of cros_disks_client. (Closed)
Patch Set: Rename enum item names to be more readable. Created 4 years, 1 month 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 | « chromeos/dbus/fake_cros_disks_client.cc ('k') | no next file » | 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 #include "chromeos/disks/disk_mount_manager.h" 5 #include "chromeos/disks/disk_mount_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 if (type == MOUNT_TYPE_DEVICE) { 73 if (type == MOUNT_TYPE_DEVICE) {
74 DiskMap::const_iterator it = disks_.find(source_path); 74 DiskMap::const_iterator it = disks_.find(source_path);
75 if (it == disks_.end() || it->second->is_hidden()) { 75 if (it == disks_.end() || it->second->is_hidden()) {
76 OnMountCompleted(MountEntry(MOUNT_ERROR_INTERNAL, source_path, type, 76 OnMountCompleted(MountEntry(MOUNT_ERROR_INTERNAL, source_path, type,
77 "")); 77 ""));
78 return; 78 return;
79 } 79 }
80 } 80 }
81 cros_disks_client_->Mount( 81 cros_disks_client_->Mount(
82 source_path, source_format, mount_label, access_mode, 82 source_path, source_format, mount_label, access_mode,
83 REMOUNT_OPTION_MOUNT_NEW_DEVICE,
83 // When succeeds, OnMountCompleted will be called by 84 // When succeeds, OnMountCompleted will be called by
84 // "MountCompleted" signal instead. 85 // "MountCompleted" signal instead.
85 base::Bind(&base::DoNothing), 86 base::Bind(&base::DoNothing),
86 base::Bind(&DiskMountManagerImpl::OnMountCompleted, 87 base::Bind(&DiskMountManagerImpl::OnMountCompleted,
87 weak_ptr_factory_.GetWeakPtr(), 88 weak_ptr_factory_.GetWeakPtr(),
88 MountEntry(MOUNT_ERROR_INTERNAL, source_path, type, ""))); 89 MountEntry(MOUNT_ERROR_INTERNAL, source_path, type, "")));
89 90
90 // Record the access mode option passed to CrosDisks. 91 // Record the access mode option passed to CrosDisks.
91 // This is needed because CrosDisks service methods doesn't return the info 92 // This is needed because CrosDisks service methods doesn't return the info
92 // via DBus. 93 // via DBus.
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 VLOG(1) << "DiskMountManager Shutdown completed"; 795 VLOG(1) << "DiskMountManager Shutdown completed";
795 } 796 }
796 797
797 // static 798 // static
798 DiskMountManager* DiskMountManager::GetInstance() { 799 DiskMountManager* DiskMountManager::GetInstance() {
799 return g_disk_mount_manager; 800 return g_disk_mount_manager;
800 } 801 }
801 802
802 } // namespace disks 803 } // namespace disks
803 } // namespace chromeos 804 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/fake_cros_disks_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698