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

Unified Diff: chrome/browser/idle_chromeos.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.cc ('k') | chrome/browser/idle_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/idle_chromeos.cc
diff --git a/chrome/browser/idle_chromeos.cc b/chrome/browser/idle_chromeos.cc
index 2971fb93631cf12062e10c51085f48ce1e47a221..5cebff8adc068d0c1d1bbbfd784586e4c7ab67e4 100644
--- a/chrome/browser/idle_chromeos.cc
+++ b/chrome/browser/idle_chromeos.cc
@@ -22,9 +22,18 @@ void CalculateIdleStateNotifier(unsigned int idle_treshold,
}
void CalculateIdleState(unsigned int idle_threshold, IdleCallback notify) {
+ if (CheckIdleStateIsLocked()) {
+ notify.Run(IDLE_STATE_LOCKED);
+ return;
+ }
chromeos::CalculateIdleTimeCallback* callback =
new base::Callback<void(int64_t)>(base::Bind(&CalculateIdleStateNotifier,
idle_threshold,
notify));
chromeos::CrosLibrary::Get()->GetPowerLibrary()->CalculateIdleTime(callback);
}
+
+bool CheckIdleStateIsLocked() {
+ // TODO(sidor): Make it work.
+ return false;
+}
« no previous file with comments | « chrome/browser/idle.cc ('k') | chrome/browser/idle_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698