OLD | NEW |
1 // Copyright 2014 The Crashpad Authors. All rights reserved. | 1 // Copyright 2014 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 | 84 |
85 //! \brief Wraps LoggingOpenFileForWrite(). | 85 //! \brief Wraps LoggingOpenFileForWrite(). |
86 //! | 86 //! |
87 //! \return `true` if the operation succeeded, `false` if it failed, with an | 87 //! \return `true` if the operation succeeded, `false` if it failed, with an |
88 //! error message logged. | 88 //! error message logged. |
89 //! | 89 //! |
90 //! \note After a successful call, this method cannot be called again until | 90 //! \note After a successful call, this method cannot be called again until |
91 //! after Close(). | 91 //! after Close(). |
92 bool Open(const base::FilePath& path, | 92 bool Open(const base::FilePath& path, |
93 FileWriteMode write_mode, | 93 FileWriteMode write_mode, |
94 bool world_readable); | 94 FilePermissions permissions); |
95 | 95 |
96 //! \brief Wraps CheckedCloseHandle(). | 96 //! \brief Wraps CheckedCloseHandle(). |
97 //! | 97 //! |
98 //! \note It is only valid to call this method on an object that has had a | 98 //! \note It is only valid to call this method on an object that has had a |
99 //! successful Open() that has not yet been matched by a subsequent call | 99 //! successful Open() that has not yet been matched by a subsequent call |
100 //! to this method. | 100 //! to this method. |
101 void Close(); | 101 void Close(); |
102 | 102 |
103 // FileWriterInterface: | 103 // FileWriterInterface: |
104 | 104 |
(...skipping 17 matching lines...) Expand all Loading... |
122 | 122 |
123 private: | 123 private: |
124 ScopedFileHandle file_; | 124 ScopedFileHandle file_; |
125 | 125 |
126 DISALLOW_COPY_AND_ASSIGN(FileWriter); | 126 DISALLOW_COPY_AND_ASSIGN(FileWriter); |
127 }; | 127 }; |
128 | 128 |
129 } // namespace crashpad | 129 } // namespace crashpad |
130 | 130 |
131 #endif // CRASHPAD_UTIL_FILE_FILE_WRITER_H_ | 131 #endif // CRASHPAD_UTIL_FILE_FILE_WRITER_H_ |
OLD | NEW |