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

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

Issue 2655463006: PlzNavigate: Enforce 'frame-src' CSP on the browser. (Closed)
Patch Set: Add TODO in the FrameLoader. Created 3 years, 10 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 #ifndef CONTENT_COMMON_NAVIGATION_PARAMS_H_ 5 #ifndef CONTENT_COMMON_NAVIGATION_PARAMS_H_
6 #define CONTENT_COMMON_NAVIGATION_PARAMS_H_ 6 #define CONTENT_COMMON_NAVIGATION_PARAMS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 FrameMsg_Navigate_Type::Value navigation_type, 51 FrameMsg_Navigate_Type::Value navigation_type,
52 bool allow_download, 52 bool allow_download,
53 bool should_replace_current_entry, 53 bool should_replace_current_entry,
54 base::TimeTicks ui_timestamp, 54 base::TimeTicks ui_timestamp,
55 FrameMsg_UILoadMetricsReportType::Value report_type, 55 FrameMsg_UILoadMetricsReportType::Value report_type,
56 const GURL& base_url_for_data_url, 56 const GURL& base_url_for_data_url,
57 const GURL& history_url_for_data_url, 57 const GURL& history_url_for_data_url,
58 PreviewsState previews_state, 58 PreviewsState previews_state,
59 const base::TimeTicks& navigation_start, 59 const base::TimeTicks& navigation_start,
60 std::string method, 60 std::string method,
61 const scoped_refptr<ResourceRequestBodyImpl>& post_data); 61 const scoped_refptr<ResourceRequestBodyImpl>& post_data,
62 bool should_bypass_main_world_csp);
62 CommonNavigationParams(const CommonNavigationParams& other); 63 CommonNavigationParams(const CommonNavigationParams& other);
63 ~CommonNavigationParams(); 64 ~CommonNavigationParams();
64 65
65 // The URL to navigate to. 66 // The URL to navigate to.
66 // PlzNavigate: May be modified when the navigation is ready to commit. 67 // PlzNavigate: May be modified when the navigation is ready to commit.
67 GURL url; 68 GURL url;
68 69
69 // The URL to send in the "Referer" header field. Can be empty if there is 70 // The URL to send in the "Referer" header field. Can be empty if there is
70 // no referrer. 71 // no referrer.
71 Referrer referrer; 72 Referrer referrer;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 // navigation_start value in Blink. 113 // navigation_start value in Blink.
113 // PlzNavigate: For renderer initiated navigations, this will be set on the 114 // PlzNavigate: For renderer initiated navigations, this will be set on the
114 // renderer side and sent with FrameHostMsg_BeginNavigation. 115 // renderer side and sent with FrameHostMsg_BeginNavigation.
115 base::TimeTicks navigation_start; 116 base::TimeTicks navigation_start;
116 117
117 // The request method: GET, POST, etc. 118 // The request method: GET, POST, etc.
118 std::string method; 119 std::string method;
119 120
120 // Body of HTTP POST request. 121 // Body of HTTP POST request.
121 scoped_refptr<ResourceRequestBodyImpl> post_data; 122 scoped_refptr<ResourceRequestBodyImpl> post_data;
123
124 // Returns true if the navigation was initiated from an isolated world. An
125 // isolated world has its own Content Security Policy. In this case, the
126 // policy of the main world should be ignored when evaluating resources
127 // injected into the DOM.
128 bool should_bypass_main_world_csp;
nasko 2017/02/15 21:28:44 nit: Shouldn't we name the variable based on what
arthursonzogni 2017/02/16 17:32:41 I agree. Edit: I don't know, I am using the same
122 }; 129 };
123 130
124 // Provided by the renderer ---------------------------------------------------- 131 // Provided by the renderer ----------------------------------------------------
125 // 132 //
126 // This struct holds parameters sent by the renderer to the browser. It is only 133 // This struct holds parameters sent by the renderer to the browser. It is only
127 // used in PlzNavigate (since in the current architecture, the renderer does not 134 // used in PlzNavigate (since in the current architecture, the renderer does not
128 // inform the browser of navigations until they commit). 135 // inform the browser of navigations until they commit).
129 136
130 // This struct is not used outside of the PlzNavigate project. 137 // This struct is not used outside of the PlzNavigate project.
131 // PlzNavigate: parameters needed to start a navigation on the IO thread, 138 // PlzNavigate: parameters needed to start a navigation on the IO thread,
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 ~NavigationParams(); 360 ~NavigationParams();
354 361
355 CommonNavigationParams common_params; 362 CommonNavigationParams common_params;
356 StartNavigationParams start_params; 363 StartNavigationParams start_params;
357 RequestNavigationParams request_params; 364 RequestNavigationParams request_params;
358 }; 365 };
359 366
360 } // namespace content 367 } // namespace content
361 368
362 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ 369 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698