| 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/macros.h" |
| 9 #include "base/memory/weak_ptr.h" |
| 10 #include "base/strings/string16.h" |
| 11 #include "chrome/browser/profiles/profile.h" |
| 12 |
| 13 namespace message_center { |
| 14 class MessageCenter; |
| 15 } |
| 16 |
| 17 namespace chromeos { |
| 18 |
| 19 // EolNotification is created when user logs in. It is |
| 20 // used to check current EndOfLife Status of the device, |
| 21 // and show notification accordingly. |
| 22 class EolNotification { |
| 23 public: |
| 24 explicit EolNotification(Profile* profile); |
| 25 ~EolNotification(); |
| 26 |
| 27 // Check Eol status from update engine. |
| 28 void CheckEolStatus(); |
| 29 |
| 30 private: |
| 31 // Callback invoked when |GetEolStatus()| has finished. |
| 32 void OnEolStatus(int status); |
| 33 |
| 34 // Create or updates the notfication. |
| 35 void Update(); |
| 36 |
| 37 // Returns messages that applys to this eol status. |
| 38 base::string16 GetEolMessage(); |
| 39 |
| 40 // Profile which is associated with the EndOfLife notification. |
| 41 Profile* const profile_; |
| 42 |
| 43 // Device Eol status. |
| 44 int status_; |
| 45 |
| 46 // Factory of callbacks. |
| 47 base::WeakPtrFactory<EolNotification> weak_factory_; |
| 48 |
| 49 DISALLOW_COPY_AND_ASSIGN(EolNotification); |
| 50 }; |
| 51 |
| 52 } // namespace chromeos |
| 53 |
| 54 #endif // CHROME_BROWSER_CHROMEOS_EOL_NOTIFICATION_H_ |
| OLD | NEW |