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

Side by Side Diff: chrome/browser/idle_win.cc

Issue 2965015: Attempt four at landing the "histogram.h removed from message_loop.h" patch. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: win build fixes Created 10 years, 5 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/idle.h ('k') | chrome/browser/io_thread.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/idle.h" 5 #include "chrome/browser/idle.h"
6 6
7 #include <limits.h>
8 #include <windows.h>
9
7 static bool IsScreensaverRunning(); 10 static bool IsScreensaverRunning();
8 static bool IsWorkstationLocked(); 11 static bool IsWorkstationLocked();
9 12
10 IdleState CalculateIdleState(unsigned int idle_threshold) { 13 IdleState CalculateIdleState(unsigned int idle_threshold) {
11 if (IsScreensaverRunning() || IsWorkstationLocked()) 14 if (IsScreensaverRunning() || IsWorkstationLocked())
12 return IDLE_STATE_LOCKED; 15 return IDLE_STATE_LOCKED;
13 16
14 LASTINPUTINFO last_input_info = {0}; 17 LASTINPUTINFO last_input_info = {0};
15 last_input_info.cbSize = sizeof(LASTINPUTINFO); 18 last_input_info.cbSize = sizeof(LASTINPUTINFO);
16 DWORD current_idle_time = 0; 19 DWORD current_idle_time = 0;
(...skipping 28 matching lines...) Expand all
45 UOI_NAME, 48 UOI_NAME,
46 name, 49 name,
47 sizeof(name), 50 sizeof(name),
48 &needed)) { 51 &needed)) {
49 is_locked = lstrcmpi(name, L"default") != 0; 52 is_locked = lstrcmpi(name, L"default") != 0;
50 } 53 }
51 ::CloseDesktop(input_desk); 54 ::CloseDesktop(input_desk);
52 } 55 }
53 return is_locked; 56 return is_locked;
54 } 57 }
OLDNEW
« no previous file with comments | « chrome/browser/idle.h ('k') | chrome/browser/io_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698