summaryrefslogtreecommitdiffstats
path: root/net/proxy
Commit message (Collapse)AuthorAgeFilesLines
* WriteInto handles length_with_null values of 1 better.cbentzel@chromium.org2011-10-181-2/+5
| | | | | | | | | | | | | | | | In debug builds on VS2010, the old code triggered a debug assertion in xstring, since [0] was being accessed and the size of the array was 0. A |length_with_null| of 1 is considered a valid use of this function, so an alternate implementation is used which returns the data() pointer. BUG=None TEST=net_unittests --gtest_filter=*Digest* on debug on VS2010 works. Review URL: http://codereview.chromium.org/8143001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106062 0039d316-1c4b-4281-b951-d872f2087c98
* Add WorkerPool::PostTaskAndReply and use in DHCP code.joi@chromium.org2011-10-146-216/+134
| | | | | | | | | | | | | This factors out the PostTaskAndReply implementation out of MessageLoopProxy so that it can be used for any destination thread accessible via a PostTask-like interface, and uses that code from both MessageLoopProxy and WorkerPool. The DhcpProxyScriptFetcherWin and DhcpProxyScriptAdapterFetcher classes were both using a PostTaskAndReply-like mechanism with a WorkerPool thread, and on inspection it looks like there are several places in net/ where this is done, and this motivated the larger change (vs. patch set 1 which was a mechanical switch to base::Bind from NewRunnableMethod). BUG=97516 TEST=net_unittests Review URL: http://codereview.chromium.org/8139028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105512 0039d316-1c4b-4281-b951-d872f2087c98
* Define id_ to have the ID type for better readability.wtc@chromium.org2011-10-131-2/+2
| | | | | | | | | | R=eroman@chromium.org BUG=none TEST=no compilation error Review URL: http://codereview.chromium.org/8251007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105245 0039d316-1c4b-4281-b951-d872f2087c98
* net: ignore revocation check failures when fetching a proxy script.agl@chromium.org2011-10-121-0/+5
| | | | | | | | | | | | | | | | Revocation checking should already be disabled for loading PAC scripts but rsleevi suggests that there's a bug in OS X which causes revocation checking to occur anyway. That would explain when the bug reporter saw UNABLE_TO_CHECK_REVOCATION. Therefore, ignore revocation check failures when fetching PAC scripts. BUG=98833 TEST=Block access to the OCSP and CRL for a certificate in a chain for an HTTPS PAC script. Check that the PAC script still loads. Review URL: http://codereview.chromium.org/8201009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105086 0039d316-1c4b-4281-b951-d872f2087c98
* Migrate HttpAlternateProtocols to HttpServerPropertiesImpl.willchan@chromium.org2011-10-101-0/+3
| | | | | | | | | | | | | Hooks in HttpServerPropertiesManager also. No persistence done yet. This is all plumbing. Also require HttpServerProperties in HttpNetworkSession::Params. BUG=98472 TEST=none Review URL: http://codereview.chromium.org/8211003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104696 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: convert some uses of NewRunnable*() to base::Bind() in the proxy code.mdm@chromium.org2011-10-061-28/+8
| | | | | | Review URL: http://codereview.chromium.org/8181002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104387 0039d316-1c4b-4281-b951-d872f2087c98
* Bocking onReceivedHeaders signal for webRequest APIbattre@chromium.org2011-10-051-0/+7
| | | | | | | | | | | | | | This is a new signal that allows extensions to - Modify/Delete cookies of HTTP responses before they are seen by the cookie monster. - Cancel requests based on the length or content type of the HTTP response. BUG=89118 TEST=no Review URL: http://codereview.chromium.org/7931026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104091 0039d316-1c4b-4281-b951-d872f2087c98
* NetworkDelegate::OnAuthRequired can set or cancel auth, in addition to ↵cbentzel@chromium.org2011-10-031-4/+9
| | | | | | | | | | | | taking no action. BUG=32056 TEST=net_unittests Review URL: http://codereview.chromium.org/8100001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103801 0039d316-1c4b-4281-b951-d872f2087c98
* Begin CompletionCallback switchover.willchan@chromium.org2011-10-0135-235/+235
| | | | | | | | | | | | | Rename CompletionCallback to OldCompletionCallback in preparation for introducing a new CompletionCallback based on base::Callback. Also renames other CompletionCallback types like CancelableCompletionCallback and TestCompletionCallback and CompletionCallbackImpl. All using sed with s/CompletionCallback/OldCompletionCallback/g. BUG=98719 TEST=none Review URL: http://codereview.chromium.org/8070013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103650 0039d316-1c4b-4281-b951-d872f2087c98
* Minor cleanup of Mac/Linux network change notifier code:mmenke@chromium.org2011-09-302-0/+3
| | | | | | | | | | | | | Add OVERRIDE, replace NewRunnableMethod with Bind, fix a couple includes. BUG=none TEST=compiles Review URL: http://codereview.chromium.org/8073027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103402 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 103360 - NetworkDelegate::OnAuthRequired can set authentication or ↵ddorwin@chromium.org2011-09-291-9/+4
| | | | | | | | | | | | | | | | cancel, in addition to observing. TBR=ananta@chromium.org BUG=32056 TEST=net_unittests Review URL: http://codereview.chromium.org/8037038 TBR=cbentzel@chromium.org Review URL: http://codereview.chromium.org/8082010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103372 0039d316-1c4b-4281-b951-d872f2087c98
* NetworkDelegate::OnAuthRequired can set authentication or cancel, in ↵cbentzel@chromium.org2011-09-291-4/+9
| | | | | | | | | | | | | addition to observing. TBR=ananta@chromium.org BUG=32056 TEST=net_unittests Review URL: http://codereview.chromium.org/8037038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103360 0039d316-1c4b-4281-b951-d872f2087c98
* net: make HSTS hosts use the normal SSL interstitialsagl@chromium.org2011-09-272-5/+7
| | | | | | | | | | | | | | | | | | | | | | | (Reland of r102947, which was reverted in r102950.) SSL interstitials have better translations for the error messages and this returns us to the point where we have only a single UI for SSL errors, which will make some future changes easier. First, this change changes the SSL error callbacks to take an SSLInfo& rather than a X509Certificate* (which was already a TODO(wtc) in the code). Most of this change is the resulting plumbing. It also adds a |is_hsts_host| flag to the callbacks to denote an HSTS host. Finally, in ssl_policy.cc the |is_hsts_host| flag causes any error to be fatal. BUG=93527 http://codereview.chromium.org/7976036/ git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102994 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "net: make HSTS hosts use the normal SSL interstitials"agl@chromium.org2011-09-272-7/+5
| | | | | | | This reverts commit r102947. It broke the shared build, probably because of a missing NET_EXPORT. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102950 0039d316-1c4b-4281-b951-d872f2087c98
* net: make HSTS hosts use the normal SSL interstitialsagl@chromium.org2011-09-272-5/+7
| | | | | | | | | | | | | | | | | | | | | SSL interstitials have better translations for the error messages and this returns us to the point where we have only a single UI for SSL errors, which will make some future changes easier. First, this change changes the SSL error callbacks to take an SSLInfo& rather than a X509Certificate* (which was already a TODO(wtc) in the code). Most of this change is the resulting plumbing. It also adds a |is_hsts_host| flag to the callbacks to denote an HSTS host. Finally, in ssl_policy.cc the |is_hsts_host| flag causes any error to be fatal. BUG=93527 http://codereview.chromium.org/7976036/ git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102947 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: try libgio-2.0.so.0 first and then libgio-2.0.so when trying to use ↵mdm@chromium.org2011-09-221-3/+7
| | | | | | | | | | | | gsettings for proxy settings. Some distributions only have libgio-2.0.so.0, unless development packages are installed. BUG=91744 Review URL: http://codereview.chromium.org/7982053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102347 0039d316-1c4b-4281-b951-d872f2087c98
* Delete Tracked, and move Location to its own file.ajwong@chromium.org2011-09-212-0/+2
| | | | | | | | | | | | | The Birth/Death tracking of tasks has been moved out-of-band into MessageLoop's PendingTask structure. Thus, Task no longer needs to inherit from Tracked. Since Task was the only child of Tracked, delete the Tracked class and move Location to its own file. BUG=none TEST=builds Review URL: http://codereview.chromium.org/7879006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102132 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a crash-on-shutdown in ProxyConfigServiceMacadamk@chromium.org2011-09-202-3/+6
| | | | | | | | | | | by ensuring the config watcher thread is stopped/joined while its owner is still alive. BUG=97260 Review URL: http://codereview.chromium.org/7980016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102040 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: enhance some code to try and track down bug 75508.mdm@chromium.org2011-09-192-6/+21
| | | | | | | BUG=75508 Review URL: http://codereview.chromium.org/7930005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101813 0039d316-1c4b-4281-b951-d872f2087c98
* Check for kCFProxyTypeHttps in ProxyResolverMaceroman@chromium.org2011-09-091-0/+5
| | | | | | | | BUG=95881 Review URL: http://codereview.chromium.org/7838040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100323 0039d316-1c4b-4281-b951-d872f2087c98
* net: Rename URLRequestStatus::os_error_.tfarina@chromium.org2011-09-081-1/+1
| | | | | | | | | | | BUG=92264 TEST=None R=willchan@chromium.org Review URL: http://codereview.chromium.org/7846007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100136 0039d316-1c4b-4281-b951-d872f2087c98
* Update base/timer.h code to pass through Location from call sites. (reland) ↵jbates@chromium.org2011-09-026-10/+11
| | | | | | | | original CL w/LGTMs: http://codereview.chromium.org/7812036/ Review URL: http://codereview.chromium.org/7824041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99409 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Currently, base/timer.cc calls PostTask with FROM_HERE as the Location,mattm@chromium.org2011-09-026-11/+10
| | | | | | | | | | | | so the original code that created the delayed callback is lost." This reverts commit 4cf5cf73d319b69c32ad30af8954235755856455. (r99284) TBR=jbates@chromium.org Review URL: http://codereview.chromium.org/7825026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99290 0039d316-1c4b-4281-b951-d872f2087c98
* Currently, base/timer.cc calls PostTask with FROM_HERE as the Location, so ↵jbates@chromium.org2011-09-026-10/+11
| | | | | | | | | | the original code that created the delayed callback is lost. This change adds a tracked_objects::Location parameter to the APIs in base/timer.h so we can trace the PostTask callbacks. The other files are touched to add the FROM_HERE Location parameter. Review URL: http://codereview.chromium.org/7812036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99284 0039d316-1c4b-4281-b951-d872f2087c98
* Reduce number of unnamed-type-template-args violations (mostly when passing ↵pkasting@chromium.org2011-09-014-7/+7
| | | | | | | | | | values to DCHECK(), ASSERT_EQ(), etc.), generally by naming previously-anonymous enums. We've decided not to eliminate the warning entirely because doing so is only possible with tons of ugly static_cast<>()s in Mac code. BUG=92247 TEST=Compiles Review URL: http://codereview.chromium.org/7605019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99086 0039d316-1c4b-4281-b951-d872f2087c98
* Only mark a proxy as bad if we have confirmation that another proxy ↵asanka@chromium.org2011-08-297-8/+103
| | | | | | | | | | | | succeeded for the same request. BUG=87336 TEST=net_unittests --gtest_filter=ProxyServiceTest.ProxyFallback:HttpStreamFactoryTest.JobNotifiesProxy Review URL: http://codereview.chromium.org/7532011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98643 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: fix an incorrect cast and missing dereference that prevented GNOME 3 ↵mdm@chromium.org2011-08-161-1/+1
| | | | | | | | | | proxy settings from being queried. This should be merged into both beta and stable. BUG=91744 Review URL: http://codereview.chromium.org/7621026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97020 0039d316-1c4b-4281-b951-d872f2087c98
* Add MessageLoopProxy::currentnduca@chromium.org2011-08-156-7/+7
| | | | | | Review URL: http://codereview.chromium.org/7583053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96819 0039d316-1c4b-4281-b951-d872f2087c98
* Rename NET_API to NET_EXPORT, and rename NET_TEST to NET_EXPORT_PRIVATE.darin@chromium.org2011-08-1229-60/+61
| | | | | | Review URL: http://codereview.chromium.org/7529043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96560 0039d316-1c4b-4281-b951-d872f2087c98
* Fixup bad include and usage of BASE_API, which should be BASE_EXPORT.darin@chromium.org2011-08-051-1/+0
| | | | | | | TBR=rvargas@chromium.org Review URL: http://codereview.chromium.org/7582007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95619 0039d316-1c4b-4281-b951-d872f2087c98
* HostResolver: don't interpret NULL callback argument as a request to do ↵agayev@chromium.org2011-08-041-0/+7
| | | | | | | | | | | synchronous resolution. BUG=90547,60149 TEST=net_unittests Review URL: http://codereview.chromium.org/7492059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95509 0039d316-1c4b-4281-b951-d872f2087c98
* Add onAuthRequired signal to the webRequest APIjochen@chromium.org2011-08-031-0/+2
| | | | | | | | | | BUG=none TEST=api test Review URL: http://codereview.chromium.org/7538024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95308 0039d316-1c4b-4281-b951-d872f2087c98
* mac: Components build for netthakis@chromium.org2011-07-291-1/+2
| | | | | | | | | | BUG=90078 TEST=none Review URL: http://codereview.chromium.org/7529017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94629 0039d316-1c4b-4281-b951-d872f2087c98
* HostResolverImpl: don't interpret NULL callback argument as a request to do ↵agayev@chromium.org2011-07-281-0/+5
| | | | | | | | | | | synchronous resolution. BUG=90547,60149 TEST=net_unittests Review URL: http://codereview.chromium.org/7520026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94552 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 94412 - HostResolverImpl: don't interpret NULL callback argument as a ↵agayev@chromium.org2011-07-281-5/+0
| | | | | | | | | | | | | | request to do synchronous resolution. BUG=90547,60149 TEST=net_unittests --gtest_filter="HostResolverImplTest*" Review URL: http://codereview.chromium.org/7465046 TBR=agayev@chromium.org Review URL: http://codereview.chromium.org/7524018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94417 0039d316-1c4b-4281-b951-d872f2087c98
* HostResolverImpl: don't interpret NULL callback argument as a request to do ↵agayev@chromium.org2011-07-281-0/+5
| | | | | | | | | | | synchronous resolution. BUG=90547,60149 TEST=net_unittests --gtest_filter="HostResolverImplTest*" Review URL: http://codereview.chromium.org/7465046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94412 0039d316-1c4b-4281-b951-d872f2087c98
* Add OVERRIDE throughout net/proxy/*eroman@chromium.org2011-07-2229-197/+217
| | | | | | | | In the process I discovered 2 dummy virtual overrides of NetworkDelegate interface. (Interface it was trying to overwrite no longer exists). Review URL: http://codereview.chromium.org/7484010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93664 0039d316-1c4b-4281-b951-d872f2087c98
* some cleanup for base/stl_utildilmah@chromium.org2011-07-193-3/+3
| | | | | | | | | | | | | removed unused/irrelevant functions removed irrelevant comments Moved stl_util-inl.h => stl_util.h BUG=None TEST=None Review URL: http://codereview.chromium.org/7342047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93110 0039d316-1c4b-4281-b951-d872f2087c98
* Replace onRequestSent with onSendHeaders in webrequest APIbattre@chromium.org2011-07-141-2/+1
| | | | | | | | | | | | | | | This CL replaces the onRequestSent signal of the webrequest API with a new onSendHeader signal. The sequence is now: onBeforeRequest -> onBeforeSendHeaders -> onSendHeaders. This change allows us to completely remove the webrequest API from the network transaction layer and stay in the URL request layer. That solve the problem that the network layer may convert one URLRequest to multiple HTTP requests which should be transparent to the webrequest API. It also solves the problem that requests answered from the cache did not trigger an onRequestSent event. Given the choice of removing onRequestSent completely and replacing it with onSendHeaders, I chose the latter so that extensions can see the headers sent to the network after other extensions had a chance to modify them. BUG=no TEST=no Review URL: http://codereview.chromium.org/7353021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92584 0039d316-1c4b-4281-b951-d872f2087c98
* Make the URLRequestContext constantbattre@chromium.org2011-07-141-1/+1
| | | | | | | | | | | | | The URLRequestContext is basically a collection of pointers to other data structures. This CL makes sure that these pointers are not easily modified after the construction of the URLRequestContext. BUG=67597 TEST=no Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=92511 Review URL: http://codereview.chromium.org/7322010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92521 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 92511 - Make the URLRequestContext constantbattre@chromium.org2011-07-141-1/+1
| | | | | | | | | | | | | | The URLRequestContext is basically a collection of pointers to other data structures. This CL makes sure that these pointers are not easily modified after the construction of the URLRequestContext. BUG=67597 TEST=no Review URL: http://codereview.chromium.org/7322010 TBR=battre@chromium.org Review URL: http://codereview.chromium.org/7366005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92512 0039d316-1c4b-4281-b951-d872f2087c98
* Make the URLRequestContext constantbattre@chromium.org2011-07-141-1/+1
| | | | | | | | | | | The URLRequestContext is basically a collection of pointers to other data structures. This CL makes sure that these pointers are not easily modified after the construction of the URLRequestContext. BUG=67597 TEST=no Review URL: http://codereview.chromium.org/7322010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92511 0039d316-1c4b-4281-b951-d872f2087c98
* Make MultiThreadedProxyResolver resistant to crashes when leaked.willchan@chromium.org2011-07-131-6/+7
| | | | | | | | | | | | | | | Sometimes ProfileIOData gets leaked on shutdown due to buggy code. If MultiThreadedProxyResolver doesn't get destroyed on shutdown, it can try to post to a MessageLoop that has already been destroyed, leading to a use after free crash. BUG=none TEST=none Review URL: http://codereview.chromium.org/7356012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92376 0039d316-1c4b-4281-b951-d872f2087c98
* Move base/values.h into the base namespace. This includes a cros DEPS rolldmazzoni@chromium.org2011-07-121-1/+3
| | | | | | | | | | with a minor change to that code since libcros also uses base/values.h. BUG=88666 TEST=none Review URL: http://codereview.chromium.org/7259019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92208 0039d316-1c4b-4281-b951-d872f2087c98
* Fix ReuseTest memory handling.joi@chromium.org2011-07-041-8/+10
| | | | | | | | | BUG=87616 TEST=net_unittests Review URL: http://codereview.chromium.org/7290011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91473 0039d316-1c4b-4281-b951-d872f2087c98
* net: Add NET_API to more code to enable buildingrvargas@google.com2011-06-301-1/+2
| | | | | | | | | | | a shared net library on Linux, and update base and crypto API definitions. BUG=76997 TEST=none Review URL: http://codereview.chromium.org/7240021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91234 0039d316-1c4b-4281-b951-d872f2087c98
* Fix memory leak introduced by unit test, unflake timing-dependent test.joi@chromium.org2011-06-291-5/+22
| | | | | | | | | | | Remove exclusions for TSAN and Dr. Memory. BUG=87616,86756 TEST=net_unittests Review URL: http://codereview.chromium.org/7277011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90908 0039d316-1c4b-4281-b951-d872f2087c98
* Moved OnBeforeHeadersSent of webRequest API to url_request_http_job.ccbattre@chromium.org2011-06-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | This CL moves the OnBeforeSendHeaders signal from net_http_transaction.cc and net_cache_transaction.cc to url_request_http_job.cc. We do this for several reasons: - deep in the http stack one URL Request can be split into several http requests (with different byte ranges). - We do not want to expose this implementation detail to extension authors. - It is not sufficient to submit only the first OnBeforeSendHeaders event to the extension: If the extension modifies the headers, this modification should apply to all http requests. - from an architectural perspective we do not want to go too deep in order to allow changing the network stack implementation without being limited by the published Extension API (needs to be backwards compatible) BUG=60101 TEST=no Review URL: http://codereview.chromium.org/7039010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90753 0039d316-1c4b-4281-b951-d872f2087c98
* Do GetAdaptersAddresses on a worker thread.joi@chromium.org2011-06-234-66/+253
| | | | | | | | | BUG=84047 TEST=net_unittests Review URL: http://codereview.chromium.org/7189016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90258 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity: Initialize member variables.jhawkins@chromium.org2011-06-211-3/+28
| | | | | | | | | | | | | CID=9299,13805,14203,14284,14459,15435,15897,16023,16614,16773,16819,16820, 16908,16916 BUG=none TEST=none R=kmadhusu@chromium.org Review URL: http://codereview.chromium.org/7215027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89897 0039d316-1c4b-4281-b951-d872f2087c98