summaryrefslogtreecommitdiffstats
path: root/webkit/fileapi/file_system_file_stream_reader.cc
diff options
context:
space:
mode:
authorhashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-15 13:28:06 +0000
committerhashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-15 13:28:06 +0000
commita10578310f22a457c56b761f6f420cdee20d6688 (patch)
tree85369385458b2ead7d1c1cac25ea9ce376c50625 /webkit/fileapi/file_system_file_stream_reader.cc
parent3704abce04bb84f24dbb2b8a2c25b28f0f3c2357 (diff)
downloadchromium_src-a10578310f22a457c56b761f6f420cdee20d6688.zip
chromium_src-a10578310f22a457c56b761f6f420cdee20d6688.tar.gz
chromium_src-a10578310f22a457c56b761f6f420cdee20d6688.tar.bz2
fileapi: Add modification time check for FileSystemFileStreamReader
The check is added since BlobData has expected_modification_time field. Add tests (mostly copied from LocalFileStreamReaderTest). BUG=141835 TEST=content_unittests --gtest_filter="FileSystemFileStreamReaderTest.*" TBR=jam@chromium.org Review URL: https://chromiumcodereview.appspot.com/11098067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161853 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/fileapi/file_system_file_stream_reader.cc')
-rw-r--r--webkit/fileapi/file_system_file_stream_reader.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/webkit/fileapi/file_system_file_stream_reader.cc b/webkit/fileapi/file_system_file_stream_reader.cc
index 0241662..ff61abc 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)) {
}
@@ -122,7 +124,7 @@ void FileSystemFileStreamReader::DidCreateSnapshot(
local_file_reader_.reset(
new LocalFileStreamReader(
file_system_context_->task_runners()->file_task_runner(),
- platform_path, initial_offset_, base::Time()));
+ platform_path, initial_offset_, expected_modification_time_));
callback.Run();
}