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

Side by Side Diff: net/http/http_server_properties_impl.cc

Issue 2359803003: Job Controller: clean up metrics logging about the job racing result (Closed)
Patch Set: sync Created 4 years, 2 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 | « net/http/http_server_properties.cc ('k') | net/http/http_stream_factory_impl_job.h » ('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 (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/http/http_server_properties_impl.h" 5 #include "net/http/http_server_properties_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 const bool previously_no_alternative_services = 439 const bool previously_no_alternative_services =
440 (GetAlternateProtocolIterator(origin) == alternative_service_map_.end()); 440 (GetAlternateProtocolIterator(origin) == alternative_service_map_.end());
441 441
442 alternative_service_map_.Put(origin, alternative_service_info_vector); 442 alternative_service_map_.Put(origin, alternative_service_info_vector);
443 443
444 if (previously_no_alternative_services && 444 if (previously_no_alternative_services &&
445 !GetAlternativeServices(origin).empty()) { 445 !GetAlternativeServices(origin).empty()) {
446 // TODO(rch): Consider the case where multiple requests are started 446 // TODO(rch): Consider the case where multiple requests are started
447 // before the first completes. In this case, only one of the jobs 447 // before the first completes. In this case, only one of the jobs
448 // would reach this code, whereas all of them should should have. 448 // would reach this code, whereas all of them should should have.
449 HistogramAlternateProtocolUsage(ALTERNATE_PROTOCOL_USAGE_MAPPING_MISSING); 449 HistogramAlternateProtocolUsage(ALTERNATE_PROTOCOL_USAGE_MAPPING_MISSING,
450 false);
450 } 451 }
451 452
452 // If this host ends with a canonical suffix, then set it as the 453 // If this host ends with a canonical suffix, then set it as the
453 // canonical host. 454 // canonical host.
454 const char* kCanonicalScheme = "https"; 455 const char* kCanonicalScheme = "https";
455 if (origin.scheme() == kCanonicalScheme) { 456 if (origin.scheme() == kCanonicalScheme) {
456 const std::string* canonical_suffix = GetCanonicalSuffix(origin.host()); 457 const std::string* canonical_suffix = GetCanonicalSuffix(origin.host());
457 if (canonical_suffix != nullptr) { 458 if (canonical_suffix != nullptr) {
458 url::SchemeHostPort canonical_server(kCanonicalScheme, *canonical_suffix, 459 url::SchemeHostPort canonical_server(kCanonicalScheme, *canonical_suffix,
459 origin.port()); 460 origin.port());
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 base::TimeDelta delay = when > now ? when - now : base::TimeDelta(); 799 base::TimeDelta delay = when > now ? when - now : base::TimeDelta();
799 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( 800 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
800 FROM_HERE, 801 FROM_HERE,
801 base::Bind( 802 base::Bind(
802 &HttpServerPropertiesImpl::ExpireBrokenAlternateProtocolMappings, 803 &HttpServerPropertiesImpl::ExpireBrokenAlternateProtocolMappings,
803 weak_ptr_factory_.GetWeakPtr()), 804 weak_ptr_factory_.GetWeakPtr()),
804 delay); 805 delay);
805 } 806 }
806 807
807 } // namespace net 808 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_server_properties.cc ('k') | net/http/http_stream_factory_impl_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698