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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2238383002: Add SafeBrowsingNavigationThrottle Base URL: https://chromium.googlesource.com/chromium/src.git@unsafe-resource-to-webcontents
Patch Set: . Created 4 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
« no previous file with comments | « no previous file | chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 1f980cbe0909cc1df312ada1f1178ae017c09854..7169834b1da30ba703c074e780233f79ba64368e 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -67,6 +67,7 @@
#include "chrome/browser/profiles/profile_io_data.h"
#include "chrome/browser/renderer_host/chrome_render_message_filter.h"
#include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.h"
+#include "chrome/browser/renderer_host/safe_browsing_navigation_throttle.h"
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "chrome/browser/safe_browsing/ui_manager.h"
#include "chrome/browser/search/instant_service.h"
@@ -2965,6 +2966,16 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation(
}
#endif
+#if defined(SAFE_BROWSING_DB_LOCAL) || defined(SAFE_BROWSING_DB_REMOTE)
+ if (handle->IsInMainFrame()) {
+ auto sb_throttle = SafeBrowsingNavigationThrottle::MaybeCreate(
+ handle, g_browser_process->safe_browsing_service());
+ if (sb_throttle) {
+ throttles.push_back(std::move(sb_throttle));
+ }
+ }
+#endif // defined(SAFE_BROWSING_DB_LOCAL) || defined(SAFE_BROWSING_DB_REMOTE)
+
#if defined(ENABLE_EXTENSIONS)
if (!handle->IsInMainFrame())
throttles.push_back(new extensions::ExtensionNavigationThrottle(handle));
« no previous file with comments | « no previous file | chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698