Searched defs:full_hashes (Results 1 - 19 of 19) sorted by relevance

/external/chromium/chrome/browser/safe_browsing/
H A Dsafe_browsing_util_unittest.cc289 std::vector<SBFullHashResult> full_hashes; local
290 full_hashes.push_back(full_hash);
292 EXPECT_EQ(safe_browsing_util::GetUrlHashIndex(url, full_hashes), 0);
295 EXPECT_EQ(safe_browsing_util::GetUrlHashIndex(url, full_hashes), -1);
H A Dprotocol_parser_unittest.cc474 std::vector<SBFullHashResult> full_hashes; local
480 &full_hashes));
483 EXPECT_EQ(full_hashes.size(), 3U);
484 EXPECT_EQ(memcmp(&full_hashes[0].hash,
487 EXPECT_EQ(full_hashes[0].list_name, "goog-phish-shavar");
488 EXPECT_EQ(memcmp(&full_hashes[1].hash,
491 EXPECT_EQ(full_hashes[1].list_name, "goog-phish-shavar");
492 EXPECT_EQ(memcmp(&full_hashes[2].hash,
495 EXPECT_EQ(full_hashes[2].list_name, "goog-phish-shavar");
506 &full_hashes));
547 std::vector<SBFullHashResult> full_hashes; local
567 std::vector<SBFullHashResult> full_hashes; local
[all...]
H A Dsafe_browsing_store.cc67 // Remove items in |removes| from |full_hashes|. |full_hashes| and
71 std::vector<T>* full_hashes) {
77 typename std::vector<T>::iterator out = full_hashes->begin();
79 typename std::vector<T>::iterator hash_iter = full_hashes->begin();
82 while (hash_iter != full_hashes->end() && remove_iter != removes.end()) {
97 } while (hash_iter != full_hashes->end() &&
104 full_hashes->erase(out, hash_iter);
70 RemoveMatchingPrefixes(const std::vector<SBAddPrefix>& removes, std::vector<T>* full_hashes) argument
H A Dprotocol_parser.cc56 std::vector<SBFullHashResult>* full_hashes) {
57 full_hashes->clear();
108 full_hashes->push_back(full_hash);
51 ParseGetHash( const char* chunk_data, int chunk_len, const std::string& key, bool* re_key, std::vector<SBFullHashResult>* full_hashes) argument
H A Dprotocol_manager.cc164 std::vector<SBFullHashResult> full_hashes; local
165 sb_service_->HandleGetHashResults(check, full_hashes, false);
234 std::vector<SBFullHashResult> full_hashes; local
252 &full_hashes);
257 full_hashes.clear();
273 // Call back the SafeBrowsingService with full_hashes, even if there was a
274 // parse error or an error response code (in which case full_hashes will be
276 sb_service_->HandleGetHashResults(check, full_hashes, can_cache);
H A Dsafe_browsing_database_unittest.cc496 std::vector<SBFullHashResult> full_hashes; local
502 &full_hashes, now));
509 &full_hashes, now));
514 &full_hashes, now));
519 &full_hashes, now));
524 &full_hashes, now));
529 &full_hashes, now));
534 &full_hashes, now));
539 &full_hashes, now));
545 &full_hashes, no
778 std::vector<SBFullHashResult> full_hashes; local
852 std::vector<SBFullHashResult> full_hashes; local
1398 std::vector<SBFullHashResult> full_hashes; local
[all...]
H A Dsafe_browsing_service.cc65 // |true| if there were any prefix hits in |full_hashes|.
69 const std::vector<SBFullHashResult>& full_hashes) {
71 if (full_hashes.empty()) {
380 const std::vector<SBFullHashResult>& full_hashes,
397 OnHandleGetHashResults(check, full_hashes); // 'check' is deleted here.
401 database_->CacheHashResults(prefixes, full_hashes);
930 const std::vector<SBFullHashResult>& full_hashes) {
932 GetDatabase()->CacheHashResults(prefixes, full_hashes);
937 const std::vector<SBFullHashResult>& full_hashes) {
943 const bool hit = HandleOneCheck(check, full_hashes);
66 RecordGetHashCheckStatus( bool hit, bool is_download, const std::vector<SBFullHashResult>& full_hashes) argument
378 HandleGetHashResults( SafeBrowsingCheck* check, const std::vector<SBFullHashResult>& full_hashes, bool can_cache) argument
928 CacheHashResults( const std::vector<SBPrefix>& prefixes, const std::vector<SBFullHashResult>& full_hashes) argument
935 OnHandleGetHashResults( SafeBrowsingCheck* check, const std::vector<SBFullHashResult>& full_hashes) argument
961 HandleOneCheck( SafeBrowsingCheck* check, const std::vector<SBFullHashResult>& full_hashes) argument
[all...]
H A Dsafe_browsing_util.cc419 const std::vector<SBFullHashResult>& full_hashes) {
420 for (size_t i = 0; i < full_hashes.size(); ++i) {
421 if (hash == full_hashes[i].hash)
428 const std::vector<SBFullHashResult>& full_hashes) {
429 if (full_hashes.empty())
442 int index = GetHashIndex(key, full_hashes);
418 GetHashIndex(const SBFullHash& hash, const std::vector<SBFullHashResult>& full_hashes) argument
427 GetUrlHashIndex(const GURL& url, const std::vector<SBFullHashResult>& full_hashes) argument
H A Dsafe_browsing_database.cc78 std::vector<SBFullHash>* full_hashes) {
95 full_hashes->push_back(full_hash);
105 full_hashes->push_back(full_hash);
114 std::vector<SBFullHash> full_hashes; local
116 BrowseFullHashesToCheck(urls[i], false, &full_hashes);
118 for (size_t i = 0; i < full_hashes.size(); ++i)
119 prefixes->push_back(full_hashes[i].prefix);
122 // Find the entries in |full_hashes| with prefix in |prefix_hits|, and
129 // |full_hashes| in parallel, so they must be sorted by prefix.
131 const std::vector<SBAddFullHash>& full_hashes,
76 BrowseFullHashesToCheck(const GURL& url, bool include_whitelist_hashes, std::vector<SBFullHash>* full_hashes) argument
130 GetCachedFullHashesForBrowse(const std::vector<SBPrefix>& prefix_hits, const std::vector<SBAddFullHash>& full_hashes, std::vector<SBFullHashResult>* full_hits, base::Time last_update) argument
539 std::vector<SBAddFullHash> full_hashes; local
590 std::vector<SBFullHash> full_hashes; local
1050 std::vector<SBAddFullHash> full_hashes; local
1290 LoadCsdWhitelist( const std::vector<SBAddFullHash>& full_hashes) argument
[all...]
/external/chromium_org/chrome/browser/safe_browsing/
H A Dsafe_browsing_util_unittest.cc289 std::vector<SBFullHashResult> full_hashes; local
290 full_hashes.push_back(full_hash);
292 EXPECT_EQ(safe_browsing_util::GetUrlHashIndex(url, full_hashes), 0);
295 EXPECT_EQ(safe_browsing_util::GetUrlHashIndex(url, full_hashes), -1);
H A Dprotocol_parser_unittest.cc432 std::vector<SBFullHashResult> full_hashes; local
436 &full_hashes));
438 EXPECT_EQ(full_hashes.size(), 3U);
439 EXPECT_EQ(memcmp(&full_hashes[0].hash,
442 EXPECT_EQ(full_hashes[0].list_name, "goog-phish-shavar");
443 EXPECT_EQ(memcmp(&full_hashes[1].hash,
446 EXPECT_EQ(full_hashes[1].list_name, "goog-phish-shavar");
447 EXPECT_EQ(memcmp(&full_hashes[2].hash,
450 EXPECT_EQ(full_hashes[2].list_name, "goog-phish-shavar");
460 &full_hashes));
482 std::vector<SBFullHashResult> full_hashes; local
[all...]
H A Dsafe_browsing_store.cc67 // Remove items in |removes| from |full_hashes|. |full_hashes| and
70 void RemoveMatchingPrefixes(const AddsT& removes, HashesT* full_hashes) { argument
76 typename HashesT::iterator out = full_hashes->begin();
78 typename HashesT::iterator hash_iter = full_hashes->begin();
81 while (hash_iter != full_hashes->end() && remove_iter != removes.end()) {
96 } while (hash_iter != full_hashes->end() &&
103 full_hashes->erase(out, hash_iter);
H A Ddatabase_manager.h59 const std::vector<SBFullHash>& full_hashes,
65 // Either |urls| or |full_hashes| is used to lookup database. |*_results|
70 std::vector<SBFullHash> full_hashes; member in struct:SafeBrowsingDatabaseManager::SafeBrowsingCheck
192 const std::vector<SBFullHashResult>& full_hashes,
314 const std::vector<SBFullHashResult>& full_hashes);
318 const std::vector<SBFullHashResult>& full_hashes);
320 // Run one check against |full_hashes|. Returns |true| if the check
321 // finds a match in |full_hashes|.
323 const std::vector<SBFullHashResult>& full_hashes);
H A Dprotocol_parser.cc47 std::vector<SBFullHashResult>* full_hashes) {
48 full_hashes->clear();
82 full_hashes->push_back(full_hash);
44 ParseGetHash( const char* chunk_data, int chunk_len, std::vector<SBFullHashResult>* full_hashes) argument
H A Dprotocol_manager.cc174 std::vector<SBFullHashResult> full_hashes; local
175 callback.Run(full_hashes, false);
220 std::vector<SBFullHashResult> full_hashes; local
240 &full_hashes);
242 full_hashes.clear();
256 // Invoke the callback with full_hashes, even if there was a parse error or
257 // an error response code (in which case full_hashes will be empty). The
259 details.callback.Run(full_hashes, can_cache);
H A Dsafe_browsing_database_unittest.cc549 std::vector<SBFullHashResult> full_hashes; local
555 &full_hashes, now));
562 &full_hashes, now));
567 &full_hashes, now));
572 &full_hashes, now));
577 &full_hashes, now));
582 &full_hashes, now));
587 &full_hashes, now));
592 &full_hashes, now));
598 &full_hashes, no
831 std::vector<SBFullHashResult> full_hashes; local
905 std::vector<SBFullHashResult> full_hashes; local
1562 std::vector<SBFullHashResult> full_hashes; local
1700 std::vector<SBFullHashResult> full_hashes; local
[all...]
H A Dsafe_browsing_util.cc476 const std::vector<SBFullHashResult>& full_hashes) {
477 for (size_t i = 0; i < full_hashes.size(); ++i) {
478 if (hash == full_hashes[i].hash)
485 const std::vector<SBFullHashResult>& full_hashes) {
486 if (full_hashes.empty())
495 int index = GetHashIndex(key, full_hashes);
475 GetHashIndex(const SBFullHash& hash, const std::vector<SBFullHashResult>& full_hashes) argument
484 GetUrlHashIndex(const GURL& url, const std::vector<SBFullHashResult>& full_hashes) argument
H A Ddatabase_manager.cc46 // |true| if there were any prefix hits in |full_hashes|.
50 const std::vector<SBFullHashResult>& full_hashes) {
52 if (full_hashes.empty()) {
76 const std::vector<SBFullHash>& full_hashes,
82 full_hashes(full_hashes),
83 full_hash_results(full_hashes.size(), SB_THREAT_TYPE_SAFE),
88 DCHECK_EQ(urls.empty(), !full_hashes.empty())
89 << "Exactly one of urls and full_hashes must be set";
97 DCHECK_EQ(check.full_hashes
47 RecordGetHashCheckStatus( bool hit, safe_browsing_util::ListType check_type, const std::vector<SBFullHashResult>& full_hashes) argument
74 SafeBrowsingCheck( const std::vector<GURL>& urls, const std::vector<SBFullHash>& full_hashes, Client* client, safe_browsing_util::ListType check_type, const std::vector<SBThreatType>& expected_threats) argument
427 HandleGetHashResults( SafeBrowsingCheck* check, const std::vector<SBFullHashResult>& full_hashes, bool can_cache) argument
909 CacheHashResults( const std::vector<SBPrefix>& prefixes, const std::vector<SBFullHashResult>& full_hashes) argument
917 OnHandleGetHashResults( SafeBrowsingCheck* check, const std::vector<SBFullHashResult>& full_hashes) argument
943 HandleOneCheck( SafeBrowsingCheck* check, const std::vector<SBFullHashResult>& full_hashes) argument
[all...]
H A Dsafe_browsing_database.cc120 std::vector<SBFullHash>* full_hashes) {
137 full_hashes->push_back(full_hash);
147 full_hashes->push_back(full_hash);
156 std::vector<SBFullHash> full_hashes; local
158 BrowseFullHashesToCheck(urls[i], false, &full_hashes);
160 for (size_t i = 0; i < full_hashes.size(); ++i)
161 prefixes->push_back(full_hashes[i].prefix);
192 // Find the entries in |full_hashes| with prefix in |prefix_hits|, and
199 // |full_hashes| in parallel, so they must be sorted by prefix.
201 const std::vector<SBAddFullHash>& full_hashes,
118 BrowseFullHashesToCheck(const GURL& url, bool include_whitelist_hashes, std::vector<SBFullHash>* full_hashes) argument
200 GetCachedFullHashesForBrowse(const std::vector<SBPrefix>& prefix_hits, const std::vector<SBAddFullHash>& full_hashes, std::vector<SBFullHashResult>* full_hits, base::Time last_update) argument
563 std::vector<SBAddFullHash> full_hashes; local
581 std::vector<SBAddFullHash> full_hashes; local
644 std::vector<SBAddFullHash> full_hashes; local
691 std::vector<SBFullHash> full_hashes; local
768 std::vector<SBFullHash> full_hashes; local
774 std::vector<SBFullHash> full_hashes; local
1353 std::vector<SBAddFullHash> full_hashes; local
1571 std::vector<SBAddFullHash> full_hashes; local
1712 LoadWhitelist( const std::vector<SBAddFullHash>& full_hashes, SBWhitelist* whitelist) argument
1743 LoadIpBlacklist( const std::vector<SBAddFullHash>& full_hashes) argument
1789 std::vector<SBFullHash> full_hashes; local
[all...]

Completed in 282 milliseconds