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

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: 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
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 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 const bool previously_no_alternative_services = 440 const bool previously_no_alternative_services =
441 (GetAlternateProtocolIterator(origin) == alternative_service_map_.end()); 441 (GetAlternateProtocolIterator(origin) == alternative_service_map_.end());
442 442
443 alternative_service_map_.Put(origin, alternative_service_info_vector); 443 alternative_service_map_.Put(origin, alternative_service_info_vector);
444 444
445 if (previously_no_alternative_services && 445 if (previously_no_alternative_services &&
446 !GetAlternativeServices(origin).empty()) { 446 !GetAlternativeServices(origin).empty()) {
447 // TODO(rch): Consider the case where multiple requests are started 447 // TODO(rch): Consider the case where multiple requests are started
448 // before the first completes. In this case, only one of the jobs 448 // before the first completes. In this case, only one of the jobs
449 // would reach this code, whereas all of them should should have. 449 // would reach this code, whereas all of them should should have.
450 HistogramAlternateProtocolUsage(ALTERNATE_PROTOCOL_USAGE_MAPPING_MISSING); 450 HistogramAlternateProtocolUsage(ALTERNATE_PROTOCOL_USAGE_MAPPING_MISSING,
451 false);
451 } 452 }
452 453
453 // If this host ends with a canonical suffix, then set it as the 454 // If this host ends with a canonical suffix, then set it as the
454 // canonical host. 455 // canonical host.
455 const char* kCanonicalScheme = "https"; 456 const char* kCanonicalScheme = "https";
456 if (origin.scheme() == kCanonicalScheme) { 457 if (origin.scheme() == kCanonicalScheme) {
457 const std::string* canonical_suffix = GetCanonicalSuffix(origin.host()); 458 const std::string* canonical_suffix = GetCanonicalSuffix(origin.host());
458 if (canonical_suffix != nullptr) { 459 if (canonical_suffix != nullptr) {
459 url::SchemeHostPort canonical_server(kCanonicalScheme, *canonical_suffix, 460 url::SchemeHostPort canonical_server(kCanonicalScheme, *canonical_suffix,
460 origin.port()); 461 origin.port());
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 base::TimeDelta delay = when > now ? when - now : base::TimeDelta(); 800 base::TimeDelta delay = when > now ? when - now : base::TimeDelta();
800 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( 801 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
801 FROM_HERE, 802 FROM_HERE,
802 base::Bind( 803 base::Bind(
803 &HttpServerPropertiesImpl::ExpireBrokenAlternateProtocolMappings, 804 &HttpServerPropertiesImpl::ExpireBrokenAlternateProtocolMappings,
804 weak_ptr_factory_.GetWeakPtr()), 805 weak_ptr_factory_.GetWeakPtr()),
805 delay); 806 delay);
806 } 807 }
807 808
808 } // namespace net 809 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698