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

Unified Diff: chrome/browser/idle_win.cc

Issue 7864022: Fixing the bug, that caused UI to hang after unsupported device was inserted. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: small fixes Created 9 years, 3 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
Index: chrome/browser/idle_win.cc
diff --git a/chrome/browser/idle_win.cc b/chrome/browser/idle_win.cc
index c745ca9f37e3783d9855ec2c25e516b0e4a3fbc3..821ac3b8e1ce1f738d037a4a2f76ea899d30b8ee 100644
--- a/chrome/browser/idle_win.cc
+++ b/chrome/browser/idle_win.cc
@@ -11,7 +11,7 @@ static bool IsScreensaverRunning();
static bool IsWorkstationLocked();
void CalculateIdleState(unsigned int idle_threshold, IdleCallback notify) {
- if (IsScreensaverRunning() || IsWorkstationLocked()) {
+ if (IsWorkstationInLockedState()) {
notify.Run(IDLE_STATE_LOCKED);
return;
}
@@ -67,3 +67,7 @@ bool IsWorkstationLocked() {
}
return is_locked;
}
+
+bool IsWorkstationInLockedState() {
+ return IsWorkstationLocked() || IsScreensaverRunning();
+}

Powered by Google App Engine
This is Rietveld 408576698