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

Side by Side Diff: services/resource_coordinator/coordination_unit/coordination_unit_impl.cc

Issue 2892443002: [GRC] Process Coordination Unit support for Global Resource Controller (Closed)
Patch Set: Rebase 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 unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698