Skip to content

Commit

Permalink
Remove unused png assets.
Browse files Browse the repository at this point in the history
Use cookie vector icon in cookie tree model (page info bubble sub-
dialog). Also remove reference there to IDR_DEFAULT_FAVICON, which
wasn't being used.

Bug: 522168
Change-Id: I655ba06ae438756ca47db92cfe97f00342493d39
Reviewed-on: https://chromium-review.googlesource.com/c/1399161
Commit-Queue: Evan Stade <estade@chromium.org>
Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620922}
  • Loading branch information
Evan Stade authored and Commit Bot committed Jan 8, 2019
1 parent fe02395 commit 95570bc
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 19 deletions.
Binary file not shown.
Binary file not shown.
Binary file removed chrome/app/theme/default_100_percent/common/cookies.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed chrome/app/theme/default_200_percent/common/cookies.png
Binary file not shown.
Binary file not shown.
6 changes: 0 additions & 6 deletions chrome/app/theme/theme_resources.grd
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@
<!-- KEEP THESE IN ALPHABETICAL ORDER! DO NOT ADD TO RANDOM PLACES JUST
BECAUSE YOUR RESOURCES ARE FUNCTIONALLY RELATED OR FALL UNDER THE
SAME CONDITIONALS. -->
<if expr="enable_app_list">
<structure type="chrome_scaled_image" name="IDR_APP_LIST_TAB_OVERLAY" file="common/app_list_v1_overlay.png" />
</if>
<if expr="toolkit_views and not is_macosx">
<structure type="chrome_scaled_image" name="IDR_APP_WINDOW_CLOSE" file="common/app_window_close.png" />
<structure type="chrome_scaled_image" name="IDR_APP_WINDOW_CLOSE_H" file="common/app_window_close_hover.png" />
Expand Down Expand Up @@ -90,7 +87,6 @@
<if expr="is_win">
<structure type="chrome_scaled_image" name="IDR_CONFLICT_FAVICON" file="common/favicon_conflicts.png" />
</if>
<structure type="chrome_scaled_image" name="IDR_COOKIES" file="common/cookies.png" />
<structure type="chrome_scaled_image" name="IDR_COOKIE_STORAGE_ICON" file="common/cookie_storage.png" />
<if expr="chromeos">
<structure type="chrome_scaled_image" name="IDR_DEVICE_DISABLED" file="cros/device_disabled.png" />
Expand Down Expand Up @@ -265,7 +261,6 @@
<structure type="chrome_scaled_image" name="IDR_LOGO_AVATAR_CIRCLE_BLUE_COLOR" file="cros/logo_avatar_circle_blue_color.png" />
<structure type="chrome_scaled_image" name="IDR_LOGO_GOOGLE_COLOR_90" file="cros/logo_google_color_90.png" />
</if>
<structure type="chrome_scaled_image" name="IDR_SUPERVISED_USER_PLACEHOLDER" file="common/supervised_user_placeholder.png" />
<if expr="is_macosx">
<structure type="chrome_scaled_image" name="IDR_SWIPE_BACK" file="mac/back_large.png" />
<structure type="chrome_scaled_image" name="IDR_SWIPE_FORWARD" file="mac/forward_large.png" />
Expand Down Expand Up @@ -324,7 +319,6 @@
<structure type="chrome_scaled_image" name="IDR_USER_IMAGE_CAPTURE" file="cros/snapshot_wide.png" />
<structure type="chrome_scaled_image" name="IDR_USER_IMAGE_RECYCLE" file="cros/discard_wide.png" />
</if>
<structure type="chrome_scaled_image" name="IDR_WARNING" file="common/alert_small.png" />
<if expr="not _google_chrome">
<structure type="chrome_scaled_image" name="IDR_WEBSTORE_ICON" file="chromium/webstore_icon.png" />
<structure type="chrome_scaled_image" name="IDR_WEBSTORE_ICON_16" file="chromium/webstore_icon_16.png" />
Expand Down
14 changes: 6 additions & 8 deletions chrome/browser/browsing_data/cookies_tree_model.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "chrome/app/vector_icons/vector_icons.h"
#include "chrome/browser/browsing_data/browsing_data_cookie_helper.h"
#include "chrome/browser/browsing_data/browsing_data_flash_lso_helper.h"
#include "chrome/browser/content_settings/cookie_settings_factory.h"
Expand All @@ -32,7 +33,9 @@
#include "net/url_request/url_request_context.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/color_palette.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/paint_vector_icon.h"
#include "ui/resources/grit/ui_resources.h"
#include "url/gurl.h"
#include "url/origin.h"
Expand Down Expand Up @@ -1175,12 +1178,8 @@ int CookiesTreeModel::GetSendForMessageID(const net::CanonicalCookie& cookie) {
// Returns the set of icons for the nodes in the tree. You only need override
// this if you don't want to use the default folder icons.
void CookiesTreeModel::GetIcons(std::vector<gfx::ImageSkia>* icons) {
icons->push_back(*ui::ResourceBundle::GetSharedInstance()
.GetNativeImageNamed(IDR_DEFAULT_FAVICON)
.ToImageSkia());
icons->push_back(*ui::ResourceBundle::GetSharedInstance()
.GetNativeImageNamed(IDR_COOKIES)
.ToImageSkia());
icons->push_back(
gfx::CreateVectorIcon(kCookieIcon, 18, gfx::kChromeIconGrey));
icons->push_back(*ui::ResourceBundle::GetSharedInstance()
.GetNativeImageNamed(IDR_COOKIE_STORAGE_ICON)
.ToImageSkia());
Expand All @@ -1192,8 +1191,6 @@ void CookiesTreeModel::GetIcons(std::vector<gfx::ImageSkia>* icons) {
int CookiesTreeModel::GetIconIndex(ui::TreeModelNode* node) {
CookieTreeNode* ct_node = static_cast<CookieTreeNode*>(node);
switch (ct_node->GetDetailedInfo().node_type) {
case CookieTreeNode::DetailedInfo::TYPE_HOST:
return ORIGIN;
case CookieTreeNode::DetailedInfo::TYPE_COOKIE:
return COOKIE;

Expand All @@ -1209,6 +1206,7 @@ int CookiesTreeModel::GetIconIndex(ui::TreeModelNode* node) {
case CookieTreeNode::DetailedInfo::TYPE_CACHE_STORAGE:
case CookieTreeNode::DetailedInfo::TYPE_MEDIA_LICENSE:
return DATABASE;
case CookieTreeNode::DetailedInfo::TYPE_HOST:
case CookieTreeNode::DetailedInfo::TYPE_QUOTA:
return -1;
default:
Expand Down
6 changes: 1 addition & 5 deletions chrome/browser/browsing_data/cookies_tree_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -865,11 +865,7 @@ class CookiesTreeModel : public ui::TreeNodeModel<CookieTreeNode> {
static std::unique_ptr<CookiesTreeModel> CreateForProfile(Profile* profile);

private:
enum CookieIconIndex {
ORIGIN = 0,
COOKIE = 1,
DATABASE = 2
};
enum CookieIconIndex { COOKIE = 0, DATABASE = 1 };

// Reset the counters for batches.
void ResetBatches();
Expand Down

0 comments on commit 95570bc

Please sign in to comment.