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

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

Issue 1395093002: Fix system notifications incorrectly marked as type WEB_PAGE (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@timeout
Patch Set: Address peter's review nits Created 5 years, 2 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/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 d21891a8d543e8bd20329ad1cba3a53a6f33ac32..6f2e927b3b7f8804b7e3d7da4425c55183ef7ece 100644
--- a/chrome/browser/chromeos/power/peripheral_battery_observer.cc
+++ b/chrome/browser/chromeos/power/peripheral_battery_observer.cc
@@ -40,6 +40,7 @@ const int kLowBatteryLevel = 15;
const int kNotificationIntervalSec = 60;
const char kNotificationOriginUrl[] = "chrome://peripheral-battery";
+const char kNotifierId[] = "power.peripheral-battery";
// HID Bluetooth device's battery sysfs entry path looks like
// "/sys/class/power_supply/hid-AA:BB:CC:DD:EE:FF-battery".
@@ -212,7 +213,8 @@ bool PeripheralBatteryObserver::PostNotification(const std::string& address,
message_center::NOTIFICATION_TYPE_SIMPLE, base::UTF8ToUTF16(battery.name),
string_text, ui::ResourceBundle::GetSharedInstance().GetImageNamed(
IDR_NOTIFICATION_PERIPHERAL_BATTERY_LOW),
- message_center::NotifierId(GURL(kNotificationOriginUrl)),
+ message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT,
+ kNotifierId),
base::string16(), GURL(kNotificationOriginUrl), address,
message_center::RichNotificationData(),
new PeripheralBatteryNotificationDelegate(address));

Powered by Google App Engine
This is Rietveld 408576698