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

Unified Diff: remoting/protocol/fake_process_stats_stub.h

Issue 2858813002: [Chromoting] Use ProcessStatsSender in host process
Patch Set: Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/protocol/fake_connection_to_client.cc ('k') | remoting/protocol/fake_process_stats_stub.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/fake_process_stats_stub.h
diff --git a/remoting/protocol/fake_process_stats_stub.h b/remoting/protocol/fake_process_stats_stub.h
new file mode 100644
index 0000000000000000000000000000000000000000..291e68c64f14fdacbf21674322d3cfdb4da3611c
--- /dev/null
+++ b/remoting/protocol/fake_process_stats_stub.h
@@ -0,0 +1,34 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <vector>
+
+#include "base/callback.h"
+#include "remoting/proto/process_stats.pb.h"
+#include "remoting/protocol/process_stats_stub.h"
+
+namespace remoting {
+namespace protocol {
+
+class FakeProcessStatsStub final : public ProcessStatsStub {
+ public:
+ FakeProcessStatsStub();
+ ~FakeProcessStatsStub() override;
+
+ // ProcessStatsStub implementation.
+ void OnProcessStats(const AggregatedProcessResourceUsage& usage) override;
+
+ const std::vector<AggregatedProcessResourceUsage>& received() const;
+
+ void set_quit_closure(base::Closure quit_closure);
+ void set_expected_usage_count(size_t expected_usage_count);
+
+ private:
+ std::vector<AggregatedProcessResourceUsage> received_;
+ size_t expected_usage_count_ = 0;
+ base::Closure quit_closure_;
+};
+
+} // namespace protocol
+} // namespace remoting
« no previous file with comments | « remoting/protocol/fake_connection_to_client.cc ('k') | remoting/protocol/fake_process_stats_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698