| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "components/navigation_interception/intercept_navigation_resource_throt
tle.h" | 5 #include "components/navigation_interception/intercept_navigation_resource_throt
tle.h" |
| 6 | 6 |
| 7 #include "components/navigation_interception/navigation_params.h" | 7 #include "components/navigation_interception/navigation_params.h" |
| 8 #include "content/public/browser/browser_thread.h" | 8 #include "content/public/browser/browser_thread.h" |
| 9 #include "content/public/browser/child_process_security_policy.h" | 9 #include "content/public/browser/child_process_security_policy.h" |
| 10 #include "content/public/browser/render_frame_host.h" | 10 #include "content/public/browser/render_frame_host.h" |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 return false; | 105 return false; |
| 106 | 106 |
| 107 bool is_external_protocol = | 107 bool is_external_protocol = |
| 108 !info->GetContext()->GetRequestContext()->job_factory()->IsHandledURL( | 108 !info->GetContext()->GetRequestContext()->job_factory()->IsHandledURL( |
| 109 url); | 109 url); |
| 110 NavigationParams navigation_params( | 110 NavigationParams navigation_params( |
| 111 url, | 111 url, |
| 112 Referrer::SanitizeForRequest( | 112 Referrer::SanitizeForRequest( |
| 113 url, Referrer(GURL(request_->referrer()), info->GetReferrerPolicy())), | 113 url, Referrer(GURL(request_->referrer()), info->GetReferrerPolicy())), |
| 114 info->HasUserGesture(), method == "POST", info->GetPageTransition(), | 114 info->HasUserGesture(), method == "POST", info->GetPageTransition(), |
| 115 is_redirect, is_external_protocol); | 115 is_redirect, is_external_protocol, true); |
| 116 | 116 |
| 117 BrowserThread::PostTask( | 117 BrowserThread::PostTask( |
| 118 BrowserThread::UI, | 118 BrowserThread::UI, |
| 119 FROM_HERE, | 119 FROM_HERE, |
| 120 base::Bind( | 120 base::Bind( |
| 121 &CheckIfShouldIgnoreNavigationOnUIThread, | 121 &CheckIfShouldIgnoreNavigationOnUIThread, |
| 122 render_process_id, | 122 render_process_id, |
| 123 render_frame_id, | 123 render_frame_id, |
| 124 navigation_params, | 124 navigation_params, |
| 125 should_ignore_callback_, | 125 should_ignore_callback_, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 137 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 137 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 138 | 138 |
| 139 if (should_ignore_navigation) { | 139 if (should_ignore_navigation) { |
| 140 controller()->CancelAndIgnore(); | 140 controller()->CancelAndIgnore(); |
| 141 } else { | 141 } else { |
| 142 controller()->Resume(); | 142 controller()->Resume(); |
| 143 } | 143 } |
| 144 } | 144 } |
| 145 | 145 |
| 146 } // namespace navigation_interception | 146 } // namespace navigation_interception |
| OLD | NEW |