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

Unified Diff: chrome/browser/renderer_host/safe_browsing_resource_throttle.cc

Issue 1343293004: Don't check URLs against Safe Browsing if not supported. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: braces, per the thestig Created 5 years, 3 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 | « build/config/features.gni ('k') | chrome/browser/safe_browsing/database_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/safe_browsing_resource_throttle.cc
diff --git a/chrome/browser/renderer_host/safe_browsing_resource_throttle.cc b/chrome/browser/renderer_host/safe_browsing_resource_throttle.cc
index c7d53516635fa6964e38cfc745dd53d965a14acd..a1454daf8ae4710f511d647598f913aaffb1072b 100644
--- a/chrome/browser/renderer_host/safe_browsing_resource_throttle.cc
+++ b/chrome/browser/renderer_host/safe_browsing_resource_throttle.cc
@@ -63,8 +63,10 @@ SafeBrowsingResourceThrottle* SafeBrowsingResourceThrottle::MaybeCreate(
request, resource_type, sb_service, DEFER_AT_START,
SafeBrowsingService::CHECK_ALL_RESOURCE_TYPES);
#elif defined(SAFE_BROWSING_DB_REMOTE)
- if (!sb_service->IsAndroidFieldTrialEnabled())
+ if (!sb_service->IsAndroidFieldTrialEnabled() ||
+ !sb_service->database_manager()->IsSupported()) {
return nullptr;
+ }
// Throttle consults a remote database before processing the response.
return new SafeBrowsingResourceThrottle(
« no previous file with comments | « build/config/features.gni ('k') | chrome/browser/safe_browsing/database_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698