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; |
(...skipping 28 matching lines...) Expand all Loading... |
39 void ResourceRequestBodyImpl::AppendFileSystemFileRange( | 39 void ResourceRequestBodyImpl::AppendFileSystemFileRange( |
40 const GURL& url, | 40 const GURL& url, |
41 uint64_t offset, | 41 uint64_t offset, |
42 uint64_t length, | 42 uint64_t length, |
43 const base::Time& expected_modification_time) { | 43 const base::Time& expected_modification_time) { |
44 elements_.push_back(Element()); | 44 elements_.push_back(Element()); |
45 elements_.back().SetToFileSystemUrlRange(url, offset, length, | 45 elements_.back().SetToFileSystemUrlRange(url, offset, length, |
46 expected_modification_time); | 46 expected_modification_time); |
47 } | 47 } |
48 | 48 |
| 49 std::vector<base::FilePath> ResourceRequestBodyImpl::GetReferencedFiles() |
| 50 const { |
| 51 std::vector<base::FilePath> result; |
| 52 for (const auto& element : *elements()) { |
| 53 if (element.type() == Element::TYPE_FILE) |
| 54 result.push_back(element.path()); |
| 55 } |
| 56 return result; |
| 57 } |
| 58 |
49 ResourceRequestBodyImpl::~ResourceRequestBodyImpl() {} | 59 ResourceRequestBodyImpl::~ResourceRequestBodyImpl() {} |
50 | 60 |
51 } // namespace content | 61 } // namespace content |
OLD | NEW |