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

Side by Side Diff: content/common/child_thread.cc

Issue 14081010: Cleanup: Remove unnecessary ".get()" from scoped_ptrs<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix some gtk issues Created 7 years, 8 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 | Annotate | Revision Log
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 "content/common/child_thread.h" 5 #include "content/common/child_thread.h"
6 6
7 #include "base/allocator/allocator_extension.h" 7 #include "base/allocator/allocator_extension.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/process.h" 10 #include "base/process.h"
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 channel_connected_factory_.InvalidateWeakPtrs(); 159 channel_connected_factory_.InvalidateWeakPtrs();
160 } 160 }
161 161
162 void ChildThread::OnChannelError() { 162 void ChildThread::OnChannelError() {
163 set_on_channel_error_called(true); 163 set_on_channel_error_called(true);
164 MessageLoop::current()->Quit(); 164 MessageLoop::current()->Quit();
165 } 165 }
166 166
167 bool ChildThread::Send(IPC::Message* msg) { 167 bool ChildThread::Send(IPC::Message* msg) {
168 DCHECK(MessageLoop::current() == message_loop()); 168 DCHECK(MessageLoop::current() == message_loop());
169 if (!channel_.get()) { 169 if (!channel_) {
170 delete msg; 170 delete msg;
171 return false; 171 return false;
172 } 172 }
173 173
174 return channel_->Send(msg); 174 return channel_->Send(msg);
175 } 175 }
176 176
177 void ChildThread::AddRoute(int32 routing_id, IPC::Listener* listener) { 177 void ChildThread::AddRoute(int32 routing_id, IPC::Listener* listener) {
178 DCHECK(MessageLoop::current() == message_loop()); 178 DCHECK(MessageLoop::current() == message_loop());
179 179
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 // inflight that would addref it. 351 // inflight that would addref it.
352 Send(new ChildProcessHostMsg_ShutdownRequest); 352 Send(new ChildProcessHostMsg_ShutdownRequest);
353 } 353 }
354 354
355 void ChildThread::EnsureConnected() { 355 void ChildThread::EnsureConnected() {
356 LOG(INFO) << "ChildThread::EnsureConnected()"; 356 LOG(INFO) << "ChildThread::EnsureConnected()";
357 base::KillProcess(base::GetCurrentProcessHandle(), 0, false); 357 base::KillProcess(base::GetCurrentProcessHandle(), 0, false);
358 } 358 }
359 359
360 } // namespace content 360 } // namespace content
OLDNEW
« no previous file with comments | « content/common/child_process_host_impl.cc ('k') | content/common/gpu/client/command_buffer_proxy_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698