Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Unified Diff: chrome/browser/recovery/recovery_install_global_error.cc

Issue 2576643002: Remove last vestigial uses of "update needed" png assets. (Closed)
Patch Set: rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/theme/theme_resources.grd ('k') | chrome/browser/ui/views/critical_notification_bubble_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/recovery/recovery_install_global_error.cc
diff --git a/chrome/browser/recovery/recovery_install_global_error.cc b/chrome/browser/recovery/recovery_install_global_error.cc
index 8e2964a010146741758cd82c6790e6813b7769c7..0b4d55bbdd9ba4101802c3582bb85eb44c3fa36f 100644
--- a/chrome/browser/recovery/recovery_install_global_error.cc
+++ b/chrome/browser/recovery/recovery_install_global_error.cc
@@ -14,10 +14,11 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/grit/chromium_strings.h"
-#include "chrome/grit/theme_resources.h"
#include "components/prefs/pref_service.h"
#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/resource/resource_bundle.h"
+#include "ui/gfx/paint_vector_icon.h"
+#include "ui/gfx/vector_icons_public.h"
+#include "ui/native_theme/native_theme.h"
RecoveryInstallGlobalError::RecoveryInstallGlobalError(Profile* profile)
: elevation_needed_(false),
@@ -43,8 +44,7 @@ RecoveryInstallGlobalError::RecoveryInstallGlobalError(Profile* profile)
base::Unretained(this)));
}
-RecoveryInstallGlobalError::~RecoveryInstallGlobalError() {
-}
+RecoveryInstallGlobalError::~RecoveryInstallGlobalError() {}
void RecoveryInstallGlobalError::Shutdown() {
GlobalErrorServiceFactory::GetForProfile(profile_)->RemoveUnownedGlobalError(
@@ -68,8 +68,10 @@ base::string16 RecoveryInstallGlobalError::MenuItemLabel() {
}
gfx::Image RecoveryInstallGlobalError::MenuItemIcon() {
- return ResourceBundle::GetSharedInstance().GetNativeImageNamed(
- IDR_UPDATE_MENU_SEVERITY_HIGH);
+ return gfx::Image(gfx::CreateVectorIcon(
+ gfx::VectorIconId::BROWSER_TOOLS_UPDATE,
+ ui::NativeTheme::GetInstanceForNativeUi()->GetSystemColor(
+ ui::NativeTheme::kColorId_AlertSeverityHigh)));
}
void RecoveryInstallGlobalError::ExecuteMenuItem(Browser* browser) {
@@ -94,8 +96,9 @@ bool RecoveryInstallGlobalError::ShouldCloseOnDeactivate() const {
}
gfx::Image RecoveryInstallGlobalError::GetBubbleViewIcon() {
- return ResourceBundle::GetSharedInstance().GetNativeImageNamed(
- IDR_UPDATE_MENU_SEVERITY_HIGH);
+ // TODO(estade): there shouldn't be an icon in the bubble, but
+ // GlobalErrorBubbleView currently requires it. See crbug.com/673995
+ return MenuItemIcon();
}
base::string16 RecoveryInstallGlobalError::GetBubbleViewTitle() {
« no previous file with comments | « chrome/app/theme/theme_resources.grd ('k') | chrome/browser/ui/views/critical_notification_bubble_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698