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

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

Issue 150087: Create A/B test of SDCH... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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 | « chrome/browser/browser_main.cc ('k') | chrome/browser/net/dns_master.h » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/dns_global.h" 5 #include "chrome/browser/net/dns_global.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/singleton.h" 10 #include "base/singleton.h"
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 574
575 trial_ = new FieldTrial("DnsImpact", kDivisor); 575 trial_ = new FieldTrial("DnsImpact", kDivisor);
576 576
577 // First option is to disable prefetching completely. 577 // First option is to disable prefetching completely.
578 int disabled_prefetch = trial_->AppendGroup("_disabled_prefetch", 578 int disabled_prefetch = trial_->AppendGroup("_disabled_prefetch",
579 kProbabilityPerGroup); 579 kProbabilityPerGroup);
580 // Set parallel prefetch limit to 4 instead of default 8. 580 // Set parallel prefetch limit to 4 instead of default 8.
581 int parallel_4_prefetch = trial_->AppendGroup("_parallel_4_prefetch", 581 int parallel_4_prefetch = trial_->AppendGroup("_parallel_4_prefetch",
582 kProbabilityPerGroup); 582 kProbabilityPerGroup);
583 // Set congestion detection at 500ms, rather than the 1 second default. 583 // Set congestion detection at 500ms, rather than the 1 second default.
584 int max_500ms_prefetch = trial_->AppendGroup("_max_500ms_prefetch_queue", 584 int max_500ms_prefetch = trial_->AppendGroup("_max_500ms_queue_prefetch",
585 kProbabilityPerGroup); 585 kProbabilityPerGroup);
586 // Set congestion detection at 2 seconds instead of the 1 second default. 586 // Set congestion detection at 2 seconds instead of the 1 second default.
587 int max_2s_prefetch = trial_->AppendGroup("_max_2s_prefetch_queue", 587 int max_2s_prefetch = trial_->AppendGroup("_max_2s_queue_prefetch",
588 kProbabilityPerGroup); 588 kProbabilityPerGroup);
589 589
590 trial_->AppendGroup("_default_enabled_prefetch",
591 FieldTrial::kAllRemainingProbability);
592
590 if (trial_->group() != disabled_prefetch) { 593 if (trial_->group() != disabled_prefetch) {
591 // Initialize the DNS prefetch system. 594 // Initialize the DNS prefetch system.
592 595
593 size_t max_concurrent = kMaxConcurrentLookups; 596 size_t max_concurrent = kMaxConcurrentLookups;
594 597
595 int max_queueing_delay_ms = kMaxQueueingDelayMs; 598 int max_queueing_delay_ms = kMaxQueueingDelayMs;
596 599
597 if (trial_->group() == parallel_4_prefetch) 600 if (trial_->group() == parallel_4_prefetch)
598 max_concurrent = 4; 601 max_concurrent = 4;
599 else if (trial_->group() == max_500ms_prefetch) 602 else if (trial_->group() == max_500ms_prefetch)
(...skipping 12 matching lines...) Expand all
612 } 615 }
613 } 616 }
614 617
615 DnsPrefetcherInit::~DnsPrefetcherInit() { 618 DnsPrefetcherInit::~DnsPrefetcherInit() {
616 if (dns_master) 619 if (dns_master)
617 FreeDnsPrefetchResources(); 620 FreeDnsPrefetchResources();
618 } 621 }
619 622
620 } // namespace chrome_browser_net 623 } // namespace chrome_browser_net
621 624
OLDNEW
« no previous file with comments | « chrome/browser/browser_main.cc ('k') | chrome/browser/net/dns_master.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698