| 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 // result of OpenForReadingAndWriting(). If the invalid handle is passed, the | 126 // result of OpenForReadingAndWriting(). If the invalid handle is passed, the |
| 127 // caller must not be holding the handle. The new settings data are stored in | 127 // caller must not be holding the handle. The new settings data are stored in |
| 128 // |out_data|. Returns true on success and false on failure, with an error | 128 // |out_data|. Returns true on success and false on failure, with an error |
| 129 // logged. | 129 // logged. |
| 130 bool RecoverSettings(FileHandle handle, Data* out_data); | 130 bool RecoverSettings(FileHandle handle, Data* out_data); |
| 131 | 131 |
| 132 // Initializes a settings file and writes the data to |handle|. Returns true | 132 // Initializes a settings file and writes the data to |handle|. Returns true |
| 133 // on success and false on failure, with an error logged. | 133 // on success and false on failure, with an error logged. |
| 134 bool InitializeSettings(FileHandle handle); | 134 bool InitializeSettings(FileHandle handle); |
| 135 | 135 |
| 136 const char* file_path() { return file_path_.value().c_str(); } | 136 const base::FilePath& file_path() const { return file_path_; } |
| 137 | 137 |
| 138 base::FilePath file_path_; | 138 base::FilePath file_path_; |
| 139 | 139 |
| 140 InitializationStateDcheck initialized_; | 140 InitializationStateDcheck initialized_; |
| 141 | 141 |
| 142 DISALLOW_COPY_AND_ASSIGN(Settings); | 142 DISALLOW_COPY_AND_ASSIGN(Settings); |
| 143 }; | 143 }; |
| 144 | 144 |
| 145 } // namespace crashpad | 145 } // namespace crashpad |
| 146 | 146 |
| 147 #endif // CRASHPAD_CLIENT_SETTINGS_H_ | 147 #endif // CRASHPAD_CLIENT_SETTINGS_H_ |
| OLD | NEW |