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

Unified Diff: chrome/browser/chromeos/arc/arc_process_service.cc

Issue 2023643002: Add ARC app icons to the Task Manager UI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert back to the original test code Created 4 years, 7 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
« no previous file with comments | « chrome/browser/chromeos/arc/arc_process.cc ('k') | chrome/browser/memory/tab_manager_delegate_chromeos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/arc/arc_process_service.cc
diff --git a/chrome/browser/chromeos/arc/arc_process_service.cc b/chrome/browser/chromeos/arc/arc_process_service.cc
index e8dc49b233a105ad26ed335c91a86db621210a8d..550ea0ae0c2f5a62cf0815969f2168c52a3a353c 100644
--- a/chrome/browser/chromeos/arc/arc_process_service.cc
+++ b/chrome/browser/chromeos/arc/arc_process_service.cc
@@ -166,13 +166,20 @@ void ArcProcessService::PopulateProcessList(
const vector<arc::mojom::RunningAppProcessInfoPtr>* raw_processes,
vector<ArcProcess>* ret_processes) {
DCHECK(thread_checker_.CalledOnValidThread());
+
for (const auto& entry : *raw_processes) {
const auto it = nspid_to_pid_.find(entry->pid);
// In case the process already dies so couldn't find corresponding pid.
if (it != nspid_to_pid_.end() && it->second != kNullProcessId) {
- ArcProcess arc_process = {
- entry->pid, it->second, entry->process_name, entry->process_state};
- ret_processes->push_back(arc_process);
+ ArcProcess arc_process(entry->pid, it->second, entry->process_name,
+ entry->process_state);
+ // |entry->packages| is provided only when process.mojom's verion is >=4.
+ if (entry->packages) {
+ for (const auto& package : entry->packages) {
+ arc_process.packages().push_back(package.get());
+ }
+ }
+ ret_processes->push_back(std::move(arc_process));
}
}
}
« no previous file with comments | « chrome/browser/chromeos/arc/arc_process.cc ('k') | chrome/browser/memory/tab_manager_delegate_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698