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

Unified Diff: chrome/browser/chromeos/power/peripheral_battery_observer.cc

Issue 576823003: Merge two Notification constructors, increase priority of low-battery notification. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Wrap kNotificationOriginUrl in GURL Created 6 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/notifications/desktop_notification_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/power/peripheral_battery_observer.cc
diff --git a/chrome/browser/chromeos/power/peripheral_battery_observer.cc b/chrome/browser/chromeos/power/peripheral_battery_observer.cc
index 51344ab9a00de7e28f602b4fad25f7ce7f588333..5e4a7f3d80f9bd2f6205fe2e716b3a9157ebce94 100644
--- a/chrome/browser/chromeos/power/peripheral_battery_observer.cc
+++ b/chrome/browser/chromeos/power/peripheral_battery_observer.cc
@@ -216,17 +216,21 @@ bool PeripheralBatteryObserver::PostNotification(const std::string& address,
battery.level);
Notification notification(
- // TODO(mukai): add SYSTEM priority and use here.
+ message_center::NOTIFICATION_TYPE_SIMPLE,
GURL(kNotificationOriginUrl),
- ui::ResourceBundle::GetSharedInstance().GetImageNamed(
- IDR_NOTIFICATION_PERIPHERAL_BATTERY_LOW),
base::UTF8ToUTF16(battery.name),
string_text,
+ ui::ResourceBundle::GetSharedInstance().GetImageNamed(
+ IDR_NOTIFICATION_PERIPHERAL_BATTERY_LOW),
blink::WebTextDirectionDefault,
+ message_center::NotifierId(GURL(kNotificationOriginUrl)),
base::string16(),
base::UTF8ToUTF16(address),
+ message_center::RichNotificationData(),
new PeripheralBatteryNotificationDelegate(address));
+ notification.set_priority(message_center::SYSTEM_PRIORITY);
+
notification_manager->Add(
notification,
ProfileManager::GetPrimaryUserProfile());
« no previous file with comments | « no previous file | chrome/browser/notifications/desktop_notification_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698