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

Side by Side Diff: net/quic/chromium/quic_stream_factory.cc

Issue 2230503003: QUIC - Added histograms to track how cache ie performing when server (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/chromium/quic_stream_factory.h" 5 #include "net/quic/chromium/quic_stream_factory.h"
6 6
7 #include <openssl/aead.h> 7 #include <openssl/aead.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <tuple> 10 #include <tuple>
(...skipping 1969 matching lines...) Expand 10 before | Expand all | Expand 10 after
1980 if (http_server_properties_->max_server_configs_stored_in_properties() == 0) 1980 if (http_server_properties_->max_server_configs_stored_in_properties() == 0)
1981 return; 1981 return;
1982 // Create a temporary QuicServerInfo object to deserialize and to populate the 1982 // Create a temporary QuicServerInfo object to deserialize and to populate the
1983 // in-memory crypto server config cache in the MRU order. 1983 // in-memory crypto server config cache in the MRU order.
1984 std::unique_ptr<QuicServerInfo> server_info; 1984 std::unique_ptr<QuicServerInfo> server_info;
1985 CompletionCallback callback; 1985 CompletionCallback callback;
1986 // Get the list of servers to be deserialized first because WaitForDataReady 1986 // Get the list of servers to be deserialized first because WaitForDataReady
1987 // touches quic_server_info_map. 1987 // touches quic_server_info_map.
1988 const QuicServerInfoMap& quic_server_info_map = 1988 const QuicServerInfoMap& quic_server_info_map =
1989 http_server_properties_->quic_server_info_map(); 1989 http_server_properties_->quic_server_info_map();
1990 std::vector<QuicServerId> server_list(quic_server_info_map.size()); 1990 std::vector<QuicServerId> server_list;
1991 for (const auto& key_value : quic_server_info_map) 1991 for (const auto& key_value : quic_server_info_map)
1992 server_list.push_back(key_value.first); 1992 server_list.push_back(key_value.first);
1993 for (auto it = server_list.rbegin(); it != server_list.rend(); ++it) { 1993 for (auto it = server_list.rbegin(); it != server_list.rend(); ++it) {
1994 const QuicServerId& server_id = *it; 1994 const QuicServerId& server_id = *it;
1995 server_info.reset(quic_server_info_factory_->GetForServer(server_id)); 1995 server_info.reset(quic_server_info_factory_->GetForServer(server_id));
1996 if (server_info->WaitForDataReady(callback) == OK) { 1996 if (server_info->WaitForDataReady(callback) == OK) {
1997 DVLOG(1) << "Initialized server config for: " << server_id.ToString(); 1997 DVLOG(1) << "Initialized server config for: " << server_id.ToString();
1998 InitializeCachedStateInCryptoConfig(server_id, server_info, nullptr); 1998 InitializeCachedStateInCryptoConfig(server_id, server_info, nullptr);
1999 } 1999 }
2000 } 2000 }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
2037 // Since the session was active, there's no longer an 2037 // Since the session was active, there's no longer an
2038 // HttpStreamFactoryImpl::Job running which can mark it broken, unless the TCP 2038 // HttpStreamFactoryImpl::Job running which can mark it broken, unless the TCP
2039 // job also fails. So to avoid not using QUIC when we otherwise could, we mark 2039 // job also fails. So to avoid not using QUIC when we otherwise could, we mark
2040 // it as recently broken, which means that 0-RTT will be disabled but we'll 2040 // it as recently broken, which means that 0-RTT will be disabled but we'll
2041 // still race. 2041 // still race.
2042 http_server_properties_->MarkAlternativeServiceRecentlyBroken( 2042 http_server_properties_->MarkAlternativeServiceRecentlyBroken(
2043 alternative_service); 2043 alternative_service);
2044 } 2044 }
2045 2045
2046 } // namespace net 2046 } // namespace net
OLDNEW
« no previous file with comments | « net/http/disk_cache_based_quic_server_info.h ('k') | net/quic/core/crypto/properties_based_quic_server_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698