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

Side by Side Diff: content/browser/loader/upload_data_stream_builder.h

Issue 492603002: Move SetUserData of BlobDataHandles from UploadDataStreamBuilder to ResourceDispatcherHostImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added comments in upload_data_stream_builder.h Created 6 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
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 #ifndef CONTENT_BROWSER_LOADER_UPLOAD_DATA_STREAM_BUILDER_H_ 5 #ifndef CONTENT_BROWSER_LOADER_UPLOAD_DATA_STREAM_BUILDER_H_
6 #define CONTENT_BROWSER_LOADER_UPLOAD_DATA_STREAM_BUILDER_H_ 6 #define CONTENT_BROWSER_LOADER_UPLOAD_DATA_STREAM_BUILDER_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
10 10
(...skipping 14 matching lines...) Expand all
25 } 25 }
26 26
27 namespace content { 27 namespace content {
28 28
29 class ResourceRequestBody; 29 class ResourceRequestBody;
30 30
31 class CONTENT_EXPORT UploadDataStreamBuilder { 31 class CONTENT_EXPORT UploadDataStreamBuilder {
32 public: 32 public:
33 // Creates a new UploadDataStream from this request body. 33 // Creates a new UploadDataStream from this request body.
34 // 34 //
35 // This also resolves any blob references using the given |blob_context| 35 // If |body| contains any blob references, the caller is responsible for
36 // and binds those blob references to the ResourceRequestBody ensuring that 36 // making sure them outlive the returned value of UploadDataStream. We do this
37 // the blob data remains valid for the lifetime of the ResourceRequestBody 37 // by binding the BlobDataHandles of them to ResourceRequestBody in
38 // object. 38 // ResourceDispatcherHostImpl::BeginRequest().
39 // 39 //
40 // |file_system_context| is used to create a FileStreamReader for files with 40 // |file_system_context| is used to create a FileStreamReader for files with
41 // filesystem URLs. |file_task_runner| is used to perform file operations 41 // filesystem URLs. |file_task_runner| is used to perform file operations
42 // when the data gets uploaded. 42 // when the data gets uploaded.
43 static scoped_ptr<net::UploadDataStream> Build( 43 static scoped_ptr<net::UploadDataStream> Build(
44 ResourceRequestBody* body, 44 ResourceRequestBody* body,
45 storage::BlobStorageContext* blob_context, 45 storage::BlobStorageContext* blob_context,
46 storage::FileSystemContext* file_system_context, 46 storage::FileSystemContext* file_system_context,
47 base::TaskRunner* file_task_runner); 47 base::TaskRunner* file_task_runner);
48 }; 48 };
49 49
50 } // namespace content 50 } // namespace content
51 51
52 #endif // CONTENT_BROWSER_LOADER_UPLOAD_DATA_STREAM_BUILDER_H_ 52 #endif // CONTENT_BROWSER_LOADER_UPLOAD_DATA_STREAM_BUILDER_H_
OLDNEW
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.cc ('k') | content/browser/loader/upload_data_stream_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698