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

Issue 2747863003: Loosening the coupling between WebRTC and //third_party/protobuf (Closed)

Created:
3 years, 9 months ago by mbonadei
Modified:
3 years, 8 months ago
CC:
webrtc-reviews_webrtc.org, AleBzk, peah-webrtc, tlegrand-webrtc, tterriberry_mozilla.com, audio-team_agora.io, hlundin-webrtc, kwiberg-webrtc, minyue-webrtc
Target Ref:
refs/heads/master
Project:
webrtc
Visibility:
Public.

Description

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} Committed: https://chromium.googlesource.com/external/webrtc/+/16ab93b952f9e8268f2e663ffe49548e8043d5af

Patch Set 1 #

Patch Set 2 : Adding protobuf dep to DEPS file #

Total comments: 9

Patch Set 3 : Fixing RepeatedPtrField issue and addressing comments #

Patch Set 4 : Avoid to depend on protobuf_utils if protos are disabled #

Patch Set 5 : Fixing the build when rtc_enable_protobuf if false #

Total comments: 2

Patch Set 6 : Sorting includes alphabetically #

Patch Set 7 : Adding PRESUBMIT check #

Total comments: 1

Patch Set 8 : Moving #ifdefs to protobuf_utils.h #

Patch Set 9 : Rebasing... #

Patch Set 10 : Reverting PRESUBMIT.py to run trybots on chromium #

Total comments: 4

Patch Set 11 : Fixing missing translation from std::string to ProtoString #

Total comments: 2

Patch Set 12 : From int to int32_t (safer and backward compatible) #

Patch Set 13 : Adding other deps to protobuf_utils #

Total comments: 17

Patch Set 14 : Addressing comments about on patchset #13 #

Patch Set 15 : Removing explicit == check from preprocessor #if #

