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

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

Issue 2756913002: Revert of PlzNavigate: Enforce 'frame-src' CSP on the browser. (Closed)
Patch Set: Created 3 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/browser/navigation_handle.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 "base/logging.h" 7 #include "base/logging.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "content/common/service_worker/service_worker_types.h" 9 #include "content/common/service_worker/service_worker_types.h"
10 #include "content/public/common/appcache_info.h" 10 #include "content/public/common/appcache_info.h"
(...skipping 25 matching lines...) Expand all
36 SourceLocation::~SourceLocation() {} 36 SourceLocation::~SourceLocation() {}
37 37
38 CommonNavigationParams::CommonNavigationParams() 38 CommonNavigationParams::CommonNavigationParams()
39 : transition(ui::PAGE_TRANSITION_LINK), 39 : transition(ui::PAGE_TRANSITION_LINK),
40 navigation_type(FrameMsg_Navigate_Type::DIFFERENT_DOCUMENT), 40 navigation_type(FrameMsg_Navigate_Type::DIFFERENT_DOCUMENT),
41 allow_download(true), 41 allow_download(true),
42 should_replace_current_entry(false), 42 should_replace_current_entry(false),
43 report_type(FrameMsg_UILoadMetricsReportType::NO_REPORT), 43 report_type(FrameMsg_UILoadMetricsReportType::NO_REPORT),
44 previews_state(PREVIEWS_UNSPECIFIED), 44 previews_state(PREVIEWS_UNSPECIFIED),
45 navigation_start(base::TimeTicks::Now()), 45 navigation_start(base::TimeTicks::Now()),
46 method("GET"), 46 method("GET") {}
47 should_check_main_world_csp(CSPDisposition::CHECK) {}
48 47
49 CommonNavigationParams::CommonNavigationParams( 48 CommonNavigationParams::CommonNavigationParams(
50 const GURL& url, 49 const GURL& url,
51 const Referrer& referrer, 50 const Referrer& referrer,
52 ui::PageTransition transition, 51 ui::PageTransition transition,
53 FrameMsg_Navigate_Type::Value navigation_type, 52 FrameMsg_Navigate_Type::Value navigation_type,
54 bool allow_download, 53 bool allow_download,
55 bool should_replace_current_entry, 54 bool should_replace_current_entry,
56 base::TimeTicks ui_timestamp, 55 base::TimeTicks ui_timestamp,
57 FrameMsg_UILoadMetricsReportType::Value report_type, 56 FrameMsg_UILoadMetricsReportType::Value report_type,
58 const GURL& base_url_for_data_url, 57 const GURL& base_url_for_data_url,
59 const GURL& history_url_for_data_url, 58 const GURL& history_url_for_data_url,
60 PreviewsState previews_state, 59 PreviewsState previews_state,
61 const base::TimeTicks& navigation_start, 60 const base::TimeTicks& navigation_start,
62 std::string method, 61 std::string method,
63 const scoped_refptr<ResourceRequestBodyImpl>& post_data, 62 const scoped_refptr<ResourceRequestBodyImpl>& post_data,
64 base::Optional<SourceLocation> source_location, 63 base::Optional<SourceLocation> source_location)
65 CSPDisposition should_check_main_world_csp)
66 : url(url), 64 : url(url),
67 referrer(referrer), 65 referrer(referrer),
68 transition(transition), 66 transition(transition),
69 navigation_type(navigation_type), 67 navigation_type(navigation_type),
70 allow_download(allow_download), 68 allow_download(allow_download),
71 should_replace_current_entry(should_replace_current_entry), 69 should_replace_current_entry(should_replace_current_entry),
72 ui_timestamp(ui_timestamp), 70 ui_timestamp(ui_timestamp),
73 report_type(report_type), 71 report_type(report_type),
74 base_url_for_data_url(base_url_for_data_url), 72 base_url_for_data_url(base_url_for_data_url),
75 history_url_for_data_url(history_url_for_data_url), 73 history_url_for_data_url(history_url_for_data_url),
76 previews_state(previews_state), 74 previews_state(previews_state),
77 navigation_start(navigation_start), 75 navigation_start(navigation_start),
78 method(method), 76 method(method),
79 post_data(post_data), 77 post_data(post_data),
80 source_location(source_location), 78 source_location(source_location) {
81 should_check_main_world_csp(should_check_main_world_csp) {
82 // |method != "POST"| should imply absence of |post_data|. 79 // |method != "POST"| should imply absence of |post_data|.
83 if (method != "POST" && post_data) { 80 if (method != "POST" && post_data) {
84 NOTREACHED(); 81 NOTREACHED();
85 this->post_data = nullptr; 82 this->post_data = nullptr;
86 } 83 }
87 } 84 }
88 85
89 CommonNavigationParams::CommonNavigationParams( 86 CommonNavigationParams::CommonNavigationParams(
90 const CommonNavigationParams& other) = default; 87 const CommonNavigationParams& other) = default;
91 88
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 const RequestNavigationParams& request_params) 207 const RequestNavigationParams& request_params)
211 : common_params(common_params), 208 : common_params(common_params),
212 start_params(start_params), 209 start_params(start_params),
213 request_params(request_params) { 210 request_params(request_params) {
214 } 211 }
215 212
216 NavigationParams::~NavigationParams() { 213 NavigationParams::~NavigationParams() {
217 } 214 }
218 215
219 } // namespace content 216 } // namespace content
OLDNEW
« no previous file with comments | « content/common/navigation_params.h ('k') | content/public/browser/navigation_handle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698