diff options
author | paulg@google.com <paulg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-08 00:01:38 +0000 |
---|---|---|
committer | paulg@google.com <paulg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-08 00:01:38 +0000 |
commit | 0cbd8e66a343e15f144d88f6f984082936499b6f (patch) | |
tree | f31749b45e660a1cf38d034b8e701f1491d016a8 /chrome/browser/safe_browsing/safe_browsing_service.cc | |
parent | b9293ff66e688d5ff2239b8984588f501fbbfe4b (diff) | |
download | chromium_src-0cbd8e66a343e15f144d88f6f984082936499b6f.zip chromium_src-0cbd8e66a343e15f144d88f6f984082936499b6f.tar.gz chromium_src-0cbd8e66a343e15f144d88f6f984082936499b6f.tar.bz2 |
Remove unused database code.
The new storage system doesn't check URLs on the DB thread
any longer, so this code is never called.
Review URL: http://codereview.chromium.org/62110
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13311 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/safe_browsing/safe_browsing_service.cc')
-rw-r--r-- | chrome/browser/safe_browsing/safe_browsing_service.cc | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc index 2f8f5ea..1a1c88a3 100644 --- a/chrome/browser/safe_browsing/safe_browsing_service.cc +++ b/chrome/browser/safe_browsing/safe_browsing_service.cc @@ -204,7 +204,6 @@ bool SafeBrowsingService::CheckUrl(const GURL& url, Client* client) { check->url = url; check->client = client; check->result = URL_SAFE; - check->start = Time::Now(); check->need_get_hash = full_hits.empty(); check->prefix_hits.swap(prefix_hits); check->full_hits.swap(full_hits); @@ -321,33 +320,6 @@ void SafeBrowsingService::CancelCheck(Client* client) { } } -void SafeBrowsingService::CheckDatabase(SafeBrowsingCheck* info, - Time last_update) { - DCHECK(MessageLoop::current() == db_thread_->message_loop()); - // If client == NULL it means it was cancelled, no need for db lookup. - if (info->client && GetDatabase()) { - Time now = Time::Now(); - std::string list; - if (GetDatabase()->ContainsUrl(info->url, - &list, - &info->prefix_hits, - &info->full_hits, - last_update)) { - if (info->prefix_hits.empty()) { - info->result = GetResultFromListname(list); - } else { - if (info->full_hits.empty()) - info->need_get_hash = true; - } - } - info->db_time = Time::Now() - now; - } - - if (io_loop_) - io_loop_->PostTask(FROM_HERE, NewRunnableMethod( - this, &SafeBrowsingService::OnCheckDone, info)); -} - void SafeBrowsingService::OnCheckDone(SafeBrowsingCheck* check) { DCHECK(MessageLoop::current() == io_loop_); @@ -356,7 +328,6 @@ void SafeBrowsingService::OnCheckDone(SafeBrowsingCheck* check) { if (!enabled_ || checks_.find(check) == checks_.end()) return; - UMA_HISTOGRAM_TIMES("SB.Database", Time::Now() - check->start); if (check->client && check->need_get_hash) { // We have a partial match so we need to query Google for the full hash. // Clean up will happen in HandleGetHashResults. |