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

Side by Side Diff: components/cronet/android/cronet_url_request_context_adapter.cc

Issue 1504383002: Remove ScopedVector from url_request_context_builder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix cronet issue Created 5 years 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 "components/cronet/android/cronet_url_request_context_adapter.h" 5 #include "components/cronet/android/cronet_url_request_context_adapter.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_array.h" 10 #include "base/android/jni_array.h"
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 // For now, the choice to enable the data reduction proxy happens once, 268 // For now, the choice to enable the data reduction proxy happens once,
269 // at initialization. It cannot be disabled thereafter. 269 // at initialization. It cannot be disabled thereafter.
270 if (!config->data_reduction_proxy_key.empty()) { 270 if (!config->data_reduction_proxy_key.empty()) {
271 data_reduction_proxy_.reset(new CronetDataReductionProxy( 271 data_reduction_proxy_.reset(new CronetDataReductionProxy(
272 config->data_reduction_proxy_key, config->data_reduction_primary_proxy, 272 config->data_reduction_proxy_key, config->data_reduction_primary_proxy,
273 config->data_reduction_fallback_proxy, 273 config->data_reduction_fallback_proxy,
274 config->data_reduction_secure_proxy_check_url, config->user_agent, 274 config->data_reduction_secure_proxy_check_url, config->user_agent,
275 GetNetworkTaskRunner(), net_log_.get())); 275 GetNetworkTaskRunner(), net_log_.get()));
276 network_delegate = 276 network_delegate =
277 data_reduction_proxy_->CreateNetworkDelegate(network_delegate.Pass()); 277 data_reduction_proxy_->CreateNetworkDelegate(network_delegate.Pass());
278 ScopedVector<net::URLRequestInterceptor> interceptors; 278 std::vector<scoped_ptr<net::URLRequestInterceptor>> interceptors;
279 interceptors.push_back(data_reduction_proxy_->CreateInterceptor()); 279 interceptors.push_back(data_reduction_proxy_->CreateInterceptor());
280 context_builder.SetInterceptors(interceptors.Pass()); 280 context_builder.SetInterceptors(std::move(interceptors));
281 } 281 }
282 #endif // defined(DATA_REDUCTION_PROXY_SUPPORT) 282 #endif // defined(DATA_REDUCTION_PROXY_SUPPORT)
283 context_builder.set_network_delegate(network_delegate.Pass()); 283 context_builder.set_network_delegate(network_delegate.Pass());
284 context_builder.set_net_log(net_log_.get()); 284 context_builder.set_net_log(net_log_.get());
285 285
286 // Android provides a local HTTP proxy server that handles proxying when a PAC 286 // Android provides a local HTTP proxy server that handles proxying when a PAC
287 // URL is present. Create a proxy service without a resolver and rely on this 287 // URL is present. Create a proxy service without a resolver and rely on this
288 // local HTTP proxy. See: crbug.com/432539. 288 // local HTTP proxy. See: crbug.com/432539.
289 context_builder.set_proxy_service( 289 context_builder.set_proxy_service(
290 net::ProxyService::CreateWithoutProxyResolver( 290 net::ProxyService::CreateWithoutProxyResolver(
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 JNIEnv* env, 578 JNIEnv* env,
579 const JavaParamRef<jclass>& jcaller) { 579 const JavaParamRef<jclass>& jcaller) {
580 base::StatisticsRecorder::Initialize(); 580 base::StatisticsRecorder::Initialize();
581 std::vector<uint8> data; 581 std::vector<uint8> data;
582 if (!HistogramManager::GetInstance()->GetDeltas(&data)) 582 if (!HistogramManager::GetInstance()->GetDeltas(&data))
583 return ScopedJavaLocalRef<jbyteArray>(); 583 return ScopedJavaLocalRef<jbyteArray>();
584 return base::android::ToJavaByteArray(env, &data[0], data.size()); 584 return base::android::ToJavaByteArray(env, &data[0], data.size());
585 } 585 }
586 586
587 } // namespace cronet 587 } // namespace cronet
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/net/url_request_context_getter.cc ('k') | net/url_request/url_request_context_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698