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

Side by Side Diff: components/navigation_interception/intercept_navigation_throttle.cc

Issue 1424263003: Reland "Use resource throttle to implement shouldOverrideUrlLoading, core change" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert unnecessary change for making XHR test thread-safe (it was safe before the change). Created 5 years, 1 month 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_throttle.h" 5 #include "components/navigation_interception/intercept_navigation_throttle.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/navigation_handle.h" 9 #include "content/public/browser/navigation_handle.h"
10 10
(...skipping 19 matching lines...) Expand all
30 return CheckIfShouldIgnoreNavigation(true); 30 return CheckIfShouldIgnoreNavigation(true);
31 } 31 }
32 32
33 content::NavigationThrottle::ThrottleCheckResult 33 content::NavigationThrottle::ThrottleCheckResult
34 InterceptNavigationThrottle::CheckIfShouldIgnoreNavigation(bool is_redirect) { 34 InterceptNavigationThrottle::CheckIfShouldIgnoreNavigation(bool is_redirect) {
35 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 35 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
36 NavigationParams navigation_params( 36 NavigationParams navigation_params(
37 navigation_handle()->GetURL(), navigation_handle()->GetReferrer(), 37 navigation_handle()->GetURL(), navigation_handle()->GetReferrer(),
38 navigation_handle()->HasUserGesture(), navigation_handle()->IsPost(), 38 navigation_handle()->HasUserGesture(), navigation_handle()->IsPost(),
39 navigation_handle()->GetPageTransition(), is_redirect, 39 navigation_handle()->GetPageTransition(), is_redirect,
40 navigation_handle()->IsExternalProtocol(), true); 40 navigation_handle()->IsExternalProtocol(),
41 navigation_handle()->IsInMainFrame());
41 42
42 bool should_ignore_navigation = should_ignore_callback_.Run( 43 bool should_ignore_navigation = should_ignore_callback_.Run(
43 navigation_handle()->GetWebContents(), navigation_params); 44 navigation_handle()->GetWebContents(), navigation_params);
44 return should_ignore_navigation 45 return should_ignore_navigation
45 ? content::NavigationThrottle::CANCEL_AND_IGNORE 46 ? content::NavigationThrottle::CANCEL_AND_IGNORE
46 : content::NavigationThrottle::PROCEED; 47 : content::NavigationThrottle::PROCEED;
47 } 48 }
48 49
49 } // namespace navigation_interception 50 } // namespace navigation_interception
OLDNEW
« no previous file with comments | « android_webview/renderer/aw_content_renderer_client.cc ('k') | content/public/renderer/content_renderer_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698