| 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/chromeos/drive/file_system/operation_test_base.h" | 5 #include "chrome/browser/chromeos/drive/file_system/operation_test_base.h" |
| 6 | 6 |
| 7 #include "base/threading/sequenced_worker_pool.h" | 7 #include "base/threading/sequenced_worker_pool.h" |
| 8 #include "chrome/browser/chromeos/drive/change_list_loader.h" | 8 #include "chrome/browser/chromeos/drive/change_list_loader.h" |
| 9 #include "chrome/browser/chromeos/drive/fake_free_disk_space_getter.h" | 9 #include "chrome/browser/chromeos/drive/fake_free_disk_space_getter.h" |
| 10 #include "chrome/browser/chromeos/drive/file_cache.h" | 10 #include "chrome/browser/chromeos/drive/file_cache.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 scoped_refptr<base::SequencedWorkerPool> pool = | 46 scoped_refptr<base::SequencedWorkerPool> pool = |
| 47 content::BrowserThread::GetBlockingPool(); | 47 content::BrowserThread::GetBlockingPool(); |
| 48 blocking_task_runner_ = | 48 blocking_task_runner_ = |
| 49 pool->GetSequencedTaskRunner(pool->GetSequenceToken()); | 49 pool->GetSequencedTaskRunner(pool->GetSequenceToken()); |
| 50 | 50 |
| 51 profile_.reset(new TestingProfile); | 51 profile_.reset(new TestingProfile); |
| 52 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 52 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
| 53 | 53 |
| 54 fake_drive_service_.reset(new FakeDriveService); | 54 fake_drive_service_.reset(new FakeDriveService); |
| 55 fake_drive_service_->LoadResourceListForWapi( | 55 fake_drive_service_->LoadResourceListForWapi( |
| 56 "chromeos/gdata/root_feed.json"); | 56 "gdata/root_feed.json"); |
| 57 fake_drive_service_->LoadAccountMetadataForWapi( | 57 fake_drive_service_->LoadAccountMetadataForWapi( |
| 58 "chromeos/gdata/account_metadata.json"); | 58 "gdata/account_metadata.json"); |
| 59 | 59 |
| 60 scheduler_.reset(new JobScheduler(profile_.get(), fake_drive_service_.get(), | 60 scheduler_.reset(new JobScheduler(profile_.get(), fake_drive_service_.get(), |
| 61 blocking_task_runner_)); | 61 blocking_task_runner_)); |
| 62 | 62 |
| 63 metadata_storage_.reset(new internal::ResourceMetadataStorage( | 63 metadata_storage_.reset(new internal::ResourceMetadataStorage( |
| 64 temp_dir_.path(), blocking_task_runner_)); | 64 temp_dir_.path(), blocking_task_runner_)); |
| 65 bool success = false; | 65 bool success = false; |
| 66 base::PostTaskAndReplyWithResult( | 66 base::PostTaskAndReplyWithResult( |
| 67 blocking_task_runner_, | 67 blocking_task_runner_, |
| 68 FROM_HERE, | 68 FROM_HERE, |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 FROM_HERE, | 130 FROM_HERE, |
| 131 base::Bind(&internal::ResourceMetadata::GetResourceEntryByPath, | 131 base::Bind(&internal::ResourceMetadata::GetResourceEntryByPath, |
| 132 base::Unretained(metadata()), path, entry), | 132 base::Unretained(metadata()), path, entry), |
| 133 base::Bind(google_apis::test_util::CreateCopyResultCallback(&error))); | 133 base::Bind(google_apis::test_util::CreateCopyResultCallback(&error))); |
| 134 google_apis::test_util::RunBlockingPoolTask(); | 134 google_apis::test_util::RunBlockingPoolTask(); |
| 135 return error; | 135 return error; |
| 136 } | 136 } |
| 137 | 137 |
| 138 } // namespace file_system | 138 } // namespace file_system |
| 139 } // namespace drive | 139 } // namespace drive |
| OLD | NEW |