diff options
author | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-05 12:46:38 +0000 |
---|---|---|
committer | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-05 12:46:38 +0000 |
commit | f0a51fb571f46531025fa09240bbc3e1af925e84 (patch) | |
tree | 558b4f0e737fda4b9ab60f252c9c23b8a4ca523e /chrome/browser/safe_browsing | |
parent | 6390be368205705f49ead3cec40396519f13b889 (diff) | |
download | chromium_src-f0a51fb571f46531025fa09240bbc3e1af925e84.zip chromium_src-f0a51fb571f46531025fa09240bbc3e1af925e84.tar.gz chromium_src-f0a51fb571f46531025fa09240bbc3e1af925e84.tar.bz2 |
Fixes CRLF and trailing white spaces.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10982 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/safe_browsing')
5 files changed, 13 insertions, 13 deletions
diff --git a/chrome/browser/safe_browsing/protocol_parser_unittest.cc b/chrome/browser/safe_browsing/protocol_parser_unittest.cc index 289df72..bc37118 100644 --- a/chrome/browser/safe_browsing/protocol_parser_unittest.cc +++ b/chrome/browser/safe_browsing/protocol_parser_unittest.cc @@ -507,7 +507,7 @@ TEST(SafeBrowsingProtocolParsingTest, TestGetHashWithUnknownList) { &full_hashes)); EXPECT_EQ(full_hashes.size(), static_cast<size_t>(1)); - EXPECT_EQ(memcmp("12345678901234567890123456789012", + EXPECT_EQ(memcmp("12345678901234567890123456789012", &full_hashes[0].hash, sizeof(SBFullHash)), 0); EXPECT_EQ(full_hashes[0].list_name, "goog-phish-shavar"); EXPECT_EQ(full_hashes[0].add_chunk_id, 1); @@ -522,11 +522,11 @@ TEST(SafeBrowsingProtocolParsingTest, TestGetHashWithUnknownList) { &full_hashes)); EXPECT_EQ(full_hashes.size(), static_cast<size_t>(2)); - EXPECT_EQ(memcmp("12345678901234567890123456789012", + EXPECT_EQ(memcmp("12345678901234567890123456789012", &full_hashes[0].hash, sizeof(SBFullHash)), 0); EXPECT_EQ(full_hashes[0].list_name, "goog-phish-shavar"); EXPECT_EQ(full_hashes[0].add_chunk_id, 1); - EXPECT_EQ(memcmp("abcdefghijklmnopqrstuvwxyz123457", + EXPECT_EQ(memcmp("abcdefghijklmnopqrstuvwxyz123457", &full_hashes[1].hash, sizeof(SBFullHash)), 0); EXPECT_EQ(full_hashes[1].list_name, "goog-malware-shavar"); EXPECT_EQ(full_hashes[1].add_chunk_id, 7); @@ -632,7 +632,7 @@ TEST(SafeBrowsingProtocolParsingTest, TestZeroSizeAddChunk) { EXPECT_EQ(chunks[1].chunk_number, 2); EXPECT_EQ(chunks[1].hosts.size(), static_cast<size_t>(0)); - + EXPECT_EQ(chunks[2].chunk_number, 3); EXPECT_EQ(chunks[2].hosts.size(), static_cast<size_t>(1)); EXPECT_EQ(chunks[2].hosts[0].host, 0x65666163); diff --git a/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc b/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc index e69ae04..a05933d 100644 --- a/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc +++ b/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc @@ -870,7 +870,7 @@ bool SafeBrowsingDatabaseBloom::BuildAddPrefixList(SBPair* adds) { } bool SafeBrowsingDatabaseBloom::RemoveSubs( - SBPair* adds, std::vector<bool>* adds_removed, + SBPair* adds, std::vector<bool>* adds_removed, HashCache* add_cache, HashCache* sub_cache, int* subs) { DCHECK(add_cache && sub_cache && subs); diff --git a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc index 4acdf3a..03a372d 100644 --- a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc +++ b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc @@ -943,7 +943,7 @@ TEST(SafeBrowsingDatabase, HashCaching) { database->UpdateFinished(true); EXPECT_TRUE(database->ContainsUrl(GURL("http://www.fullevil.com/bad1.html"), - &listname, &prefixes, &full_hashes, + &listname, &prefixes, &full_hashes, Time::Now())); EXPECT_EQ(full_hashes.size(), 1U); EXPECT_EQ(0, memcmp(full_hashes[0].hash.full_hash, @@ -954,7 +954,7 @@ TEST(SafeBrowsingDatabase, HashCaching) { full_hashes.clear(); EXPECT_TRUE(database->ContainsUrl(GURL("http://www.fullevil.com/bad2.html"), - &listname, &prefixes, &full_hashes, + &listname, &prefixes, &full_hashes, Time::Now())); EXPECT_EQ(full_hashes.size(), 1U); EXPECT_EQ(0, memcmp(full_hashes[0].hash.full_hash, @@ -986,13 +986,13 @@ TEST(SafeBrowsingDatabase, HashCaching) { database->UpdateFinished(true); EXPECT_FALSE(database->ContainsUrl(GURL("http://www.fullevil.com/bad1.html"), - &listname, &prefixes, &full_hashes, + &listname, &prefixes, &full_hashes, Time::Now())); EXPECT_EQ(full_hashes.size(), 0U); // There should be one remaining full add. EXPECT_TRUE(database->ContainsUrl(GURL("http://www.fullevil.com/bad2.html"), - &listname, &prefixes, &full_hashes, + &listname, &prefixes, &full_hashes, Time::Now())); EXPECT_EQ(full_hashes.size(), 1U); EXPECT_EQ(0, memcmp(full_hashes[0].hash.full_hash, @@ -1010,10 +1010,10 @@ TEST(SafeBrowsingDatabase, HashCaching) { lists.clear(); EXPECT_FALSE(database->ContainsUrl(GURL("http://www.fullevil.com/bad1.html"), - &listname, &prefixes, &full_hashes, + &listname, &prefixes, &full_hashes, Time::Now())); EXPECT_FALSE(database->ContainsUrl(GURL("http://www.fullevil.com/bad2.html"), - &listname, &prefixes, &full_hashes, + &listname, &prefixes, &full_hashes, Time::Now())); TearDownTestDatabase(database); diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc index 04fb702..967ebc6 100644 --- a/chrome/browser/safe_browsing/safe_browsing_service.cc +++ b/chrome/browser/safe_browsing/safe_browsing_service.cc @@ -224,7 +224,7 @@ bool SafeBrowsingService::CheckUrlNew(const GURL& url, Client* client) { bool prefix_match = database_->ContainsUrl(url, &list, &prefix_hits, &full_hits, protocol_manager_->last_update()); - + UMA_HISTOGRAM_TIMES("SB2.FilterCheck", base::Time::Now() - check_start); if (!prefix_match) diff --git a/chrome/browser/safe_browsing/safe_browsing_util_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_util_unittest.cc index 2486117..2c59a66 100644 --- a/chrome/browser/safe_browsing/safe_browsing_util_unittest.cc +++ b/chrome/browser/safe_browsing/safe_browsing_util_unittest.cc @@ -266,7 +266,7 @@ TEST(SafeBrowsing, HostInfo2) { // Checks that if we get a sub chunk with one prefix, then get the add chunk // for that same prefix afterwards, the entry becomes empty. -TEST(SafeBrowsing, HostInfo3) { +TEST(SafeBrowsing, HostInfo3) { SBHostInfo info; // Add a sub prefix. |