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

Side by Side Diff: Source/modules/mediastream/RTCDataChannel.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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 unsigned short RTCDataChannel::id() const 108 unsigned short RTCDataChannel::id() const
109 { 109 {
110 return m_handler->id(); 110 return m_handler->id();
111 } 111 }
112 112
113 String RTCDataChannel::readyState() const 113 String RTCDataChannel::readyState() const
114 { 114 {
115 switch (m_readyState) { 115 switch (m_readyState) {
116 case ReadyStateConnecting: 116 case ReadyStateConnecting:
117 return ASCIILiteral("connecting"); 117 return "connecting";
118 case ReadyStateOpen: 118 case ReadyStateOpen:
119 return ASCIILiteral("open"); 119 return "open";
120 case ReadyStateClosing: 120 case ReadyStateClosing:
121 return ASCIILiteral("closing"); 121 return "closing";
122 case ReadyStateClosed: 122 case ReadyStateClosed:
123 return ASCIILiteral("closed"); 123 return "closed";
124 } 124 }
125 125
126 ASSERT_NOT_REACHED(); 126 ASSERT_NOT_REACHED();
127 return String(); 127 return String();
128 } 128 }
129 129
130 unsigned long RTCDataChannel::bufferedAmount() const 130 unsigned long RTCDataChannel::bufferedAmount() const
131 { 131 {
132 return m_handler->bufferedAmount(); 132 return m_handler->bufferedAmount();
133 } 133 }
134 134
135 String RTCDataChannel::binaryType() const 135 String RTCDataChannel::binaryType() const
136 { 136 {
137 switch (m_binaryType) { 137 switch (m_binaryType) {
138 case BinaryTypeBlob: 138 case BinaryTypeBlob:
139 return ASCIILiteral("blob"); 139 return "blob";
140 case BinaryTypeArrayBuffer: 140 case BinaryTypeArrayBuffer:
141 return ASCIILiteral("arraybuffer"); 141 return "arraybuffer";
142 } 142 }
143 ASSERT_NOT_REACHED(); 143 ASSERT_NOT_REACHED();
144 return String(); 144 return String();
145 } 145 }
146 146
147 void RTCDataChannel::setBinaryType(const String& binaryType, ExceptionState& es) 147 void RTCDataChannel::setBinaryType(const String& binaryType, ExceptionState& es)
148 { 148 {
149 if (binaryType == "blob") 149 if (binaryType == "blob")
150 es.throwDOMException(NotSupportedError); 150 es.throwDOMException(NotSupportedError);
151 else if (binaryType == "arraybuffer") 151 else if (binaryType == "arraybuffer")
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 events.swap(m_scheduledEvents); 304 events.swap(m_scheduledEvents);
305 305
306 Vector<RefPtr<Event> >::iterator it = events.begin(); 306 Vector<RefPtr<Event> >::iterator it = events.begin();
307 for (; it != events.end(); ++it) 307 for (; it != events.end(); ++it)
308 dispatchEvent((*it).release()); 308 dispatchEvent((*it).release());
309 309
310 events.clear(); 310 events.clear();
311 } 311 }
312 312
313 } // namespace WebCore 313 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/mediastream/MediaStreamTrack.cpp ('k') | Source/modules/mediastream/RTCPeerConnection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698