OLD | NEW |
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 WEBKIT_COMMON_RESOURCE_REQUEST_BODY_H_ | 5 #ifndef WEBKIT_COMMON_RESOURCE_REQUEST_BODY_H_ |
6 #define WEBKIT_COMMON_RESOURCE_REQUEST_BODY_H_ | 6 #define WEBKIT_COMMON_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 19 matching lines...) Expand all Loading... |
30 | 30 |
31 ResourceRequestBody(); | 31 ResourceRequestBody(); |
32 | 32 |
33 void AppendBytes(const char* bytes, int bytes_len); | 33 void AppendBytes(const char* bytes, int bytes_len); |
34 void AppendFileRange(const base::FilePath& file_path, | 34 void AppendFileRange(const base::FilePath& file_path, |
35 uint64 offset, uint64 length, | 35 uint64 offset, uint64 length, |
36 const base::Time& expected_modification_time); | 36 const base::Time& expected_modification_time); |
37 void AppendBlob(const std::string& uuid); | 37 void AppendBlob(const std::string& uuid); |
38 void AppendFileSystemFileRange(const GURL& url, uint64 offset, uint64 length, | 38 void AppendFileSystemFileRange(const GURL& url, uint64 offset, uint64 length, |
39 const base::Time& expected_modification_time); | 39 const base::Time& expected_modification_time); |
| 40 #if defined(OS_ANDROID) |
| 41 void AppendContentUrlRange(const GURL& url, uint64 offset, uint64 length, |
| 42 const base::Time& expected_modification_time); |
| 43 #endif |
40 | 44 |
41 const std::vector<Element>* elements() const { return &elements_; } | 45 const std::vector<Element>* elements() const { return &elements_; } |
42 std::vector<Element>* elements_mutable() { return &elements_; } | 46 std::vector<Element>* elements_mutable() { return &elements_; } |
43 void swap_elements(std::vector<Element>* elements) { | 47 void swap_elements(std::vector<Element>* elements) { |
44 elements_.swap(*elements); | 48 elements_.swap(*elements); |
45 } | 49 } |
46 | 50 |
47 // Identifies a particular upload instance, which is used by the cache to | 51 // Identifies a particular upload instance, which is used by the cache to |
48 // formulate a cache key. This value should be unique across browser | 52 // formulate a cache key. This value should be unique across browser |
49 // sessions. A value of 0 is used to indicate an unspecified identifier. | 53 // sessions. A value of 0 is used to indicate an unspecified identifier. |
50 void set_identifier(int64 id) { identifier_ = id; } | 54 void set_identifier(int64 id) { identifier_ = id; } |
51 int64 identifier() const { return identifier_; } | 55 int64 identifier() const { return identifier_; } |
52 | 56 |
53 private: | 57 private: |
54 friend class base::RefCounted<ResourceRequestBody>; | 58 friend class base::RefCounted<ResourceRequestBody>; |
55 virtual ~ResourceRequestBody(); | 59 virtual ~ResourceRequestBody(); |
56 | 60 |
57 std::vector<Element> elements_; | 61 std::vector<Element> elements_; |
58 int64 identifier_; | 62 int64 identifier_; |
59 | 63 |
60 DISALLOW_COPY_AND_ASSIGN(ResourceRequestBody); | 64 DISALLOW_COPY_AND_ASSIGN(ResourceRequestBody); |
61 }; | 65 }; |
62 | 66 |
63 } // namespace webkit_glue | 67 } // namespace webkit_glue |
64 | 68 |
65 #endif // WEBKIT_COMMON_RESOURCE_REQUEST_BODY_H_ | 69 #endif // WEBKIT_COMMON_RESOURCE_REQUEST_BODY_H_ |
OLD | NEW |