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

Side by Side Diff: Source/modules/mediastream/RTCIceCandidate.cpp

Issue 24469004: Amusingly deprecate the generic version of 'ExceptionState::throwDOMException'. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 26 matching lines...) Expand all
37 #include "core/dom/ExceptionCode.h" 37 #include "core/dom/ExceptionCode.h"
38 #include "public/platform/WebRTCICECandidate.h" 38 #include "public/platform/WebRTCICECandidate.h"
39 39
40 namespace WebCore { 40 namespace WebCore {
41 41
42 PassRefPtr<RTCIceCandidate> RTCIceCandidate::create(const Dictionary& dictionary , ExceptionState& es) 42 PassRefPtr<RTCIceCandidate> RTCIceCandidate::create(const Dictionary& dictionary , ExceptionState& es)
43 { 43 {
44 String candidate; 44 String candidate;
45 bool ok = dictionary.get("candidate", candidate); 45 bool ok = dictionary.get("candidate", candidate);
46 if (!ok || !candidate.length()) { 46 if (!ok || !candidate.length()) {
47 es.throwDOMException(TypeMismatchError); 47 es.throwUninformativeAndGenericDOMException(TypeMismatchError);
48 return 0; 48 return 0;
49 } 49 }
50 50
51 String sdpMid; 51 String sdpMid;
52 dictionary.get("sdpMid", sdpMid); 52 dictionary.get("sdpMid", sdpMid);
53 53
54 unsigned short sdpMLineIndex = 0; 54 unsigned short sdpMLineIndex = 0;
55 dictionary.get("sdpMLineIndex", sdpMLineIndex); 55 dictionary.get("sdpMLineIndex", sdpMLineIndex);
56 56
57 return adoptRef(new RTCIceCandidate(WebKit::WebRTCICECandidate(candidate, sd pMid, sdpMLineIndex))); 57 return adoptRef(new RTCIceCandidate(WebKit::WebRTCICECandidate(candidate, sd pMid, sdpMLineIndex)));
(...skipping 28 matching lines...) Expand all
86 { 86 {
87 return m_webCandidate.sdpMLineIndex(); 87 return m_webCandidate.sdpMLineIndex();
88 } 88 }
89 89
90 WebKit::WebRTCICECandidate RTCIceCandidate::webCandidate() 90 WebKit::WebRTCICECandidate RTCIceCandidate::webCandidate()
91 { 91 {
92 return m_webCandidate; 92 return m_webCandidate;
93 } 93 }
94 94
95 } // namespace WebCore 95 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/mediastream/RTCDataChannel.cpp ('k') | Source/modules/mediastream/RTCPeerConnection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698