| OLD | NEW |
| 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 <set> | 5 #include <set> |
| 6 #include <string> | 6 #include <string> |
| 7 | 7 |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
| 10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
| 11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
| 12 #include "base/message_loop_proxy.h" |
| 12 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
| 13 #include "base/stringprintf.h" | 14 #include "base/stringprintf.h" |
| 14 #include "base/time.h" | 15 #include "base/time.h" |
| 15 #include "chrome/browser/media_galleries/fileapi/media_file_system_mount_point_p
rovider.h" | 16 #include "chrome/browser/media_galleries/fileapi/media_file_system_mount_point_p
rovider.h" |
| 16 #include "chrome/browser/media_galleries/fileapi/media_path_filter.h" | 17 #include "chrome/browser/media_galleries/fileapi/media_path_filter.h" |
| 17 #include "chrome/browser/media_galleries/fileapi/picasa/picasa_album_table_reade
r.h" | 18 #include "chrome/browser/media_galleries/fileapi/picasa/picasa_album_table_reade
r.h" |
| 18 #include "chrome/browser/media_galleries/fileapi/picasa/picasa_data_provider.h" | 19 #include "chrome/browser/media_galleries/fileapi/picasa/picasa_data_provider.h" |
| 19 #include "chrome/browser/media_galleries/fileapi/picasa/picasa_file_util.h" | 20 #include "chrome/browser/media_galleries/fileapi/picasa/picasa_file_util.h" |
| 20 #include "chrome/browser/media_galleries/fileapi/picasa/pmp_constants.h" | 21 #include "chrome/browser/media_galleries/fileapi/picasa/pmp_constants.h" |
| 21 #include "chrome/browser/media_galleries/fileapi/picasa/pmp_test_helper.h" | 22 #include "chrome/browser/media_galleries/fileapi/picasa/pmp_test_helper.h" |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 | 143 |
| 143 scoped_ptr<PicasaDataProvider> data_provider_; | 144 scoped_ptr<PicasaDataProvider> data_provider_; |
| 144 }; | 145 }; |
| 145 | 146 |
| 146 class TestMediaFileSystemMountPointProvider | 147 class TestMediaFileSystemMountPointProvider |
| 147 : public chrome::MediaFileSystemMountPointProvider { | 148 : public chrome::MediaFileSystemMountPointProvider { |
| 148 public: | 149 public: |
| 149 TestMediaFileSystemMountPointProvider( | 150 TestMediaFileSystemMountPointProvider( |
| 150 const base::FilePath& profile_path, | 151 const base::FilePath& profile_path, |
| 151 PicasaFileUtil* picasa_file_util) | 152 PicasaFileUtil* picasa_file_util) |
| 152 : chrome::MediaFileSystemMountPointProvider(profile_path), | 153 : chrome::MediaFileSystemMountPointProvider( |
| 154 profile_path, base::MessageLoopProxy::current()), |
| 153 test_file_util_(picasa_file_util) { | 155 test_file_util_(picasa_file_util) { |
| 154 } | 156 } |
| 155 | 157 |
| 156 virtual fileapi::AsyncFileUtil* | 158 virtual fileapi::AsyncFileUtil* |
| 157 GetAsyncFileUtil(fileapi::FileSystemType type) OVERRIDE { | 159 GetAsyncFileUtil(fileapi::FileSystemType type) OVERRIDE { |
| 158 if (type != fileapi::kFileSystemTypePicasa) | 160 if (type != fileapi::kFileSystemTypePicasa) |
| 159 return NULL; | 161 return NULL; |
| 160 | 162 |
| 161 return test_file_util_.get(); | 163 return test_file_util_.get(); |
| 162 } | 164 } |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 new TestFolder(base::StringPrintf("folder-%05d", i), | 507 new TestFolder(base::StringPrintf("folder-%05d", i), |
| 506 date, | 508 date, |
| 507 base::StringPrintf("uid%05d", i), i % 5, i % 3)); | 509 base::StringPrintf("uid%05d", i), i % 5, i % 3)); |
| 508 } | 510 } |
| 509 | 511 |
| 510 SetupFolders(&test_folders); | 512 SetupFolders(&test_folders); |
| 511 VerifyFolderDirectoryList(test_folders); | 513 VerifyFolderDirectoryList(test_folders); |
| 512 } | 514 } |
| 513 | 515 |
| 514 } // namespace chrome | 516 } // namespace chrome |
| OLD | NEW |