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

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

Issue 1264683004: Add empty implementation of GetSystemMemoryInfo for IOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: thestig@ comments. Created 5 years, 4 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 | « base/process/process_metrics.h ('k') | base/process/process_metrics_unittest.cc » ('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) 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 <mach/task.h> 7 #include <mach/task.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 10
11 namespace base { 11 namespace base {
12 12
13 namespace { 13 namespace {
14 14
15 bool GetTaskInfo(task_basic_info_64* task_info_data) { 15 bool GetTaskInfo(task_basic_info_64* task_info_data) {
16 mach_msg_type_number_t count = TASK_BASIC_INFO_64_COUNT; 16 mach_msg_type_number_t count = TASK_BASIC_INFO_64_COUNT;
17 kern_return_t kr = task_info(mach_task_self(), 17 kern_return_t kr = task_info(mach_task_self(),
18 TASK_BASIC_INFO_64, 18 TASK_BASIC_INFO_64,
19 reinterpret_cast<task_info_t>(task_info_data), 19 reinterpret_cast<task_info_t>(task_info_data),
20 &count); 20 &count);
21 return kr == KERN_SUCCESS; 21 return kr == KERN_SUCCESS;
22 } 22 }
23 23
24 } // namespace 24 } // namespace
25 25
26 SystemMemoryInfoKB::SystemMemoryInfoKB() {
27 total = 0;
28 free = 0;
29 }
30
26 ProcessMetrics::ProcessMetrics(ProcessHandle process) {} 31 ProcessMetrics::ProcessMetrics(ProcessHandle process) {}
27 32
28 ProcessMetrics::~ProcessMetrics() {} 33 ProcessMetrics::~ProcessMetrics() {}
29 34
30 // static 35 // static
31 ProcessMetrics* ProcessMetrics::CreateProcessMetrics(ProcessHandle process) { 36 ProcessMetrics* ProcessMetrics::CreateProcessMetrics(ProcessHandle process) {
32 return new ProcessMetrics(process); 37 return new ProcessMetrics(process);
33 } 38 }
34 39
35 double ProcessMetrics::GetCPUUsage() { 40 double ProcessMetrics::GetCPUUsage() {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 size_t GetPageSize() { 80 size_t GetPageSize() {
76 return getpagesize(); 81 return getpagesize();
77 } 82 }
78 83
79 // Bytes committed by the system. 84 // Bytes committed by the system.
80 size_t GetSystemCommitCharge() { 85 size_t GetSystemCommitCharge() {
81 NOTIMPLEMENTED(); 86 NOTIMPLEMENTED();
82 return 0; 87 return 0;
83 } 88 }
84 89
90 // Bytes committed by the system.
91 bool GetSystemMemoryInfo(SystemMemoryInfoKB* meminfo) {
92 // Unimplemented. Must enable unittest for IOS when this gets implemented.
93 NOTIMPLEMENTED();
94 return false;
95 }
96
85 } // namespace base 97 } // namespace base
OLDNEW
« no previous file with comments | « base/process/process_metrics.h ('k') | base/process/process_metrics_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698