OLD | NEW |
1 // Copyright 2015 The Crashpad Authors. All rights reserved. | 1 // Copyright 2015 The Crashpad Authors. All rights reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 | 103 |
104 // FileReaderInterface: | 104 // FileReaderInterface: |
105 | 105 |
106 //! \brief Wraps LoggingOpenFileForRead(). | 106 //! \brief Wraps LoggingOpenFileForRead(). |
107 //! | 107 //! |
108 //! \return `true` if the operation succeeded, `false` if it failed, with an | 108 //! \return `true` if the operation succeeded, `false` if it failed, with an |
109 //! error message logged. | 109 //! error message logged. |
110 //! | 110 //! |
111 //! \note After a successful call, this method cannot be called again until | 111 //! \note After a successful call, this method cannot be called again until |
112 //! after Close(). | 112 //! after Close(). |
113 bool Open(const base::FilePath& path, | 113 bool Open(const base::FilePath& path); |
114 FileWriteMode write_mode, | |
115 FilePermissions permissions); | |
116 | 114 |
117 //! \brief Wraps CheckedCloseHandle(). | 115 //! \brief Wraps CheckedCloseHandle(). |
118 //! | 116 //! |
119 //! \note It is only valid to call this method on an object that has had a | 117 //! \note It is only valid to call this method on an object that has had a |
120 //! successful Open() that has not yet been matched by a subsequent call | 118 //! successful Open() that has not yet been matched by a subsequent call |
121 //! to this method. | 119 //! to this method. |
122 void Close(); | 120 void Close(); |
123 | 121 |
124 // FileReaderInterface: | 122 // FileReaderInterface: |
125 | 123 |
(...skipping 14 matching lines...) Expand all Loading... |
140 private: | 138 private: |
141 ScopedFileHandle file_; | 139 ScopedFileHandle file_; |
142 WeakFileHandleFileReader weak_file_handle_file_reader_; | 140 WeakFileHandleFileReader weak_file_handle_file_reader_; |
143 | 141 |
144 DISALLOW_COPY_AND_ASSIGN(FileReader); | 142 DISALLOW_COPY_AND_ASSIGN(FileReader); |
145 }; | 143 }; |
146 | 144 |
147 } // namespace crashpad | 145 } // namespace crashpad |
148 | 146 |
149 #endif // CRASHPAD_UTIL_FILE_FILE_READER_H_ | 147 #endif // CRASHPAD_UTIL_FILE_FILE_READER_H_ |
OLD | NEW |