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

Unified Diff: chrome/browser/chromeos/session_length_limiter.cc

Issue 2692163003: cros: Add enterprise user session metrics (Closed)
Patch Set: update sparse histogram comment Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/session_length_limiter.h ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/session_length_limiter.cc
diff --git a/chrome/browser/chromeos/session_length_limiter.cc b/chrome/browser/chromeos/session_length_limiter.cc
index a080c8fe77582d06581eccd5dc4e206f79206a7b..c1c8d401ad2a2c039b0d205c7ce0f1cf659ec0b4 100644
--- a/chrome/browser/chromeos/session_length_limiter.cc
+++ b/chrome/browser/chromeos/session_length_limiter.cc
@@ -107,6 +107,13 @@ SessionLengthLimiter::~SessionLengthLimiter() {
ui::UserActivityDetector::Get()->RemoveObserver(this);
}
+base::TimeDelta SessionLengthLimiter::GetSessionDuration() const {
+ if (session_start_time_.is_null())
+ return base::TimeDelta();
+
+ return delegate_->GetCurrentTime() - session_start_time_;
+}
+
void SessionLengthLimiter::OnUserActivity(const ui::Event* event) {
if (user_activity_seen_)
return;
« no previous file with comments | « chrome/browser/chromeos/session_length_limiter.h ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698