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

Side by Side Diff: content/browser/utility_process_host_impl.cc

Issue 504273002: Remove implicit conversions from scoped_refptr to T* in content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
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/browser/utility_process_host_impl.h" 5 #include "content/browser/utility_process_host_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 run_elevated_, 261 run_elevated_,
262 no_sandbox_, env_, 262 no_sandbox_, env_,
263 process_->GetHost()), 263 process_->GetHost()),
264 cmd_line); 264 cmd_line);
265 } 265 }
266 266
267 return true; 267 return true;
268 } 268 }
269 269
270 bool UtilityProcessHostImpl::OnMessageReceived(const IPC::Message& message) { 270 bool UtilityProcessHostImpl::OnMessageReceived(const IPC::Message& message) {
271 if (!client_) 271 if (!client_.get())
272 return true; 272 return true;
273 273
274 client_task_runner_->PostTask( 274 client_task_runner_->PostTask(
275 FROM_HERE, 275 FROM_HERE,
276 base::Bind( 276 base::Bind(
277 base::IgnoreResult(&UtilityProcessHostClient::OnMessageReceived), 277 base::IgnoreResult(&UtilityProcessHostClient::OnMessageReceived),
278 client_.get(), 278 client_.get(),
279 message)); 279 message));
280 280
281 return true; 281 return true;
282 } 282 }
283 283
284 void UtilityProcessHostImpl::OnProcessLaunchFailed() { 284 void UtilityProcessHostImpl::OnProcessLaunchFailed() {
285 if (!client_) 285 if (!client_.get())
286 return; 286 return;
287 287
288 client_task_runner_->PostTask( 288 client_task_runner_->PostTask(
289 FROM_HERE, 289 FROM_HERE,
290 base::Bind(&UtilityProcessHostClient::OnProcessLaunchFailed, 290 base::Bind(&UtilityProcessHostClient::OnProcessLaunchFailed,
291 client_.get())); 291 client_.get()));
292 } 292 }
293 293
294 void UtilityProcessHostImpl::OnProcessCrashed(int exit_code) { 294 void UtilityProcessHostImpl::OnProcessCrashed(int exit_code) {
295 if (!client_) 295 if (!client_.get())
296 return; 296 return;
297 297
298 client_task_runner_->PostTask( 298 client_task_runner_->PostTask(
299 FROM_HERE, 299 FROM_HERE,
300 base::Bind(&UtilityProcessHostClient::OnProcessCrashed, client_.get(), 300 base::Bind(&UtilityProcessHostClient::OnProcessCrashed, client_.get(),
301 exit_code)); 301 exit_code));
302 } 302 }
303 303
304 } // namespace content 304 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/transition_request_manager.cc ('k') | content/browser/web_contents/web_contents_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698