diff options
author | sidor@chromium.org <sidor@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-10 07:54:50 +0000 |
---|---|---|
committer | sidor@chromium.org <sidor@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-10 07:54:50 +0000 |
commit | 80722b2de9e24617450c1727b4aa619ca5f8709d (patch) | |
tree | 824cf99f86da8f5c8de98cee1f0139be84d314bd /chrome/browser/idle.cc | |
parent | 49a9c05b2eafc9b4ed09f9e7b54c8a3a1a269afe (diff) | |
download | chromium_src-80722b2de9e24617450c1727b4aa619ca5f8709d.zip chromium_src-80722b2de9e24617450c1727b4aa619ca5f8709d.tar.gz chromium_src-80722b2de9e24617450c1727b4aa619ca5f8709d.tar.bz2 |
Fixing the bug, that caused UI to hang after unsupported device was inserted.
In the idle.h new synchronous method was added - IsWorkstationInLockedState.
BUG=chromium-os:20261
TEST=None
Review URL: http://codereview.chromium.org/7864022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100582 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/idle.cc')
-rw-r--r-- | chrome/browser/idle.cc | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/chrome/browser/idle.cc b/chrome/browser/idle.cc deleted file mode 100644 index 73b5613..0000000 --- a/chrome/browser/idle.cc +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/browser/idle.h" - -#include "base/bind.h" -#include "base/synchronization/waitable_event.h" - - - -void IdleStateCallback(IdleState* return_state, base::WaitableEvent* done, - IdleState state) { - *return_state = state; - done->Signal(); -} - -IdleState CalculateIdleStateSync(unsigned int idle_threshold) { - IdleState return_state; - base::WaitableEvent done(true, false); - CalculateIdleState(idle_threshold, base::Bind(&IdleStateCallback, - &return_state, &done)); - done.Wait(); - return return_state; -} |