summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-25 06:16:15 +0000
committerrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-25 06:16:15 +0000
commit1fba517d8bff9ddc361cc3e4d85e2d080540e663 (patch)
treec757c206f1b4e1b0e799a1172c42671c71512f45
parentf8e55e7f62fbc1156c4bf99b114adb488f78ef6a (diff)
downloadchromium_src-1fba517d8bff9ddc361cc3e4d85e2d080540e663.zip
chromium_src-1fba517d8bff9ddc361cc3e4d85e2d080540e663.tar.gz
chromium_src-1fba517d8bff9ddc361cc3e4d85e2d080540e663.tar.bz2
Add an icon for local storage and web databses in the cookie manager.
BUG=33196 TEST=Go to http://webkit.org/misc/DatabaseExample.html. Open cookie manager and find entry for webkit.org. See database icon. TEST=Go to http://demos.hacks.mozilla.org/openweb/todo/ and repeat above steps. Same icon. Review URL: http://codereview.chromium.org/661064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39990 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/app/theme/cookie_storage.pngbin0 -> 800 bytes
-rw-r--r--chrome/app/theme/theme_resources.grd1
-rw-r--r--chrome/browser/cookies_tree_model.cc10
3 files changed, 9 insertions, 2 deletions
diff --git a/chrome/app/theme/cookie_storage.png b/chrome/app/theme/cookie_storage.png
new file mode 100644
index 0000000..16b899f
--- /dev/null
+++ b/chrome/app/theme/cookie_storage.png
Binary files differ
diff --git a/chrome/app/theme/theme_resources.grd b/chrome/app/theme/theme_resources.grd
index c449373..08c7ed6 100644
--- a/chrome/app/theme/theme_resources.grd
+++ b/chrome/app/theme/theme_resources.grd
@@ -208,6 +208,7 @@
<include name="IDR_FINDINPAGE_NEXT_H" file="find_next_h.png" type="BINDATA" />
<include name="IDR_FINDINPAGE_NEXT_P" file="find_next_d.png" type="BINDATA" />
<include name="IDR_COOKIE_ICON" file="cookie.png" type="BINDATA" />
+ <include name="IDR_COOKIE_STORAGE_ICON" file="cookie_storage.png" type="BINDATA" />
<include name="IDR_INFOBAR_AUTOFILL" file="infobar_autofill.png" type="BINDATA" />
<include name="IDR_INFOBAR_RESTORE_SESSION" file="infobar_restore.png" type="BINDATA" />
<include name="IDR_INFOBAR_SAVE_PASSWORD" file="infobar_savepassword.png" type="BINDATA" />
diff --git a/chrome/browser/cookies_tree_model.cc b/chrome/browser/cookies_tree_model.cc
index 717ef27..99cc0ad 100644
--- a/chrome/browser/cookies_tree_model.cc
+++ b/chrome/browser/cookies_tree_model.cc
@@ -357,6 +357,8 @@ void CookiesTreeModel::GetIcons(std::vector<SkBitmap>* icons) {
IDR_DEFAULT_FAVICON));
icons->push_back(*ResourceBundle::GetSharedInstance().GetBitmapNamed(
IDR_COOKIE_ICON));
+ icons->push_back(*ResourceBundle::GetSharedInstance().GetBitmapNamed(
+ IDR_COOKIE_STORAGE_ICON));
}
// Returns the index of the icon to use for |node|. Return -1 to use the
@@ -372,9 +374,13 @@ int CookiesTreeModel::GetIconIndex(TreeModelNode* node) {
return COOKIE;
break;
case CookieTreeNode::DetailedInfo::TYPE_DATABASE:
- // TODO(jochen): add an icon for databases.
+ return DATABASE;
+ break;
case CookieTreeNode::DetailedInfo::TYPE_LOCAL_STORAGE:
- // TODO(bulach): add an icon for local storage.
+ // The differences between local storage and HTML5 databases are semantic
+ // enough that the user will not likely care if they share an icon.
+ return DATABASE;
+ break;
default:
return -1;
}