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

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: Fixed some ooopss... Created 8 years, 8 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 | « chrome/browser/instant/instant_field_trial.cc ('k') | chrome/browser/net/network_stats.cc » ('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/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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 461
462 const base::FieldTrial::Probability kDivisor = 100; 462 const base::FieldTrial::Probability kDivisor = 100;
463 base::FieldTrial::Probability probability_to_run_test = 0; 463 base::FieldTrial::Probability probability_to_run_test = 0;
464 464
465 const char* kTrialName = "HttpPipeliningCompatibility"; 465 const char* kTrialName = "HttpPipeliningCompatibility";
466 base::FieldTrial* trial = base::FieldTrialList::Find(kTrialName); 466 base::FieldTrial* trial = base::FieldTrialList::Find(kTrialName);
467 if (trial) { 467 if (trial) {
468 return; 468 return;
469 } 469 }
470 // After April 14, 2012, the trial will disable itself. 470 // After April 14, 2012, the trial will disable itself.
471 trial = new base::FieldTrial(kTrialName, kDivisor, 471 trial = base::FieldTrialList::FactoryGetFieldTrial(
472 "disable_test", 2012, 4, 14); 472 kTrialName, kDivisor, "disable_test", 2012, 4, 14, NULL);
473 473
474 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); 474 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
475 if (channel == chrome::VersionInfo::CHANNEL_CANARY) { 475 if (channel == chrome::VersionInfo::CHANNEL_CANARY) {
476 // TODO(simonjam): Re-enable this when crash is fixed. 476 // TODO(simonjam): Re-enable this when crash is fixed.
477 probability_to_run_test = 0; 477 probability_to_run_test = 0;
478 } 478 }
479 479
480 int collect_stats_group = trial->AppendGroup("enable_test", 480 int collect_stats_group = trial->AppendGroup("enable_test",
481 probability_to_run_test); 481 probability_to_run_test);
482 if (trial->group() != collect_stats_group) { 482 if (trial->group() != collect_stats_group) {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 content::BrowserThread::PostTask( 529 content::BrowserThread::PostTask(
530 content::BrowserThread::IO, 530 content::BrowserThread::IO,
531 FROM_HERE, 531 FROM_HERE,
532 base::Bind(&CollectPipeliningCapabilityStatsOnIOThread, 532 base::Bind(&CollectPipeliningCapabilityStatsOnIOThread,
533 pipeline_test_server, 533 pipeline_test_server,
534 make_scoped_refptr( 534 make_scoped_refptr(
535 io_thread->system_url_request_context_getter()))); 535 io_thread->system_url_request_context_getter())));
536 } 536 }
537 537
538 } // namespace chrome_browser_net 538 } // namespace chrome_browser_net
OLDNEW
« no previous file with comments | « chrome/browser/instant/instant_field_trial.cc ('k') | chrome/browser/net/network_stats.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698