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

Side by Side Diff: webkit/tools/test_shell/simple_file_writer.cc

Issue 11787028: New FileSystemURL cracking (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Couple of nits I noticed Created 7 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 | Annotate | Revision Log
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/tools/test_shell/simple_file_writer.h" 5 #include "webkit/tools/test_shell/simple_file_writer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop_proxy.h" 10 #include "base/message_loop_proxy.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 175
176 scoped_refptr<FileSystemContext> file_system_context_; 176 scoped_refptr<FileSystemContext> file_system_context_;
177 }; 177 };
178 178
179 179
180 SimpleFileWriter::SimpleFileWriter( 180 SimpleFileWriter::SimpleFileWriter(
181 const GURL& path, 181 const GURL& path,
182 WebFileWriterClient* client, 182 WebFileWriterClient* client,
183 FileSystemContext* file_system_context) 183 FileSystemContext* file_system_context)
184 : WebFileWriterBase(path, client), 184 : WebFileWriterBase(path, client),
185 file_system_context_(file_system_context),
185 io_thread_proxy_(new IOThreadProxy(AsWeakPtr(), file_system_context)) { 186 io_thread_proxy_(new IOThreadProxy(AsWeakPtr(), file_system_context)) {
186 } 187 }
187 188
188 SimpleFileWriter::~SimpleFileWriter() { 189 SimpleFileWriter::~SimpleFileWriter() {
189 } 190 }
190 191
191 void SimpleFileWriter::DoTruncate(const GURL& path, int64 offset) { 192 void SimpleFileWriter::DoTruncate(const GURL& path, int64 offset) {
192 FileSystemURL url(path); 193 FileSystemURL url = file_system_context_->CrackURL(path);
193 io_thread_proxy_->Truncate(url, offset); 194 io_thread_proxy_->Truncate(url, offset);
194 } 195 }
195 196
196 void SimpleFileWriter::DoWrite( 197 void SimpleFileWriter::DoWrite(
197 const GURL& path, const GURL& blob_url, int64 offset) { 198 const GURL& path, const GURL& blob_url, int64 offset) {
198 FileSystemURL url(path); 199 FileSystemURL url = file_system_context_->CrackURL(path);
199 io_thread_proxy_->Write(url, blob_url, offset); 200 io_thread_proxy_->Write(url, blob_url, offset);
200 } 201 }
201 202
202 void SimpleFileWriter::DoCancel() { 203 void SimpleFileWriter::DoCancel() {
203 io_thread_proxy_->Cancel(); 204 io_thread_proxy_->Cancel();
204 } 205 }
OLDNEW
« webkit/fileapi/external_mount_points.cc ('K') | « webkit/tools/test_shell/simple_file_writer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698