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

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

Issue 2283373002: Remove unneeded scoped_refptr<>::get() on method binding (Closed)
Patch Set: Created 4 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 <utility> 7 #include <utility>
8 8
9 #include "base/base_switches.h" 9 #include "base/base_switches.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 return true; 367 return true;
368 } 368 }
369 369
370 void UtilityProcessHostImpl::OnProcessLaunchFailed(int error_code) { 370 void UtilityProcessHostImpl::OnProcessLaunchFailed(int error_code) {
371 if (!client_.get()) 371 if (!client_.get())
372 return; 372 return;
373 373
374 client_task_runner_->PostTask( 374 client_task_runner_->PostTask(
375 FROM_HERE, 375 FROM_HERE,
376 base::Bind(&UtilityProcessHostClient::OnProcessLaunchFailed, 376 base::Bind(&UtilityProcessHostClient::OnProcessLaunchFailed,
377 client_.get(), 377 client_,
378 error_code)); 378 error_code));
379 } 379 }
380 380
381 void UtilityProcessHostImpl::OnProcessCrashed(int exit_code) { 381 void UtilityProcessHostImpl::OnProcessCrashed(int exit_code) {
382 if (!client_.get()) 382 if (!client_.get())
383 return; 383 return;
384 384
385 client_task_runner_->PostTask( 385 client_task_runner_->PostTask(
386 FROM_HERE, 386 FROM_HERE,
387 base::Bind(&UtilityProcessHostClient::OnProcessCrashed, client_.get(), 387 base::Bind(&UtilityProcessHostClient::OnProcessCrashed, client_,
388 exit_code)); 388 exit_code));
389 } 389 }
390 390
391 void UtilityProcessHostImpl::NotifyAndDelete(int error_code) { 391 void UtilityProcessHostImpl::NotifyAndDelete(int error_code) {
392 BrowserThread::PostTask( 392 BrowserThread::PostTask(
393 BrowserThread::IO, FROM_HERE, 393 BrowserThread::IO, FROM_HERE,
394 base::Bind(&UtilityProcessHostImpl::NotifyLaunchFailedAndDelete, 394 base::Bind(&UtilityProcessHostImpl::NotifyLaunchFailedAndDelete,
395 weak_ptr_factory_.GetWeakPtr(), 395 weak_ptr_factory_.GetWeakPtr(),
396 error_code)); 396 error_code));
397 } 397 }
398 398
399 // static 399 // static
400 void UtilityProcessHostImpl::NotifyLaunchFailedAndDelete( 400 void UtilityProcessHostImpl::NotifyLaunchFailedAndDelete(
401 base::WeakPtr<UtilityProcessHostImpl> host, 401 base::WeakPtr<UtilityProcessHostImpl> host,
402 int error_code) { 402 int error_code) {
403 if (!host) 403 if (!host)
404 return; 404 return;
405 405
406 host->OnProcessLaunchFailed(error_code); 406 host->OnProcessLaunchFailed(error_code);
407 delete host.get(); 407 delete host.get();
408 } 408 }
409 409
410 } // namespace content 410 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_backing_store.cc ('k') | content/renderer/pepper/pepper_plugin_instance_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698