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

Side by Side Diff: chrome/browser/media_galleries/fileapi/picasa/picasa_file_util_unittest.cc

Issue 20989003: Deprecate FileSystemTaskRunners (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 4 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 | Annotate | Revision Log
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 <set> 5 #include <set>
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 12 matching lines...) Expand all
23 #include "chrome/common/media_galleries/pmp_constants.h" 23 #include "chrome/common/media_galleries/pmp_constants.h"
24 #include "content/public/browser/browser_thread.h" 24 #include "content/public/browser/browser_thread.h"
25 #include "content/public/test/test_browser_thread.h" 25 #include "content/public/test/test_browser_thread.h"
26 #include "testing/gtest/include/gtest/gtest.h" 26 #include "testing/gtest/include/gtest/gtest.h"
27 #include "webkit/browser/fileapi/async_file_util_adapter.h" 27 #include "webkit/browser/fileapi/async_file_util_adapter.h"
28 #include "webkit/browser/fileapi/external_mount_points.h" 28 #include "webkit/browser/fileapi/external_mount_points.h"
29 #include "webkit/browser/fileapi/file_system_context.h" 29 #include "webkit/browser/fileapi/file_system_context.h"
30 #include "webkit/browser/fileapi/file_system_file_util.h" 30 #include "webkit/browser/fileapi/file_system_file_util.h"
31 #include "webkit/browser/fileapi/file_system_operation_context.h" 31 #include "webkit/browser/fileapi/file_system_operation_context.h"
32 #include "webkit/browser/fileapi/file_system_operation_runner.h" 32 #include "webkit/browser/fileapi/file_system_operation_runner.h"
33 #include "webkit/browser/fileapi/file_system_task_runners.h"
34 #include "webkit/browser/fileapi/isolated_context.h" 33 #include "webkit/browser/fileapi/isolated_context.h"
35 #include "webkit/browser/fileapi/mock_file_system_options.h" 34 #include "webkit/browser/fileapi/mock_file_system_options.h"
36 #include "webkit/browser/quota/mock_special_storage_policy.h" 35 #include "webkit/browser/quota/mock_special_storage_policy.h"
37 36
38 using fileapi::FileSystemFileUtil; 37 using fileapi::FileSystemFileUtil;
39 using fileapi::FileSystemOperationContext; 38 using fileapi::FileSystemOperationContext;
40 using fileapi::FileSystemOperation; 39 using fileapi::FileSystemOperation;
41 using fileapi::FileSystemURL; 40 using fileapi::FileSystemURL;
42 41
43 namespace picasa { 42 namespace picasa {
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 new quota::MockSpecialStoragePolicy(); 226 new quota::MockSpecialStoragePolicy();
228 227
229 picasa_data_provider_.reset(new TestPicasaDataProvider()); 228 picasa_data_provider_.reset(new TestPicasaDataProvider());
230 229
231 ScopedVector<fileapi::FileSystemBackend> additional_providers; 230 ScopedVector<fileapi::FileSystemBackend> additional_providers;
232 additional_providers.push_back(new TestMediaFileSystemBackend( 231 additional_providers.push_back(new TestMediaFileSystemBackend(
233 profile_dir_.path(), 232 profile_dir_.path(),
234 new TestPicasaFileUtil(picasa_data_provider_.get()))); 233 new TestPicasaFileUtil(picasa_data_provider_.get())));
235 234
236 file_system_context_ = new fileapi::FileSystemContext( 235 file_system_context_ = new fileapi::FileSystemContext(
237 fileapi::FileSystemTaskRunners::CreateMockTaskRunners(), 236 base::MessageLoopProxy::current().get(),
237 base::MessageLoopProxy::current().get(),
238 fileapi::ExternalMountPoints::CreateRefCounted().get(), 238 fileapi::ExternalMountPoints::CreateRefCounted().get(),
239 storage_policy.get(), 239 storage_policy.get(),
240 NULL, 240 NULL,
241 additional_providers.Pass(), 241 additional_providers.Pass(),
242 profile_dir_.path(), 242 profile_dir_.path(),
243 fileapi::CreateAllowFileAccessOptions()); 243 fileapi::CreateAllowFileAccessOptions());
244 } 244 }
245 245
246 protected: 246 protected:
247 // |test_folders| must be in alphabetical order for easy verification 247 // |test_folders| must be in alphabetical order for easy verification
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 new TestFolder(base::StringPrintf("folder-%05d", i), 468 new TestFolder(base::StringPrintf("folder-%05d", i),
469 date, 469 date,
470 base::StringPrintf("uid%05d", i), i % 5, i % 3)); 470 base::StringPrintf("uid%05d", i), i % 5, i % 3));
471 } 471 }
472 472
473 SetupFolders(&test_folders); 473 SetupFolders(&test_folders);
474 VerifyFolderDirectoryList(test_folders); 474 VerifyFolderDirectoryList(test_folders);
475 } 475 }
476 476
477 } // namespace picasa 477 } // namespace picasa
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698