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

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

Issue 6903022: Removed wchar_t from Time::FromString (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fixed the pointed problems. 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
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(ASCIIToWide(kDateTime).c_str(), 124 bool result = Time::FromString(kDateTime, &integral_build_time);
125 &integral_build_time);
126 DCHECK(result); 125 DCHECK(result);
127 return integral_build_time; 126 return integral_build_time;
128 } 127 }
129 128
130 //------------------------------------------------------------------------------ 129 //------------------------------------------------------------------------------
131 // FieldTrialList methods and members. 130 // FieldTrialList methods and members.
132 131
133 // static 132 // static
134 FieldTrialList* FieldTrialList::global_ = NULL; 133 FieldTrialList* FieldTrialList::global_ = NULL;
135 134
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 } 263 }
265 264
266 FieldTrial* FieldTrialList::PreLockedFind(const std::string& name) { 265 FieldTrial* FieldTrialList::PreLockedFind(const std::string& name) {
267 RegistrationList::iterator it = registered_.find(name); 266 RegistrationList::iterator it = registered_.find(name);
268 if (registered_.end() == it) 267 if (registered_.end() == it)
269 return NULL; 268 return NULL;
270 return it->second; 269 return it->second;
271 } 270 }
272 271
273 } // namespace base 272 } // namespace base
OLDNEW
« no previous file with comments | « base/file_util_unittest.cc ('k') | base/pr_time_unittest.cc » ('j') | base/pr_time_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698