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

Side by Side Diff: services/resource_coordinator/coordination_unit/process_coordination_unit_impl.h

Issue 2892443002: [GRC] Process Coordination Unit support for Global Resource Controller (Closed)
Patch Set: Remove unused headers and use forward declarations 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef SERVICES_RESOURCE_COORDINATOR_COORDINATION_UNIT_PROCESS_COORDINATION_UNI T_IMPL_H_
6 #define SERVICES_RESOURCE_COORDINATOR_COORDINATION_UNIT_PROCESS_COORDINATION_UNI T_IMPL_H_
7
8 #include "base/process/process_metrics.h"
9 #include "base/timer/timer.h"
10 #include "services/resource_coordinator/coordination_unit/coordination_unit_impl .h"
11
12 namespace service_manager {
13
oystein (OOO til 10th of July) 2017/05/17 23:06:06 nit: ditch the blank lines here and the //namespac
matthalp 2017/05/18 16:13:46 Done.
14 class ServiceContextRef;
15
16 } // namespace service_manager
17
18 namespace resource_coordinator {
19
20 struct CoordinationUnitID;
21
22 class ProcessCoordinationUnitImpl : public CoordinationUnitImpl {
23 public:
24 ProcessCoordinationUnitImpl(
25 const CoordinationUnitID& id,
26 std::unique_ptr<service_manager::ServiceContextRef> service_ref);
27 ~ProcessCoordinationUnitImpl() override;
28 void ScheduleProcessCPUProfiling(base::TimeDelta delay);
29 void MeasureProcessCPUUsage();
30 double GetCPUUsageForTesting() override;
31
32 private:
33 std::unique_ptr<base::ProcessMetrics> process_metrics_;
oystein (OOO til 10th of July) 2017/05/17 23:06:07 nit: #include <memory> for this.
matthalp 2017/05/18 16:13:46 Done.
34 base::OneShotTimer repeating_timer_;
35 double cpu_usage_;
36
37 DISALLOW_COPY_AND_ASSIGN(ProcessCoordinationUnitImpl);
oystein (OOO til 10th of July) 2017/05/17 23:06:07 nit: #include "base/macros.h"
matthalp 2017/05/18 16:13:46 Done.
38 };
39
40 } // namespace resource_coordinator
41
42 #endif // SERVICES_RESOURCE_COORDINATOR_COORDINATION_UNIT_PROCESS_COORDINATION_ UNIT_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698