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

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

Issue 10105002: Enable HTTP pipelining field trial on dev channel for 10% of users. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | 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/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 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 const base::FieldTrial::Probability kDivisor = 100; 463 const base::FieldTrial::Probability kDivisor = 100;
464 base::FieldTrial::Probability probability_to_run_test = 0; 464 base::FieldTrial::Probability probability_to_run_test = 0;
465 465
466 const char* kTrialName = "HttpPipeliningCompatibility"; 466 const char* kTrialName = "HttpPipeliningCompatibility";
467 base::FieldTrial* trial = base::FieldTrialList::Find(kTrialName); 467 base::FieldTrial* trial = base::FieldTrialList::Find(kTrialName);
468 if (trial) { 468 if (trial) {
469 return; 469 return;
470 } 470 }
471 // After April 21, 2012, the trial will disable itself. 471 // After April 21, 2012, the trial will disable itself.
472 trial = base::FieldTrialList::FactoryGetFieldTrial( 472 trial = base::FieldTrialList::FactoryGetFieldTrial(
473 kTrialName, kDivisor, "disable_test", 2012, 4, 21, NULL); 473 kTrialName, kDivisor, "disable_test", 2012, 4, 21, NULL);
cbentzel 2012/04/16 18:52:24 Are you going to want to bump this up as well?
James Simonsen 2012/04/16 19:05:29 I think I'll wait until I bump it up to 100%, just
474 474
475 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); 475 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
476 if (channel == chrome::VersionInfo::CHANNEL_CANARY) { 476 if (channel == chrome::VersionInfo::CHANNEL_CANARY) {
477 probability_to_run_test = 100; 477 probability_to_run_test = 100;
478 } else if (channel == chrome::VersionInfo::CHANNEL_DEV) {
479 probability_to_run_test = 10;
478 } 480 }
479 481
480 int collect_stats_group = trial->AppendGroup("enable_test", 482 int collect_stats_group = trial->AppendGroup("enable_test",
481 probability_to_run_test); 483 probability_to_run_test);
482 if (trial->group() != collect_stats_group) { 484 if (trial->group() != collect_stats_group) {
483 return; 485 return;
484 } 486 }
485 487
486 std::vector<RequestInfo> requests; 488 std::vector<RequestInfo> requests;
487 489
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 content::BrowserThread::PostTask( 531 content::BrowserThread::PostTask(
530 content::BrowserThread::IO, 532 content::BrowserThread::IO,
531 FROM_HERE, 533 FROM_HERE,
532 base::Bind(&CollectPipeliningCapabilityStatsOnIOThread, 534 base::Bind(&CollectPipeliningCapabilityStatsOnIOThread,
533 pipeline_test_server, 535 pipeline_test_server,
534 make_scoped_refptr( 536 make_scoped_refptr(
535 io_thread->system_url_request_context_getter()))); 537 io_thread->system_url_request_context_getter())));
536 } 538 }
537 539
538 } // namespace chrome_browser_net 540 } // namespace chrome_browser_net
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