Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_ |
| 6 #define CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_ | 6 #define CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 185 virtual void UploadCrashes() = 0; | 185 virtual void UploadCrashes() = 0; |
| 186 | 186 |
| 187 // A callback for WaitForServiceToBeAvailable(). | 187 // A callback for WaitForServiceToBeAvailable(). |
| 188 typedef base::Callback<void(bool service_is_ready)> | 188 typedef base::Callback<void(bool service_is_ready)> |
| 189 WaitForServiceToBeAvailableCallback; | 189 WaitForServiceToBeAvailableCallback; |
| 190 | 190 |
| 191 // Runs the callback as soon as the service becomes available. | 191 // Runs the callback as soon as the service becomes available. |
| 192 virtual void WaitForServiceToBeAvailable( | 192 virtual void WaitForServiceToBeAvailable( |
| 193 const WaitForServiceToBeAvailableCallback& callback) = 0; | 193 const WaitForServiceToBeAvailableCallback& callback) = 0; |
| 194 | 194 |
| 195 // A callback for SetOOmScoreAdj(). | |
|
hashimoto
2016/08/15 03:54:23
nit: s/OOm/Oom/
cylee1
2016/08/16 19:47:11
Done.
| |
| 196 typedef base::Callback<void(bool success, const std::string& output)> | |
| 197 SetOomScoreAdjCallback; | |
| 198 | |
| 199 // Set OOM score oom_score_adj for some process. | |
| 200 // Note that the API only permits setting OOM score for processes running by | |
|
hashimoto
2016/08/15 03:54:23
Please make it clear what "the API" here means. (i
cylee1
2016/08/16 19:47:11
Done.
| |
| 201 // chronos or Android apps. | |
| 202 virtual void SetOomScoreAdj(const std::map<int, int>& pairs, | |
|
hashimoto
2016/08/15 03:54:23
From the name "pairs", it's not clear what the val
cylee1
2016/08/16 19:47:11
Done.
| |
| 203 const SetOomScoreAdjCallback& callback) = 0; | |
| 204 | |
| 195 // Factory function, creates a new instance and returns ownership. | 205 // Factory function, creates a new instance and returns ownership. |
| 196 // For normal usage, access the singleton via DBusThreadManager::Get(). | 206 // For normal usage, access the singleton via DBusThreadManager::Get(). |
| 197 static DebugDaemonClient* Create(); | 207 static DebugDaemonClient* Create(); |
| 198 | 208 |
| 199 protected: | 209 protected: |
| 200 // Create() should be used instead. | 210 // Create() should be used instead. |
| 201 DebugDaemonClient(); | 211 DebugDaemonClient(); |
| 202 | 212 |
| 203 private: | 213 private: |
| 204 DISALLOW_COPY_AND_ASSIGN(DebugDaemonClient); | 214 DISALLOW_COPY_AND_ASSIGN(DebugDaemonClient); |
| 205 }; | 215 }; |
| 206 | 216 |
| 207 } // namespace chromeos | 217 } // namespace chromeos |
| 208 | 218 |
| 209 #endif // CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_ | 219 #endif // CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_ |
| OLD | NEW |