| Index: device/devices_app/usb/device_manager_impl_unittest.cc
|
| diff --git a/device/devices_app/usb/device_manager_impl_unittest.cc b/device/devices_app/usb/device_manager_impl_unittest.cc
|
| index 0855b26a30fa628538b0e18becf57e8362001401..4b0a9bf0267b56e8cca1a551d87ec1ba5eb4bad3 100644
|
| --- a/device/devices_app/usb/device_manager_impl_unittest.cc
|
| +++ b/device/devices_app/usb/device_manager_impl_unittest.cc
|
| @@ -19,7 +19,6 @@
|
| #include "device/usb/mock_usb_device_handle.h"
|
| #include "device/usb/mock_usb_service.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| -#include "third_party/mojo/src/mojo/public/cpp/bindings/error_handler.h"
|
| #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h"
|
|
|
| using ::testing::Invoke;
|
| @@ -80,23 +79,6 @@ class USBDeviceManagerImplTest : public testing::Test {
|
| scoped_ptr<TestDeviceClient> device_client_;
|
| };
|
|
|
| -// This is used this to watch a MessagePipe and run a given callback when the
|
| -// pipe is closed.
|
| -class PipeWatcher : public mojo::ErrorHandler {
|
| - public:
|
| - PipeWatcher(const base::Closure& error_callback)
|
| - : error_callback_(error_callback) {}
|
| - ~PipeWatcher() override {}
|
| -
|
| - private:
|
| - // mojo::ErrorHandler:
|
| - void OnConnectionError() override { error_callback_.Run(); }
|
| -
|
| - const base::Closure error_callback_;
|
| -
|
| - DISALLOW_COPY_AND_ASSIGN(PipeWatcher);
|
| -};
|
| -
|
| class MockOpenCallback {
|
| public:
|
| explicit MockOpenCallback(UsbDevice* device) : device_(device) {}
|
| @@ -222,8 +204,7 @@ TEST_F(USBDeviceManagerImplTest, OpenDevice) {
|
|
|
| {
|
| base::RunLoop loop;
|
| - scoped_ptr<PipeWatcher> watcher(new PipeWatcher(loop.QuitClosure()));
|
| - bad_device.set_error_handler(watcher.get());
|
| + bad_device.set_connection_error_handler(loop.QuitClosure());
|
| bad_device->GetDeviceInfo(base::Bind(&FailOnGetDeviceInfoResponse));
|
| loop.Run();
|
| }
|
|
|