diff options
author | shinyak@google.com <shinyak@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-26 18:17:03 +0000 |
---|---|---|
committer | shinyak@google.com <shinyak@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-26 18:17:03 +0000 |
commit | 5086cfc86ff0050abbf63972bd70cbc48d5e7f57 (patch) | |
tree | 98855082b195a1a0648475a57d7ba3778ff14f20 /net | |
parent | a60865a91102be0b19d826fb9d26f0bc98066ca6 (diff) | |
download | chromium_src-5086cfc86ff0050abbf63972bd70cbc48d5e7f57.zip chromium_src-5086cfc86ff0050abbf63972bd70cbc48d5e7f57.tar.gz chromium_src-5086cfc86ff0050abbf63972bd70cbc48d5e7f57.tar.bz2 |
Removed wchar_t from Time::FromString.
Also, some of the test case are moved from pr_time_unittests to time_unittests.
BUG=77962
TEST=base_unittests:TimeTest.*
Review URL: http://codereview.chromium.org/6903022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83048 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/ftp/ftp_util_unittest.cc | 2 | ||||
-rw-r--r-- | net/http/http_response_headers.cc | 5 | ||||
-rw-r--r-- | net/http/http_response_headers_unittest.cc | 8 |
3 files changed, 7 insertions, 8 deletions
diff --git a/net/ftp/ftp_util_unittest.cc b/net/ftp/ftp_util_unittest.cc index 4f26817..94c1837 100644 --- a/net/ftp/ftp_util_unittest.cc +++ b/net/ftp/ftp_util_unittest.cc @@ -106,7 +106,7 @@ TEST(FtpUtilTest, VMSPathToUnix) { TEST(FtpUtilTest, LsDateListingToTime) { base::Time mock_current_time; - ASSERT_TRUE(base::Time::FromString(L"Tue, 15 Nov 1994 12:45:26 GMT", + ASSERT_TRUE(base::Time::FromString("Tue, 15 Nov 1994 12:45:26 GMT", &mock_current_time)); const struct { diff --git a/net/http/http_response_headers.cc b/net/http/http_response_headers.cc index 5bf2beb..63596b1 100644 --- a/net/http/http_response_headers.cc +++ b/net/http/http_response_headers.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 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. @@ -1047,8 +1047,7 @@ bool HttpResponseHeaders::GetTimeValuedHeader(const std::string& name, if (!EnumerateHeader(NULL, name, &value)) return false; - std::wstring value_wide(value.begin(), value.end()); // inflate ascii - return Time::FromString(value_wide.c_str(), result); + return Time::FromString(value.c_str(), result); } bool HttpResponseHeaders::IsKeepAlive() const { diff --git a/net/http/http_response_headers_unittest.cc b/net/http/http_response_headers_unittest.cc index 7c1f134..261b18b 100644 --- a/net/http/http_response_headers_unittest.cc +++ b/net/http/http_response_headers_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 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. @@ -799,9 +799,9 @@ TEST(HttpResponseHeadersTest, RequiresValidation) { // TODO(darin): add many many more tests here }; base::Time request_time, response_time, current_time; - base::Time::FromString(L"Wed, 28 Nov 2007 00:40:09 GMT", &request_time); - base::Time::FromString(L"Wed, 28 Nov 2007 00:40:12 GMT", &response_time); - base::Time::FromString(L"Wed, 28 Nov 2007 00:45:20 GMT", ¤t_time); + base::Time::FromString("Wed, 28 Nov 2007 00:40:09 GMT", &request_time); + base::Time::FromString("Wed, 28 Nov 2007 00:40:12 GMT", &response_time); + base::Time::FromString("Wed, 28 Nov 2007 00:45:20 GMT", ¤t_time); for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) { std::string headers(tests[i].headers); |