diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-30 18:43:45 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-30 18:43:45 +0000 |
commit | c3d634d79a21a64038e5fcb1505904c554ece8ea (patch) | |
tree | cc5f5aabc6aeeb5d190fda5f8526050e093eda83 /chrome/browser/safe_browsing/safe_browsing_service.cc | |
parent | bb25dfd5d6354dd52f5f693269b807fd4f46161e (diff) | |
download | chromium_src-c3d634d79a21a64038e5fcb1505904c554ece8ea.zip chromium_src-c3d634d79a21a64038e5fcb1505904c554ece8ea.tar.gz chromium_src-c3d634d79a21a64038e5fcb1505904c554ece8ea.tar.bz2 |
The SafeBrowsing system had a bunch of plumbing for system resume that wasn't actually hooked to anything. Seems better to not have it than to have it look like it's doing something when it isn't.
BUG=25336
TEST=none
Review URL: http://codereview.chromium.org/347024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30607 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 | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc index bc06479..09912f2 100644 --- a/chrome/browser/safe_browsing/safe_browsing_service.cc +++ b/chrome/browser/safe_browsing/safe_browsing_service.cc @@ -38,13 +38,9 @@ SafeBrowsingService::SafeBrowsingService() resetting_(false), database_loaded_(false), update_in_progress_(false) { - base::SystemMonitor::Get()->AddObserver(this); } SafeBrowsingService::~SafeBrowsingService() { - base::SystemMonitor* system_monitor = base::SystemMonitor::Get(); - if (system_monitor) - system_monitor->RemoveObserver(this); } // Only called on the UI thread. @@ -653,26 +649,6 @@ void SafeBrowsingService::CacheHashResults( GetDatabase()->CacheHashResults(prefixes, full_hashes); } -// Tell the SafeBrowsing database not to do expensive disk operations for a few -// minutes after waking up. It's quite likely that the act of resuming from a -// low power state will involve much disk activity, which we don't want to -// exacerbate. -void SafeBrowsingService::OnResume() { - if (enabled_) { - safe_browsing_thread_->message_loop()->PostTask(FROM_HERE, - NewRunnableMethod(this, &SafeBrowsingService::HandleResume)); - } -} - -void SafeBrowsingService::HandleResume() { - DCHECK(MessageLoop::current() == safe_browsing_thread_->message_loop()); - // We don't call GetDatabase() here, since we want to avoid unnecessary calls - // to Open, Reset, etc, or reload the bloom filter while we're coming out of - // a suspended state. - if (database_) - database_->HandleResume(); -} - void SafeBrowsingService::RunQueuedClients() { DCHECK(MessageLoop::current() == io_loop_); HISTOGRAM_COUNTS("SB.QueueDepth", queued_checks_.size()); |