OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_FAKE_DEBUG_DAEMON_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_FAKE_DEBUG_DAEMON_CLIENT_H_ |
6 #define CHROMEOS_DBUS_FAKE_DEBUG_DAEMON_CLIENT_H_ | 6 #define CHROMEOS_DBUS_FAKE_DEBUG_DAEMON_CLIENT_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <sys/types.h> |
9 | 10 |
| 11 #include <map> |
| 12 #include <string> |
10 #include <vector> | 13 #include <vector> |
11 | 14 |
12 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
13 #include "base/macros.h" | 16 #include "base/macros.h" |
14 #include "chromeos/dbus/debug_daemon_client.h" | 17 #include "chromeos/dbus/debug_daemon_client.h" |
15 | 18 |
16 namespace chromeos { | 19 namespace chromeos { |
17 | 20 |
18 // The DebugDaemonClient implementation used on Linux desktop, | 21 // The DebugDaemonClient implementation used on Linux desktop, |
19 // which does nothing. | 22 // which does nothing. |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 void UploadCrashes() override; | 62 void UploadCrashes() override; |
60 void EnableDebuggingFeatures( | 63 void EnableDebuggingFeatures( |
61 const std::string& password, | 64 const std::string& password, |
62 const EnableDebuggingCallback& callback) override; | 65 const EnableDebuggingCallback& callback) override; |
63 void QueryDebuggingFeatures( | 66 void QueryDebuggingFeatures( |
64 const QueryDevFeaturesCallback& callback) override; | 67 const QueryDevFeaturesCallback& callback) override; |
65 void RemoveRootfsVerification( | 68 void RemoveRootfsVerification( |
66 const EnableDebuggingCallback& callback) override; | 69 const EnableDebuggingCallback& callback) override; |
67 void WaitForServiceToBeAvailable( | 70 void WaitForServiceToBeAvailable( |
68 const WaitForServiceToBeAvailableCallback& callback) override; | 71 const WaitForServiceToBeAvailableCallback& callback) override; |
| 72 void SetOomScoreAdj(const std::map<pid_t, int32_t>& pid_to_oom_score_adj, |
| 73 const SetOomScoreAdjCallback& callback) override; |
69 | 74 |
70 // Sets debugging features mask for testing. | 75 // Sets debugging features mask for testing. |
71 virtual void SetDebuggingFeaturesStatus(int featues_mask); | 76 virtual void SetDebuggingFeaturesStatus(int featues_mask); |
72 | 77 |
73 // Changes the behavior of WaitForServiceToBeAvailable(). This method runs | 78 // Changes the behavior of WaitForServiceToBeAvailable(). This method runs |
74 // pending callbacks if is_available is true. | 79 // pending callbacks if is_available is true. |
75 void SetServiceIsAvailable(bool is_available); | 80 void SetServiceIsAvailable(bool is_available); |
76 | 81 |
77 private: | 82 private: |
78 int featues_mask_; | 83 int featues_mask_; |
79 | 84 |
80 bool service_is_available_; | 85 bool service_is_available_; |
81 std::vector<WaitForServiceToBeAvailableCallback> | 86 std::vector<WaitForServiceToBeAvailableCallback> |
82 pending_wait_for_service_to_be_available_callbacks_; | 87 pending_wait_for_service_to_be_available_callbacks_; |
83 | 88 |
84 DISALLOW_COPY_AND_ASSIGN(FakeDebugDaemonClient); | 89 DISALLOW_COPY_AND_ASSIGN(FakeDebugDaemonClient); |
85 }; | 90 }; |
86 | 91 |
87 } // namespace chromeos | 92 } // namespace chromeos |
88 | 93 |
89 #endif // CHROMEOS_DBUS_FAKE_DEBUG_DAEMON_CLIENT_H_ | 94 #endif // CHROMEOS_DBUS_FAKE_DEBUG_DAEMON_CLIENT_H_ |
OLD | NEW |