| 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/prefs/testing_pref_service.h" | 7 #include "base/prefs/testing_pref_service.h" | 
| 8 #include "base/threading/sequenced_worker_pool.h" | 8 #include "base/threading/sequenced_worker_pool.h" | 
| 9 #include "chrome/browser/chromeos/drive/change_list_loader.h" | 9 #include "chrome/browser/chromeos/drive/change_list_loader.h" | 
| 10 #include "chrome/browser/chromeos/drive/fake_free_disk_space_getter.h" | 10 #include "chrome/browser/chromeos/drive/fake_free_disk_space_getter.h" | 
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 107   base::PostTaskAndReplyWithResult( | 107   base::PostTaskAndReplyWithResult( | 
| 108       blocking_task_runner_.get(), | 108       blocking_task_runner_.get(), | 
| 109       FROM_HERE, | 109       FROM_HERE, | 
| 110       base::Bind(&internal::FileCache::Initialize, | 110       base::Bind(&internal::FileCache::Initialize, | 
| 111                  base::Unretained(cache_.get())), | 111                  base::Unretained(cache_.get())), | 
| 112       google_apis::test_util::CreateCopyResultCallback(&success)); | 112       google_apis::test_util::CreateCopyResultCallback(&success)); | 
| 113   test_util::RunBlockingPoolTask(); | 113   test_util::RunBlockingPoolTask(); | 
| 114   ASSERT_TRUE(success); | 114   ASSERT_TRUE(success); | 
| 115 | 115 | 
| 116   // Makes sure the FakeDriveService's content is loaded to the metadata_. | 116   // Makes sure the FakeDriveService's content is loaded to the metadata_. | 
|  | 117   loader_controller_.reset(new internal::LoaderController); | 
| 117   change_list_loader_.reset(new internal::ChangeListLoader( | 118   change_list_loader_.reset(new internal::ChangeListLoader( | 
| 118       blocking_task_runner_.get(), | 119       blocking_task_runner_.get(), | 
| 119       metadata_.get(), | 120       metadata_.get(), | 
| 120       scheduler_.get(), | 121       scheduler_.get(), | 
| 121       fake_drive_service_.get())); | 122       fake_drive_service_.get(), | 
|  | 123       loader_controller_.get())); | 
| 122   change_list_loader_->LoadForTesting( | 124   change_list_loader_->LoadForTesting( | 
| 123       google_apis::test_util::CreateCopyResultCallback(&error)); | 125       google_apis::test_util::CreateCopyResultCallback(&error)); | 
| 124   test_util::RunBlockingPoolTask(); | 126   test_util::RunBlockingPoolTask(); | 
| 125   ASSERT_EQ(FILE_ERROR_OK, error); | 127   ASSERT_EQ(FILE_ERROR_OK, error); | 
| 126 } | 128 } | 
| 127 | 129 | 
| 128 FileError OperationTestBase::GetLocalResourceEntry(const base::FilePath& path, | 130 FileError OperationTestBase::GetLocalResourceEntry(const base::FilePath& path, | 
| 129                                                    ResourceEntry* entry) { | 131                                                    ResourceEntry* entry) { | 
| 130   FileError error = FILE_ERROR_FAILED; | 132   FileError error = FILE_ERROR_FAILED; | 
| 131   base::PostTaskAndReplyWithResult( | 133   base::PostTaskAndReplyWithResult( | 
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 169 FileError OperationTestBase::CheckForUpdates() { | 171 FileError OperationTestBase::CheckForUpdates() { | 
| 170   FileError error = FILE_ERROR_FAILED; | 172   FileError error = FILE_ERROR_FAILED; | 
| 171   change_list_loader_->CheckForUpdates( | 173   change_list_loader_->CheckForUpdates( | 
| 172       google_apis::test_util::CreateCopyResultCallback(&error)); | 174       google_apis::test_util::CreateCopyResultCallback(&error)); | 
| 173   test_util::RunBlockingPoolTask(); | 175   test_util::RunBlockingPoolTask(); | 
| 174   return error; | 176   return error; | 
| 175 } | 177 } | 
| 176 | 178 | 
| 177 }  // namespace file_system | 179 }  // namespace file_system | 
| 178 }  // namespace drive | 180 }  // namespace drive | 
| OLD | NEW | 
|---|