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

Side by Side Diff: content/child/request_extra_data.cc

Issue 203853003: Merge weburlrequest_extradata_impl.cc/h into content/child/request_extra_data.cc/h (attempt #2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: heap allocate in render_frame_impl.cc Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « content/child/request_extra_data.h ('k') | content/child/resource_dispatcher_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/child/request_extra_data.h" 5 #include "content/child/request_extra_data.h"
6 6
7 #include "content/common/service_worker/service_worker_types.h"
8 #include "ipc/ipc_message.h"
9
7 using blink::WebString; 10 using blink::WebString;
8 11
9 namespace content { 12 namespace content {
10 13
11 RequestExtraData::RequestExtraData( 14 RequestExtraData::RequestExtraData() {
12 blink::WebPageVisibilityState visibility_state, 15 set_visibility_state(blink::WebPageVisibilityStateVisible);
jam 2014/03/20 17:16:43 use initialization list here, i.e. RequestExtraDat
13 const WebString& custom_user_agent, 16 set_custom_user_agent(blink::WebString());
14 bool was_after_preconnect_request, 17 set_was_after_preconnect_request(false);
15 int render_frame_id, 18 set_render_frame_id(MSG_ROUTING_NONE);
16 bool is_main_frame, 19 set_is_main_frame(true);
17 const GURL& frame_origin, 20 set_frame_origin(GURL());
18 bool parent_is_main_frame, 21 set_parent_is_main_frame(false);
19 int parent_render_frame_id, 22 set_parent_render_frame_id(-1);
20 bool allow_download, 23 set_allow_download(true);
21 PageTransition transition_type, 24 set_transition_type(PAGE_TRANSITION_LINK);
22 bool should_replace_current_entry, 25 set_should_replace_current_entry(false);
23 int transferred_request_child_id, 26 set_transferred_request_child_id(-1);
24 int transferred_request_request_id, 27 set_transferred_request_request_id(-1);
25 int service_worker_provider_id) 28 set_service_worker_provider_id(kInvalidServiceWorkerProviderId);
26 : webkit_glue::WebURLRequestExtraDataImpl(custom_user_agent, 29 }
27 was_after_preconnect_request), 30
28 visibility_state_(visibility_state), 31 void RequestExtraData::set_visibility_state(
jam 2014/03/20 17:16:43 since these are simple setters, by convention we i
29 render_frame_id_(render_frame_id), 32 blink::WebPageVisibilityState visibility_state) {
30 is_main_frame_(is_main_frame), 33 visibility_state_ = visibility_state;
31 frame_origin_(frame_origin), 34 }
32 parent_is_main_frame_(parent_is_main_frame), 35
33 parent_render_frame_id_(parent_render_frame_id), 36 void RequestExtraData::set_render_frame_id(int render_frame_id) {
34 allow_download_(allow_download), 37 render_frame_id_ = render_frame_id;
35 transition_type_(transition_type), 38 }
36 should_replace_current_entry_(should_replace_current_entry), 39
37 transferred_request_child_id_(transferred_request_child_id), 40 void RequestExtraData::set_is_main_frame(bool is_main_frame) {
38 transferred_request_request_id_(transferred_request_request_id), 41 is_main_frame_ = is_main_frame;
39 service_worker_provider_id_(service_worker_provider_id) { 42 }
43
44 void RequestExtraData::set_frame_origin(const GURL& frame_origin) {
45 frame_origin_ = frame_origin;
46 }
47
48 void RequestExtraData::set_parent_is_main_frame(bool parent_is_main_frame) {
49 parent_is_main_frame_ = parent_is_main_frame;
50 }
51
52 void RequestExtraData::set_parent_render_frame_id(int parent_render_frame_id) {
53 parent_render_frame_id_ = parent_render_frame_id;
54 }
55
56 void RequestExtraData::set_allow_download(bool allow_download) {
57 allow_download_ = allow_download;
58 }
59
60 void RequestExtraData::set_transition_type(PageTransition transition_type) {
61 transition_type_ = transition_type;
62 }
63
64 void RequestExtraData::set_should_replace_current_entry(
65 bool should_replace_current_entry) {
66 should_replace_current_entry_ = should_replace_current_entry;
67 }
68
69 void RequestExtraData::set_transferred_request_child_id(
70 int transferred_request_child_id) {
71 transferred_request_child_id_ = transferred_request_child_id;
72 }
73
74 void RequestExtraData::set_transferred_request_request_id(
75 int transferred_request_request_id) {
76 transferred_request_request_id_ = transferred_request_request_id;
77 }
78
79 void RequestExtraData::set_service_worker_provider_id(
80 int service_worker_provider_id) {
81 service_worker_provider_id_ = service_worker_provider_id;
82 }
83
84 void RequestExtraData::set_custom_user_agent(
85 const blink::WebString& custom_user_agent) {
86 custom_user_agent_ = custom_user_agent;
87 }
88
89 void RequestExtraData::set_was_after_preconnect_request(
90 bool was_after_preconnect_request) {
91 was_after_preconnect_request_ = was_after_preconnect_request;
40 } 92 }
41 93
42 RequestExtraData::~RequestExtraData() { 94 RequestExtraData::~RequestExtraData() {
43 } 95 }
44 96
45 } // namespace content 97 } // namespace content
OLDNEW
« no previous file with comments | « content/child/request_extra_data.h ('k') | content/child/resource_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698