OLD | NEW |
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 #ifndef WEBKIT_GLUE_RESOURCE_REQUEST_BODY_H_ | 5 #ifndef WEBKIT_GLUE_RESOURCE_REQUEST_BODY_H_ |
6 #define WEBKIT_GLUE_RESOURCE_REQUEST_BODY_H_ | 6 #define WEBKIT_GLUE_RESOURCE_REQUEST_BODY_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 public: | 32 public: |
33 typedef webkit_base::DataElement Element; | 33 typedef webkit_base::DataElement Element; |
34 | 34 |
35 ResourceRequestBody(); | 35 ResourceRequestBody(); |
36 | 36 |
37 void AppendBytes(const char* bytes, int bytes_len); | 37 void AppendBytes(const char* bytes, int bytes_len); |
38 void AppendFileRange(const FilePath& file_path, | 38 void AppendFileRange(const FilePath& file_path, |
39 uint64 offset, uint64 length, | 39 uint64 offset, uint64 length, |
40 const base::Time& expected_modification_time); | 40 const base::Time& expected_modification_time); |
41 void AppendBlob(const GURL& blob_url); | 41 void AppendBlob(const GURL& blob_url); |
| 42 void AppendFileSystemFileRange(const GURL& url, uint64 offset, uint64 length, |
| 43 const base::Time& expected_modification_time); |
42 | 44 |
43 // Creates a new UploadData from this request body. This also resolves | 45 // Creates a new UploadData from this request body. This also resolves |
44 // any blob references using given |blob_controller|. | 46 // any blob references using given |blob_controller|. |
45 // TODO(kinuko): Clean up this hack. | 47 // TODO(kinuko): Clean up this hack. |
46 net::UploadData* ResolveElementsAndCreateUploadData( | 48 net::UploadData* ResolveElementsAndCreateUploadData( |
47 webkit_blob::BlobStorageController* blob_controller); | 49 webkit_blob::BlobStorageController* blob_controller); |
48 | 50 |
49 const std::vector<Element>* elements() const { return &elements_; } | 51 const std::vector<Element>* elements() const { return &elements_; } |
50 std::vector<Element>* elements_mutable() { return &elements_; } | 52 std::vector<Element>* elements_mutable() { return &elements_; } |
51 void swap_elements(std::vector<Element>* elements) { | 53 void swap_elements(std::vector<Element>* elements) { |
(...skipping 18 matching lines...) Expand all Loading... |
70 | 72 |
71 std::vector<Element> elements_; | 73 std::vector<Element> elements_; |
72 int64 identifier_; | 74 int64 identifier_; |
73 | 75 |
74 DISALLOW_COPY_AND_ASSIGN(ResourceRequestBody); | 76 DISALLOW_COPY_AND_ASSIGN(ResourceRequestBody); |
75 }; | 77 }; |
76 | 78 |
77 } // namespace webkit_glue | 79 } // namespace webkit_glue |
78 | 80 |
79 #endif // WEBKIT_GLUE_RESOURCE_REQUEST_BODY_H_ | 81 #endif // WEBKIT_GLUE_RESOURCE_REQUEST_BODY_H_ |
OLD | NEW |