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

Unified Diff: chrome/common/time_format.h

Issue 3165009: Convert TimeFormat (chrome/common/time_format.*) to string16 (from wstring). (Closed)
Patch Set: bar Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/sync/profile_sync_service.cc ('k') | chrome/common/time_format.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/time_format.h
diff --git a/chrome/common/time_format.h b/chrome/common/time_format.h
index 6045cef427d1047776ac0acf70e97ea61e60ec29..86c80b2867713e285b0cc89735b3dfea62132f63 100644
--- a/chrome/common/time_format.h
+++ b/chrome/common/time_format.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -8,7 +8,7 @@
// This file defines methods to format time values as strings.
-#include <string>
+#include "base/string16.h"
#include "unicode/smpdtfmt.h"
@@ -25,13 +25,13 @@ class TimeFormat {
// in-progress operations and users have different expectations of units.
// Returns times in elapsed-format: "3 mins ago", "2 days ago".
- static std::wstring TimeElapsed(const base::TimeDelta& delta);
+ static string16 TimeElapsed(const base::TimeDelta& delta);
// Returns times in remaining-format: "3 mins left", "2 days left".
- static std::wstring TimeRemaining(const base::TimeDelta& delta);
+ static string16 TimeRemaining(const base::TimeDelta& delta);
// Returns times in short-format: "3 mins", "2 days".
- static std::wstring TimeRemainingShort(const base::TimeDelta& delta);
+ static string16 TimeRemainingShort(const base::TimeDelta& delta);
// For displaying a relative time in the past. This method returns either
// "Today", "Yesterday", or an empty string if it's older than that.
@@ -46,8 +46,8 @@ class TimeFormat {
// If NULL, the current day's midnight will be retrieved, which can be
// slow. If many items are being processed, it is best to get the current
// time once at the beginning and pass it for each computation.
- static std::wstring RelativeDate(const base::Time& time,
- const base::Time* optional_midnight_today);
+ static string16 RelativeDate(const base::Time& time,
+ const base::Time* optional_midnight_today);
};
#endif // CHROME_COMMON_TIME_FORMAT_H__
« no previous file with comments | « chrome/browser/sync/profile_sync_service.cc ('k') | chrome/common/time_format.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698