OLD | NEW |
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_UI_LOW_DISK_NOTIFICATION_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_UI_LOW_DISK_NOTIFICATION_H_ |
6 #define CHROME_BROWSER_CHROMEOS_UI_LOW_DISK_NOTIFICATION_H_ | 6 #define CHROME_BROWSER_CHROMEOS_UI_LOW_DISK_NOTIFICATION_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 Severity GetSeverity(uint64_t free_disk_bytes); | 54 Severity GetSeverity(uint64_t free_disk_bytes); |
55 | 55 |
56 // Sets the MessageCenter instance to use. Should only be used in tests. | 56 // Sets the MessageCenter instance to use. Should only be used in tests. |
57 void SetMessageCenterForTest(message_center::MessageCenter* message_center); | 57 void SetMessageCenterForTest(message_center::MessageCenter* message_center); |
58 | 58 |
59 // Sets the minimum time to wait between notifications of the same severity. | 59 // Sets the minimum time to wait between notifications of the same severity. |
60 // Should only be used in tests. | 60 // Should only be used in tests. |
61 void SetNotificationIntervalForTest(base::TimeDelta interval); | 61 void SetNotificationIntervalForTest(base::TimeDelta interval); |
62 | 62 |
63 base::Time last_notification_time_; | 63 base::Time last_notification_time_; |
64 Severity last_notification_severity_; | 64 Severity last_notification_severity_ = NONE; |
65 message_center::MessageCenter* message_center_; | 65 message_center::MessageCenter* message_center_; |
66 base::TimeDelta notification_interval_; | 66 base::TimeDelta notification_interval_; |
67 base::ThreadChecker thread_checker_; | 67 base::ThreadChecker thread_checker_; |
68 base::WeakPtrFactory<LowDiskNotification> weak_ptr_factory_; | 68 base::WeakPtrFactory<LowDiskNotification> weak_ptr_factory_; |
69 | 69 |
70 DISALLOW_COPY_AND_ASSIGN(LowDiskNotification); | 70 DISALLOW_COPY_AND_ASSIGN(LowDiskNotification); |
71 }; | 71 }; |
72 | 72 |
73 } // namespace chromeos | 73 } // namespace chromeos |
74 | 74 |
75 #endif // CHROME_BROWSER_CHROMEOS_UI_LOW_DISK_NOTIFICATION_H_ | 75 #endif // CHROME_BROWSER_CHROMEOS_UI_LOW_DISK_NOTIFICATION_H_ |
OLD | NEW |