OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "storage/browser/fileapi/local_file_stream_reader.h" | 5 #include "storage/browser/fileapi/local_file_stream_reader.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/files/file_util_proxy.h" | 10 #include "base/files/file_util_proxy.h" |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 const base::File::Info& file_info) { | 153 const base::File::Info& file_info) { |
154 if (file_info.is_directory) { | 154 if (file_info.is_directory) { |
155 callback.Run(net::ERR_FILE_NOT_FOUND); | 155 callback.Run(net::ERR_FILE_NOT_FOUND); |
156 return; | 156 return; |
157 } | 157 } |
158 if (error != base::File::FILE_OK) { | 158 if (error != base::File::FILE_OK) { |
159 callback.Run(net::FileErrorToNetError(error)); | 159 callback.Run(net::FileErrorToNetError(error)); |
160 return; | 160 return; |
161 } | 161 } |
162 if (!VerifySnapshotTime(expected_modification_time_, file_info)) { | 162 if (!VerifySnapshotTime(expected_modification_time_, file_info)) { |
| 163 LOG(ERROR) << "Expected time " |
| 164 << expected_modification_time_.ToInternalValue() |
| 165 << ", but actual time " |
| 166 << file_info.last_modified.ToInternalValue(); |
| 167 |
163 callback.Run(net::ERR_UPLOAD_FILE_CHANGED); | 168 callback.Run(net::ERR_UPLOAD_FILE_CHANGED); |
164 return; | 169 return; |
165 } | 170 } |
166 callback.Run(file_info.size); | 171 callback.Run(file_info.size); |
167 } | 172 } |
168 | 173 |
169 } // namespace storage | 174 } // namespace storage |
OLD | NEW |