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

Unified Diff: extensions/browser/api/system_cpu/cpu_info_provider_linux.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_linux.cc
diff --git a/extensions/browser/api/system_cpu/cpu_info_provider_linux.cc b/extensions/browser/api/system_cpu/cpu_info_provider_linux.cc
index 52c191a64ac2931f5779ff02374c433369fd8d22..2adbdb15f0f7df42ede79f1be9587cbb6a5707ba 100644
--- a/extensions/browser/api/system_cpu/cpu_info_provider_linux.cc
+++ b/extensions/browser/api/system_cpu/cpu_info_provider_linux.cc
@@ -21,7 +21,7 @@ const char kProcStat[] = "/proc/stat";
} // namespace
bool CpuInfoProvider::QueryCpuTimePerProcessor(
- std::vector<linked_ptr<api::system_cpu::ProcessorInfo>>* infos) {
+ std::vector<api::system_cpu::ProcessorInfo>* infos) {
DCHECK(infos);
// WARNING: this method may return incomplete data because some processors may
@@ -64,10 +64,10 @@ bool CpuInfoProvider::QueryCpuTimePerProcessor(
return false;
}
- infos->at(pindex)->usage.kernel = static_cast<double>(sys);
- infos->at(pindex)->usage.user = static_cast<double>(user + nice);
- infos->at(pindex)->usage.idle = static_cast<double>(idle);
- infos->at(pindex)->usage.total =
+ infos->at(pindex).usage.kernel = static_cast<double>(sys);
+ infos->at(pindex).usage.user = static_cast<double>(user + nice);
+ infos->at(pindex).usage.idle = static_cast<double>(idle);
+ infos->at(pindex).usage.total =
static_cast<double>(sys + user + nice + idle);
}
« no previous file with comments | « extensions/browser/api/system_cpu/cpu_info_provider.cc ('k') | extensions/browser/api/system_cpu/cpu_info_provider_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698