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

Side by Side Diff: webkit/browser/fileapi/file_system_context_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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "webkit/browser/fileapi/file_system_context.h" 5 #include "webkit/browser/fileapi/file_system_context.h"
6 6
7 #include "base/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 #include "webkit/browser/fileapi/external_mount_points.h" 11 #include "webkit/browser/fileapi/external_mount_points.h"
12 #include "webkit/browser/fileapi/file_system_backend.h" 12 #include "webkit/browser/fileapi/file_system_backend.h"
13 #include "webkit/browser/fileapi/file_system_task_runners.h"
14 #include "webkit/browser/fileapi/isolated_context.h" 13 #include "webkit/browser/fileapi/isolated_context.h"
15 #include "webkit/browser/fileapi/mock_file_system_options.h" 14 #include "webkit/browser/fileapi/mock_file_system_options.h"
16 #include "webkit/browser/quota/mock_quota_manager.h" 15 #include "webkit/browser/quota/mock_quota_manager.h"
17 #include "webkit/browser/quota/mock_special_storage_policy.h" 16 #include "webkit/browser/quota/mock_special_storage_policy.h"
18 17
19 #define FPL(x) FILE_PATH_LITERAL(x) 18 #define FPL(x) FILE_PATH_LITERAL(x)
20 19
21 #if defined(FILE_PATH_USES_DRIVE_LETTERS) 20 #if defined(FILE_PATH_USES_DRIVE_LETTERS)
22 #define DRIVE FPL("C:") 21 #define DRIVE FPL("C:")
23 #else 22 #else
(...skipping 29 matching lines...) Expand all
53 new quota::MockQuotaManager(false /* is_incognito */, 52 new quota::MockQuotaManager(false /* is_incognito */,
54 data_dir_.path(), 53 data_dir_.path(),
55 base::MessageLoopProxy::current().get(), 54 base::MessageLoopProxy::current().get(),
56 base::MessageLoopProxy::current().get(), 55 base::MessageLoopProxy::current().get(),
57 storage_policy_.get()); 56 storage_policy_.get());
58 } 57 }
59 58
60 protected: 59 protected:
61 FileSystemContext* CreateFileSystemContextForTest( 60 FileSystemContext* CreateFileSystemContextForTest(
62 ExternalMountPoints* external_mount_points) { 61 ExternalMountPoints* external_mount_points) {
63 return new FileSystemContext(FileSystemTaskRunners::CreateMockTaskRunners(), 62 return new FileSystemContext(base::MessageLoopProxy::current().get(),
63 base::MessageLoopProxy::current().get(),
64 external_mount_points, 64 external_mount_points,
65 storage_policy_.get(), 65 storage_policy_.get(),
66 mock_quota_manager_->proxy(), 66 mock_quota_manager_->proxy(),
67 ScopedVector<FileSystemBackend>(), 67 ScopedVector<FileSystemBackend>(),
68 data_dir_.path(), 68 data_dir_.path(),
69 CreateAllowFileAccessOptions()); 69 CreateAllowFileAccessOptions());
70 } 70 }
71 71
72 // Verifies a *valid* filesystem url has expected values. 72 // Verifies a *valid* filesystem url has expected values.
73 void ExpectFileSystemURLMatches(const FileSystemURL& url, 73 void ExpectFileSystemURLMatches(const FileSystemURL& url,
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 base::FilePath(DRIVE FPL("/test/isolated/root"))); 319 base::FilePath(DRIVE FPL("/test/isolated/root")));
320 ExternalMountPoints::GetSystemInstance()->RevokeFileSystem("system"); 320 ExternalMountPoints::GetSystemInstance()->RevokeFileSystem("system");
321 ExternalMountPoints::GetSystemInstance()->RevokeFileSystem("ext"); 321 ExternalMountPoints::GetSystemInstance()->RevokeFileSystem("ext");
322 ExternalMountPoints::GetSystemInstance()->RevokeFileSystem( 322 ExternalMountPoints::GetSystemInstance()->RevokeFileSystem(
323 kIsolatedFileSystemID); 323 kIsolatedFileSystemID);
324 } 324 }
325 325
326 } // namespace 326 } // namespace
327 327
328 } // namespace fileapi 328 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/browser/fileapi/file_system_context.cc ('k') | webkit/browser/fileapi/file_system_file_stream_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698