| Index: chrome/browser/chromeos/arc/arc_auth_notification.cc
|
| diff --git a/chrome/browser/chromeos/arc/arc_auth_notification.cc b/chrome/browser/chromeos/arc/arc_auth_notification.cc
|
| index 03cfabc7c351d3e5a044566d2c6742bd4809e222..133a5540cda1afd7ff0fa709652b07a0ec82c2ca 100644
|
| --- a/chrome/browser/chromeos/arc/arc_auth_notification.cc
|
| +++ b/chrome/browser/chromeos/arc/arc_auth_notification.cc
|
| @@ -12,7 +12,7 @@
|
| #include "base/macros.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "chrome/browser/chromeos/arc/arc_optin_uma.h"
|
| -#include "chrome/browser/chromeos/arc/arc_session_manager.h"
|
| +#include "chrome/browser/chromeos/arc/arc_util.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
|
| #include "chrome/grit/generated_resources.h"
|
| @@ -37,7 +37,7 @@ class ArcAuthNotificationDelegate
|
| : public message_center::NotificationDelegate,
|
| public message_center::MessageCenterObserver {
|
| public:
|
| - ArcAuthNotificationDelegate() {}
|
| + explicit ArcAuthNotificationDelegate(Profile* profile) : profile_(profile) {}
|
|
|
| // message_center::MessageCenterObserver
|
| void OnNotificationUpdated(const std::string& notification_id) override {
|
| @@ -64,10 +64,10 @@ class ArcAuthNotificationDelegate
|
| StopObserving();
|
| if (button_index == 0) {
|
| UpdateOptInActionUMA(arc::OptInActionType::NOTIFICATION_ACCEPTED);
|
| - arc::ArcSessionManager::Get()->SetArcPlayStoreEnabled(true);
|
| + arc::SetArcPlayStoreEnabledForProfile(profile_, true);
|
| } else {
|
| UpdateOptInActionUMA(arc::OptInActionType::NOTIFICATION_DECLINED);
|
| - arc::ArcSessionManager::Get()->SetArcPlayStoreEnabled(false);
|
| + arc::SetArcPlayStoreEnabledForProfile(profile_, false);
|
| }
|
| }
|
|
|
| @@ -84,6 +84,8 @@ class ArcAuthNotificationDelegate
|
| message_center::MessageCenter::Get()->RemoveObserver(this);
|
| }
|
|
|
| + Profile* const profile_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(ArcAuthNotificationDelegate);
|
| };
|
|
|
| @@ -112,7 +114,7 @@ void ArcAuthNotification::Show(Profile* profile) {
|
| ash::GetChromeOSDeviceName()),
|
| resource_bundle.GetImageNamed(IDR_ARC_PLAY_STORE_NOTIFICATION),
|
| base::UTF8ToUTF16(kDisplaySource), GURL(), notifier_id, data,
|
| - new ArcAuthNotificationDelegate()));
|
| + new ArcAuthNotificationDelegate(profile)));
|
| message_center::MessageCenter::Get()->AddNotification(
|
| std::move(notification));
|
| }
|
|
|