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

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

Issue 2766623002: Revert of Fix free memory calculation. (Closed)
Patch Set: Created 3 years, 9 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_ios.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 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 "base/process/process_metrics.h" 5 #include "base/process/process_metrics.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "build/build_config.h" 11 #include "build/build_config.h"
12 12
13 namespace base { 13 namespace base {
14 14
15 SystemMemoryInfoKB::SystemMemoryInfoKB() = default;
16
17 SystemMemoryInfoKB::SystemMemoryInfoKB(const SystemMemoryInfoKB& other) =
18 default;
19
20 SystemMetrics::SystemMetrics() { 15 SystemMetrics::SystemMetrics() {
21 committed_memory_ = 0; 16 committed_memory_ = 0;
22 } 17 }
23 18
24 SystemMetrics SystemMetrics::Sample() { 19 SystemMetrics SystemMetrics::Sample() {
25 SystemMetrics system_metrics; 20 SystemMetrics system_metrics;
26 21
27 system_metrics.committed_memory_ = GetSystemCommitCharge(); 22 system_metrics.committed_memory_ = GetSystemCommitCharge();
28 #if defined(OS_LINUX) || defined(OS_ANDROID) 23 #if defined(OS_LINUX) || defined(OS_ANDROID)
29 GetSystemMemoryInfo(&system_metrics.memory_info_); 24 GetSystemMemoryInfo(&system_metrics.memory_info_);
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 return (wakeups_delta_for_ms + time_delta / 2) / time_delta; 90 return (wakeups_delta_for_ms + time_delta / 2) / time_delta;
96 } 91 }
97 #else 92 #else
98 int ProcessMetrics::GetIdleWakeupsPerSecond() { 93 int ProcessMetrics::GetIdleWakeupsPerSecond() {
99 NOTIMPLEMENTED(); // http://crbug.com/120488 94 NOTIMPLEMENTED(); // http://crbug.com/120488
100 return 0; 95 return 0;
101 } 96 }
102 #endif // defined(OS_MACOSX) || defined(OS_LINUX) 97 #endif // defined(OS_MACOSX) || defined(OS_LINUX)
103 98
104 } // namespace base 99 } // namespace base
OLDNEW
« no previous file with comments | « base/process/process_metrics.h ('k') | base/process/process_metrics_ios.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698