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 #include <vector> | |
6 | |
7 #include "base/callback.h" | |
8 #include "remoting/proto/process_stats.pb.h" | |
9 #include "remoting/protocol/process_stats_stub.h" | |
10 | |
11 namespace remoting { | |
12 namespace protocol { | |
13 | |
14 class FakeProcessStatsStub final : public ProcessStatsStub { | |
15 public: | |
16 FakeProcessStatsStub(); | |
17 ~FakeProcessStatsStub() override; | |
18 | |
19 // ProcessStatsStub implementation. | |
20 void OnProcessStats(const AggregatedProcessResourceUsage& usage) override; | |
21 | |
22 const std::vector<AggregatedProcessResourceUsage>& received() const; | |
23 | |
24 void set_quit_closure(base::Closure quit_closure); | |
25 void set_expected_usage_count(size_t expected_usage_count); | |
joedow
2017/05/03 21:41:02
nit: trivial setters like this can be written inli
Hzj_jie
2017/05/03 22:18:04
Since we have a cc file anyway, I believe avoiding
joedow
2017/05/08 16:25:41
inline functions are fine for trivial getters:
htt
Hzj_jie
2017/05/08 18:16:19
But I believe it's not a must-have. https://www.ch
joedow
2017/05/08 18:18:53
That's fine, my comment was marked as a nit
| |
26 | |
27 private: | |
28 std::vector<AggregatedProcessResourceUsage> received_; | |
29 size_t expected_usage_count_ = 0; | |
30 base::Closure quit_closure_; | |
31 }; | |
32 | |
33 } // namespace protocol | |
34 } // namespace remoting | |
OLD | NEW |