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

Unified Diff: client/settings.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/settings.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/settings.cc
diff --git a/client/settings.cc b/client/settings.cc
index f10421a81924296689351209aa32902f2ee920d4..ca101d2d89dc2ae17cf287381428dace2e5a8f72 100644
--- a/client/settings.cc
+++ b/client/settings.cc
@@ -57,7 +57,7 @@ bool Settings::Initialize() {
INITIALIZATION_STATE_SET_INITIALIZING(initialized_);
ScopedFileHandle handle(HANDLE_EINTR(
- open(file_path(),
+ open(file_path().value().c_str(),
O_CREAT | O_EXCL | O_WRONLY | O_EXLOCK,
0644)));
@@ -145,14 +145,15 @@ bool Settings::SetLastUploadAttemptTime(time_t time) {
}
ScopedFileHandle Settings::OpenForReading() {
- ScopedFileHandle handle(HANDLE_EINTR(open(file_path(), O_RDONLY | O_SHLOCK)));
+ ScopedFileHandle handle(HANDLE_EINTR(
+ open(file_path().value().c_str(), O_RDONLY | O_SHLOCK)));
PLOG_IF(ERROR, !handle.is_valid()) << "open for reading";
return handle.Pass();
}
ScopedFileHandle Settings::OpenForReadingAndWriting() {
ScopedFileHandle handle(HANDLE_EINTR(
- open(file_path(), O_RDWR | O_EXLOCK | O_CREAT, 0644)));
+ open(file_path().value().c_str(), O_RDWR | O_EXLOCK | O_CREAT, 0644)));
PLOG_IF(ERROR, !handle.is_valid()) << "open for writing";
return handle.Pass();
}
@@ -224,7 +225,7 @@ bool Settings::RecoverSettings(FileHandle handle, Data* out_data) {
return true;
}
- LOG(INFO) << "Recovering settings file " << file_path();
+ LOG(INFO) << "Recovering settings file " << file_path().value();
if (handle == kInvalidFileHandle) {
LOG(ERROR) << "Invalid file handle";
« no previous file with comments | « client/settings.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698