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

Side by Side Diff: chrome/browser/chromeos/file_manager/volume_manager.cc

Issue 673253005: Revert of Add a has_media flag to VolumeMetadata. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/chromeos/file_manager/volume_manager.h" 5 #include "chrome/browser/chromeos/file_manager/volume_manager.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 volume_info.source_path = base::FilePath(mount_point.source_path); 172 volume_info.source_path = base::FilePath(mount_point.source_path);
173 volume_info.mount_path = base::FilePath(mount_point.mount_path); 173 volume_info.mount_path = base::FilePath(mount_point.mount_path);
174 volume_info.mount_condition = mount_point.mount_condition; 174 volume_info.mount_condition = mount_point.mount_condition;
175 volume_info.volume_label = volume_info.mount_path.BaseName().AsUTF8Unsafe(); 175 volume_info.volume_label = volume_info.mount_path.BaseName().AsUTF8Unsafe();
176 if (disk) { 176 if (disk) {
177 volume_info.device_type = disk->device_type(); 177 volume_info.device_type = disk->device_type();
178 volume_info.system_path_prefix = 178 volume_info.system_path_prefix =
179 base::FilePath(disk->system_path_prefix()); 179 base::FilePath(disk->system_path_prefix());
180 volume_info.is_parent = disk->is_parent(); 180 volume_info.is_parent = disk->is_parent();
181 volume_info.is_read_only = disk->is_read_only(); 181 volume_info.is_read_only = disk->is_read_only();
182 volume_info.has_media = disk->has_media();
183 } else { 182 } else {
184 volume_info.device_type = chromeos::DEVICE_TYPE_UNKNOWN; 183 volume_info.device_type = chromeos::DEVICE_TYPE_UNKNOWN;
185 volume_info.is_parent = false; 184 volume_info.is_parent = false;
186 volume_info.is_read_only = 185 volume_info.is_read_only =
187 (mount_point.mount_type == chromeos::MOUNT_TYPE_ARCHIVE); 186 (mount_point.mount_type == chromeos::MOUNT_TYPE_ARCHIVE);
188 volume_info.has_media = false;
189 } 187 }
190 volume_info.volume_id = GenerateVolumeId(volume_info); 188 volume_info.volume_id = GenerateVolumeId(volume_info);
191 189
192 return volume_info; 190 return volume_info;
193 } 191 }
194 192
195 VolumeInfo CreateProvidedFileSystemVolumeInfo( 193 VolumeInfo CreateProvidedFileSystemVolumeInfo(
196 const chromeos::file_system_provider::ProvidedFileSystemInfo& 194 const chromeos::file_system_provider::ProvidedFileSystemInfo&
197 file_system_info) { 195 file_system_info) {
198 VolumeInfo volume_info; 196 VolumeInfo volume_info;
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 return; 791 return;
794 if (error_code == chromeos::MOUNT_ERROR_NONE) 792 if (error_code == chromeos::MOUNT_ERROR_NONE)
795 mounted_volumes_.erase(volume_info.volume_id); 793 mounted_volumes_.erase(volume_info.volume_id);
796 794
797 FOR_EACH_OBSERVER(VolumeManagerObserver, 795 FOR_EACH_OBSERVER(VolumeManagerObserver,
798 observers_, 796 observers_,
799 OnVolumeUnmounted(error_code, volume_info)); 797 OnVolumeUnmounted(error_code, volume_info));
800 } 798 }
801 799
802 } // namespace file_manager 800 } // namespace file_manager
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/file_manager/volume_manager.h ('k') | chrome/common/extensions/api/file_manager_private.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698