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

Unified Diff: chromeos/dbus/debug_daemon_client.h

Issue 2247433002: TabManager: Set OOM scores via a new debugd interface on ChromeOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unittest Created 4 years, 4 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: chromeos/dbus/debug_daemon_client.h
diff --git a/chromeos/dbus/debug_daemon_client.h b/chromeos/dbus/debug_daemon_client.h
index 20d2ae331443d763b0f8a4f5a0d20c7d64679c3d..af32bdc4ce0617594d7178bdda8a9aef2e42a70e 100644
--- a/chromeos/dbus/debug_daemon_client.h
+++ b/chromeos/dbus/debug_daemon_client.h
@@ -6,8 +6,11 @@
#define CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_
#include <stdint.h>
+#include <sys/types.h>
#include <map>
+#include <string>
+#include <vector>
#include "base/callback.h"
#include "base/files/file.h"
@@ -194,6 +197,18 @@ class CHROMEOS_EXPORT DebugDaemonClient
virtual void WaitForServiceToBeAvailable(
const WaitForServiceToBeAvailableCallback& callback) = 0;
+ // A callback for SetOomScoreAdj().
+ typedef base::Callback<void(bool success, const std::string& output)>
+ SetOomScoreAdjCallback;
+
+ // Set OOM score oom_score_adj for some process.
+ // Note that the corresponding DBus configuration of the debugd method
+ // "SetOomScoreAdj" only permits setting OOM score for processes running by
+ // user chronos or Android apps.
+ virtual void SetOomScoreAdj(
+ const std::map<pid_t, int32_t>& pid_to_oom_score_adj,
+ const SetOomScoreAdjCallback& callback) = 0;
+
// Factory function, creates a new instance and returns ownership.
// For normal usage, access the singleton via DBusThreadManager::Get().
static DebugDaemonClient* Create();
« no previous file with comments | « chrome/browser/memory/tab_manager_delegate_chromeos_unittest.cc ('k') | chromeos/dbus/debug_daemon_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698