summaryrefslogtreecommitdiffstats
path: root/net
Commit message (Collapse)AuthorAgeFilesLines
* Fix bad last checkin which broke everything in flip.mbelshe@google.com2009-11-151-0/+1
| | | | | | | | | | TBR=wtc@chromium.org TEST=none BUG=none Review URL: http://codereview.chromium.org/387058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32028 0039d316-1c4b-4281-b951-d872f2087c98
* Fix multi-valued headers to and from the server.mbelshe@google.com2009-11-142-5/+31
| | | | | | | | | | | | | | | | | | | | | | | | | This is basically for Set-Cookie, but the solution is generic. If the HTTP layer had issued multiple, duplicate named headers, we send a single name-value pair where the value is a null-character separated list of the original headers. So: Set-Cookie: foo Set-Cookie: bar Becomes Set-cookie "foo\0bar" BUG=none TEST=none Review URL: http://codereview.chromium.org/391061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32007 0039d316-1c4b-4281-b951-d872f2087c98
* Propagate the "first party for cookies" from WebKit to the network stackwtc@chromium.org2009-11-132-1/+2
| | | | | | | | | | | | | | when we follow a redirect, because WebKit's MainResourceLoader::willSendRequest method may change the "first party for cookies" URL of the resource request. R=abarth BUG=25133 TEST=In Options menu, change cookie policy to "Accept cookies only from sites I visit" and then follow the instructions in issue 25133 comment 20. Review URL: http://codereview.chromium.org/385024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31951 0039d316-1c4b-4281-b951-d872f2087c98
* Fix crash if we get an EOF after a large packet with unterminated headers.cevans@chromium.org2009-11-131-1/+1
| | | | | | | | | | | Make sure we always start copying excess data to the start of the read buffer, even in the case where save_amount==0 and additional_save_amount!=0 BUG=27509 TEST=NONE Review URL: http://codereview.chromium.org/385088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31939 0039d316-1c4b-4281-b951-d872f2087c98
* Split *AndAdjustOffset() functions into their own header, to restore ↵pkasting@chromium.org2009-11-132-2/+4
| | | | | | | | | | utf_string_conversions.h to a simple, readable state. BUG=4010 TEST=none Review URL: http://codereview.chromium.org/387012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31928 0039d316-1c4b-4281-b951-d872f2087c98
* Close immediately if no context is setukai@chromium.org2009-11-131-1/+6
| | | | | | | | | | | | | | Profile::GetDefaultRequestContext() is initialized lazily, on the UI thread. So, if SocketStreamHost runs before it has gotten lazily initialized yet, SocketStream won't have context. In this case, SocketStream will die. Rather than that, just close immediately. BUG=none TEST=none Review URL: http://codereview.chromium.org/384077 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31886 0039d316-1c4b-4281-b951-d872f2087c98
* Style nit -- bind asterisks to the left rather than right.eroman@chromium.org2009-11-133-3/+3
| | | | | | Review URL: http://codereview.chromium.org/384112 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31884 0039d316-1c4b-4281-b951-d872f2087c98
* Plumb LoadLog into SocketStreamukai@chromium.org2009-11-1313-216/+362
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/385003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31881 0039d316-1c4b-4281-b951-d872f2087c98
* Condense the output of LoadLog for empty BEGIN/END blocks.eroman@chromium.org2009-11-132-6/+23
| | | | | | | | Rather then printing across two lines, just do it on one line. Review URL: http://codereview.chromium.org/387043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31870 0039d316-1c4b-4281-b951-d872f2087c98
* Add LoadLog instrumentation to HttpNetworkTransaction, to tell how much time ↵eroman@chromium.org2009-11-133-8/+53
| | | | | | | | was spent reading/writing headers and reading/writing body. Review URL: http://codereview.chromium.org/384098 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31861 0039d316-1c4b-4281-b951-d872f2087c98
* After draining the body of a 401/407 response, verify thatwtc@chromium.org2009-11-124-11/+127
| | | | | | | | | | | | | | | | | the keep-alive connection is still connected and idle before reusing it for authentication restart. An impatient server may have closed the connection while waiting for the user to enter the username and password. In socket_test_util.cc, return the mock ERR_UNEXPECTED error synchronously. R=eroman BUG=21675 TEST=new unit test Review URL: http://codereview.chromium.org/389007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31846 0039d316-1c4b-4281-b951-d872f2087c98
* Fix Coverity defects in the FLIP code.wtc@chromium.org2009-11-123-5/+5
| | | | | | | | | | | | | CID=6816 PASS_BY_VALUE CID=6817 PASS_BY_VALUE CID=7523 UNINIT_CTOR R=mbelshe BUG=none TEST=none Review URL: http://codereview.chromium.org/392012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31828 0039d316-1c4b-4281-b951-d872f2087c98
* Enable FLIP POST with unittest.mbelshe@google.com2009-11-128-84/+345
| | | | | | | | | | | | | | | | | | | | | | | | | | | Involved some refactoring of FlipStreamParser/FlipStream/FlipSession. I now want to merge FlipStream and FlipStreamParser. In this CL: * Update the FlipDelegate to remove unused methods and add the OnWriteCompleted() method. * Add a full state machine to the FlipStreamParser. This is the same state machine which is used by the HttpStreamParser, with only small changes. The FLIP side of this only needs the write-state right now, and as we merge the FlipStream and FlipStreamParser, I think we'll get the full state machine hashed out. * POST now works (minimally). I need more testing for large posts. But the unittests are updated (using the new delayed async mock socket work). BUG=none TEST=flip_network_transaction_unittest.cc Review URL: http://codereview.chromium.org/390016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31772 0039d316-1c4b-4281-b951-d872f2087c98
* Map a return value of 0 to ERR_CONNECTION_CLOSED forwtc@chromium.org2009-11-121-19/+16
| | | | | | | | | | | | | connection_->socket()->Read() in DoReadHeadersComplete and DoReadBodyComplete so that we catch both synchronous and asynchronous completion of Read. R=vandebo BUG=13289 TEST=none Review URL: http://codereview.chromium.org/384047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31739 0039d316-1c4b-4281-b951-d872f2087c98
* Enable async IO completions on MockSockets through thembelshe@google.com2009-11-112-22/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | SocketDataProvider. This makes a few changes: - The SocketDataProvider::GetNextRead() is now allowed to return a result of ERR_IO_PENDING. Previously, this was just an error. Now, this informs the MockClientSocket using the SocketDataProvider that the Mock IO will be completely asynchronously. - MockClientSocket implements a new method called OnReadComplete(). This method is used to asynchronously complete a Read from the SocketDataProvider. The MockClientSocket, after receiving ERR_IO_PENDING from SocketDataProvider::GetNextRead will be blocked until this call is made. The rest of the patch is just refactoring the MockTCPClientSocket to implement a true async-io simulation. It needs to record the user buffer from the initial read, and then fill it when the data is provided. BUG=none TEST=<this is for better testing> Review URL: http://codereview.chromium.org/392003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31723 0039d316-1c4b-4281-b951-d872f2087c98
* Http Cache: Split HttpCache::Transaction to its own setrvargas@google.com2009-11-114-1582/+1641
| | | | | | | | | | | | | of files. No real code change... I'm just moving code around. BUG=26729 TEST=none Review URL: http://codereview.chromium.org/387017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31693 0039d316-1c4b-4281-b951-d872f2087c98
* Metrics of SocketStreamukai@chromium.org2009-11-115-1/+186
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/380004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31650 0039d316-1c4b-4281-b951-d872f2087c98
* There was confusion in the mock socket classes due tombelshe@google.com2009-11-1110-426/+430
| | | | | | | | | | | | | | | | | | | overlapping names. The MockSocket is not actually a socket. It is an interface for fetching data for reads and writes on a socket. The MockClientSocket and MockTCPClientSocket are the actual sockets. Rename MockSocket to SocketDataProvider. Rename SSLMockSocket to SSLSocketDataProvider. Update all tests to reflect name change. BUG=none TEST=none Review URL: http://codereview.chromium.org/384024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31640 0039d316-1c4b-4281-b951-d872f2087c98
* Lands http://codereview.chromium.org/379007 for Dave:sky@chromium.org2009-11-111-0/+2
| | | | | | | | | | | | Fixes leak in BackingStore as shown by valgrind. XFree doesn't free the data of the image, where as XDestroyImage does. BUG=none TEST=none Review URL: http://codereview.chromium.org/391008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31633 0039d316-1c4b-4281-b951-d872f2087c98
* Use GURL::is_valid() in place of !GURL::is_empty() in a condition.eroman@chromium.org2009-11-102-1/+23
| | | | | | | | This is to be more consistent with another piece of code which tests is_valid() rather than is_empty(), in case there should be some difference between those. Review URL: http://codereview.chromium.org/385017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31614 0039d316-1c4b-4281-b951-d872f2087c98
* Add a couple of methods to the StaticMockSocket for verifyingmbelshe@google.com2009-11-101-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | that all data has been consumed from the Mock socket. Tests can optionally use this by including a zero-length read at the end of their data and then verifying that it is at the end. Example: MockWrite writes[] = { MockWrite( ... <data> ...), MockWrite( ... <data> ...), MockWrite( ... <data> ...), MockWrite(true, 0, 0), // Marks EOF } <run tests> EXPECT_EQ(mock_socket.at_write_eof()); TEST=this is the test BUG=none Review URL: http://codereview.chromium.org/385011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31605 0039d316-1c4b-4281-b951-d872f2087c98
* Grab SOCKS settings from system prefs.avi@chromium.org2009-11-101-1/+14
| | | | | | | | | BUG=http://crbug.com/13423 TEST=test SOCKS (ssh -D) proxying Review URL: http://codereview.chromium.org/383010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31594 0039d316-1c4b-4281-b951-d872f2087c98
* Distinguish between old and new FTP LIST response parsersphajdan.jr@chromium.org2009-11-102-10/+18
| | | | | | | | | | | | in FTP histograms. This should allow us to see how compatible the new parser is. TEST=none BUG=25520 Review URL: http://codereview.chromium.org/384007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31591 0039d316-1c4b-4281-b951-d872f2087c98
* Get rid of unused function, UTF8ToFilePathString.tony@chromium.org2009-11-101-12/+0
| | | | | | | | | | | | BUG=none TEST=none Original patch by hayato@google.com via: http://codereview.chromium.org/384003 Review URL: http://codereview.chromium.org/388010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31579 0039d316-1c4b-4281-b951-d872f2087c98
* After further discussion, do not try to handle memory errors, but make ↵vandebo@chromium.org2009-11-104-35/+15
| | | | | | | | | | | assertions about allocation parameters stronger. BUG=25826 TEST=none Review URL: http://codereview.chromium.org/378037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31574 0039d316-1c4b-4281-b951-d872f2087c98
* Pickup some server nits from the checkin on the GFE side.mbelshe@google.com2009-11-102-32/+49
| | | | | | | | | | | | No significant code changes here, just some renames, minor reworkings and comment additions. BUG=none TEST=none Review URL: http://codereview.chromium.org/372074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31564 0039d316-1c4b-4281-b951-d872f2087c98
* Use URLRequestContext's host_resolver instead of SystemHostResolver.ukai@chromium.org2009-11-101-1/+2
| | | | | | | | | | | For unittests, we can inject mock host_resolver via SetHostResolver(). BUG=none TEST=none Review URL: http://codereview.chromium.org/384001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31545 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a style nit in client_socket.h.wtc@chromium.org2009-11-103-49/+51
| | | | | | | | | | | | Use the |os_error| name consistently for all the function arguments and local variables that represent OS errors. R=eroman BUG=none TEST=none Review URL: http://codereview.chromium.org/374008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31537 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up recent string conversion function changes, part 1: Remove ↵pkasting@chromium.org2009-11-101-4/+4
| | | | | | | | | | | | unnecessary code. Thanks to a change in escape.cc I can basically revert the ICU conversions back to what they used to be; I can also get rid of half the conversions immediately since they aren't used. This does not split out the "adjust" versions of the UTF conversions into their own header/implementation; that's coming in the next patch. BUG=4010 TEST=none Review URL: http://codereview.chromium.org/380007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31533 0039d316-1c4b-4281-b951-d872f2087c98
* Fix integer overflow in calculation of sparse I/O extent.cevans@chromium.org2009-11-101-1/+1
| | | | | | | | | BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/372076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31532 0039d316-1c4b-4281-b951-d872f2087c98
* Switch chrome to requesting full-urls over FLIP rather thanmbelshe@google.com2009-11-102-18/+14
| | | | | | | | | | | | | | | URIs. This is so that the protocol (http/https) can be conveyed directly from the client. This makes the host header irrelevant. Will update the spec. Updated the unit tests to reflect the host header removal. TEST=flip_network_transaction_unittest.cc BUG=none Review URL: http://codereview.chromium.org/379011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31530 0039d316-1c4b-4281-b951-d872f2087c98
* Fix some over-80-char lines.mbelshe@google.com2009-11-091-4/+11
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/381008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31506 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unnecessary null pointer tests to avoid a false Coveritywtc@chromium.org2009-11-091-7/+13
| | | | | | | | | | | | | | | | | | | FORWARD_NULL defect. In the for loop, at most one buffer in the |buffers| array is of type SECBUFFER_DATA and at most one is of type SECBUFFER_EXTRA. The null pointer test for decrypted_ptr_ is not necessary because when we encounter the only buffer of type SECBUFFER_DATA, decrypted_ptr_ must be NULL (the initial value). I added a DCHECK to assert that. Similarly the null pointer test for received_ptr_ is not necessary. R=mattm BUG=22286 CID=5331 TEST=one Review URL: http://codereview.chromium.org/371014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31499 0039d316-1c4b-4281-b951-d872f2087c98
* Use the new FTP LIST parsing code in the browser.phajdan.jr@chromium.org2009-11-073-6/+23
| | | | | | | | | | | Fall back to the old parsing code on errors. TEST=none BUG=25520 Review URL: http://codereview.chromium.org/343073 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31379 0039d316-1c4b-4281-b951-d872f2087c98
* Disable an FTP test which contains a date with year 2079 due to year-2038 ↵phajdan.jr@chromium.org2009-11-071-0/+3
| | | | | | | | | | | | | | | | problem on Linux. The date wraps around then and gives nonsensical results (the field to store the timestamp is too short to store dates beyond year 2038). TBR=wtc TEST=none BUG=25520 Review URL: http://codereview.chromium.org/372044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31378 0039d316-1c4b-4281-b951-d872f2087c98
* Implement Windows FTP directory listing parser.phajdan.jr@chromium.org2009-11-079-2/+341
| | | | | | | | | TEST=Covered by net_unittests. BUG=25520 Review URL: http://codereview.chromium.org/374010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31376 0039d316-1c4b-4281-b951-d872f2087c98
* Clear disk cache when the cache is not initializedhclam@chromium.org2009-11-074-22/+37
| | | | | | | | | | | | | | BUG=24765 TEST=unit test, clear browsing data and the cache, media cache will be cleared even if a media object was not loaded. Since the disk cache backend in HttpCache is lazily initialized, clearing the cache before it receives the first transaction would have no effect. So initialize the disk cache explicitly when we clear the cache. Review URL: http://codereview.chromium.org/378015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31361 0039d316-1c4b-4281-b951-d872f2087c98
* Fix various problems with inline autocomplete and URLs that change length ↵pkasting@chromium.org2009-11-076-238/+550
| | | | | | | | | | | | | | | | | | | | during fixup: * URLs with http auth info, which gets stripped * URLs with IDN hosts * URLs with escaped values that get unescaped In cases like these, we'd inline autocomplete from the wrong locations, highlight the wrong portions of the URL as matches, and sometimes DCHECK() in debug mode. The fix is to track how fixup affects the offsets into the URL we care about. Plumbing this required an enormous number of additions :( There is also a fix here to the URL Fixer Upper, which was obviously modified at some point in the past to use the Parsed components, but without updating the comments or some of the functionality to match. Since this isn't supposed to "fix up" things that aren't simple typos, I removed some code to "fix" bogus ports, which was causing bizarre effects when typing HTTP auth URLs ("http://foo:bar" would be fixed to "http://foo" and then matched for inline autocompletion, which was clearly wrong). This is tested incidentally by one of the new History URL Provider tests (which is how I discovered it). BUG=4010 TEST=Covered by unittests Review URL: http://codereview.chromium.org/372017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31352 0039d316-1c4b-4281-b951-d872f2087c98
* Take3:mbelshe@google.com2009-11-068-362/+654
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rework the FlipProtocol to separate the Clike structs from the methods. Without this refactoring, we didn't have a clean way to allocate and deallocate FlipFrames. Now we can use the scoped_ptr cleanly. Summary of misc changes: * Merged in some small changes from the GFE side. * flip_protocol.h Changes substantially. We now have separate structs and classes. No longer can you cast from one frame type to another. All FlipFrame classes derive from FlipFrame. A FlipFrame owns a buffer which is used for the frame, and when you create the Frame, you can specify whether the FlipFrame will selfclean its buffer or not. This makes it cheap to instantiate a FlipFrame class on the stack and use it temporarily for accessing fields without having to do any copies or allocations. * You can't use sizeof(FlipFrame) anymore that is now a class. Added a static "size()" method to each FlipFrame type for declaring its real size. * Refactored a couple of routines in flip_framer. These were previously in a huge state machine (ProcessInput), just copied the code into subroutines. * Added flip_protocol_test to the mix from the gfe side. Much of this is a refactoring from flip_framer_test. * Eliminated reinterpret_casts as much as I could and got rid of all uses of scoped_array for FlipFrames. BUG=none TEST=all flip tests reworked Review URL: http://codereview.chromium.org/377014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31305 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 31277 - Take 2:willchan@chromium.org2009-11-068-654/+362
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rework the FlipProtocol to separate the Clike structs from the methods. Without this refactoring, we didn't have a clean way to allocate and deallocate FlipFrames. Now we can use the scoped_ptr cleanly. Summary of misc changes: * Merged in some small changes from the GFE side. * flip_protocol.h Changes substantially. We now have separate structs and classes. No longer can you cast from one frame type to another. All FlipFrame classes derive from FlipFrame. A FlipFrame owns a buffer which is used for the frame, and when you create the Frame, you can specify whether the FlipFrame will selfclean its buffer or not. This makes it cheap to instantiate a FlipFrame class on the stack and use it temporarily for accessing fields without having to do any copies or allocations. * You can't use sizeof(FlipFrame) anymore that is now a class. Added a static "size()" method to each FlipFrame type for declaring its real size. * Refactored a couple of routines in flip_framer. These were previously in a huge state machine (ProcessInput), just copied the code into subroutines. * Added flip_protocol_test to the mix from the gfe side. Much of this is a refactoring from flip_framer_test. * Eliminated reinterpret_casts as much as I could and got rid of all uses of scoped_array for FlipFrames. BUG=none TEST=all flip tests reworked Review URL: http://codereview.chromium.org/376012 TBR=mbelshe@google.com Review URL: http://codereview.chromium.org/371027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31281 0039d316-1c4b-4281-b951-d872f2087c98
* Take 2:mbelshe@google.com2009-11-068-362/+654
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rework the FlipProtocol to separate the C-like structs from the methods. Without this refactoring, we didn't have a clean way to allocate and deallocate FlipFrames. Now we can use the scoped_ptr cleanly. Summary of misc changes: * Merged in some small changes from the GFE side. * flip_protocol.h Changes substantially. We now have separate structs and classes. No longer can you cast from one frame type to another. All FlipFrame classes derive from FlipFrame. A FlipFrame owns a buffer which is used for the frame, and when you create the Frame, you can specify whether the FlipFrame will self-clean its buffer or not. This makes it cheap to instantiate a FlipFrame class on the stack and use it temporarily for accessing fields without having to do any copies or allocations. * You can't use sizeof(FlipFrame) anymore - that is now a class. Added a static "size()" method to each FlipFrame type for declaring its real size. * Refactored a couple of routines in flip_framer. These were previously in a huge state machine (ProcessInput), just copied the code into subroutines. * Added flip_protocol_test to the mix from the gfe side. Much of this is a refactoring from flip_framer_test. * Eliminated reinterpret_casts as much as I could and got rid of all uses of scoped_array for FlipFrames. BUG=none TEST=all flip tests reworked Review URL: http://codereview.chromium.org/376012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31277 0039d316-1c4b-4281-b951-d872f2087c98
* Improve the display of LoadLogs when truncation occurs.eroman@chromium.org2009-11-0621-108/+180
| | | | | | | | | | | | | | Rather than drop all subsequent entries, we now preserve the final entry that was appended to the log. This way, even if entries have been dropped, we can still infer what the total time was, and what the exit condition was. Also makes LoadLog take the bound as a required parameter. BUG=none TEST=LoadLogUtilTest.DisplayOfTruncated Review URL: http://codereview.chromium.org/363025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31274 0039d316-1c4b-4281-b951-d872f2087c98
* Use GetSwitchValueASCII.tony@chromium.org2009-11-061-3/+2
| | | | | | | | | | | | BUG=24672 TEST=None Original patch by Thiago Farina <thiago.farina@gmail.com> at http://codereview.chromium.org/296004 Review URL: http://codereview.chromium.org/373013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31269 0039d316-1c4b-4281-b951-d872f2087c98
* Add some instrumentation to SystemHostResolverProc() to capture the hostname ↵eroman@chromium.org2009-11-061-1/+20
| | | | | | | | | | | | when getaddrinfo() crashes. This may help understand why we are seeing crashes in getaddrinfo() in the field. BUG=22083 Review URL: http://codereview.chromium.org/378011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31267 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 31252 - Rework the FlipProtocol to separate the Clike structs from thewillchan@chromium.org2009-11-068-652/+360
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | methods. Without this refactoring, we didn't have a clean way to allocate and deallocate FlipFrames. Now we can use the scoped_ptr cleanly. Summary of misc changes: * Merged in some small changes from the GFE side. * flip_protocol.h Changes substantially. We now have separate structs and classes. No longer can you cast from one frame type to another. All FlipFrame classes derive from FlipFrame. A FlipFrame owns a buffer which is used for the frame, and when you create the Frame, you can specify whether the FlipFrame will selfclean its buffer or not. This makes it cheap to instantiate a FlipFrame class on the stack and use it temporarily for accessing fields without having to do any copies or allocations. * You can't use sizeof(FlipFrame) anymore that is now a class. Added a static "size()" method to each FlipFrame type for declaring its real size. * Refactored a couple of routines in flip_framer. These were previously in a huge state machine (ProcessInput), just copied the code into subroutines. * Added flip_protocol_test to the mix from the gfe side. Much of this is a refactoring from flip_framer_test. * Eliminated reinterpret_casts as much as I could and got rid of all uses of scoped_array for FlipFrames. BUG=none TEST=all flip tests reworked Review URL: http://codereview.chromium.org/366014 TBR=mbelshe@google.com Review URL: http://codereview.chromium.org/372028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31264 0039d316-1c4b-4281-b951-d872f2087c98
* Rework the FlipProtocol to separate the C-like structs from thembelshe@google.com2009-11-068-360/+652
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | methods. Without this refactoring, we didn't have a clean way to allocate and deallocate FlipFrames. Now we can use the scoped_ptr cleanly. Summary of misc changes: * Merged in some small changes from the GFE side. * flip_protocol.h Changes substantially. We now have separate structs and classes. No longer can you cast from one frame type to another. All FlipFrame classes derive from FlipFrame. A FlipFrame owns a buffer which is used for the frame, and when you create the Frame, you can specify whether the FlipFrame will self-clean its buffer or not. This makes it cheap to instantiate a FlipFrame class on the stack and use it temporarily for accessing fields without having to do any copies or allocations. * You can't use sizeof(FlipFrame) anymore - that is now a class. Added a static "size()" method to each FlipFrame type for declaring its real size. * Refactored a couple of routines in flip_framer. These were previously in a huge state machine (ProcessInput), just copied the code into subroutines. * Added flip_protocol_test to the mix from the gfe side. Much of this is a refactoring from flip_framer_test. * Eliminated reinterpret_casts as much as I could and got rid of all uses of scoped_array for FlipFrames. BUG=none TEST=all flip tests reworked Review URL: http://codereview.chromium.org/366014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31252 0039d316-1c4b-4281-b951-d872f2087c98
* Change some logging for better debugging ofmbelshe@chromium.org2009-11-061-1/+2
| | | | | | | | | | abandoned streams. BUG=none TEST=none Review URL: http://codereview.chromium.org/371017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31244 0039d316-1c4b-4281-b951-d872f2087c98
* Improve Mac SSL code:avi@chromium.org2009-11-062-121/+27
| | | | | | | | | | | | - Ensure that when OnTransportWriteComplete calls back to SSLWriteCallback, SSLWriteCallback doesn't think that a write is in progress (it _was_, but now it's complete and has to be done again). - Remove all the "slop" variables; they're not needed now that we have independent IOBuffers to call back to our transport. BUG=http://crbug.com/21268 TEST=as in bug Review URL: http://codereview.chromium.org/371008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31227 0039d316-1c4b-4281-b951-d872f2087c98
* Add Websocket::DetachDelegateukai@chromium.org2009-11-063-5/+37
| | | | | | | | | | | It is required when websocket live experiment task finished with timed out and detach websocket immediately without waiting OnClose. BUG=none TEST=none Review URL: http://codereview.chromium.org/378010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31219 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the "ls -l" FTP LIST format parser to understand correctlyphajdan.jr@chromium.org2009-11-068-2/+163
| | | | | | | | | | | listings sent by VMS MultiNet servers emulating Unix. TEST=Covered by net_unittests. BUG=22193, 25520 Review URL: http://codereview.chromium.org/368006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31217 0039d316-1c4b-4281-b951-d872f2087c98