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

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
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/chrome_content_browser_manifest_overlay.json » ('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 840d9a1e7d5b2c8cc00087d5a470e5a8b7be64ef..2663ca06ba5046ac69dcc4cd24511033dfbb2a8e 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/mojo_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"
@@ -3085,6 +3087,18 @@ void ChromeContentBrowserClient::ExposeInterfacesToRenderer(
registry->AddInterface(
base::Bind(&NetBenchmarking::Create, profile, context));
}
+
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableNetworkService)) {
+ registry->AddInterface(
+ base::Bind(
+ &safe_browsing::MojoSafeBrowsingImpl::Create,
+ g_browser_process->safe_browsing_service()->database_manager(),
+ g_browser_process->safe_browsing_service()->ui_manager(),
+ render_process_host->GetID()),
+ BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
+ }
+
#if defined(OS_WIN)
if (base::FeatureList::IsEnabled(features::kModuleDatabase)) {
// Add the ModuleDatabase interface. This is the interface used by renderer
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/chrome_content_browser_manifest_overlay.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698