Chromium Code Reviews| Index: base/time.cc |
| diff --git a/base/time.cc b/base/time.cc |
| index 766f599fc05f1299e340d0ca73e62fcfa471e711..94b560a6df65d5d02be712f9d29124ae68f5034a 100644 |
| --- a/base/time.cc |
| +++ b/base/time.cc |
| @@ -1,4 +1,4 @@ |
| -// Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| @@ -98,19 +98,22 @@ Time Time::LocalMidnight() const { |
| } |
| // static |
| -bool Time::FromString(const wchar_t* time_string, Time* parsed_time) { |
| +bool Time::FromString(const char* time_string, Time* parsed_time) { |
| DCHECK((time_string != NULL) && (parsed_time != NULL)); |
| - std::string ascii_time_string = SysWideToUTF8(time_string); |
| - if (ascii_time_string.length() == 0) |
| + |
| + if (time_string[0] == '\0') |
| return false; |
| + |
| PRTime result_time = 0; |
| - PRStatus result = PR_ParseTimeString(ascii_time_string.c_str(), PR_FALSE, |
| + PRStatus result = PR_ParseTimeString(time_string, PR_FALSE, |
| &result_time); |
| if (PR_SUCCESS != result) |
| return false; |
| + |
| result_time += kTimeTToMicrosecondsOffset; |
| *parsed_time = Time(result_time); |
| return true; |
| + |
|
wtc
2011/07/08 22:49:15
Remove this blank line.
shinyak (Google)
2011/07/13 14:34:46
Done.
|
| } |
| // Time::Exploded ------------------------------------------------------------- |