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

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

Issue 1658953003: Revert of Update device/usb and its Mojo interface for variable size ISO packets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | device/devices_app/usb/device_impl.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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/containers/scoped_ptr_hash_map.h" 10 #include "base/containers/scoped_ptr_hash_map.h"
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 std::copy(output_buffer_.begin(), 345 std::copy(output_buffer_.begin(),
346 output_buffer_.begin() + query.size, 346 output_buffer_.begin() + query.size,
347 query.buffer->data()); 347 query.buffer->data());
348 output_buffer_.erase(output_buffer_.begin(), 348 output_buffer_.erase(output_buffer_.begin(),
349 output_buffer_.begin() + query.size); 349 output_buffer_.begin() + query.size);
350 base::ThreadTaskRunnerHandle::Get()->PostTask( 350 base::ThreadTaskRunnerHandle::Get()->PostTask(
351 FROM_HERE, base::Bind(query.callback, device::USB_TRANSFER_COMPLETED, 351 FROM_HERE, base::Bind(query.callback, device::USB_TRANSFER_COMPLETED,
352 query.buffer, query.size)); 352 query.buffer, query.size));
353 } 353 }
354 354
355 void IsochronousTransferIn( 355 void IsochronousTransfer(UsbEndpointDirection direction,
356 uint8_t endpoint_number, 356 uint8_t endpoint,
357 const std::vector<uint32_t>& packet_lengths, 357 scoped_refptr<net::IOBuffer> buffer,
358 unsigned int timeout, 358 size_t length,
359 const IsochronousTransferCallback& callback) override {} 359 unsigned int packets,
360 360 unsigned int packet_length,
361 void IsochronousTransferOut( 361 unsigned int timeout,
362 uint8_t endpoint_number, 362 const TransferCallback& callback) override {}
363 scoped_refptr<net::IOBuffer> buffer,
364 const std::vector<uint32_t>& packet_lengths,
365 unsigned int timeout,
366 const IsochronousTransferCallback& callback) override {}
367 363
368 protected: 364 protected:
369 virtual ~MockUsbDeviceHandle() {} 365 virtual ~MockUsbDeviceHandle() {}
370 366
371 struct Query { 367 struct Query {
372 TransferCallback callback; 368 TransferCallback callback;
373 scoped_refptr<net::IOBuffer> buffer; 369 scoped_refptr<net::IOBuffer> buffer;
374 size_t size; 370 size_t size;
375 371
376 Query(TransferCallback callback, 372 Query(TransferCallback callback,
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 EXPECT_EQ(2, listener.invoked_); 796 EXPECT_EQ(2, listener.invoked_);
801 EXPECT_EQ(listener.invoked_ - 1, scheduler_invoked_); 797 EXPECT_EQ(listener.invoked_ - 1, scheduler_invoked_);
802 EXPECT_TRUE(base::MessageLoop::current()->IsIdleForTesting()); 798 EXPECT_TRUE(base::MessageLoop::current()->IsIdleForTesting());
803 } 799 }
804 800
805 IN_PROC_BROWSER_TEST_F(AndroidUsbTraitsTest, TestDeviceCounting) { 801 IN_PROC_BROWSER_TEST_F(AndroidUsbTraitsTest, TestDeviceCounting) {
806 MockCountListenerForCheckingTraits listener(adb_bridge_); 802 MockCountListenerForCheckingTraits listener(adb_bridge_);
807 adb_bridge_->AddDeviceCountListener(&listener); 803 adb_bridge_->AddDeviceCountListener(&listener);
808 runner_->Run(); 804 runner_->Run();
809 } 805 }
OLDNEW
« no previous file with comments | « no previous file | device/devices_app/usb/device_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698