Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Side by Side Diff: content/common/resource_request_body.cc

Issue 2062523002: Fixing renderer's access to a file from HTTP POST (after a xsite transfer). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing Windows build. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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)
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698