summaryrefslogtreecommitdiffstats
path: root/webkit/blob
diff options
context:
space:
mode:
authortim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-31 23:56:06 +0000
committertim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-31 23:56:06 +0000
commit615b40c6a98d3abf076e6157ee8acf8857248618 (patch)
tree4ef9d32aae174110b2ffa6a8810a75292184cfc2 /webkit/blob
parentcb816464a7dd83ca8bf5afe7f9c5827312226ebb (diff)
downloadchromium_src-615b40c6a98d3abf076e6157ee8acf8857248618.zip
chromium_src-615b40c6a98d3abf076e6157ee8acf8857248618.tar.gz
chromium_src-615b40c6a98d3abf076e6157ee8acf8857248618.tar.bz2
Revert 58093 as an experiment to fix the Cookies test on linux.
Remove the workaround that is not needed after the fix for Time::FromDoubleT is landed. BUG=none TEST=none Review URL: http://codereview.chromium.org/3270016 TBR=jianli@chromium.org Review URL: http://codereview.chromium.org/3287010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58102 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/blob')
-rw-r--r--webkit/blob/blob_data.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/webkit/blob/blob_data.cc b/webkit/blob/blob_data.cc
index 838014b..4afcf8a 100644
--- a/webkit/blob/blob_data.cc
+++ b/webkit/blob/blob_data.cc
@@ -15,6 +15,16 @@ using WebKit::WebBlobData;
using WebKit::WebData;
using WebKit::WebString;
+namespace {
+
+// Time::FromDoubleT() does not return empty Time object when dt is 0.
+// We have to work around this problem here.
+base::Time DoubleTToTime(double dt) {
+ return dt ? base::Time::FromDoubleT(dt) : base::Time();
+}
+
+}
+
namespace webkit_blob {
BlobData::BlobData(const WebBlobData& data) {
@@ -34,7 +44,7 @@ BlobData::BlobData(const WebBlobData& data) {
webkit_glue::WebStringToFilePath(item.filePath),
static_cast<uint64>(item.offset),
static_cast<uint64>(item.length),
- base::Time::FromDoubleT(item.expectedModificationTime));
+ DoubleTToTime(item.expectedModificationTime));
break;
case WebBlobData::Item::TypeBlob:
if (item.length) {