| OLD | NEW |
| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 const char* drive_label; | 39 const char* drive_label; |
| 40 const char* vendor_id; | 40 const char* vendor_id; |
| 41 const char* vendor_name; | 41 const char* vendor_name; |
| 42 const char* product_id; | 42 const char* product_id; |
| 43 const char* product_name; | 43 const char* product_name; |
| 44 const char* fs_uuid; | 44 const char* fs_uuid; |
| 45 const char* system_path_prefix; | 45 const char* system_path_prefix; |
| 46 chromeos::DeviceType device_type; | 46 chromeos::DeviceType device_type; |
| 47 uint64_t size_in_bytes; | 47 uint64_t size_in_bytes; |
| 48 bool is_parent; | 48 bool is_parent; |
| 49 bool is_read_only; | 49 bool is_read_only_hardware; |
| 50 bool has_media; | 50 bool has_media; |
| 51 bool on_boot_device; | 51 bool on_boot_device; |
| 52 bool on_removable_device; | 52 bool on_removable_device; |
| 53 bool is_hidden; | 53 bool is_hidden; |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 struct TestMountPoint { | 56 struct TestMountPoint { |
| 57 std::string source_path; | 57 std::string source_path; |
| 58 std::string mount_path; | 58 std::string mount_path; |
| 59 chromeos::MountType mount_type; | 59 chromeos::MountType mount_type; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 true, | 102 true, |
| 103 true, | 103 true, |
| 104 true, | 104 true, |
| 105 true, | 105 true, |
| 106 false, | 106 false, |
| 107 false | 107 false |
| 108 }, | 108 }, |
| 109 { | 109 { |
| 110 "system_path3", | 110 "system_path3", |
| 111 "file_path3", | 111 "file_path3", |
| 112 false, | 112 true, // write_disabled_by_policy |
| 113 "device_label3", | 113 "device_label3", |
| 114 "drive_label3", | 114 "drive_label3", |
| 115 "89ab", | 115 "89ab", |
| 116 "vendor3", | 116 "vendor3", |
| 117 "ef01", | 117 "ef01", |
| 118 "product3", | 118 "product3", |
| 119 "00FF-FFFF", | 119 "00FF-FFFF", |
| 120 "system_path_prefix3", | 120 "system_path_prefix3", |
| 121 chromeos::DEVICE_TYPE_OPTICAL_DISC, | 121 chromeos::DEVICE_TYPE_OPTICAL_DISC, |
| 122 0, | 122 0, |
| 123 true, | 123 true, |
| 124 false, | 124 false, // is_hardware_read_only |
| 125 false, | 125 false, |
| 126 true, | 126 true, |
| 127 false, | 127 false, |
| 128 false | 128 false |
| 129 } | 129 } |
| 130 }; | 130 }; |
| 131 | 131 |
| 132 void DispatchDirectoryChangeEventImpl( | 132 void DispatchDirectoryChangeEventImpl( |
| 133 int* counter, | 133 int* counter, |
| 134 const base::FilePath& virtual_path, | 134 const base::FilePath& virtual_path, |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 kTestDisks[disk_info_index].drive_label, | 282 kTestDisks[disk_info_index].drive_label, |
| 283 kTestDisks[disk_info_index].vendor_id, | 283 kTestDisks[disk_info_index].vendor_id, |
| 284 kTestDisks[disk_info_index].vendor_name, | 284 kTestDisks[disk_info_index].vendor_name, |
| 285 kTestDisks[disk_info_index].product_id, | 285 kTestDisks[disk_info_index].product_id, |
| 286 kTestDisks[disk_info_index].product_name, | 286 kTestDisks[disk_info_index].product_name, |
| 287 kTestDisks[disk_info_index].fs_uuid, | 287 kTestDisks[disk_info_index].fs_uuid, |
| 288 kTestDisks[disk_info_index].system_path_prefix, | 288 kTestDisks[disk_info_index].system_path_prefix, |
| 289 kTestDisks[disk_info_index].device_type, | 289 kTestDisks[disk_info_index].device_type, |
| 290 kTestDisks[disk_info_index].size_in_bytes, | 290 kTestDisks[disk_info_index].size_in_bytes, |
| 291 kTestDisks[disk_info_index].is_parent, | 291 kTestDisks[disk_info_index].is_parent, |
| 292 kTestDisks[disk_info_index].is_read_only, | 292 kTestDisks[disk_info_index].is_read_only_hardware, |
| 293 kTestDisks[disk_info_index].has_media, | 293 kTestDisks[disk_info_index].has_media, |
| 294 kTestDisks[disk_info_index].on_boot_device, | 294 kTestDisks[disk_info_index].on_boot_device, |
| 295 kTestDisks[disk_info_index].on_removable_device, | 295 kTestDisks[disk_info_index].on_removable_device, |
| 296 kTestDisks[disk_info_index].is_hidden))); | 296 kTestDisks[disk_info_index].is_hidden))); |
| 297 } | 297 } |
| 298 } | 298 } |
| 299 } | 299 } |
| 300 | 300 |
| 301 const DiskMountManager::Disk* FindVolumeBySourcePath( | 301 const DiskMountManager::Disk* FindVolumeBySourcePath( |
| 302 const std::string& source_path) { | 302 const std::string& source_path) { |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 ->RegisterFileSystem( | 440 ->RegisterFileSystem( |
| 441 kLocalMountPointName, storage::kFileSystemTypeNativeLocal, | 441 kLocalMountPointName, storage::kFileSystemTypeNativeLocal, |
| 442 storage::FileSystemMountOption(), mount_point_dir)); | 442 storage::FileSystemMountOption(), mount_point_dir)); |
| 443 file_manager::VolumeManager::Get(browser()->profile()) | 443 file_manager::VolumeManager::Get(browser()->profile()) |
| 444 ->AddVolumeForTesting(mount_point_dir, file_manager::VOLUME_TYPE_TESTING, | 444 ->AddVolumeForTesting(mount_point_dir, file_manager::VOLUME_TYPE_TESTING, |
| 445 chromeos::DEVICE_TYPE_UNKNOWN, | 445 chromeos::DEVICE_TYPE_UNKNOWN, |
| 446 false /* read_only */); | 446 false /* read_only */); |
| 447 | 447 |
| 448 ASSERT_TRUE(RunComponentExtensionTest("file_browser/content_checksum_test")); | 448 ASSERT_TRUE(RunComponentExtensionTest("file_browser/content_checksum_test")); |
| 449 } | 449 } |
| OLD | NEW |