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

Unified Diff: ui/arc/notification/arc_notification_manager.cc

Issue 2357053002: Always use arc::InstanceHolder<T>::GetInstanceForMethod (Closed)
Patch Set: rebase, no code change Created 4 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 | « components/arc/power/arc_power_bridge.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/arc/notification/arc_notification_manager.cc
diff --git a/ui/arc/notification/arc_notification_manager.cc b/ui/arc/notification/arc_notification_manager.cc
index f30dfbdd9286b554a668959f06ac466b501017f5..ddedc4e6703ee72205469f6764ace2b6030a1ff1 100644
--- a/ui/arc/notification/arc_notification_manager.cc
+++ b/ui/arc/notification/arc_notification_manager.cc
@@ -49,11 +49,8 @@ void ArcNotificationManager::OnInstanceReady() {
DCHECK(!ready_);
auto* notifications_instance =
- arc_bridge_service()->notifications()->instance();
- if (!notifications_instance) {
- VLOG(2) << "Request to refresh app list when bridge service is not ready.";
- return;
- }
+ arc_bridge_service()->notifications()->GetInstanceForMethod("Init");
+ DCHECK(notifications_instance);
notifications_instance->Init(binding_.CreateInterfacePtrAndBind());
ready_ = true;
@@ -122,7 +119,8 @@ void ArcNotificationManager::SendNotificationRemovedFromChrome(
items_.erase(it);
auto* notifications_instance =
- arc_bridge_service()->notifications()->instance();
+ arc_bridge_service()->notifications()->GetInstanceForMethod(
+ "SendNotificationEventToAndroid");
// On shutdown, the ARC channel may quit earlier then notifications.
if (!notifications_instance) {
@@ -144,7 +142,8 @@ void ArcNotificationManager::SendNotificationClickedOnChrome(
}
auto* notifications_instance =
- arc_bridge_service()->notifications()->instance();
+ arc_bridge_service()->notifications()->GetInstanceForMethod(
+ "SendNotificationEventToAndroid");
// On shutdown, the ARC channel may quit earlier then notifications.
if (!notifications_instance) {
@@ -167,7 +166,8 @@ void ArcNotificationManager::SendNotificationButtonClickedOnChrome(
}
auto* notifications_instance =
- arc_bridge_service()->notifications()->instance();
+ arc_bridge_service()->notifications()->GetInstanceForMethod(
+ "SendNotificationEventToAndroid");
// On shutdown, the ARC channel may quit earlier then notifications.
if (!notifications_instance) {
« no previous file with comments | « components/arc/power/arc_power_bridge.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698