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

Unified Diff: webrtc/pc/peerconnection.cc

Issue 2692723002: Adding RTCErrorOr class to be used by ORTC APIs. (Closed)
Patch Set: Changing "CreateAndLogError" to a macro. Created 3 years, 10 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/pc/peerconnection.cc
diff --git a/webrtc/pc/peerconnection.cc b/webrtc/pc/peerconnection.cc
index 96e2b339a49d25faa32e449b2944c362b27c946a..ee9341ecb402c25493caf0eeceec5388ffda51ec 100644
--- a/webrtc/pc/peerconnection.cc
+++ b/webrtc/pc/peerconnection.cc
@@ -458,27 +458,6 @@ bool SafeSetError(webrtc::RTCErrorType type, webrtc::RTCError* error) {
namespace webrtc {
-static const char* const kRTCErrorTypeNames[] = {
- "NONE",
- "UNSUPPORTED_PARAMETER",
- "INVALID_PARAMETER",
- "INVALID_RANGE",
- "SYNTAX_ERROR",
- "INVALID_STATE",
- "INVALID_MODIFICATION",
- "NETWORK_ERROR",
- "INTERNAL_ERROR",
-};
-static_assert(static_cast<int>(RTCErrorType::INTERNAL_ERROR) ==
- (arraysize(kRTCErrorTypeNames) - 1),
- "kRTCErrorTypeNames must have as many strings as RTCErrorType "
- "has values.");
-
-std::ostream& operator<<(std::ostream& stream, RTCErrorType error) {
- int index = static_cast<int>(error);
- return stream << kRTCErrorTypeNames[index];
-}
-
bool PeerConnectionInterface::RTCConfiguration::operator==(
const PeerConnectionInterface::RTCConfiguration& o) const {
// This static_assert prevents us from accidentally breaking operator==.

Powered by Google App Engine
This is Rietveld 408576698