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

Side by Side Diff: cloud_print/gcp20/prototype/cloud_print_url_request_context_getter.cc

Issue 513503002: Remove implicit conversions from scoped_refptr to T* in cloud_print/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « cloud_print/gcp20/prototype/cloud_print_request.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "cloud_print/gcp20/prototype/cloud_print_url_request_context_getter.h" 5 #include "cloud_print/gcp20/prototype/cloud_print_url_request_context_getter.h"
6 6
7 #include "net/proxy/proxy_config_service_fixed.h" 7 #include "net/proxy/proxy_config_service_fixed.h"
8 #include "net/url_request/url_request_context.h" 8 #include "net/url_request/url_request_context.h"
9 #include "net/url_request/url_request_context_builder.h" 9 #include "net/url_request/url_request_context_builder.h"
10 10
11 CloudPrintURLRequestContextGetter::CloudPrintURLRequestContextGetter( 11 CloudPrintURLRequestContextGetter::CloudPrintURLRequestContextGetter(
12 scoped_refptr<base::SingleThreadTaskRunner> task_runner) { 12 scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
13 DCHECK(task_runner); 13 DCHECK(task_runner.get());
14 network_task_runner_ = task_runner; 14 network_task_runner_ = task_runner;
15 } 15 }
16 16
17 CloudPrintURLRequestContextGetter::~CloudPrintURLRequestContextGetter() { 17 CloudPrintURLRequestContextGetter::~CloudPrintURLRequestContextGetter() {
18 } 18 }
19 19
20 net::URLRequestContext* 20 net::URLRequestContext*
21 CloudPrintURLRequestContextGetter::GetURLRequestContext() { 21 CloudPrintURLRequestContextGetter::GetURLRequestContext() {
22 if (!context_) { 22 if (!context_) {
23 net::URLRequestContextBuilder builder; 23 net::URLRequestContextBuilder builder;
24 #if defined(OS_LINUX) || defined(OS_ANDROID) 24 #if defined(OS_LINUX) || defined(OS_ANDROID)
25 builder.set_proxy_config_service( 25 builder.set_proxy_config_service(
26 new net::ProxyConfigServiceFixed(net::ProxyConfig())); 26 new net::ProxyConfigServiceFixed(net::ProxyConfig()));
27 #endif // defined(OS_LINUX) || defined(OS_ANDROID) 27 #endif // defined(OS_LINUX) || defined(OS_ANDROID)
28 context_.reset(builder.Build()); 28 context_.reset(builder.Build());
29 } 29 }
30 return context_.get(); 30 return context_.get();
31 } 31 }
32 32
33 scoped_refptr<base::SingleThreadTaskRunner> 33 scoped_refptr<base::SingleThreadTaskRunner>
34 CloudPrintURLRequestContextGetter::GetNetworkTaskRunner() const { 34 CloudPrintURLRequestContextGetter::GetNetworkTaskRunner() const {
35 return network_task_runner_; 35 return network_task_runner_;
36 } 36 }
37 37
OLDNEW
« no previous file with comments | « cloud_print/gcp20/prototype/cloud_print_request.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698