blob: 0da7f722ff06186619a09d1069ce8a6cafa8d28b [file] [log] [blame]
[email protected]f5205412010-03-16 00:19:341// 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
9IdleState 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}