| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 return true; | 182 return true; |
| 183 } | 183 } |
| 184 | 184 |
| 185 static String encodeSubprotocolString(const String& protocol) | 185 static String encodeSubprotocolString(const String& protocol) |
| 186 { | 186 { |
| 187 StringBuilder builder; | 187 StringBuilder builder; |
| 188 for (size_t i = 0; i < protocol.length(); i++) { | 188 for (size_t i = 0; i < protocol.length(); i++) { |
| 189 if (protocol[i] < 0x20 || protocol[i] > 0x7E) | 189 if (protocol[i] < 0x20 || protocol[i] > 0x7E) |
| 190 builder.append(String::format("\\u%04X", protocol[i])); | 190 builder.append(String::format("\\u%04X", protocol[i])); |
| 191 else if (protocol[i] == 0x5c) | 191 else if (protocol[i] == 0x5c) |
| 192 builder.appendLiteral("\\\\"); | 192 builder.append("\\\\"); |
| 193 else | 193 else |
| 194 builder.append(protocol[i]); | 194 builder.append(protocol[i]); |
| 195 } | 195 } |
| 196 return builder.toString(); | 196 return builder.toString(); |
| 197 } | 197 } |
| 198 | 198 |
| 199 static String joinStrings(const Vector<String>& strings, const char* separator) | 199 static String joinStrings(const Vector<String>& strings, const char* separator) |
| 200 { | 200 { |
| 201 StringBuilder builder; | 201 StringBuilder builder; |
| 202 for (size_t i = 0; i < strings.size(); ++i) { | 202 for (size_t i = 0; i < strings.size(); ++i) { |
| (...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 714 DEFINE_TRACE(DOMWebSocket) | 714 DEFINE_TRACE(DOMWebSocket) |
| 715 { | 715 { |
| 716 visitor->trace(m_channel); | 716 visitor->trace(m_channel); |
| 717 visitor->trace(m_eventQueue); | 717 visitor->trace(m_eventQueue); |
| 718 WebSocketChannelClient::trace(visitor); | 718 WebSocketChannelClient::trace(visitor); |
| 719 EventTargetWithInlineData::trace(visitor); | 719 EventTargetWithInlineData::trace(visitor); |
| 720 ActiveDOMObject::trace(visitor); | 720 ActiveDOMObject::trace(visitor); |
| 721 } | 721 } |
| 722 | 722 |
| 723 } // namespace blink | 723 } // namespace blink |
| OLD | NEW |