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

Unified Diff: webrtc/system_wrappers/source/data_log.cc

Issue 2054373002: FileWrapper[Impl] modifications and actually remove the "Impl" class. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix use of ASSERT instead of ASSERT_TRUE in test Created 4 years, 6 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 | « webrtc/system_wrappers/include/trace.h ('k') | webrtc/system_wrappers/source/file_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/system_wrappers/source/data_log.cc
diff --git a/webrtc/system_wrappers/source/data_log.cc b/webrtc/system_wrappers/source/data_log.cc
index 778769603bc745be138c90179939e47c76718e27..6d140a7d1c8b5743a5a90d94e07bdc8faf877e5a 100644
--- a/webrtc/system_wrappers/source/data_log.cc
+++ b/webrtc/system_wrappers/source/data_log.cc
@@ -205,16 +205,10 @@ int LogTable::InsertCell(const std::string& column_name,
int LogTable::CreateLogFile(const std::string& file_name) {
if (file_name.length() == 0)
return -1;
- if (file_->Open())
+ if (file_->is_open())
return -1;
- file_->OpenFile(file_name.c_str(),
- false, // Open with read/write permissions
- false, // Don't wraparound and write at the beginning when
- // the file is full
- true); // Open as a text file
- if (file_ == NULL)
- return -1;
- return 0;
+ // Open with read/write permissions
+ return file_->OpenFile(file_name.c_str(), false) ? 0 : -1;
}
void LogTable::Flush() {
« no previous file with comments | « webrtc/system_wrappers/include/trace.h ('k') | webrtc/system_wrappers/source/file_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698