summaryrefslogtreecommitdiffstats
path: root/chrome/browser/history/text_database_manager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/history/text_database_manager.cc')
-rw-r--r--chrome/browser/history/text_database_manager.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/chrome/browser/history/text_database_manager.cc b/chrome/browser/history/text_database_manager.cc
index 98e5990..09a79cf 100644
--- a/chrome/browser/history/text_database_manager.cc
+++ b/chrome/browser/history/text_database_manager.cc
@@ -4,7 +4,6 @@
#include "chrome/browser/history/text_database_manager.h"
-#include "base/bind.h"
#include "base/compiler_specific.h"
#include "base/file_util.h"
#include "base/metrics/histogram.h"
@@ -86,7 +85,7 @@ TextDatabaseManager::TextDatabaseManager(const FilePath& dir,
transaction_nesting_(0),
db_cache_(DBCache::NO_AUTO_EVICT),
present_databases_loaded_(false),
- ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)),
+ ALLOW_THIS_IN_INITIALIZER_LIST(factory_(this)),
history_publisher_(NULL) {
}
@@ -533,11 +532,9 @@ TextDatabase* TextDatabaseManager::GetDBForTime(Time time,
}
void TextDatabaseManager::ScheduleFlushOldChanges() {
- weak_factory_.InvalidateWeakPtrs();
- MessageLoop::current()->PostDelayedTask(
- FROM_HERE,
- base::Bind(&TextDatabaseManager::FlushOldChanges,
- weak_factory_.GetWeakPtr()),
+ factory_.RevokeAll();
+ MessageLoop::current()->PostDelayedTask(FROM_HERE, factory_.NewRunnableMethod(
+ &TextDatabaseManager::FlushOldChanges),
kExpirationSec * Time::kMillisecondsPerSecond);
}