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

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

Issue 10556020: Cleaned up the reader and writer create methods to return scoped_ptr. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed unnecessary code Created 8 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « remoting/protocol/audio_writer.h ('k') | remoting/protocol/connection_to_client.cc » ('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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 bool AudioWriter::is_connected() { 60 bool AudioWriter::is_connected() {
61 return channel_.get() != NULL; 61 return channel_.get() != NULL;
62 } 62 }
63 63
64 void AudioWriter::ProcessAudioPacket(scoped_ptr<AudioPacket> packet, 64 void AudioWriter::ProcessAudioPacket(scoped_ptr<AudioPacket> packet,
65 const base::Closure& done) { 65 const base::Closure& done) {
66 buffered_writer_.Write(SerializeAndFrameMessage(*packet), done); 66 buffered_writer_.Write(SerializeAndFrameMessage(*packet), done);
67 } 67 }
68 68
69 // static 69 // static
70 AudioWriter* AudioWriter::Create(const SessionConfig& config) { 70 scoped_ptr<AudioWriter> AudioWriter::Create(const SessionConfig& config) {
71 // TODO(kxing): Support different session configurations. 71 // TODO(kxing): Support different session configurations.
72 return new AudioWriter(); 72 return scoped_ptr<AudioWriter>(new AudioWriter());
73 } 73 }
74 74
75 } // namespace protocol 75 } // namespace protocol
76 } // namespace remoting 76 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/audio_writer.h ('k') | remoting/protocol/connection_to_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698