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

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

Issue 1654513003: Simplify message parsing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@no_done
Patch Set: Created 4 years, 10 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/audio_writer.h ('k') | remoting/protocol/channel_dispatcher_base.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/protocol/audio_writer.h" 5 #include "remoting/protocol/audio_writer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "net/socket/stream_socket.h" 8 #include "net/socket/stream_socket.h"
9 #include "remoting/base/constants.h" 9 #include "remoting/base/constants.h"
10 #include "remoting/proto/audio.pb.h" 10 #include "remoting/proto/audio.pb.h"
(...skipping 16 matching lines...) Expand all
27 writer()->Write(SerializeAndFrameMessage(*packet), done); 27 writer()->Write(SerializeAndFrameMessage(*packet), done);
28 } 28 }
29 29
30 // static 30 // static
31 scoped_ptr<AudioWriter> AudioWriter::Create(const SessionConfig& config) { 31 scoped_ptr<AudioWriter> AudioWriter::Create(const SessionConfig& config) {
32 if (!config.is_audio_enabled()) 32 if (!config.is_audio_enabled())
33 return nullptr; 33 return nullptr;
34 return make_scoped_ptr(new AudioWriter()); 34 return make_scoped_ptr(new AudioWriter());
35 } 35 }
36 36
37 void AudioWriter::OnIncomingMessage(scoped_ptr<CompoundBuffer> message) {
38 LOG(ERROR) << "Received unexpected message on the audio channel.";
39 }
40
37 } // namespace protocol 41 } // namespace protocol
38 } // namespace remoting 42 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/audio_writer.h ('k') | remoting/protocol/channel_dispatcher_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698