| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/browser/chromeos/session_length_limiter.h" | 5 #include "chrome/browser/chromeos/session_length_limiter.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| 11 #include "base/location.h" | 11 #include "base/location.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/macros.h" |
| 13 #include "base/prefs/pref_registry_simple.h" | 14 #include "base/prefs/pref_registry_simple.h" |
| 14 #include "base/prefs/pref_service.h" | 15 #include "base/prefs/pref_service.h" |
| 15 #include "chrome/browser/browser_process.h" | 16 #include "chrome/browser/browser_process.h" |
| 16 #include "chrome/browser/lifetime/application_lifetime.h" | 17 #include "chrome/browser/lifetime/application_lifetime.h" |
| 17 #include "chrome/common/pref_names.h" | 18 #include "chrome/common/pref_names.h" |
| 18 #include "ui/base/user_activity/user_activity_detector.h" | 19 #include "ui/base/user_activity/user_activity_detector.h" |
| 19 #include "ui/events/event.h" | 20 #include "ui/events/event.h" |
| 20 | 21 |
| 21 namespace chromeos { | 22 namespace chromeos { |
| 22 | 23 |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 return; | 204 return; |
| 204 } | 205 } |
| 205 | 206 |
| 206 // Set a timer to log out the user when the session length limit is reached. | 207 // Set a timer to log out the user when the session length limit is reached. |
| 207 timer_.reset(new base::OneShotTimer); | 208 timer_.reset(new base::OneShotTimer); |
| 208 timer_->Start(FROM_HERE, remaining, delegate_.get(), | 209 timer_->Start(FROM_HERE, remaining, delegate_.get(), |
| 209 &SessionLengthLimiter::Delegate::StopSession); | 210 &SessionLengthLimiter::Delegate::StopSession); |
| 210 } | 211 } |
| 211 | 212 |
| 212 } // namespace chromeos | 213 } // namespace chromeos |
| OLD | NEW |