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

Side by Side Diff: webrtc/call/rtc_event_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 compile error in func_test_manager.cc 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 unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/call/rtc_event_log_helper_thread.cc » ('j') | webrtc/common_types.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 FILE* file_handle = rtc::FdopenPlatformFileForWriting(platform_file); 215 FILE* file_handle = rtc::FdopenPlatformFileForWriting(platform_file);
216 if (!file_handle) { 216 if (!file_handle) {
217 LOG(LS_ERROR) << "Can't open file. WebRTC event log not started."; 217 LOG(LS_ERROR) << "Can't open file. WebRTC event log not started.";
218 // Even though we failed to open a FILE*, the platform_file is still open 218 // Even though we failed to open a FILE*, the platform_file is still open
219 // and needs to be closed. 219 // and needs to be closed.
220 if (!rtc::ClosePlatformFile(platform_file)) { 220 if (!rtc::ClosePlatformFile(platform_file)) {
221 LOG(LS_ERROR) << "Can't close file."; 221 LOG(LS_ERROR) << "Can't close file.";
222 } 222 }
223 return false; 223 return false;
224 } 224 }
225 if (message.file->OpenFromFileHandle(file_handle, true, false) != 0) { 225 if (message.file->OpenFromFileHandle(file_handle) != 0) {
226 LOG(LS_ERROR) << "Can't open file. WebRTC event log not started."; 226 LOG(LS_ERROR) << "Can't open file. WebRTC event log not started.";
227 return false; 227 return false;
228 } 228 }
229 if (!message_queue_.Insert(&message)) { 229 if (!message_queue_.Insert(&message)) {
230 LOG(LS_ERROR) << "Message queue full. Can't start logging."; 230 LOG(LS_ERROR) << "Message queue full. Can't start logging.";
231 return false; 231 return false;
232 } 232 }
233 helper_thread_.SignalNewEvent(); 233 helper_thread_.SignalNewEvent();
234 LOG(LS_INFO) << "Starting WebRTC event log."; 234 LOG(LS_INFO) << "Starting WebRTC event log.";
235 return true; 235 return true;
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 // RtcEventLog member functions. 459 // RtcEventLog member functions.
460 std::unique_ptr<RtcEventLog> RtcEventLog::Create(const Clock* clock) { 460 std::unique_ptr<RtcEventLog> RtcEventLog::Create(const Clock* clock) {
461 #ifdef ENABLE_RTC_EVENT_LOG 461 #ifdef ENABLE_RTC_EVENT_LOG
462 return std::unique_ptr<RtcEventLog>(new RtcEventLogImpl(clock)); 462 return std::unique_ptr<RtcEventLog>(new RtcEventLogImpl(clock));
463 #else 463 #else
464 return std::unique_ptr<RtcEventLog>(new RtcEventLogNullImpl()); 464 return std::unique_ptr<RtcEventLog>(new RtcEventLogNullImpl());
465 #endif // ENABLE_RTC_EVENT_LOG 465 #endif // ENABLE_RTC_EVENT_LOG
466 } 466 }
467 467
468 } // namespace webrtc 468 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/call/rtc_event_log_helper_thread.cc » ('j') | webrtc/common_types.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698