Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(314)

Side by Side Diff: components/drive/file_system/operation_test_base.cc

Issue 2317993003: //chrome/browser and //components A-E: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Just rebased Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "components/drive/file_system/operation_test_base.h" 5 #include "components/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 "components/drive/chromeos/change_list_loader.h" 8 #include "components/drive/chromeos/change_list_loader.h"
9 #include "components/drive/chromeos/fake_free_disk_space_getter.h" 9 #include "components/drive/chromeos/fake_free_disk_space_getter.h"
10 #include "components/drive/chromeos/file_cache.h" 10 #include "components/drive/chromeos/file_cache.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 fake_drive_service_.reset(new FakeDriveService); 78 fake_drive_service_.reset(new FakeDriveService);
79 ASSERT_TRUE(test_util::SetUpTestEntries(fake_drive_service_.get())); 79 ASSERT_TRUE(test_util::SetUpTestEntries(fake_drive_service_.get()));
80 80
81 scheduler_.reset(new JobScheduler( 81 scheduler_.reset(new JobScheduler(
82 pref_service_.get(), 82 pref_service_.get(),
83 logger_.get(), 83 logger_.get(),
84 fake_drive_service_.get(), 84 fake_drive_service_.get(),
85 blocking_task_runner_.get())); 85 blocking_task_runner_.get()));
86 86
87 metadata_storage_.reset(new internal::ResourceMetadataStorage( 87 metadata_storage_.reset(new internal::ResourceMetadataStorage(
88 temp_dir_.path(), blocking_task_runner_.get())); 88 temp_dir_.GetPath(), blocking_task_runner_.get()));
89 bool success = false; 89 bool success = false;
90 base::PostTaskAndReplyWithResult( 90 base::PostTaskAndReplyWithResult(
91 blocking_task_runner_.get(), 91 blocking_task_runner_.get(),
92 FROM_HERE, 92 FROM_HERE,
93 base::Bind(&internal::ResourceMetadataStorage::Initialize, 93 base::Bind(&internal::ResourceMetadataStorage::Initialize,
94 base::Unretained(metadata_storage_.get())), 94 base::Unretained(metadata_storage_.get())),
95 google_apis::test_util::CreateCopyResultCallback(&success)); 95 google_apis::test_util::CreateCopyResultCallback(&success));
96 content::RunAllBlockingPoolTasksUntilIdle(); 96 content::RunAllBlockingPoolTasksUntilIdle();
97 ASSERT_TRUE(success); 97 ASSERT_TRUE(success);
98 98
99 fake_free_disk_space_getter_.reset(new FakeFreeDiskSpaceGetter); 99 fake_free_disk_space_getter_.reset(new FakeFreeDiskSpaceGetter);
100 cache_.reset(new internal::FileCache(metadata_storage_.get(), 100 cache_.reset(new internal::FileCache(
101 temp_dir_.path(), 101 metadata_storage_.get(), temp_dir_.GetPath(), blocking_task_runner_.get(),
102 blocking_task_runner_.get(), 102 fake_free_disk_space_getter_.get()));
103 fake_free_disk_space_getter_.get()));
104 success = false; 103 success = false;
105 base::PostTaskAndReplyWithResult( 104 base::PostTaskAndReplyWithResult(
106 blocking_task_runner_.get(), 105 blocking_task_runner_.get(),
107 FROM_HERE, 106 FROM_HERE,
108 base::Bind(&internal::FileCache::Initialize, 107 base::Bind(&internal::FileCache::Initialize,
109 base::Unretained(cache_.get())), 108 base::Unretained(cache_.get())),
110 google_apis::test_util::CreateCopyResultCallback(&success)); 109 google_apis::test_util::CreateCopyResultCallback(&success));
111 content::RunAllBlockingPoolTasksUntilIdle(); 110 content::RunAllBlockingPoolTasksUntilIdle();
112 ASSERT_TRUE(success); 111 ASSERT_TRUE(success);
113 112
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 FileError OperationTestBase::CheckForUpdates() { 185 FileError OperationTestBase::CheckForUpdates() {
187 FileError error = FILE_ERROR_FAILED; 186 FileError error = FILE_ERROR_FAILED;
188 change_list_loader_->CheckForUpdates( 187 change_list_loader_->CheckForUpdates(
189 google_apis::test_util::CreateCopyResultCallback(&error)); 188 google_apis::test_util::CreateCopyResultCallback(&error));
190 content::RunAllBlockingPoolTasksUntilIdle(); 189 content::RunAllBlockingPoolTasksUntilIdle();
191 return error; 190 return error;
192 } 191 }
193 192
194 } // namespace file_system 193 } // namespace file_system
195 } // namespace drive 194 } // namespace drive
OLDNEW
« no previous file with comments | « components/drive/file_system/operation_test_base.h ('k') | components/drive/file_system_core_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698