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

Side by Side Diff: device/usb/usb_device.cc

Issue 2108923002: device: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: device Created 4 years, 5 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 | « device/bluetooth/test/mock_bluetooth_adapter.cc ('k') | device/usb/usb_device_handle_usbfs.cc » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "device/usb/usb_device.h" 5 #include "device/usb/usb_device.h"
6 6
7 #include "base/guid.h" 7 #include "base/guid.h"
8 #include "device/usb/usb_device_handle.h" 8 #include "device/usb/usb_device_handle.h"
9 #include "device/usb/webusb_descriptors.h" 9 #include "device/usb/webusb_descriptors.h"
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 } 73 }
74 74
75 void UsbDevice::NotifyDeviceRemoved() { 75 void UsbDevice::NotifyDeviceRemoved() {
76 FOR_EACH_OBSERVER(Observer, observer_list_, OnDeviceRemoved(this)); 76 FOR_EACH_OBSERVER(Observer, observer_list_, OnDeviceRemoved(this));
77 } 77 }
78 78
79 void UsbDevice::OnDisconnect() { 79 void UsbDevice::OnDisconnect() {
80 // Swap out the handle list as HandleClosed() will try to modify it. 80 // Swap out the handle list as HandleClosed() will try to modify it.
81 std::list<UsbDeviceHandle*> handles; 81 std::list<UsbDeviceHandle*> handles;
82 handles.swap(handles_); 82 handles.swap(handles_);
83 for (auto handle : handles_) 83 for (auto* handle : handles_)
84 handle->Close(); 84 handle->Close();
85 } 85 }
86 86
87 void UsbDevice::HandleClosed(UsbDeviceHandle* handle) { 87 void UsbDevice::HandleClosed(UsbDeviceHandle* handle) {
88 handles_.remove(handle); 88 handles_.remove(handle);
89 } 89 }
90 90
91 } // namespace device 91 } // namespace device
OLDNEW
« no previous file with comments | « device/bluetooth/test/mock_bluetooth_adapter.cc ('k') | device/usb/usb_device_handle_usbfs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698