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.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/chrome/browser/history/text_database_manager.cc b/chrome/browser/history/text_database_manager.cc
index 483befa..8fcb8fc 100644
--- a/chrome/browser/history/text_database_manager.cc
+++ b/chrome/browser/history/text_database_manager.cc
@@ -10,6 +10,7 @@
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/string_util.h"
+#include "chrome/browser/history/history_publisher.h"
#include "chrome/common/mru_cache.h"
using base::Time;
@@ -77,6 +78,7 @@ TextDatabaseManager::TextDatabaseManager(const std::wstring& dir,
transaction_nesting_(0),
db_cache_(DBCache::NO_AUTO_EVICT),
present_databases_loaded_(false),
+ history_publisher_(NULL),
ALLOW_THIS_IN_INITIALIZER_LIST(factory_(this)) {
}
@@ -104,7 +106,9 @@ Time TextDatabaseManager::IDToTime(TextDatabase::DBIdent id) {
return Time::FromUTCExploded(exploded);
}
-bool TextDatabaseManager::Init() {
+bool TextDatabaseManager::Init(const HistoryPublisher* history_publisher) {
+ history_publisher_ = history_publisher;
+
// Start checking recent changes and committing them.
ScheduleFlushOldChanges();
return true;
@@ -306,6 +310,10 @@ bool TextDatabaseManager::AddPageData(const GURL& url,
HISTOGRAM_TIMES(L"History.AddFTSData",
TimeTicks::Now() - beginning_time);
+
+ if (history_publisher_)
+ history_publisher_->PublishPageContent(visit_time, url, title, body);
+
return success;
}