summaryrefslogtreecommitdiffstats
path: root/net
Commit message (Collapse)AuthorAgeFilesLines
* base: Finish moving the SplitString functions from string_util.h to ↵tfarina@chromium.org2010-09-2412-8/+20
| | | | | | | | | | | string_split.h BUG=None TEST=trybos Review URL: http://codereview.chromium.org/3447008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60422 0039d316-1c4b-4281-b951-d872f2087c98
* Change the logging of PROXY_CONFIG_CHANGED so it is not displayed each time ↵eroman@chromium.org2010-09-243-18/+53
| | | | | | | | | the IP address changes. BUG=53387 Review URL: http://codereview.chromium.org/3404017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60393 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Small adjustment so that we continue withrvargas@google.com2010-09-231-2/+4
| | | | | | | | | | | | | | the process of creating a new entry after we detect a dirty entry with a partial hash collision. Detected with stress_cache. BUG=none TEST=none Review URL: http://codereview.chromium.org/3404013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60376 0039d316-1c4b-4281-b951-d872f2087c98
* Take out additional dependency from http_util as a short-term fix to get the ↵jam@chromium.org2010-09-233-15/+5
| | | | | | | | pdf build compiling. Review URL: http://codereview.chromium.org/3450024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60367 0039d316-1c4b-4281-b951-d872f2087c98
* Support net::ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_LENGTH.willchan@chromium.org2010-09-234-10/+74
| | | | | | | | | | | | | If we encounter multiple Content-Length headers without a Transfer-Encoding header, then it's a potential response smuggling attempt. Return an error. BUG=56344 TEST=HttpNetworkTransactionTest.MultipleContentLengthHeadersNoTransferEncoding,HttpNetworkTransactionTest.MultipleContentLengthHeadersTransferEncoding Review URL: http://codereview.chromium.org/3394016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60317 0039d316-1c4b-4281-b951-d872f2087c98
* Implement changes_remaining GetUpdates response; this will reducenick@chromium.org2010-09-223-43/+82
| | | | | | | | | | | | | | the number of GetUpdates that the client actually does, since "changes_remaining == 0" is treated as a termination condition. Also, add an indication of client identity to the logger. BUG=55809 TEST=sync_integration_tests, chromiumsync_test.py Review URL: http://codereview.chromium.org/3462006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60229 0039d316-1c4b-4281-b951-d872f2087c98
* net: refactor SSLNonSensitiveHostInfoagl@chromium.org2010-09-223-117/+122
| | | | | | | | | | | | This code is currently unused in the tree, so the refactoring is 'safe'. The code needed to write tests is still pending. BUG=none TEST=none (yet) http://codereview.chromium.org/3381014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60227 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Move a bunch of code to the headers and remove includes.erg@google.com2010-09-2232-92/+203
| | | | | | | | | BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3412016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60208 0039d316-1c4b-4281-b951-d872f2087c98
* Wait on a pipe for the test server to start updavidben@chromium.org2010-09-228-262/+90
| | | | | | | | | | | | | This should speed up testserver-based unit tests considerably and make them less flakey. R=agl,cpu,phajdan,wtc BUG=49680 TEST=net_unittests Review URL: http://codereview.chromium.org/3368012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60199 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 60165 - GTTF: Make net_unittests run successfully with parallel test ↵phajdan.jr@chromium.org2010-09-229-121/+139
| | | | | | | | | | | | | | | | launcher by using a unique directory for disk cache tests. BUG=54098 TEST=run net_unittests using tools/parallel_launcher/parallel_launcher.py Review URL: http://codereview.chromium.org/3410008 TBR=phajdan.jr@chromium.org Review URL: http://codereview.chromium.org/3387012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60166 0039d316-1c4b-4281-b951-d872f2087c98
* GTTF: Make net_unittests run successfully with parallel test launcherphajdan.jr@chromium.org2010-09-229-139/+121
| | | | | | | | | | | by using a unique directory for disk cache tests. BUG=54098 TEST=run net_unittests using tools/parallel_launcher/parallel_launcher.py Review URL: http://codereview.chromium.org/3410008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60165 0039d316-1c4b-4281-b951-d872f2087c98
* net: Fix incorrect style used in some enumerations.tfarina@chromium.org2010-09-229-73/+73
| | | | | | | | | | | | | | | | | | | Reason: They are using kConstantNaming, however the Chromium style is to use UPPER_CASE_FOR_ENUMS. Also convert some truly constants, like the following: http/http_proxy_client_socket_pool.h: enum { kDrainBodyBufferSize = 1024 }; To: static const int kDrainBodyBufferSize = 1024; BUG=55668 TEST=compiles locally. Review URL: http://codereview.chromium.org/3421026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60155 0039d316-1c4b-4281-b951-d872f2087c98
* Add log messages to the places where we set the ERR_UNEXPECTEDwtc@chromium.org2010-09-223-14/+24
| | | | | | | | | | | | | error code in net/socket to help track down bug 55678. Fix cpplint nits. R=eroman BUG=55678 TEST=none Review URL: http://codereview.chromium.org/3461013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60138 0039d316-1c4b-4281-b951-d872f2087c98
* HostResolver should flush the JobPools on a network change.willchan@chromium.org2010-09-214-5/+55
| | | | | | | | | BUG=56291 TEST=HostResolverImplTest.ObeyPoolConstraintsAfterIPAddressChange Review URL: http://codereview.chromium.org/3431017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60127 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate HttpStreamHandle. The name confused me.willchan@chromium.org2010-09-2114-207/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | HttpStreamHandle was a combination of an HttpStream and a scoped_ptr<ClientSocketHandle>. This let it manage the transport socket if so desired. I think that the HttpStream should be in charge of managing this. * HttpBasicStream should always release it to the pool when done, but perhaps disconnect it first. * HttpPipelinedStream (or whatever we name it) should know not to disconnect the transport socket or whatever. It should return it to the pipeline stream manager. * SPDY subtypes of HttpStream do not manage the transport socket. They let the SpdySession handle it. Since the ownership pattern varies based on the HttpStream subtype, I think letting a HttpStreamHandle class perhaps control it is confusing. It's better for the subtype to know what it's supposed to do. There was only one hangup here, the HttpProxyClientSocket, since it might need to Disconnect() and then re-Connect() the transport socket. It was using an HttpBasicStream, which, with my change, would own the transport socket handle. I fixed this by making the HttpProxyClientSocket create an HttpStreamParser instead, which does not own the transport socket handle. Review URL: http://codereview.chromium.org/3133029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60117 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a bunch of clang warnings/errors.thakis@chromium.org2010-09-212-49/+0
| | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/3473006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60109 0039d316-1c4b-4281-b951-d872f2087c98
* Reland r59910 - Add HttpResponseBodyDrainer. Use it for unfinished ↵willchan@chromium.org2010-09-2110-103/+590
| | | | | | | | | | | | | | HttpStreams." There's one simple fix. wtc had asked me to increment the buffer so we keep reading into new memory while draining the body. So I added |total_read_| to |read_buf_|. The problem is |read_buf_| is an IOBuffer*, not a char*, so I'm causing us to read into raw heap memory. Crashes ensue. My unit tests didn't catch it because they never actually read data. I've fixed that by doing a memset(). I've fixed the problem by not bothering to increment the read index, since that would require throwing away IOBuffers or some intrusive modifications to IOBuffer. BUG=54277 TEST=HttpResponseBodyDrainerTest.* Also see the manual testing instructions in r59910. Review URL: http://codereview.chromium.org/3449014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60075 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "net: add test for False Start corking."agl@chromium.org2010-09-212-56/+6
| | | | | | This reverts commit r60056. The test failed on Windows. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60059 0039d316-1c4b-4281-b951-d872f2087c98
* net: add test for False Start corking.agl@chromium.org2010-09-212-6/+56
| | | | | | | | | | | See r58838 for details of why we do False Start corking. BUG=none TEST=net_unittests http://codereview.chromium.org/3427014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60056 0039d316-1c4b-4281-b951-d872f2087c98
* Made passive the comments on the delete functions.rdsmith@google.com2010-09-211-5/+5
| | | | | | | | BUG=None TEST=None TBR=eroman git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60051 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 59972 (chromium os leaks) - Reland r59511: Eagerly set the IO loop ↵willchan@chromium.org2010-09-214-187/+93
| | | | | | | | | | | | | | | | | | used for OCSP. ChromeOS will create a special Profile for login. Previously, OCSP initialization was done for the "default" ChromeURLRequestContext for each Profile. Since we can have multiple profiles, this causes the initialization (and uninitialization) to happen multiple times, which causes problems for OCSP since we use statics. The solution is to identify the "main" Profile. We create said Profile in BrowserMain. I add an "is_main_" variable to URLRequestContextGetter and URLRequestContext, so that only the "main" URLRequestContext will initialize OCSP. Other than minor plumbing of "is_main_", this changelist is identical to r59511. BUG=55940 TEST=Startup ChromeOS's Chrome. Should not crash on startup. Review URL: http://codereview.chromium.org/3470001 TBR=willchan@chromium.org Review URL: http://codereview.chromium.org/3468005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60025 0039d316-1c4b-4281-b951-d872f2087c98
* Fix PEM parsing on Linux when using X509Certificate::FORMAT_AUTOrsleevi@chromium.org2010-09-212-50/+62
| | | | | | | | | | | | | | | When using X509Certificate::FORMAT_AUTO, parsing is attempted optimistically first by seeing if the data decodes as any of the supported binary formats. The NSS routine used to handle PKCS#7 data is actually a generic routine, capable of supporting multiple formats. When a PEM encoded certificate is decoded using PKCS#7, as is the case with FORMAT_AUTO, NSS will, upon encountering a failure to parse as PKCS#7, attempt to PEM decode the data and parse as either a certificate or a PKCS#7 structure. The problem with NSS's implementation is that it only decodes a single certificate, rather than all of the certificates in the file, preventing a full PEM chain from being read in. The solution is to no longer optimistically try to decode the data as binary prior to trying to decode as PEM, and instead unconditionally attempt decoding as PEM-wrapped data before falling back to binary. This allows our handling routines to properly parse all of the supported PEM types, before the underlying crypto library is exposed to the data. BUG=37142 TEST=X509CertificateParseTest.CanParseFormat Review URL: http://codereview.chromium.org/3148034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60023 0039d316-1c4b-4281-b951-d872f2087c98
* Reland r59511: Eagerly set the IO loop used for OCSP.willchan@chromium.org2010-09-204-93/+187
| | | | | | | | | | | | | ChromeOS will create a special Profile for login. Previously, OCSP initialization was done for the "default" ChromeURLRequestContext for each Profile. Since we can have multiple profiles, this causes the initialization (and uninitialization) to happen multiple times, which causes problems for OCSP since we use statics. The solution is to identify the "main" Profile. We create said Profile in BrowserMain. I add an "is_main_" variable to URLRequestContextGetter and URLRequestContext, so that only the "main" URLRequestContext will initialize OCSP. Other than minor plumbing of "is_main_", this changelist is identical to r59511. BUG=55940 TEST=Startup ChromeOS's Chrome. Should not crash on startup. Review URL: http://codereview.chromium.org/3470001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59972 0039d316-1c4b-4281-b951-d872f2087c98
* NSS: Snap Start NPN support and other fixes.agl@chromium.org2010-09-204-16/+108
| | | | | | | | | | | | | | | | | | | | Snap Start now works with NPN. In the case that the server doesn't support Snap Start, SSL_GetPredictedServerHelloData will no longer return any data to allow the application not to cache Snap Start information for servers that don't support it. Previously Snap Start wasn't filling in the certificates in all cases. (Test cases didn't check the certificates on the socket; but Chrome noticed.) BUG=none TEST=nsstests (not in tree) http://codereview.chromium.org/3430007/show git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59957 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Fix the include order.rvargas@google.com2010-09-201-1/+1
| | | | | | | | | | BUG=55970 TEST=none Review URL: http://codereview.chromium.org/3458006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59952 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 59908 (breaks WebKit layout tests) - Add HttpResponseBodyDrainer. ↵willchan@chromium.org2010-09-2010-582/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | Use it for unfinished HttpStreams. Hopefully this will improve our reuse of sockets, and thus performance, since many redirects have response bodies, so we end up discarding those sockets rather than draining the bodies and reusing the socket. Fix a bunch of tests since we now try to read from the socket in HttpNetworkTransaction's destructor, which often executes after the StaticSocketDataProvider has already been destroyed, so we end up trying to invoke pure virtuals via stale pointers. BUG=54277 TEST= 1) Start up chrome with an empty cache (I just use --user-data-dir=/tmp/newprofile). 2) Open up about:net-internals, browse to its socket tab. 3) In a separate Chrome tab, open up http://google.com (NOT www.google.com). NOTE: This will get a 301 redirect with a response body for us to drain. Previously we wouldn't drain it, so we wouldn't reuse the socket. 4) In the about:net-internals's socket page, wait for it to reload (or force a reload). Look for the google.com row under tcp_socket_pool. If it doesn't exist, then that means it failed. If it does exist _and_ the idle column says '1', then it worked. Review URL: http://codereview.chromium.org/3293015 TBR=willchan@chromium.org Review URL: http://codereview.chromium.org/3466003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59910 0039d316-1c4b-4281-b951-d872f2087c98
* Add HttpResponseBodyDrainer. Use it for unfinished HttpStreams.willchan@chromium.org2010-09-1910-103/+582
| | | | | | | | | | | | | | | | | | | | | Hopefully this will improve our reuse of sockets, and thus performance, since many redirects have response bodies, so we end up discarding those sockets rather than draining the bodies and reusing the socket. Fix a bunch of tests since we now try to read from the socket in HttpNetworkTransaction's destructor, which often executes after the StaticSocketDataProvider has already been destroyed, so we end up trying to invoke pure virtuals via stale pointers. BUG=54277 TEST= 1) Start up chrome with an empty cache (I just use --user-data-dir=/tmp/newprofile). 2) Open up about:net-internals, browse to its socket tab. 3) In a separate Chrome tab, open up http://google.com (NOT www.google.com). NOTE: This will get a 301 redirect with a response body for us to drain. Previously we wouldn't drain it, so we wouldn't reuse the socket. 4) In the about:net-internals's socket page, wait for it to reload (or force a reload). Look for the google.com row under tcp_socket_pool. If it doesn't exist, then that means it failed. If it does exist _and_ the idle column says '1', then it worked. Review URL: http://codereview.chromium.org/3293015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59908 0039d316-1c4b-4281-b951-d872f2087c98
* Break reference cycle from HttpProxyClientSocket=>HttpNetworkSession=>...willchan@chromium.org2010-09-1712-65/+99
| | | | | | | | | | | | Note that this undoes the fix for http://crbug.com/49387 which is now unnecessary without the cycle. Some other miscellaneous cleanup is thrown in here. BUG=55175 TEST=none Review URL: http://codereview.chromium.org/3418018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59873 0039d316-1c4b-4281-b951-d872f2087c98
* Fix case where we close a stream due to socket errors when it is currentlymbelshe@chromium.org2010-09-174-14/+126
| | | | | | | | | | | | | | | | | a pending create stream. The problem was that the socket error would arrive on the SpdySession, which would initiate cleanup of the pendng create streams for that session. In the callback to the stream, the stream would notify the transaction, which would delete itself, and that would cause a callback into the SpdySession to clear that specific pending create stream (via CancelPendingCreateStreams). BUG=52901,55795 TEST=SpdyNetworkTransactionTest.ThreeGetsWithMaxConcurrentSocketClose Review URL: http://codereview.chromium.org/3400009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59794 0039d316-1c4b-4281-b951-d872f2087c98
* Annotate test-only race in DiskCacheBackendTest.NewEvictionTrimInvalidEntrytimurrrr@chromium.org2010-09-171-0/+8
| | | | | | | | | | | also remove the suppressions which won't be needed anymore. Also remove suppression for an old bug 30960 fixed long ago. BUG=55970,30960 TBR=rvargas TEST=trybots, TSan Review URL: http://codereview.chromium.org/3416009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59778 0039d316-1c4b-4281-b951-d872f2087c98
* Flush all nested pools.willchan@chromium.org2010-09-163-0/+11
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3434006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59751 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Start an experiment to measure the impact ofrvargas@google.com2010-09-162-6/+39
| | | | | | | | | | | | throttling cache requests. BUG=54338 TEST=none Review URL: http://codereview.chromium.org/3388009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59729 0039d316-1c4b-4281-b951-d872f2087c98
* Re checkin 59671.lzheng@chromium.org2010-09-168-35/+129
| | | | | | | | | | | | | | Revert 59680 - Revert 59671 - Refactor test_server so some python related functions could be shared by other test servers. BUG=none TEST=python_utils_unittest.cc Review URL: http://codereview.chromium.org/3366026 TBR=thakis@chromium.org Review URL: http://codereview.chromium.org/3415011 TBR=lzheng@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59728 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Fix the order in which we delete datarvargas@google.com2010-09-1615-54/+356
| | | | | | | | | | | | | | | | | | | | | from the block files. Stress testing the cache reveals a problem with the deletion of some data from an entry: it is possible to crash in a way that the block file thinks a block is free and an entry thinks the block is in use. This CL corrects that issue. There is also some new tests and a bunch of DCHECKS added while looking for the problem, as well as adding tests to make sure that a block file is accessed only from one thread (there is no problem with the current code in that regard) BUG=55605 TEST=netunittests Review URL: http://codereview.chromium.org/3430004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59711 0039d316-1c4b-4281-b951-d872f2087c98
* Add a new net error code for when the load failure was due to connecting to ↵eroman@chromium.org2010-09-168-8/+21
| | | | | | | | | | | | | | | | | | | | | a bad proxy server. Prior to this change, users would likely have seen one of these errors on failure to connect through a proxy server: ERR_NAME_NOT_RESOLVED ERR_ADDRESS_UNREACHABLE ERR_CONNECTION_REFUSED ERR_CONNECTION_TIMED_OUT ERR_CONNECTION_FAILED Whereas now any host resolve or tcp connect error will map to: ERR_PROXY_UNREACHABLE This error code will allow selecting a more suitable error page. BUG=53477 Review URL: http://codereview.chromium.org/3360025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59710 0039d316-1c4b-4281-b951-d872f2087c98
* Show "DNS" as the authority for DNSSEC validated certficiates.agl@chromium.org2010-09-163-1/+10
| | | | | | | | | | | | | | | | | | | At the moment, if we validate a certificate using DNSSEC the Page Info dialog will show whatever Issuer the site chose as the issuing authority. That's confusing because the site could choose a string like 'US Dept of Homeland Security' (for example) which is misleading. This patch forces the authority string to always be "DNSSEC" in the case that we used DNSSEC to validate the certificate. (The string "DNSSEC" isn't translated as it's an acronym.) BUG=none TEST=none http://codereview.chromium.org/3304016/show git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59686 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 59671 - Refactor test_server so some python related functions could ↵lzheng@chromium.org2010-09-168-129/+35
| | | | | | | | | | | | | be shared by other test servers. BUG=none TEST=python_utils_unittest.cc Review URL: http://codereview.chromium.org/3366026 TBR=thakis@chromium.org Review URL: http://codereview.chromium.org/3415011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59680 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor test_server so some python related functions could be shared by ↵lzheng@chromium.org2010-09-168-35/+129
| | | | | | | | | | other test servers. BUG=none TEST=python_utils_unittest.cc Review URL: http://codereview.chromium.org/3366026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59671 0039d316-1c4b-4281-b951-d872f2087c98
* Don't evict username/password when handling "stale" digest authentication ↵cbentzel@chromium.org2010-09-167-11/+113
| | | | | | | | | | | | | challenges. Stale challenges indicate that the cached nonce (and associated nonce_count) are no longer valid. BUG=53353 TEST=Use a digest authentication Squid proxy with default settings (which complain about stale nonce's). Ensure that there are no username/password prompts after getting a stale challenge. Also, net_unittests. Review URL: http://codereview.chromium.org/3421005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59643 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Move Extension::LaunchContainer to extension_constants.h.erg@google.com2010-09-162-3/+5
| | | | | | | | | | | This makes browser.h not depend on extension.h. BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3399008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59588 0039d316-1c4b-4281-b951-d872f2087c98
* Change forward declaration of HttpRequestInfo from class to struct torch@chromium.org2010-09-151-1/+1
| | | | | | | | | fix build breakage. BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59584 0039d316-1c4b-4281-b951-d872f2087c98
* Move two methods in spdy_http_stream.cc from an anonymous namespacerch@chromium.org2010-09-154-136/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | into public static methods of SpdyHttpStream. This is in preparation for the SpdyProxyClientSocket which desires to make use of this functionality. // Convert a SpdyHeaderBlock into an HttpResponseInfo. // |headers| input parameter with the SpdyHeaderBlock. // |info| output parameter for the HttpResponseInfo. // Returns true if successfully converted. False if there was a failure // or if the SpdyHeaderBlock was invalid. static bool SpdyHeadersToHttpResponse(const spdy::SpdyHeaderBlock& headers, net::HttpResponseInfo* response); // Create a SpdyHeaderBlock for a Spdy SYN_STREAM Frame from // a HttpRequestInfo block. static void CreateSpdyHeadersFromHttpRequest(const net::HttpRequestInfo& info, spdy::SpdyHeaderBlock* headers, bool direct); BUG=none TEST=none Review URL: http://codereview.chromium.org/3441004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59580 0039d316-1c4b-4281-b951-d872f2087c98
* Change HostResolver::RequestInfo to take a HostPortPair rather than naked ↵eroman@chromium.org2010-09-1524-96/+95
| | | | | | | | host string + port. Review URL: http://codereview.chromium.org/3420001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59577 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 59511 (potentially caused chromiumos leaks) - Take 2: Eagerly set the ↵willchan@chromium.org2010-09-152-174/+92
| | | | | | | | | | | | | | | | IO loop used for OCSP. Refactor nss_ocsp.cc code even more. Split up OCSP initialization into two LazyInstances. One is for the IO loop. One is for registration of OCSP callbacks in NSS, which will load NSS into memory. Sync and the normal network stack race to set their loop at the IO loop used by OCSP. We fix that by providing a SetMessageLoopForOCSP() function which will be called in the IOThread initialization code which runs before the sync thread starts up. Since we split this up from the registration of the OCSP callbacks, it won't also eagerly load NSS, which previously regressed startup time. Note that the URLRequestContext pointer is still a global, not associated with either of the LazyInstances, because it's used by worker threads which can run past the lifetime of the LazyInstances. BUG=36740 TEST=none Review URL: http://codereview.chromium.org/3446001 TBR=willchan@chromium.org Review URL: http://codereview.chromium.org/3424010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59570 0039d316-1c4b-4281-b951-d872f2087c98
* Revision 59384 was incorrect and did not properly perform the check. This ↵cdn@chromium.org2010-09-151-1/+1
| | | | | | | | | | | fixes it. BUG=55119 TEST=None Review URL: http://codereview.chromium.org/3452004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59558 0039d316-1c4b-4281-b951-d872f2087c98
* GTTF: Make the parallel launcher use different ports for test https servers ↵phajdan.jr@chromium.org2010-09-152-41/+21
| | | | | | | | | | | for different shards. BUG=54098 TEST=none Review URL: http://codereview.chromium.org/3452001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59547 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Move code from .h to .cc in net/erg@google.com2010-09-159-29/+105
| | | | | | | | | | | Shaves a cumulative 400k off libnet/browser.a BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3432004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59533 0039d316-1c4b-4281-b951-d872f2087c98
* Take 2: Eagerly set the IO loop used for OCSP.willchan@chromium.org2010-09-152-92/+174
| | | | | | | | | | | Refactor nss_ocsp.cc code even more. Split up OCSP initialization into two LazyInstances. One is for the IO loop. One is for registration of OCSP callbacks in NSS, which will load NSS into memory. Sync and the normal network stack race to set their loop at the IO loop used by OCSP. We fix that by providing a SetMessageLoopForOCSP() function which will be called in the IOThread initialization code which runs before the sync thread starts up. Since we split this up from the registration of the OCSP callbacks, it won't also eagerly load NSS, which previously regressed startup time. Note that the URLRequestContext pointer is still a global, not associated with either of the LazyInstances, because it's used by worker threads which can run past the lifetime of the LazyInstances. BUG=36740 TEST=none Review URL: http://codereview.chromium.org/3446001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59511 0039d316-1c4b-4281-b951-d872f2087c98
* base: Move SplitStringDontTrim functions from string_util.h to string_split.htfarina@chromium.org2010-09-152-2/+4
| | | | | | | | | BUG=None TEST=trybots Review URL: http://codereview.chromium.org/3366011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59493 0039d316-1c4b-4281-b951-d872f2087c98
* Reland 59362 - net: Rename ProxyService::CreateNull to ↵tfarina@chromium.org2010-09-1510-25/+18
| | | | | | | | | | | | | | | | | | | | | ProxyService::CreateDirect. (Note: This was a TODO for eroman). BUG=None TEST=trybots Review URL: http://codereview.chromium.org/3336021 Revert Review URL: http://codereview.chromium.org/3444001/show TBR=eroman@chromium.org Fix the bad git svn rebase (that caused a bad merge, that integrates other files in the original cl, now this should be fixed). Review URL: http://codereview.chromium.org/3413008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59481 0039d316-1c4b-4281-b951-d872f2087c98