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 "device/test/usb_test_gadget.h" | 5 #include "device/test/usb_test_gadget.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner) | 137 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner) |
138 : network_task_runner_(network_task_runner) {} | 138 : network_task_runner_(network_task_runner) {} |
139 | 139 |
140 private: | 140 private: |
141 ~URLRequestContextGetter() override {} | 141 ~URLRequestContextGetter() override {} |
142 | 142 |
143 // net::URLRequestContextGetter implementation | 143 // net::URLRequestContextGetter implementation |
144 net::URLRequestContext* GetURLRequestContext() override { | 144 net::URLRequestContext* GetURLRequestContext() override { |
145 if (!context_) { | 145 if (!context_) { |
146 net::URLRequestContextBuilder context_builder; | 146 net::URLRequestContextBuilder context_builder; |
147 context_builder.set_proxy_service( | 147 context_builder.set_proxy_service(net::ProxyService::CreateDirect()); |
148 make_scoped_ptr(net::ProxyService::CreateDirect())); | |
149 context_ = context_builder.Build().Pass(); | 148 context_ = context_builder.Build().Pass(); |
150 } | 149 } |
151 return context_.get(); | 150 return context_.get(); |
152 } | 151 } |
153 | 152 |
154 scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner() | 153 scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner() |
155 const override { | 154 const override { |
156 return network_task_runner_; | 155 return network_task_runner_; |
157 } | 156 } |
158 | 157 |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 return false; | 606 return false; |
608 } | 607 } |
609 | 608 |
610 DeviceAddListener add_listener(usb_service_, device_address_, -1); | 609 DeviceAddListener add_listener(usb_service_, device_address_, -1); |
611 device_ = add_listener.WaitForAdd(); | 610 device_ = add_listener.WaitForAdd(); |
612 DCHECK(device_.get()); | 611 DCHECK(device_.get()); |
613 return true; | 612 return true; |
614 } | 613 } |
615 | 614 |
616 } // namespace device | 615 } // namespace device |
OLD | NEW |