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_BASE_CURRENT_PROCESS_STATS_AGENT_H_ |
| 6 #define REMOTING_BASE_CURRENT_PROCESS_STATS_AGENT_H_ |
| 7 |
| 8 #include <memory> |
| 9 #include <string> |
| 10 |
| 11 #include "base/process/process_metrics.h" |
| 12 #include "remoting/base/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); |
| 21 ~CurrentProcessStatsAgent() override; |
| 22 |
| 23 protocol::ProcessResourceUsage GetResourceUsage() override; |
| 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_BASE_CURRENT_PROCESS_STATS_AGENT_H_ |
OLD | NEW |