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

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

Issue 2081873002: Incorporate comments in Dbus code and add Eol icon (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: incorporate comments from isherman@ Created 4 years, 5 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
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/chromeos/eol_notification.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CHROMEOS_EOL_NOTIFICATION_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_EOL_NOTIFICATION_H_
6 #define CHROME_BROWSER_CHROMEOS_EOL_NOTIFICATION_H_ 6 #define CHROME_BROWSER_CHROMEOS_EOL_NOTIFICATION_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
11 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
12 #include "third_party/cros_system_api/dbus/update_engine/dbus-constants.h"
12 13
13 namespace message_center { 14 namespace message_center {
14 class MessageCenter; 15 class MessageCenter;
15 } 16 }
16 17
17 namespace chromeos { 18 namespace chromeos {
18 19
19 // EolNotification is created when user logs in. It is 20 // EolNotification is created when user logs in. It is
20 // used to check current EndOfLife Status of the device, 21 // used to check current EndOfLife Status of the device,
21 // and show notification accordingly. 22 // and show notification accordingly.
22 class EolNotification final { 23 class EolNotification final {
23 public: 24 public:
24 explicit EolNotification(Profile* profile); 25 explicit EolNotification(Profile* profile);
25 ~EolNotification(); 26 ~EolNotification();
26 27
27 // Check Eol status from update engine. 28 // Check Eol status from update engine.
28 void CheckEolStatus(); 29 void CheckEolStatus();
29 30
30 private: 31 private:
31 // Callback invoked when |GetEolStatus()| has finished. 32 // Callback invoked when |GetEolStatus()| has finished.
32 void OnEolStatus(int status); 33 void OnEolStatus(update_engine::EndOfLifeStatus status);
33 34
34 // Create or updates the notfication. 35 // Create or updates the notfication.
35 void Update(); 36 void Update();
36 37
37 // Returns messages that applys to this eol status. 38 // Returns messages that applys to this eol status.
38 base::string16 GetEolMessage(); 39 base::string16 GetEolMessage();
39 40
40 // Profile which is associated with the EndOfLife notification. 41 // Profile which is associated with the EndOfLife notification.
41 Profile* const profile_; 42 Profile* const profile_;
42 43
43 // Device Eol status. 44 // Device EndOfLife status.
44 int status_; 45 update_engine::EndOfLifeStatus status_;
45 46
46 // Factory of callbacks. 47 // Factory of callbacks.
47 base::WeakPtrFactory<EolNotification> weak_factory_; 48 base::WeakPtrFactory<EolNotification> weak_factory_;
48 49
49 DISALLOW_COPY_AND_ASSIGN(EolNotification); 50 DISALLOW_COPY_AND_ASSIGN(EolNotification);
50 }; 51 };
51 52
52 } // namespace chromeos 53 } // namespace chromeos
53 54
54 #endif // CHROME_BROWSER_CHROMEOS_EOL_NOTIFICATION_H_ 55 #endif // CHROME_BROWSER_CHROMEOS_EOL_NOTIFICATION_H_
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/chromeos/eol_notification.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698