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

Side by Side Diff: remoting/protocol/process_stats_dispatcher.cc

Issue 2858813002: [Chromoting] Use ProcessStatsSender in host process
Patch Set: 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
« no previous file with comments | « remoting/protocol/process_stats_dispatcher.h ('k') | remoting/protocol/process_stats_stub.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 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 "remoting/protocol/process_stats_dispatcher.h"
6
7 #include "remoting/base/compound_buffer.h"
8 #include "remoting/base/constants.h"
9 #include "remoting/proto/process_stats.pb.h"
10
11 namespace remoting {
12 namespace protocol {
13
14 ProcessStatsDispatcher::ProcessStatsDispatcher()
15 : ChannelDispatcherBase(kProcessStatsChannelName) {}
16
17 ProcessStatsDispatcher::~ProcessStatsDispatcher() = default;
18
19 void ProcessStatsDispatcher::OnProcessStats(
20 const AggregatedProcessResourceUsage& usage) {
21 // MessagePipe::Send() receives a raw pointer without const-qualifier, so
22 // making a copy can avoid const_cast.
23 AggregatedProcessResourceUsage copy = usage;
24 message_pipe()->Send(&copy, base::Closure());
25 }
26
27 void ProcessStatsDispatcher::OnIncomingMessage(
28 std::unique_ptr<remoting::CompoundBuffer> message) {
29 // Do not expect to receive message from this channel.
30 }
31
32 } // namespace protocol
33 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/process_stats_dispatcher.h ('k') | remoting/protocol/process_stats_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698