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

Side by Side Diff: chrome/browser/chromeos/ui/low_disk_notification.h

Issue 2082363004: Show notifications on low disk space. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@low-disk-strings
Patch Set: 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 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_UI_LOW_DISK_NOTIFICATION_H_
6 #define CHROME_BROWSER_CHROMEOS_UI_LOW_DISK_NOTIFICATION_H_
7
8 #include <stdint.h>
9
10 #include <memory>
11
12 #include "base/macros.h"
13 #include "base/time/time.h"
14
15 namespace message_center {
16 class Notification;
17 }
18
19 namespace chromeos {
20
21 class CryptohomeClient;
22
23 class LowDiskNotification {
24 public:
25 explicit LowDiskNotification(CryptohomeClient* cryptohome_client);
26 ~LowDiskNotification();
27
28 void OnLowDiskSpace(uint64_t free_disk_bytes);
29
30 private:
31 enum Severity { NONE = -1, MEDIUM = 0, HIGH = 1 };
32
33 std::unique_ptr<message_center::Notification> CreateNotification(
34 Severity severity);
35 Severity GetSeverity(uint64_t free_disk_bytes);
36
37 base::Time last_notification_time_;
38 Severity last_notification_severity_;
39
40 CryptohomeClient* cryptohome_client_;
41
42 DISALLOW_COPY_AND_ASSIGN(LowDiskNotification);
43 };
44
45 } // namespace chromeos
46
47 #endif // CHROME_BROWSER_CHROMEOS_UI_LOW_DISK_NOTIFICATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698