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

Unified Diff: webkit/common/resource_request_body.cc

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
« no previous file with comments | « webkit/common/resource_request_body.h ('k') | webkit/common/resource_response_info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/common/resource_request_body.cc
diff --git a/webkit/common/resource_request_body.cc b/webkit/common/resource_request_body.cc
new file mode 100644
index 0000000000000000000000000000000000000000..58e95d27618d87e742c9446126291f70e4b101c5
--- /dev/null
+++ b/webkit/common/resource_request_body.cc
@@ -0,0 +1,45 @@
+// 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.
+
+#include "webkit/common/resource_request_body.h"
+
+namespace webkit_glue {
+
+ResourceRequestBody::ResourceRequestBody()
+ : identifier_(0) {
+}
+
+void ResourceRequestBody::AppendBytes(const char* bytes, int bytes_len) {
+ if (bytes_len > 0) {
+ elements_.push_back(Element());
+ elements_.back().SetToBytes(bytes, bytes_len);
+ }
+}
+
+void ResourceRequestBody::AppendFileRange(
+ const base::FilePath& file_path,
+ uint64 offset, uint64 length,
+ const base::Time& expected_modification_time) {
+ elements_.push_back(Element());
+ elements_.back().SetToFilePathRange(file_path, offset, length,
+ expected_modification_time);
+}
+
+void ResourceRequestBody::AppendBlob(const GURL& blob_url) {
+ elements_.push_back(Element());
+ elements_.back().SetToBlobUrl(blob_url);
+}
+
+void ResourceRequestBody::AppendFileSystemFileRange(
+ const GURL& url, uint64 offset, uint64 length,
+ const base::Time& expected_modification_time) {
+ elements_.push_back(Element());
+ elements_.back().SetToFileSystemUrlRange(url, offset, length,
+ expected_modification_time);
+}
+
+ResourceRequestBody::~ResourceRequestBody() {
+}
+
+} // namespace webkit_glue
« no previous file with comments | « webkit/common/resource_request_body.h ('k') | webkit/common/resource_response_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698