| 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 "chrome/browser/media_galleries/fileapi/picasa_data_provider.h" | 5 #include "chrome/browser/media_galleries/fileapi/picasa_data_provider.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 } | 224 } |
| 225 | 225 |
| 226 const base::FilePath& test_folder_1_path() { return test_folder_1_.path(); } | 226 const base::FilePath& test_folder_1_path() { return test_folder_1_.path(); } |
| 227 const base::FilePath& test_folder_2_path() { return test_folder_2_.path(); } | 227 const base::FilePath& test_folder_2_path() { return test_folder_2_.path(); } |
| 228 | 228 |
| 229 TestPicasaDataProvider* data_provider() const { | 229 TestPicasaDataProvider* data_provider() const { |
| 230 return picasa_data_provider_.get(); | 230 return picasa_data_provider_.get(); |
| 231 } | 231 } |
| 232 | 232 |
| 233 const base::FilePath GetTempDirPath() const { | 233 const base::FilePath GetTempDirPath() const { |
| 234 return picasa_root_dir_.path().AppendASCII(kPicasaTempDirName); | 234 return picasa_root_dir_.GetPath().AppendASCII(kPicasaTempDirName); |
| 235 } | 235 } |
| 236 | 236 |
| 237 virtual base::FilePath GetColumnFileDestination() const { | 237 virtual base::FilePath GetColumnFileDestination() const { |
| 238 return picasa_root_dir_.path().AppendASCII(kPicasaDatabaseDirName); | 238 return picasa_root_dir_.GetPath().AppendASCII(kPicasaDatabaseDirName); |
| 239 } | 239 } |
| 240 | 240 |
| 241 private: | 241 private: |
| 242 void SetupFoldersAndDataProvider() { | 242 void SetupFoldersAndDataProvider() { |
| 243 MediaFileSystemBackend::AssertCurrentlyOnMediaSequence(); | 243 MediaFileSystemBackend::AssertCurrentlyOnMediaSequence(); |
| 244 ASSERT_TRUE(test_folder_1_.CreateUniqueTempDir()); | 244 ASSERT_TRUE(test_folder_1_.CreateUniqueTempDir()); |
| 245 ASSERT_TRUE(test_folder_2_.CreateUniqueTempDir()); | 245 ASSERT_TRUE(test_folder_2_.CreateUniqueTempDir()); |
| 246 ASSERT_TRUE(picasa_root_dir_.CreateUniqueTempDir()); | 246 ASSERT_TRUE(picasa_root_dir_.CreateUniqueTempDir()); |
| 247 ASSERT_TRUE(base::CreateDirectory( | 247 ASSERT_TRUE(base::CreateDirectory( |
| 248 picasa_root_dir_.path().AppendASCII(kPicasaDatabaseDirName))); | 248 picasa_root_dir_.GetPath().AppendASCII(kPicasaDatabaseDirName))); |
| 249 ASSERT_TRUE(base::CreateDirectory( | 249 ASSERT_TRUE(base::CreateDirectory( |
| 250 picasa_root_dir_.path().AppendASCII(kPicasaTempDirName))); | 250 picasa_root_dir_.GetPath().AppendASCII(kPicasaTempDirName))); |
| 251 | 251 |
| 252 picasa_data_provider_.reset(new TestPicasaDataProvider( | 252 picasa_data_provider_.reset(new TestPicasaDataProvider( |
| 253 picasa_root_dir_.path().AppendASCII(kPicasaDatabaseDirName))); | 253 picasa_root_dir_.GetPath().AppendASCII(kPicasaDatabaseDirName))); |
| 254 } | 254 } |
| 255 | 255 |
| 256 virtual void StartTestOnMediaTaskRunner() { | 256 virtual void StartTestOnMediaTaskRunner() { |
| 257 MediaFileSystemBackend::AssertCurrentlyOnMediaSequence(); | 257 MediaFileSystemBackend::AssertCurrentlyOnMediaSequence(); |
| 258 | 258 |
| 259 data_provider()->RefreshData( | 259 data_provider()->RefreshData( |
| 260 RequestedDataType(), | 260 RequestedDataType(), |
| 261 base::Bind(&PicasaDataProviderTest::VerifyRefreshResults, | 261 base::Bind(&PicasaDataProviderTest::VerifyRefreshResults, |
| 262 base::Unretained(this))); | 262 base::Unretained(this))); |
| 263 } | 263 } |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 base::Unretained(this))); | 554 base::Unretained(this))); |
| 555 } | 555 } |
| 556 }; | 556 }; |
| 557 | 557 |
| 558 IN_PROC_BROWSER_TEST_F(PicasaDataProviderInvalidateInflightAlbumsIndexerTest, | 558 IN_PROC_BROWSER_TEST_F(PicasaDataProviderInvalidateInflightAlbumsIndexerTest, |
| 559 InvalidateInflightAlbumsIndexerTest) { | 559 InvalidateInflightAlbumsIndexerTest) { |
| 560 RunTest(); | 560 RunTest(); |
| 561 } | 561 } |
| 562 | 562 |
| 563 } // namespace picasa | 563 } // namespace picasa |
| OLD | NEW |