Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | |
| 2 // // Use of this source code is governed by a BSD-style license that can be | |
| 3 // // found in the LICENSE file. | |
| 4 // | |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_EOL_NOTIFICATION_H_ | |
| 6 #define CHROME_BROWSER_CHROMEOS_EOL_NOTIFICATION_H_ | |
| 7 | |
| 8 #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.
| |
| 9 #include "base/macros.h" | |
| 10 #include "base/memory/weak_ptr.h" | |
| 11 | |
| 12 namespace message_center { | |
| 13 class MessageCenter; | |
| 14 } | |
| 15 | |
| 16 namespace chromeos { | |
| 17 | |
| 18 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.
| |
| 19 public: | |
| 20 explicit EolNotification(Profile* profile); | |
| 21 ~EolNotification(); | |
| 22 | |
| 23 // Get Eol status from update engine. | |
| 24 void GetEolStatus(); | |
| 25 | |
| 26 private: | |
| 27 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.
| |
| 28 | |
| 29 // Callback invoked when |GetEolStatus()| has finished. | |
| 30 void OnEolStatus(int status); | |
| 31 | |
| 32 // Create or updates the notfication. | |
| 33 void Update(); | |
| 34 | |
| 35 // Device Eol status. | |
| 36 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.
| |
| 37 | |
| 38 // Returns messages that applys to this eol status | |
| 39 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.
| |
| 40 | |
| 41 // Factory of callbacks. | |
| 42 base::WeakPtrFactory<EolNotification> weak_factory_; | |
| 43 | |
| 44 DISALLOW_COPY_AND_ASSIGN(EolNotification); | |
| 45 }; | |
| 46 | |
| 47 } // namespace chromeos | |
| 48 | |
| 49 #endif // CHROME_BROWSER_CHROMEOS_EOL_NOTIFICATION_H_ | |
| OLD | NEW |