OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/metrics/field_trial.h" | 5 #include "base/metrics/field_trial.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/rand_util.h" | 8 #include "base/rand_util.h" |
9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 DCHECK_EQ(0u, FieldTrialList::GetFieldTrialCount()); | 114 DCHECK_EQ(0u, FieldTrialList::GetFieldTrialCount()); |
115 enable_benchmarking_ = true; | 115 enable_benchmarking_ = true; |
116 } | 116 } |
117 | 117 |
118 FieldTrial::~FieldTrial() {} | 118 FieldTrial::~FieldTrial() {} |
119 | 119 |
120 // static | 120 // static |
121 Time FieldTrial::GetBuildTime() { | 121 Time FieldTrial::GetBuildTime() { |
122 Time integral_build_time; | 122 Time integral_build_time; |
123 const char* kDateTime = __DATE__ " " __TIME__; | 123 const char* kDateTime = __DATE__ " " __TIME__; |
124 bool result = Time::FromString(kDateTime, &integral_build_time); | 124 bool result = Time::FromString(ASCIIToWide(kDateTime).c_str(), |
| 125 &integral_build_time); |
125 DCHECK(result); | 126 DCHECK(result); |
126 return integral_build_time; | 127 return integral_build_time; |
127 } | 128 } |
128 | 129 |
129 //------------------------------------------------------------------------------ | 130 //------------------------------------------------------------------------------ |
130 // FieldTrialList methods and members. | 131 // FieldTrialList methods and members. |
131 | 132 |
132 // static | 133 // static |
133 FieldTrialList* FieldTrialList::global_ = NULL; | 134 FieldTrialList* FieldTrialList::global_ = NULL; |
134 | 135 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 } | 264 } |
264 | 265 |
265 FieldTrial* FieldTrialList::PreLockedFind(const std::string& name) { | 266 FieldTrial* FieldTrialList::PreLockedFind(const std::string& name) { |
266 RegistrationList::iterator it = registered_.find(name); | 267 RegistrationList::iterator it = registered_.find(name); |
267 if (registered_.end() == it) | 268 if (registered_.end() == it) |
268 return NULL; | 269 return NULL; |
269 return it->second; | 270 return it->second; |
270 } | 271 } |
271 | 272 |
272 } // namespace base | 273 } // namespace base |
OLD | NEW |