OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 #include "services/resource_coordinator/coordination_unit/coordination_unit_impl
.h" | 5 #include "services/resource_coordinator/coordination_unit/coordination_unit_impl
.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
| 8 #include <unordered_map> |
8 #include <utility> | 9 #include <utility> |
9 | 10 |
10 #include "base/logging.h" | 11 #include "base/logging.h" |
11 #include "base/process/process_handle.h" | 12 #include "base/process/process_handle.h" |
12 #include "base/strings/string_number_conversions.h" | 13 #include "base/strings/string_number_conversions.h" |
13 #include "base/unguessable_token.h" | 14 #include "base/unguessable_token.h" |
14 #include "mojo/public/cpp/bindings/strong_binding.h" | 15 #include "mojo/public/cpp/bindings/strong_binding.h" |
15 #include "services/resource_coordinator/public/cpp/coordination_unit_id.h" | 16 #include "services/resource_coordinator/public/cpp/coordination_unit_id.h" |
16 | 17 |
17 namespace resource_coordinator { | 18 namespace resource_coordinator { |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 policy_callback_ = std::move(callback); | 211 policy_callback_ = std::move(callback); |
211 | 212 |
212 RecalcCoordinationPolicy(); | 213 RecalcCoordinationPolicy(); |
213 } | 214 } |
214 | 215 |
215 void CoordinationUnitImpl::UnregisterCoordinationPolicyCallback() { | 216 void CoordinationUnitImpl::UnregisterCoordinationPolicyCallback() { |
216 policy_callback_.reset(); | 217 policy_callback_.reset(); |
217 current_policy_.reset(); | 218 current_policy_.reset(); |
218 } | 219 } |
219 | 220 |
| 221 double CoordinationUnitImpl::GetCPUUsageForTesting() { |
| 222 return -1.0; |
| 223 } |
| 224 |
220 } // namespace resource_coordinator | 225 } // namespace resource_coordinator |
OLD | NEW |