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.h" | 5 #include "content/common/resource_request_body.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 30 matching lines...) Expand all Loading... | |
41 void ResourceRequestBody::AppendFileSystemFileRange( | 41 void ResourceRequestBody::AppendFileSystemFileRange( |
42 const GURL& url, | 42 const GURL& url, |
43 uint64_t offset, | 43 uint64_t offset, |
44 uint64_t length, | 44 uint64_t length, |
45 const base::Time& expected_modification_time) { | 45 const base::Time& expected_modification_time) { |
46 elements_.push_back(Element()); | 46 elements_.push_back(Element()); |
47 elements_.back().SetToFileSystemUrlRange(url, offset, length, | 47 elements_.back().SetToFileSystemUrlRange(url, offset, length, |
48 expected_modification_time); | 48 expected_modification_time); |
49 } | 49 } |
50 | 50 |
51 std::vector<base::FilePath> ResourceRequestBody::GetReferencedFiles() const { | |
52 std::vector<base::FilePath> result; | |
53 for (const auto& element : *elements()) { | |
54 if (element.type() == Element::TYPE_FILE) | |
Łukasz Anforowicz
2016/06/14 01:07:17
AFAICT this is the only type that can refer to fil
Charlie Reis
2016/06/16 20:22:12
Yeah, filesystem: URLs are associated with origin-
Łukasz Anforowicz
2016/06/16 22:05:04
Thanks for looking into this.
Łukasz Anforowicz
2016/06/16 23:33:55
Actually, I think we can land the current CL as-is
Łukasz Anforowicz
2016/06/17 00:10:32
Hmmm... I think that the only way to refer to file
Charlie Reis
2016/06/17 07:13:35
Sorry for the confusion-- I was agreeing with your
Łukasz Anforowicz
2016/06/17 16:44:47
Ok.
| |
55 result.push_back(element.path()); | |
56 } | |
57 return result; | |
58 } | |
59 | |
51 ResourceRequestBody::~ResourceRequestBody() { | 60 ResourceRequestBody::~ResourceRequestBody() { |
52 } | 61 } |
53 | 62 |
54 } // namespace content | 63 } // namespace content |
OLD | NEW |