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

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

Issue 1561283003: Revert of Implement basic USB device enumeration on Android. (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
« no previous file with comments | « no previous file | content/app/DEPS » ('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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 void Open(const OpenCallback& callback) override { 420 void Open(const OpenCallback& callback) override {
421 base::ThreadTaskRunnerHandle::Get()->PostTask( 421 base::ThreadTaskRunnerHandle::Get()->PostTask(
422 FROM_HERE, base::Bind(callback, make_scoped_refptr( 422 FROM_HERE, base::Bind(callback, make_scoped_refptr(
423 new MockUsbDeviceHandle<T>(this)))); 423 new MockUsbDeviceHandle<T>(this))));
424 } 424 }
425 425
426 const UsbConfigDescriptor* GetActiveConfiguration() override { 426 const UsbConfigDescriptor* GetActiveConfiguration() override {
427 return T::kConfigured ? &config_desc_ : nullptr; 427 return T::kConfigured ? &config_desc_ : nullptr;
428 } 428 }
429 429
430 bool Close(scoped_refptr<UsbDeviceHandle> handle) override {
431 return true;
432 }
433
430 std::set<int> claimed_interfaces_; 434 std::set<int> claimed_interfaces_;
431 435
432 protected: 436 protected:
433 virtual ~MockUsbDevice() {} 437 virtual ~MockUsbDevice() {}
434 438
435 private: 439 private:
436 UsbConfigDescriptor config_desc_; 440 UsbConfigDescriptor config_desc_;
437 }; 441 };
438 442
439 class MockUsbService : public UsbService { 443 class MockUsbService : public UsbService {
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 EXPECT_EQ(2, listener.invoked_); 799 EXPECT_EQ(2, listener.invoked_);
796 EXPECT_EQ(listener.invoked_ - 1, scheduler_invoked_); 800 EXPECT_EQ(listener.invoked_ - 1, scheduler_invoked_);
797 EXPECT_TRUE(base::MessageLoop::current()->IsIdleForTesting()); 801 EXPECT_TRUE(base::MessageLoop::current()->IsIdleForTesting());
798 } 802 }
799 803
800 IN_PROC_BROWSER_TEST_F(AndroidUsbTraitsTest, TestDeviceCounting) { 804 IN_PROC_BROWSER_TEST_F(AndroidUsbTraitsTest, TestDeviceCounting) {
801 MockCountListenerForCheckingTraits listener(adb_bridge_); 805 MockCountListenerForCheckingTraits listener(adb_bridge_);
802 adb_bridge_->AddDeviceCountListener(&listener); 806 adb_bridge_->AddDeviceCountListener(&listener);
803 runner_->Run(); 807 runner_->Run();
804 } 808 }
OLDNEW
« no previous file with comments | « no previous file | content/app/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698