| 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 #include "content/common/resource_request_body_impl.h" | 5 #include "content/common/resource_request_body_impl.h" |
| 6 | 6 |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "content/common/page_state_serialization.h" | 8 #include "content/common/page_state_serialization.h" |
| 9 | 9 |
| 10 using blink::WebHTTPBody; | 10 using blink::WebHTTPBody; |
| 11 using blink::WebString; | 11 using blink::WebString; |
| 12 | 12 |
| 13 namespace content { | 13 namespace content { |
| 14 | 14 |
| 15 ResourceRequestBodyImpl::ResourceRequestBodyImpl() : identifier_(0) {} | 15 ResourceRequestBodyImpl::ResourceRequestBodyImpl() |
| 16 : identifier_(0), |
| 17 contains_sensitive_info_(false) {} |
| 16 | 18 |
| 17 void ResourceRequestBodyImpl::AppendBytes(const char* bytes, int bytes_len) { | 19 void ResourceRequestBodyImpl::AppendBytes(const char* bytes, int bytes_len) { |
| 18 if (bytes_len > 0) { | 20 if (bytes_len > 0) { |
| 19 elements_.push_back(Element()); | 21 elements_.push_back(Element()); |
| 20 elements_.back().SetToBytes(bytes, bytes_len); | 22 elements_.back().SetToBytes(bytes, bytes_len); |
| 21 } | 23 } |
| 22 } | 24 } |
| 23 | 25 |
| 24 void ResourceRequestBodyImpl::AppendFileRange( | 26 void ResourceRequestBodyImpl::AppendFileRange( |
| 25 const base::FilePath& file_path, | 27 const base::FilePath& file_path, |
| (...skipping 26 matching lines...) Expand all Loading... |
| 52 for (const auto& element : *elements()) { | 54 for (const auto& element : *elements()) { |
| 53 if (element.type() == Element::TYPE_FILE) | 55 if (element.type() == Element::TYPE_FILE) |
| 54 result.push_back(element.path()); | 56 result.push_back(element.path()); |
| 55 } | 57 } |
| 56 return result; | 58 return result; |
| 57 } | 59 } |
| 58 | 60 |
| 59 ResourceRequestBodyImpl::~ResourceRequestBodyImpl() {} | 61 ResourceRequestBodyImpl::~ResourceRequestBodyImpl() {} |
| 60 | 62 |
| 61 } // namespace content | 63 } // namespace content |
| OLD | NEW |