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

Side by Side Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_d ata.h" 5 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_d ata.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_bypa ss_protocol.h" 10 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_bypa ss_protocol.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 const scoped_refptr<base::SingleThreadTaskRunner>& network_task_runner) 63 const scoped_refptr<base::SingleThreadTaskRunner>& network_task_runner)
64 : network_task_runner_(network_task_runner), 64 : network_task_runner_(network_task_runner),
65 user_agent_settings_( 65 user_agent_settings_(
66 new net::StaticHttpUserAgentSettings(std::string(), user_agent)) { 66 new net::StaticHttpUserAgentSettings(std::string(), user_agent)) {
67 } 67 }
68 68
69 net::URLRequestContext* 69 net::URLRequestContext*
70 BasicHTTPURLRequestContextGetter::GetURLRequestContext() { 70 BasicHTTPURLRequestContextGetter::GetURLRequestContext() {
71 if (!url_request_context_) { 71 if (!url_request_context_) {
72 net::URLRequestContextBuilder builder; 72 net::URLRequestContextBuilder builder;
73 builder.set_proxy_service( 73 builder.set_proxy_service(net::ProxyService::CreateDirect());
74 make_scoped_ptr(net::ProxyService::CreateDirect()));
75 builder.SetSpdyAndQuicEnabled(false, false); 74 builder.SetSpdyAndQuicEnabled(false, false);
76 url_request_context_ = builder.Build().Pass(); 75 url_request_context_ = builder.Build().Pass();
77 } 76 }
78 77
79 return url_request_context_.get(); 78 return url_request_context_.get();
80 } 79 }
81 80
82 scoped_refptr<base::SingleThreadTaskRunner> 81 scoped_refptr<base::SingleThreadTaskRunner>
83 BasicHTTPURLRequestContextGetter::GetNetworkTaskRunner() const { 82 BasicHTTPURLRequestContextGetter::GetNetworkTaskRunner() const {
84 return network_task_runner_; 83 return network_task_runner_;
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 pref_path, value)); 349 pref_path, value));
351 } 350 }
352 351
353 void DataReductionProxyIOData::StoreSerializedConfig( 352 void DataReductionProxyIOData::StoreSerializedConfig(
354 const std::string& serialized_config) { 353 const std::string& serialized_config) {
355 DCHECK(io_task_runner_->BelongsToCurrentThread()); 354 DCHECK(io_task_runner_->BelongsToCurrentThread());
356 SetStringPref(prefs::kDataReductionProxyConfig, serialized_config); 355 SetStringPref(prefs::kDataReductionProxyConfig, serialized_config);
357 } 356 }
358 357
359 } // namespace data_reduction_proxy 358 } // namespace data_reduction_proxy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698