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

Unified Diff: components/navigation_interception/intercept_navigation_delegate.cc

Issue 1269813002: Add a NavigationThrottle to the public content/ interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@navigation-api
Patch Set: Created 5 years, 4 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: components/navigation_interception/intercept_navigation_delegate.cc
diff --git a/components/navigation_interception/intercept_navigation_delegate.cc b/components/navigation_interception/intercept_navigation_delegate.cc
index ba9053d663cfdcf0b42b0f6a521341dfe4e83bc3..827fe4d7ce20409dfd10c2f2c3f8fd345335b918 100644
--- a/components/navigation_interception/intercept_navigation_delegate.cc
+++ b/components/navigation_interception/intercept_navigation_delegate.cc
@@ -7,9 +7,10 @@
#include "base/android/jni_android.h"
#include "base/android/jni_string.h"
#include "base/callback.h"
-#include "components/navigation_interception/intercept_navigation_resource_throttle.h"
+#include "components/navigation_interception/intercept_navigation_throttle.h"
#include "components/navigation_interception/navigation_params_android.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/navigation_throttle.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/resource_request_info.h"
@@ -83,10 +84,14 @@ InterceptNavigationDelegate* InterceptNavigationDelegate::Get(
}
// static
-content::ResourceThrottle* InterceptNavigationDelegate::CreateThrottleFor(
- net::URLRequest* request) {
- return new InterceptNavigationResourceThrottle(
- request, base::Bind(&CheckIfShouldIgnoreNavigationOnUIThread));
+scoped_ptr<content::NavigationThrottle>
+InterceptNavigationDelegate::CreateThrottleFor(
+ content::NavigationHandle* handle,
+ content::WebContents* web_contents) {
+ return scoped_ptr<InterceptNavigationThrottle>(
davidben 2015/09/01 21:55:17 Optional: This can be return make_scoped_ptr(ne
clamy 2015/09/03 15:30:51 Due to a change in the interface for registering t
+ new InterceptNavigationThrottle(
+ handle, web_contents,
+ base::Bind(&CheckIfShouldIgnoreNavigationOnUIThread)));
}
// static

Powered by Google App Engine
This is Rietveld 408576698