Draft roadmap:
* Upgrade AlternateProtocolInfo::AlternateProtocolInfo() to take hostname. Use (protocol, hostname, port) order per Alternate Service specification. Make sure alternate protocol header gets processed appropriately, using current server's hostname.
* Upgrade HttpServerPropertiesImpl::SetAlternateProtocol() to take hostname. Use (protocol, hostname, port) order per Alternate Service specification.
* Upgrade HttpServerProperties as well as its clients to support multiple AlternateProtocolInfo entries for each HostPortPair.
* s/protocol/service/
* Make sure to consider hostname in AlternateServiceInfo struct when using an alternate service.
* Process AlternateService frames.

One clarification... Currently Alternate-Protocol support in chrome only allows for a *single* alternative. With Alt-Svc, we need to add support for multiple alternatives. For example:
Alt-Svc: QUIC=":443",QUIC="mail.google.com:443",h2="mail.google.com:443"

Updated roadmap:
* Handle multiple |AlternateProtocolInfo| entries for each |HostPortPair|.
* |broken_alternate_protocol_map_| and |broken_alternate_protocol_map_| should
keep track of alterate protocols separately. I would like to only consider the
alternate (protocol, hostname, port) tuple, regardless of which |HostPortPair|
originally pointed the client to it.
* |HttpStreamFactoryImpl::GetAlternateProtocolRequestFor| should return
multiple alternate protocols.
* |HttpStreamFactoryImpl::RequestStreamInternal| should start multiple
alternate jobs.
* |HttpStreamFactoryImplJob::MaybeMarkAlternateProtocolBroken| should find out
which alternate protocol to mark as broken.
* Should |was_alternate_protocol_recently_broken| in
|QuicStreamFactory::Create| refer to a specific alternate protocol
associated with |host_port_pair|? Which one? Do we need one |Job| for each?
* |QuicStreamFactory::ProcessGoingAwaySession| should work with actual QUIC
protocol used.
* Add hostname to |AlternateProtocolInfo|. Use (protocol, hostname, port) order
per Alternate Service specification.
* Upgrade |HttpServerProperties| members to take hostname.
* Make use to connect to the right host when using AlternateService.
* s/protocol/service/
* Upgrade persistent settings loading and saving in
|HttpServerPropertiesManager|.
* Process AlternateService frames.
* Add tests as appropriate.

The following revision refers to this bug:
https://chromium.googlesource.com/chromium/src.git/+/7dc44629216042a30c3c2aa626ec3b47e10ad8b4
commit 7dc44629216042a30c3c2aa626ec3b47e10ad8b4
Author: bnc <bnc@chromium.org>
Date: Tue Jun 30 11:27:55 2015
Pretty print AlternativeService in test macros.
Implement PrintTo(const AlternativeService&, std::ostream*) so that when
EXPECT_EQ or ASSERT_EQ fails between two AlternativeService structs, the test
output contains protocol names and hostnames pretty printed, instead of a binary
blob including useless things like the memory address of where std::string
stores the hostname. See src/testing/gtest/include/gtest/gtest-printers.h for
more information.
Currently used in AlternateProtocolServerPropertiesTest.BrokenShadowsCanonical
only, but more tests involving EXPECT_EQ between AlternativeService structs are
coming.
An earlier version of this CL landed at https://crrev.com/1212813006 and got
reverted because on iOS, the helper function required registering an ataxit
handler. This version does things differently by
* using PrintTo instead of operator<<, just because this is listed first in the
comments in gtest-printers.h;
* defining the function in http_server_properties_impl_unittests.cc instead of
declaring it in http_server_properties.h with NET_EXPORT, this will make sure
that no static initializers will be introduced.
Note, however, that this helper function cannot be defined in anonymous
namespace, gtest would not find it there.
BUG=392575
Review URL: https://codereview.chromium.org/1213133003
Cr-Commit-Position: refs/heads/master@{#336763}
[modify] http://crrev.com/7dc44629216042a30c3c2aa626ec3b47e10ad8b4/net/http/http_server_properties_impl_unittest.cc