Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
Remove implicit conversions from scoped_refptr to T* in chrome/renderer/
Browse files Browse the repository at this point in the history
This patch was generated by running the rewrite_scoped_refptr clang tool
on a Linux build.

BUG=110610

Review URL: https://codereview.chromium.org/506773002

Cr-Commit-Position: refs/heads/master@{#292509}
  • Loading branch information
zetafunction authored and Commit bot committed Aug 29, 2014
1 parent e5d8ace commit b7f9ea2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion chrome/renderer/media/cast_ipc_dispatcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ CastIPCDispatcher::CastIPCDispatcher(
const scoped_refptr<base::MessageLoopProxy>& io_message_loop)
: sender_(NULL),
io_message_loop_(io_message_loop) {
DCHECK(io_message_loop_);
DCHECK(io_message_loop_.get());
DCHECK(!global_instance_);
}

Expand Down
2 changes: 1 addition & 1 deletion chrome/renderer/media/cast_session_delegate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ CastSessionDelegate::CastSessionDelegate()
: io_message_loop_proxy_(
content::RenderThread::Get()->GetIOMessageLoopProxy()),
weak_factory_(this) {
DCHECK(io_message_loop_proxy_);
DCHECK(io_message_loop_proxy_.get());
}

CastSessionDelegate::~CastSessionDelegate() {
Expand Down
18 changes: 9 additions & 9 deletions chrome/renderer/media/webrtc_logging_message_filter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ WebRtcLoggingMessageFilter::WebRtcLoggingMessageFilter(
log_message_delegate_(NULL),
sender_(NULL) {
// May be null in a browsertest using MockRenderThread.
if (io_message_loop_) {
if (io_message_loop_.get()) {
io_message_loop_->PostTask(
FROM_HERE, base::Bind(
&WebRtcLoggingMessageFilter::CreateLoggingHandler,
Expand All @@ -40,18 +40,18 @@ bool WebRtcLoggingMessageFilter::OnMessageReceived(
}

void WebRtcLoggingMessageFilter::OnFilterAdded(IPC::Sender* sender) {
DCHECK(!io_message_loop_ || io_message_loop_->BelongsToCurrentThread());
DCHECK(!io_message_loop_.get() || io_message_loop_->BelongsToCurrentThread());
sender_ = sender;
}

void WebRtcLoggingMessageFilter::OnFilterRemoved() {
DCHECK(!io_message_loop_ || io_message_loop_->BelongsToCurrentThread());
DCHECK(!io_message_loop_.get() || io_message_loop_->BelongsToCurrentThread());
sender_ = NULL;
log_message_delegate_->OnFilterRemoved();
}

void WebRtcLoggingMessageFilter::OnChannelClosing() {
DCHECK(!io_message_loop_ || io_message_loop_->BelongsToCurrentThread());
DCHECK(!io_message_loop_.get() || io_message_loop_->BelongsToCurrentThread());
sender_ = NULL;
log_message_delegate_->OnFilterRemoved();
}
Expand All @@ -63,28 +63,28 @@ void WebRtcLoggingMessageFilter::AddLogMessages(
}

void WebRtcLoggingMessageFilter::LoggingStopped() {
DCHECK(!io_message_loop_ || io_message_loop_->BelongsToCurrentThread());
DCHECK(!io_message_loop_.get() || io_message_loop_->BelongsToCurrentThread());
Send(new WebRtcLoggingMsg_LoggingStopped());
}

void WebRtcLoggingMessageFilter::CreateLoggingHandler() {
DCHECK(!io_message_loop_ || io_message_loop_->BelongsToCurrentThread());
DCHECK(!io_message_loop_.get() || io_message_loop_->BelongsToCurrentThread());
log_message_delegate_ =
new ChromeWebRtcLogMessageDelegate(io_message_loop_, this);
}

void WebRtcLoggingMessageFilter::OnStartLogging() {
DCHECK(!io_message_loop_ || io_message_loop_->BelongsToCurrentThread());
DCHECK(!io_message_loop_.get() || io_message_loop_->BelongsToCurrentThread());
log_message_delegate_->OnStartLogging();
}

void WebRtcLoggingMessageFilter::OnStopLogging() {
DCHECK(!io_message_loop_ || io_message_loop_->BelongsToCurrentThread());
DCHECK(!io_message_loop_.get() || io_message_loop_->BelongsToCurrentThread());
log_message_delegate_->OnStopLogging();
}

void WebRtcLoggingMessageFilter::Send(IPC::Message* message) {
DCHECK(!io_message_loop_ || io_message_loop_->BelongsToCurrentThread());
DCHECK(!io_message_loop_.get() || io_message_loop_->BelongsToCurrentThread());
if (!sender_) {
DLOG(ERROR) << "IPC sender not available.";
delete message;
Expand Down
2 changes: 1 addition & 1 deletion chrome/renderer/page_load_histograms.cc
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ bool DataReductionProxyWasUsed(WebFrame* frame) {
scoped_refptr<net::HttpResponseHeaders> response_headers(
new net::HttpResponseHeaders(headers));
return data_reduction_proxy::HasDataReductionProxyViaHeader(
response_headers, NULL);
response_headers.get(), NULL);
}

// Returns true if the provided URL is a referrer string that came from
Expand Down

0 comments on commit b7f9ea2

Please sign in to comment.