| Index: chrome/browser/notifications/profile_notification.cc
|
| diff --git a/chrome/browser/notifications/profile_notification.cc b/chrome/browser/notifications/profile_notification.cc
|
| index b9814449b3590b5f3040c8c6a4aa0ae8a1c3799f..aaac08c2cea9193a5e2367af304243df48c42cd6 100644
|
| --- a/chrome/browser/notifications/profile_notification.cc
|
| +++ b/chrome/browser/notifications/profile_notification.cc
|
| @@ -6,10 +6,12 @@
|
|
|
| #include "base/strings/stringprintf.h"
|
| #include "build/build_config.h"
|
| +#include "chrome/browser/chrome_notification_types.h"
|
| #include "chrome/browser/lifetime/keep_alive_types.h"
|
| #include "chrome/browser/lifetime/scoped_keep_alive.h"
|
| #include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
|
| #include "components/signin/core/account_id/account_id.h"
|
| +#include "content/public/browser/notification_service.h"
|
|
|
| // static
|
| std::string ProfileNotification::GetProfileNotificationId(
|
| @@ -39,6 +41,26 @@ ProfileNotification::ProfileNotification(Profile* profile,
|
| notification_.set_profile_id(
|
| multi_user_util::GetAccountIdFromProfile(profile).GetUserEmail());
|
| #endif
|
| +
|
| + registrar_.Add(this, chrome::NOTIFICATION_APP_TERMINATING,
|
| + content::NotificationService::AllSources());
|
| + registrar_.Add(this, chrome::NOTIFICATION_CLOSE_ALL_BROWSERS_REQUEST,
|
| + content::NotificationService::AllSources());
|
| }
|
|
|
| ProfileNotification::~ProfileNotification() {}
|
| +
|
| +void ProfileNotification::Observe(int type,
|
| + const content::NotificationSource& source,
|
| + const content::NotificationDetails& details) {
|
| + switch (type) {
|
| + case chrome::NOTIFICATION_APP_TERMINATING: {
|
| + LOG(ERROR) << "ProfileNotification Terminating";
|
| + break;
|
| + }
|
| + case chrome::NOTIFICATION_CLOSE_ALL_BROWSERS_REQUEST: {
|
| + LOG(ERROR) << "ProfileNotification Close All Browsers Request";
|
| + break;
|
| + }
|
| + }
|
| +}
|
|
|