Chromium Code Reviews| Index: base/files/file.h |
| diff --git a/base/files/file.h b/base/files/file.h |
| index 1913bc7f6c408c8e1e3840da712895ff2fd88259..c20df5c3edcde03d8c1e09a0074101721f278e3b 100644 |
| --- a/base/files/file.h |
| +++ b/base/files/file.h |
| @@ -155,6 +155,23 @@ class BASE_EXPORT File { |
| base::Time creation_time; |
| }; |
| + // Used to hold information about a region [offset + size] of a file. |
| + struct BASE_EXPORT Region { |
|
willchan no longer on Chromium
2014/07/21 23:55:40
Why is this a property of the file as opposed to t
willchan no longer on Chromium
2014/07/22 20:45:47
Can you address this comment?
Primiano Tucci (use gerrit)
2014/07/23 23:17:38
I'm on the fence on this.
On your side: yes, the r
willchan no longer on Chromium
2014/07/25 21:21:23
I think that you raise an interesting point that m
Primiano Tucci (use gerrit)
2014/07/28 12:52:11
I was looking again at this code with fresh mind,
willchan no longer on Chromium
2014/07/28 14:52:16
Hm, well this require refactoring all uses today o
|
| + static Region WholeFile(); |
| + |
| + Region(int64 offset, int64 size); |
| + ~Region(); |
| + |
| + // Whether the region intends to cover the entire file. |
|
willchan no longer on Chromium
2014/07/21 23:55:40
What's the intended behavior when a file is mapped
Primiano Tucci (use gerrit)
2014/07/23 23:17:38
I think we discussed this offline and kWholeFile s
|
| + bool IsWholeFile() const; |
| + |
| + // Start of the region (measured in bytes from the beginning of the file). |
| + int64 offset; |
| + |
| + // Length of the region. |
| + int64 size; |
| + }; |
| + |
| File(); |
| // Creates or opens the given file. This will fail with 'access denied' if the |