summaryrefslogtreecommitdiffstats
path: root/chrome/browser/history/text_database_manager.cc
diff options
context:
space:
mode:
authorbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-07 19:03:40 +0000
committerbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-07 19:03:40 +0000
commit599874373cf5ae8b1ba75afda760534063012ccd (patch)
treea2fc39478768610c538e34c6fc98032dec630760 /chrome/browser/history/text_database_manager.cc
parentded678ec915e3ca698c91d67611ba48f8a938511 (diff)
downloadchromium_src-599874373cf5ae8b1ba75afda760534063012ccd.zip
chromium_src-599874373cf5ae8b1ba75afda760534063012ccd.tar.gz
chromium_src-599874373cf5ae8b1ba75afda760534063012ccd.tar.bz2
Added a new interface IChromeHistoryIndexer which needs to be implemented by
indexers which are interested in indexing Chrome's web history. These should register their CLSID in HKCU\Software\Google\Google Chrome\IndexerPlugins and this is be used by Chrome to publish its index. Added code to publish the index too. Checked in for Vijay Thadkal <veejay.t.s@gmail.com> (Google). Reitveld #9007. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5002 0039d316-1c4b-4281-b951-d872f2087c98
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;
}