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

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

Issue 2944043002: Add NetLog events for HttpServerPropertiesManager (Closed)
Patch Set: address droger comment Created 3 years, 6 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 <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 if (config->enable_network_quality_estimator) { 653 if (config->enable_network_quality_estimator) {
654 // Use lossy prefs to limit the overhead of reading/writing the prefs. 654 // Use lossy prefs to limit the overhead of reading/writing the prefs.
655 registry->RegisterDictionaryPref(kNetworkQualities, 655 registry->RegisterDictionaryPref(kNetworkQualities,
656 PrefRegistry::LOSSY_PREF); 656 PrefRegistry::LOSSY_PREF);
657 } 657 }
658 pref_service_ = factory.Create(registry.get()); 658 pref_service_ = factory.Create(registry.get());
659 659
660 std::unique_ptr<net::HttpServerPropertiesManager> 660 std::unique_ptr<net::HttpServerPropertiesManager>
661 http_server_properties_manager(new net::HttpServerPropertiesManager( 661 http_server_properties_manager(new net::HttpServerPropertiesManager(
662 new PrefServiceAdapter(pref_service_.get()), 662 new PrefServiceAdapter(pref_service_.get()),
663 base::ThreadTaskRunnerHandle::Get(), GetNetworkTaskRunner())); 663 base::ThreadTaskRunnerHandle::Get(), GetNetworkTaskRunner(),
664 g_net_log.Get().net_log()));
664 http_server_properties_manager->InitializeOnNetworkSequence(); 665 http_server_properties_manager->InitializeOnNetworkSequence();
665 http_server_properties_manager_ = http_server_properties_manager.get(); 666 http_server_properties_manager_ = http_server_properties_manager.get();
666 context_builder.SetHttpServerProperties( 667 context_builder.SetHttpServerProperties(
667 std::move(http_server_properties_manager)); 668 std::move(http_server_properties_manager));
668 } 669 }
669 670
670 // Explicitly disable the persister for Cronet to avoid persistence of dynamic 671 // Explicitly disable the persister for Cronet to avoid persistence of dynamic
671 // HPKP. This is a safety measure ensuring that nobody enables the persistence 672 // HPKP. This is a safety measure ensuring that nobody enables the persistence
672 // of HPKP by specifying transport_security_persister_path in the future. 673 // of HPKP by specifying transport_security_persister_path in the future.
673 context_builder.set_transport_security_persister_path(base::FilePath()); 674 context_builder.set_transport_security_persister_path(base::FilePath());
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
1172 JNIEnv* env, 1173 JNIEnv* env,
1173 const JavaParamRef<jclass>& jcaller) { 1174 const JavaParamRef<jclass>& jcaller) {
1174 DCHECK(base::StatisticsRecorder::IsActive()); 1175 DCHECK(base::StatisticsRecorder::IsActive());
1175 std::vector<uint8_t> data; 1176 std::vector<uint8_t> data;
1176 if (!HistogramManager::GetInstance()->GetDeltas(&data)) 1177 if (!HistogramManager::GetInstance()->GetDeltas(&data))
1177 return ScopedJavaLocalRef<jbyteArray>(); 1178 return ScopedJavaLocalRef<jbyteArray>();
1178 return base::android::ToJavaByteArray(env, &data[0], data.size()); 1179 return base::android::ToJavaByteArray(env, &data[0], data.size());
1179 } 1180 }
1180 1181
1181 } // namespace cronet 1182 } // namespace cronet
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_impl_io_data.cc ('k') | ios/chrome/browser/browser_state/chrome_browser_state_impl_io_data.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698