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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2900563002: Network service: Safe browsing check for sub-resources from renderer. (Closed)
Patch Set: . Created 3 years, 7 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/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 7ca795a759f577513c6c7173f26333e8236d746c..c945a6f48a00210dd701d5420f0d7344f6da8997 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -74,6 +74,8 @@
#include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.h"
#include "chrome/browser/safe_browsing/certificate_reporting_service.h"
#include "chrome/browser/safe_browsing/certificate_reporting_service_factory.h"
+#include "chrome/browser/safe_browsing/safe_browsing_impl.h"
+#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "chrome/browser/search/instant_service.h"
#include "chrome/browser/search/instant_service_factory.h"
#include "chrome/browser/search/search.h"
@@ -3173,6 +3175,18 @@ void ChromeContentBrowserClient::ExposeInterfacesToFrame(
BindSensitiveInputVisibilityService,
render_frame_host));
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableNetworkService)) {
+ registry->AddInterface(
+ base::Bind(
+ &safe_browsing::SafeBrowsingImpl::Create,
+ g_browser_process->safe_browsing_service()->database_manager(),
+ g_browser_process->safe_browsing_service()->ui_manager(),
+ render_frame_host->GetProcess()->GetID(),
+ render_frame_host->GetRoutingID()),
+ BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
+ }
+
#if defined(OS_ANDROID)
registry->AddInterface(
render_frame_host->GetJavaInterfaces()

Powered by Google App Engine
This is Rietveld 408576698