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

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

Issue 879863004: Log force-alt-protocols command line flag usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Log user action, not internal call. Created 5 years, 10 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
« no previous file with comments | « no previous file | tools/metrics/actions/actions.xml » ('j') | 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"
11 #include "base/bind_helpers.h" 11 #include "base/bind_helpers.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/debug/leak_tracker.h" 14 #include "base/debug/leak_tracker.h"
15 #include "base/debug/trace_event.h" 15 #include "base/debug/trace_event.h"
16 #include "base/logging.h" 16 #include "base/logging.h"
17 #include "base/metrics/field_trial.h" 17 #include "base/metrics/field_trial.h"
18 #include "base/metrics/user_metrics.h"
18 #include "base/prefs/pref_registry_simple.h" 19 #include "base/prefs/pref_registry_simple.h"
19 #include "base/prefs/pref_service.h" 20 #include "base/prefs/pref_service.h"
20 #include "base/stl_util.h" 21 #include "base/stl_util.h"
21 #include "base/strings/string_number_conversions.h" 22 #include "base/strings/string_number_conversions.h"
22 #include "base/strings/string_piece.h" 23 #include "base/strings/string_piece.h"
23 #include "base/strings/string_split.h" 24 #include "base/strings/string_split.h"
24 #include "base/strings/string_util.h" 25 #include "base/strings/string_util.h"
25 #include "base/threading/sequenced_worker_pool.h" 26 #include "base/threading/sequenced_worker_pool.h"
26 #include "base/threading/thread.h" 27 #include "base/threading/thread.h"
27 #include "base/threading/worker_pool.h" 28 #include "base/threading/worker_pool.h"
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 globals_->enable_spdy_ping_based_connection_checking.set(false); 903 globals_->enable_spdy_ping_based_connection_checking.set(false);
903 } else if (option == kExclude) { 904 } else if (option == kExclude) {
904 globals_->forced_spdy_exclusions.insert( 905 globals_->forced_spdy_exclusions.insert(
905 net::HostPortPair::FromURL(GURL(value))); 906 net::HostPortPair::FromURL(GURL(value)));
906 } else if (option == kDisableCompression) { 907 } else if (option == kDisableCompression) {
907 globals_->enable_spdy_compression.set(false); 908 globals_->enable_spdy_compression.set(false);
908 } else if (option == kDisableAltProtocols) { 909 } else if (option == kDisableAltProtocols) {
909 globals_->use_alternate_protocols.set(false); 910 globals_->use_alternate_protocols.set(false);
910 } else if (option == kForceAltProtocols) { 911 } else if (option == kForceAltProtocols) {
911 net::AlternateProtocolInfo pair(443, net::NPN_SPDY_3, 1); 912 net::AlternateProtocolInfo pair(443, net::NPN_SPDY_3, 1);
913 base::RecordAction(base::UserMetricsAction("Net.ForceAlternateProtocol"));
912 net::HttpServerPropertiesImpl::ForceAlternateProtocol(pair); 914 net::HttpServerPropertiesImpl::ForceAlternateProtocol(pair);
913 } else if (option == kSingleDomain) { 915 } else if (option == kSingleDomain) {
914 DVLOG(1) << "FORCING SINGLE DOMAIN"; 916 DVLOG(1) << "FORCING SINGLE DOMAIN";
915 globals_->force_spdy_single_domain.set(true); 917 globals_->force_spdy_single_domain.set(true);
916 } else if (option == kInitialMaxConcurrentStreams) { 918 } else if (option == kInitialMaxConcurrentStreams) {
917 int streams; 919 int streams;
918 if (base::StringToInt(value, &streams)) 920 if (base::StringToInt(value, &streams))
919 globals_->initial_max_spdy_concurrent_streams.set(streams); 921 globals_->initial_max_spdy_concurrent_streams.set(streams);
920 } else if (option.empty() && it == spdy_options.begin()) { 922 } else if (option.empty() && it == spdy_options.begin()) {
921 continue; 923 continue;
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
1384 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); 1386 net::QuicVersionVector supported_versions = net::QuicSupportedVersions();
1385 for (size_t i = 0; i < supported_versions.size(); ++i) { 1387 for (size_t i = 0; i < supported_versions.size(); ++i) {
1386 net::QuicVersion version = supported_versions[i]; 1388 net::QuicVersion version = supported_versions[i];
1387 if (net::QuicVersionToString(version) == quic_version) { 1389 if (net::QuicVersionToString(version) == quic_version) {
1388 return version; 1390 return version;
1389 } 1391 }
1390 } 1392 }
1391 1393
1392 return net::QUIC_VERSION_UNSUPPORTED; 1394 return net::QUIC_VERSION_UNSUPPORTED;
1393 } 1395 }
OLDNEW
« no previous file with comments | « no previous file | tools/metrics/actions/actions.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698