summaryrefslogtreecommitdiffstats
path: root/net/websockets
Commit message (Collapse)AuthorAgeFilesLines
* Rename status_line in WebSocketHandshakeRequestHandler to request_linetyoshino@chromium.org2013-10-112-10/+10
| | | | | | | | | This class handles handshake requests. status_line and status_line_ in this class is actually handling Request-line. Review URL: https://codereview.chromium.org/26225007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228175 0039d316-1c4b-4281-b951-d872f2087c98
* Retain empty first frames as well as final frames.ricea@chromium.org2013-10-113-67/+240
| | | | | | | | | | | | | | | | | | If the payload of the first frame of a multi-frame message was empty, then the type of the message would be lost. To avoid this, always retain the first chunk of the first frame of a message, even if the payload is empty. Also add tests for empty frames, a frame larger than the read buffer, and a masked frame with a non-nul mask. Changed some ASSERT_EQ() statements that weren't necessary to prevent tests from crashing or hanging into EXPECT_EQ() statements. BUG=305081 Review URL: https://codereview.chromium.org/26440002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228161 0039d316-1c4b-4281-b951-d872f2087c98
* Factor out serialized size calculating code from ↵tyoshino@chromium.org2013-10-111-16/+30
| | | | | | | | | | | | | WebSocketBasicStream::WriteFrames To improve readability by shortening the method. This part doesn't access member variables. BUG= Review URL: https://codereview.chromium.org/26804002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228144 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce WebSocketDeflateStream.yhirano@chromium.org2013-10-117-23/+1372
| | | | | | | | | | | | | | | | This CL introduces WebSocketDeflateStream, a WebSocketStream subclass for permessage-deflate WebSocket extension[1]. Currently the implementation compresses all outgoing data frames: it should be fixed in the future. [1] http://tools.ietf.org/html/draft-ietf-hybi-permessage-compression-12 BUG=280910 Review URL: https://codereview.chromium.org/26202002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228129 0039d316-1c4b-4281-b951-d872f2087c98
* Remove code for old WebSocket protocols from WebSocketJob and helpers for ittyoshino@chromium.org2013-10-095-574/+63
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/26247002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227750 0039d316-1c4b-4281-b951-d872f2087c98
* Create WebSocketDispatcherHost and WebSocketHost classes. ↵ricea@chromium.org2013-10-083-23/+29
| | | | | | | | | | | | | | | | | | WebSocketDispatcherHost creates, destroys and routes messages to WebSocketHost objects. WebSocketHost objects own and communicate with net::WebSocketChannel. Input validation is delegated to net::WebSocketChannel. Unit tests seem to be unfashionable for these sorts of glue classes, so I haven't created any. The code to insert WebSocketDispatcherHost as a message filter is not included in this CL, so WebSocket IPCs are still unhandled and this CL changes no behaviour. There is a known bug in this CL that the WebSocketChannel can be deleted while it is looping through incoming messages, causing a use-after-free error. This will be fixed in a followup CL. See design for fix at https://docs.google.com/document/d/1fMxcEFiVj-H5vmuxhPqsxJAl98GS6_yZ-wqB6j9Wmy0/pub BUG=301353 Review URL: https://codereview.chromium.org/12637007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227435 0039d316-1c4b-4281-b951-d872f2087c98
* [SPDY] Do not advertise SPDY/2 by defaultakalin@chromium.org2013-10-062-2/+4
| | | | | | | | | | | | | | | | | Add a switch to re-enable advertising SPDY/2. Use SPDY/3 instead of SPDY/2 for cases where SPDY is forced on. Also use SPDY/3 instead of SPDY/2 in tests. Add "deprecated" to all enum constants involving SPDY/2. Remove unused --enable-npn switch. BUG=303957 R=darin@chromium.org, rtenneti@chromium.org Review URL: https://codereview.chromium.org/25977005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227229 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up unused constant globalshans@chromium.org2013-10-031-1/+0
| | | | | | | | | | | Found by clang's new -Wunused-const-variable. BUG=290204 TBR=mark, acolwell, agl, alexeypa, markus, brettw Review URL: https://codereview.chromium.org/25849004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226888 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce WebSocketInflater.yhirano@chromium.org2013-10-025-1/+662
| | | | | | | | | | | | | Implement WebSocketInflater, a utility class for the permessage-deflate WebSocket extension. BUG=280910 R=ricea, tyoshino Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=224271 Review URL: https://codereview.chromium.org/23480049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226582 0039d316-1c4b-4281-b951-d872f2087c98
* Most of the WebSocket code does not need to care about the originalricea@chromium.org2013-09-269-1035/+1208
| | | | | | | | | | | | | | frame boundaries. Move the chunk to frame conversion logic to WebSocketBasicStream from WebSocketChannel and change all interfaces except for WebSocketFrameParser to use WebSocketFrame instead of WebSocketFrameChunk. BUG=288603 TEST=net_unittests --gtest_filter=WebSocket* Review URL: https://codereview.chromium.org/23604044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225452 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 224271 "Introduce WebSocketInflater."tkent@chromium.org2013-09-204-658/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new test WebSocketInflaterTest.LargeRandomDeflateInflate failed on XP Tests (dbg) and Win7 Tests (dbg). http://build.chromium.org/p/chromium.win/builders/Win7%20Tests%20%28dbg%29%282%29/builds/17568/steps/net_unittests/logs/stdio > [6994/6994] 376.29s WebSocketInflaterTest.LargeRandomDeflateInflate (0.73s) - retry #2 > Note: Google Test filter = WebSocketInflaterTest.LargeRandomDeflateInflate > [==========] Running 1 test from 1 test case. > [----------] Global test environment set-up. > [----------] 1 test from WebSocketInflaterTest > [ RUN ] WebSocketInflaterTest.LargeRandomDeflateInflate > c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\vector(932) : Assertion failed: vector subscript out of range > c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\vector(933) : Assertion failed: "Standard C++ Libraries Out of Range" && 0 > Introduce WebSocketInflater. > > Implement WebSocketInflater, a utility class for the permessage-deflate WebSocket extension. > > BUG=280910 > R=ricea, tyoshino > > Review URL: https://chromiumcodereview.appspot.com/23480049 TBR=yhirano@chromium.org Review URL: https://codereview.chromium.org/24078027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224292 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 224269 "Don't persist HPKP if PrivacyMode is enabled."tkent@chromium.org2013-09-202-5/+14
| | | | | | | | | | | | | | | | | | | | | | | It broke Google Chrome ChromeOS bot. http://build.chromium.org/p/chromium.chrome/builders/Google%20Chrome%20ChromeOS/builds/58548/steps/compile/logs/stdio#error1 FAILED: g++ ... -c ../../net/socket/ssl_client_socket_nss.cc -o obj/net/socket/net.ssl_client_socket_nss.o ../../net/socket/ssl_client_socket_nss.cc: In member function 'int net::SSLClientSocketNSS::DoVerifyCertComplete(int)': ../../net/socket/ssl_client_socket_nss.cc:3445:64:error: no matching function for call to 'net::TransportSecurityState::GetDomainState(const string&, bool&, net::TransportSecurityState::DomainState*)' ../../net/socket/ssl_client_socket_nss.cc:3445:64: note: candidate is: ../../net/http/transport_security_state.h:212:8: note: bool net::TransportSecurityState::GetDomainState(const string&, bool, bool, net::TransportSecurityState::DomainState*) ../../net/http/transport_security_state.h:212:8: note: candidate expects 4 arguments, 3 provided > Don't persist HPKP if PrivacyMode is enabled. > > BUG=258667 > > Review URL: https://chromiumcodereview.appspot.com/19269012 TBR=mef@chromium.org Review URL: https://codereview.chromium.org/24251011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224275 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce WebSocketInflater.yhirano@chromium.org2013-09-204-0/+658
| | | | | | | | | | | Implement WebSocketInflater, a utility class for the permessage-deflate WebSocket extension. BUG=280910 R=ricea, tyoshino Review URL: https://chromiumcodereview.appspot.com/23480049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224271 0039d316-1c4b-4281-b951-d872f2087c98
* Don't persist HPKP if PrivacyMode is enabled.mef@chromium.org2013-09-202-14/+5
| | | | | | | | BUG=258667 Review URL: https://chromiumcodereview.appspot.com/19269012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224269 0039d316-1c4b-4281-b951-d872f2087c98
* Implement WebSocketExtensionParseryhirano@chromium.org2013-09-196-0/+444
| | | | | | | | | | | Implement WebSocketExtensionParser, which parses Sec-WebSocket-Extension header value as specified in RFC6455. BUG=280910 Review URL: https://chromiumcodereview.appspot.com/23872029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224102 0039d316-1c4b-4281-b951-d872f2087c98
* Implement WebSocketDeflater.yhirano@chromium.org2013-09-104-0/+344
| | | | | | | | | | | Implement WebSocketDeflater, which is a utility class for the permessage-deflate WebSocket extension. BUG=280910 R=tyoshino, ricea, szym Review URL: https://chromiumcodereview.appspot.com/23623008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222267 0039d316-1c4b-4281-b951-d872f2087c98
* Rename websockets/*_unittest.cc to *_test.ccricea@chromium.org2013-09-069-16/+15
| | | | | | | | | | | | | The style guide says that the _test suffix should be used for tests, and the _unittest suffix is deprecated. Rename all the src/net/websockets test files to match. BUG=280943 TEST=net_unittests --gtest_filter="WebSocket*" Review URL: https://chromiumcodereview.appspot.com/23614009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221708 0039d316-1c4b-4281-b951-d872f2087c98
* WriteFrames() only handles complete frames. Clarify that point.ricea@chromium.org2013-09-051-12/+15
| | | | | | | | TEST=net_unittests Review URL: https://chromiumcodereview.appspot.com/23685005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221401 0039d316-1c4b-4281-b951-d872f2087c98
* There are some common string constants used by code that performs thericea@chromium.org2013-09-034-46/+203
| | | | | | | | | | | | WebSocket handshake. Create a class to hold them rather than hard-coding them where they are used. BUG=277426 TEST=net_unittests, layout tests, websocketstest.com Review URL: https://chromiumcodereview.appspot.com/22893039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220924 0039d316-1c4b-4281-b951-d872f2087c98
* WebSocketBasicStream is the basic implementation of the WebSocket protocol overricea@chromium.org2013-08-304-0/+904
| | | | | | | | | | | | | TCP/IP with no extensions in use. This CL implements the logic to read and write frames from the stream that is used after connection. BUG=257680 TEST=net_unittests Review URL: https://chromiumcodereview.appspot.com/18792002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220573 0039d316-1c4b-4281-b951-d872f2087c98
* Make the control frame assembly algorithm O(N)ricea@chromium.org2013-08-272-100/+113
| | | | | | | | | | | | | net::WebSocketChannel was using an O(N^2) algorithm to assemble fragmented control frames. Use an O(N) algorithm instead. Also remove the use of "we" in comments. BUG=277294 TEST=net_unittests --gtest_filter=WebSocketChannel* Review URL: https://chromiumcodereview.appspot.com/23183010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219760 0039d316-1c4b-4281-b951-d872f2087c98
* [SPDY] Add strings and constants for HTTP/2 draft 04akalin@chromium.org2013-07-302-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | There are still differences between SPDY/4 and HTTP/2 draft 04; those will be ironed out in upcoming CLs. Add kProtoHTTP2Draft04 to SPDY NextProto-parametrized tests. Move NextProto -> SpdyMajorVersion conversion to buffered_spdy_framer.h. Remove unused SpdyMajorVersion -> NextProto conversion. Clean up HttpResponseInfo::ConnectionInfo a bit and add a TODO to remove it. Parametrize SSLClientSocketPoolTest on NextProto. BUG=265615 R=darin@chromium.org, rch@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=214289 Review URL: https://codereview.chromium.org/21131002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214309 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 214289 "[SPDY] Add strings and constants for HTTP/2 draft 04"akalin@chromium.org2013-07-302-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | > [SPDY] Add strings and constants for HTTP/2 draft 04 > > There are still differences between SPDY/4 and HTTP/2 draft 04; those > will be ironed out in upcoming CLs. > > Add kProtoHTTP2Draft04 to SPDY NextProto-parametrized tests. > > Move NextProto -> SpdyMajorVersion conversion to buffered_spdy_framer.h. > > Remove unused SpdyMajorVersion -> NextProto conversion. > > Clean up HttpResponseInfo::ConnectionInfo a bit and add a TODO to > remove it. > > Parametrize SSLClientSocketPoolTest on NextProto. > > BUG=265615 > R=darin@chromium.org, rch@chromium.org > > Review URL: https://codereview.chromium.org/21131002 TBR=akalin@chromium.org Review URL: https://codereview.chromium.org/21202002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214296 0039d316-1c4b-4281-b951-d872f2087c98
* [SPDY] Add strings and constants for HTTP/2 draft 04akalin@chromium.org2013-07-302-2/+4
| | | | | | | | | | | | | | | | | | | | | | | There are still differences between SPDY/4 and HTTP/2 draft 04; those will be ironed out in upcoming CLs. Add kProtoHTTP2Draft04 to SPDY NextProto-parametrized tests. Move NextProto -> SpdyMajorVersion conversion to buffered_spdy_framer.h. Remove unused SpdyMajorVersion -> NextProto conversion. Clean up HttpResponseInfo::ConnectionInfo a bit and add a TODO to remove it. Parametrize SSLClientSocketPoolTest on NextProto. BUG=265615 R=darin@chromium.org, rch@chromium.org Review URL: https://codereview.chromium.org/21131002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214289 0039d316-1c4b-4281-b951-d872f2087c98
* Add remainder of WebSocketChannel testsricea@chromium.org2013-07-263-113/+866
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add test that deleting a failed channel works. Add a test to verify that deleting the channel from OnAddChannelResponse() when it indicates failure works as advertised. Add PingAfterClosingIsRejected test. Ensure OnDropChannel is only called once. Add tests for delayed writes and 8-bit-cleanness. Add WebSocketChannel tests WriteFramesOneAtATime and WaitingMessagesAreBatched which verify the behaviour when SendFrame() is called when an existing write is pending. Add test MuxErrorIsNotSentToStream which verifies that status code kWebSocketMuxErrorSendQuotaViolation is not sent out on the network. Add tests WrittenBinaryFramesAre8BitClean and ReadBinaryFramesAre8BitClean which verify that binary frames are 8-bit clean. SendClose() sends an empty payload for code 1005. Test for the case that a headerless chunk follows an invalid chunk. BUG=230756 TEST=net_unittests --gtest_filter='WebSocketChannel*' Review URL: https://chromiumcodereview.appspot.com/19510008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213980 0039d316-1c4b-4281-b951-d872f2087c98
* [SPDY] Use WeakPtr<SpdySession> everywhere but SpdySessionPoolakalin@chromium.org2013-07-223-5/+4
| | | | | | | | | | | | | | | | | | | | | | | Make SpdyHttpStream cache it's SPDY stream's LoadTimingInfo on close. Also, make SpdyHttpStream query SpdySession::IsReused() when it's constructed and cache the value, as that's closer to the intent of its use. Avoid uses of SpdySession::IsClosed() in non-test code and add TODO to remove uses from test code. This is more correct since testing the WeakPtr is a stronger condition than testing openness and SpdySession functions already do the right thing if the SpdySession is already closed. Tweak some tests that implicitly depended on having refs to SpdySession. BUG=255701 R=rch@chromium.org Review URL: https://codereview.chromium.org/18546008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212858 0039d316-1c4b-4281-b951-d872f2087c98
* net: Fix references to googleurl.tfarina@chromium.org2013-07-202-2/+2
| | | | | | | | | | | googleurl is deprecated and moved to src/url/. BUG=229660 R=eroman@chromium.org Review URL: https://codereview.chromium.org/19492015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212703 0039d316-1c4b-4281-b951-d872f2087c98
* Reduce the complexity of WebSocketThrottle's wakeup codetyoshino@chromium.org2013-07-184-44/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, job removing code and wakeup code are separate. With the wait queue algorithm employed by WakeupSocketIfNecessary, we have O(N^2 log N) total complexity for shutting down all pending jobs. So, it can make IO thread busy for long time. To prevent such situation occurring for bogus web app, - integrate wakeup code into job removing code so that we can build a list of wakeup candidates from removing process and check only jobs in it. Total complexity for shutdown will then be O(N log N) - have some reasonable limit for the maximum number of WebSocketJob instances pending in the WebSocketThrottle. The number of WebSocketJob instances pending in WebSocketThrottle will be limited up to 1k. Also, the number of active SocketStream instances should be limited. When huge number of WebSocket instances are created, it pressures the browser process. It'll be limited up to 16k. BUG=259005 Review URL: https://chromiumcodereview.appspot.com/18932005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212235 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of the message_loop header in net/, part 3.avi@chromium.org2013-07-182-2/+2
| | | | | | | | | | BUG=260807 TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/19486003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212191 0039d316-1c4b-4281-b951-d872f2087c98
* WebSocketChannel implements the transport-independent parts of the WebSocket ↵ricea@chromium.org2013-07-176-2/+2226
| | | | | | | | | | | | | protocol. It also provides the interface to the content library. The unit tests are still incomplete at the moment. BUG=230756 TEST=net_unittests --gtest_filter='WebSocketChannel*' Review URL: https://chromiumcodereview.appspot.com/12764006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212019 0039d316-1c4b-4281-b951-d872f2087c98
* Add PRESUBMIT.py file to net/websocketsricea@chromium.org2013-07-122-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keep the README file up-to-date by warning people who don't update it. Include PRESUBMIT.py in the README file so that it doesn't warn about itself. We intentionally don't warn about existing errors in README. We also don't warn in the case of deletions (too rare to be worth coding for). Tested cases: No files in CL - no warning One added file in CL - warning One added file in CL, README changed but with typo - warning One added + one modified file in CL - warning for added file One added + one modified file which is missing from README in CL - warning for added file One added + one deleted file in CL - warning for added file One added + one deleted file which was missing from README in CL - warning for added file One added file also added to README - no warning Two added files, one in README - warns about the file not in README One file modified - no warning One file deleted - no warning BUG=258767 Review URL: https://chromiumcodereview.appspot.com/18112015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211387 0039d316-1c4b-4281-b951-d872f2087c98
* net: Migrate from googleurl/ includes to url/ ones.tfarina@chromium.org2013-07-126-8/+8
| | | | | | | | | | BUG=229660 R=eroman@chromium.org TBR=eroman@chromium.org Review URL: https://chromiumcodereview.appspot.com/6362186595172352 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211347 0039d316-1c4b-4281-b951-d872f2087c98
* [SPDY] Make SpdySessionPool keep track of available sessionsakalin@chromium.org2013-07-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Split a SpdySessionPool's sessions into available ones and unavailable ones. Keep all sessions in a set, and all the available sessions in a map keyed by SpdySessionKey. This is in preparation for making SpdySessionPool own a session even if it receives a GOAWAY frame. Split SpdySessionPool::Remove() into two functions -- MakeSessionUnavailable() and RemoveUnavailableSession(). For now, sessions call them at the same time, but in the future RemoveUnavailableSession() may be called later than MakeSessionUnavailable() (for the GOAWAY case). Don't add a SpdySession to a pool if it encountered an error during initialization. Also, don't do some work in SpdySession::InitializeWithSocket() if initialization fails. Rename functions and variables in SpdySessionPool to be concise and consistent. Inline a bunch of one-off functions. Rewrite the loop in SpdySessionPool::RemoveAliases(). BUG=255701 Review URL: https://chromiumcodereview.appspot.com/18600010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210344 0039d316-1c4b-4281-b951-d872f2087c98
* [SPDY] Refactor and clean up SpdySessionPoolakalin@chromium.org2013-07-032-29/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the map of keys to lists of sessions to a map of keys to sessions, since we were already limiting the lists to be of size 1 anyway. Remove the functions from SpdySessionPool that were used mostly by tests. Replace them with functions in spdy_test_util_common.{h,cc}. Make a bunch of tests use these functions. Make the Close*Sessions() behave consistently. Make SpdySession::CloseSessionOnError() always remove the session from its pool. Move the SpdySessionPool tests for spdy_session_unittest.cc to a new file spdy_session_pool_unittest.cc. Add a few more for the Close*Sessions() tests. Remove --max-spdy-sessions-per-domain switch. Parametrize HttpStreamFactoryTest on NextProto. Misc. cleanup here and there. BUG=255701 TBR=rch@chromium.org Review URL: https://codereview.chromium.org/18226004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210054 0039d316-1c4b-4281-b951-d872f2087c98
* Change the interface of WebSocketStream to suit WebSocketChannel, in ↵ricea@chromium.org2013-07-023-40/+175
| | | | | | | | | | | | | | particular adding a factory function. Provide an implementation of WebSocketStream::CreateAndConnectStream which calls NOTIMPLEMENTED(); BUG=253812 TEST=net_unittests Review URL: https://chromiumcodereview.appspot.com/17610006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209675 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of time headers in net/, part 3.avi@chromium.org2013-06-281-1/+1
| | | | | | | | | | BUG=254986 TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/18051006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209076 0039d316-1c4b-4281-b951-d872f2087c98
* [SPDY] Enable tests for SPDY/3.1 and SPDY/4a2akalin@chromium.org2013-06-271-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | Make the sending of the initial stream window size part of SpdySession::SendInitialSettings(). Since this is already turned off for tests, this makes it a lot easier to enable tests for SPDY/3.1 and above, since we don't have to conditionally expect the initial WINDOW_UPDATE frame. Actually test handling of Alternate-Protocol header in http_network_transaction_unittest.cc. Fix handling of SPDY/3.1 and above in AlternateProtocolToString() and HttpStreamFactoryImpl::GetAlternateProtocolRequestFor(). Other misc. cleanup. BUG=230124 R=rch@chromium.org Review URL: https://codereview.chromium.org/17760008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208997 0039d316-1c4b-4281-b951-d872f2087c98
* [SPDY] Unfork websocket_handshake_handler_spdy{2,3}_unittest.ccakalin@chromium.org2013-06-252-231/+62
| | | | | | | | | BUG=226192 R=rch@chromium.org Review URL: https://codereview.chromium.org/17570014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208514 0039d316-1c4b-4281-b951-d872f2087c98
* [SPDY] Unfork websocket_job_spdy{2,3}_unittest.cc filesakalin@chromium.org2013-06-253-1177/+100
| | | | | | | | | | | | | Make SpdyWebSocketTestUtil contain and not inherit from SpdyTestUtil. Replace the various Get*Key() functions in SpdyWebSocketTestUtil with a single function SetHeader(). BUG=226192 Review URL: https://chromiumcodereview.appspot.com/17573020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208457 0039d316-1c4b-4281-b951-d872f2087c98
* [SPDY] Unfork spdy_websocket_test_util_spdy{2,3}.* filesakalin@chromium.org2013-06-242-14/+16
| | | | | | | | | | | | Introduce new SpdyWebSocketTestUtil class and use it in all SPDY WebSocket tests. BUG=226192 R=rch@chromium.org Review URL: https://codereview.chromium.org/17601002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208295 0039d316-1c4b-4281-b951-d872f2087c98
* [SPDY] Refactor SpdyStream's handling of response headersakalin@chromium.org2013-06-242-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename OnResponseHeadersReceived() to OnResponseHeadersUpdated() and remove some of its extraneous parameters. Document its semantics and that of the other delegate functions. Fix bug in PushedStreamReplayData() where the stream being closed/deleted wasn't handled correctly. Also fix memory leaks of the pending frames. Use continue_buffering_data_ only for push streams. Rename request_/response_ to request_headers_/response_headers_. Keep track of whether all required response headers are complete, and send data to the delegate only after that becomes true. Rename OnResponseHeadersReceived() and OnHeaders() to On{Initial,Additional}ResponseHeadersReceived(), respectively. Add MergeWithResponseHeaders() utility function and call it from On{Initial,Additional}ResponseHeadersReceived(). Always convert ERR_INCOMPLETE_SPDY_HEADERS to OK for push streams. Rename ContainsUpperAscii() (ambiguous) to ContainsUppercaseAscii(). Move some tests from SpdyNetworkTransaction to SpdyStream. Some other miscellaneous renaming and cleanup. BUG=251442 R=rch@chromium.org Review URL: https://codereview.chromium.org/17382012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208169 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce RequestWebSocketStream into HttpStreamFactoryyhirano@chromium.org2013-06-212-1/+60
| | | | | | | | | | Introduce RequestWebSocketStream into HttpStreamFactory to reuse its functionality that handles socket pool, proxy and SSL. BUG=237444 Review URL: https://chromiumcodereview.appspot.com/14813024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207735 0039d316-1c4b-4281-b951-d872f2087c98
* Make net and ipc explicitly use the base namespace for Values.brettw@chromium.org2013-06-132-20/+23
| | | | | | | | | | | They're currently relying on a using in values.h that we want to remove. I removed several usings in net for consistency. BUG= R=willchan@chromium.org Review URL: https://codereview.chromium.org/15662008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206187 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of strings headers in net/test/, net/third_party/, ↵avi@chromium.org2013-06-117-13/+13
| | | | | | | | | | | | net/tools/, net/udp/, net/url_request/, net/websockets/. BUG=247723 TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/16652007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205447 0039d316-1c4b-4281-b951-d872f2087c98
* Update net/ to use scoped_refptr<T>::get() rather than implicit "operator T*"rsleevi@chromium.org2013-06-014-78/+78
| | | | | | | | | | | Linux fixes BUG=110610 TBR=darin Review URL: https://chromiumcodereview.appspot.com/15829004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203535 0039d316-1c4b-4281-b951-d872f2087c98
* net: Use base::MessageLoop.xhwang@chromium.org2013-05-234-35/+35
| | | | | | | | | BUG=236029 R=agl@chromium.org Review URL: https://chromiumcodereview.appspot.com/14021017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201882 0039d316-1c4b-4281-b951-d872f2087c98
* Change the WebSocket OpCode constants to an enumricea@chromium.org2013-05-205-165/+143
| | | | | | | | | | | | | | | | | | In order to permit them to be used in switch statements, changed the kOpCode* constants to an enum. Simplified IsKnownDataOpCode() and IsKnownControlOpCode() since the compiler can now see the values and so produce optimised output with no need for bit fiddling. Also applied style fixes suggested by clang-format and cpplint.py. BUG= TEST=net_unittests chromedriver_unittests Review URL: https://chromiumcodereview.appspot.com/15298012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201086 0039d316-1c4b-4281-b951-d872f2087c98
* ChannelID-less Connections in Chrome should be more granular.mef@chromium.org2013-05-173-16/+23
| | | | | | | | | | | | | | | | Added enum PrivacyMode (Enabled/Disabled) to mark connections which should not use ChannelID even if it is globally enabled. PrivacyMode is enabled if user blocks sending or saving cookies to/from particular server, taking in account third party cookie settings as well. See crbug.com/223191 for design doc. Segmented client socket pools according to privacy mode setting used for particular connection (added 'pm/' prefix to pool key. Introduced SpdySessionKey structure and added PrivacyMode to the key of SpdySessionPool. Added propagation of Privacy Mode setting from Web Sockets. Added check of Privacy Mode to predictor and pre-connect logic. BUG=223191 TEST=unit_tests gtest_filter=ChromeNetworkDelegatePrivacyModeTest* Review URL: https://chromiumcodereview.appspot.com/13008028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200852 0039d316-1c4b-4281-b951-d872f2087c98
* Remove deprecated WebSocketFrameHeader constructorricea@chromium.org2013-05-171-13/+0
| | | | | | | | | | | | | net::WebSocketFrameHeader had a no-argument constructor to maintain compatability with Chromedriver. Chromedriver has stopped using this constructor, so remove it. BUG=none TEST=ninja net_unittests chromedriver_unittests Review URL: https://chromiumcodereview.appspot.com/15111005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200777 0039d316-1c4b-4281-b951-d872f2087c98
* Use loop to iterate over cookies to save in the SaveNextCookie method.tyoshino@chromium.org2013-05-172-23/+54
| | | | | | | | | | Though it's tail recursion, it's possible that it's not optimized and stack overflow happens when lots of Set-Cookies is received. BUG=128156 Review URL: https://chromiumcodereview.appspot.com/14824007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200752 0039d316-1c4b-4281-b951-d872f2087c98