summaryrefslogtreecommitdiffstats
path: root/chrome/browser/net/preconnect.cc
Commit message (Collapse)AuthorAgeFilesLines
* Move BrowserThread to content namespace.joi@chromium.org2011-11-021-0/+2
| | | | | | | | | TBR=owners BUG=98716 Review URL: http://codereview.chromium.org/8437002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108270 0039d316-1c4b-4281-b951-d872f2087c98
* Split BrowserThread into public API and private implementation, step 1.joi@chromium.org2011-10-281-1/+1
| | | | | | | | | | | | | | | | | | | | | Only content/ now has the ability to create BrowserThread objects, with the exception that tests can create the content::TestBrowserThread subclass, and (temporarily) code in chrome/ can create the DeprecatedBrowserThread subclass. A follow-up change will make content/ take care of its own thread creation, remove DeprecatedBrowserThread, and move all state and non-trivial constructors from BrowserThread down to BrowserThreadImpl. Also moved BrowserProcessSubThread into content/ namespace. As part of follow-up cleanup, chrome/ will stop using this class. BUG=98716 TEST=existing Review URL: http://codereview.chromium.org/8392042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107718 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 106437 (seems to break _all_ the sync unit tests) - Updating ↵thakis@chromium.org2011-10-201-9/+10
| | | | | | | | | | | | | | | | Preconnect to no longer get the default context. Instead it now gets the profile's context. BUG=97759 TEST=passes existing Review URL: http://codereview.chromium.org/8165015 TBR=rlp@chromium.org Review URL: http://codereview.chromium.org/8355033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106443 0039d316-1c4b-4281-b951-d872f2087c98
* Updating Preconnect to no longer get the default context. Instead it now ↵rlp@chromium.org2011-10-201-10/+9
| | | | | | | | | | | | | gets the profile's context. BUG=97759 TEST=passes existing Review URL: http://codereview.chromium.org/8165015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106437 0039d316-1c4b-4281-b951-d872f2087c98
* net: rework the NPN patch.agl@chromium.org2011-10-181-2/+2
| | | | | | | | | | | | | | | | | | This change moves the protocol selection logic out of NSS and into Chromium code. This allows some things to be a little cleaner (no more wire-encoded NPN strings) and also allows for some tricks that we have been considering for SPDY+WebSockets. As a consequence of this change, next protocols are now a std::vector<std::string> rather than an encoded char* BUG=none TEST=SPDY still works with Google sites. Review URL: http://codereview.chromium.org/8156001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106093 0039d316-1c4b-4281-b951-d872f2087c98
* Change HttpNetworkTransaction and HttpStreamFactoryImpl::Job rch@chromium.org2011-09-021-1/+1
| | | | | | | | | | | | | | to keep different SSLConfig objects for HTTPS Proxies vs HTTPS Servers. Add an is_proxy field to SSLCertRequest indicating if the request came from a proxy or from an origin server. BUG=95071 Review URL: http://codereview.chromium.org/7768002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99392 0039d316-1c4b-4281-b951-d872f2087c98
* Deprecate Profile::GetDefaultRequestContext().willchan@chromium.org2011-07-201-1/+2
| | | | | | | | | | | | Make it private and establish a friend whitelist for existing users. BUG=64339 TEST=none Review URL: http://codereview.chromium.org/7438002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93200 0039d316-1c4b-4281-b951-d872f2087c98
* Ensure User-agent is present in preconnection requestjar@chromium.org2011-04-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the global default context to get *some* UA string in a preconnect. This is a change that was suggested by wtc, and I've tested it by adding (in my local build) a CHECK() of the getter result in net/socket/client_socket_pool_manager.cc. This change is a very low risk, high reward P1 fix. It is pretty inconceivable that it could do anything other than help the status quo. I was going to land the CHECK(), but the number of changes to unit tests was large, and adding the CHECK() is best done on a canary. As a result, I'll break out the changes to at least: net/http/http_stream_factory_impl_unittest.cc net/http/http_network_transaction_unittest.cc along with the CHECK() change to: net/socket/client_socket_pool_manager.cc in a separate CL. r=wtc BUG=78037 Review URL: http://codereview.chromium.org/6799018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80866 0039d316-1c4b-4281-b951-d872f2087c98
* Consistently trim learned referrer databasejar@chromium.org2011-04-061-0/+1
| | | | | | | | | | | | | | | | | | | | Data learned during navigation, about subresources, was only being trimmed (pruned?) at shutdown. This CL regularly calls for reductions in contents. Without this, long lived clients can accumulate large lists. We also form two preconnections to a site if we have no prior info about its sub-resources. This accelerates learned activity. This CL also sets the initial estimate of number of connections needed to 2, so that we are more aggressive in our learning curves about sub-resources. R=mbelshe BUG=75200 Review URL: http://codereview.chromium.org/6628063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80637 0039d316-1c4b-4281-b951-d872f2087c98
* Moved URLRequestContextGetter to net/ so it can be used by projects such as ↵sanjeevr@chromium.org2011-03-311-3/+3
| | | | | | | | | | jingle. BUG=None TEST=Build. Review URL: http://codereview.chromium.org/6778025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80033 0039d316-1c4b-4281-b951-d872f2087c98
* Update a bunch of files to the new location of browser_thread.h jam@chromium.org2011-03-011-1/+1
| | | | | | | TBR=avi Review URL: http://codereview.chromium.org/6591065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76387 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor HttpStreamFactory.willchan@chromium.org2011-02-231-46/+30
| | | | | | | | | | | | | | | | | | | Rename StreamFactory and StreamRequest to HttpStreamFactory and HttpStreamRequest. Rename HttpStreamFactory to HttpStreamFactoryImpl. Create HttpStreamFactoryImpl::Request (inherits from HttpStreamRequest) and HttpStreamFactoryImpl::Job (most of the old HttpStreamRequest code, other than the interface, moved here). Currently there is still a strong binding within HttpStreamFactoryImpl between requests and jobs. This will be removed in a future changelist. Note that due to the preparation for late binding, information like HttpRequestInfo and SSLConfig and ProxyInfo are just copied. It's possible we can consider refcounting them to reduce copies, but I think it's not worth the effort / ugliness. I also did some minor cleanups like moving SpdySettingsStorage into SpdySessionPool and some CloseIdleConnections() cleanup. BUG=54371,42669 TEST=unit tests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=75668 Review URL: http://codereview.chromium.org/6543004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75688 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 75668 for breaking ChromeOS build - Refactor HttpStreamFactory.willchan@chromium.org2011-02-231-30/+46
| | | | | | | | | | | | | | | | | | | Rename StreamFactory and StreamRequest to HttpStreamFactory and HttpStreamRequest. Rename HttpStreamFactory to HttpStreamFactoryImpl. Create HttpStreamFactoryImpl::Request (inherits from HttpStreamRequest) and HttpStreamFactoryImpl::Job (most of the old HttpStreamRequest code, other than the interface, moved here). Currently there is still a strong binding within HttpStreamFactoryImpl between requests and jobs. This will be removed in a future changelist. Note that due to the preparation for late binding, information like HttpRequestInfo and SSLConfig and ProxyInfo are just copied. It's possible we can consider refcounting them to reduce copies, but I think it's not worth the effort / ugliness. I also did some minor cleanups like moving SpdySettingsStorage into SpdySessionPool and some CloseIdleConnections() cleanup. BUG=54371,42669 TEST=unit tests Review URL: http://codereview.chromium.org/6543004 TBR=willchan@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75670 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor HttpStreamFactory.willchan@chromium.org2011-02-221-46/+30
| | | | | | | | | | | | | | | | | Rename StreamFactory and StreamRequest to HttpStreamFactory and HttpStreamRequest. Rename HttpStreamFactory to HttpStreamFactoryImpl. Create HttpStreamFactoryImpl::Request (inherits from HttpStreamRequest) and HttpStreamFactoryImpl::Job (most of the old HttpStreamRequest code, other than the interface, moved here). Currently there is still a strong binding within HttpStreamFactoryImpl between requests and jobs. This will be removed in a future changelist. Note that due to the preparation for late binding, information like HttpRequestInfo and SSLConfig and ProxyInfo are just copied. It's possible we can consider refcounting them to reduce copies, but I think it's not worth the effort / ugliness. I also did some minor cleanups like moving SpdySettingsStorage into SpdySessionPool and some CloseIdleConnections() cleanup. BUG=54371,42669 TEST=unit tests Review URL: http://codereview.chromium.org/6543004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75668 0039d316-1c4b-4281-b951-d872f2087c98
* net: Remove typedef net::URLRequestContext URLRequestContext;tfarina@chromium.org2011-01-151-1/+1
| | | | | | | | | BUG=64263 TEST=compiled locally, trybots Review URL: http://codereview.chromium.org/6338002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71522 0039d316-1c4b-4281-b951-d872f2087c98
* Move:ben@chromium.org2010-12-021-1/+1
| | | | | | | | | | | | | | | file_path_watcher into subdir profile* into profiles/ subdir login* into ui/login visitedlink* into subdir BUG=none TEST=none TBR=brettw Review URL: http://codereview.chromium.org/5606002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68069 0039d316-1c4b-4281-b951-d872f2087c98
* Support predictive request for multiple preconnectionsjar@chromium.org2010-11-301-35/+19
| | | | | | | | | | | | | | | [reland CL 5271002... with CrOS / ARM interface update] Connected up to the API for requesting more than one preconnect at a time (that API also explicitly tags requsets as preconnects, so that they can be merged with actual navication requests). BUG=64246 r=willchan,mbelshe Review URL: http://codereview.chromium.org/5400002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67654 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 67614 - Support predictive request for multiple preconnectionsjar@chromium.org2010-11-301-19/+35
| | | | | | | | | | | | | | | | Connected up to the API for requesting more than one preconnect at a time (that API also explicitly tags requsets as preconnects, so that they can be merged with actual navication requests). BUG=64246 r=willchan,mbelshe Review URL: http://codereview.chromium.org/5271002 TBR=jar@chromium.org Review URL: http://codereview.chromium.org/5397003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67622 0039d316-1c4b-4281-b951-d872f2087c98
* Support predictive request for multiple preconnectionsjar@chromium.org2010-11-291-35/+19
| | | | | | | | | | | | | Connected up to the API for requesting more than one preconnect at a time (that API also explicitly tags requsets as preconnects, so that they can be merged with actual navication requests). BUG=64246 r=willchan,mbelshe Review URL: http://codereview.chromium.org/5271002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67614 0039d316-1c4b-4281-b951-d872f2087c98
* We have to do EV certificate verification for every resourcewtc@chromium.org2010-11-021-1/+1
| | | | | | | | | | | | | load. The performance optimization of doing EV verification for only main frames is incorrect with HTTP keep-alive connections. R=eroman BUG=41267 TEST=Visit https://www.paypal.com/. Hit the Reload button repeatedly. The EV status should not disappear. Review URL: http://codereview.chromium.org/3938001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64813 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup StreamFactory && StreamRequest APIs.willchan@chromium.org2010-10-141-3/+8
| | | | | | | | | | | | Stop refcounting StreamRequest. Establish a clear ownership of the StreamRequest. Deletion implies cancellation. Use ScopedRunnableMethodFactory::NewRunnableMethod() instead of NewRunnableMethod(). Remove Start() from StreamRequest. This is an implementation detail of HttpStreamRequest, so it only exists there now. BUG=59103 TEST=existing, this is a pure refactor. Review URL: http://codereview.chromium.org/3746002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62581 0039d316-1c4b-4281-b951-d872f2087c98
* Add a RenewStreamForAuth method to HttpStream, replacing DetachConnectionvandebo@chromium.org2010-10-141-7/+2
| | | | | | | | | BUG=58192 TEST=Start chrome with --auth-schemes=NTLM and --proxy-server pointing to a Microsoft Forefront Threat Management Gateway proxy configurated for Integrated Authentication. Assuming the user is part of the same domain as the proxy, authentication should work transparently, and the user should not be presented with auth prompts. Also, net_unittests should pass. Review URL: http://codereview.chromium.org/3676004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62564 0039d316-1c4b-4281-b951-d872f2087c98
* Move Stats, histograms, and field trial into a metrics subdirectory of base andbrettw@chromium.org2010-10-141-1/+1
| | | | | | | | | put them in the base namespace. TEST=it compiles BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62510 0039d316-1c4b-4281-b951-d872f2087c98
* Rename ChromeThread to BrowserThread Part21:tfarina@chromium.org2010-10-121-1/+1
| | | | | | | | | | | - Include browser_thread.h instead of chrome_thread.h in more 100 files. BUG=56926 TEST=trybots Review URL: http://codereview.chromium.org/3691006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62286 0039d316-1c4b-4281-b951-d872f2087c98
* Rename ChromeThread to BrowserThread Part8:tfarina@chromium.org2010-10-091-3/+3
| | | | | | | | | | | - Rename entries under net and password_manager and printing. BUG=56926 TEST=trybots Review URL: http://codereview.chromium.org/3645001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62062 0039d316-1c4b-4281-b951-d872f2087c98
* Detach the ClientSocketHandle from an HttpStream so the same socket can be ↵cbentzel@chromium.org2010-10-061-2/+7
| | | | | | | | | | | | | reused for multiple rounds of NTLM authentication. BUG=57261 TEST=Start chrome with --auth-schemes=NTLM and --proxy-server pointing to a Microsoft Forefront Threat Management Gateway proxy configurated for Integrated Authentication. Assuming the user is part of the same domain as the proxy, authentication should work transparently, and the user should not be presented with auth prompts. Also, net_unittests should pass. Review URL: http://codereview.chromium.org/3578016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61724 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate HttpStreamHandle. The name confused me.willchan@chromium.org2010-09-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Update the Preconnect logic to use the new HttpStreamFactory formbelshe@chromium.org2010-09-031-93/+59
| | | | | | | | | | | | | | | | creating connections rather than doing it manually. With this update, I believe we no longer need to avoid preconnects through proxies. The new logic can handle that case. Also updated the predictor_api slightly for the next wave of work. BUG=none TEST=existing Review URL: http://codereview.chromium.org/3226011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58464 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor: Address a TODO about renaming a function.eroman@chromium.org2010-08-311-1/+1
| | | | | | Review URL: http://codereview.chromium.org/3216008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57959 0039d316-1c4b-4281-b951-d872f2087c98
* Display the "effective" proxy settings in about:net-internals.eroman@chromium.org2010-08-281-3/+3
| | | | | | | | | | | | The "effective" settings is what you get after applying the various fallbacks between automatic and manual settings. This display makes it easier to notice whether "auto-detect" actually took effect, and if so what was the PAC URL it used. BUG=53549 TEST=On windows change your proxy settings to include both auto-detect, a custom pac script, and some manually configured proxy servers. Now run chrome and go to the proxy tab on about:net-internals. Check that the "original" settings is what you entered in the dialog box, however the "effective" settings will only be a subset of them. Review URL: http://codereview.chromium.org/3241002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57767 0039d316-1c4b-4281-b951-d872f2087c98
* (repair leak) Handle synchronous request for a preconnectionjar@chromium.org2010-08-101-6/+9
| | | | | | | | | | | | | In some situations, the preconnection can be serviced synchronously, and then there will be no callback to release the Preconnect instance. This change properly handles that eventuality. BUG=51133 r=wtc Review URL: http://codereview.chromium.org/3115003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55517 0039d316-1c4b-4281-b951-d872f2087c98
* (repair leak) Protect instance after commiting to use networkjar@chromium.org2010-08-091-2/+2
| | | | | | | | | | | | | | | The code was incorrectly protecting an instance of Preconnect before deciding it would actually perform the async network calls, and need the instance to stay alive for a callback. The leak was caused when we exited the function, did not make the asnyc call, but still incref'ed the instance expecting a callback to come and decref it. BUG=51133 r=wtc Review URL: http://codereview.chromium.org/3086023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55435 0039d316-1c4b-4281-b951-d872f2087c98
* Reland 54771 (and 54795) To enable TCP Preconnection by defaultjar@chromium.org2010-08-061-21/+43
| | | | | | | | | | | | | | | | | | | | | | | I pulled out the code to update the socket connectivity stats. I added defensive code which should preclude the crash that was reported on the stability bot. I added a second call to update the stats from ~ClientSocketHandle to ensure that we updated the related ClientSocket when we are torn down. As noted in the original checkin: Enable speculative preconnection by default Added histogram to track preconnection utilization (vs waste). BUG=42694 r=mbelshe Review URL: http://codereview.chromium.org/3050040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55197 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 55071 - Reland 54771 (and 54795) To enable TCP Preconnection by defaultdhollowa@chromium.org2010-08-051-43/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Leaks reported with this CL. http://build.chromium.org/buildbot/memory/builders/Linux%20Heapcheck/builds/6130/steps/heapcheck%20test:%20net/logs/stdio Eg. Leak of 24 bytes in 1 objects allocated from: @ 84aece net::SSLClientSocketNSS::BufferRecv @ 84b161 net::SSLClientSocketNSS::DoTransportIO @ 84ca1f net::SSLClientSocketNSS::DoHandshakeLoop @ 84ca6b net::SSLClientSocketNSS::OnHandshakeIOComplete @ 84cadc net::SSLClientSocketNSS::OnRecvComplete @ 84cbb0 net::SSLClientSocketNSS::BufferRecvComplete @ 84ea4b void DispatchToMethod @ 84ea7b CallbackImpl::RunWithParams @ 4b3a10 CallbackRunner::Run @ 853e7e net::TCPClientSocketLibevent::DoReadCallback @ 85426f net::TCPClientSocketLibevent::DidCompleteRead @ 856a5c net::TCPClientSocketLibevent::ReadWatcher::OnFileCanReadWithoutBlocking @ 93d8fd base::MessagePumpLibevent::FileDescriptorWatcher::OnFileCanReadWithoutBlocking @ 93d966 base::MessagePumpLibevent::OnLibeventNotification @ 9da639 event_process_active @ 9da923 event_base_loop @ 93dfd0 base::MessagePumpLibevent::Run @ 8f2873 MessageLoop::RunInternal @ 8f2893 MessageLoop::RunHandler @ 8f2938 MessageLoop::Run @ 44b7f9 TestCompletionCallback::WaitForResult @ 6a1ee6 SSLClientSocketTest_ConnectMismatched_Test::TestBody @ 961831 testing::Test::Run @ 965026 testing::internal::TestInfoImpl::Run @ 96515c testing::TestCase::Run @ 965bbe testing::internal::UnitTestImpl::RunAllTests @ 965d35 testing::UnitTest::Run @ 4a4bf7 TestSuite::Run @ 4a3b6d main @ 2adff5bb11c4 __libc_start_main Suppression: { <insert_a_suppression_name_here> Heapcheck:Leak fun:net::SSLClientSocketNSS::BufferRecv fun:net::SSLClientSocketNSS::DoTransportIO fun:net::SSLClientSocketNSS::DoHandshakeLoop fun:net::SSLClientSocketNSS::OnHandshakeIOComplete fun:net::SSLClientSocketNSS::OnRecvComplete fun:net::SSLClientSocketNSS::BufferRecvComplete fun:void DispatchToMethod fun:CallbackImpl::RunWithParams fun:CallbackRunner::Run fun:net::TCPClientSocketLibevent::DoReadCallback fun:net::TCPClientSocketLibevent::DidCompleteRead fun:net::TCPClientSocketLibevent::ReadWatcher::OnFileCanReadWithoutBlocking fun:base::MessagePumpLibevent::FileDescriptorWatcher::OnFileCanReadWithoutBlocking fun:base::MessagePumpLibevent::OnLibeventNotification fun:event_process_active fun:event_base_loop fun:base::MessagePumpLibevent::Run fun:MessageLoop::RunInternal fun:MessageLoop::RunHandler fun:MessageLoop::Run fun:TestCompletionCallback::WaitForResult fun:SSLClientSocketTest_ConnectMismatched_Test::TestBody fun:testing::Test::Run fun:testing::internal::TestInfoImpl::Run fun:testing::TestCase::Run fun:testing::internal::UnitTestImpl::RunAllTests fun:testing::UnitTest::Run fun:TestSuite::Run fun:main fun:__libc_start_main } I added defensive code in ClientSocketHandle::ReleaseSocket(), which should preclude the crash that was reported on the stability bot. I added a second call to ReleaseSocket() from ~ClientSocketHandle to ensure that we updated the related ClientSocket when we are torn down. r=mbelshe Review URL: http://codereview.chromium.org/3071022 TBR=jar@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55090 0039d316-1c4b-4281-b951-d872f2087c98
* Reland 54771 (and 54795) To enable TCP Preconnection by defaultjar@chromium.org2010-08-051-21/+43
| | | | | | | | | | | | | | | I added defensive code in ClientSocketHandle::ReleaseSocket(), which should preclude the crash that was reported on the stability bot. I added a second call to ReleaseSocket() from ~ClientSocketHandle to ensure that we updated the related ClientSocket when we are torn down. r=mbelshe Review URL: http://codereview.chromium.org/3071022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55071 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 54771 - Enable speculative preconnection by defaultjar@chromium.org2010-08-041-43/+21
| | | | | | | | | | | | | | Added histogram to track utilization (vs waste). [The stability bot was reporting problems, so I'm reverting] r=mbelshe Review URL: http://codereview.chromium.org/3026038 TBR=jar@chromium.org Review URL: http://codereview.chromium.org/3090011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54930 0039d316-1c4b-4281-b951-d872f2087c98
* Enable speculative preconnection by defaultjar@chromium.org2010-08-031-21/+43
| | | | | | | | | Added histogram to track utilization (vs waste). r=mbelshe Review URL: http://codereview.chromium.org/3026038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54771 0039d316-1c4b-4281-b951-d872f2087c98
* Move ASCIIToWide and ASCIIToUTF16 to utf_string_conversions.h. I've found itbrettw@chromium.org2010-07-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | weird that UTF8ToWide is in utf_string_conversions, but ASCIIToWide is in string_util.h. This should help some dependencies since string_util changes much more frequently than utf_string_conversions and fewer files will now need string_utils. Since this requires a lot of changes, this keeps a forward-declaration in string_util so I can update the entire project incrementally. This change updates base and net only. I removed some includes of string_util from header files in net. In particular, url_request_context which involved creating a new .cc file to implement a function (already virtual so there's no speed penalty). It turns out a lot of files were getting string_util from this include, so I had to update a bunch of random files to now explicitly include string_util.h TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3076013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54456 0039d316-1c4b-4281-b951-d872f2087c98
* Support both preconnection, and pre-resolution for subresourcesjar@chromium.org2010-07-281-6/+10
| | | | | | | | | | | | | | | With this change, both preconnection and preresolution are enabled when the --enable-preconnection flag is turned on. I'm expecting to enable this feature by default soon, so as to better tune the parameters. BUG=42694 r=mbelshe Review URL: http://codereview.chromium.org/3032014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54044 0039d316-1c4b-4281-b951-d872f2087c98
* SPDY now always uses http_network_transaction instead of ↵erikchen@google.com2010-07-231-1/+1
| | | | | | | | | | | | | | | | spdy_network_transaction. It was previously possible to use spdy_network_transaction using the command line flags: --use-spdy=no-ssl --use-spdy=no-compress This does not affect instances of chrome that are not run with --use-spdy. Also changed spdy_network_transaction_unittest so that all tests are run with 3 different connection configurations: spdy over npn, spdy over ssl, and spdy without ssl. TEST=net_unittests BUG=49082 Review URL: http://codereview.chromium.org/3048003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53548 0039d316-1c4b-4281-b951-d872f2087c98
* Implement SSLClientSocketPool.vandebo@chromium.org2010-07-141-9/+31
| | | | | | | | | | | | To support SSLClientSocketPool, ClientSocketPoolBase and ClientSocketHandle require a notion of additional error state reported from the pool. Overtime the error handling may get become more integrated, alleviating the need for some of the additional error state. To support getting Http Proxy credentials from the user, the SSLClientSocketPool will release unauthenticated HttpProxyClientSocket's into the pool as idle. However, it checks their authentication status when receiving one, completing the authentication once the user has provided the credentials. BUG=30357 TEST=existing unit tests, ClientSocketPoolBaseTest.AdditionalErrorState*, SSLClientSocketPoolTest.* Review URL: http://codereview.chromium.org/2870030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52275 0039d316-1c4b-4281-b951-d872f2087c98
* Make the various SocketParams reference counted.vandebo@chromium.org2010-07-121-2/+3
| | | | | | | | | | | This is so that the SSLSocketParam can hold one of any of the existing SocketParams. BUG=30357 TEST=existing unit tests Review URL: http://codereview.chromium.org/2848029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52107 0039d316-1c4b-4281-b951-d872f2087c98
* Avoid preconnect (and pre-resolution) when proxy MIGHT be presentjar@chromium.org2010-07-091-0/+39
| | | | | | | | | | | | | | | | | | | This change detects if there is a chance that a proxy MIGHT be used to perform a connection, and if so, it avoids doing any speculative preconnections, or speculative DNS pre-resolution. For testing purposes, a flag is provided to avoid this probe for proxy status. If you enable --preconnect-despite-proxy then preconnection will take place (as appropriate) even if there is a chance that a proxy might be used for connections to some hosts. BUG=47906 r=eroman Review URL: http://codereview.chromium.org/2871038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52016 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the construction of the pool names for preconnect.mbelshe@chromium.org2010-06-291-1/+7
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/2842033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51163 0039d316-1c4b-4281-b951-d872f2087c98
* Do speculative preconnection based on network traffic (not just DNS)jar@chromium.org2010-06-231-6/+6
| | | | | | | | | | | | This rev also handles the triple of scheme/host/port for recording both referrers and speculative connections, so that we can soon support SSL warming as well as "mere" TCP/IP preconnection. r=mbelshe Review URL: http://codereview.chromium.org/2563004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50563 0039d316-1c4b-4281-b951-d872f2087c98
* Support speculative pre-connection to search URLsjar@chromium.org2010-05-181-0/+67
Implement several flavors of TCP/IP speculative preconnection under a command line flag (not yet on by default). The first area of preconnection takes place when a user types a query into the omnibox, as we preconnect to the search service when the omnibox suggests it is going to do a search. The second area involves subresources, such as images. When a navigation takes place, and we've seen navigations to that domain/port before, and the history-based probabability that we'll need to make a connection to a second site (host/port) is sufficiently large, then we preconnect to that second site while we are still connecting to the primary site (and before we've gotten content from the primary site. We also fall-back to mere DNS pre-resolution of subresource hostnames when the probability of a connection to the subresource is not high enough. BUG=42694 r=pkasting,willchan,mbelshe Review URL: http://codereview.chromium.org/1585029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47479 0039d316-1c4b-4281-b951-d872f2087c98