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

Unified Diff: chrome/browser/safe_browsing/database_manager.h

Issue 1410853003: [Safe Browsing] Only check main frame and iframe URLs on Mobile, for speed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rm unecessary thread restriction that interferes with tests Created 5 years, 2 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/safe_browsing/database_manager.h
diff --git a/chrome/browser/safe_browsing/database_manager.h b/chrome/browser/safe_browsing/database_manager.h
index f46e2948f3a641af8c3cbb23a223cbe30c2f187f..cc0840b8383cd813df2940a443849ca07dc68fa4 100644
--- a/chrome/browser/safe_browsing/database_manager.h
+++ b/chrome/browser/safe_browsing/database_manager.h
@@ -16,6 +16,7 @@
#include "base/memory/ref_counted.h"
#include "chrome/browser/safe_browsing/safe_browsing_util.h"
+#include "content/public/common/resource_type.h"
#include "url/gurl.h"
// Interface to either the locally-managed or a remotely-managed database.
@@ -43,10 +44,19 @@ class SafeBrowsingDatabaseManager
const std::set<std::string>& threats) {}
};
+
// Returns true if URL-checking is supported on this build+device.
// If false, calls to CheckBrowseUrl may dcheck-fail.
virtual bool IsSupported() const = 0;
+ // Returns true if checks are never done synchronously, and therefore
+ // always have some latency.
+ virtual bool ChecksAreAlwaysAsync() const = 0;
+
+ // Returns true if this resource type should be checked.
+ virtual bool CanCheckResourceType(
+ content::ResourceType resource_type) const = 0;
+
// Returns true if the url's scheme can be checked.
virtual bool CanCheckUrl(const GURL& url) const = 0;
« no previous file with comments | « chrome/browser/renderer_host/safe_browsing_resource_throttle.cc ('k') | chrome/browser/safe_browsing/local_database_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698