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

Unified Diff: webrtc/video/rtc_event_log.cc

Issue 1295753003: Convenience functions to convert RtcEvents to webrtc types. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 4 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
Index: webrtc/video/rtc_event_log.cc
diff --git a/webrtc/video/rtc_event_log.cc b/webrtc/video/rtc_event_log.cc
index 476ee2afd79c82b9be6b41feb7424939842d942b..eef00b7563fc26ff4fcee3b17da5d19ba3ab45f4 100644
--- a/webrtc/video/rtc_event_log.cc
+++ b/webrtc/video/rtc_event_log.cc
@@ -10,6 +10,7 @@
#include "webrtc/video/rtc_event_log.h"
+#include <cstring>
hlundin-webrtc 2015/08/18 09:22:59 string.h We tend to use the C header file for C l
terelius 2015/08/18 16:06:50 It should actually be <string>. The C string libra
#include <deque>
#include "webrtc/base/checks.h"
@@ -381,21 +382,6 @@ void RtcEventLogImpl::AddRecentEvent(const rtclog::Event& event) {
}
}
-bool RtcEventLog::ParseRtcEventLog(const std::string& file_name,
- rtclog::EventStream* result) {
- char tmp_buffer[1024];
- int bytes_read = 0;
- rtc::scoped_ptr<FileWrapper> dump_file(FileWrapper::Create());
- if (dump_file->OpenFile(file_name.c_str(), true) != 0) {
- return false;
- }
- std::string dump_buffer;
- while ((bytes_read = dump_file->Read(tmp_buffer, sizeof(tmp_buffer))) > 0) {
- dump_buffer.append(tmp_buffer, bytes_read);
- }
- dump_file->CloseFile();
- return result->ParseFromString(dump_buffer);
-}
#endif // ENABLE_RTC_EVENT_LOG
@@ -403,4 +389,5 @@ bool RtcEventLog::ParseRtcEventLog(const std::string& file_name,
rtc::scoped_ptr<RtcEventLog> RtcEventLog::Create() {
return rtc::scoped_ptr<RtcEventLog>(new RtcEventLogImpl());
}
+
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698