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

Side by Side Diff: third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp

Issue 2614663008: Migrate WTF::Vector::append() to ::push_back() [part 13 of N] (Closed)
Patch Set: Created 3 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) 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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 } 261 }
262 262
263 DOMWebSocket* webSocket = new DOMWebSocket(context); 263 DOMWebSocket* webSocket = new DOMWebSocket(context);
264 webSocket->suspendIfNeeded(); 264 webSocket->suspendIfNeeded();
265 265
266 if (protocols.isNull()) { 266 if (protocols.isNull()) {
267 Vector<String> protocolsVector; 267 Vector<String> protocolsVector;
268 webSocket->connect(url, protocolsVector, exceptionState); 268 webSocket->connect(url, protocolsVector, exceptionState);
269 } else if (protocols.isString()) { 269 } else if (protocols.isString()) {
270 Vector<String> protocolsVector; 270 Vector<String> protocolsVector;
271 protocolsVector.append(protocols.getAsString()); 271 protocolsVector.push_back(protocols.getAsString());
272 webSocket->connect(url, protocolsVector, exceptionState); 272 webSocket->connect(url, protocolsVector, exceptionState);
273 } else { 273 } else {
274 DCHECK(protocols.isStringSequence()); 274 DCHECK(protocols.isStringSequence());
275 webSocket->connect(url, protocols.getAsStringSequence(), exceptionState); 275 webSocket->connect(url, protocols.getAsStringSequence(), exceptionState);
276 } 276 }
277 277
278 if (exceptionState.hadException()) 278 if (exceptionState.hadException())
279 return nullptr; 279 return nullptr;
280 280
281 return webSocket; 281 return webSocket;
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 859
860 DEFINE_TRACE(DOMWebSocket) { 860 DEFINE_TRACE(DOMWebSocket) {
861 visitor->trace(m_channel); 861 visitor->trace(m_channel);
862 visitor->trace(m_eventQueue); 862 visitor->trace(m_eventQueue);
863 WebSocketChannelClient::trace(visitor); 863 WebSocketChannelClient::trace(visitor);
864 EventTargetWithInlineData::trace(visitor); 864 EventTargetWithInlineData::trace(visitor);
865 SuspendableObject::trace(visitor); 865 SuspendableObject::trace(visitor);
866 } 866 }
867 867
868 } // namespace blink 868 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698