diff options
author | dumi@chromium.org <dumi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-09 23:43:34 +0000 |
---|---|---|
committer | dumi@chromium.org <dumi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-09 23:43:34 +0000 |
commit | 2f351cb2a5227e76f180fbf3c2295705944f9ab9 (patch) | |
tree | fc7845119aa8765f9d1e1449367980b41bb05306 /chrome/browser/profile.cc | |
parent | 7719ee4ad47c89053320db220eeb55a80d16d730 (diff) | |
download | chromium_src-2f351cb2a5227e76f180fbf3c2295705944f9ab9.zip chromium_src-2f351cb2a5227e76f180fbf3c2295705944f9ab9.tar.gz chromium_src-2f351cb2a5227e76f180fbf3c2295705944f9ab9.tar.bz2 |
Adding support for DatabaseTracker messages to
DatabaseDispatcherHost. This code will get called as soon as we switch
from WebCore's DatabaseTracker implementation to Chromium's. Also,
cleaned up the pre-existing support for VFS messages.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/340067
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31507 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profile.cc')
-rw-r--r-- | chrome/browser/profile.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc index cbee927..9f62d39 100644 --- a/chrome/browser/profile.cc +++ b/chrome/browser/profile.cc @@ -55,6 +55,7 @@ #include "chrome/common/render_messages.h" #include "grit/locale_settings.h" #include "net/base/strict_transport_security_state.h" +#include "webkit/database/database_tracker.h" #if defined(OS_LINUX) #include "net/ocsp/nss_ocsp.h" @@ -237,6 +238,12 @@ class OffTheRecordProfileImpl : public Profile, return profile_; } + virtual webkit_database::DatabaseTracker* GetDatabaseTracker() { + if (!db_tracker_) + db_tracker_ = new webkit_database::DatabaseTracker(FilePath()); + return db_tracker_; + } + virtual VisitedLinkMaster* GetVisitedLinkMaster() { // We don't provide access to the VisitedLinkMaster when we're OffTheRecord // because we don't want to leak the sites that the user has visited before. @@ -565,6 +572,10 @@ class OffTheRecordProfileImpl : public Profile, // Time we were started. Time start_time_; + // The main database tracker for this profile. + // Should be used only on the file thread. + scoped_refptr<webkit_database::DatabaseTracker> db_tracker_; + DISALLOW_COPY_AND_ASSIGN(OffTheRecordProfileImpl); }; @@ -830,6 +841,12 @@ Profile* ProfileImpl::GetOriginalProfile() { return this; } +webkit_database::DatabaseTracker* ProfileImpl::GetDatabaseTracker() { + if (!db_tracker_) + db_tracker_ = new webkit_database::DatabaseTracker(GetPath()); + return db_tracker_; +} + VisitedLinkMaster* ProfileImpl::GetVisitedLinkMaster() { if (!visited_link_master_.get()) { scoped_ptr<VisitedLinkMaster> visited_links( |