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

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

Issue 1678303004: PlzNavigate: inform the renderer that a navigation is a POST (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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
« no previous file with comments | « content/common/navigation_params.h ('k') | content/public/test/render_view_test.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 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/navigation_params.h" 5 #include "content/common/navigation_params.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "content/common/service_worker/service_worker_types.h" 8 #include "content/common/service_worker/service_worker_types.h"
9 #include "content/public/common/browser_side_navigation_policy.h" 9 #include "content/public/common/browser_side_navigation_policy.h"
10 #include "content/public/common/url_constants.h" 10 #include "content/public/common/url_constants.h"
(...skipping 13 matching lines...) Expand all
24 url != GURL(content::kAboutSrcDocURL); 24 url != GURL(content::kAboutSrcDocURL);
25 } 25 }
26 26
27 CommonNavigationParams::CommonNavigationParams() 27 CommonNavigationParams::CommonNavigationParams()
28 : transition(ui::PAGE_TRANSITION_LINK), 28 : transition(ui::PAGE_TRANSITION_LINK),
29 navigation_type(FrameMsg_Navigate_Type::NORMAL), 29 navigation_type(FrameMsg_Navigate_Type::NORMAL),
30 allow_download(true), 30 allow_download(true),
31 should_replace_current_entry(false), 31 should_replace_current_entry(false),
32 report_type(FrameMsg_UILoadMetricsReportType::NO_REPORT), 32 report_type(FrameMsg_UILoadMetricsReportType::NO_REPORT),
33 lofi_state(LOFI_UNSPECIFIED), 33 lofi_state(LOFI_UNSPECIFIED),
34 navigation_start(base::TimeTicks::Now()) { 34 navigation_start(base::TimeTicks::Now()),
35 } 35 method("GET") {}
36 36
37 CommonNavigationParams::CommonNavigationParams( 37 CommonNavigationParams::CommonNavigationParams(
38 const GURL& url, 38 const GURL& url,
39 const Referrer& referrer, 39 const Referrer& referrer,
40 ui::PageTransition transition, 40 ui::PageTransition transition,
41 FrameMsg_Navigate_Type::Value navigation_type, 41 FrameMsg_Navigate_Type::Value navigation_type,
42 bool allow_download, 42 bool allow_download,
43 bool should_replace_current_entry, 43 bool should_replace_current_entry,
44 base::TimeTicks ui_timestamp, 44 base::TimeTicks ui_timestamp,
45 FrameMsg_UILoadMetricsReportType::Value report_type, 45 FrameMsg_UILoadMetricsReportType::Value report_type,
46 const GURL& base_url_for_data_url, 46 const GURL& base_url_for_data_url,
47 const GURL& history_url_for_data_url, 47 const GURL& history_url_for_data_url,
48 LoFiState lofi_state, 48 LoFiState lofi_state,
49 const base::TimeTicks& navigation_start) 49 const base::TimeTicks& navigation_start,
50 std::string method)
50 : url(url), 51 : url(url),
51 referrer(referrer), 52 referrer(referrer),
52 transition(transition), 53 transition(transition),
53 navigation_type(navigation_type), 54 navigation_type(navigation_type),
54 allow_download(allow_download), 55 allow_download(allow_download),
55 should_replace_current_entry(should_replace_current_entry), 56 should_replace_current_entry(should_replace_current_entry),
56 ui_timestamp(ui_timestamp), 57 ui_timestamp(ui_timestamp),
57 report_type(report_type), 58 report_type(report_type),
58 base_url_for_data_url(base_url_for_data_url), 59 base_url_for_data_url(base_url_for_data_url),
59 history_url_for_data_url(history_url_for_data_url), 60 history_url_for_data_url(history_url_for_data_url),
60 lofi_state(lofi_state), 61 lofi_state(lofi_state),
61 navigation_start(navigation_start) { 62 navigation_start(navigation_start),
62 } 63 method(method) {}
63 64
64 CommonNavigationParams::CommonNavigationParams( 65 CommonNavigationParams::CommonNavigationParams(
65 const CommonNavigationParams& other) = default; 66 const CommonNavigationParams& other) = default;
66 67
67 CommonNavigationParams::~CommonNavigationParams() { 68 CommonNavigationParams::~CommonNavigationParams() {
68 } 69 }
69 70
70 BeginNavigationParams::BeginNavigationParams() 71 BeginNavigationParams::BeginNavigationParams()
71 : load_flags(0), 72 : load_flags(0),
72 has_user_gesture(false), 73 has_user_gesture(false),
73 skip_service_worker(false), 74 skip_service_worker(false),
74 request_context_type(REQUEST_CONTEXT_TYPE_LOCATION) {} 75 request_context_type(REQUEST_CONTEXT_TYPE_LOCATION) {}
75 76
76 BeginNavigationParams::BeginNavigationParams( 77 BeginNavigationParams::BeginNavigationParams(
77 std::string method,
78 std::string headers, 78 std::string headers,
79 int load_flags, 79 int load_flags,
80 bool has_user_gesture, 80 bool has_user_gesture,
81 bool skip_service_worker, 81 bool skip_service_worker,
82 RequestContextType request_context_type) 82 RequestContextType request_context_type)
83 : method(method), 83 : headers(headers),
84 headers(headers),
85 load_flags(load_flags), 84 load_flags(load_flags),
86 has_user_gesture(has_user_gesture), 85 has_user_gesture(has_user_gesture),
87 skip_service_worker(skip_service_worker), 86 skip_service_worker(skip_service_worker),
88 request_context_type(request_context_type) {} 87 request_context_type(request_context_type) {}
89 88
90 BeginNavigationParams::BeginNavigationParams( 89 BeginNavigationParams::BeginNavigationParams(
91 const BeginNavigationParams& other) = default; 90 const BeginNavigationParams& other) = default;
92 91
93 StartNavigationParams::StartNavigationParams() 92 StartNavigationParams::StartNavigationParams()
94 : is_post(false), 93 :
95 #if defined(OS_ANDROID) 94 #if defined(OS_ANDROID)
96 has_user_gesture(false), 95 has_user_gesture(false),
97 #endif 96 #endif
98 transferred_request_child_id(-1), 97 transferred_request_child_id(-1),
99 transferred_request_request_id(-1) { 98 transferred_request_request_id(-1) {
100 } 99 }
101 100
102 StartNavigationParams::StartNavigationParams( 101 StartNavigationParams::StartNavigationParams(
103 bool is_post,
104 const std::string& extra_headers, 102 const std::string& extra_headers,
105 const std::vector<unsigned char>& browser_initiated_post_data, 103 const std::vector<unsigned char>& browser_initiated_post_data,
106 #if defined(OS_ANDROID) 104 #if defined(OS_ANDROID)
107 bool has_user_gesture, 105 bool has_user_gesture,
108 #endif 106 #endif
109 int transferred_request_child_id, 107 int transferred_request_child_id,
110 int transferred_request_request_id) 108 int transferred_request_request_id)
111 : is_post(is_post), 109 : extra_headers(extra_headers),
112 extra_headers(extra_headers),
113 browser_initiated_post_data(browser_initiated_post_data), 110 browser_initiated_post_data(browser_initiated_post_data),
114 #if defined(OS_ANDROID) 111 #if defined(OS_ANDROID)
115 has_user_gesture(has_user_gesture), 112 has_user_gesture(has_user_gesture),
116 #endif 113 #endif
117 transferred_request_child_id(transferred_request_child_id), 114 transferred_request_child_id(transferred_request_child_id),
118 transferred_request_request_id(transferred_request_request_id) { 115 transferred_request_request_id(transferred_request_request_id) {
119 } 116 }
120 117
121 StartNavigationParams::StartNavigationParams( 118 StartNavigationParams::StartNavigationParams(
122 const StartNavigationParams& other) = default; 119 const StartNavigationParams& other) = default;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 const RequestNavigationParams& request_params) 184 const RequestNavigationParams& request_params)
188 : common_params(common_params), 185 : common_params(common_params),
189 start_params(start_params), 186 start_params(start_params),
190 request_params(request_params) { 187 request_params(request_params) {
191 } 188 }
192 189
193 NavigationParams::~NavigationParams() { 190 NavigationParams::~NavigationParams() {
194 } 191 }
195 192
196 } // namespace content 193 } // namespace content
OLDNEW
« no previous file with comments | « content/common/navigation_params.h ('k') | content/public/test/render_view_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698