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