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

Unified Diff: chrome/browser/chromeos/arc/process/arc_process.cc

Issue 2893943003: TabManager: Add more logs to understand how it works when memory is low. (Closed)
Patch Set: review comments Created 3 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/process/arc_process.cc
diff --git a/chrome/browser/chromeos/arc/process/arc_process.cc b/chrome/browser/chromeos/arc/process/arc_process.cc
index fbb8d7c37930dedffa96818be60a0726e8723edb..322e731d9f5d29111e2ece38b33e27a6951dc9aa 100644
--- a/chrome/browser/chromeos/arc/process/arc_process.cc
+++ b/chrome/browser/chromeos/arc/process/arc_process.cc
@@ -45,4 +45,16 @@ bool ArcProcess::IsKernelKillable() const {
return process_state() > arc::mojom::ProcessState::PERSISTENT_UI;
}
+std::ostream& operator<<(std::ostream& out, const ArcProcess& arc_process) {
+ out << "Arc process " << arc_process.process_name() << " ("
Yusuke Sato 2017/05/18 21:42:49 nit: it might be unclear that the number inside th
cylee1 2017/05/18 22:11:06 Done.
+ << arc_process.pid() << ")"
+ << ", process_state: " << arc_process.process_state()
+ << ", is_focused: " << arc_process.is_focused()
+ << ", last_activity_time: " << arc_process.last_activity_time()
+ << ", packages: ";
+ for (const auto pkg : arc_process.packages())
+ out << pkg << ",";
Yusuke Sato 2017/05/18 21:42:49 The last "," seems redundant. #include "base/str
cylee1 2017/05/18 22:11:05 thanks ! haven't work on the code base for a while
+ return out;
+}
+
} // namespace arc

Powered by Google App Engine
This is Rietveld 408576698