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

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

Issue 22572005: Remove all uses of the ASCIILiteral class. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rm it from wtf Created 7 years, 4 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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 295
296 bool valid = m_peerHandler->addIceCandidate(iceCandidate->webCandidate()); 296 bool valid = m_peerHandler->addIceCandidate(iceCandidate->webCandidate());
297 if (!valid) 297 if (!valid)
298 es.throwDOMException(SyntaxError); 298 es.throwDOMException(SyntaxError);
299 } 299 }
300 300
301 String RTCPeerConnection::signalingState() const 301 String RTCPeerConnection::signalingState() const
302 { 302 {
303 switch (m_signalingState) { 303 switch (m_signalingState) {
304 case SignalingStateStable: 304 case SignalingStateStable:
305 return ASCIILiteral("stable"); 305 return "stable";
306 case SignalingStateHaveLocalOffer: 306 case SignalingStateHaveLocalOffer:
307 return ASCIILiteral("have-local-offer"); 307 return "have-local-offer";
308 case SignalingStateHaveRemoteOffer: 308 case SignalingStateHaveRemoteOffer:
309 return ASCIILiteral("have-remote-offer"); 309 return "have-remote-offer";
310 case SignalingStateHaveLocalPrAnswer: 310 case SignalingStateHaveLocalPrAnswer:
311 return ASCIILiteral("have-local-pranswer"); 311 return "have-local-pranswer";
312 case SignalingStateHaveRemotePrAnswer: 312 case SignalingStateHaveRemotePrAnswer:
313 return ASCIILiteral("have-remote-pranswer"); 313 return "have-remote-pranswer";
314 case SignalingStateClosed: 314 case SignalingStateClosed:
315 return ASCIILiteral("closed"); 315 return "closed";
316 } 316 }
317 317
318 ASSERT_NOT_REACHED(); 318 ASSERT_NOT_REACHED();
319 return String(); 319 return String();
320 } 320 }
321 321
322 String RTCPeerConnection::iceGatheringState() const 322 String RTCPeerConnection::iceGatheringState() const
323 { 323 {
324 switch (m_iceGatheringState) { 324 switch (m_iceGatheringState) {
325 case IceGatheringStateNew: 325 case IceGatheringStateNew:
326 return ASCIILiteral("new"); 326 return "new";
327 case IceGatheringStateGathering: 327 case IceGatheringStateGathering:
328 return ASCIILiteral("gathering"); 328 return "gathering";
329 case IceGatheringStateComplete: 329 case IceGatheringStateComplete:
330 return ASCIILiteral("complete"); 330 return "complete";
331 } 331 }
332 332
333 ASSERT_NOT_REACHED(); 333 ASSERT_NOT_REACHED();
334 return String(); 334 return String();
335 } 335 }
336 336
337 String RTCPeerConnection::iceConnectionState() const 337 String RTCPeerConnection::iceConnectionState() const
338 { 338 {
339 switch (m_iceConnectionState) { 339 switch (m_iceConnectionState) {
340 case IceConnectionStateNew: 340 case IceConnectionStateNew:
341 return ASCIILiteral("new"); 341 return "new";
342 case IceConnectionStateChecking: 342 case IceConnectionStateChecking:
343 return ASCIILiteral("checking"); 343 return "checking";
344 case IceConnectionStateConnected: 344 case IceConnectionStateConnected:
345 return ASCIILiteral("connected"); 345 return "connected";
346 case IceConnectionStateCompleted: 346 case IceConnectionStateCompleted:
347 return ASCIILiteral("completed"); 347 return "completed";
348 case IceConnectionStateFailed: 348 case IceConnectionStateFailed:
349 return ASCIILiteral("failed"); 349 return "failed";
350 case IceConnectionStateDisconnected: 350 case IceConnectionStateDisconnected:
351 return ASCIILiteral("disconnected"); 351 return "disconnected";
352 case IceConnectionStateClosed: 352 case IceConnectionStateClosed:
353 return ASCIILiteral("closed"); 353 return "closed";
354 } 354 }
355 355
356 ASSERT_NOT_REACHED(); 356 ASSERT_NOT_REACHED();
357 return String(); 357 return String();
358 } 358 }
359 359
360 void RTCPeerConnection::addStream(PassRefPtr<MediaStream> prpStream, const Dicti onary& mediaConstraints, ExceptionState& es) 360 void RTCPeerConnection::addStream(PassRefPtr<MediaStream> prpStream, const Dicti onary& mediaConstraints, ExceptionState& es)
361 { 361 {
362 if (m_signalingState == SignalingStateClosed) { 362 if (m_signalingState == SignalingStateClosed) {
363 es.throwDOMException(InvalidStateError); 363 es.throwDOMException(InvalidStateError);
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 events.swap(m_scheduledEvents); 667 events.swap(m_scheduledEvents);
668 668
669 Vector<RefPtr<Event> >::iterator it = events.begin(); 669 Vector<RefPtr<Event> >::iterator it = events.begin();
670 for (; it != events.end(); ++it) 670 for (; it != events.end(); ++it)
671 dispatchEvent((*it).release()); 671 dispatchEvent((*it).release());
672 672
673 events.clear(); 673 events.clear();
674 } 674 }
675 675
676 } // namespace WebCore 676 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/mediastream/RTCDataChannel.cpp ('k') | Source/modules/mediastream/SourceInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698