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

Unified Diff: content/browser/loader/upload_data_stream_builder.h

Issue 16831010: Move some classes out of webkit/glue/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move UploadDataStreamBuilder to content/browser Created 7 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/loader/upload_data_stream_builder.h
diff --git a/content/browser/loader/upload_data_stream_builder.h b/content/browser/loader/upload_data_stream_builder.h
new file mode 100644
index 0000000000000000000000000000000000000000..0fc794f59fc117a292d9c5ba12a3b6706db7880b
--- /dev/null
+++ b/content/browser/loader/upload_data_stream_builder.h
@@ -0,0 +1,54 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_LOADER_UPLOAD_DATA_STREAM_BUILDER_H_
+#define CONTENT_BROWSER_LOADER_UPLOAD_DATA_STREAM_BUILDER_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "content/common/content_export.h"
+
+namespace base {
+class TaskRunner;
+}
+
+namespace fileapi {
+class FileSystemContext;
+}
+
+namespace net {
+class UploadDataStream;
+}
+
+namespace webkit_blob {
+class BlobStorageController;
+}
+
+namespace webkit_glue {
+class ResourceRequestBody;
+}
+
+namespace content {
+
+class CONTENT_EXPORT UploadDataStreamBuilder {
+ public:
+ // Creates a new UploadDataStream from this request body.
+ //
+ // This also resolves any blob references using the given |blob_controller|
+ // and binds those blob references to the ResourceRequestBody ensuring that
+ // the blob data remains valid for the lifetime of the ResourceRequestBody
+ // object.
+ //
+ // |file_system_context| is used to create a FileStreamReader for files with
+ // filesystem URLs. |file_task_runner| is used to perform file operations
+ // when the data gets uploaded.
+ static scoped_ptr<net::UploadDataStream> Build(
+ webkit_glue::ResourceRequestBody* body,
+ webkit_blob::BlobStorageController* blob_controller,
+ fileapi::FileSystemContext* file_system_context,
+ base::TaskRunner* file_task_runner);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_LOADER_UPLOAD_DATA_STREAM_BUILDER_H_
« 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