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

Unified Diff: chrome/browser/background/background_contents_service.cc

Issue 160923002: Fixes a typo: use the default image if the extension doesn't have icon. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win Created 6 years, 10 months 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
Index: chrome/browser/background/background_contents_service.cc
diff --git a/chrome/browser/background/background_contents_service.cc b/chrome/browser/background/background_contents_service.cc
index 59202dd2ced85ff4e8179bb8e1b665ea87dbfdb9..be4653e1c07aeb52d2c7a29f49d569f848541615 100644
--- a/chrome/browser/background/background_contents_service.cc
+++ b/chrome/browser/background/background_contents_service.cc
@@ -166,7 +166,7 @@ void NotificationImageReady(
Profile* profile,
const gfx::Image& icon) {
gfx::Image notification_icon(icon);
- if (icon.IsEmpty()) {
+ if (notification_icon.IsEmpty()) {
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
notification_icon = rb.GetImageNamed(IDR_EXTENSION_DEFAULT_ICON);
}
@@ -180,7 +180,7 @@ void NotificationImageReady(
GURL() /* empty origin */,
base::string16(),
message,
- icon,
+ notification_icon,
base::string16(),
delegate.get(),
profile);
@@ -280,6 +280,19 @@ void BackgroundContentsService::
restart_delay_in_ms_ = restart_delay_in_ms;
}
+// static
+std::string BackgroundContentsService::GetNotificationIdForExtensionForTesting(
+ const std::string& extension_id) {
+ return kNotificationPrefix + extension_id;
+}
+
+// static
+void BackgroundContentsService::ShowBalloonForTesting(
+ const extensions::Extension* extension,
+ Profile* profile) {
+ ShowBalloon(extension, profile);
+}
+
std::vector<BackgroundContents*>
BackgroundContentsService::GetBackgroundContents() const
{

Powered by Google App Engine
This is Rietveld 408576698