OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "webkit/browser/blob/file_stream_reader.h" | 5 #include "webkit/browser/blob/file_stream_reader.h" |
6 | 6 |
7 #include "base/platform_file.h" | |
8 #include "base/time/time.h" | 7 #include "base/time/time.h" |
9 | 8 |
10 namespace webkit_blob { | 9 namespace webkit_blob { |
11 | 10 |
12 // Verify if the underlying file has not been modified. | 11 // Verify if the underlying file has not been modified. |
13 bool FileStreamReader::VerifySnapshotTime( | 12 bool FileStreamReader::VerifySnapshotTime( |
14 const base::Time& expected_modification_time, | 13 const base::Time& expected_modification_time, |
15 const base::PlatformFileInfo& file_info) { | 14 const base::File::Info& file_info) { |
16 return expected_modification_time.is_null() || | 15 return expected_modification_time.is_null() || |
17 expected_modification_time.ToTimeT() == | 16 expected_modification_time.ToTimeT() == |
18 file_info.last_modified.ToTimeT(); | 17 file_info.last_modified.ToTimeT(); |
19 } | 18 } |
20 | 19 |
21 } // namespace webkit_blob | 20 } // namespace webkit_blob |
OLD | NEW |