Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 REMOTING_HOST_CURRENT_PROCESS_STATS_AGENT_H_ | |
| 6 #define REMOTING_HOST_CURRENT_PROCESS_STATS_AGENT_H_ | |
| 7 | |
| 8 #include <memory> | |
| 9 #include <string> | |
| 10 | |
| 11 #include "base/process/process_metrics.h" | |
|
joedow
2017/04/24 17:16:08
forward declare 'base::ProcessMetrics' since you d
Hzj_jie
2017/04/25 00:17:53
Done.
| |
| 12 #include "remoting/host/process_stats_agent.h" | |
| 13 #include "remoting/proto/process_stats.pb.h" | |
| 14 | |
| 15 namespace remoting { | |
| 16 | |
| 17 // A component to report statistic data of current process. | |
| 18 class CurrentProcessStatsAgent final : public ProcessStatsAgent { | |
| 19 public: | |
| 20 CurrentProcessStatsAgent(const std::string& process_name); | |
|
joedow
2017/04/24 17:16:08
single param c'tor should be marked explicit.
Hzj_jie
2017/04/25 00:17:53
Done.
| |
| 21 ~CurrentProcessStatsAgent() override; | |
| 22 | |
| 23 protocol::ProcessResourceUsage GetResourceUsage() override; | |
|
joedow
2017/04/24 17:16:08
nit: comment the override "// ProcessStatsAgent in
Hzj_jie
2017/04/25 00:17:53
Done.
| |
| 24 | |
| 25 private: | |
| 26 const std::string process_name_; | |
| 27 const std::unique_ptr<base::ProcessMetrics> metrics_; | |
| 28 }; | |
| 29 | |
| 30 } // namespace remoting | |
| 31 | |
| 32 #endif // REMOTING_HOST_CURRENT_PROCESS_STATS_AGENT_H_ | |
| OLD | NEW |