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

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

Issue 367653002: Add a FrameHostMsg_BeginNavigation IPC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added unit test + fixed bug in parent_is_render_frame_computation Created 6 years, 5 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 namespace content { 7 namespace content {
8 8
9 ResourceRequestBody::ResourceRequestBody() 9 ResourceRequestBody::ResourceRequestBody()
10 : identifier_(0) { 10 : identifier_(0) {
11 } 11 }
12 12
13 ResourceRequestBody::~ResourceRequestBody() {
14 }
15
13 void ResourceRequestBody::AppendBytes(const char* bytes, int bytes_len) { 16 void ResourceRequestBody::AppendBytes(const char* bytes, int bytes_len) {
14 if (bytes_len > 0) { 17 if (bytes_len > 0) {
15 elements_.push_back(Element()); 18 elements_.push_back(Element());
16 elements_.back().SetToBytes(bytes, bytes_len); 19 elements_.back().SetToBytes(bytes, bytes_len);
17 } 20 }
18 } 21 }
19 22
20 void ResourceRequestBody::AppendFileRange( 23 void ResourceRequestBody::AppendFileRange(
21 const base::FilePath& file_path, 24 const base::FilePath& file_path,
22 uint64 offset, uint64 length, 25 uint64 offset, uint64 length,
23 const base::Time& expected_modification_time) { 26 const base::Time& expected_modification_time) {
24 elements_.push_back(Element()); 27 elements_.push_back(Element());
25 elements_.back().SetToFilePathRange(file_path, offset, length, 28 elements_.back().SetToFilePathRange(file_path, offset, length,
26 expected_modification_time); 29 expected_modification_time);
27 } 30 }
28 31
29 void ResourceRequestBody::AppendBlob(const std::string& uuid) { 32 void ResourceRequestBody::AppendBlob(const std::string& uuid) {
30 elements_.push_back(Element()); 33 elements_.push_back(Element());
31 elements_.back().SetToBlob(uuid); 34 elements_.back().SetToBlob(uuid);
32 } 35 }
33 36
34 void ResourceRequestBody::AppendFileSystemFileRange( 37 void ResourceRequestBody::AppendFileSystemFileRange(
35 const GURL& url, uint64 offset, uint64 length, 38 const GURL& url, uint64 offset, uint64 length,
36 const base::Time& expected_modification_time) { 39 const base::Time& expected_modification_time) {
37 elements_.push_back(Element()); 40 elements_.push_back(Element());
38 elements_.back().SetToFileSystemUrlRange(url, offset, length, 41 elements_.back().SetToFileSystemUrlRange(url, offset, length,
39 expected_modification_time); 42 expected_modification_time);
40 } 43 }
41 44
42 ResourceRequestBody::~ResourceRequestBody() {
43 }
44
45 } // namespace content 45 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698