diff options
Diffstat (limited to 'content/common')
23 files changed, 66 insertions, 66 deletions
diff --git a/content/common/child_process.cc b/content/common/child_process.cc index 75c80ec..c66e4a4 100644 --- a/content/common/child_process.cc +++ b/content/common/child_process.cc @@ -98,7 +98,7 @@ void ChildProcess::ReleaseProcess() { if (--ref_count_) return; - if (main_thread_.get()) // null in unittests. + if (main_thread_) // null in unittests. main_thread_->OnProcessFinalRelease(); } diff --git a/content/common/child_process_host_impl.cc b/content/common/child_process_host_impl.cc index b5d1eda..bb0fdfd 100644 --- a/content/common/child_process_host_impl.cc +++ b/content/common/child_process_host_impl.cc @@ -149,7 +149,7 @@ ChildProcessHostImpl::~ChildProcessHostImpl() { void ChildProcessHostImpl::AddFilter(IPC::ChannelProxy::MessageFilter* filter) { filters_.push_back(filter); - if (channel_.get()) + if (channel_) filter->OnFilterAdded(channel_.get()); } @@ -189,7 +189,7 @@ int ChildProcessHostImpl::TakeClientFileDescriptor() { #endif bool ChildProcessHostImpl::Send(IPC::Message* message) { - if (!channel_.get()) { + if (!channel_) { delete message; return false; } diff --git a/content/common/child_thread.cc b/content/common/child_thread.cc index 4540b15..d1c8d39 100644 --- a/content/common/child_thread.cc +++ b/content/common/child_thread.cc @@ -166,7 +166,7 @@ void ChildThread::OnChannelError() { bool ChildThread::Send(IPC::Message* msg) { DCHECK(MessageLoop::current() == message_loop()); - if (!channel_.get()) { + if (!channel_) { delete msg; return false; } diff --git a/content/common/gpu/client/command_buffer_proxy_impl.cc b/content/common/gpu/client/command_buffer_proxy_impl.cc index fb10b42..d8f0d19 100644 --- a/content/common/gpu/client/command_buffer_proxy_impl.cc +++ b/content/common/gpu/client/command_buffer_proxy_impl.cc @@ -132,7 +132,7 @@ void CommandBufferProxyImpl::SetChannelErrorCallback( bool CommandBufferProxyImpl::Initialize() { shared_state_shm_.reset(channel_->factory()->AllocateSharedMemory( sizeof(*shared_state())).release()); - if (!shared_state_shm_.get()) + if (!shared_state_shm_) return false; if (!shared_state_shm_->Map(sizeof(*shared_state()))) @@ -255,7 +255,7 @@ gpu::Buffer CommandBufferProxyImpl::CreateTransferBuffer(size_t size, scoped_ptr<base::SharedMemory> shared_memory( channel_->factory()->AllocateSharedMemory(size)); - if (!shared_memory.get()) + if (!shared_memory) return gpu::Buffer(); DCHECK(!shared_memory->memory()); diff --git a/content/common/gpu/client/gl_helper.cc b/content/common/gpu/client/gl_helper.cc index 302dca6..cad3838 100644 --- a/content/common/gpu/client/gl_helper.cc +++ b/content/common/gpu/client/gl_helper.cc @@ -715,7 +715,7 @@ WebGLId GLHelper::CompileShaderFromSource( void GLHelper::InitCopyTextToImpl() { // Lazily initialize |copy_texture_to_impl_| - if (!copy_texture_to_impl_.get()) + if (!copy_texture_to_impl_) copy_texture_to_impl_.reset(new CopyTextureToImpl(context_, this)); } diff --git a/content/common/gpu/client/gpu_channel_host.cc b/content/common/gpu/client/gpu_channel_host.cc index d5bb6b3..bd84d26 100644 --- a/content/common/gpu/client/gpu_channel_host.cc +++ b/content/common/gpu/client/gpu_channel_host.cc @@ -111,7 +111,7 @@ bool GpuChannelHost::Send(IPC::Message* message) { // TODO: Can we just always use sync_filter_ since we setup the channel // without a main listener? if (factory_->IsMainThread()) { - if (channel_.get()) { + if (channel_) { // http://crbug.com/125264 base::ThreadRestrictions::ScopedAllowWait allow_wait; return channel_->Send(message); @@ -140,7 +140,7 @@ CommandBufferProxyImpl* GpuChannelHost::CreateViewCommandBuffer( AutoLock lock(context_lock_); // An error occurred. Need to get the host again to reinitialize it. - if (!channel_.get()) + if (!channel_) return NULL; GPUCreateCommandBufferConfig init_params; @@ -172,7 +172,7 @@ CommandBufferProxyImpl* GpuChannelHost::CreateOffscreenCommandBuffer( AutoLock lock(context_lock_); // An error occurred. Need to get the host again to reinitialize it. - if (!channel_.get()) + if (!channel_) return NULL; GPUCreateCommandBufferConfig init_params; @@ -254,7 +254,7 @@ base::SharedMemoryHandle GpuChannelHost::ShareToGpuProcess( base::SharedMemory* shared_memory) { AutoLock lock(context_lock_); - if (!channel_.get()) + if (!channel_) return base::SharedMemory::NULLHandle(); base::SharedMemoryHandle handle; diff --git a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc index 90f7d9d..562f365 100644 --- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc +++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc @@ -1000,7 +1000,7 @@ bool WebGraphicsContext3DCommandBufferImpl::getActiveAttrib( if (max_name_length < 0) return false; scoped_ptr<GLchar[]> name(new GLchar[max_name_length]); - if (!name.get()) { + if (!name) { synthesizeGLError(GL_OUT_OF_MEMORY); return false; } @@ -1026,7 +1026,7 @@ bool WebGraphicsContext3DCommandBufferImpl::getActiveUniform( if (max_name_length < 0) return false; scoped_ptr<GLchar[]> name(new GLchar[max_name_length]); - if (!name.get()) { + if (!name) { synthesizeGLError(GL_OUT_OF_MEMORY); return false; } @@ -1094,7 +1094,7 @@ WebKit::WebString WebGraphicsContext3DCommandBufferImpl::getProgramInfoLog( if (!logLength) return WebKit::WebString(); scoped_ptr<GLchar[]> log(new GLchar[logLength]); - if (!log.get()) + if (!log) return WebKit::WebString(); GLsizei returnedLogLength = 0; gl_->GetProgramInfoLog( @@ -1117,7 +1117,7 @@ WebKit::WebString WebGraphicsContext3DCommandBufferImpl::getShaderInfoLog( if (!logLength) return WebKit::WebString(); scoped_ptr<GLchar[]> log(new GLchar[logLength]); - if (!log.get()) + if (!log) return WebKit::WebString(); GLsizei returnedLogLength = 0; gl_->GetShaderInfoLog( @@ -1138,7 +1138,7 @@ WebKit::WebString WebGraphicsContext3DCommandBufferImpl::getShaderSource( if (!logLength) return WebKit::WebString(); scoped_ptr<GLchar[]> log(new GLchar[logLength]); - if (!log.get()) + if (!log) return WebKit::WebString(); GLsizei returnedLogLength = 0; gl_->GetShaderSource( @@ -1159,7 +1159,7 @@ WebKit::WebString WebGraphicsContext3DCommandBufferImpl:: if (!logLength) return WebKit::WebString(); scoped_ptr<GLchar[]> log(new GLchar[logLength]); - if (!log.get()) + if (!log) return WebKit::WebString(); GLsizei returnedLogLength = 0; gl_->GetTranslatedShaderSourceANGLE( diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc index 7947ad6..c392a47 100644 --- a/content/common/gpu/gpu_channel.cc +++ b/content/common/gpu/gpu_channel.cc @@ -126,7 +126,7 @@ class GpuChannelMessageFilter : public IPC::ChannelProxy::MessageFilter { // All other messages get processed by the GpuChannel. if (!handled) { messages_forwarded_to_channel_++; - if (preempting_flag_.get()) + if (preempting_flag_) pending_messages_.push(PendingMessage(messages_forwarded_to_channel_)); UpdatePreemptionState(); } @@ -497,7 +497,7 @@ std::string GpuChannel::GetChannelName() { #if defined(OS_POSIX) int GpuChannel::TakeRendererFileDescriptor() { - if (!channel_.get()) { + if (!channel_) { NOTREACHED(); return -1; } @@ -561,7 +561,7 @@ bool GpuChannel::Send(IPC::Message* message) { << " with type " << message->type(); } - if (!channel_.get()) { + if (!channel_) { delete message; return false; } @@ -603,7 +603,7 @@ void GpuChannel::StubSchedulingChanged(bool scheduled) { bool a_stub_is_descheduled = num_stubs_descheduled_ > 0; if (a_stub_is_descheduled != a_stub_was_descheduled) { - if (preempting_flag_.get()) { + if (preempting_flag_) { io_message_loop_->PostTask( FROM_HERE, base::Bind(&GpuChannelMessageFilter::UpdateStubSchedulingState, @@ -654,7 +654,7 @@ void GpuChannel::CreateViewCommandBuffer( watchdog_, software_, init_params.active_url)); - if (preempted_flag_.get()) + if (preempted_flag_) stub->SetPreemptByFlag(preempted_flag_); router_.AddRoute(*route_id, stub.get()); stubs_.AddWithID(stub.release(), *route_id); @@ -721,7 +721,7 @@ void GpuChannel::RemoveRoute(int32 route_id) { } gpu::PreemptionFlag* GpuChannel::GetPreemptionFlag() { - if (!preempting_flag_.get()) { + if (!preempting_flag_) { preempting_flag_ = new gpu::PreemptionFlag; io_message_loop_->PostTask( FROM_HERE, base::Bind( @@ -742,7 +742,7 @@ void GpuChannel::SetPreemptByFlag( } GpuChannel::~GpuChannel() { - if (preempting_flag_.get()) + if (preempting_flag_) preempting_flag_->Reset(); } @@ -872,7 +872,7 @@ void GpuChannel::OnCreateOffscreenCommandBuffer( watchdog_, software_, init_params.active_url)); - if (preempted_flag_.get()) + if (preempted_flag_) stub->SetPreemptByFlag(preempted_flag_); router_.AddRoute(*route_id, stub.get()); stubs_.AddWithID(stub.release(), *route_id); @@ -942,7 +942,7 @@ void GpuChannel::OnCollectRenderingStatsForSurface( void GpuChannel::MessageProcessed() { messages_processed_++; - if (preempting_flag_.get()) { + if (preempting_flag_) { io_message_loop_->PostTask( FROM_HERE, base::Bind(&GpuChannelMessageFilter::MessageProcessed, diff --git a/content/common/gpu/gpu_channel_manager.cc b/content/common/gpu/gpu_channel_manager.cc index fc48010..aa89b7c 100644 --- a/content/common/gpu/gpu_channel_manager.cc +++ b/content/common/gpu/gpu_channel_manager.cc @@ -50,7 +50,7 @@ GpuChannelManager::GpuChannelManager(ChildThread* gpu_child_thread, GpuChannelManager::~GpuChannelManager() { gpu_channels_.clear(); - if (default_offscreen_surface_.get()) { + if (default_offscreen_surface_) { default_offscreen_surface_->Destroy(); default_offscreen_surface_ = NULL; } @@ -290,7 +290,7 @@ void GpuChannelManager::OnLoseAllContexts() { } gfx::GLSurface* GpuChannelManager::GetDefaultOffscreenSurface() { - if (!default_offscreen_surface_.get()) { + if (!default_offscreen_surface_) { default_offscreen_surface_ = gfx::GLSurface::CreateOffscreenGLSurface( false, gfx::Size(1, 1)); } diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc index a1167c9..ceecbe4 100644 --- a/content/common/gpu/gpu_command_buffer_stub.cc +++ b/content/common/gpu/gpu_command_buffer_stub.cc @@ -243,7 +243,7 @@ void GpuCommandBufferStub::PollWork() { if (decoder_.get() && !MakeCurrent()) return; - if (scheduler_.get()) { + if (scheduler_) { bool fences_complete = scheduler_->PollUnscheduleFences(); // Perform idle work if all fences are complete. if (fences_complete) { @@ -274,7 +274,7 @@ void GpuCommandBufferStub::PollWork() { } bool GpuCommandBufferStub::HasUnprocessedCommands() { - if (command_buffer_.get()) { + if (command_buffer_) { gpu::CommandBuffer::State state = command_buffer_->GetLastState(); return state.put_offset != state.get_offset && !gpu::error::IsError(state.error); @@ -346,7 +346,7 @@ void GpuCommandBufferStub::Destroy() { while (!sync_points_.empty()) OnRetireSyncPoint(sync_points_.front()); - if (decoder_.get()) + if (decoder_) decoder_->set_engine(NULL); // The scheduler has raw references to the decoder and the command buffer so @@ -354,14 +354,14 @@ void GpuCommandBufferStub::Destroy() { scheduler_.reset(); bool have_context = false; - if (decoder_.get()) + if (decoder_) have_context = decoder_->MakeCurrent(); FOR_EACH_OBSERVER(DestructionObserver, destruction_observers_, OnWillDestroyStub(this)); scoped_refptr<gfx::GLContext> context; - if (decoder_.get()) { + if (decoder_) { context = decoder_->GetGLContext(); decoder_->Destroy(have_context); decoder_.reset(); @@ -408,7 +408,7 @@ void GpuCommandBufferStub::OnInitialize( scheduler_.reset(new gpu::GpuScheduler(command_buffer_.get(), decoder_.get(), decoder_.get())); - if (preemption_flag_.get()) + if (preemption_flag_) scheduler_->SetPreemptByFlag(preemption_flag_); decoder_->set_engine(scheduler_.get()); @@ -431,7 +431,7 @@ void GpuCommandBufferStub::OnInitialize( surface_ = manager->GetDefaultOffscreenSurface(); } - if (!surface_.get()) { + if (!surface_) { DLOG(ERROR) << "Failed to create surface.\n"; OnInitializeFailed(reply_message); return; @@ -480,7 +480,7 @@ void GpuCommandBufferStub::OnInitialize( return; } - if (!context->MakeCurrent(surface_.get())) { + if (!context->MakeCurrent(surface_)) { LOG(ERROR) << "Failed to make context current."; OnInitializeFailed(reply_message); return; @@ -580,7 +580,7 @@ void GpuCommandBufferStub::SetLatencyInfoCallback( void GpuCommandBufferStub::OnSetGetBuffer(int32 shm_id, IPC::Message* reply_message) { TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnSetGetBuffer"); - if (command_buffer_.get()) + if (command_buffer_) command_buffer_->SetGetBuffer(shm_id); Send(reply_message); } @@ -595,7 +595,7 @@ void GpuCommandBufferStub::OnSetParent(int32 parent_route_id, } bool result = true; - if (scheduler_.get()) { + if (scheduler_) { gpu::gles2::GLES2Decoder* parent_decoder = parent_stub ? parent_stub->decoder_.get() : NULL; result = decoder_->SetParent(parent_decoder, parent_texture_id); @@ -613,7 +613,7 @@ void GpuCommandBufferStub::OnSetParent(int32 parent_route_id, void GpuCommandBufferStub::OnGetState(IPC::Message* reply_message) { TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnGetState"); - if (command_buffer_.get()) { + if (command_buffer_) { gpu::CommandBuffer::State state = command_buffer_->GetState(); if (state.error == gpu::error::kLostContext && gfx::GLContext::LosesAllContextsOnContextLost()) @@ -689,14 +689,14 @@ void GpuCommandBufferStub::OnRegisterTransferBuffer( TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnRegisterTransferBuffer"); base::SharedMemory shared_memory(transfer_buffer, false); - if (command_buffer_.get()) + if (command_buffer_) command_buffer_->RegisterTransferBuffer(id, &shared_memory, size); } void GpuCommandBufferStub::OnDestroyTransferBuffer(int32 id) { TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnDestroyTransferBuffer"); - if (command_buffer_.get()) + if (command_buffer_) command_buffer_->DestroyTransferBuffer(id); } @@ -704,7 +704,7 @@ void GpuCommandBufferStub::OnGetTransferBuffer( int32 id, IPC::Message* reply_message) { TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnGetTransferBuffer"); - if (command_buffer_.get()) { + if (command_buffer_) { base::SharedMemoryHandle transfer_buffer = base::SharedMemoryHandle(); uint32 size = 0; @@ -765,7 +765,7 @@ void GpuCommandBufferStub::OnCreateVideoDecoder( void GpuCommandBufferStub::OnSetSurfaceVisible(bool visible) { TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnSetSurfaceVisible"); - if (memory_manager_client_state_.get()) + if (memory_manager_client_state_) memory_manager_client_state_->SetVisible(visible); } @@ -848,7 +848,7 @@ void GpuCommandBufferStub::OnReceivedClientManagedMemoryStats( TRACE_EVENT0( "gpu", "GpuCommandBufferStub::OnReceivedClientManagedMemoryStats"); - if (memory_manager_client_state_.get()) + if (memory_manager_client_state_) memory_manager_client_state_->SetManagedMemoryStats(stats); } @@ -858,7 +858,7 @@ void GpuCommandBufferStub::OnSetClientHasMemoryAllocationChangedCallback( "gpu", "GpuCommandBufferStub::OnSetClientHasMemoryAllocationChangedCallback"); if (has_callback) { - if (!memory_manager_client_state_.get()) { + if (!memory_manager_client_state_) { memory_manager_client_state_.reset(GetMemoryManager()->CreateClientState( this, surface_id_ != 0, true)); } @@ -897,7 +897,7 @@ void GpuCommandBufferStub::RemoveDestructionObserver( void GpuCommandBufferStub::SetPreemptByFlag( scoped_refptr<gpu::PreemptionFlag> flag) { preemption_flag_ = flag; - if (scheduler_.get()) + if (scheduler_) scheduler_->SetPreemptByFlag(preemption_flag_); } diff --git a/content/common/gpu/image_transport_surface.cc b/content/common/gpu/image_transport_surface.cc index 1378f90..f8f0742 100644 --- a/content/common/gpu/image_transport_surface.cc +++ b/content/common/gpu/image_transport_surface.cc @@ -171,13 +171,13 @@ void ImageTransportHelper::Suspend() { } gpu::GpuScheduler* ImageTransportHelper::Scheduler() { - if (!stub_.get()) + if (!stub_) return NULL; return stub_->scheduler(); } gpu::gles2::GLES2Decoder* ImageTransportHelper::Decoder() { - if (!stub_.get()) + if (!stub_) return NULL; return stub_->decoder(); } diff --git a/content/common/gpu/image_transport_surface_mac.cc b/content/common/gpu/image_transport_surface_mac.cc index 6b8762c..62c3265 100644 --- a/content/common/gpu/image_transport_surface_mac.cc +++ b/content/common/gpu/image_transport_surface_mac.cc @@ -217,7 +217,7 @@ void IOSurfaceImageTransportSurface::AdjustBufferAllocation() { io_surface_.get()) { UnrefIOSurface(); helper_->Suspend(); - } else if (backbuffer_suggested_allocation_ && !io_surface_.get()) { + } else if (backbuffer_suggested_allocation_ && !io_surface_) { CreateIOSurface(); } } diff --git a/content/common/gpu/image_transport_surface_win.cc b/content/common/gpu/image_transport_surface_win.cc index 5dbdcf3..5e27ba0 100644 --- a/content/common/gpu/image_transport_surface_win.cc +++ b/content/common/gpu/image_transport_surface_win.cc @@ -270,7 +270,7 @@ scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateNativeSurface( scoped_refptr<gfx::GLSurface> surface = gfx::GLSurface::CreateViewGLSurface(false, handle.handle); - if (!surface.get()) + if (!surface) return surface; return scoped_refptr<gfx::GLSurface>(new PassThroughImageTransportSurface( manager, stub, surface.get(), handle.is_transport())); diff --git a/content/common/gpu/image_transport_surface_x11.cc b/content/common/gpu/image_transport_surface_x11.cc index 86d78d2..b6aca42 100644 --- a/content/common/gpu/image_transport_surface_x11.cc +++ b/content/common/gpu/image_transport_surface_x11.cc @@ -16,7 +16,7 @@ scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateNativeSurface( handle.transport_type == gfx::NATIVE_TRANSPORT); scoped_refptr<gfx::GLSurface> surface = gfx::GLSurface::CreateViewGLSurface(false, handle.handle); - if (!surface.get()) + if (!surface) return surface; return scoped_refptr<gfx::GLSurface>(new PassThroughImageTransportSurface( manager, stub, surface.get(), handle.is_transport())); diff --git a/content/common/gpu/media/android_video_decode_accelerator.cc b/content/common/gpu/media/android_video_decode_accelerator.cc index 3e4dacd..d54c7ad 100644 --- a/content/common/gpu/media/android_video_decode_accelerator.cc +++ b/content/common/gpu/media/android_video_decode_accelerator.cc @@ -85,7 +85,7 @@ bool AndroidVideoDecodeAccelerator::Initialize( return false; } - if (!gl_decoder_.get()) { + if (!gl_decoder_) { LOG(ERROR) << "Failed to get gles2 decoder instance."; return false; } diff --git a/content/common/gpu/media/gpu_video_decode_accelerator.cc b/content/common/gpu/media/gpu_video_decode_accelerator.cc index 7e51777..1bce036 100644 --- a/content/common/gpu/media/gpu_video_decode_accelerator.cc +++ b/content/common/gpu/media/gpu_video_decode_accelerator.cc @@ -79,12 +79,12 @@ GpuVideoDecodeAccelerator::~GpuVideoDecodeAccelerator() { stub_->RemoveDestructionObserver(this); } - if (video_decode_accelerator_.get()) + if (video_decode_accelerator_) video_decode_accelerator_.release()->Destroy(); } bool GpuVideoDecodeAccelerator::OnMessageReceived(const IPC::Message& msg) { - if (!stub_ || !video_decode_accelerator_.get()) + if (!stub_ || !video_decode_accelerator_) return false; bool handled = true; IPC_BEGIN_MESSAGE_MAP(GpuVideoDecodeAccelerator, msg) @@ -349,7 +349,7 @@ void GpuVideoDecodeAccelerator::NotifyResetDone() { void GpuVideoDecodeAccelerator::OnWillDestroyStub(GpuCommandBufferStub* stub) { DCHECK_EQ(stub, stub_.get()); - if (video_decode_accelerator_.get()) + if (video_decode_accelerator_) video_decode_accelerator_.release()->Destroy(); if (stub_) { stub_->RemoveDestructionObserver(this); diff --git a/content/common/gpu/media/vaapi_h264_decoder.cc b/content/common/gpu/media/vaapi_h264_decoder.cc index 3b53dae..36c7ff3 100644 --- a/content/common/gpu/media/vaapi_h264_decoder.cc +++ b/content/common/gpu/media/vaapi_h264_decoder.cc @@ -479,7 +479,7 @@ bool VaapiH264Decoder::InitializeFBConfig() { scoped_ptr_malloc<GLXFBConfig, ScopedPtrXFree> glx_fb_configs( glXChooseFBConfig(x_display_, DefaultScreen(x_display_), fbconfig_attr, &num_fbconfigs)); - if (!glx_fb_configs.get()) + if (!glx_fb_configs) return false; if (!num_fbconfigs) return false; @@ -2018,7 +2018,7 @@ bool VaapiH264Decoder::FinishPicture() { if (!(*output_candidate)->ref) { // Current picture hasn't been inserted into DPB yet, so don't remove it // if we managed to output it immediately. - if (*output_candidate != pic.get()) + if (*output_candidate != pic) dpb_.RemoveByPOC((*output_candidate)->pic_order_cnt); // Mark as unused. UnassignSurfaceFromPoC((*output_candidate)->pic_order_cnt); diff --git a/content/common/gpu/texture_image_transport_surface.cc b/content/common/gpu/texture_image_transport_surface.cc index c78b083..4a56bbf 100644 --- a/content/common/gpu/texture_image_transport_surface.cc +++ b/content/common/gpu/texture_image_transport_surface.cc @@ -54,7 +54,7 @@ bool TextureImageTransportSurface::Initialize() { GpuChannelManager* manager = helper_->manager(); surface_ = manager->GetDefaultOffscreenSurface(); - if (!surface_.get()) + if (!surface_) return false; if (!helper_->Initialize()) @@ -71,7 +71,7 @@ bool TextureImageTransportSurface::Initialize() { } void TextureImageTransportSurface::Destroy() { - if (surface_.get()) + if (surface_) surface_ = NULL; helper_->Destroy(); @@ -329,7 +329,7 @@ void TextureImageTransportSurface::BufferPresentedImpl( // of the service ids. DCHECK(context_.get() && surface_.get()); uint32 service_id = backbuffer_->ReleaseServiceId(); - if (context_->MakeCurrent(surface_.get())) + if (context_->MakeCurrent(surface_)) glDeleteTextures(1, &service_id); return; diff --git a/content/common/np_channel_base.cc b/content/common/np_channel_base.cc index a85fdb5..a1a2338 100644 --- a/content/common/np_channel_base.cc +++ b/content/common/np_channel_base.cc @@ -141,7 +141,7 @@ bool NPChannelBase::Init(base::MessageLoopProxy* ipc_message_loop, } bool NPChannelBase::Send(IPC::Message* message) { - if (!channel_.get()) { + if (!channel_) { VLOG(1) << "Channel is NULL; dropping message"; delete message; return false; diff --git a/content/common/npobject_proxy.cc b/content/common/npobject_proxy.cc index 4203b13..eb01acb 100644 --- a/content/common/npobject_proxy.cc +++ b/content/common/npobject_proxy.cc @@ -70,7 +70,7 @@ NPObjectProxy::NPObjectProxy( } NPObjectProxy::~NPObjectProxy() { - if (channel_.get()) { + if (channel_) { // This NPObjectProxy instance is now invalid and should not be reused for // requests initiated by plugins. We may receive requests for the // same NPObject in the context of the outgoing NPObjectMsg_Release call. @@ -94,7 +94,7 @@ NPObject* NPObjectProxy::Create(NPChannelBase* channel, } bool NPObjectProxy::Send(IPC::Message* msg) { - if (channel_.get()) + if (channel_) return channel_->Send(msg); delete msg; diff --git a/content/common/resource_messages.cc b/content/common/resource_messages.cc index 5277b5a..ad4bd7f 100644 --- a/content/common/resource_messages.cc +++ b/content/common/resource_messages.cc @@ -138,7 +138,7 @@ void ParamTraits<webkit_base::DataElement>::Log( void ParamTraits<scoped_refptr<webkit_glue::ResourceDevToolsInfo> >::Write( Message* m, const param_type& p) { WriteParam(m, p.get() != NULL); - if (p.get()) { + if (p) { WriteParam(m, p->http_status_code); WriteParam(m, p->http_status_text); WriteParam(m, p->request_headers); diff --git a/content/common/sandbox_mac_fontloading_unittest.mm b/content/common/sandbox_mac_fontloading_unittest.mm index 959af35..77b211f 100644 --- a/content/common/sandbox_mac_fontloading_unittest.mm +++ b/content/common/sandbox_mac_fontloading_unittest.mm @@ -44,7 +44,7 @@ bool FontLoadingTestCase::BeforeSandboxInit() { } font_shmem_.reset(new base::SharedMemory); - if (!font_shmem_.get()) { + if (!font_shmem_) { LOG(ERROR) << "Failed to create shared memory object."; return false; } diff --git a/content/common/sandbox_mac_unittest_helper.mm b/content/common/sandbox_mac_unittest_helper.mm index 6417e68..4c64b55 100644 --- a/content/common/sandbox_mac_unittest_helper.mm +++ b/content/common/sandbox_mac_unittest_helper.mm @@ -139,7 +139,7 @@ MULTIPROCESS_TEST_MAIN(mac_sandbox_test_runner) { // Find Test Function to run; scoped_ptr<MacSandboxTestCase> test_case(SandboxTestForName(sandbox_test_name)); - if (!test_case.get()) { + if (!test_case) { LOG(ERROR) << "Invalid sandbox test name (" << sandbox_test_name << ")"; return -1; } |