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

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

Issue 11415219: Move a number of static variables SPDY to HttpNetworkSession::Params. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comments Created 8 years 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 | chrome/browser/io_thread.h » ('j') | chrome/browser/io_thread.h » ('J')
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/chrome_browser_field_trials.h" 5 #include "chrome/browser/chrome_browser_field_trials.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 // After June 30, 2013 builds, it will always be in default group 162 // After June 30, 2013 builds, it will always be in default group
163 // (cwndDynamic). 163 // (cwndDynamic).
164 scoped_refptr<base::FieldTrial> trial( 164 scoped_refptr<base::FieldTrial> trial(
165 base::FieldTrialList::FactoryGetFieldTrial( 165 base::FieldTrialList::FactoryGetFieldTrial(
166 "SpdyCwnd", kSpdyCwndDivisor, "cwndDynamic", 2013, 6, 30, NULL)); 166 "SpdyCwnd", kSpdyCwndDivisor, "cwndDynamic", 2013, 6, 30, NULL));
167 167
168 trial->AppendGroup("cwnd10", kSpdyCwnd10); 168 trial->AppendGroup("cwnd10", kSpdyCwnd10);
169 trial->AppendGroup("cwnd16", kSpdyCwnd16); 169 trial->AppendGroup("cwnd16", kSpdyCwnd16);
170 trial->AppendGroup("cwndMin16", kSpdyCwndMin16); 170 trial->AppendGroup("cwndMin16", kSpdyCwndMin16);
171 trial->AppendGroup("cwndMin10", kSpdyCwndMin10); 171 trial->AppendGroup("cwndMin10", kSpdyCwndMin10);
172
173 if (parsed_command_line_.HasSwitch(switches::kMaxSpdyConcurrentStreams)) {
174 int value = 0;
175 base::StringToInt(parsed_command_line_.GetSwitchValueASCII(
176 switches::kMaxSpdyConcurrentStreams),
177 &value);
178 if (value > 0)
179 net::SpdySession::set_max_concurrent_streams(value);
180 }
181 } 172 }
182 173
183 // If --socket-reuse-policy is not specified, run an A/B test for choosing the 174 // If --socket-reuse-policy is not specified, run an A/B test for choosing the
184 // warmest socket. 175 // warmest socket.
185 void ChromeBrowserFieldTrials::WarmConnectionFieldTrial() { 176 void ChromeBrowserFieldTrials::WarmConnectionFieldTrial() {
186 const CommandLine& command_line = parsed_command_line_; 177 const CommandLine& command_line = parsed_command_line_;
187 if (command_line.HasSwitch(switches::kSocketReusePolicy)) { 178 if (command_line.HasSwitch(switches::kSocketReusePolicy)) {
188 std::string socket_reuse_policy_str = command_line.GetSwitchValueASCII( 179 std::string socket_reuse_policy_str = command_line.GetSwitchValueASCII(
189 switches::kSocketReusePolicy); 180 switches::kSocketReusePolicy);
190 int policy = -1; 181 int policy = -1;
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 333
343 void ChromeBrowserFieldTrials::InstantiateDynamicTrials() { 334 void ChromeBrowserFieldTrials::InstantiateDynamicTrials() {
344 // Call |FindValue()| on the trials below, which may come from the server, to 335 // Call |FindValue()| on the trials below, which may come from the server, to
345 // ensure they get marked as "used" for the purposes of data reporting. 336 // ensure they get marked as "used" for the purposes of data reporting.
346 base::FieldTrialList::FindValue("UMA-Dynamic-Binary-Uniformity-Trial"); 337 base::FieldTrialList::FindValue("UMA-Dynamic-Binary-Uniformity-Trial");
347 base::FieldTrialList::FindValue("UMA-Dynamic-Uniformity-Trial"); 338 base::FieldTrialList::FindValue("UMA-Dynamic-Uniformity-Trial");
348 base::FieldTrialList::FindValue("InstantDummy"); 339 base::FieldTrialList::FindValue("InstantDummy");
349 base::FieldTrialList::FindValue("InstantChannel"); 340 base::FieldTrialList::FindValue("InstantChannel");
350 base::FieldTrialList::FindValue("Test0PercentDefault"); 341 base::FieldTrialList::FindValue("Test0PercentDefault");
351 } 342 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/io_thread.h » ('j') | chrome/browser/io_thread.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698