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

Side by Side Diff: base/metrics/field_trial.cc

Issue 6893031: Revert r83048 "Removed wchar_t from Time::FromString." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 8 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 | « base/file_util_unittest.cc ('k') | base/pr_time_unittest.cc » ('j') | 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) 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
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
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
OLDNEW
« no previous file with comments | « base/file_util_unittest.cc ('k') | base/pr_time_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698