Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 2108
b: refs/heads/master
c: aad0875
h: refs/heads/master
v: v3
  • Loading branch information
erikkay@google.com committed Oct 2, 2008
1 parent 5fd4129 commit 1294951
Show file tree
Hide file tree
Showing 11 changed files with 1,344 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aa87dd3130e941327c40cceb145c4fc58954ecb6
refs/heads/master: aad08754d7ff3be93fd415a36a588fadd2e34bd0
1 change: 1 addition & 0 deletions trunk/chrome/browser/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ if env['PLATFORM'] == 'win32':
'safe_browsing/protocol_manager.cc',
'safe_browsing/safe_browsing_blocking_page.cc',
'safe_browsing/safe_browsing_database.cc',
'safe_browsing/safe_browsing_database_bloom.cc',
'safe_browsing/safe_browsing_database_impl.cc',
'safe_browsing/safe_browsing_service.cc',
'sandbox_policy.cc',
Expand Down
8 changes: 8 additions & 0 deletions trunk/chrome/browser/browser.vcproj
Original file line number Diff line number Diff line change
Expand Up @@ -1933,6 +1933,14 @@
RelativePath=".\safe_browsing\safe_browsing_database.h"
>
</File>
<File
RelativePath=".\safe_browsing\safe_browsing_database_bloom.cc"
>
</File>
<File
RelativePath=".\safe_browsing\safe_browsing_database_bloom.h"
>
</File>
<File
RelativePath=".\safe_browsing\safe_browsing_database_impl.cc"
>
Expand Down
1 change: 1 addition & 0 deletions trunk/chrome/browser/safe_browsing/protocol_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,7 @@ void SafeBrowsingProtocolManager::OnChunkInserted() {

if (chunk_request_urls_.empty()) {
UMA_HISTOGRAM_LONG_TIMES(L"SB.Update", Time::Now() - last_update_);
sb_service_->UpdateFinished();
} else {
IssueChunkRequest();
}
Expand Down
2 changes: 2 additions & 0 deletions trunk/chrome/browser/safe_browsing/safe_browsing_database.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "base/logging.h"
#include "base/sha2.h"
#include "chrome/browser/safe_browsing/safe_browsing_database_impl.h"
#include "chrome/browser/safe_browsing/safe_browsing_database_bloom.h"
#include "googleurl/src/gurl.h"

// Filename suffix for the bloom filter.
Expand Down Expand Up @@ -90,3 +91,4 @@ void SafeBrowsingDatabase::WriteBloomFilter() {
SB_DLOG(INFO) << "SafeBrowsingDatabase wrote bloom filter in " <<
(Time::Now() - before).InMilliseconds() << " ms";
}

5 changes: 3 additions & 2 deletions trunk/chrome/browser/safe_browsing/safe_browsing_database.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ class SafeBrowsingDatabase {
// Called when the user's machine has resumed from a lower power state.
virtual void HandleResume() = 0;

virtual void UpdateFinished() { }

protected:
static std::wstring BloomFilterFilename(const std::wstring& db_filename);

Expand All @@ -93,10 +95,9 @@ class SafeBrowsingDatabase {

// Implementation specific bloom filter building.
virtual void BuildBloomFilter() = 0;
virtual void AddHostToBloomFilter(int host_key) = 0;

// Measuring false positive rate. Call this each time we look in the filter.
virtual void IncrementBloomFilterReadCount() = 0;
virtual void IncrementBloomFilterReadCount() {};

std::wstring bloom_filter_filename_;
scoped_ptr<BloomFilter> bloom_filter_;
Expand Down
Loading

0 comments on commit 1294951

Please sign in to comment.