summaryrefslogtreecommitdiffstats
path: root/net
Commit message (Collapse)AuthorAgeFilesLines
* Massively simplify the NetworkChangeNotifier infrastructure:pkasting@chromium.org2010-06-2549-826/+511
| | | | | | | | | | | | | | * Use a process-wide object (singleton pattern) * Create/destroy this object on the main thread, make it outlive all consumers * Make observer-related functions threadsafe As a result, the notifier can now be used by any thread (eliminating things like NetworkChangeObserverProxy and NetworkChangeNotifierProxy, and expanding its usefulness); its creation and inner workings are much simplified (eliminating implementation-specific classes); and it is simpler to access (eliminating things like NetworkChangeNotifierThread and a LOT of passing pointers around). BUG=none TEST=Unittests; network changes still trigger notifications Review URL: http://codereview.chromium.org/2802015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50895 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Remove svn:executable from a bunch of files.thestig@chromium.org2010-06-256-0/+0
| | | | | | | | BUG=none TEST=checkperms.py passes Review URL: http://codereview.chromium.org/2850030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50887 0039d316-1c4b-4281-b951-d872f2087c98
* X509CertificateTest.IntermediateCertificates leaks several native ↵rsleevi@chromium.org2010-06-241-24/+29
| | | | | | | | | | | | certificate handles during the execution of the test. R=wtc BUG=none TEST=X509CertificateTest.IntermediateCertificates Review URL: http://codereview.chromium.org/2809024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50781 0039d316-1c4b-4281-b951-d872f2087c98
* Ignore duplicate SYN_REPLYs on the same stream. Added a unit test.mlloyd@chromium.org2010-06-244-4/+66
| | | | | | | | | BUG=45639 TEST=Added unit test, which caused an ASSERT fail before but now passes. Review URL: http://codereview.chromium.org/2871015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50751 0039d316-1c4b-4281-b951-d872f2087c98
* Don't close the socket in the HttpNetworkTransactionmlloyd@chromium.org2010-06-242-3/+67
| | | | | | | | | | | | | | destructor if we can and should keep the connection alive. This is necessary because in some situations, DoReadBodyComplete never gets called; this can happen, for example, when the response body length is zero, and the caller would be the cache transaction. BUG=47191 TEST=Added unit test. Existing net_unittests pass. Review URL: http://codereview.chromium.org/2807014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50740 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed bug where streams do not shutdown properly after the user callback ↵erikchen@google.com2010-06-2413-445/+680
| | | | | | | | | | | | | | | | | | | deletes the stream. Added a unit test. TEST=net_unittests BUG=46925 Merge branch 'trunk' of http://src.chromium.org/git/chromium into ukai_delegate_fix Revert "Revert 50215 because of crashes - Refactor SpdyStream to get HTTP specific out of the interface and members." This reverts commit 8f9bf3b9ba6663aeef7fbdab3edf16aeaa510f84. Review URL: http://codereview.chromium.org/2810022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50739 0039d316-1c4b-4281-b951-d872f2087c98
* Http Cache: Avoid re-validation of sparse entries if arvargas@google.com2010-06-242-13/+107
| | | | | | | | | | | | | regular freshness test for the entry allows us to just fetch it from the cache. BUG=42901 TEST=unittests, html5 video tests work as intended. Review URL: http://codereview.chromium.org/2844020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50738 0039d316-1c4b-4281-b951-d872f2087c98
* Time cache lock waitsgavinp@google.com2010-06-242-0/+7
| | | | | | | | | | | | | Chrome has a limitation that exclusive writers block all other readers or writers from accessing the cache. This CL creates an histogram so that I can track if this is actually a performance hit as prefetch starts arriving in the tree. BUG=none TEST=about:histograms Review URL: http://codereview.chromium.org/2831026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50731 0039d316-1c4b-4281-b951-d872f2087c98
* Create HttpAuthController. (again)vandebo@chromium.org2010-06-248-409/+538
| | | | | | | | | | | | This packages up the auth state into a single class to enable a HttpProxyClientSocket class (which is needed for SSLClientSocketPool). Fix memory leak. BUG=30357 TEST=existing unit tests Review URL: http://codereview.chromium.org/2808020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50696 0039d316-1c4b-4281-b951-d872f2087c98
* Change Windows' application/x-x509-user-cert handling to allow any ↵rsleevi@chromium.org2010-06-249-319/+3
| | | | | | | | | | | | certificate that has a private key, regardless of where it was generated, rather than restricting it to keys generated via <keygen> in the current browsing session. BUG=148 TEST=None R=wtc Review URL: http://codereview.chromium.org/2874002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50695 0039d316-1c4b-4281-b951-d872f2087c98
* Windows and NSS implementations allow for any certificate, while the Mac ↵rsleevi@chromium.org2010-06-241-2/+0
| | | | | | | | | | | implementation currenly constrains to certificates flagged for client authentication. The behaviour on other browsers is to allow any certificate for which the user has a private key, regardless of usage constraints, when handling application/x-x509-user-cert. BUG=148 TEST=none Review URL: http://codereview.chromium.org/2843015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50691 0039d316-1c4b-4281-b951-d872f2087c98
* Fix crash in GetSpdySessionFromSSLSocket in the case where thembelshe@chromium.org2010-06-246-19/+84
| | | | | | | | | | server immediately hangs up after negotiating SPDY via NPN. BUG=46369 TEST=SpdyNPNServerHangup Review URL: http://codereview.chromium.org/2862027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50689 0039d316-1c4b-4281-b951-d872f2087c98
* Don't need to copy the challenge data before calling DER_Encode becausewtc@chromium.org2010-06-242-10/+8
| | | | | | | | | | | DER_Encode will copy it. Document the GenKeyAndSignChallenge function. R=mattm,davidben BUG=148 TEST=none Review URL: http://codereview.chromium.org/2866011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50682 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 50647 - Create HttpAuthController.vandebo@chromium.org2010-06-238-539/+409
| | | | | | | | | | | | | | | | 'Memory tests' is not happy. This packages up the auth state into a single class to enable a HttpProxyClientSocket class (which is needed for SSLClientSocketPool). BUG=30357 TEST=existing unit tests Review URL: http://codereview.chromium.org/2808020 TBR=vandebo@chromium.org Review URL: http://codereview.chromium.org/2866018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50669 0039d316-1c4b-4281-b951-d872f2087c98
* Add a locked version of CryptAcquireContextdavidben@chromium.org2010-06-231-4/+7
| | | | | | | | | | | | The function is not thread-safe when called with certain flags. This will be useful when we move keygen onto a worker thread. BUG=none TEST=KeygenHandlerTest.SmokeTest (existing) Review URL: http://codereview.chromium.org/2828019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50661 0039d316-1c4b-4281-b951-d872f2087c98
* Create HttpAuthController.vandebo@chromium.org2010-06-238-409/+539
| | | | | | | | | | | This packages up the auth state into a single class to enable a HttpProxyClientSocket class (which is needed for SSLClientSocketPool). BUG=30357 TEST=existing unit tests Review URL: http://codereview.chromium.org/2808020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50647 0039d316-1c4b-4281-b951-d872f2087c98
* Remove some unused code.eroman@chromium.org2010-06-231-4/+0
| | | | | | | BUG=NONE Review URL: http://codereview.chromium.org/2824024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50625 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for international domain names in PAC scripts. This converts ↵eroman@chromium.org2010-06-233-6/+65
| | | | | | | | | | non-ASCII hostnames in dnsResolve() and dnsResolveEx() to punycode. BUG=47234 TEST=ProxyResolverV8Test.DNSResolutionOfInternationDomainName Review URL: http://codereview.chromium.org/2842017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50624 0039d316-1c4b-4281-b951-d872f2087c98
* Remove an unused member field.eroman@chromium.org2010-06-233-8/+4
| | | | | | | BUG=46821 Review URL: http://codereview.chromium.org/2826012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50612 0039d316-1c4b-4281-b951-d872f2087c98
* Address a couple of nits in comment wording.eroman@chromium.org2010-06-234-12/+13
| | | | | | | BUG=NONE Review URL: http://codereview.chromium.org/2830022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50611 0039d316-1c4b-4281-b951-d872f2087c98
* Fix files with svn:executable permissions.thestig@chromium.org2010-06-234-0/+0
| | | | | | | BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50566 0039d316-1c4b-4281-b951-d872f2087c98
* Clang: Do not ignore result of HANDLE_EINTR.thakis@chromium.org2010-06-231-1/+2
| | | | | | Review URL: http://codereview.chromium.org/2805026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50556 0039d316-1c4b-4281-b951-d872f2087c98
* Enable the disabled test ProxyResolverV8Test.ReturnUnicode, by addressing ↵eroman@chromium.org2010-06-235-111/+202
| | | | | | | | | | | | some encoding issues. Switched some uses of UTF-8 encoded std::strings to UTF-16 encoded string16 -- this avoids the confusion on which strings are unicode, since these std::string were getting passed around and later assumed to be ASCII. BUG=46608, 47234 Review URL: http://codereview.chromium.org/2827018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50549 0039d316-1c4b-4281-b951-d872f2087c98
* Add an additional per-request DNS cache when executing FindProxyForURL() ↵eroman@chromium.org2010-06-226-32/+238
| | | | | | | | | | | | | | from a PAC script. This mini-cache is more aggressive in caching negative resolutions, to avoid performance problems with PAC scripts that do lots of serial DNS resolves. This is necessary now that we no longer globally cache DNS resolve failures to avoid performance regressions. BUG=46821 Review URL: http://codereview.chromium.org/2833021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50495 0039d316-1c4b-4281-b951-d872f2087c98
* Style-fix: make a parameter a const reference.eroman@chromium.org2010-06-222-2/+2
| | | | | | Review URL: http://codereview.chromium.org/2873007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50491 0039d316-1c4b-4281-b951-d872f2087c98
* Factor out factory method for Google GET request, which is constructed ↵mlloyd@chromium.org2010-06-221-117/+53
| | | | | | | | | | identically 16 times. TEST=Test passes. Review URL: http://codereview.chromium.org/2812011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50488 0039d316-1c4b-4281-b951-d872f2087c98
* Initial commit of CookieMonster statistics.rdsmith@google.com2010-06-222-18/+90
| | | | | | | | | | | | | | | | | Specifically: * Number of cookies, recorded every ten minutes of active browsing (i.e. cookies being requested from CookieMonster) * Last access time, recorded when cookie accessed. * Last access time for evicted cookies, recorded on eviction * Time until cookie expires, recorded on insertion. * Reason for a cookie being removed from store, recorded when removed. * Size of batch update to persistent cookie store and whether it succeeded or failed, recorded at success/failure. BUG=4005 TEST=net_unittests CookieMonster.* on Linux Review URL: http://codereview.chromium.org/2718011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50477 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 50402 (build failure) - Pass in NetLog to NetworkChangeNotifier.willchan@chromium.org2010-06-2110-52/+15
| | | | | | | | | | | BUG=46822 Review URL: http://codereview.chromium.org/2857009 TBR=willchan@chromium.org Review URL: http://codereview.chromium.org/2843017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50406 0039d316-1c4b-4281-b951-d872f2087c98
* Pass in NetLog to NetworkChangeNotifier.willchan@chromium.org2010-06-2110-15/+52
| | | | | | | | BUG=46822 Review URL: http://codereview.chromium.org/2857009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50402 0039d316-1c4b-4281-b951-d872f2087c98
* A/B test for determining a value for unused socket timeout. Currently theziadh@chromium.org2010-06-217-12/+45
| | | | | | | | | | | | | | timeout defaults to 10 seconds. Having this value set too low won't allow us to take advantage of idle sockets. Setting it to too high could possibly result in more ERR_CONNECT_RESETs, requiring one RTT to receive the RST packet and possibly another RTT to re-establish the connection. r=jar Review URL: http://codereview.chromium.org/2827016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50364 0039d316-1c4b-4281-b951-d872f2087c98
* Added NetLog support for HTTP authentication.cbentzel@chromium.org2010-06-216-4/+127
| | | | | | | | | BUG=None TEST=net_unittests --gtest_filter="HttpAuthHandlerTest.NetLog" Review URL: http://codereview.chromium.org/2842013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50361 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 50296 (Causes DCHECK failures) - Make CookieMonster NonThreadSafe.willchan@chromium.org2010-06-212-23/+2
| | | | | | | | | | | | | Made ExtensionFunction RefCountedThreadSafe so it can be posted to different threads. Used WaitableEvent in AutomationProvider. BUG=44083 Review URL: http://codereview.chromium.org/2756003 TBR=willchan@chromium.org Review URL: http://codereview.chromium.org/2860012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50357 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor: Rename MockAuthHandler and move to a separate file.cbentzel@chromium.org2010-06-214-165/+237
| | | | | | | | | BUG=None TEST=net_unittests --gtest_filter="HttpNetworkTransactionTest.GenerateAuthToken" Review URL: http://codereview.chromium.org/2823011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50344 0039d316-1c4b-4281-b951-d872f2087c98
* Make CookieMonster NonThreadSafe.willchan@chromium.org2010-06-182-2/+23
| | | | | | | | | | Made ExtensionFunction RefCountedThreadSafe so it can be posted to different threads. Used WaitableEvent in AutomationProvider. BUG=44083 Review URL: http://codereview.chromium.org/2756003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50296 0039d316-1c4b-4281-b951-d872f2087c98
* Make FixupURL() return a GURL instead of a string (i.e. do fixup + ↵pkasting@chromium.org2010-06-182-21/+28
| | | | | | | | | | | | | | canonicalization). Nearly every caller was already doing this. This in turn allows us to do better fixup/canonicalization of view-source: URLs. We now convert "view-source:google.com" into "view-source:http://google.com/". With a few changes scattered through the omnibox code, this also means we can do HTTP-stripping on view-source: URLs, and support the user typing in things like the case above. This also fixes some weirdness where if you tried to type something starting with "view-source:", the What You Typed match in the dropdown would show only a scheme, or a scheme plus "http:", in some cases. BUG=46612 TEST="view-source:google.com" should work. Review URL: http://codereview.chromium.org/2817011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50290 0039d316-1c4b-4281-b951-d872f2087c98
* TTF: Reenable some disabled tests.vandebo@chromium.org2010-06-181-3/+3
| | | | | | | | | | | | | | | | (recommit changes that were reverted, minus troublesome one original CL: http://codereview.chromium.org/2819011 ) DevToolsSanityTest.TestConsoleLog seems to work ProxyResolverV8Test.FAILS_ReturnUnicode VectorCanvasTest.FAILS_Matrix TEST=none BUG=disabled tests Review URL: http://codereview.chromium.org/2870014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50279 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 50215 because of crashes - Refactor SpdyStream to get HTTP specific ↵willchan@chromium.org2010-06-1811-591/+427
| | | | | | | | | | | | | | | | | | | | | out of the interface and members. Add SpdyStream::Delegate interface and SpdyHttpStream implements SpdyStream::Delegate. SpdyHeaderBlock<>HTTP request/response conversion functions moved from spdy_session.cc to spdy_http_stream.cc. All interface between SpdySession and SpdyStream uses SpdyHeaderBlock instead of HttpRequestInfo,HttpResponseInfo. BUG=42320,46925 TEST=none Review URL: http://codereview.chromium.org/2667002 TBR=ukai@chromium.org Review URL: http://codereview.chromium.org/2827015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50268 0039d316-1c4b-4281-b951-d872f2087c98
* FAILS tests should not turn the bot red.vandebo@chromium.org2010-06-181-3/+3
| | | | | | | | | | | | | | | | | | | Revert 50258 - TTF: Reenable some disabled tests. DevToolsSanityTest.TestConsoleLog seems to work ProxyResolverV8Test.FAILS_ReturnUnicode DepTest.FAILS_TestDepDisable VectorCanvasTest.FAILS_Matrix TEST=none BUG=disabled tests Review URL: http://codereview.chromium.org/2819011 TBR=vandebo@chromium.org Review URL: http://codereview.chromium.org/2862016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50261 0039d316-1c4b-4281-b951-d872f2087c98
* Move the Mozilla-derived code in net/base/keygen_handler_nss.ccwtc@chromium.org2010-06-186-235/+397
| | | | | | | | | | | | | to the new net/third_party/mozilla_security_manager directory. Fix nits. R=mattm,davidben BUG=148 TEST=none Review URL: http://codereview.chromium.org/2824014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50259 0039d316-1c4b-4281-b951-d872f2087c98
* TTF: Reenable some disabled tests.vandebo@chromium.org2010-06-181-3/+3
| | | | | | | | | | | | | | DevToolsSanityTest.TestConsoleLog seems to work ProxyResolverV8Test.FAILS_ReturnUnicode DepTest.FAILS_TestDepDisable VectorCanvasTest.FAILS_Matrix TEST=none BUG=disabled tests Review URL: http://codereview.chromium.org/2819011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50258 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor SpdyStream to get HTTP specific out of the interface and members.ukai@chromium.org2010-06-1811-427/+591
| | | | | | | | | | | | | | | | Add SpdyStream::Delegate interface and SpdyHttpStream implements SpdyStream::Delegate. SpdyHeaderBlock<->HTTP request/response conversion functions moved from spdy_session.cc to spdy_http_stream.cc. All interface between SpdySession and SpdyStream uses SpdyHeaderBlock instead of HttpRequestInfo,HttpResponseInfo. BUG=42320 TEST=none Review URL: http://codereview.chromium.org/2667002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50215 0039d316-1c4b-4281-b951-d872f2087c98
* Fix crash in SpdySession::DeleteStream.ukai@chromium.org2010-06-181-2/+2
| | | | | | | | | | | Erase iterator before calling OnClose BUG=46765 TEST=none Review URL: http://codereview.chromium.org/2847015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50198 0039d316-1c4b-4281-b951-d872f2087c98
* Disk Cache: Remove deprecated methods from the disk cache interface.rvargas@google.com2010-06-1716-191/+168
| | | | | | | | | | | BUG=26730 TEST=current tests Review URL: http://codereview.chromium.org/2869005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50147 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unfixable test.vandebo@chromium.org2010-06-171-15/+0
| | | | | | | | | BUG=disabled test TEST=none Review URL: http://codereview.chromium.org/2868006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50144 0039d316-1c4b-4281-b951-d872f2087c98
* Disable caching of failed DNS lookups.eroman@chromium.org2010-06-171-1/+1
| | | | | | | | | | | | This is causing problems on network changes, since we don't have a reliable signal for telling when DNS is back up (so we aren't able to flush the cache properly). This will regress bug 1672, filed 46821 to address that. BUG=46821 Review URL: http://codereview.chromium.org/2873003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50141 0039d316-1c4b-4281-b951-d872f2087c98
* Implement a TODO: Move "NonThreadSafe" inheritance from ↵pkasting@chromium.org2010-06-178-49/+82
| | | | | | | | | | | | NetworkChangeNotifier interface to implementations. Also add CalledOnValidThread() DCHECKs in as many places as possible. Some minor style changes. BUG=none TEST=none Review URL: http://codereview.chromium.org/2813019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50139 0039d316-1c4b-4281-b951-d872f2087c98
* Assert SetCookieableScheme called before first use.rdsmith@google.com2010-06-172-0/+5
| | | | | | | | | BUG=44476 TEST=Linux CookieMonster.SetCookieableSchemes (as modified) Review URL: http://codereview.chromium.org/2869002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50105 0039d316-1c4b-4281-b951-d872f2087c98
* HttpNetworkTransaction handles asynchronous auth token generation.cbentzel@chromium.org2010-06-177-110/+604
| | | | | | | | | BUG=21050,42222 TEST=net_unittests Review URL: http://codereview.chromium.org/2722009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50088 0039d316-1c4b-4281-b951-d872f2087c98
* Check state in SocketStream delegate methods.ukai@chromium.org2010-06-171-0/+11
| | | | | | | | | | | I suspect flaky failure in reload-crash.html was OnSentData is called when state_ has been changed to CLOSED while sending handshake message. BUG=45720 TEST=none Review URL: http://codereview.chromium.org/2845012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50087 0039d316-1c4b-4281-b951-d872f2087c98
* Check proxy_info_.is_empty()ukai@chromium.org2010-06-171-2/+11
| | | | | | | | | | | | In case proxy_info_.is_empty(), we can't access proxy_info_.proxy_server() or so. BUG=46750 TEST=none Review URL: http://codereview.chromium.org/2803010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50078 0039d316-1c4b-4281-b951-d872f2087c98