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

Side by Side Diff: Source/modules/websockets/NewWebSocketChannelImpl.cpp

Issue 124003003: Add ascii() / latin1() / utf8() methods to AtomicString to avoid having to call string() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 WTF_LOG(Network, "NewWebSocketChannelImpl %p suspend()", this); 247 WTF_LOG(Network, "NewWebSocketChannelImpl %p suspend()", this);
248 } 248 }
249 249
250 void NewWebSocketChannelImpl::resume() 250 void NewWebSocketChannelImpl::resume()
251 { 251 {
252 WTF_LOG(Network, "NewWebSocketChannelImpl %p resume()", this); 252 WTF_LOG(Network, "NewWebSocketChannelImpl %p resume()", this);
253 } 253 }
254 254
255 NewWebSocketChannelImpl::Message::Message(const String& text) 255 NewWebSocketChannelImpl::Message::Message(const String& text)
256 : type(MessageTypeText) 256 : type(MessageTypeText)
257 , text(text.utf8(String::StrictConversionReplacingUnpairedSurrogatesWithFFFD )) { } 257 , text(text.utf8(StrictUTF8ConversionReplacingUnpairedSurrogatesWithFFFD)) { }
258 258
259 NewWebSocketChannelImpl::Message::Message(PassRefPtr<BlobDataHandle> blobDataHan dle) 259 NewWebSocketChannelImpl::Message::Message(PassRefPtr<BlobDataHandle> blobDataHan dle)
260 : type(MessageTypeBlob) 260 : type(MessageTypeBlob)
261 , blobDataHandle(blobDataHandle) { } 261 , blobDataHandle(blobDataHandle) { }
262 262
263 NewWebSocketChannelImpl::Message::Message(PassRefPtr<ArrayBuffer> arrayBuffer) 263 NewWebSocketChannelImpl::Message::Message(PassRefPtr<ArrayBuffer> arrayBuffer)
264 : type(MessageTypeArrayBuffer) 264 : type(MessageTypeArrayBuffer)
265 , arrayBuffer(arrayBuffer) { } 265 , arrayBuffer(arrayBuffer) { }
266 266
267 void NewWebSocketChannelImpl::sendInternal() 267 void NewWebSocketChannelImpl::sendInternal()
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 if (errorCode == FileError::ABORT_ERR) { 477 if (errorCode == FileError::ABORT_ERR) {
478 // The error is caused by cancel(). 478 // The error is caused by cancel().
479 return; 479 return;
480 } 480 }
481 // FIXME: Generate human-friendly reason message. 481 // FIXME: Generate human-friendly reason message.
482 failAsError("Failed to load Blob: error code = " + String::number(errorCode) ); 482 failAsError("Failed to load Blob: error code = " + String::number(errorCode) );
483 // |this| can be deleted here. 483 // |this| can be deleted here.
484 } 484 }
485 485
486 } // namespace WebCore 486 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/websockets/MainThreadWebSocketChannel.cpp ('k') | Source/modules/websockets/WebSocket.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698