To accommodate some downstream WebRTC users we need to loosen
the coupling between our code and the //third_party/protobuf. This includes using typedefs to define strings instead of assuming std::string. After this refactoring it will be possible to link with other protobuf implementations than the current one. We moved the PRESUBMIT check to another CL [1]. The goal of this presubmit is to avoid the direct usage of google::protobuf outside of the webrtc/base/protobuf_utils.h header file. [1] - https://codereview.webrtc.org/2753823003/ BUG=webrtc:7340 NOTRY=True Review-Url: https://codereview.webrtc.org/2747863003 Cr-Commit-Position: refs/heads/master@{#17466}
This commit is contained in:
@ -25,6 +25,7 @@
|
||||
#include "webrtc/base/ignore_wundef.h"
|
||||
#include "webrtc/base/sha1digest.h"
|
||||
#include "webrtc/base/stringencode.h"
|
||||
#include "webrtc/base/protobuf_utils.h"
|
||||
#include "webrtc/modules/audio_coding/codecs/pcm16b/pcm16b.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/tools/audio_loop.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/tools/rtp_file_source.h"
|
||||
@ -194,7 +195,7 @@ void ResultSink::AddResult(const NetEqNetworkStatistics& stats_raw) {
|
||||
neteq_unittest::NetEqNetworkStatistics stats;
|
||||
Convert(stats_raw, &stats);
|
||||
|
||||
std::string stats_string;
|
||||
ProtoString stats_string;
|
||||
ASSERT_TRUE(stats.SerializeToString(&stats_string));
|
||||
AddMessage(output_fp_, digest_.get(), stats_string);
|
||||
#else
|
||||
@ -207,7 +208,7 @@ void ResultSink::AddResult(const RtcpStatistics& stats_raw) {
|
||||
neteq_unittest::RtcpStatistics stats;
|
||||
Convert(stats_raw, &stats);
|
||||
|
||||
std::string stats_string;
|
||||
ProtoString stats_string;
|
||||
ASSERT_TRUE(stats.SerializeToString(&stats_string));
|
||||
AddMessage(output_fp_, digest_.get(), stats_string);
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user