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

Side by Side Diff: webkit/common/resource_request_body.cc

Issue 23223003: Chromium Blob hacking (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
« no previous file with comments | « webkit/common/resource_request_body.h ('k') | webkit/storage_browser.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "webkit/common/resource_request_body.h" 5 #include "webkit/common/resource_request_body.h"
6 6
7 namespace webkit_glue { 7 namespace webkit_glue {
8 8
9 ResourceRequestBody::ResourceRequestBody() 9 ResourceRequestBody::ResourceRequestBody()
10 : identifier_(0) { 10 : identifier_(0) {
11 } 11 }
12 12
13 void ResourceRequestBody::AppendBytes(const char* bytes, int bytes_len) { 13 void ResourceRequestBody::AppendBytes(const char* bytes, int bytes_len) {
14 if (bytes_len > 0) { 14 if (bytes_len > 0) {
15 elements_.push_back(Element()); 15 elements_.push_back(Element());
16 elements_.back().SetToBytes(bytes, bytes_len); 16 elements_.back().SetToBytes(bytes, bytes_len);
17 } 17 }
18 } 18 }
19 19
20 void ResourceRequestBody::AppendFileRange( 20 void ResourceRequestBody::AppendFileRange(
21 const base::FilePath& file_path, 21 const base::FilePath& file_path,
22 uint64 offset, uint64 length, 22 uint64 offset, uint64 length,
23 const base::Time& expected_modification_time) { 23 const base::Time& expected_modification_time) {
24 elements_.push_back(Element()); 24 elements_.push_back(Element());
25 elements_.back().SetToFilePathRange(file_path, offset, length, 25 elements_.back().SetToFilePathRange(file_path, offset, length,
26 expected_modification_time); 26 expected_modification_time);
27 } 27 }
28 28
29 void ResourceRequestBody::AppendBlob(const GURL& blob_url) { 29 void ResourceRequestBody::AppendBlobDeprecated(const GURL& blob_url) {
30 elements_.push_back(Element()); 30 elements_.push_back(Element());
31 elements_.back().SetToBlobUrl(blob_url); 31 elements_.back().SetToBlobUrl(blob_url);
32 } 32 }
33 33
34 void ResourceRequestBody::AppendBlob(const std::string& uuid) {
35 elements_.push_back(Element());
36 elements_.back().SetToBlob(uuid);
37 }
38
34 void ResourceRequestBody::AppendFileSystemFileRange( 39 void ResourceRequestBody::AppendFileSystemFileRange(
35 const GURL& url, uint64 offset, uint64 length, 40 const GURL& url, uint64 offset, uint64 length,
36 const base::Time& expected_modification_time) { 41 const base::Time& expected_modification_time) {
37 elements_.push_back(Element()); 42 elements_.push_back(Element());
38 elements_.back().SetToFileSystemUrlRange(url, offset, length, 43 elements_.back().SetToFileSystemUrlRange(url, offset, length,
39 expected_modification_time); 44 expected_modification_time);
40 } 45 }
41 46
42 ResourceRequestBody::~ResourceRequestBody() { 47 ResourceRequestBody::~ResourceRequestBody() {
43 } 48 }
44 49
45 } // namespace webkit_glue 50 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/common/resource_request_body.h ('k') | webkit/storage_browser.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698