Chromium Code Reviews| Index: chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc |
| =================================================================== |
| --- chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc (revision 72448) |
| +++ chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc (working copy) |
| @@ -63,8 +63,11 @@ |
| std::vector<SBFullHashResult> full_hits; |
| return ContainsUrl(safe_browsing_util::kBinUrlList, |
| safe_browsing_util::kBinHashList, |
| - url, prefix_hits, &full_hits); |
| + url, prefix_hits, full_hits); |
| } |
|
TVL
2011/01/26 22:13:41
did you mean to include this file?
|
| + virtual bool ContainsDownloadHashPrefix(const SBPrefix& prefix) { |
| + return ContainsHashPrefix(prefix); |
| + } |
| virtual bool UpdateStarted(std::vector<SBListChunkRanges>* lists) { |
| ADD_FAILURE() << "Not implemented."; |
| @@ -96,6 +99,11 @@ |
| badurls_[url.spec()].full_hits = full_hits; |
| } |
| + // Fill up the database with test hash digest. |
| + void AddDigestPrefix(SBPrefix prefix) { |
| + download_digest_prefix_.insert(prefix); |
| + } |
| + |
| private: |
| struct Hits { |
| std::string list_name; |
| @@ -125,6 +133,7 @@ |
| } |
| base::hash_map<std::string, Hits> badurls_; |
| + base::prefix_set<SBPrefix> download_digest_prefix_; |
| }; |
| // Factory that creates TestSafeBrowsingDatabase instances. |