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

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

Issue 10970017: Merge 157744 - [net] Enable async DNS field trial on CrOS (canary+dev channels). (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1271/src/
Patch Set: Created 8 years, 3 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/async_dns_field_trial.h" 5 #include "chrome/browser/net/async_dns_field_trial.h"
6 6
7 #include "base/metrics/field_trial.h" 7 #include "base/metrics/field_trial.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "chrome/common/chrome_version_info.h" 9 #include "chrome/common/chrome_version_info.h"
10 10
11 namespace chrome_browser_net { 11 namespace chrome_browser_net {
12 12
13 bool ConfigureAsyncDnsFieldTrial() { 13 bool ConfigureAsyncDnsFieldTrial() {
14 #if defined(OS_ANDROID) || defined(OS_IOS) || defined(OS_CHROMEOS) 14 #if defined(OS_ANDROID) || defined(OS_IOS)
15 // There is no DnsConfigService on those platforms so disable the field trial. 15 // There is no DnsConfigService on those platforms so disable the field trial.
16 return false; 16 return false;
17 #endif 17 #endif
18 const base::FieldTrial::Probability kAsyncDnsDivisor = 100; 18 const base::FieldTrial::Probability kAsyncDnsDivisor = 100;
19 base::FieldTrial::Probability enabled_probability = 0; 19 base::FieldTrial::Probability enabled_probability = 0;
20 20
21 // TODO(szym): expand to DEV channel after fixing http://crbug.com/121085 21 #if defined(OS_CHROMEOS)
22 if (chrome::VersionInfo::GetChannel() <= chrome::VersionInfo::CHANNEL_CANARY) 22 if (chrome::VersionInfo::GetChannel() <= chrome::VersionInfo::CHANNEL_DEV)
23 enabled_probability = 0; 23 enabled_probability = 50;
24 #endif
24 25
25 scoped_refptr<base::FieldTrial> trial( 26 scoped_refptr<base::FieldTrial> trial(
26 base::FieldTrialList::FactoryGetFieldTrial( 27 base::FieldTrialList::FactoryGetFieldTrial(
27 "AsyncDns", kAsyncDnsDivisor, "disabled", 2012, 9, 30, NULL)); 28 "AsyncDns", kAsyncDnsDivisor, "disabled", 2012, 10, 30, NULL));
28 29
29 int enabled_group = trial->AppendGroup("enabled", enabled_probability); 30 int enabled_group = trial->AppendGroup("enabled", enabled_probability);
30 return trial->group() == enabled_group; 31 return trial->group() == enabled_group;
31 } 32 }
32 33
33 } // namespace chrome_browser_net 34 } // 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