Chromium Code Reviews| 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 #ifndef WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_CONTEXT_H_ | 5 #ifndef WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_CONTEXT_H_ |
| 6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_CONTEXT_H_ | 6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_CONTEXT_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 239 // Creates new FileStreamReader instance to read a file pointed by the given | 239 // Creates new FileStreamReader instance to read a file pointed by the given |
| 240 // filesystem URL |url| starting from |offset|. |expected_modification_time| | 240 // filesystem URL |url| starting from |offset|. |expected_modification_time| |
| 241 // specifies the expected last modification if the value is non-null, the | 241 // specifies the expected last modification if the value is non-null, the |
| 242 // reader will check the underlying file's actual modification time to see if | 242 // reader will check the underlying file's actual modification time to see if |
| 243 // the file has been modified, and if it does any succeeding read operations | 243 // the file has been modified, and if it does any succeeding read operations |
| 244 // should fail with ERR_UPLOAD_FILE_CHANGED error. | 244 // should fail with ERR_UPLOAD_FILE_CHANGED error. |
| 245 // This method internally cracks the |url|, get an appropriate | 245 // This method internally cracks the |url|, get an appropriate |
| 246 // FileSystemBackend for the URL and call the backend's CreateFileReader. | 246 // FileSystemBackend for the URL and call the backend's CreateFileReader. |
| 247 // The resolved FileSystemBackend could perform further specialization | 247 // The resolved FileSystemBackend could perform further specialization |
| 248 // depending on the filesystem type pointed by the |url|. | 248 // depending on the filesystem type pointed by the |url|. |
| 249 // The |length| argument says how many bytes are going to be read using the | |
| 250 // instance of the file stream reader. If unknown, then equal to -1. | |
|
hashimoto
2014/08/22 06:53:42
Why don't you use kuint64max (or kint64max) to be
mtomasz
2014/08/25 03:32:31
Seems that kuint64max and kint64max are deprecated
hashimoto
2014/09/01 11:01:01
I'm asking about consistency with the existing cod
| |
| 249 scoped_ptr<webkit_blob::FileStreamReader> CreateFileStreamReader( | 251 scoped_ptr<webkit_blob::FileStreamReader> CreateFileStreamReader( |
| 250 const FileSystemURL& url, | 252 const FileSystemURL& url, |
| 251 int64 offset, | 253 int64 offset, |
| 254 int64 length, | |
| 252 const base::Time& expected_modification_time); | 255 const base::Time& expected_modification_time); |
| 253 | 256 |
| 254 // Creates new FileStreamWriter instance to write into a file pointed by | 257 // Creates new FileStreamWriter instance to write into a file pointed by |
| 255 // |url| from |offset|. | 258 // |url| from |offset|. |
| 256 scoped_ptr<FileStreamWriter> CreateFileStreamWriter( | 259 scoped_ptr<FileStreamWriter> CreateFileStreamWriter( |
| 257 const FileSystemURL& url, | 260 const FileSystemURL& url, |
| 258 int64 offset); | 261 int64 offset); |
| 259 | 262 |
| 260 // Creates a new FileSystemOperationRunner. | 263 // Creates a new FileSystemOperationRunner. |
| 261 scoped_ptr<FileSystemOperationRunner> CreateFileSystemOperationRunner(); | 264 scoped_ptr<FileSystemOperationRunner> CreateFileSystemOperationRunner(); |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 413 | 416 |
| 414 struct DefaultContextDeleter { | 417 struct DefaultContextDeleter { |
| 415 static void Destruct(const FileSystemContext* context) { | 418 static void Destruct(const FileSystemContext* context) { |
| 416 context->DeleteOnCorrectThread(); | 419 context->DeleteOnCorrectThread(); |
| 417 } | 420 } |
| 418 }; | 421 }; |
| 419 | 422 |
| 420 } // namespace fileapi | 423 } // namespace fileapi |
| 421 | 424 |
| 422 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_CONTEXT_H_ | 425 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_CONTEXT_H_ |
| OLD | NEW |