summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources/options
diff options
context:
space:
mode:
authortzik@chromium.org <tzik@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-05 13:01:48 +0000
committertzik@chromium.org <tzik@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-05 13:01:48 +0000
commitcd9adcb8fd0c85a18fa78ce4cda3a7981d9aae07 (patch)
treeeadb0d3a51458eb2a8906b499b32cd58ec31cf4e /chrome/browser/resources/options
parent18c685f5c5b5bc9cb099803a2088709c0aa5c471 (diff)
downloadchromium_src-cd9adcb8fd0c85a18fa78ce4cda3a7981d9aae07.zip
chromium_src-cd9adcb8fd0c85a18fa78ce4cda3a7981d9aae07.tar.gz
chromium_src-cd9adcb8fd0c85a18fa78ce4cda3a7981d9aae07.tar.bz2
Adding usage entry to chrome://settings/cookies.
BUG=88644 TEST='BrowsingDataQuotaHelperTest.*' Review URL: http://codereview.chromium.org/7387007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95607 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources/options')
-rw-r--r--chrome/browser/resources/options/cookies_list.js24
-rw-r--r--chrome/browser/resources/options/cookies_view.css8
2 files changed, 25 insertions, 7 deletions
diff --git a/chrome/browser/resources/options/cookies_list.js b/chrome/browser/resources/options/cookies_list.js
index d4722cc..1650c11 100644
--- a/chrome/browser/resources/options/cookies_list.js
+++ b/chrome/browser/resources/options/cookies_list.js
@@ -119,6 +119,8 @@ cr.define('options', function() {
this.siteChild.className = 'cookie-site';
this.dataChild = this.ownerDocument.createElement('div');
this.dataChild.className = 'cookie-data';
+ this.sizeChild = this.ownerDocument.createElement('div');
+ this.sizeChild.className = 'cookie-size';
this.itemsChild = this.ownerDocument.createElement('div');
this.itemsChild.className = 'cookie-items';
this.infoChild = this.ownerDocument.createElement('div');
@@ -131,6 +133,7 @@ cr.define('options', function() {
var content = this.contentElement;
content.appendChild(this.siteChild);
content.appendChild(this.dataChild);
+ content.appendChild(this.sizeChild);
content.appendChild(this.itemsChild);
this.itemsChild.appendChild(this.infoChild);
if (this.origin && this.origin.data) {
@@ -250,6 +253,10 @@ cr.define('options', function() {
else
text = list[i];
this.dataChild.textContent = text;
+ if (info.quota && info.quota.totalUsage) {
+ this.sizeChild.textContent = info.quota.totalUsage;
+ }
+
if (this.expanded)
this.updateItems_();
},
@@ -430,18 +437,21 @@ cr.define('options', function() {
for (var i = 0; i < this.children.length; ++i)
this.children[i].collectSummaryInfo(info);
} else if (this.data && !this.data.hasChildren) {
- if (this.data.type == 'cookie')
+ if (this.data.type == 'cookie') {
info.cookies++;
- else if (this.data.type == 'database')
+ } else if (this.data.type == 'database') {
info.database = true;
- else if (this.data.type == 'local_storage')
+ } else if (this.data.type == 'local_storage') {
info.localStorage = true;
- else if (this.data.type == 'app_cache')
+ } else if (this.data.type == 'app_cache') {
info.appCache = true;
- else if (this.data.type == 'indexed_db')
+ } else if (this.data.type == 'indexed_db') {
info.indexedDb = true;
- else if (this.data.type == 'file_system')
+ } else if (this.data.type == 'file_system') {
info.fileSystem = true;
+ } else if (this.data.type == 'quota') {
+ info.quota = this.data;
+ }
}
},
@@ -474,6 +484,8 @@ cr.define('options', function() {
text = localStrings.getString('cookie_file_system');
break;
}
+ if (!text)
+ return;
var div = item.ownerDocument.createElement('div');
div.className = 'cookie-item';
// Help out screen readers and such: this is a clickable thing.
diff --git a/chrome/browser/resources/options/cookies_view.css b/chrome/browser/resources/options/cookies_view.css
index 19c5b42..2aab6b2 100644
--- a/chrome/browser/resources/options/cookies_view.css
+++ b/chrome/browser/resources/options/cookies_view.css
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2010 The Chromium Authors. All rights reserved.
+Copyright (c) 2011 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
*/
@@ -88,6 +88,12 @@ list.cookie-list > .deletable-item[selected] .cookie-site {
display: inline-block;
}
+.cookie-size {
+ display: inline-block;
+ float: right;
+ margin-right: 3em;
+}
+
list.cookie-list > .deletable-item[selected] .cookie-data {
-webkit-user-select: text;
}