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

Unified Diff: device/test/usb_test_gadget_impl.cc

Issue 1314273002: Manage UsbService lifetime in DeviceClient implementations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/test/test_device_client.cc ('k') | device/usb/usb_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/test/usb_test_gadget_impl.cc
diff --git a/device/test/usb_test_gadget_impl.cc b/device/test/usb_test_gadget_impl.cc
index a94cb763804cc5c092bc65b3760266ef7527a3ba..0222ab32f5714348ae41422781c3c9273f5d70fd 100644
--- a/device/test/usb_test_gadget_impl.cc
+++ b/device/test/usb_test_gadget_impl.cc
@@ -23,6 +23,7 @@
#include "base/strings/utf_string_conversions.h"
#include "base/thread_task_runner_handle.h"
#include "base/time/time.h"
+#include "device/core/device_client.h"
#include "device/usb/usb_device.h"
#include "device/usb/usb_device_handle.h"
#include "device/usb/usb_service.h"
@@ -192,7 +193,7 @@ class UsbGadgetFactory : public UsbService::Observer,
public:
UsbGadgetFactory(scoped_refptr<base::SingleThreadTaskRunner> io_task_runner)
: observer_(this), weak_factory_(this) {
- usb_service_ = UsbService::GetInstance(io_task_runner);
+ usb_service_ = DeviceClient::Get()->GetUsbService();
request_context_getter_ = new URLRequestContextGetter(io_task_runner);
static uint32 next_session_id;
« no previous file with comments | « device/test/test_device_client.cc ('k') | device/usb/usb_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698