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

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

Issue 1833203002: Plumb SSLKEYLOGFILE from Cronet to net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added comment Created 4 years, 8 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 "components/cronet/android/cronet_url_request_context_adapter.h" 5 #include "components/cronet/android/cronet_url_request_context_adapter.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <map> 9 #include <map>
10 #include <utility> 10 #include <utility>
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 #endif // defined(DATA_REDUCTION_PROXY_SUPPORT) 427 #endif // defined(DATA_REDUCTION_PROXY_SUPPORT)
428 context_builder.set_network_delegate(std::move(network_delegate)); 428 context_builder.set_network_delegate(std::move(network_delegate));
429 context_builder.set_net_log(net_log_.get()); 429 context_builder.set_net_log(net_log_.get());
430 430
431 // Android provides a local HTTP proxy server that handles proxying when a PAC 431 // Android provides a local HTTP proxy server that handles proxying when a PAC
432 // URL is present. Create a proxy service without a resolver and rely on this 432 // URL is present. Create a proxy service without a resolver and rely on this
433 // local HTTP proxy. See: crbug.com/432539. 433 // local HTTP proxy. See: crbug.com/432539.
434 context_builder.set_proxy_service( 434 context_builder.set_proxy_service(
435 net::ProxyService::CreateWithoutProxyResolver( 435 net::ProxyService::CreateWithoutProxyResolver(
436 std::move(proxy_config_service_), net_log_.get())); 436 std::move(proxy_config_service_), net_log_.get()));
437 config->ConfigureURLRequestContextBuilder(&context_builder, net_log_.get()); 437 config->ConfigureURLRequestContextBuilder(&context_builder, net_log_.get(),
438 GetFileThread()->task_runner());
438 439
439 // Set up pref file if storage path is specified. 440 // Set up pref file if storage path is specified.
440 if (!config->storage_path.empty()) { 441 if (!config->storage_path.empty()) {
441 base::FilePath filepath(config->storage_path); 442 base::FilePath filepath(config->storage_path);
442 filepath = filepath.Append(FILE_PATH_LITERAL("local_prefs.json")); 443 filepath = filepath.Append(FILE_PATH_LITERAL("local_prefs.json"));
443 json_pref_store_ = new JsonPrefStore( 444 json_pref_store_ = new JsonPrefStore(
444 filepath, GetFileThread()->task_runner(), scoped_ptr<PrefFilter>()); 445 filepath, GetFileThread()->task_runner(), scoped_ptr<PrefFilter>());
445 context_builder.SetFileTaskRunner(GetFileThread()->task_runner()); 446 context_builder.SetFileTaskRunner(GetFileThread()->task_runner());
mef 2016/03/25 20:53:47 this seems redundant now.
xunjieli 2016/03/25 20:58:36 I think this is to replace the default one in Cont
mef 2016/03/28 15:14:25 Acknowledged. I thought that it could make sense t
xunjieli 2016/03/28 15:51:16 Acknowledged. I agree. We should unify these two a
446 447
447 // Set up HttpServerPropertiesManager. 448 // Set up HttpServerPropertiesManager.
448 PrefServiceFactory factory; 449 PrefServiceFactory factory;
449 factory.set_user_prefs(json_pref_store_); 450 factory.set_user_prefs(json_pref_store_);
450 scoped_refptr<PrefRegistrySimple> registry(new PrefRegistrySimple()); 451 scoped_refptr<PrefRegistrySimple> registry(new PrefRegistrySimple());
451 registry->RegisterDictionaryPref(kHttpServerProperties, 452 registry->RegisterDictionaryPref(kHttpServerProperties,
452 new base::DictionaryValue()); 453 new base::DictionaryValue());
453 pref_service_ = factory.Create(registry.get()); 454 pref_service_ = factory.Create(registry.get());
454 455
455 scoped_ptr<net::HttpServerPropertiesManager> http_server_properties_manager( 456 scoped_ptr<net::HttpServerPropertiesManager> http_server_properties_manager(
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 JNIEnv* env, 800 JNIEnv* env,
800 const JavaParamRef<jclass>& jcaller) { 801 const JavaParamRef<jclass>& jcaller) {
801 base::StatisticsRecorder::Initialize(); 802 base::StatisticsRecorder::Initialize();
802 std::vector<uint8_t> data; 803 std::vector<uint8_t> data;
803 if (!HistogramManager::GetInstance()->GetDeltas(&data)) 804 if (!HistogramManager::GetInstance()->GetDeltas(&data))
804 return ScopedJavaLocalRef<jbyteArray>(); 805 return ScopedJavaLocalRef<jbyteArray>();
805 return base::android::ToJavaByteArray(env, &data[0], data.size()); 806 return base::android::ToJavaByteArray(env, &data[0], data.size());
806 } 807 }
807 808
808 } // namespace cronet 809 } // namespace cronet
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698