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

Unified Diff: base/metrics/field_trial.cc

Issue 11783033: Fix problem where field trials using kExpirationYearInFuture could get disabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 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 | « base/metrics/field_trial.h ('k') | base/metrics/field_trial_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/field_trial.cc
===================================================================
--- base/metrics/field_trial.cc (revision 175570)
+++ base/metrics/field_trial.cc (working copy)
@@ -49,7 +49,7 @@
bool FieldTrial::enable_benchmarking_ = false;
const char FieldTrialList::kPersistentStringSeparator('/');
-int FieldTrialList::kExpirationYearInFuture = 0;
+int FieldTrialList::kNoExpirationYear = 0;
//------------------------------------------------------------------------------
// FieldTrial methods and members.
@@ -244,11 +244,10 @@
DCHECK(!used_without_global_);
global_ = this;
+ Time two_years_from_build_time = GetBuildTime() + TimeDelta::FromDays(730);
Time::Exploded exploded;
- Time two_years_from_now =
- Time::NowFromSystemTime() + TimeDelta::FromDays(730);
- two_years_from_now.LocalExplode(&exploded);
- kExpirationYearInFuture = exploded.year;
+ two_years_from_build_time.LocalExplode(&exploded);
+ kNoExpirationYear = exploded.year;
}
FieldTrialList::~FieldTrialList() {
« no previous file with comments | « base/metrics/field_trial.h ('k') | base/metrics/field_trial_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698