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..e73cf227e1cb321d4d845129599e6e8e6f5c82ea |
| --- /dev/null |
| +++ b/chrome/browser/chromeos/eol_notification.h |
| @@ -0,0 +1,49 @@ |
| +// Copyright (c) 2016 The Chromium Authors. All rights reserved. |
| +// // Use of this source code is governed by a BSD-style license that can be |
| +// // found in the LICENSE file. |
| +// |
| +#ifndef CHROME_BROWSER_CHROMEOS_EOL_NOTIFICATION_H_ |
| +#define CHROME_BROWSER_CHROMEOS_EOL_NOTIFICATION_H_ |
| + |
| +#include "base/callback.h" |
|
xiyuan
2016/06/16 22:41:28
not used?
xiaoyinh(OOO Sep 11-29)
2016/06/17 04:07:34
Removed.
|
| +#include "base/macros.h" |
| +#include "base/memory/weak_ptr.h" |
| + |
| +namespace message_center { |
| +class MessageCenter; |
| +} |
| + |
| +namespace chromeos { |
| + |
| +class EolNotification { |
|
xiyuan
2016/06/16 22:41:28
Brief comment to document the class.
xiaoyinh(OOO Sep 11-29)
2016/06/17 04:07:34
Done.
|
| + public: |
| + explicit EolNotification(Profile* profile); |
| + ~EolNotification(); |
| + |
| + // Get Eol status from update engine. |
| + void GetEolStatus(); |
| + |
| + private: |
| + Profile* profile_; |
|
xiyuan
2016/06/16 22:41:27
Members at the end in a section, after all methods
xiyuan
2016/06/16 22:41:28
nit: Profile* const profile_;
xiaoyinh(OOO Sep 11-29)
2016/06/17 04:07:34
Done.
xiaoyinh(OOO Sep 11-29)
2016/06/17 04:07:34
Done.
|
| + |
| + // Callback invoked when |GetEolStatus()| has finished. |
| + void OnEolStatus(int status); |
| + |
| + // Create or updates the notfication. |
| + void Update(); |
| + |
| + // Device Eol status. |
| + int status_; |
|
xiyuan
2016/06/16 22:41:27
Move it to last. And initialize it with some value
xiaoyinh(OOO Sep 11-29)
2016/06/17 04:07:34
Done.
|
| + |
| + // Returns messages that applys to this eol status |
| + base::string16 GetEolMessage(); |
|
xiyuan
2016/06/16 22:41:27
#include "base/strings/string16.h"
xiaoyinh(OOO Sep 11-29)
2016/06/17 04:07:34
Done.
|
| + |
| + // Factory of callbacks. |
| + base::WeakPtrFactory<EolNotification> weak_factory_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(EolNotification); |
| +}; |
| + |
| +} // namespace chromeos |
| + |
| +#endif // CHROME_BROWSER_CHROMEOS_EOL_NOTIFICATION_H_ |