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

Unified Diff: chrome/browser/component/navigation_interception/intercept_navigation_resource_throttle.cc

Issue 10946008: Componentize IgnoreNavigationResourceThrottle and add chrome and webview specific implementations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moved jni to component, added Java test code Created 8 years, 2 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: chrome/browser/component/navigation_interception/intercept_navigation_resource_throttle.cc
diff --git a/chrome/browser/renderer_host/intercept_navigation_resource_throttle.cc b/chrome/browser/component/navigation_interception/intercept_navigation_resource_throttle.cc
similarity index 93%
rename from chrome/browser/renderer_host/intercept_navigation_resource_throttle.cc
rename to chrome/browser/component/navigation_interception/intercept_navigation_resource_throttle.cc
index 3852627bb551f55abeee60b8c5c9c3b8092e7a1b..1180ab6df95737a9a9f28f764b07540b40d5de3d 100644
--- a/chrome/browser/renderer_host/intercept_navigation_resource_throttle.cc
+++ b/chrome/browser/component/navigation_interception/intercept_navigation_resource_throttle.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/renderer_host/intercept_navigation_resource_throttle.h"
+#include "chrome/browser/component/navigation_interception/intercept_navigation_resource_throttle.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/child_process_security_policy.h"
@@ -19,6 +19,8 @@ using content::Referrer;
using content::RenderViewHost;
using content::ResourceRequestInfo;
+namespace navigation_interception {
+
namespace {
void CheckIfShouldIgnoreNavigationOnUIThread(
@@ -26,7 +28,7 @@ void CheckIfShouldIgnoreNavigationOnUIThread(
int render_view_id,
const GURL& url,
const Referrer& referrer,
- bool is_content_initiated,
+ bool has_user_gesture,
InterceptNavigationResourceThrottle::CheckOnUIThreadCallback
should_ignore_callback,
base::Callback<void(bool)> callback) {
@@ -42,7 +44,7 @@ void CheckIfShouldIgnoreNavigationOnUIThread(
bool should_ignore_navigation = false;
should_ignore_navigation = should_ignore_callback.Run(
- rvh, validated_url, referrer, is_content_initiated);
+ rvh, validated_url, referrer, has_user_gesture);
BrowserThread::PostTask(
BrowserThread::IO,
@@ -117,3 +119,5 @@ void InterceptNavigationResourceThrottle::OnResultObtained(
controller()->Resume();
}
}
+
+} // namespace navigation_interception

Powered by Google App Engine
This is Rietveld 408576698