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

Unified Diff: android_webview/lib/main/aw_main_delegate.cc

Issue 2635693002: [WebView] initial webview-side implementation of safebrowsing (Closed)
Patch Set: rename lock, add crbug comment Created 3 years, 11 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: android_webview/lib/main/aw_main_delegate.cc
diff --git a/android_webview/lib/main/aw_main_delegate.cc b/android_webview/lib/main/aw_main_delegate.cc
index 27601c53d1efd06334087c4319e09569fa483d1a..623025b3ffbaff60b4072b7eaa62b3b3aa9427b0 100644
--- a/android_webview/lib/main/aw_main_delegate.cc
+++ b/android_webview/lib/main/aw_main_delegate.cc
@@ -31,6 +31,7 @@
#include "base/threading/thread_restrictions.h"
#include "cc/base/switches.h"
#include "components/crash/content/app/breakpad_linux.h"
+#include "components/safe_browsing_db/android/safe_browsing_api_handler_bridge.h"
#include "components/spellcheck/common/spellcheck_features.h"
#include "content/public/browser/android/browser_media_player_manager_register.h"
#include "content/public/browser/browser_main_runner.h"
@@ -155,6 +156,14 @@ bool AwMainDelegate::BasicStartupComplete(int* exit_code) {
android_webview::RegisterPathProvider();
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kWebViewEnableSafeBrowsingSupport)) {
+ safe_browsing_api_handler_.reset(
+ new safe_browsing::SafeBrowsingApiHandlerBridge());
+ safe_browsing::SafeBrowsingApiHandler::SetInstance(
+ safe_browsing_api_handler_.get());
+ }
+
return false;
}

Powered by Google App Engine
This is Rietveld 408576698