| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/files/file.h" | 5 #include "base/files/file.h" |
| 6 #include "base/files/file_path.h" | 6 #include "base/files/file_path.h" |
| 7 | 7 |
| 8 namespace base { | 8 namespace base { |
| 9 | 9 |
| 10 File::Info::Info() | 10 File::Info::Info() |
| 11 : size(0), | 11 : size(0), |
| 12 is_directory(false), | 12 is_directory(false), |
| 13 is_symbolic_link(false) { | 13 is_symbolic_link(false) { |
| 14 } | 14 } |
| 15 | 15 |
| 16 File::Info::~Info() { | 16 File::Info::~Info() { |
| 17 } | 17 } |
| 18 | 18 |
| 19 File::Region::Region(int64 offset, int64 size) : offset(offset), size(size) { |
| 20 DCHECK_GE(offset, 0); |
| 21 } |
| 22 |
| 23 File::Region::Region(File& file) : offset(0), size(file.GetLength()) { |
| 24 DCHECK_GE(size, 0); |
| 25 } |
| 26 |
| 27 File::Region::~Region() { |
| 28 } |
| 29 |
| 19 File::File() | 30 File::File() |
| 20 : error_details_(FILE_ERROR_FAILED), | 31 : error_details_(FILE_ERROR_FAILED), |
| 21 created_(false), | 32 created_(false), |
| 22 async_(false) { | 33 async_(false) { |
| 23 } | 34 } |
| 24 | 35 |
| 25 #if !defined(OS_NACL) | 36 #if !defined(OS_NACL) |
| 26 File::File(const FilePath& name, uint32 flags) | 37 File::File(const FilePath& name, uint32 flags) |
| 27 : error_details_(FILE_OK), | 38 : error_details_(FILE_OK), |
| 28 created_(false), | 39 created_(false), |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 return "FILE_ERROR_IO"; | 129 return "FILE_ERROR_IO"; |
| 119 case FILE_ERROR_MAX: | 130 case FILE_ERROR_MAX: |
| 120 break; | 131 break; |
| 121 } | 132 } |
| 122 | 133 |
| 123 NOTREACHED(); | 134 NOTREACHED(); |
| 124 return ""; | 135 return ""; |
| 125 } | 136 } |
| 126 | 137 |
| 127 } // namespace base | 138 } // namespace base |
| OLD | NEW |