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

Side by Side Diff: webkit/chromeos/fileapi/remote_file_system_operation.cc

Issue 10870060: Removed calls to URLRequest::URLRequest in favor of URLRequestContext::CreateRequest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged Created 8 years, 3 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/chromeos/fileapi/remote_file_system_operation.h" 5 #include "webkit/chromeos/fileapi/remote_file_system_operation.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "base/platform_file.h" 9 #include "base/platform_file.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "googleurl/src/gurl.h" 11 #include "googleurl/src/gurl.h"
12 #include "net/url_request/url_request_context.h"
12 #include "webkit/chromeos/fileapi/remote_file_stream_writer.h" 13 #include "webkit/chromeos/fileapi/remote_file_stream_writer.h"
13 #include "webkit/fileapi/file_system_callback_dispatcher.h" 14 #include "webkit/fileapi/file_system_callback_dispatcher.h"
14 #include "webkit/fileapi/file_system_url.h" 15 #include "webkit/fileapi/file_system_url.h"
15 #include "webkit/fileapi/file_writer_delegate.h" 16 #include "webkit/fileapi/file_writer_delegate.h"
16 17
17 using fileapi::FileSystemURL; 18 using fileapi::FileSystemURL;
18 19
19 namespace chromeos { 20 namespace chromeos {
20 21
21 RemoteFileSystemOperation::RemoteFileSystemOperation( 22 RemoteFileSystemOperation::RemoteFileSystemOperation(
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 file_writer_delegate_.reset( 120 file_writer_delegate_.reset(
120 new fileapi::FileWriterDelegate( 121 new fileapi::FileWriterDelegate(
121 base::Bind(&RemoteFileSystemOperation::DidWrite, 122 base::Bind(&RemoteFileSystemOperation::DidWrite,
122 // FileWriterDelegate is owned by |this|. So Unretained. 123 // FileWriterDelegate is owned by |this|. So Unretained.
123 base::Unretained(this)), 124 base::Unretained(this)),
124 scoped_ptr<fileapi::FileStreamWriter>( 125 scoped_ptr<fileapi::FileStreamWriter>(
125 new fileapi::RemoteFileStreamWriter(remote_proxy_, 126 new fileapi::RemoteFileStreamWriter(remote_proxy_,
126 url, 127 url,
127 offset)))); 128 offset))));
128 129
129 scoped_ptr<net::URLRequest> blob_request(new net::URLRequest( 130 scoped_ptr<net::URLRequest> blob_request(url_request_context->CreateRequest(
130 blob_url, file_writer_delegate_.get(), url_request_context)); 131 blob_url, file_writer_delegate_.get()));
131 132
132 file_writer_delegate_->Start(blob_request.Pass()); 133 file_writer_delegate_->Start(blob_request.Pass());
133 } 134 }
134 135
135 void RemoteFileSystemOperation::Truncate(const FileSystemURL& url, 136 void RemoteFileSystemOperation::Truncate(const FileSystemURL& url,
136 int64 length, 137 int64 length,
137 const StatusCallback& callback) { 138 const StatusCallback& callback) {
138 DCHECK(SetPendingOperationType(kOperationTruncate)); 139 DCHECK(SetPendingOperationType(kOperationTruncate));
139 140
140 remote_proxy_->Truncate(url, length, 141 remote_proxy_->Truncate(url, length,
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 309
309 void RemoteFileSystemOperation::DidOpenFile( 310 void RemoteFileSystemOperation::DidOpenFile(
310 const OpenFileCallback& callback, 311 const OpenFileCallback& callback,
311 base::PlatformFileError result, 312 base::PlatformFileError result,
312 base::PlatformFile file, 313 base::PlatformFile file,
313 base::ProcessHandle peer_handle) { 314 base::ProcessHandle peer_handle) {
314 callback.Run(result, file, peer_handle); 315 callback.Run(result, file, peer_handle);
315 } 316 }
316 317
317 } // namespace chromeos 318 } // namespace chromeos
OLDNEW
« no previous file with comments | « webkit/blob/blob_url_request_job_unittest.cc ('k') | webkit/fileapi/file_system_dir_url_request_job_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698