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

Side by Side Diff: device/test/usb_test_gadget_impl.cc

Issue 1290243007: Shift URLRequestContextStorage over to taking scoped_ptrs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Paul_BuilderGrab
Patch Set: Sync'd to revision p349162. Created 5 years, 3 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 unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/shell/browser/shell_url_request_context_getter.cc ('k') | extensions/browser/api/cast_channel/cast_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698