| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CONTENT_COMMON_RESOURCE_REQUEST_BODY_IMPL_H_ | 5 #ifndef CONTENT_COMMON_RESOURCE_REQUEST_BODY_IMPL_H_ |
| 6 #define CONTENT_COMMON_RESOURCE_REQUEST_BODY_IMPL_H_ | 6 #define CONTENT_COMMON_RESOURCE_REQUEST_BODY_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "base/supports_user_data.h" | |
| 15 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
| 16 #include "content/public/common/resource_request_body.h" | 15 #include "content/public/common/resource_request_body.h" |
| 17 #include "storage/common/data_element.h" | 16 #include "storage/common/data_element.h" |
| 18 #include "url/gurl.h" | 17 #include "url/gurl.h" |
| 19 | 18 |
| 20 namespace base { | 19 namespace base { |
| 21 class FilePath; | 20 class FilePath; |
| 22 } | 21 } |
| 23 | 22 |
| 24 namespace content { | 23 namespace content { |
| 25 | 24 |
| 26 // A struct used to represent upload data. The data field is populated by | 25 // A struct used to represent upload data. The data field is populated by |
| 27 // WebURLLoader from the data given as WebHTTPBody. | 26 // WebURLLoader from the data given as WebHTTPBody. |
| 28 class CONTENT_EXPORT ResourceRequestBodyImpl : public ResourceRequestBody, | 27 class CONTENT_EXPORT ResourceRequestBodyImpl : public ResourceRequestBody { |
| 29 public base::SupportsUserData { | |
| 30 public: | 28 public: |
| 31 typedef storage::DataElement Element; | 29 typedef storage::DataElement Element; |
| 32 | 30 |
| 33 ResourceRequestBodyImpl(); | 31 ResourceRequestBodyImpl(); |
| 34 | 32 |
| 35 void AppendBytes(const char* bytes, int bytes_len); | 33 void AppendBytes(const char* bytes, int bytes_len); |
| 36 void AppendFileRange(const base::FilePath& file_path, | 34 void AppendFileRange(const base::FilePath& file_path, |
| 37 uint64_t offset, | 35 uint64_t offset, |
| 38 uint64_t length, | 36 uint64_t length, |
| 39 const base::Time& expected_modification_time); | 37 const base::Time& expected_modification_time); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 int64_t identifier_; | 70 int64_t identifier_; |
| 73 | 71 |
| 74 bool contains_sensitive_info_; | 72 bool contains_sensitive_info_; |
| 75 | 73 |
| 76 DISALLOW_COPY_AND_ASSIGN(ResourceRequestBodyImpl); | 74 DISALLOW_COPY_AND_ASSIGN(ResourceRequestBodyImpl); |
| 77 }; | 75 }; |
| 78 | 76 |
| 79 } // namespace content | 77 } // namespace content |
| 80 | 78 |
| 81 #endif // CONTENT_COMMON_RESOURCE_REQUEST_BODY_IMPL_H_ | 79 #endif // CONTENT_COMMON_RESOURCE_REQUEST_BODY_IMPL_H_ |
| OLD | NEW |