Patch Set 16 : Rebasing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+117 lines, -33 lines) Patch
M webrtc/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +6 lines, -0 lines 0 comments Download
M webrtc/base/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +11 lines, -0 lines 0 comments Download
M webrtc/base/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -0 lines 0 comments Download
A webrtc/base/protobuf_utils.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +36 lines, -0 lines 0 comments Download
M webrtc/logging/BUILD.gn View 1 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -0 lines 0 comments Download
M webrtc/logging/rtc_event_log/rtc_event_log.cc View 1 2 3 4 5 6 7 3 chunks +3 lines, -2 lines 0 comments Download
M webrtc/logging/rtc_event_log/rtc_event_log_helper_thread.h View 1 2 3 4 5 6 7 3 chunks +3 lines, -3 lines 0 comments Download
M webrtc/logging/rtc_event_log/rtc_event_log_parser.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +3 lines, -2 lines 0 comments Download
M webrtc/modules/audio_coding/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 7 chunks +8 lines, -0 lines 0 comments Download
M webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -1 line 0 comments Download
M webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_coding/audio_network_adaptor/controller_manager_unittest.cc View 5 6 7 4 chunks +4 lines, -3 lines 0 comments Download
M webrtc/modules/audio_coding/audio_network_adaptor/debug_dump_writer.h View 1 chunk +0 lines, -1 line 0 comments Download
M webrtc/modules/audio_coding/audio_network_adaptor/debug_dump_writer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -1 line 0 comments Download
M webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -1 line 0 comments Download
M webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +3 lines, -2 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/neteq_unittest.cc View 1 2 3 4 5 6 7 8 3 chunks +3 lines, -2 lines 0 comments Download
M webrtc/modules/audio_processing/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 chunks +7 lines, -0 lines 0 comments Download
M webrtc/modules/audio_processing/audio_processing_impl.h View 1 2 3 4 5 6 7 3 chunks +4 lines, -4 lines 0 comments Download
M webrtc/modules/audio_processing/audio_processing_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +4 lines, -4 lines 0 comments Download
M webrtc/modules/audio_processing/audio_processing_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +4 lines, -4 lines 0 comments Download
M webrtc/modules/audio_processing/test/protobuf_utils.h View 1 2 chunks +2 lines, -1 line 0 comments Download
M webrtc/modules/audio_processing/test/protobuf_utils.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M webrtc/tools/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 45 (22 generated)
mbonadei
https://codereview.webrtc.org/2747863003/diff/20001/webrtc/base/protobuf_utils.h File webrtc/base/protobuf_utils.h (right): https://codereview.webrtc.org/2747863003/diff/20001/webrtc/base/protobuf_utils.h#newcode17 webrtc/base/protobuf_utils.h:17: // #include "third_party/protobuf/src/google/protobuf/repeated_field.h" I am struggling with this one. ...
3 years, 9 months ago (2017-03-14 16:07:35 UTC) #3
kjellander_webrtc
I think I might have found the solution to your problem. https://codereview.webrtc.org/2747863003/diff/20001/webrtc/base/BUILD.gn File webrtc/base/BUILD.gn (right): ...
3 years, 9 months ago (2017-03-14 21:28:05 UTC) #4
mbonadei
https://codereview.webrtc.org/2747863003/diff/20001/webrtc/base/BUILD.gn File webrtc/base/BUILD.gn (right): https://codereview.webrtc.org/2747863003/diff/20001/webrtc/base/BUILD.gn#newcode82 webrtc/base/BUILD.gn:82: # TODO(mbonadei): wrap into an if to check if ...
3 years, 9 months ago (2017-03-15 10:08:05 UTC) #6
kjellander_webrtc
I think it would make sense to implement a PRESUBMIT.py check that is looking for ...
3 years, 9 months ago (2017-03-15 12:02:31 UTC) #7
mbonadei
The pre-submit check is a good idea. Let me implement it right away. https://codereview.webrtc.org/2747863003/diff/80001/webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.cc File ...
3 years, 9 months ago (2017-03-15 13:21:48 UTC) #8
mbonadei
On 2017/03/15 12:02:31, kjellander_webrtc wrote: > I think it would make sense to implement a ...
3 years, 9 months ago (2017-03-15 14:27:10 UTC) #9
hlundin-webrtc
michaelt: Please, take a look at the ANA changed. peah: Please, look at APM Thanks!
3 years, 9 months ago (2017-03-15 17:11:42 UTC) #11
michaelt
https://codereview.webrtc.org/2747863003/diff/120001/webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.cc File webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.cc (right): https://codereview.webrtc.org/2747863003/diff/120001/webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.cc#newcode162 webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.cc:162: const ProtoString& config_string, ProtoString is a very good idea. ...
3 years, 9 months ago (2017-03-16 08:16:25 UTC) #12
mbonadei
On 2017/03/16 08:16:25, michaelt wrote: > https://codereview.webrtc.org/2747863003/diff/120001/webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.cc > File webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.cc > (right): > > https://codereview.webrtc.org/2747863003/diff/120001/webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.cc#newcode162 ...
3 years, 9 months ago (2017-03-16 11:35:53 UTC) #13
kjellander_webrtc
Other reviewers: would it make sense to replace some of ENABLE_RTC_EVENT_LOG, WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP and WEBRTC_AUDIOPROC_DEBUG_DUMP with ...
3 years, 9 months ago (2017-03-16 13:29:55 UTC) #14
michaelt
https://codereview.webrtc.org/2747863003/diff/180001/webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.h File webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.h (right): https://codereview.webrtc.org/2747863003/diff/180001/webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.h#newcode53 webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.h:53: const ProtoString& config_string, As in other places, this ProtoString ...
3 years, 9 months ago (2017-03-16 13:39:16 UTC) #16
mbonadei
https://codereview.webrtc.org/2747863003/diff/180001/webrtc/base/BUILD.gn File webrtc/base/BUILD.gn (right): https://codereview.webrtc.org/2747863003/diff/180001/webrtc/base/BUILD.gn#newcode82 webrtc/base/BUILD.gn:82: if (rtc_enable_protobuf) { On 2017/03/16 13:29:54, kjellander_webrtc wrote: > ...
3 years, 9 months ago (2017-03-16 14:48:57 UTC) #17
peah-webrtc
Hi, I think the audio_processing/* code looks good but I'm concerned with the change of ...
3 years, 9 months ago (2017-03-17 10:43:24 UTC) #18
mbonadei
On 2017/03/17 10:43:24, peah-webrtc wrote: > Hi, > I think the audio_processing/* code looks good ...
3 years, 9 months ago (2017-03-20 10:17:26 UTC) #21
kwiberg-webrtc
https://codereview.webrtc.org/2747863003/diff/240001/webrtc/BUILD.gn File webrtc/BUILD.gn (right): https://codereview.webrtc.org/2747863003/diff/240001/webrtc/BUILD.gn#newcode106 webrtc/BUILD.gn:106: } (See the comment about -Wundef.) This would become ...
3 years, 9 months ago (2017-03-22 10:03:23 UTC) #24
peah-webrtc
Great! Nice! lgtm regarding the files webrtc/modules/audio_processing/test/protobuf_utils.* webrtc/modules/audio_processing/audio_processing*.*
3 years, 9 months ago (2017-03-22 11:43:20 UTC) #25
mbonadei
https://codereview.webrtc.org/2747863003/diff/240001/webrtc/BUILD.gn File webrtc/BUILD.gn (right): https://codereview.webrtc.org/2747863003/diff/240001/webrtc/BUILD.gn#newcode106 webrtc/BUILD.gn:106: } On 2017/03/22 10:03:22, kwiberg-webrtc wrote: > (See the ...
3 years, 9 months ago (2017-03-23 16:13:59 UTC) #26
kwiberg-webrtc
lgtm; I'd *like* to get rid of the public_dep, but maybe there's genuinely a good ...
3 years, 9 months ago (2017-03-24 13:02:08 UTC) #31
michaelt
lgtm
3 years, 8 months ago (2017-03-28 11:39:55 UTC) #32
mbonadei
https://codereview.webrtc.org/2747863003/diff/240001/webrtc/base/BUILD.gn File webrtc/base/BUILD.gn (right): https://codereview.webrtc.org/2747863003/diff/240001/webrtc/base/BUILD.gn#newcode88 webrtc/base/BUILD.gn:88: "//third_party/protobuf:protobuf_lite", On 2017/03/24 13:02:07, kwiberg-webrtc wrote: > On 2017/03/23 ...
3 years, 8 months ago (2017-03-30 07:27:27 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2747863003/300001
3 years, 8 months ago (2017-03-30 08:21:14 UTC) #41
commit-bot: I haz the power
Committed patchset #16 (id:300001) as https://chromium.googlesource.com/external/webrtc/+/16ab93b952f9e8268f2e663ffe49548e8043d5af
3 years, 8 months ago (2017-03-30 08:24:28 UTC) #44
mbonadei
3 years, 8 months ago (2017-03-31 09:43:02 UTC) #45
Message was sent while issue was closed.
A revert of this CL (patchset #16 id:300001) has been created in
https://codereview.webrtc.org/2786363002/ by mbonadei@webrtc.org.

The reason for reverting is: I will try to reland next week because it is
causing some problems..

Powered by Google App Engine
This is Rietveld 408576698