Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Side by Side Diff: client/settings.h

Issue 987383002: Return a FilePath from Settings::file_path() (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Rebase Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « client/crash_report_database_test.cc ('k') | client/settings.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « client/crash_report_database_test.cc ('k') | client/settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698