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

Side by Side Diff: chrome/browser/task_manager/os_resource_win.cc

Issue 15196003: Create task_manager namespace and wrap classes related to TaskManager with it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/task_manager/task_manager_os_resources_win.h" 5 #include "chrome/browser/task_manager/os_resource_win.h"
6
7 namespace task_manager {
6 8
7 void GetWinGDIHandles(base::ProcessHandle process, 9 void GetWinGDIHandles(base::ProcessHandle process,
8 size_t* current, 10 size_t* current,
9 size_t* peak) { 11 size_t* peak) {
10 *current = 0; 12 *current = 0;
11 *peak = 0; 13 *peak = 0;
12 // Get a handle to |process| that has PROCESS_QUERY_INFORMATION rights. 14 // Get a handle to |process| that has PROCESS_QUERY_INFORMATION rights.
13 HANDLE current_process = GetCurrentProcess(); 15 HANDLE current_process = GetCurrentProcess();
14 HANDLE process_with_query_rights; 16 HANDLE process_with_query_rights;
15 if (DuplicateHandle(current_process, process, current_process, 17 if (DuplicateHandle(current_process, process, current_process,
(...skipping 14 matching lines...) Expand all
30 HANDLE current_process = GetCurrentProcess(); 32 HANDLE current_process = GetCurrentProcess();
31 HANDLE process_with_query_rights; 33 HANDLE process_with_query_rights;
32 if (DuplicateHandle(current_process, process, current_process, 34 if (DuplicateHandle(current_process, process, current_process,
33 &process_with_query_rights, PROCESS_QUERY_INFORMATION, 35 &process_with_query_rights, PROCESS_QUERY_INFORMATION,
34 false, 0)) { 36 false, 0)) {
35 *current = GetGuiResources(process_with_query_rights, GR_USEROBJECTS); 37 *current = GetGuiResources(process_with_query_rights, GR_USEROBJECTS);
36 *peak = GetGuiResources(process_with_query_rights, GR_USEROBJECTS_PEAK); 38 *peak = GetGuiResources(process_with_query_rights, GR_USEROBJECTS_PEAK);
37 CloseHandle(process_with_query_rights); 39 CloseHandle(process_with_query_rights);
38 } 40 }
39 } 41 }
42
43 } // namespace task_manager
OLDNEW
« no previous file with comments | « chrome/browser/task_manager/os_resource_win.h ('k') | chrome/browser/task_manager/panel_resource_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698