Revert of [net] Subtract timestamps to determine if uploading file changed. (patchset...
commit7ccf4fab5d4473e431f1a289056033eea0b3dd43
authornoel <noel@chromium.org>
Wed, 4 Feb 2015 00:48:13 +0000 (3 16:48 -0800)
committerCommit bot <commit-bot@chromium.org>
Wed, 4 Feb 2015 00:49:35 +0000 (4 00:49 +0000)
tree96d70f3a94ec0fa71ad11729bf1d351d6bc2ba5a
parent057ee7637c0a8fc7a9f00fd0cea7466385f89f4a
Revert of [net] Subtract timestamps to determine if uploading file changed. (patchset #2 id:20001 of https://codereview.chromium.org/868253012/)

Reason for revert:
Seems this made http/tests/local/fileapi/send-sliced-dragged-file.html
fail the blink bots.

http://test-results.appspot.com/dashboards/flakiness_dashboard.html#master=ChromiumWebkit&tests=http/tests/local/fileapi/send-sliced-dragged-file.html

Original issue's description:
> [net] Subtract timestamps to determine if uploading file changed.
>
> UploadFileElementReader relies on checking the modified time of files
> being uploaded to determine if a sliced file was modified during upload.
> Clients of the net stack (in particular Blink) currently pass around the
> expected modified time in a manner which cause the timestamp to lose
> precision (E.g. converting to and from a double time_t).
>
> As a result the expected timestamp and the current timestamp as returned
> by GetFileInfo() will not match exactly. Current code attempted to
> compensate for this by converting both timestamps to (integer) time_t.
> However, since the conversion rounds down, this check would only succeed
> if the loss of precision of the expected timestamp also caused it to
> round down. This is not always the case. (E.g. (epoch + 10.999999) will
> become 10 when converted to time_t, but the expected timestamp may have
> rounded up to (epoch + 11.0) in the meantime.)
>
> This patch compares the timestamps by checking if the magnitude of the
> difference is less than one second.
>
> BUG=426465
> R=mmenke
>
> Committed: https://crrev.com/b77c8ffae588001875fb50ead987a147ca882bdb
> Cr-Commit-Position: refs/heads/master@{#314397}

TBR=mmenke@chromium.org,asanka@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=426465

Review URL: https://codereview.chromium.org/893323003

Cr-Commit-Position: refs/heads/master@{#314451}
net/base/upload_file_element_reader.cc
net/base/upload_file_element_reader_unittest.cc