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

Unified Diff: chrome/browser/io_thread.cc

Issue 312193005: Pass chrome version and channel in CHLO message to server. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use kUACV as the Tag and changed client_description to client_version Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/io_thread.cc
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index cef70bcf133ed2acb086e8f2765643df2dadd312..01336c0486a03a748902dc6fe485783e7789baea 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -39,6 +39,7 @@
#include "chrome/browser/net/sdch_dictionary_fetcher.h"
#include "chrome/common/chrome_content_client.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/common/chrome_version_info.h"
#include "chrome/common/pref_names.h"
#include "components/data_reduction_proxy/browser/data_reduction_proxy_prefs.h"
#include "components/data_reduction_proxy/browser/http_auth_handler_data_reduction_proxy.h"
@@ -976,6 +977,7 @@ void IOThread::InitializeNetworkSessionParams(
globals_->enable_quic_port_selection.CopyToIfSet(
&params->enable_quic_port_selection);
globals_->quic_max_packet_length.CopyToIfSet(&params->quic_max_packet_length);
+ globals_->client_version.CopyToIfSet(&params->client_version);
globals_->quic_supported_versions.CopyToIfSet(
&params->quic_supported_versions);
globals_->origin_to_force_quic_on.CopyToIfSet(
@@ -1082,6 +1084,13 @@ void IOThread::ConfigureQuic(const CommandLine& command_line) {
globals_->quic_max_packet_length.set(max_packet_length);
}
+ std::string client_version =
+ chrome::VersionInfo::GetVersionStringModifier();
+ chrome::VersionInfo version_info;
Lei Zhang 2014/06/05 07:30:47 nit: swap with the next line to put |version_info|
ramant (doing other things) 2014/06/05 17:07:49 Done.
+ client_version.append(" ");
Lei Zhang 2014/06/05 07:30:47 nit: append(" ") -> push_back(' ')
ramant (doing other things) 2014/06/05 17:07:49 Done.
+ client_version.append(version_info.ProductNameAndVersionForUserAgent());
+ globals_->client_version.set(client_version);
+
net::QuicVersion version = GetQuicVersion(command_line);
if (version != net::QUIC_VERSION_UNSUPPORTED) {
net::QuicVersionVector supported_versions;

Powered by Google App Engine
This is Rietveld 408576698