diff options
author | bnc <bnc@chromium.org> | 2015-03-30 20:06:25 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-31 03:07:06 +0000 |
commit | 4988e439c1a14779f32b4dc9c289d9e4bad467af (patch) | |
tree | 3847ba303bb21df2e50596e7c693d34ee441ee77 /net/http/http_server_properties.cc | |
parent | b5ff8d1fc8b72aa40b8936df0775cec7abc6b849 (diff) | |
download | chromium_src-4988e439c1a14779f32b4dc9c289d9e4bad467af.zip chromium_src-4988e439c1a14779f32b4dc9c289d9e4bad467af.tar.gz chromium_src-4988e439c1a14779f32b4dc9c289d9e4bad467af.tar.bz2 |
Introduce AlternativeServiceInfo.
* Introduce AlternativeServiceInfo and use it instead of AlternateProtocolInfo
in HttpServerPropertiesImpl.
* Change language in method and variable names and comments to consistently talk
about alternative service instead of alternate protocol (except for threshold
related occurrences).
* Update HttpServerPropertiesManager to save by key "alternative_service"
instead of "alternate_protocol", while still being able to read old
preferences.
* Add TODO(bnc) at a couple of places.
BUG=392575
Review URL: https://codereview.chromium.org/1043973002
Cr-Commit-Position: refs/heads/master@{#322968}
Diffstat (limited to 'net/http/http_server_properties.cc')
-rw-r--r-- | net/http/http_server_properties.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/net/http/http_server_properties.cc b/net/http/http_server_properties.cc index f002102..174b174 100644 --- a/net/http/http_server_properties.cc +++ b/net/http/http_server_properties.cc @@ -100,9 +100,14 @@ AlternateProtocol AlternateProtocolFromNextProto(NextProto next_proto) { return UNINITIALIZED_ALTERNATE_PROTOCOL; } -std::string AlternateProtocolInfo::ToString() const { - return base::StringPrintf("%d:%s p=%f", port, - AlternateProtocolToString(protocol), probability); +std::string AlternativeService::ToString() const { + return base::StringPrintf("(%s, %s, %d)", AlternateProtocolToString(protocol), + host.c_str(), port); +} + +std::string AlternativeServiceInfo::ToString() const { + return base::StringPrintf("%s, p=%f", alternative_service.ToString().c_str(), + probability); } // static |