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 // MediaFileSystemRegistry unit tests. | 5 // MediaFileSystemRegistry unit tests. |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 const base::FilePath& location, | 323 const base::FilePath& location, |
324 bool removable, | 324 bool removable, |
325 bool media_device); | 325 bool media_device); |
326 | 326 |
327 std::vector<MediaFileSystemInfo> GetAutoAddedGalleries( | 327 std::vector<MediaFileSystemInfo> GetAutoAddedGalleries( |
328 ProfileState* profile_state); | 328 ProfileState* profile_state); |
329 | 329 |
330 void ProcessAttach(const std::string& id, | 330 void ProcessAttach(const std::string& id, |
331 const base::string16& name, | 331 const base::string16& name, |
332 const base::FilePath::StringType& location) { | 332 const base::FilePath::StringType& location) { |
333 StorageInfo info(id, base::string16(), location, name, base::string16(), | 333 StorageInfo info(id, location, name, base::string16(), base::string16(), 0); |
334 base::string16(), 0); | |
335 StorageMonitor::GetInstance()->receiver()->ProcessAttach(info); | 334 StorageMonitor::GetInstance()->receiver()->ProcessAttach(info); |
336 } | 335 } |
337 | 336 |
338 void ProcessDetach(const std::string& id) { | 337 void ProcessDetach(const std::string& id) { |
339 StorageMonitor::GetInstance()->receiver()->ProcessDetach(id); | 338 StorageMonitor::GetInstance()->receiver()->ProcessDetach(id); |
340 } | 339 } |
341 | 340 |
342 MediaFileSystemRegistry* registry() { | 341 MediaFileSystemRegistry* registry() { |
343 return test_file_system_context_->registry(); | 342 return test_file_system_context_->registry(); |
344 } | 343 } |
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1072 fs_info.begin()->second.fsid).empty()); | 1071 fs_info.begin()->second.fsid).empty()); |
1073 | 1072 |
1074 // Revoke permission and ensure that the file system is revoked. | 1073 // Revoke permission and ensure that the file system is revoked. |
1075 SetGalleryPermission(profile_state, | 1074 SetGalleryPermission(profile_state, |
1076 profile_state->regular_permission_extension(), | 1075 profile_state->regular_permission_extension(), |
1077 device_id, | 1076 device_id, |
1078 false /*has access*/); | 1077 false /*has access*/); |
1079 EXPECT_TRUE(test_file_system_context()->GetPathForId( | 1078 EXPECT_TRUE(test_file_system_context()->GetPathForId( |
1080 fs_info.begin()->second.fsid).empty()); | 1079 fs_info.begin()->second.fsid).empty()); |
1081 } | 1080 } |
OLD | NEW |