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

Side by Side Diff: base/process/process_metrics_win.cc

Issue 822713002: Update from https://crrev.com/309415 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "base/process/process_metrics.h" 5 #include "base/process/process_metrics.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <psapi.h> 8 #include <psapi.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 GetSystemInfo(&system_info); 277 GetSystemInfo(&system_info);
278 278
279 PERFORMANCE_INFORMATION info; 279 PERFORMANCE_INFORMATION info;
280 if (!InternalGetPerformanceInfo(&info, sizeof(info))) { 280 if (!InternalGetPerformanceInfo(&info, sizeof(info))) {
281 DLOG(ERROR) << "Failed to fetch internal performance info."; 281 DLOG(ERROR) << "Failed to fetch internal performance info.";
282 return 0; 282 return 0;
283 } 283 }
284 return (info.CommitTotal * system_info.dwPageSize) / 1024; 284 return (info.CommitTotal * system_info.dwPageSize) / 1024;
285 } 285 }
286 286
287 size_t GetPageSize() {
288 return PAGESIZE_KB * 1024;
289 }
290
287 } // namespace base 291 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698