| 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 133a5540cda1afd7ff0fa709652b07a0ec82c2ca..ced355f4dc38f4333423fcd57040219a7bd2cdde 100644
|
| --- a/chrome/browser/chromeos/arc/arc_auth_notification.cc
|
| +++ b/chrome/browser/chromeos/arc/arc_auth_notification.cc
|
| @@ -28,6 +28,8 @@
|
|
|
| namespace {
|
|
|
| +bool g_disabled = false;
|
| +
|
| // Ids of the notification shown on first run.
|
| const char kNotifierId[] = "arc_auth";
|
| const char kDisplaySource[] = "arc_auth_source";
|
| @@ -95,6 +97,9 @@ namespace arc {
|
|
|
| // static
|
| void ArcAuthNotification::Show(Profile* profile) {
|
| + if (g_disabled)
|
| + return;
|
| +
|
| message_center::NotifierId notifier_id(
|
| message_center::NotifierId::SYSTEM_COMPONENT, kNotifierId);
|
| notifier_id.profile_id =
|
| @@ -121,8 +126,16 @@ void ArcAuthNotification::Show(Profile* profile) {
|
|
|
| // static
|
| void ArcAuthNotification::Hide() {
|
| + if (g_disabled)
|
| + return;
|
| +
|
| message_center::MessageCenter::Get()->RemoveNotification(
|
| kFirstRunNotificationId, false);
|
| }
|
|
|
| +// static
|
| +void ArcAuthNotification::DisableForTesting() {
|
| + g_disabled = true;
|
| +}
|
| +
|
| } // namespace arc
|
|
|