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

Unified Diff: content/browser/frame_host/navigation_handle_impl.h

Issue 2655463006: PlzNavigate: Enforce 'frame-src' CSP on the browser. (Closed)
Patch Set: Rebase. 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/navigation_handle_impl.h
diff --git a/content/browser/frame_host/navigation_handle_impl.h b/content/browser/frame_host/navigation_handle_impl.h
index 8372a46a37a1bb6eb2a5e1ce7ab6b402887c5fca..819d847e9abfd8fdb2875405a7a87722d0cb5e27 100644
--- a/content/browser/frame_host/navigation_handle_impl.h
+++ b/content/browser/frame_host/navigation_handle_impl.h
@@ -91,7 +91,8 @@ class CONTENT_EXPORT NavigationHandleImpl : public NavigationHandle {
bool is_same_page,
const base::TimeTicks& navigation_start,
int pending_nav_entry_id,
- bool started_from_context_menu);
+ bool started_from_context_menu,
+ CSPDisposition should_check_main_world_csp);
~NavigationHandleImpl() override;
// Used to track the state the navigation is currently in.
@@ -359,6 +360,10 @@ class CONTENT_EXPORT NavigationHandleImpl : public NavigationHandle {
base_url_for_data_url_ = url;
}
+ CSPDisposition should_check_main_world_csp() const {
+ return should_check_main_world_csp_;
+ }
+
private:
friend class NavigationHandleImplTest;
@@ -369,7 +374,8 @@ class CONTENT_EXPORT NavigationHandleImpl : public NavigationHandle {
bool is_same_page,
const base::TimeTicks& navigation_start,
int pending_nav_entry_id,
- bool started_from_context_menu);
+ bool started_from_context_menu,
+ CSPDisposition should_check_main_world_csp);
NavigationThrottle::ThrottleCheckResult CheckWillStartRequest();
NavigationThrottle::ThrottleCheckResult CheckWillRedirectRequest();
@@ -525,6 +531,11 @@ class CONTENT_EXPORT NavigationHandleImpl : public NavigationHandle {
net::HostPortPair socket_address_;
NavigationType navigation_type_;
+ // Whether or not the CSP of the main world should apply. When the navigation
+ // is initiated from a content script in an isolated world, the CSP defined
+ // in the main world should not apply.
+ CSPDisposition should_check_main_world_csp_;
+
base::WeakPtrFactory<NavigationHandleImpl> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl);
« no previous file with comments | « content/browser/frame_host/navigation_entry_impl.cc ('k') | content/browser/frame_host/navigation_handle_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698