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

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

Issue 21735005: Use "int" instead of "long" for bindings where the WebIDL uses "long". (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
« no previous file with comments | « Source/modules/websockets/WebSocket.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 const KURL& WebSocket::url() const 415 const KURL& WebSocket::url() const
416 { 416 {
417 return m_url; 417 return m_url;
418 } 418 }
419 419
420 WebSocket::State WebSocket::readyState() const 420 WebSocket::State WebSocket::readyState() const
421 { 421 {
422 return m_state; 422 return m_state;
423 } 423 }
424 424
425 unsigned long WebSocket::bufferedAmount() const 425 unsigned WebSocket::bufferedAmount() const
426 { 426 {
427 return saturateAdd(m_bufferedAmount, m_bufferedAmountAfterClose); 427 return saturateAdd(m_bufferedAmount, m_bufferedAmountAfterClose);
428 } 428 }
429 429
430 String WebSocket::protocol() const 430 String WebSocket::protocol() const
431 { 431 {
432 return m_subprotocol; 432 return m_subprotocol;
433 } 433 }
434 434
435 String WebSocket::extensions() const 435 String WebSocket::extensions() const
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 static const size_t minimumPayloadSizeWithEightByteExtendedPayloadLength = 0 x10000; 613 static const size_t minimumPayloadSizeWithEightByteExtendedPayloadLength = 0 x10000;
614 size_t overhead = hybiBaseFramingOverhead + hybiMaskingKeyLength; 614 size_t overhead = hybiBaseFramingOverhead + hybiMaskingKeyLength;
615 if (payloadSize >= minimumPayloadSizeWithEightByteExtendedPayloadLength) 615 if (payloadSize >= minimumPayloadSizeWithEightByteExtendedPayloadLength)
616 overhead += 8; 616 overhead += 8;
617 else if (payloadSize >= minimumPayloadSizeWithTwoByteExtendedPayloadLength) 617 else if (payloadSize >= minimumPayloadSizeWithTwoByteExtendedPayloadLength)
618 overhead += 2; 618 overhead += 2;
619 return overhead; 619 return overhead;
620 } 620 }
621 621
622 } // namespace WebCore 622 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/websockets/WebSocket.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698