| OLD | NEW | 
|    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 587 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  598   ProtoString dump_buffer; |  598   ProtoString dump_buffer; | 
|  599   while ((bytes_read = dump_file->Read(tmp_buffer, sizeof(tmp_buffer))) > 0) { |  599   while ((bytes_read = dump_file->Read(tmp_buffer, sizeof(tmp_buffer))) > 0) { | 
|  600     dump_buffer.append(tmp_buffer, bytes_read); |  600     dump_buffer.append(tmp_buffer, bytes_read); | 
|  601   } |  601   } | 
|  602   dump_file->CloseFile(); |  602   dump_file->CloseFile(); | 
|  603   return result->ParseFromString(dump_buffer); |  603   return result->ParseFromString(dump_buffer); | 
|  604 } |  604 } | 
|  605  |  605  | 
|  606 #endif  // ENABLE_RTC_EVENT_LOG |  606 #endif  // ENABLE_RTC_EVENT_LOG | 
|  607  |  607  | 
|  608 bool RtcEventLogNullImpl::StartLogging(rtc::PlatformFile platform_file, |  | 
|  609                                        int64_t max_size_bytes) { |  | 
|  610   // The platform_file is open and needs to be closed. |  | 
|  611   if (!rtc::ClosePlatformFile(platform_file)) { |  | 
|  612     LOG(LS_ERROR) << "Can't close file."; |  | 
|  613   } |  | 
|  614   return false; |  | 
|  615 } |  | 
|  616  |  | 
|  617 // RtcEventLog member functions. |  608 // RtcEventLog member functions. | 
|  618 std::unique_ptr<RtcEventLog> RtcEventLog::Create() { |  609 std::unique_ptr<RtcEventLog> RtcEventLog::Create() { | 
|  619 #ifdef ENABLE_RTC_EVENT_LOG |  610 #ifdef ENABLE_RTC_EVENT_LOG | 
|  620   return std::unique_ptr<RtcEventLog>(new RtcEventLogImpl()); |  611   return std::unique_ptr<RtcEventLog>(new RtcEventLogImpl()); | 
|  621 #else |  612 #else | 
|  622   return std::unique_ptr<RtcEventLog>(new RtcEventLogNullImpl()); |  613   return std::unique_ptr<RtcEventLog>(new RtcEventLogNullImpl()); | 
|  623 #endif  // ENABLE_RTC_EVENT_LOG |  614 #endif  // ENABLE_RTC_EVENT_LOG | 
|  624 } |  615 } | 
|  625  |  616  | 
|  626 std::unique_ptr<RtcEventLog> RtcEventLog::CreateNull() { |  617 std::unique_ptr<RtcEventLog> RtcEventLog::CreateNull() { | 
|  627   return std::unique_ptr<RtcEventLog>(new RtcEventLogNullImpl()); |  618   return std::unique_ptr<RtcEventLog>(new RtcEventLogNullImpl()); | 
|  628 } |  619 } | 
|  629  |  620  | 
|  630 }  // namespace webrtc |  621 }  // namespace webrtc | 
| OLD | NEW |