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

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: style 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
« no previous file with comments | « chrome/browser/idle_mac.mm ('k') | chrome/browser/notifications/notification_ui_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/idle_win.cc
diff --git a/chrome/browser/idle_win.cc b/chrome/browser/idle_win.cc
index c745ca9f37e3783d9855ec2c25e516b0e4a3fbc3..784bee725b75ee78ee30f1aef13ffabe90c542c2 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 (CheckIdleStateIsLocked()) {
notify.Run(IDLE_STATE_LOCKED);
return;
}
@@ -67,3 +67,7 @@ bool IsWorkstationLocked() {
}
return is_locked;
}
+
+bool CheckIdleStateIsLocked() {
+ return IsWorkstationLocked() || IsScreensaverRunning();
+}
« no previous file with comments | « chrome/browser/idle_mac.mm ('k') | chrome/browser/notifications/notification_ui_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698