| Index: content/browser/frame_host/navigation_handle_impl.cc
|
| diff --git a/content/browser/frame_host/navigation_handle_impl.cc b/content/browser/frame_host/navigation_handle_impl.cc
|
| index a5459d616a3ec8087786bbe6be27ca47b1aa541f..04cdc86e69ec469b15543051643823ccb163d31b 100644
|
| --- a/content/browser/frame_host/navigation_handle_impl.cc
|
| +++ b/content/browser/frame_host/navigation_handle_impl.cc
|
| @@ -65,11 +65,12 @@ std::unique_ptr<NavigationHandleImpl> NavigationHandleImpl::Create(
|
| bool is_same_page,
|
| const base::TimeTicks& navigation_start,
|
| int pending_nav_entry_id,
|
| - bool started_from_context_menu) {
|
| + bool started_from_context_menu,
|
| + bool should_bypass_main_world_csp) {
|
| return std::unique_ptr<NavigationHandleImpl>(new NavigationHandleImpl(
|
| url, redirect_chain, frame_tree_node, is_renderer_initiated, is_same_page,
|
| - navigation_start, pending_nav_entry_id,
|
| - started_from_context_menu));
|
| + navigation_start, pending_nav_entry_id, started_from_context_menu,
|
| + should_bypass_main_world_csp));
|
| }
|
|
|
| NavigationHandleImpl::NavigationHandleImpl(
|
| @@ -80,7 +81,8 @@ NavigationHandleImpl::NavigationHandleImpl(
|
| bool is_same_page,
|
| const base::TimeTicks& navigation_start,
|
| int pending_nav_entry_id,
|
| - bool started_from_context_menu)
|
| + bool started_from_context_menu,
|
| + bool should_bypass_main_world_csp)
|
| : url_(url),
|
| has_user_gesture_(false),
|
| transition_(ui::PAGE_TRANSITION_LINK),
|
| @@ -109,6 +111,7 @@ NavigationHandleImpl::NavigationHandleImpl(
|
| started_from_context_menu_(started_from_context_menu),
|
| reload_type_(ReloadType::NONE),
|
| navigation_type_(NAVIGATION_TYPE_UNKNOWN),
|
| + should_bypass_main_world_csp_(should_bypass_main_world_csp),
|
| weak_factory_(this) {
|
| DCHECK(!navigation_start.is_null());
|
| if (redirect_chain_.empty())
|
| @@ -456,6 +459,10 @@ NavigationData* NavigationHandleImpl::GetNavigationData() {
|
| return navigation_data_.get();
|
| }
|
|
|
| +bool NavigationHandleImpl::should_bypass_main_world_csp() const {
|
| + return should_bypass_main_world_csp_;
|
| +}
|
| +
|
| const GlobalRequestID& NavigationHandleImpl::GetGlobalRequestID() {
|
| DCHECK(state_ == WILL_PROCESS_RESPONSE || state_ == DEFERRING_RESPONSE ||
|
| state_ == READY_TO_COMMIT);
|
| @@ -675,9 +682,9 @@ NavigationHandleImpl::CheckWillStartRequest() {
|
| case NavigationThrottle::PROCEED:
|
| continue;
|
|
|
| + case NavigationThrottle::BLOCK_REQUEST:
|
| case NavigationThrottle::CANCEL:
|
| case NavigationThrottle::CANCEL_AND_IGNORE:
|
| - case NavigationThrottle::BLOCK_REQUEST:
|
| state_ = CANCELING;
|
| return result;
|
|
|
| @@ -707,6 +714,7 @@ NavigationHandleImpl::CheckWillRedirectRequest() {
|
| case NavigationThrottle::PROCEED:
|
| continue;
|
|
|
| + case NavigationThrottle::BLOCK_REQUEST:
|
| case NavigationThrottle::CANCEL:
|
| case NavigationThrottle::CANCEL_AND_IGNORE:
|
| state_ = CANCELING;
|
| @@ -717,7 +725,6 @@ NavigationHandleImpl::CheckWillRedirectRequest() {
|
| next_index_ = i + 1;
|
| return result;
|
|
|
| - case NavigationThrottle::BLOCK_REQUEST:
|
| case NavigationThrottle::BLOCK_RESPONSE:
|
| NOTREACHED();
|
| }
|
|
|