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

Side by Side Diff: chrome/browser/io_thread.cc

Issue 420613004: Remove the initial space in the QUIC user agent ID. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use push_back to append a character. Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 "chrome/browser/io_thread.h" 5 #include "chrome/browser/io_thread.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after
1165 1165
1166 size_t max_packet_length = GetQuicMaxPacketLength(command_line, 1166 size_t max_packet_length = GetQuicMaxPacketLength(command_line,
1167 quic_trial_group, 1167 quic_trial_group,
1168 quic_trial_params); 1168 quic_trial_params);
1169 if (max_packet_length != 0) { 1169 if (max_packet_length != 0) {
1170 globals->quic_max_packet_length.set(max_packet_length); 1170 globals->quic_max_packet_length.set(max_packet_length);
1171 } 1171 }
1172 1172
1173 std::string quic_user_agent_id = 1173 std::string quic_user_agent_id =
1174 chrome::VersionInfo::GetVersionStringModifier(); 1174 chrome::VersionInfo::GetVersionStringModifier();
1175 quic_user_agent_id.append(1, ' '); 1175 if (!quic_user_agent_id.empty())
1176 quic_user_agent_id.push_back(' ');
1176 chrome::VersionInfo version_info; 1177 chrome::VersionInfo version_info;
1177 quic_user_agent_id.append(version_info.ProductNameAndVersionForUserAgent()); 1178 quic_user_agent_id.append(version_info.ProductNameAndVersionForUserAgent());
1178 globals->quic_user_agent_id.set(quic_user_agent_id); 1179 globals->quic_user_agent_id.set(quic_user_agent_id);
1179 1180
1180 net::QuicVersion version = GetQuicVersion(command_line, quic_trial_params); 1181 net::QuicVersion version = GetQuicVersion(command_line, quic_trial_params);
1181 if (version != net::QUIC_VERSION_UNSUPPORTED) { 1182 if (version != net::QUIC_VERSION_UNSUPPORTED) {
1182 net::QuicVersionVector supported_versions; 1183 net::QuicVersionVector supported_versions;
1183 supported_versions.push_back(version); 1184 supported_versions.push_back(version);
1184 globals->quic_supported_versions.set(supported_versions); 1185 globals->quic_supported_versions.set(supported_versions);
1185 } 1186 }
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1381 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); 1382 net::QuicVersionVector supported_versions = net::QuicSupportedVersions();
1382 for (size_t i = 0; i < supported_versions.size(); ++i) { 1383 for (size_t i = 0; i < supported_versions.size(); ++i) {
1383 net::QuicVersion version = supported_versions[i]; 1384 net::QuicVersion version = supported_versions[i];
1384 if (net::QuicVersionToString(version) == quic_version) { 1385 if (net::QuicVersionToString(version) == quic_version) {
1385 return version; 1386 return version;
1386 } 1387 }
1387 } 1388 }
1388 1389
1389 return net::QUIC_VERSION_UNSUPPORTED; 1390 return net::QUIC_VERSION_UNSUPPORTED;
1390 } 1391 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698