Chromium Code Reviews| Index: chrome/browser/chromeos/eol_notification.h |
| diff --git a/chrome/browser/chromeos/eol_notification.h b/chrome/browser/chromeos/eol_notification.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..128f9dccc8fb23c5caefeb3c864c441f320605ed |
| --- /dev/null |
| +++ b/chrome/browser/chromeos/eol_notification.h |
| @@ -0,0 +1,54 @@ |
| +// Copyright (c) 2016 The Chromium Authors. All rights reserved. |
|
oshima
2016/06/17 23:54:58
remove (c)
(it's old style)
xiaoyinh(OOO Sep 11-29)
2016/06/18 01:08:12
Done.
|
| +// // Use of this source code is governed by a BSD-style license that can be |
| +// // found in the LICENSE file. |
|
oshima
2016/06/17 23:54:58
remove extra //
xiaoyinh(OOO Sep 11-29)
2016/06/18 01:08:12
Done.
|
| +// |
|
oshima
2016/06/17 23:54:58
replace empty "//" with empty new line
xiaoyinh(OOO Sep 11-29)
2016/06/18 01:08:12
Done.
|
| +#ifndef CHROME_BROWSER_CHROMEOS_EOL_NOTIFICATION_H_ |
| +#define CHROME_BROWSER_CHROMEOS_EOL_NOTIFICATION_H_ |
| + |
| +#include "base/macros.h" |
| +#include "base/memory/weak_ptr.h" |
| +#include "base/strings/string16.h" |
| +#include "chrome/browser/profiles/profile.h" |
| + |
| +namespace message_center { |
| +class MessageCenter; |
| +} |
| + |
| +namespace chromeos { |
| + |
| +// EolNotification is created when user logs in. It is |
| +// used to check current EndOfLife Status of the device, |
| +// and show notification accordingly. |
| +class EolNotification { |
|
oshima
2016/06/17 23:54:58
final (since your dtor is not virtual)
xiaoyinh(OOO Sep 11-29)
2016/06/18 01:08:12
Done.
|
| + public: |
| + explicit EolNotification(Profile* profile); |
| + ~EolNotification(); |
| + |
| + // Check Eol status from update engine. |
| + void CheckEolStatus(); |
| + |
| + private: |
| + // Callback invoked when |GetEolStatus()| has finished. |
| + void OnEolStatus(int status); |
| + |
| + // Create or updates the notfication. |
| + void Update(); |
| + |
| + // Returns messages that applys to this eol status. |
| + base::string16 GetEolMessage(); |
| + |
| + // Profile which is associated with the EndOfLife notification. |
| + Profile* const profile_; |
| + |
| + // Device Eol status. |
| + int status_; |
| + |
| + // Factory of callbacks. |
| + base::WeakPtrFactory<EolNotification> weak_factory_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(EolNotification); |
| +}; |
| + |
| +} // namespace chromeos |
| + |
| +#endif // CHROME_BROWSER_CHROMEOS_EOL_NOTIFICATION_H_ |