Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: chrome/browser/chromeos/eol_notification.h

Issue 2060623002: Implementation of Device End of Life Notification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase the branch Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // 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.
2 // // Use of this source code is governed by a BSD-style license that can be
3 // // 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.
4 //
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.
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 {
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.
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698