| Index: webkit/fileapi/file_system_file_stream_reader.cc
|
| diff --git a/webkit/fileapi/file_system_file_stream_reader.cc b/webkit/fileapi/file_system_file_stream_reader.cc
|
| index 02416628d1130313dc3bca8547717037ac677f59..c1d0f15fd8951304c9ddca5027eda81d7ad1c748 100644
|
| --- a/webkit/fileapi/file_system_file_stream_reader.cc
|
| +++ b/webkit/fileapi/file_system_file_stream_reader.cc
|
| @@ -50,10 +50,12 @@ void Int64CallbackAdapter(const net::Int64CompletionCallback& callback,
|
| FileSystemFileStreamReader::FileSystemFileStreamReader(
|
| FileSystemContext* file_system_context,
|
| const FileSystemURL& url,
|
| - int64 initial_offset)
|
| + int64 initial_offset,
|
| + const base::Time& expected_modification_time)
|
| : file_system_context_(file_system_context),
|
| url_(url),
|
| initial_offset_(initial_offset),
|
| + expected_modification_time_(expected_modification_time),
|
| has_pending_create_snapshot_(false),
|
| weak_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
|
| }
|
| @@ -111,8 +113,15 @@ void FileSystemFileStreamReader::DidCreateSnapshot(
|
| DCHECK(!local_file_reader_.get());
|
| has_pending_create_snapshot_ = false;
|
|
|
| - if (file_error != base::PLATFORM_FILE_OK) {
|
| - error_callback.Run(net::PlatformFileErrorToNetError(file_error));
|
| + int net_error = net::PlatformFileErrorToNetError(file_error);
|
| +
|
| + if (!expected_modification_time_.is_null() &&
|
| + expected_modification_time_.ToTimeT() !=
|
| + file_info.last_modified.ToTimeT())
|
| + net_error = net::ERR_UPLOAD_FILE_CHANGED;
|
| +
|
| + if (net_error != net::OK) {
|
| + error_callback.Run(net_error);
|
| return;
|
| }
|
|
|
|
|