| 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 7f63ba2a09656ee76f3274fd1a820b3d21f46c6f..91a2b4f87e9f533f50c158037338aef45ea059aa 100644
|
| --- a/ui/arc/notification/arc_notification_manager.cc
|
| +++ b/ui/arc/notification/arc_notification_manager.cc
|
| @@ -13,8 +13,7 @@
|
| #include "base/stl_util.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "components/arc/arc_bridge_service.h"
|
| -#include "ui/arc/notification/arc_custom_notification_item.h"
|
| -#include "ui/arc/notification/arc_notification_item.h"
|
| +#include "ui/arc/notification/arc_notification_item_impl.h"
|
|
|
| namespace arc {
|
|
|
| @@ -66,23 +65,16 @@ void ArcNotificationManager::OnNotificationPosted(
|
| const std::string& key = data->key;
|
| auto it = items_.find(key);
|
| if (it == items_.end()) {
|
| - // Old client with version < 5 would have use_custom_notification default,
|
| - // which is false.
|
| - const bool use_custom_notification = data->use_custom_notification;
|
| // Show a notification on the primary logged-in user's desktop.
|
| // TODO(yoshiki): Reconsider when ARC supports multi-user.
|
| - ArcNotificationItem* item =
|
| - use_custom_notification
|
| - ? new ArcCustomNotificationItem(this, message_center_, key,
|
| - main_profile_id_)
|
| - : new ArcNotificationItem(this, message_center_, key,
|
| - main_profile_id_);
|
| + auto item = base::MakeUnique<ArcNotificationItemImpl>(
|
| + this, message_center_, key, main_profile_id_);
|
| // TODO(yoshiki): Use emplacement for performance when it's available.
|
| - auto result = items_.insert(std::make_pair(key, base::WrapUnique(item)));
|
| + auto result = items_.insert(std::make_pair(key, std::move(item)));
|
| DCHECK(result.second);
|
| it = result.first;
|
| }
|
| - it->second->UpdateWithArcNotificationData(std::move(data));
|
| + it->second->OnUpdatedFromAndroid(std::move(data));
|
| }
|
|
|
| void ArcNotificationManager::OnNotificationRemoved(const std::string& key) {
|
|
|