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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc

Issue 280013002: [safe browsing] Switch to independent cache lifetimes for gethash items. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: const that lifetime Created 6 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/safe_browsing/safe_browsing_database_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
diff --git a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
index ab6d68d178a6965282dcea46fc6638d3cb4fdfb1..b6ff5692feea403cd402df191df2da0347e79963 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
@@ -56,7 +56,7 @@ namespace {
void InvokeFullHashCallback(
SafeBrowsingProtocolManager::FullHashCallback callback,
const std::vector<SBFullHashResult>& result) {
- callback.Run(result, true);
+ callback.Run(result, base::TimeDelta::FromMinutes(45));
}
class FakeSafeBrowsingService : public SafeBrowsingService {
@@ -115,10 +115,10 @@ class TestSafeBrowsingDatabase : public SafeBrowsingDatabase {
// Called on the IO thread to check if the given URL is safe or not. If we
// can synchronously determine that the URL is safe, CheckUrl returns true,
// otherwise it returns false.
- virtual bool ContainsBrowseUrl(const GURL& url,
- std::vector<SBPrefix>* prefix_hits,
- std::vector<SBFullHashResult>* cached_hits,
- base::Time last_update) OVERRIDE {
+ virtual bool ContainsBrowseUrl(
+ const GURL& url,
+ std::vector<SBPrefix>* prefix_hits,
+ std::vector<SBFullHashResult>* cached_hits) OVERRIDE {
std::vector<GURL> urls(1, url);
return ContainsUrl(safe_browsing_util::MALWARE,
safe_browsing_util::PHISH,
@@ -172,8 +172,10 @@ class TestSafeBrowsingDatabase : public SafeBrowsingDatabase {
virtual void UpdateFinished(bool update_succeeded) OVERRIDE {
ADD_FAILURE() << "Not implemented.";
}
- virtual void CacheHashResults(const std::vector<SBPrefix>& prefixes,
- const std::vector<SBFullHashResult>& full_hits) OVERRIDE {
+ virtual void CacheHashResults(
+ const std::vector<SBPrefix>& prefixes,
+ const std::vector<SBFullHashResult>& full_hits,
+ const base::TimeDelta& cache_lifetime) OVERRIDE {
// Do nothing for the cache.
}
virtual bool IsMalwareIPMatchKillSwitchOn() OVERRIDE {
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_database_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698