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

Side by Side Diff: base/field_trial.cc

Issue 7995: Move Time, TimeDelta and TimeTicks into namespace base. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 1 month 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
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 5
6 #include "base/field_trial.h" 6 #include "base/field_trial.h"
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/rand_util.h" 8 #include "base/rand_util.h"
9 9
10 using base::Time;
11
10 //------------------------------------------------------------------------------ 12 //------------------------------------------------------------------------------
11 // FieldTrialList methods and members. 13 // FieldTrialList methods and members.
12 14
13 // static 15 // static
14 FieldTrialList* FieldTrialList::global_ = NULL; 16 FieldTrialList* FieldTrialList::global_ = NULL;
15 17
16 // static 18 // static
17 int FieldTrialList::constructor_count_ = 0; 19 int FieldTrialList::constructor_count_ = 0;
18 20
19 FieldTrialList::FieldTrialList() 21 FieldTrialList::FieldTrialList()
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 //------------------------------------------------------------------------------ 55 //------------------------------------------------------------------------------
54 // FieldTrial methods and members. 56 // FieldTrial methods and members.
55 57
56 FieldTrial::FieldTrial(const std::wstring& name, double probability) 58 FieldTrial::FieldTrial(const std::wstring& name, double probability)
57 : name_(name) { 59 : name_(name) {
58 double rand = base::RandDouble(); 60 double rand = base::RandDouble();
59 DCHECK(rand >= 0.0 && rand < 1.0); 61 DCHECK(rand >= 0.0 && rand < 1.0);
60 boolean_value_ = rand < probability; 62 boolean_value_ = rand < probability;
61 FieldTrialList::Register(this); 63 FieldTrialList::Register(this);
62 } 64 }
OLDNEW
« no previous file with comments | « base/field_trial.h ('k') | base/histogram.h » ('j') | base/time_format.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698