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

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

Issue 609923004: Cleanup usage of scoped_ptr<> in remoting for C++11 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
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 18 matching lines...) Expand all
29 } 29 }
30 30
31 void AudioWriter::ProcessAudioPacket(scoped_ptr<AudioPacket> packet, 31 void AudioWriter::ProcessAudioPacket(scoped_ptr<AudioPacket> packet,
32 const base::Closure& done) { 32 const base::Closure& done) {
33 buffered_writer_.Write(SerializeAndFrameMessage(*packet), done); 33 buffered_writer_.Write(SerializeAndFrameMessage(*packet), done);
34 } 34 }
35 35
36 // static 36 // static
37 scoped_ptr<AudioWriter> AudioWriter::Create(const SessionConfig& config) { 37 scoped_ptr<AudioWriter> AudioWriter::Create(const SessionConfig& config) {
38 if (!config.is_audio_enabled()) 38 if (!config.is_audio_enabled())
39 return scoped_ptr<AudioWriter>(); 39 return nullptr;
40 // TODO(kxing): Support different session configurations. 40 // TODO(kxing): Support different session configurations.
41 return scoped_ptr<AudioWriter>(new AudioWriter()); 41 return scoped_ptr<AudioWriter>(new AudioWriter());
42 } 42 }
43 43
44 } // namespace protocol 44 } // namespace protocol
45 } // namespace remoting 45 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698