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

Unified Diff: ash/test/test_system_tray_delegate.h

Issue 108213009: Adds TraySessionLengthLimitTest to ash_unittests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 side-by-side diff with in-line comments
Download patch
Index: ash/test/test_system_tray_delegate.h
diff --git a/ash/test/test_system_tray_delegate.h b/ash/test/test_system_tray_delegate.h
index 335f68d84b223cc2ac30522bac2121e2eb7157d0..9b85d97ea166a5e64fb05f47cf9a6f3ecd898405 100644
--- a/ash/test/test_system_tray_delegate.h
+++ b/ash/test/test_system_tray_delegate.h
@@ -6,6 +6,7 @@
#define ASH_TEST_TEST_SYSTEM_TRAY_DELEGATE_H_
#include "ash/system/tray/default_system_tray_delegate.h"
+#include "base/time/time.h"
namespace ash {
namespace test {
@@ -33,15 +34,28 @@ class TestSystemTrayDelegate : public DefaultSystemTrayDelegate {
should_show_display_notification_ = should_show;
}
+ // Updates the session length limit so that the limit will come from now in
+ // |new_limit|.
+ void SetSessionLengthLimitForTest(const base::TimeDelta& new_limit);
+
+ // Clears the session length limit.
+ void ClearSessionLengthLimit();
+
// Overridden from SystemTrayDelegate:
virtual user::LoginStatus GetUserLoginStatus() const OVERRIDE;
virtual bool ShouldShowDisplayNotification() OVERRIDE;
+ virtual bool GetSessionStartTime(
+ base::TimeTicks* session_start_time) OVERRIDE;
+ virtual bool GetSessionLengthLimit(
+ base::TimeDelta* session_length_limit) OVERRIDE;
virtual void ShutDown() OVERRIDE;
virtual void SignOut() OVERRIDE;
private:
bool should_show_display_notification_;
user::LoginStatus login_status_;
+ base::TimeDelta session_length_limit_;
+ bool session_length_limit_set_;
DISALLOW_COPY_AND_ASSIGN(TestSystemTrayDelegate);
};

Powered by Google App Engine
This is Rietveld 408576698