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

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

Issue 2025593003: Show all system process in the task_manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing member variable. 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
Index: chrome/browser/chromeos/arc/arc_process_service.h
diff --git a/chrome/browser/chromeos/arc/arc_process_service.h b/chrome/browser/chromeos/arc/arc_process_service.h
index 231c58dd7389aca66b9f7f826c2bb68b58ad46e0..fa654b9221f1bfe58bd8c1159d063e7a70c494f7 100644
--- a/chrome/browser/chromeos/arc/arc_process_service.h
+++ b/chrome/browser/chromeos/arc/arc_process_service.h
@@ -11,6 +11,7 @@
#include "base/callback.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
+#include "base/process/process_iterator.h"
#include "base/threading/sequenced_worker_pool.h"
#include "base/threading/thread_checker.h"
#include "chrome/browser/chromeos/arc/arc_process.h"
@@ -21,16 +22,16 @@ namespace arc {
// A single global entry to get a list of ARC processes.
//
-// Call RequestProcessList() on the main UI thread to get a list of all ARC
-// processes. It returns vector<arc::ArcProcess>, which includes pid <-> nspid
-// mapping.
+// Call RequestAppProcessList() / RequestSystemProcessList on the main UI
cylee1 2016/06/02 20:58:45 nit: RequestSystemProcessList()
Hsu-Cheng 2016/06/29 10:33:57 Done.
+// thread to get a list of all ARC app / system processes. It returns
+// vector<arc::ArcProcess>, which includes pid <-> nspid mapping.
// Example:
// void OnUpdateProcessList(const vector<arc::ArcProcess>&) {...}
//
// arc::ArcProcessService* arc_process_service =
// arc::ArcProcessService::Get();
// if (!arc_process_service ||
-// !arc_process_service->RequestProcessList(
+// !arc_process_service->RequestAppProcessList(
// base::Bind(&OnUpdateProcessList)) {
// LOG(ERROR) << "ARC process instance not ready.";
// }
@@ -51,11 +52,17 @@ class ArcProcessService : public ArcService,
// Returns true if ARC IPC is ready for process list request,
// otherwise false.
- bool RequestProcessList(RequestProcessListCallback callback);
+ bool RequestAppProcessList(RequestProcessListCallback callback);
+ bool RequestSystemProcessList(RequestProcessListCallback callback);
cylee1 2016/06/02 20:58:45 Have you measured how much time does the function
Hsu-Cheng 2016/06/29 10:33:57 I didn't test it with stress scenario. The time ne
private:
void Reset();
+ void FetchAndReturnSystemProcessList(std::vector<ArcProcess>* ret_processes);
+
+ base::ProcessId GetArcInitProcessId(
Yusuke Sato 2016/06/02 21:50:11 can be static
Hsu-Cheng 2016/06/29 10:33:57 Done.
+ const base::ProcessIterator::ProcessEntries& entry_list);
+
void OnReceiveProcessList(
const RequestProcessListCallback& callback,
mojo::Array<arc::mojom::RunningAppProcessInfoPtr> mojo_processes);
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/arc_process_service.cc » ('j') | chrome/browser/chromeos/arc/arc_process_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698