OLD | NEW |
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 "chrome/browser/devtools/device/android_device_manager.h" | 5 #include "chrome/browser/devtools/device/android_device_manager.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <string.h> | 8 #include <string.h> |
9 | 9 |
10 #include <utility> | 10 #include <utility> |
11 | 11 |
12 #include "base/location.h" | 12 #include "base/location.h" |
13 #include "base/memory/ptr_util.h" | 13 #include "base/memory/ptr_util.h" |
14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
15 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
16 #include "base/strings/stringprintf.h" | 16 #include "base/strings/stringprintf.h" |
17 #include "base/thread_task_runner_handle.h" | 17 #include "base/threading/thread_task_runner_handle.h" |
18 #include "net/base/io_buffer.h" | 18 #include "net/base/io_buffer.h" |
19 #include "net/base/net_errors.h" | 19 #include "net/base/net_errors.h" |
20 #include "net/socket/stream_socket.h" | 20 #include "net/socket/stream_socket.h" |
21 | 21 |
22 using content::BrowserThread; | 22 using content::BrowserThread; |
23 | 23 |
24 namespace { | 24 namespace { |
25 | 25 |
26 const char kDevToolsAdbBridgeThreadName[] = "Chrome_DevToolsADBThread"; | 26 const char kDevToolsAdbBridgeThreadName[] = "Chrome_DevToolsADBThread"; |
27 | 27 |
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 new Device(handler_thread_->message_loop(), it->provider, it->serial); | 550 new Device(handler_thread_->message_loop(), it->provider, it->serial); |
551 } else { | 551 } else { |
552 device = found->second.get(); | 552 device = found->second.get(); |
553 } | 553 } |
554 response.push_back(device); | 554 response.push_back(device); |
555 new_devices[it->serial] = device->weak_factory_.GetWeakPtr(); | 555 new_devices[it->serial] = device->weak_factory_.GetWeakPtr(); |
556 } | 556 } |
557 devices_.swap(new_devices); | 557 devices_.swap(new_devices); |
558 callback.Run(response); | 558 callback.Run(response); |
559 } | 559 } |
OLD | NEW |