diff options
author | dcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-14 00:35:13 +0000 |
---|---|---|
committer | dcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-14 00:35:13 +0000 |
commit | 3c2dc955e2d6bbcc20fd18512c09cc916e796b0a (patch) | |
tree | fff266eb50e04302ce4f632a938a1963b4b1fefe | |
parent | 27b7b64d69423a0e50b740f0b9d81c46a3de33be (diff) | |
download | chromium_src-3c2dc955e2d6bbcc20fd18512c09cc916e796b0a.zip chromium_src-3c2dc955e2d6bbcc20fd18512c09cc916e796b0a.tar.gz chromium_src-3c2dc955e2d6bbcc20fd18512c09cc916e796b0a.tar.bz2 |
Rewrite scoped_ptr<T>(NULL) to use the default ctor in remoting/.
This is the result of running the rewrite_scoped_ptr_ctor_null tool
across all files built on Linux in the remoting/ directory.
BUG=173286
Review URL: https://chromiumcodereview.appspot.com/16964002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206247 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | remoting/codec/audio_decoder.cc | 2 | ||||
-rw-r--r-- | remoting/codec/audio_decoder_speex.cc | 4 | ||||
-rw-r--r-- | remoting/codec/video_encoder_vp8.cc | 5 | ||||
-rw-r--r-- | remoting/host/client_session.cc | 4 | ||||
-rw-r--r-- | remoting/host/input_injector_linux.cc | 2 | ||||
-rw-r--r-- | remoting/jingle_glue/iq_sender.cc | 2 | ||||
-rw-r--r-- | remoting/protocol/audio_reader.cc | 2 | ||||
-rw-r--r-- | remoting/protocol/audio_writer.cc | 2 | ||||
-rw-r--r-- | remoting/protocol/libjingle_transport_factory.cc | 4 | ||||
-rw-r--r-- | remoting/protocol/me2me_host_authenticator_factory.cc | 4 | ||||
-rw-r--r-- | remoting/protocol/ssl_hmac_channel_authenticator.cc | 2 | ||||
-rw-r--r-- | remoting/protocol/video_reader.cc | 2 | ||||
-rw-r--r-- | remoting/protocol/video_writer.cc | 2 |
13 files changed, 17 insertions, 20 deletions
diff --git a/remoting/codec/audio_decoder.cc b/remoting/codec/audio_decoder.cc index 3dc70c3..94c30b4 100644 --- a/remoting/codec/audio_decoder.cc +++ b/remoting/codec/audio_decoder.cc @@ -25,7 +25,7 @@ scoped_ptr<AudioDecoder> AudioDecoder::CreateAudioDecoder( } NOTIMPLEMENTED(); - return scoped_ptr<AudioDecoder>(NULL); + return scoped_ptr<AudioDecoder>(); } } // namespace remoting diff --git a/remoting/codec/audio_decoder_speex.cc b/remoting/codec/audio_decoder_speex.cc index 7114844..31bdcd4 100644 --- a/remoting/codec/audio_decoder_speex.cc +++ b/remoting/codec/audio_decoder_speex.cc @@ -74,7 +74,7 @@ scoped_ptr<AudioPacket> AudioDecoderSpeex::Decode( (packet->sampling_rate() == AudioPacket::SAMPLING_RATE_INVALID) || (packet->channels() != AudioPacket::CHANNELS_STEREO)) { LOG(WARNING) << "Received an unsupported packet."; - return scoped_ptr<AudioPacket>(NULL); + return scoped_ptr<AudioPacket>(); } if (packet->data_size() > kMaxFramesPerPacket) { LOG(WARNING) << "Received an packet with too many frames."; @@ -105,7 +105,7 @@ scoped_ptr<AudioPacket> AudioDecoderSpeex::Decode( int status = speex_decode_int(speex_state_, speex_bits_.get(), samples); if (status < 0) { LOG(ERROR) << "Error in decoding Speex data."; - return scoped_ptr<AudioPacket>(NULL); + return scoped_ptr<AudioPacket>(); } // Transform mono to stereo. speex_decode_stereo_int(samples, speex_frame_size_, speex_stereo_state_); diff --git a/remoting/codec/video_encoder_vp8.cc b/remoting/codec/video_encoder_vp8.cc index 7824065..21712aa 100644 --- a/remoting/codec/video_encoder_vp8.cc +++ b/remoting/codec/video_encoder_vp8.cc @@ -31,12 +31,9 @@ namespace remoting { VideoEncoderVp8::VideoEncoderVp8() : initialized_(false), - codec_(NULL), - image_(NULL), active_map_width_(0), active_map_height_(0), - last_timestamp_(0) { -} + last_timestamp_(0) {} VideoEncoderVp8::~VideoEncoderVp8() { Destroy(); diff --git a/remoting/host/client_session.cc b/remoting/host/client_session.cc index cf282dd..2ce1400 100644 --- a/remoting/host/client_session.cc +++ b/remoting/host/client_session.cc @@ -417,7 +417,7 @@ scoped_ptr<VideoEncoder> ClientSession::CreateVideoEncoder( } NOTIMPLEMENTED(); - return scoped_ptr<VideoEncoder>(NULL); + return scoped_ptr<VideoEncoder>(); } // static @@ -434,7 +434,7 @@ scoped_ptr<AudioEncoder> ClientSession::CreateAudioEncoder( } NOTIMPLEMENTED(); - return scoped_ptr<AudioEncoder>(NULL); + return scoped_ptr<AudioEncoder>(); } } // namespace remoting diff --git a/remoting/host/input_injector_linux.cc b/remoting/host/input_injector_linux.cc index bafbb76..45221d1 100644 --- a/remoting/host/input_injector_linux.cc +++ b/remoting/host/input_injector_linux.cc @@ -500,7 +500,7 @@ scoped_ptr<InputInjector> InputInjector::Create( scoped_ptr<InputInjectorLinux> injector( new InputInjectorLinux(main_task_runner)); if (!injector->Init()) - return scoped_ptr<InputInjector>(NULL); + return scoped_ptr<InputInjector>(); return injector.PassAs<InputInjector>(); } diff --git a/remoting/jingle_glue/iq_sender.cc b/remoting/jingle_glue/iq_sender.cc index 2fb6cf0..65c93bc 100644 --- a/remoting/jingle_glue/iq_sender.cc +++ b/remoting/jingle_glue/iq_sender.cc @@ -46,7 +46,7 @@ scoped_ptr<IqRequest> IqSender::SendIq(scoped_ptr<buzz::XmlElement> stanza, std::string id = signal_strategy_->GetNextId(); stanza->AddAttr(buzz::QN_ID, id); if (!signal_strategy_->SendStanza(stanza.Pass())) { - return scoped_ptr<IqRequest>(NULL); + return scoped_ptr<IqRequest>(); } DCHECK(requests_.find(id) == requests_.end()); scoped_ptr<IqRequest> request(new IqRequest(this, callback, addressee)); diff --git a/remoting/protocol/audio_reader.cc b/remoting/protocol/audio_reader.cc index 9723201..72a0afd 100644 --- a/remoting/protocol/audio_reader.cc +++ b/remoting/protocol/audio_reader.cc @@ -25,7 +25,7 @@ AudioReader::~AudioReader() { // static scoped_ptr<AudioReader> AudioReader::Create(const SessionConfig& config) { if (!config.is_audio_enabled()) - return scoped_ptr<AudioReader>(NULL); + return scoped_ptr<AudioReader>(); // TODO(kxing): Support different session configurations. return scoped_ptr<AudioReader>(new AudioReader(AudioPacket::ENCODING_RAW)); } diff --git a/remoting/protocol/audio_writer.cc b/remoting/protocol/audio_writer.cc index 37c90ed..b1855e4 100644 --- a/remoting/protocol/audio_writer.cc +++ b/remoting/protocol/audio_writer.cc @@ -36,7 +36,7 @@ void AudioWriter::ProcessAudioPacket(scoped_ptr<AudioPacket> packet, // static scoped_ptr<AudioWriter> AudioWriter::Create(const SessionConfig& config) { if (!config.is_audio_enabled()) - return scoped_ptr<AudioWriter>(NULL); + return scoped_ptr<AudioWriter>(); // TODO(kxing): Support different session configurations. return scoped_ptr<AudioWriter>(new AudioWriter()); } diff --git a/remoting/protocol/libjingle_transport_factory.cc b/remoting/protocol/libjingle_transport_factory.cc index b3ee5b8..78b30bb 100644 --- a/remoting/protocol/libjingle_transport_factory.cc +++ b/remoting/protocol/libjingle_transport_factory.cc @@ -312,7 +312,7 @@ void LibjingleStreamTransport::NotifyConnectFailed() { authenticator_.reset(); - NotifyConnected(scoped_ptr<net::StreamSocket>(NULL)); + NotifyConnected(scoped_ptr<net::StreamSocket>()); } } // namespace @@ -379,7 +379,7 @@ scoped_ptr<StreamTransport> LibjingleTransportFactory::CreateStreamTransport() { scoped_ptr<DatagramTransport> LibjingleTransportFactory::CreateDatagramTransport() { NOTIMPLEMENTED(); - return scoped_ptr<DatagramTransport>(NULL); + return scoped_ptr<DatagramTransport>(); } } // namespace protocol diff --git a/remoting/protocol/me2me_host_authenticator_factory.cc b/remoting/protocol/me2me_host_authenticator_factory.cc index eddc50f..d0deff1 100644 --- a/remoting/protocol/me2me_host_authenticator_factory.cc +++ b/remoting/protocol/me2me_host_authenticator_factory.cc @@ -43,13 +43,13 @@ class RejectingAuthenticator : public Authenticator { virtual scoped_ptr<buzz::XmlElement> GetNextMessage() OVERRIDE { NOTREACHED(); - return scoped_ptr<buzz::XmlElement>(NULL); + return scoped_ptr<buzz::XmlElement>(); } virtual scoped_ptr<ChannelAuthenticator> CreateChannelAuthenticator() const OVERRIDE { NOTREACHED(); - return scoped_ptr<ChannelAuthenticator>(NULL); + return scoped_ptr<ChannelAuthenticator>(); } protected: diff --git a/remoting/protocol/ssl_hmac_channel_authenticator.cc b/remoting/protocol/ssl_hmac_channel_authenticator.cc index 93249bd..648e409 100644 --- a/remoting/protocol/ssl_hmac_channel_authenticator.cc +++ b/remoting/protocol/ssl_hmac_channel_authenticator.cc @@ -266,7 +266,7 @@ void SslHmacChannelAuthenticator::CheckDone(bool* callback_called) { void SslHmacChannelAuthenticator::NotifyError(int error) { done_callback_.Run(static_cast<net::Error>(error), - scoped_ptr<net::StreamSocket>(NULL)); + scoped_ptr<net::StreamSocket>()); } } // namespace protocol diff --git a/remoting/protocol/video_reader.cc b/remoting/protocol/video_reader.cc index adf7189..8fd3afe5 100644 --- a/remoting/protocol/video_reader.cc +++ b/remoting/protocol/video_reader.cc @@ -28,7 +28,7 @@ scoped_ptr<VideoReader> VideoReader::Create(const SessionConfig& config) { } } NOTREACHED(); - return scoped_ptr<VideoReader>(NULL); + return scoped_ptr<VideoReader>(); } } // namespace protocol diff --git a/remoting/protocol/video_writer.cc b/remoting/protocol/video_writer.cc index 04f03f3..736e8ec 100644 --- a/remoting/protocol/video_writer.cc +++ b/remoting/protocol/video_writer.cc @@ -18,7 +18,7 @@ scoped_ptr<VideoWriter> VideoWriter::Create(const SessionConfig& config) { if (video_config.transport == ChannelConfig::TRANSPORT_STREAM) { return scoped_ptr<VideoWriter>(new ProtobufVideoWriter()); } - return scoped_ptr<VideoWriter>(NULL); + return scoped_ptr<VideoWriter>(); } } // namespace protocol |