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

Side by Side Diff: content/public/test/test_file_system_context.cc

Issue 1544293002: Convert Pass()→std::move() in //content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « content/public/test/test_file_system_backend.cc ('k') | content/public/test/test_mojo_app.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "content/public/test/test_file_system_context.h" 5 #include "content/public/test/test_file_system_context.h"
6 6
7 #include <utility>
8
7 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
8 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
9 #include "content/public/test/mock_special_storage_policy.h" 11 #include "content/public/test/mock_special_storage_policy.h"
10 #include "content/public/test/test_file_system_backend.h" 12 #include "content/public/test/test_file_system_backend.h"
11 #include "content/public/test/test_file_system_options.h" 13 #include "content/public/test/test_file_system_options.h"
12 #include "storage/browser/fileapi/external_mount_points.h" 14 #include "storage/browser/fileapi/external_mount_points.h"
13 #include "storage/browser/fileapi/file_system_backend.h" 15 #include "storage/browser/fileapi/file_system_backend.h"
14 #include "storage/browser/fileapi/file_system_context.h" 16 #include "storage/browser/fileapi/file_system_context.h"
15 17
16 namespace content { 18 namespace content {
17 19
18 storage::FileSystemContext* CreateFileSystemContextForTesting( 20 storage::FileSystemContext* CreateFileSystemContextForTesting(
19 storage::QuotaManagerProxy* quota_manager_proxy, 21 storage::QuotaManagerProxy* quota_manager_proxy,
20 const base::FilePath& base_path) { 22 const base::FilePath& base_path) {
21 ScopedVector<storage::FileSystemBackend> additional_providers; 23 ScopedVector<storage::FileSystemBackend> additional_providers;
22 additional_providers.push_back(new TestFileSystemBackend( 24 additional_providers.push_back(new TestFileSystemBackend(
23 base::ThreadTaskRunnerHandle::Get().get(), base_path)); 25 base::ThreadTaskRunnerHandle::Get().get(), base_path));
24 return CreateFileSystemContextWithAdditionalProvidersForTesting( 26 return CreateFileSystemContextWithAdditionalProvidersForTesting(
25 quota_manager_proxy, additional_providers.Pass(), base_path); 27 quota_manager_proxy, std::move(additional_providers), base_path);
26 } 28 }
27 29
28 storage::FileSystemContext* 30 storage::FileSystemContext*
29 CreateFileSystemContextWithAdditionalProvidersForTesting( 31 CreateFileSystemContextWithAdditionalProvidersForTesting(
30 storage::QuotaManagerProxy* quota_manager_proxy, 32 storage::QuotaManagerProxy* quota_manager_proxy,
31 ScopedVector<storage::FileSystemBackend> additional_providers, 33 ScopedVector<storage::FileSystemBackend> additional_providers,
32 const base::FilePath& base_path) { 34 const base::FilePath& base_path) {
33 return new storage::FileSystemContext( 35 return new storage::FileSystemContext(
34 base::ThreadTaskRunnerHandle::Get().get(), 36 base::ThreadTaskRunnerHandle::Get().get(),
35 base::ThreadTaskRunnerHandle::Get().get(), 37 base::ThreadTaskRunnerHandle::Get().get(),
36 storage::ExternalMountPoints::CreateRefCounted().get(), 38 storage::ExternalMountPoints::CreateRefCounted().get(),
37 make_scoped_refptr(new MockSpecialStoragePolicy()).get(), 39 make_scoped_refptr(new MockSpecialStoragePolicy()).get(),
38 quota_manager_proxy, additional_providers.Pass(), 40 quota_manager_proxy, std::move(additional_providers),
39 std::vector<storage::URLRequestAutoMountHandler>(), base_path, 41 std::vector<storage::URLRequestAutoMountHandler>(), base_path,
40 CreateAllowFileAccessOptions()); 42 CreateAllowFileAccessOptions());
41 } 43 }
42 44
43 storage::FileSystemContext* CreateFileSystemContextWithAutoMountersForTesting( 45 storage::FileSystemContext* CreateFileSystemContextWithAutoMountersForTesting(
44 storage::QuotaManagerProxy* quota_manager_proxy, 46 storage::QuotaManagerProxy* quota_manager_proxy,
45 ScopedVector<storage::FileSystemBackend> additional_providers, 47 ScopedVector<storage::FileSystemBackend> additional_providers,
46 const std::vector<storage::URLRequestAutoMountHandler>& auto_mounters, 48 const std::vector<storage::URLRequestAutoMountHandler>& auto_mounters,
47 const base::FilePath& base_path) { 49 const base::FilePath& base_path) {
48 return new storage::FileSystemContext( 50 return new storage::FileSystemContext(
49 base::ThreadTaskRunnerHandle::Get().get(), 51 base::ThreadTaskRunnerHandle::Get().get(),
50 base::ThreadTaskRunnerHandle::Get().get(), 52 base::ThreadTaskRunnerHandle::Get().get(),
51 storage::ExternalMountPoints::CreateRefCounted().get(), 53 storage::ExternalMountPoints::CreateRefCounted().get(),
52 make_scoped_refptr(new MockSpecialStoragePolicy()).get(), 54 make_scoped_refptr(new MockSpecialStoragePolicy()).get(),
53 quota_manager_proxy, additional_providers.Pass(), auto_mounters, 55 quota_manager_proxy, std::move(additional_providers), auto_mounters,
54 base_path, CreateAllowFileAccessOptions()); 56 base_path, CreateAllowFileAccessOptions());
55 } 57 }
56 58
57 storage::FileSystemContext* CreateIncognitoFileSystemContextForTesting( 59 storage::FileSystemContext* CreateIncognitoFileSystemContextForTesting(
58 storage::QuotaManagerProxy* quota_manager_proxy, 60 storage::QuotaManagerProxy* quota_manager_proxy,
59 const base::FilePath& base_path) { 61 const base::FilePath& base_path) {
60 ScopedVector<storage::FileSystemBackend> additional_providers; 62 ScopedVector<storage::FileSystemBackend> additional_providers;
61 return new storage::FileSystemContext( 63 return new storage::FileSystemContext(
62 base::ThreadTaskRunnerHandle::Get().get(), 64 base::ThreadTaskRunnerHandle::Get().get(),
63 base::ThreadTaskRunnerHandle::Get().get(), 65 base::ThreadTaskRunnerHandle::Get().get(),
64 storage::ExternalMountPoints::CreateRefCounted().get(), 66 storage::ExternalMountPoints::CreateRefCounted().get(),
65 make_scoped_refptr(new MockSpecialStoragePolicy()).get(), 67 make_scoped_refptr(new MockSpecialStoragePolicy()).get(),
66 quota_manager_proxy, additional_providers.Pass(), 68 quota_manager_proxy, std::move(additional_providers),
67 std::vector<storage::URLRequestAutoMountHandler>(), base_path, 69 std::vector<storage::URLRequestAutoMountHandler>(), base_path,
68 CreateIncognitoFileSystemOptions()); 70 CreateIncognitoFileSystemOptions());
69 } 71 }
70 72
71 } // namespace content 73 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/test_file_system_backend.cc ('k') | content/public/test/test_mojo_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698