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

Unified Diff: chrome/browser/ui/webui/inspect_ui.cc

Issue 26568004: Introduced AndroidDeviceProvider to simplify testing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed unused constants, thus fixed compile errors. Created 7 years, 2 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 | « chrome/browser/devtools/refcounted_adb_thread.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/inspect_ui.cc
diff --git a/chrome/browser/ui/webui/inspect_ui.cc b/chrome/browser/ui/webui/inspect_ui.cc
index 4a7253d72cf6a80368fa9fb53dc1c1eb21249725..84def4440f4fecbe5faa192a5c752a88b4098c50 100644
--- a/chrome/browser/ui/webui/inspect_ui.cc
+++ b/chrome/browser/ui/webui/inspect_ui.cc
@@ -793,7 +793,16 @@ void InspectUI::UpdateDiscoverUsbDevicesEnabled() {
if (adb_bridge) {
bool enabled = false;
value->GetAsBoolean(&enabled);
- adb_bridge->set_discover_usb_devices(enabled);
+
+ DevToolsAdbBridge::DeviceProviders device_providers;
+ device_providers.push_back(AndroidDeviceProvider::GetAdbDeviceProvider());
+
+ if (enabled) {
+ device_providers.push_back(
+ AndroidDeviceProvider::GetUsbDeviceProvider(profile));
+ }
+
+ adb_bridge->set_device_providers(device_providers);
}
}
« no previous file with comments | « chrome/browser/devtools/refcounted_adb_thread.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698