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

Side by Side Diff: webkit/fileapi/test_mount_point_provider.cc

Issue 10540070: Make Isolated file system writable only if it is configured so (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added writer wiring for sandbox and test mpp Created 8 years, 6 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
« no previous file with comments | « webkit/fileapi/sandbox_mount_point_provider.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/fileapi/test_mount_point_provider.h" 5 #include "webkit/fileapi/test_mount_point_provider.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/file_util.h" 11 #include "base/file_util.h"
12 #include "base/sequenced_task_runner.h" 12 #include "base/sequenced_task_runner.h"
13 #include "webkit/fileapi/file_system_file_stream_reader.h" 13 #include "webkit/fileapi/file_system_file_stream_reader.h"
14 #include "webkit/fileapi/file_system_operation.h" 14 #include "webkit/fileapi/file_system_operation.h"
15 #include "webkit/fileapi/file_system_quota_util.h" 15 #include "webkit/fileapi/file_system_quota_util.h"
16 #include "webkit/fileapi/file_system_util.h" 16 #include "webkit/fileapi/file_system_util.h"
17 #include "webkit/fileapi/local_file_util.h" 17 #include "webkit/fileapi/local_file_util.h"
18 #include "webkit/fileapi/native_file_util.h" 18 #include "webkit/fileapi/native_file_util.h"
19 #include "webkit/fileapi/sandbox_file_stream_writer.h"
19 #include "webkit/quota/quota_manager.h" 20 #include "webkit/quota/quota_manager.h"
20 21
21 namespace fileapi { 22 namespace fileapi {
22 23
23 namespace { 24 namespace {
24 25
25 // This only supports single origin. 26 // This only supports single origin.
26 class TestFileSystemQuotaUtil : public FileSystemQuotaUtil { 27 class TestFileSystemQuotaUtil : public FileSystemQuotaUtil {
27 public: 28 public:
28 explicit TestFileSystemQuotaUtil(base::SequencedTaskRunner* task_runner) 29 explicit TestFileSystemQuotaUtil(base::SequencedTaskRunner* task_runner)
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 const GURL& url, 150 const GURL& url,
150 int64 offset, 151 int64 offset,
151 FileSystemContext* context) const { 152 FileSystemContext* context) const {
152 return new FileSystemFileStreamReader(context, url, offset); 153 return new FileSystemFileStreamReader(context, url, offset);
153 } 154 }
154 155
155 fileapi::FileStreamWriter* TestMountPointProvider::CreateFileStreamWriter( 156 fileapi::FileStreamWriter* TestMountPointProvider::CreateFileStreamWriter(
156 const GURL& url, 157 const GURL& url,
157 int64 offset, 158 int64 offset,
158 FileSystemContext* context) const { 159 FileSystemContext* context) const {
159 // TODO(kinaba,kinuko): return SandboxFileWriter when it is implemented. 160 return new SandboxFileStreamWriter(context, url, offset);
160 NOTIMPLEMENTED();
161 return NULL;
162 } 161 }
163 162
164 FileSystemQuotaUtil* TestMountPointProvider::GetQuotaUtil() { 163 FileSystemQuotaUtil* TestMountPointProvider::GetQuotaUtil() {
165 return quota_util_.get(); 164 return quota_util_.get();
166 } 165 }
167 166
168 } // namespace fileapi 167 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/sandbox_mount_point_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698