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

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

Issue 1642493005: Remove net/base/io_buffer.h include from usb_device_handle.h. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 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_socket.h" 5 #include "chrome/browser/devtools/device/usb/android_usb_socket.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/message_loop/message_loop.h" 11 #include "base/message_loop/message_loop.h"
12 #include "net/base/io_buffer.h"
12 #include "net/base/net_errors.h" 13 #include "net/base/net_errors.h"
13 14
14 namespace { 15 namespace {
15 16
16 const int kMaxPayload = 4096; 17 const int kMaxPayload = 4096;
17 18
18 } // namespace 19 } // namespace
19 20
20 AndroidUsbSocket::AndroidUsbSocket(scoped_refptr<AndroidUsbDevice> device, 21 AndroidUsbSocket::AndroidUsbSocket(scoped_refptr<AndroidUsbDevice> device,
21 uint32_t socket_id, 22 uint32_t socket_id,
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 read_buffer_ = read_buffer_.substr(bytes_to_copy); 258 read_buffer_ = read_buffer_.substr(bytes_to_copy);
258 else 259 else
259 read_buffer_ = std::string(); 260 read_buffer_ = std::string();
260 base::ResetAndReturn(&read_callback_).Run(bytes_to_copy); 261 base::ResetAndReturn(&read_callback_).Run(bytes_to_copy);
261 } 262 }
262 263
263 void AndroidUsbSocket::RespondToWriter(int result) { 264 void AndroidUsbSocket::RespondToWriter(int result) {
264 if (!write_callback_.is_null()) 265 if (!write_callback_.is_null())
265 base::ResetAndReturn(&write_callback_).Run(result); 266 base::ResetAndReturn(&write_callback_).Run(result);
266 } 267 }
OLDNEW
« no previous file with comments | « chrome/browser/devtools/device/usb/android_usb_device.cc ('k') | chrome/browser/devtools/device/usb/usb_device_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698