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

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

Issue 1904483004: Change SupportsSpdy dict, SpdySettingsMap, ServerNetworkStatsMap, AlternativeServiceMap and disk da… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile after sync code, introduced by commit 388755 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
« 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 <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 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 continue; 599 continue;
600 } 600 }
601 601
602 if (quic_hint.alternate_port <= std::numeric_limits<uint16_t>::min() || 602 if (quic_hint.alternate_port <= std::numeric_limits<uint16_t>::min() ||
603 quic_hint.alternate_port > std::numeric_limits<uint16_t>::max()) { 603 quic_hint.alternate_port > std::numeric_limits<uint16_t>::max()) {
604 LOG(ERROR) << "Invalid QUIC hint alternate port: " 604 LOG(ERROR) << "Invalid QUIC hint alternate port: "
605 << quic_hint.alternate_port; 605 << quic_hint.alternate_port;
606 continue; 606 continue;
607 } 607 }
608 608
609 net::HostPortPair quic_hint_host_port_pair(canon_host, 609 url::SchemeHostPort quic_server("https", canon_host, quic_hint.port);
610 quic_hint.port);
611 net::AlternativeService alternative_service( 610 net::AlternativeService alternative_service(
612 net::AlternateProtocol::QUIC, "", 611 net::AlternateProtocol::QUIC, "",
613 static_cast<uint16_t>(quic_hint.alternate_port)); 612 static_cast<uint16_t>(quic_hint.alternate_port));
614 context_->http_server_properties()->SetAlternativeService( 613 context_->http_server_properties()->SetAlternativeService(
615 quic_hint_host_port_pair, alternative_service, base::Time::Max()); 614 quic_server, alternative_service, base::Time::Max());
616 } 615 }
617 } 616 }
618 617
619 // Iterate through PKP configuration for every host. 618 // Iterate through PKP configuration for every host.
620 for (const auto& pkp : config->pkp_list) { 619 for (const auto& pkp : config->pkp_list) {
621 // Add the host pinning. 620 // Add the host pinning.
622 context_->transport_security_state()->AddHPKP( 621 context_->transport_security_state()->AddHPKP(
623 pkp->host, pkp->expiration_date, pkp->include_subdomains, 622 pkp->host, pkp->expiration_date, pkp->include_subdomains,
624 pkp->pin_hashes, GURL::EmptyGURL()); 623 pkp->pin_hashes, GURL::EmptyGURL());
625 } 624 }
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 JNIEnv* env, 890 JNIEnv* env,
892 const JavaParamRef<jclass>& jcaller) { 891 const JavaParamRef<jclass>& jcaller) {
893 base::StatisticsRecorder::Initialize(); 892 base::StatisticsRecorder::Initialize();
894 std::vector<uint8_t> data; 893 std::vector<uint8_t> data;
895 if (!HistogramManager::GetInstance()->GetDeltas(&data)) 894 if (!HistogramManager::GetInstance()->GetDeltas(&data))
896 return ScopedJavaLocalRef<jbyteArray>(); 895 return ScopedJavaLocalRef<jbyteArray>();
897 return base::android::ToJavaByteArray(env, &data[0], data.size()); 896 return base::android::ToJavaByteArray(env, &data[0], data.size());
898 } 897 }
899 898
900 } // namespace cronet 899 } // 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