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

Side by Side Diff: chrome/browser/devtools/device/usb/android_usb_device.cc

Issue 513673004: Manual devtools fixups for scoped_refptr operator T* removal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify 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
« no previous file with comments | « no previous file | chrome/browser/devtools/devtools_ui_bindings.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/devtools/device/usb/android_usb_device.h" 5 #include "chrome/browser/devtools/device/usb/android_usb_device.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/barrier_closure.h" 9 #include "base/barrier_closure.h"
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 void AndroidUsbDevice::TransferError(UsbTransferStatus status) { 614 void AndroidUsbDevice::TransferError(UsbTransferStatus status) {
615 DCHECK(message_loop_ == base::MessageLoop::current()); 615 DCHECK(message_loop_ == base::MessageLoop::current());
616 616
617 message_loop_->PostTask(FROM_HERE, 617 message_loop_->PostTask(FROM_HERE,
618 base::Bind(&AndroidUsbDevice::Terminate, this)); 618 base::Bind(&AndroidUsbDevice::Terminate, this));
619 } 619 }
620 620
621 void AndroidUsbDevice::TerminateIfReleased( 621 void AndroidUsbDevice::TerminateIfReleased(
622 scoped_refptr<UsbDeviceHandle> usb_handle) { 622 scoped_refptr<UsbDeviceHandle> usb_handle) {
623 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); 623 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
624 if (usb_handle->GetDevice()) 624 if (usb_handle->GetDevice().get())
625 return; 625 return;
626 message_loop_->PostTask(FROM_HERE, 626 message_loop_->PostTask(FROM_HERE,
627 base::Bind(&AndroidUsbDevice::Terminate, this)); 627 base::Bind(&AndroidUsbDevice::Terminate, this));
628 } 628 }
629 629
630 void AndroidUsbDevice::Terminate() { 630 void AndroidUsbDevice::Terminate() {
631 DCHECK(message_loop_ == base::MessageLoop::current()); 631 DCHECK(message_loop_ == base::MessageLoop::current());
632 632
633 std::vector<AndroidUsbDevice*>::iterator it = 633 std::vector<AndroidUsbDevice*>::iterator it =
634 std::find(g_devices.Get().begin(), g_devices.Get().end(), this); 634 std::find(g_devices.Get().begin(), g_devices.Get().end(), this);
(...skipping 19 matching lines...) Expand all
654 BrowserThread::PostTask( 654 BrowserThread::PostTask(
655 BrowserThread::FILE, FROM_HERE, 655 BrowserThread::FILE, FROM_HERE,
656 base::Bind(&ReleaseInterface, usb_handle, interface_id_)); 656 base::Bind(&ReleaseInterface, usb_handle, interface_id_));
657 } 657 }
658 658
659 void AndroidUsbDevice::SocketDeleted(uint32 socket_id) { 659 void AndroidUsbDevice::SocketDeleted(uint32 socket_id) {
660 DCHECK(message_loop_ == base::MessageLoop::current()); 660 DCHECK(message_loop_ == base::MessageLoop::current());
661 661
662 sockets_.erase(socket_id); 662 sockets_.erase(socket_id);
663 } 663 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/devtools/devtools_ui_bindings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698