From 68343a8f67867655ec5c3d0d996ebaa7c5a91cd4 Mon Sep 17 00:00:00 2001 From: perkj Date: Mon, 29 Aug 2016 23:51:13 -0700 Subject: [PATCH] Revert of Remove the obsolete enum webrtc::PeerConnectionInterface::IceState. (patchset #1 id:1 of https://codereview.webrtc.org/2256663002/ ) Reason for revert: This breaks Chromes build. You will need to update tests in Chrome first. [1874/1925] CXX obj/content/test/test_support/mock_peer_connection_impl.o FAILED: obj/content/test/test_support/mock_peer_connection_impl.o /b/c/cipd/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/content/test/test_support/mock_peer_connection_impl.o.d -DV8_DEPRECATION_WARNINGS -DENABLE_NOTIFICATIONS -DENABLE_PEPPER_CDMS -DENABLE_PLUGINS=1 -DENABLE_PDF=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DUSE_BROWSER_SPELLCHECKER=1 -DDCHECK_ALWAYS_ON=1 -DNO_TCMALLOC -DUSE_EXTERNAL_POPUP_MENU=1 -DENABLE_WEBRTC=1 -DENABLE_EXTENSIONS=1 -DENABLE_TASK_MANAGER=1 -DENABLE_THEMES=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_PLUGIN_INSTALLATION=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DUSE_PROPRIETARY_CODECS -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -DCR_CLANG_REVISION=278861-1 -DCR_XCODE_VERSION=0511 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DV8_USE_EXTERNAL_STARTUP_DATA -DGTEST_HAS_POSIX_RE=0 -DGTEST_LANG_CXX11=1 -DENABLE_IPC_FUZZER -DSK_IGNORE_DW_GRAY_FIX -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DSK_SUPPORT_GPU=1 -DSK_BUILD_FOR_MAC -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_NOEXCEPT= -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DENABLE_WEBSOCKETS -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -DUSE_LIBJPEG_TURBO=1 -DENABLE_LAYOUT_UNIT_IN_INLINE_BOXES=0 -DENABLE_OILPAN=1 -DWTF_USE_CONCATENATED_IMPULSE_RESPONSES=1 -DWTF_USE_ICCJPEG=1 -DWTF_USE_QCMSLIB=1 -DLOG_DISABLED=0 -DMESA_EGL_NO_X11_HEADERS -DUNIT_TEST -DLEVELDB_PLATFORM_CHROMIUM=1 -DFEATURE_ENABLE_SSL -DFEATURE_ENABLE_VOICEMAIL -DEXPAT_RELATIVE_PATH -DGTEST_RELATIVE_PATH -DNO_MAIN_THREAD_WRAPPING -DNO_SOUND_SYSTEM -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -DWEBRTC_MAC -DSSL_USE_OPENSSL -DHAVE_OPENSSL_SSL_H -DFEATURE_ENABLE_SSL -DLOGGING=1 -DNO_MAIN_THREAD_WRAPPING -I../.. -Igen -I../../third_party/khronos -I../../gpu -I../../third_party/libwebp -I../../testing/gtest/include -I../../skia/config -I../../skia/ext -I../../third_party/skia/include/c -I../../third_party/skia/include/config -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/images -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pdf -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../third_party/skia/include/gpu -I../../third_party/skia/src/gpu -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -I../../third_party/WebKit -Igen/third_party/WebKit -I../../v8/include -Igen -I../../third_party/ced/src -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/protobuf/src -I../../third_party/boringssl/src/include -I../../third_party/libjpeg_turbo -I../../third_party/WebKit/Source -I../../third_party/WebKit -Igen/blink -Igen/third_party/WebKit -I../../third_party/iccjpeg -I../../third_party/libpng -I../../third_party/zlib -I../../third_party/ots/include -I../../third_party/qcms/src -I../../v8/include -I../../third_party/mesa/src/include -I../../testing/gmock_custom -I../../testing/gmock/include -I../../third_party/leveldatabase -I../../third_party/leveldatabase/src -I../../third_party/leveldatabase/src/include -I../../third_party/libwebm/source -I../../third_party/opus/src/include -Igen/ui/resources -Igen/ui/resources -I../../third_party/webrtc_overrides -I../../testing/gtest/include -I../../third_party -I../../third_party/webrtc_overrides -I../../third_party -I../../third_party/jsoncpp/overrides/include -I../../third_party/jsoncpp/source/include -I../../third_party/libyuv -I../../third_party/libyuv/include -I../../third_party/libvpx/source/libvpx -fno-strict-aliasing -fstack-protector -fcolor-diagnostics -arch x86_64 -Wall -Werror -Wextra -Wpartial-availability -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-deprecated-register -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -O2 -g1 -isysroot /Applications/Xcode5.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -mmacosx-version-min=10.7 -fvisibility=hidden -Xclang -load -Xclang ../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-templates -Xclang -plugin-arg-find-bad-constructs -Xclang follow-macro-expansion -Xclang -plugin-arg-find-bad-constructs -Xclang enforce-in-pdf -Wheader-hygiene -Wstring-conversion -Wno-unused-function -Xclang -load -Xclang ../../third_party/llvm-build/Release+Asserts/lib/libBlinkGCPlugin.dylib -Xclang -add-plugin -Xclang blink-gc-plugin -fno-threadsafe-statics -fvisibility-inlines-hidden -std=c++11 -stdlib=libc++ -fno-rtti -fno-exceptions -c ../../content/renderer/media/mock_peer_connection_impl.cc -o obj/content/test/test_support/mock_peer_connection_impl.o In file included from ../../content/renderer/media/mock_peer_connection_impl.cc:5: ../../content/renderer/media/mock_peer_connection_impl.h:52:3: error: unknown type name 'IceState' IceState ice_state() override { ^ ../../content/renderer/media/mock_peer_connection_impl.h:54:37: error: no member named 'kIceNew' in 'webrtc::PeerConnectionInterface' return PeerConnectionInterface::kIceNew; See for example https://build.chromium.org/p/chromium.webrtc.fyi/builders/Mac%20Builder/builds/16680 ~~~~~~~~~~~~~~~~~~~~~~~~~^ Original issue's description: > Remove the obsolete enum webrtc::PeerConnectionInterface::IceState. > > Was replaced by IceConnectionState + IceGatheringState. > > BUG= > > Committed: https://crrev.com/31dea98e9c87e640e185fd86fe63d952b5402e05 > Cr-Commit-Position: refs/heads/master@{#13963} TBR=pthatcher@webrtc.org,johan@webrtc.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= Review-Url: https://codereview.webrtc.org/2290963002 Cr-Commit-Position: refs/heads/master@{#13966} --- webrtc/api/peerconnection.cc | 5 +++++ webrtc/api/peerconnection.h | 4 ++++ webrtc/api/peerconnectioninterface.h | 17 +++++++++++++++++ webrtc/api/peerconnectionproxy.h | 1 + 4 files changed, 27 insertions(+) diff --git a/webrtc/api/peerconnection.cc b/webrtc/api/peerconnection.cc index c493f40c9c..c675015ac9 100644 --- a/webrtc/api/peerconnection.cc +++ b/webrtc/api/peerconnection.cc @@ -568,6 +568,7 @@ PeerConnection::PeerConnection(PeerConnectionFactory* factory) observer_(NULL), uma_observer_(NULL), signaling_state_(kStable), + ice_state_(kIceNew), ice_connection_state_(kIceConnectionNew), ice_gathering_state_(kIceGatheringNew), rtcp_cname_(GenerateRtcpCname()), @@ -887,6 +888,10 @@ PeerConnectionInterface::SignalingState PeerConnection::signaling_state() { return signaling_state_; } +PeerConnectionInterface::IceState PeerConnection::ice_state() { + return ice_state_; +} + PeerConnectionInterface::IceConnectionState PeerConnection::ice_connection_state() { return ice_connection_state_; diff --git a/webrtc/api/peerconnection.h b/webrtc/api/peerconnection.h index a777c72629..c4a9a60053 100644 --- a/webrtc/api/peerconnection.h +++ b/webrtc/api/peerconnection.h @@ -105,6 +105,8 @@ class PeerConnection : public PeerConnectionInterface, SignalingState signaling_state() override; + // TODO(bemasc): Remove ice_state() when callers are removed. + IceState ice_state() override; IceConnectionState ice_connection_state() override; IceGatheringState ice_gathering_state() override; @@ -379,6 +381,8 @@ class PeerConnection : public PeerConnectionInterface, PeerConnectionObserver* observer_; UMAObserver* uma_observer_; SignalingState signaling_state_; + // TODO(bemasc): Remove ice_state_. + IceState ice_state_; IceConnectionState ice_connection_state_; IceGatheringState ice_gathering_state_; diff --git a/webrtc/api/peerconnectioninterface.h b/webrtc/api/peerconnectioninterface.h index 8f40a55f92..fdf9cef51e 100644 --- a/webrtc/api/peerconnectioninterface.h +++ b/webrtc/api/peerconnectioninterface.h @@ -151,6 +151,19 @@ class PeerConnectionInterface : public rtc::RefCountInterface { kClosed, }; + // TODO(bemasc): Remove IceState when callers are changed to + // IceConnection/GatheringState. + enum IceState { + kIceNew, + kIceGathering, + kIceWaiting, + kIceChecking, + kIceConnected, + kIceCompleted, + kIceFailed, + kIceClosed, + }; + enum IceGatheringState { kIceGatheringNew, kIceGatheringGathering, @@ -474,6 +487,10 @@ class PeerConnectionInterface : public rtc::RefCountInterface { // Returns the current SignalingState. virtual SignalingState signaling_state() = 0; + // TODO(bemasc): Remove ice_state when callers are changed to + // IceConnection/GatheringState. + // Returns the current IceState. + virtual IceState ice_state() = 0; virtual IceConnectionState ice_connection_state() = 0; virtual IceGatheringState ice_gathering_state() = 0; diff --git a/webrtc/api/peerconnectionproxy.h b/webrtc/api/peerconnectionproxy.h index 2e827802bb..37f2e89f9b 100644 --- a/webrtc/api/peerconnectionproxy.h +++ b/webrtc/api/peerconnectionproxy.h @@ -71,6 +71,7 @@ BEGIN_SIGNALING_PROXY_MAP(PeerConnection) const std::vector&); PROXY_METHOD1(void, RegisterUMAObserver, UMAObserver*) PROXY_METHOD0(SignalingState, signaling_state) + PROXY_METHOD0(IceState, ice_state) PROXY_METHOD0(IceConnectionState, ice_connection_state) PROXY_METHOD0(IceGatheringState, ice_gathering_state) PROXY_METHOD2(bool, StartRtcEventLog, rtc::PlatformFile, int64_t)