diff options
author | michaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-25 23:37:19 +0000 |
---|---|---|
committer | michaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-25 23:37:19 +0000 |
commit | ab30809a167f60c09bb25c303213cf416db05a8a (patch) | |
tree | 1aaad2881475e9f1f6d1f10d301807c7da9e6e15 /chrome/browser/ui | |
parent | f1b666505ae42a96f2bfd230f40ff3bca8cf283b (diff) | |
download | chromium_src-ab30809a167f60c09bb25c303213cf416db05a8a.zip chromium_src-ab30809a167f60c09bb25c303213cf416db05a8a.tar.gz chromium_src-ab30809a167f60c09bb25c303213cf416db05a8a.tar.bz2 |
* Wire up the delete command in the cookie tree UI to actually delete indexedDBs. Also cleaned up some internal structures used by the UI layer.
* Clean up some loose ends around the transition from sqlite backing to leveldb backing. Code had not been updated to reflect that the indexedDBpath is a directory path instead of a file path.
* Fix a problem with reporting inconsistent size value to the quota manager. Now we always compute deltas against a cached size value and don't change the cached size value w/o reporting a delta.
* Fix a problem with erroneously accessing the filesystem for queries about indexed db usage when working with incognito profiles.
BUG=56249,76641
Review URL: http://codereview.chromium.org/7692016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98352 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui')
5 files changed, 8 insertions, 17 deletions
diff --git a/chrome/browser/ui/cocoa/content_settings/cookie_details.mm b/chrome/browser/ui/cocoa/content_settings/cookie_details.mm index 8b9bd8e..e7fc214 100644 --- a/chrome/browser/ui/cocoa/content_settings/cookie_details.mm +++ b/chrome/browser/ui/cocoa/content_settings/cookie_details.mm @@ -243,7 +243,8 @@ if ((self = [super init])) { type_ = kCocoaCookieDetailsTypeTreeIndexedDB; canEditExpiration_ = NO; - domain_.reset([base::SysUTF8ToNSString(indexedDBInfo->origin) retain]); + domain_.reset([base::SysUTF8ToNSString( + indexedDBInfo->origin.spec()) retain]); fileSize_.reset([base::SysUTF16ToNSString( ui::FormatBytes(indexedDBInfo->size)) retain]); lastModified_.reset([base::SysUTF16ToNSString( diff --git a/chrome/browser/ui/cocoa/content_settings/cookie_details_unittest.mm b/chrome/browser/ui/cocoa/content_settings/cookie_details_unittest.mm index 7a82635..bffdee8 100644 --- a/chrome/browser/ui/cocoa/content_settings/cookie_details_unittest.mm +++ b/chrome/browser/ui/cocoa/content_settings/cookie_details_unittest.mm @@ -140,27 +140,17 @@ TEST_F(CookiesDetailsTest, CreateForTreeAppCache) { TEST_F(CookiesDetailsTest, CreateForTreeIndexedDB) { scoped_nsobject<CocoaCookieDetails> details; - std::string protocol("http"); - std::string host("moose.org"); - unsigned short port = 80; - std::string database_identifier("id"); - std::string origin("moose.org"); - FilePath file_path(FILE_PATH_LITERAL("/")); + GURL origin("http://moose.org/"); int64 size = 1234; base::Time last_modified = base::Time::Now(); - BrowsingDataIndexedDBHelper::IndexedDBInfo info(protocol, - host, - port, - database_identifier, - origin, - file_path, + BrowsingDataIndexedDBHelper::IndexedDBInfo info(origin, size, last_modified); details.reset([[CocoaCookieDetails alloc] initWithIndexedDBInfo:&info]); EXPECT_EQ([details.get() type], kCocoaCookieDetailsTypeTreeIndexedDB); - EXPECT_NSEQ(@"moose.org", [details.get() domain]); + EXPECT_NSEQ(@"http://moose.org/", [details.get() domain]); EXPECT_NSEQ(@"1,234 B", [details.get() fileSize]); EXPECT_NSNE(@"", [details.get() lastModified]); diff --git a/chrome/browser/ui/gtk/gtk_chrome_cookie_view.cc b/chrome/browser/ui/gtk/gtk_chrome_cookie_view.cc index e1844ba..c44ab46 100644 --- a/chrome/browser/ui/gtk/gtk_chrome_cookie_view.cc +++ b/chrome/browser/ui/gtk/gtk_chrome_cookie_view.cc @@ -592,7 +592,7 @@ void gtk_chrome_cookie_view_display_indexed_db( UpdateVisibleDetailedInfo(self, self->indexed_db_details_table_); gtk_entry_set_text(GTK_ENTRY(self->indexed_db_origin_entry_), - indexed_db_info.origin.c_str()); + indexed_db_info.origin.spec().c_str()); gtk_entry_set_text(GTK_ENTRY(self->indexed_db_size_entry_), UTF16ToUTF8(ui::FormatBytes( indexed_db_info.size)).c_str()); diff --git a/chrome/browser/ui/views/indexed_db_info_view.cc b/chrome/browser/ui/views/indexed_db_info_view.cc index d033dca..a617c63 100644 --- a/chrome/browser/ui/views/indexed_db_info_view.cc +++ b/chrome/browser/ui/views/indexed_db_info_view.cc @@ -34,7 +34,7 @@ IndexedDBInfoView::~IndexedDBInfoView() { void IndexedDBInfoView::SetIndexedDBInfo( const BrowsingDataIndexedDBHelper::IndexedDBInfo& indexed_db_info) { - origin_value_field_->SetText(UTF8ToWide(indexed_db_info.origin)); + origin_value_field_->SetText(UTF8ToWide(indexed_db_info.origin.spec())); size_value_field_->SetText(ui::FormatBytes(indexed_db_info.size)); last_modified_value_field_->SetText( base::TimeFormatFriendlyDateAndTime(indexed_db_info.last_modified)); diff --git a/chrome/browser/ui/webui/cookies_tree_model_util.cc b/chrome/browser/ui/webui/cookies_tree_model_util.cc index 05dc69c..599e995 100644 --- a/chrome/browser/ui/webui/cookies_tree_model_util.cc +++ b/chrome/browser/ui/webui/cookies_tree_model_util.cc @@ -168,7 +168,7 @@ bool GetCookieTreeNodeDictionary(const CookieTreeNode& node, const BrowsingDataIndexedDBHelper::IndexedDBInfo& indexed_db_info = *node.GetDetailedInfo().indexed_db_info; - dict->SetString(kKeyOrigin, indexed_db_info.origin); + dict->SetString(kKeyOrigin, indexed_db_info.origin.spec()); dict->SetString(kKeySize, ui::FormatBytes(indexed_db_info.size)); dict->SetString(kKeyModified, UTF16ToUTF8( base::TimeFormatFriendlyDateAndTime(indexed_db_info.last_modified))); |