[email protected] | f520541 | 2010-03-16 00:19:34 | [diff] [blame] | 1 | // Copyright (c) 2010 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 | #include "chrome/browser/idle.h" |
| 6 | |
| 7 | #include "chrome/browser/sync/engine/idle_query_linux.h" |
| 8 | |
| 9 | IdleState CalculateIdleState(unsigned int idle_threshold) { |
| 10 | browser_sync::IdleQueryLinux idle_query; |
| 11 | unsigned int idle_time = idle_query.IdleTime(); |
| 12 | if (idle_time >= idle_threshold) |
| 13 | return IDLE_STATE_IDLE; |
| 14 | return IDLE_STATE_ACTIVE; |
| 15 | } |