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

Side by Side Diff: extensions/browser/api/system_cpu/cpu_info_provider_win.cc

Issue 1869503004: Convert //tools to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, change iwyu fixes for converted directories to include <memory> Created 4 years, 8 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/api/system_cpu/cpu_info_provider.h" 5 #include "extensions/browser/api/system_cpu/cpu_info_provider.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <winternl.h> 8 #include <winternl.h>
9 9
10 #include "base/memory/scoped_ptr.h"
10 #include "base/sys_info.h" 11 #include "base/sys_info.h"
11 12
12 namespace extensions { 13 namespace extensions {
13 14
14 namespace { 15 namespace {
15 16
16 const wchar_t kNtdll[] = L"ntdll.dll"; 17 const wchar_t kNtdll[] = L"ntdll.dll";
17 const char kNtQuerySystemInformationName[] = "NtQuerySystemInformation"; 18 const char kNtQuerySystemInformationName[] = "NtQuerySystemInformation";
18 19
19 // See MSDN about NtQuerySystemInformation definition. 20 // See MSDN about NtQuerySystemInformation definition.
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 infos->at(i).usage.kernel = kernel - idle; 68 infos->at(i).usage.kernel = kernel - idle;
68 infos->at(i).usage.user = user; 69 infos->at(i).usage.user = user;
69 infos->at(i).usage.idle = idle; 70 infos->at(i).usage.idle = idle;
70 infos->at(i).usage.total = kernel + user; 71 infos->at(i).usage.total = kernel + user;
71 } 72 }
72 73
73 return true; 74 return true;
74 } 75 }
75 76
76 } // namespace extensions 77 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/window_controller.h ('k') | extensions/renderer/api/display_source/display_source_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698