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

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

Issue 1507253003: [Cronet] Allow experimenting with Chrome's internal DNS resolver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nojson3
Patch Set: address nits 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
« no previous file with comments | « no previous file | components/cronet/android/url_request_context_adapter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 #endif // defined(DATA_REDUCTION_PROXY_SUPPORT) 283 #endif // defined(DATA_REDUCTION_PROXY_SUPPORT)
284 context_builder.set_network_delegate(network_delegate.Pass()); 284 context_builder.set_network_delegate(network_delegate.Pass());
285 context_builder.set_net_log(net_log_.get()); 285 context_builder.set_net_log(net_log_.get());
286 286
287 // Android provides a local HTTP proxy server that handles proxying when a PAC 287 // Android provides a local HTTP proxy server that handles proxying when a PAC
288 // URL is present. Create a proxy service without a resolver and rely on this 288 // URL is present. Create a proxy service without a resolver and rely on this
289 // local HTTP proxy. See: crbug.com/432539. 289 // local HTTP proxy. See: crbug.com/432539.
290 context_builder.set_proxy_service( 290 context_builder.set_proxy_service(
291 net::ProxyService::CreateWithoutProxyResolver( 291 net::ProxyService::CreateWithoutProxyResolver(
292 proxy_config_service_.Pass(), net_log_.get())); 292 proxy_config_service_.Pass(), net_log_.get()));
293 config->ConfigureURLRequestContextBuilder(&context_builder); 293 config->ConfigureURLRequestContextBuilder(&context_builder, net_log_.get());
294 294
295 // Set up pref file if storage path is specified. 295 // Set up pref file if storage path is specified.
296 if (!config->storage_path.empty()) { 296 if (!config->storage_path.empty()) {
297 base::FilePath filepath(config->storage_path); 297 base::FilePath filepath(config->storage_path);
298 filepath = filepath.Append(FILE_PATH_LITERAL("local_prefs.json")); 298 filepath = filepath.Append(FILE_PATH_LITERAL("local_prefs.json"));
299 json_pref_store_ = new JsonPrefStore( 299 json_pref_store_ = new JsonPrefStore(
300 filepath, GetFileThread()->task_runner(), scoped_ptr<PrefFilter>()); 300 filepath, GetFileThread()->task_runner(), scoped_ptr<PrefFilter>());
301 context_builder.SetFileTaskRunner(GetFileThread()->task_runner()); 301 context_builder.SetFileTaskRunner(GetFileThread()->task_runner());
302 302
303 // Set up HttpServerPropertiesManager. 303 // Set up HttpServerPropertiesManager.
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 JNIEnv* env, 654 JNIEnv* env,
655 const JavaParamRef<jclass>& jcaller) { 655 const JavaParamRef<jclass>& jcaller) {
656 base::StatisticsRecorder::Initialize(); 656 base::StatisticsRecorder::Initialize();
657 std::vector<uint8> data; 657 std::vector<uint8> data;
658 if (!HistogramManager::GetInstance()->GetDeltas(&data)) 658 if (!HistogramManager::GetInstance()->GetDeltas(&data))
659 return ScopedJavaLocalRef<jbyteArray>(); 659 return ScopedJavaLocalRef<jbyteArray>();
660 return base::android::ToJavaByteArray(env, &data[0], data.size()); 660 return base::android::ToJavaByteArray(env, &data[0], data.size());
661 } 661 }
662 662
663 } // namespace cronet 663 } // namespace cronet
OLDNEW
« no previous file with comments | « no previous file | components/cronet/android/url_request_context_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698