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

Unified Diff: chrome/browser/browser_main.cc

Issue 147215: Refactor DNS A/B experient, and add test of congestion time limits... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/net/dns_global.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_main.cc
===================================================================
--- chrome/browser/browser_main.cc (revision 19463)
+++ chrome/browser/browser_main.cc (working copy)
@@ -635,54 +635,9 @@
net::EnsureWinsockInit();
#endif // defined(OS_WIN)
- // Set up a field trial to see what disabling DNS pre-resolution does to
- // latency of network transactions.
- FieldTrial::Probability kDIVISOR = 100;
- FieldTrial::Probability k_PROBABILITY_PER_GROUP = 10; // 10% probability.
- // For options we don't (currently) wish to test, we use zero probability.
- FieldTrial::Probability k_PROBABILITY_DISABLED = 0;
- scoped_refptr<FieldTrial> dns_trial = new FieldTrial("DnsImpact", kDIVISOR);
+ // Initialize and maintain DNS prefetcher module.
+ chrome_browser_net::DnsPrefetcherInit dns_prefetch(user_prefs, local_state);
- // First option is to disable prefetching completele.
- dns_trial->AppendGroup("_disabled_prefetch", k_PROBABILITY_PER_GROUP);
- // Second option is to set parallel prefetch limit to 4 instead of default 8.
- int parallel_4_prefetch = dns_trial->AppendGroup("_parallel_4_prefetch",
- k_PROBABILITY_PER_GROUP);
-
- // Don't discard names (erase these lines) yet, as we may use them, and we
- // have histogram data named for these options.
-
- // Next two options relate to the number of parallel http connections that can
- // be made to a single host. The default is currently 6, and we wanted to see
- // what would happen when we restricted this to 4. (Historically the limit
- // was a mere 2, but several browsers including Chromium increased it to 6
- // recently).
- int disabled_plus_4_connections = dns_trial->AppendGroup(
- "_disabled_prefetch_4_connections", k_PROBABILITY_DISABLED);
- int enabled_plus_4_connections = dns_trial->AppendGroup(
- "_enabled_prefetch_4_connections", k_PROBABILITY_DISABLED);
-
- scoped_ptr<chrome_browser_net::DnsPrefetcherInit> dns_prefetch_init;
- if (dns_trial->group() == FieldTrial::kNotParticipating ||
- dns_trial->group() == enabled_plus_4_connections ||
- dns_trial->group() == parallel_4_prefetch) {
- // Initialize the DNS prefetch system
- if (dns_trial->group() == parallel_4_prefetch)
- dns_prefetch_init.reset(new chrome_browser_net::DnsPrefetcherInit(
- 4, user_prefs));
- else
- dns_prefetch_init.reset(new chrome_browser_net::DnsPrefetcherInit(
- chrome_browser_net::DnsPrefetcherInit::kMaxConcurrentLookups,
- user_prefs));
- chrome_browser_net::DnsPrefetchHostNamesAtStartup(user_prefs, local_state);
- chrome_browser_net::RestoreSubresourceReferrers(local_state);
- }
-
- if (dns_trial->group() == disabled_plus_4_connections ||
- dns_trial->group() == enabled_plus_4_connections) {
- net::HttpNetworkSession::set_max_sockets_per_group(4);
- }
-
scoped_refptr<FieldTrial> http_prioritization_trial =
new FieldTrial("HttpPrioritization", 100);
// Put 10% of people in the fallback experiment with the http prioritization
« no previous file with comments | « no previous file | chrome/browser/net/dns_global.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698