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

Unified Diff: extensions/browser/api/system_cpu/cpu_info_provider_mac.cc

Issue 1842953002: [Extensions] Convert APIs to use movable types [13] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: extensions/browser/api/system_cpu/cpu_info_provider_mac.cc
diff --git a/extensions/browser/api/system_cpu/cpu_info_provider_mac.cc b/extensions/browser/api/system_cpu/cpu_info_provider_mac.cc
index 6c528ed2526749ca6130826be67890a63772be57..ccc2e4d0e99aac0cf059886fb0ebe63e8863613f 100644
--- a/extensions/browser/api/system_cpu/cpu_info_provider_mac.cc
+++ b/extensions/browser/api/system_cpu/cpu_info_provider_mac.cc
@@ -12,7 +12,7 @@
namespace extensions {
bool CpuInfoProvider::QueryCpuTimePerProcessor(
- std::vector<linked_ptr<api::system_cpu::ProcessorInfo>>* infos) {
+ std::vector<api::system_cpu::ProcessorInfo>* infos) {
DCHECK(infos);
natural_t num_of_processors;
@@ -36,10 +36,10 @@ bool CpuInfoProvider::QueryCpuTimePerProcessor(
nice = static_cast<double>(cpu_infos[i].cpu_ticks[CPU_STATE_NICE]),
idle = static_cast<double>(cpu_infos[i].cpu_ticks[CPU_STATE_IDLE]);
- infos->at(i)->usage.kernel = sys;
- infos->at(i)->usage.user = user + nice;
- infos->at(i)->usage.idle = idle;
- infos->at(i)->usage.total = sys + user + nice + idle;
+ infos->at(i).usage.kernel = sys;
+ infos->at(i).usage.user = user + nice;
+ infos->at(i).usage.idle = idle;
+ infos->at(i).usage.total = sys + user + nice + idle;
}
vm_deallocate(mach_task_self(),

Powered by Google App Engine
This is Rietveld 408576698