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

Unified Diff: base/value_conversions.cc

Issue 10545104: Refactor chrome.alarms interface to support absolute alarm deadlines. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with r141780 Created 8 years, 6 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 | « base/value_conversions.h ('k') | chrome/browser/extensions/api/alarms/alarm_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/value_conversions.cc
diff --git a/base/value_conversions.cc b/base/value_conversions.cc
index caf9d724ef94d159ed03257422b8daf7ff2a38b9..6bde1aee2218ae9842712ea00f7d1f90985a9f8c 100644
--- a/base/value_conversions.cc
+++ b/base/value_conversions.cc
@@ -28,18 +28,18 @@ bool GetValueAsFilePath(const Value& value, FilePath* file_path) {
// |Value| does not support 64-bit integers, and doubles do not have enough
// precision, so we store the 64-bit time value as a string instead.
-StringValue* CreateTimeValue(const Time& time) {
+StringValue* CreateTimeDeltaValue(const TimeDelta& time) {
std::string string_value = base::Int64ToString(time.ToInternalValue());
return new StringValue(string_value);
}
-bool GetValueAsTime(const Value& value, Time* time) {
+bool GetValueAsTimeDelta(const Value& value, TimeDelta* time) {
std::string str;
int64 int_value;
if (!value.GetAsString(&str) || !base::StringToInt64(str, &int_value))
return false;
if (time)
- *time = base::Time::FromInternalValue(int_value);
+ *time = TimeDelta::FromInternalValue(int_value);
return true;
}
« no previous file with comments | « base/value_conversions.h ('k') | chrome/browser/extensions/api/alarms/alarm_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698