Skip to content

Commit

Permalink
Revert "[M115] Update icon for the Tailored Security desktop notifica…
Browse files Browse the repository at this point in the history
…tion"

This reverts commit a2070b1.

Reason for revert: culprit of b/286092832 that blocks release
                   build.

Original change's description:
> [M115] Update icon for the Tailored Security desktop notification
>
> This change replaces the old blue checkmark icon for the Tailored
> security desktop notification and updates it to the blue google shield
> icon depending on the status of our feature flag.
>
> Old Screenshot: https://screenshot.googleplex.com/5YU6iApKaoYFPL7.png
> New Screenshot: https://screenshot.googleplex.com/AnuUPcDYJZ5j4wb.png
>
> (cherry picked from commit d498f2b)
>
> Bug: 1414214
> Change-Id: I6f83423290d0237857a1926c3693efc649c65e6d
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4521439
> Reviewed-by: Ted Choc <tedchoc@chromium.org>
> Reviewed-by: Daniel Rubery <drubery@chromium.org>
> Reviewed-by: Javier Castro <jacastro@chromium.org>
> Commit-Queue: Awad Osman <awado@google.com>
> Cr-Original-Commit-Position: refs/heads/main@{#1152046}
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4591271
> Cr-Commit-Position: refs/branch-heads/5790@{#386}
> Cr-Branched-From: 1d71a33-refs/heads/main@{#1148114}

Bug: 1414214
Change-Id: I78c1b88d95ebd69c588b0f8388ae09a955ee87b1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4595445
Auto-Submit: Wen-Chien Wang <wcwang@chromium.org>
Owners-Override: Wen-Chien Wang <wcwang@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/branch-heads/5790@{#425}
Cr-Branched-From: 1d71a33-refs/heads/main@{#1148114}
  • Loading branch information
Wen-Chien Wang authored and Chromium LUCI CQ committed Jun 6, 2023
1 parent 02c4bca commit cc60bf5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
1 change: 0 additions & 1 deletion chrome/app/theme/theme_resources.grd
Expand Up @@ -358,7 +358,6 @@
<structure type="chrome_scaled_image" name="IDR_WEBSTORE_ICON_24" file="google_chrome/webstore_icon_24.png" />
<structure type="chrome_scaled_image" name="IDR_WEBSTORE_ICON_32" file="google_chrome/webstore_icon_32.png" />
<structure type="chrome_scaled_image" name="IDR_TRANSLATE_TAB_WORDMARK" file="google_chrome/translate_tab_wordmark.png" />
<structure type="chrome_scaled_image" name="IDR_TAILORED_SECURITY_UNCONSENTED_NOTIFICATION" file="google_chrome/safer_with_google_blue_shield.png" />
</if>
</if>
<if expr="not is_android">
Expand Down
Expand Up @@ -18,7 +18,6 @@
#include "chrome/grit/chromium_strings.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/grit/google_chrome_strings.h"
#include "chrome/grit/theme_resources.h"
#include "components/prefs/pref_service.h"
#include "components/safe_browsing/core/browser/tailored_security_service/tailored_security_outcome.h"
#include "components/safe_browsing/core/common/features.h"
Expand Down Expand Up @@ -112,16 +111,6 @@ void TailoredSecurityNotificationHandler::OnClick(
std::move(completed_closure).Run();
}

ui::ImageModel GetNotificationIcon() {
#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
return ui::ImageModel::FromResourceId(
IDR_TAILORED_SECURITY_UNCONSENTED_NOTIFICATION);
#else
return ui::ImageModel::FromVectorIcon(kSafetyCheckIcon, ui::kColorAccent,
message_center::kNotificationIconSize);
#endif
}

void DisplayTailoredSecurityUnconsentedPromotionNotification(Profile* profile) {
std::string notification_id =
kTailoredSecurityUnconsentedPromotionNotificationId;
Expand All @@ -143,12 +132,12 @@ void DisplayTailoredSecurityUnconsentedPromotionNotification(Profile* profile) {
#else
const message_center::NotifierId notifier_id = GetNotifierId();
#endif
auto icon = (base::FeatureList::IsEnabled(
safe_browsing::kTailoredSecurityUpdatedMessages))
? GetNotificationIcon()
: ui::ImageModel::FromVectorIcon(
kSafetyCheckIcon, ui::kColorAccent,
message_center::kNotificationIconSize);

// TODO(crbug/1257622): Confirm with UX that it's appropriate to use the
// blue color here.
auto icon =
ui::ImageModel::FromVectorIcon(kSafetyCheckIcon, ui::kColorAccent,
message_center::kNotificationIconSize);
LogUnconsentedOutcome(TailoredSecurityOutcome::kShown);
message_center::Notification notification(
message_center::NOTIFICATION_TYPE_SIMPLE, notification_id, title,
Expand Down

0 comments on commit cc60bf5

Please sign in to comment.