OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 CriticalSectionScoped synchronize(table_lock_); | 198 CriticalSectionScoped synchronize(table_lock_); |
199 assert(columns_.count(column_name) > 0); | 199 assert(columns_.count(column_name) > 0); |
200 if (columns_.count(column_name) == 0) | 200 if (columns_.count(column_name) == 0) |
201 return -1; | 201 return -1; |
202 return current_row_->InsertCell(column_name, value_container); | 202 return current_row_->InsertCell(column_name, value_container); |
203 } | 203 } |
204 | 204 |
205 int LogTable::CreateLogFile(const std::string& file_name) { | 205 int LogTable::CreateLogFile(const std::string& file_name) { |
206 if (file_name.length() == 0) | 206 if (file_name.length() == 0) |
207 return -1; | 207 return -1; |
208 if (file_->Open()) | 208 if (file_->is_open()) |
209 return -1; | 209 return -1; |
210 file_->OpenFile(file_name.c_str(), | 210 file_->OpenFile(file_name.c_str(), |
211 false, // Open with read/write permissions | 211 false, // Open with read/write permissions |
212 false, // Don't wraparound and write at the beginning when | 212 false, // Don't wraparound and write at the beginning when |
213 // the file is full | 213 // the file is full |
214 true); // Open as a text file | 214 true); // Open as a text file |
215 if (file_ == NULL) | 215 if (file_ == NULL) |
216 return -1; | 216 return -1; |
217 return 0; | 217 return 0; |
218 } | 218 } |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 flush_event_->Wait(WEBRTC_EVENT_INFINITE); | 425 flush_event_->Wait(WEBRTC_EVENT_INFINITE); |
426 Flush(); | 426 Flush(); |
427 } | 427 } |
428 | 428 |
429 void DataLogImpl::StopThread() { | 429 void DataLogImpl::StopThread() { |
430 flush_event_->Set(); | 430 flush_event_->Set(); |
431 file_writer_thread_->Stop(); | 431 file_writer_thread_->Stop(); |
432 } | 432 } |
433 | 433 |
434 } // namespace webrtc | 434 } // namespace webrtc |
OLD | NEW |