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

Side by Side Diff: net/quic/crypto/quic_crypto_client_config.cc

Issue 211373004: Revert of Add PrivacyMode support to the QuicStreamFactory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "net/quic/crypto/quic_crypto_client_config.h" 5 #include "net/quic/crypto/quic_crypto_client_config.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "net/quic/crypto/cert_compressor.h" 9 #include "net/quic/crypto/cert_compressor.h"
10 #include "net/quic/crypto/channel_id.h" 10 #include "net/quic/crypto/channel_id.h"
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 DCHECK(server_state->IsEmpty()); 691 DCHECK(server_state->IsEmpty());
692 unsigned i = 0; 692 unsigned i = 0;
693 for (; i < canoncial_suffixes_.size(); ++i) { 693 for (; i < canoncial_suffixes_.size(); ++i) {
694 if (EndsWith(server_key.host(), canoncial_suffixes_[i], false)) { 694 if (EndsWith(server_key.host(), canoncial_suffixes_[i], false)) {
695 break; 695 break;
696 } 696 }
697 } 697 }
698 if (i == canoncial_suffixes_.size()) 698 if (i == canoncial_suffixes_.size())
699 return; 699 return;
700 700
701 QuicSessionKey suffix_server_key(canoncial_suffixes_[i], server_key.port(), 701 QuicSessionKey suffix_server_key(
702 server_key.is_https(), 702 canoncial_suffixes_[i], server_key.port(), server_key.is_https());
703 server_key.privacy_mode());
704 if (!ContainsKey(canonical_server_map_, suffix_server_key)) { 703 if (!ContainsKey(canonical_server_map_, suffix_server_key)) {
705 // This is the first host we've seen which matches the suffix, so make it 704 // This is the first host we've seen which matches the suffix, so make it
706 // canonical. 705 // canonical.
707 canonical_server_map_[suffix_server_key] = server_key; 706 canonical_server_map_[suffix_server_key] = server_key;
708 return; 707 return;
709 } 708 }
710 709
711 const QuicSessionKey& canonical_server_key = 710 const QuicSessionKey& canonical_server_key =
712 canonical_server_map_[suffix_server_key]; 711 canonical_server_map_[suffix_server_key];
713 CachedState* canonical_state = cached_states_[canonical_server_key]; 712 CachedState* canonical_state = cached_states_[canonical_server_key];
714 if (!canonical_state->proof_valid()) { 713 if (!canonical_state->proof_valid()) {
715 return; 714 return;
716 } 715 }
717 716
718 // Update canonical version to point at the "most recent" entry. 717 // Update canonical version to point at the "most recent" entry.
719 canonical_server_map_[suffix_server_key] = server_key; 718 canonical_server_map_[suffix_server_key] = server_key;
720 719
721 server_state->InitializeFrom(*canonical_state); 720 server_state->InitializeFrom(*canonical_state);
722 } 721 }
723 722
724 } // namespace net 723 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_stream_factory_impl_job.cc ('k') | net/quic/crypto/quic_crypto_client_config_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698