diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-10 12:55:00 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-10 12:55:00 +0000 |
commit | 33b61bcc0c64b4d44377f86df8746b54f2bce01b (patch) | |
tree | 75ce8e196f085e3799e8c0ac48ec31b2545b8a09 /chrome/browser/browsing_data_database_helper.cc | |
parent | ded71afbd762da9b5a00fceaa1b75758d317fe2b (diff) | |
download | chromium_src-33b61bcc0c64b4d44377f86df8746b54f2bce01b.zip chromium_src-33b61bcc0c64b4d44377f86df8746b54f2bce01b.tar.gz chromium_src-33b61bcc0c64b4d44377f86df8746b54f2bce01b.tar.bz2 |
Wrappers around BrowsingDataHelpers that returned canned responses.
BUG=45230
TEST=CannedBrowsingData*HelperTest.*
Review URL: http://codereview.chromium.org/2707001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49388 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browsing_data_database_helper.cc')
-rw-r--r-- | chrome/browser/browsing_data_database_helper.cc | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/chrome/browser/browsing_data_database_helper.cc b/chrome/browser/browsing_data_database_helper.cc index 7ff2428..27549f5 100644 --- a/chrome/browser/browsing_data_database_helper.cc +++ b/chrome/browser/browsing_data_database_helper.cc @@ -110,3 +110,29 @@ void BrowsingDataDatabaseHelper::DeleteDatabaseInFileThread( return; tracker_->DeleteDatabase(UTF8ToUTF16(origin), UTF8ToUTF16(name), NULL); } + +CannedBrowsingDataDatabaseHelper::CannedBrowsingDataDatabaseHelper( + Profile* profile) + : BrowsingDataDatabaseHelper(profile) { +} + +void CannedBrowsingDataDatabaseHelper::AddDatabase( + const GURL& origin, + const std::string& name, + const std::string& description) { + WebKit::WebSecurityOrigin web_security_origin = + WebKit::WebSecurityOrigin::createFromString( + UTF8ToUTF16(origin.spec())); + database_info_.push_back(DatabaseInfo( + web_security_origin.host().utf8(), + name, + web_security_origin.databaseIdentifier().utf8(), + description, + 0, + base::Time())); +} + +void CannedBrowsingDataDatabaseHelper::StartFetching( + Callback1<const std::vector<DatabaseInfo>& >::Type* callback) { + callback->Run(database_info_); +} |