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

Side by Side Diff: device/usb/mojo/device_impl.cc

Issue 2607063002: Remove mojo::Array. (Closed)
Patch Set: rebase Created 3 years, 11 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 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/mojo/device_impl.h" 5 #include "device/usb/mojo/device_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
11 #include <numeric> 11 #include <numeric>
12 #include <utility> 12 #include <utility>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/bind.h" 15 #include "base/bind.h"
16 #include "base/callback.h" 16 #include "base/callback.h"
17 #include "base/memory/ptr_util.h" 17 #include "base/memory/ptr_util.h"
18 #include "base/stl_util.h" 18 #include "base/stl_util.h"
19 #include "device/usb/mojo/type_converters.h" 19 #include "device/usb/mojo/type_converters.h"
20 #include "device/usb/usb_descriptors.h" 20 #include "device/usb/usb_descriptors.h"
21 #include "device/usb/usb_device.h" 21 #include "device/usb/usb_device.h"
22 #include "mojo/common/common_type_converters.h"
23 #include "net/base/io_buffer.h" 22 #include "net/base/io_buffer.h"
24 23
25 namespace device { 24 namespace device {
26 namespace usb { 25 namespace usb {
27 26
28 namespace { 27 namespace {
29 28
30 scoped_refptr<net::IOBuffer> CreateTransferBuffer(size_t size) { 29 scoped_refptr<net::IOBuffer> CreateTransferBuffer(size_t size) {
31 return new net::IOBuffer( 30 return new net::IOBuffer(
32 std::max(static_cast<size_t>(1u), static_cast<size_t>(size))); 31 std::max(static_cast<size_t>(1u), static_cast<size_t>(size)));
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 base::Bind(&OnIsochronousTransferOut, callback)); 432 base::Bind(&OnIsochronousTransferOut, callback));
434 } 433 }
435 434
436 void DeviceImpl::OnDeviceRemoved(scoped_refptr<UsbDevice> device) { 435 void DeviceImpl::OnDeviceRemoved(scoped_refptr<UsbDevice> device) {
437 DCHECK_EQ(device_, device); 436 DCHECK_EQ(device_, device);
438 delete this; 437 delete this;
439 } 438 }
440 439
441 } // namespace usb 440 } // namespace usb
442 } // namespace device 441 } // namespace device
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698