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

Side by Side Diff: chrome/browser/net/http_pipelining_compatibility_client.cc

Issue 9705074: Supporting command line argument to force field trials (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 9 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
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/net/http_pipelining_compatibility_client.h" 5 #include "chrome/browser/net/http_pipelining_compatibility_client.h"
6 6
7 #include "base/metrics/field_trial.h" 7 #include "base/metrics/field_trial.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/string_split.h" 10 #include "base/string_split.h"
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 const base::FieldTrial::Probability kDivisor = 100; 300 const base::FieldTrial::Probability kDivisor = 100;
301 base::FieldTrial::Probability probability_per_group = 0; 301 base::FieldTrial::Probability probability_per_group = 0;
302 302
303 const char* kTrialName = "HttpPipeliningCompatibility"; 303 const char* kTrialName = "HttpPipeliningCompatibility";
304 base::FieldTrial* trial = base::FieldTrialList::Find(kTrialName); 304 base::FieldTrial* trial = base::FieldTrialList::Find(kTrialName);
305 if (trial) { 305 if (trial) {
306 return; 306 return;
307 } 307 }
308 // After October 30, 2012 builds, it will always be in default group 308 // After October 30, 2012 builds, it will always be in default group
309 // (disable_network_stats). 309 // (disable_network_stats).
310 trial = new base::FieldTrial(kTrialName, kDivisor, 310 trial = base::FieldTrial::CreateInstance(kTrialName, kDivisor, "disable_test",
311 "disable_test", 2012, 10, 30); 311 2012, 10, 30);
312 312
313 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); 313 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
314 if (channel == chrome::VersionInfo::CHANNEL_CANARY) { 314 if (channel == chrome::VersionInfo::CHANNEL_CANARY) {
315 // TODO(simonjam): Enable this: probability_per_group = 1; 315 // TODO(simonjam): Enable this: probability_per_group = 1;
316 } 316 }
317 317
318 int collect_stats_group = trial->AppendGroup("enable_test", 318 int collect_stats_group = trial->AppendGroup("enable_test",
319 probability_per_group); 319 probability_per_group);
320 if (trial->group() != collect_stats_group) { 320 if (trial->group() != collect_stats_group) {
321 return; 321 return;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 content::BrowserThread::PostTask( 366 content::BrowserThread::PostTask(
367 content::BrowserThread::IO, 367 content::BrowserThread::IO,
368 FROM_HERE, 368 FROM_HERE,
369 base::Bind(&CollectPipeliningCapabilityStatsOnIOThread, 369 base::Bind(&CollectPipeliningCapabilityStatsOnIOThread,
370 pipeline_test_server, 370 pipeline_test_server,
371 make_scoped_refptr( 371 make_scoped_refptr(
372 io_thread->system_url_request_context_getter()))); 372 io_thread->system_url_request_context_getter())));
373 } 373 }
374 374
375 } // namespace chrome_browser_net 375 } // namespace chrome_browser_net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698