diff options
author | dcheng <dcheng@chromium.org> | 2014-08-25 20:53:44 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-08-26 03:54:57 +0000 |
commit | ac10e4a83db4d2d38a66514e9808d1476d4d648a (patch) | |
tree | a0374b791cc75f939553ae6dfda15c6aa978b5d3 /remoting/host | |
parent | 1ebd8d84f8f9c9c14000b0b67f28a772f535714a (diff) | |
download | chromium_src-ac10e4a83db4d2d38a66514e9808d1476d4d648a.zip chromium_src-ac10e4a83db4d2d38a66514e9808d1476d4d648a.tar.gz chromium_src-ac10e4a83db4d2d38a66514e9808d1476d4d648a.tar.bz2 |
Remove implicit conversions from scoped_refptr to T* in remoting/
This patch was generated by running the rewrite_scoped_refptr clang tool
on a Linux build.
BUG=110610
Review URL: https://codereview.chromium.org/502123003
Cr-Commit-Position: refs/heads/master@{#291832}
Diffstat (limited to 'remoting/host')
-rw-r--r-- | remoting/host/cast_extension_session.cc | 2 | ||||
-rw-r--r-- | remoting/host/client_session.cc | 8 | ||||
-rw-r--r-- | remoting/host/oauth_token_getter.cc | 2 | ||||
-rw-r--r-- | remoting/host/setup/me2me_native_messaging_host.cc | 6 | ||||
-rw-r--r-- | remoting/host/setup/oauth_client.cc | 2 | ||||
-rw-r--r-- | remoting/host/token_validator_base.cc | 2 | ||||
-rw-r--r-- | remoting/host/video_frame_recorder.cc | 29 |
7 files changed, 27 insertions, 24 deletions
diff --git a/remoting/host/cast_extension_session.cc b/remoting/host/cast_extension_session.cc index f711b46..8842c3e 100644 --- a/remoting/host/cast_extension_session.cc +++ b/remoting/host/cast_extension_session.cc @@ -326,7 +326,7 @@ CastExtensionSession::CastExtensionSession( worker_thread_wrapper_(NULL), worker_thread_(kWorkerThreadName) { DCHECK(caller_task_runner_->BelongsToCurrentThread()); - DCHECK(url_request_context_getter_); + DCHECK(url_request_context_getter_.get()); DCHECK(client_session_control_); DCHECK(client_stub_); diff --git a/remoting/host/client_session.cc b/remoting/host/client_session.cc index 31c3bf1..d741e1c 100644 --- a/remoting/host/client_session.cc +++ b/remoting/host/client_session.cc @@ -142,21 +142,21 @@ void ClientSession::ControlVideo(const protocol::VideoControl& video_control) { VLOG(1) << "Received VideoControl (enable=" << video_control.enable() << ")"; pause_video_ = !video_control.enable(); - if (video_scheduler_) + if (video_scheduler_.get()) video_scheduler_->Pause(pause_video_); } if (video_control.has_lossless_encode()) { VLOG(1) << "Received VideoControl (lossless_encode=" << video_control.lossless_encode() << ")"; lossless_video_encode_ = video_control.lossless_encode(); - if (video_scheduler_) + if (video_scheduler_.get()) video_scheduler_->SetLosslessEncode(lossless_video_encode_); } if (video_control.has_lossless_color()) { VLOG(1) << "Received VideoControl (lossless_color=" << video_control.lossless_color() << ")"; lossless_video_color_ = video_control.lossless_color(); - if (video_scheduler_) + if (video_scheduler_.get()) video_scheduler_->SetLosslessColor(lossless_video_color_); } } @@ -207,7 +207,7 @@ void ClientSession::SetCapabilities( void ClientSession::RequestPairing( const protocol::PairingRequest& pairing_request) { - if (pairing_registry_ && pairing_request.has_client_name()) { + if (pairing_registry_.get() && pairing_request.has_client_name()) { protocol::PairingRegistry::Pairing pairing = pairing_registry_->CreatePairing(pairing_request.client_name()); protocol::PairingResponse pairing_response; diff --git a/remoting/host/oauth_token_getter.cc b/remoting/host/oauth_token_getter.cc index 7ac01c5..93756b2 100644 --- a/remoting/host/oauth_token_getter.cc +++ b/remoting/host/oauth_token_getter.cc @@ -38,7 +38,7 @@ OAuthTokenGetter::OAuthTokenGetter( bool auto_refresh) : oauth_credentials_(oauth_credentials.Pass()), gaia_oauth_client_( - new gaia::GaiaOAuthClient(url_request_context_getter)), + new gaia::GaiaOAuthClient(url_request_context_getter.get())), url_request_context_getter_(url_request_context_getter), refreshing_oauth_token_(false) { if (auto_refresh) { diff --git a/remoting/host/setup/me2me_native_messaging_host.cc b/remoting/host/setup/me2me_native_messaging_host.cc index 7ceea6b..51b77ef 100644 --- a/remoting/host/setup/me2me_native_messaging_host.cc +++ b/remoting/host/setup/me2me_native_messaging_host.cc @@ -182,7 +182,7 @@ void Me2MeNativeMessagingHost::ProcessClearPairedClients( return; } - if (pairing_registry_) { + if (pairing_registry_.get()) { pairing_registry_->ClearAllPairings( base::Bind(&Me2MeNativeMessagingHost::SendBooleanResult, weak_ptr_, base::Passed(&response))); @@ -211,7 +211,7 @@ void Me2MeNativeMessagingHost::ProcessDeletePairedClient( return; } - if (pairing_registry_) { + if (pairing_registry_.get()) { pairing_registry_->DeletePairing( client_id, base::Bind(&Me2MeNativeMessagingHost::SendBooleanResult, weak_ptr_, base::Passed(&response))); @@ -294,7 +294,7 @@ void Me2MeNativeMessagingHost::ProcessGetPairedClients( scoped_ptr<base::DictionaryValue> response) { DCHECK(thread_checker_.CalledOnValidThread()); - if (pairing_registry_) { + if (pairing_registry_.get()) { pairing_registry_->GetAllPairings( base::Bind(&Me2MeNativeMessagingHost::SendPairedClientsResponse, weak_ptr_, base::Passed(&response))); diff --git a/remoting/host/setup/oauth_client.cc b/remoting/host/setup/oauth_client.cc index 74a6bfe..684ab2c 100644 --- a/remoting/host/setup/oauth_client.cc +++ b/remoting/host/setup/oauth_client.cc @@ -14,7 +14,7 @@ namespace remoting { OAuthClient::OAuthClient( scoped_refptr<net::URLRequestContextGetter> url_request_context_getter) - : gaia_oauth_client_(url_request_context_getter) { + : gaia_oauth_client_(url_request_context_getter.get()) { } OAuthClient::~OAuthClient() { diff --git a/remoting/host/token_validator_base.cc b/remoting/host/token_validator_base.cc index 452a182..c370167 100644 --- a/remoting/host/token_validator_base.cc +++ b/remoting/host/token_validator_base.cc @@ -146,7 +146,7 @@ void TokenValidatorBase::OnCertificatesSelected( for (size_t i = 0; i < selected_certs->size(); ++i) { if (issuer == kCertIssuerWildCard || issuer == (*selected_certs)[i]->issuer().common_name) { - request_->ContinueWithCertificate((*selected_certs)[i]); + request_->ContinueWithCertificate((*selected_certs)[i].get()); return; } } diff --git a/remoting/host/video_frame_recorder.cc b/remoting/host/video_frame_recorder.cc index 38213b3..5303a80 100644 --- a/remoting/host/video_frame_recorder.cc +++ b/remoting/host/video_frame_recorder.cc @@ -34,7 +34,7 @@ class VideoFrameRecorder::RecordingVideoEncoder : public VideoEncoder { enable_recording_(false), weak_factory_(this) { DCHECK(encoder_); - DCHECK(recorder_task_runner_); + DCHECK(recorder_task_runner_.get()); } base::WeakPtr<RecordingVideoEncoder> AsWeakPtr() { @@ -42,7 +42,7 @@ class VideoFrameRecorder::RecordingVideoEncoder : public VideoEncoder { } void SetEnableRecording(bool enable_recording) { - DCHECK(!encoder_task_runner_ || + DCHECK(!encoder_task_runner_.get() || encoder_task_runner_->BelongsToCurrentThread()); enable_recording_ = enable_recording; } @@ -58,7 +58,7 @@ class VideoFrameRecorder::RecordingVideoEncoder : public VideoEncoder { const webrtc::DesktopFrame& frame) OVERRIDE { // If this is the first Encode() then store the TaskRunner and inform the // VideoFrameRecorder so it can post SetEnableRecording() on it. - if (!encoder_task_runner_) { + if (!encoder_task_runner_.get()) { encoder_task_runner_ = base::ThreadTaskRunnerHandle::Get(); recorder_task_runner_->PostTask(FROM_HERE, base::Bind(&VideoFrameRecorder::SetEncoderTaskRunner, @@ -112,8 +112,8 @@ VideoFrameRecorder::~VideoFrameRecorder() { scoped_ptr<VideoEncoder> VideoFrameRecorder::WrapVideoEncoder( scoped_ptr<VideoEncoder> encoder) { - DCHECK(!encoder_task_runner_); - DCHECK(!caller_task_runner_); + DCHECK(!encoder_task_runner_.get()); + DCHECK(!caller_task_runner_.get()); caller_task_runner_ = base::ThreadTaskRunnerHandle::Get(); scoped_ptr<RecordingVideoEncoder> recording_encoder( @@ -126,7 +126,8 @@ scoped_ptr<VideoEncoder> VideoFrameRecorder::WrapVideoEncoder( } void VideoFrameRecorder::DetachVideoEncoderWrapper() { - DCHECK(!caller_task_runner_ || caller_task_runner_->BelongsToCurrentThread()); + DCHECK(!caller_task_runner_.get() || + caller_task_runner_->BelongsToCurrentThread()); // Immediately detach the wrapper from this recorder. weak_factory_.InvalidateWeakPtrs(); @@ -136,7 +137,7 @@ void VideoFrameRecorder::DetachVideoEncoderWrapper() { content_bytes_ = 0; // Tell the wrapper to stop recording and posting frames to us. - if (encoder_task_runner_) { + if (encoder_task_runner_.get()) { encoder_task_runner_->PostTask(FROM_HERE, base::Bind(&RecordingVideoEncoder::SetEnableRecording, recording_encoder_, false)); @@ -148,14 +149,15 @@ void VideoFrameRecorder::DetachVideoEncoderWrapper() { } void VideoFrameRecorder::SetEnableRecording(bool enable_recording) { - DCHECK(!caller_task_runner_ || caller_task_runner_->BelongsToCurrentThread()); + DCHECK(!caller_task_runner_.get() || + caller_task_runner_->BelongsToCurrentThread()); if (enable_recording_ == enable_recording) { return; } enable_recording_ = enable_recording; - if (encoder_task_runner_) { + if (encoder_task_runner_.get()) { encoder_task_runner_->PostTask(FROM_HERE, base::Bind(&RecordingVideoEncoder::SetEnableRecording, recording_encoder_, @@ -164,7 +166,8 @@ void VideoFrameRecorder::SetEnableRecording(bool enable_recording) { } void VideoFrameRecorder::SetMaxContentBytes(int64_t max_content_bytes) { - DCHECK(!caller_task_runner_ || caller_task_runner_->BelongsToCurrentThread()); + DCHECK(!caller_task_runner_.get() || + caller_task_runner_->BelongsToCurrentThread()); DCHECK_GE(max_content_bytes, 0); max_content_bytes_ = max_content_bytes; @@ -187,13 +190,13 @@ scoped_ptr<webrtc::DesktopFrame> VideoFrameRecorder::NextFrame() { void VideoFrameRecorder::SetEncoderTaskRunner( scoped_refptr<base::TaskRunner> task_runner) { DCHECK(caller_task_runner_->BelongsToCurrentThread()); - DCHECK(!encoder_task_runner_); - DCHECK(task_runner); + DCHECK(!encoder_task_runner_.get()); + DCHECK(task_runner.get()); encoder_task_runner_ = task_runner; // If the caller already enabled recording, inform the recording encoder. - if (enable_recording_ && encoder_task_runner_) { + if (enable_recording_ && encoder_task_runner_.get()) { encoder_task_runner_->PostTask(FROM_HERE, base::Bind(&RecordingVideoEncoder::SetEnableRecording, recording_encoder_, |