Skip to content

Commit

Permalink
[M91 merge]CrOS: Pass app_id string as const reference in GetBadgeCol…
Browse files Browse the repository at this point in the history
…orForApp

(cherry picked from commit 4025fda)

Bug: 1132117
Change-Id: I7aaa6d1b267e9d7085a5ab1dd2a3fa93145a4702
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2815834
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Matthew Mourgos <mmourgos@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#870767}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2822968
Cr-Commit-Position: refs/branch-heads/4472@{#22}
Cr-Branched-From: 3d60439-refs/heads/master@{#870763}
  • Loading branch information
Matthew Mourgos authored and Chromium LUCI CQ committed Apr 12, 2021
1 parent 1b34f51 commit 5bd8952
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions chrome/browser/ui/ash/notification_badge_color_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ NotificationBadgeColorCache::NotificationBadgeColorCache() = default;

NotificationBadgeColorCache::~NotificationBadgeColorCache() = default;

SkColor NotificationBadgeColorCache::GetBadgeColorForApp(std::string app_id,
gfx::ImageSkia icon) {
SkColor NotificationBadgeColorCache::GetBadgeColorForApp(
const std::string& app_id,
gfx::ImageSkia icon) {
AppIdBadgeColor::const_iterator it = app_id_badge_color_map_.find(app_id);
if (it != app_id_badge_color_map_.end())
return it->second;
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ui/ash/notification_badge_color_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class NotificationBadgeColorCache {

// Calculate the color for the notification badge and cache it. If the
// |app_id| already has a cached color then return that instead.
SkColor GetBadgeColorForApp(std::string app_id, gfx::ImageSkia icon);
SkColor GetBadgeColorForApp(const std::string& app_id, gfx::ImageSkia icon);

private:
using AppIdBadgeColor = std::map<std::string, SkColor>;
Expand Down

0 comments on commit 5bd8952

Please sign in to comment.