summaryrefslogtreecommitdiffstats
path: root/net/url_request/url_fetcher.h
Commit message (Collapse)AuthorAgeFilesLines
* Improve URLFetcher documentation.maniscalco@chromium.org2014-05-081-2/+7
| | | | | | | | | | Make it clear that the caller is responsible for the object lifetime, and document cancellation semantics. BUG=371201 Review URL: https://codereview.chromium.org/270683003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269040 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of Remove Referrer Policy from URLFetcher. ↵jochen@chromium.org2014-05-051-0/+5
| | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/268703003/) Reason for revert: We still need this feature on ios and android Original issue's description: > Remove Referrer Policy from URLFetcher. > > There were no consumers of this. > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=267757 TBR=mmenke@chromium.org,noyau@chromium.org,cbentzel@chromium.org NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/265253002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268151 0039d316-1c4b-4281-b951-d872f2087c98
* Fix typo, "recieve" -> "receive", in net/mseaborn@chromium.org2014-05-041-1/+1
| | | | | | | | | BUG=none TEST=none Review URL: https://codereview.chromium.org/262013003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268115 0039d316-1c4b-4281-b951-d872f2087c98
* Remove Referrer Policy from URLFetcher.cbentzel@chromium.org2014-05-021-5/+0
| | | | | | | | There were no consumers of this. Review URL: https://codereview.chromium.org/268703003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267757 0039d316-1c4b-4281-b951-d872f2087c98
* Remove URLFetcher::GetRequestHeaders. It had a bug,mmenke@chromium.org2014-02-021-3/+0
| | | | | | | | and since nothing was using it anyways... Review URL: https://codereview.chromium.org/126103002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248402 0039d316-1c4b-4281-b951-d872f2087c98
* Make it possible to set a referrer policy via URLFetcherjochen@chromium.org2014-01-241-0/+6
| | | | | | | | BUG=337791 Review URL: https://codereview.chromium.org/139673003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246930 0039d316-1c4b-4281-b951-d872f2087c98
* net: Use SequencedTaskRunner for URLFetcherResponseWriterhashimoto@chromium.org2013-11-121-3/+4
| | | | | | | | | | TBR=scottbyer@chromium.org for chrome/service/cloud_print/cloud_print_url_fetcher.h BUG=316065 TEST=build Review URL: https://codereview.chromium.org/63923002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234357 0039d316-1c4b-4281-b951-d872f2087c98
* net: Allow URLFetcher users to inject custom URLFetcherResponseWriterhashimoto@chromium.org2013-10-161-0/+7
| | | | | | | | | | | | Add a new method URLFetcher::SaveResponseWithWriter() Add NET_EXPORT to URLFetcherResponseWriter and its subclasses so that user code can inherit them to implement custom writers. BUG=126753 TEST=net_unittests Review URL: https://codereview.chromium.org/26230003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228885 0039d316-1c4b-4281-b951-d872f2087c98
* net: Remove URLFetcher::FileErrorOccurred and use URLRequestStatus to report ↵hashimoto@chromium.org2013-10-031-5/+0
| | | | | | | | | | | | | | | | | | | | write error instead URLFetcher has three ways to report errors: GetResponseCode(), GetStatus() and FileErrorOccurred(). Among these three, FileErrorOccurred() is the most dismissed and currently only two users are checking the result of this method. Merging it to GetStatus() will make user-side error handling simpler and increase chances for file write errors to be correctly handled. Remove URLFetcher::FileErrorOccurred(). Call URLRequest::CancelWithError on errors. "Extensions.UpdaterWriteCrxAsFile" UMA histogram reporting code in extension_downloader.cc is removed as the histogram name cannot be found in histograms.xml. BUG=126753 TEST=net_unittests Review URL: https://codereview.chromium.org/15943006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226719 0039d316-1c4b-4281-b951-d872f2087c98
* Support range uploading of a file.hidehiko@chromium.org2013-05-021-0/+4
| | | | | | | | | | | | | URLFetcher currently supports uploading std::string or a whole file. With this CL, URLFetcher also supports a part of file, which will be used to upload a file from Drive file system. BUG=234178 TEST=Ran unit_tests Review URL: https://chromiumcodereview.appspot.com/14578004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197878 0039d316-1c4b-4281-b951-d872f2087c98
* net: Report net error code from URLFetcher::FileErrorOccurredhashimoto@chromium.org2013-03-131-4/+2
| | | | | | | | | | BUG=126753 TEST=net_unittests TBR=asargent@chromium.org for extension_downloader.cc and component_updater_service.cc Review URL: https://chromiumcodereview.appspot.com/12413008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187847 0039d316-1c4b-4281-b951-d872f2087c98
* Add SetUploadFilePath method to URLFetcher.mattm@chromium.org2013-03-021-3/+15
| | | | | | | | | BUG=169551 Review URL: https://chromiumcodereview.appspot.com/12383015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185780 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Add SetUploadDataStream method to URLFetcher." which broke ↵mattm@chromium.org2013-02-141-11/+3
| | | | | | | | | | | | | | | | URLFetcher retries. This reverts r178535. Original Review URL: https://chromiumcodereview.appspot.com/11843003 BUG=169551,175038 TEST=net_unittests Review URL: https://chromiumcodereview.appspot.com/12261025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182558 0039d316-1c4b-4281-b951-d872f2087c98
* Remove deprecated POST_WITHOUT_BODYhidehiko@chromium.org2013-02-081-5/+0
| | | | | | | | | | | | | This CL removes deprecated enum value POST_WITHOUT_BODY as it is no longer used. BUG=148632 TEST=Ran try-bot. Review URL: https://chromiumcodereview.appspot.com/12212070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181435 0039d316-1c4b-4281-b951-d872f2087c98
* Allow no content-type for POST, PUT and PATCH methods.hidehiko@chromium.org2013-02-061-4/+6
| | | | | | | | | | | | | This CL allows to have no content type for UrlFetcher's POST, PUT and PATCH methods, if the body is empty. At the same time, POST_WITHOUT_BODY is deprecated, as POST should work such a case. The following CL will clean it up, after the code using it is fixed. BUG=148632 TEST=Ran unit_tests. Review URL: https://chromiumcodereview.appspot.com/12226008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181039 0039d316-1c4b-4281-b951-d872f2087c98
* Add POST_WITHOUT_BODY to the UrlFetcher's method.hidehiko@chromium.org2013-02-041-0/+4
| | | | | | | | | | | | This CL adds a new method enum POST_WITHOUT_BODY. In most cases, POST request has non-empty body and non-content-type header. The current implementation has some (D)CHECKs for it. However, there are some cases that we'd like to send POST request without body (or, we may say it is empty body), content-type and content length headers. The new method POST_WITHOUT_BODY is for supporting such cases. BUG=148628 TEST=Ran unit_tests Review URL: https://chromiumcodereview.appspot.com/12096093 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180478 0039d316-1c4b-4281-b951-d872f2087c98
* Add PATCH method to UrlFetcher.hidehiko@chromium.org2013-02-041-0/+1
| | | | | | | | | | | | | | Here is the RFC https://tools.ietf.org/html/rfc5789. By this CL, UrlFetcher supports it. This is actually used by some APIs, such as Drive API. BUG=173315 TEST=Ran unit_tests. Review URL: https://chromiumcodereview.appspot.com/12091087 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180357 0039d316-1c4b-4281-b951-d872f2087c98
* Add FilePath to base namespace.brettw@chromium.org2013-02-021-3/+3
| | | | | | | This updates headers that forward-declare it and a few random places to use the namespace explicitly. There us a using declaration in file_path.h that makes the rest compile, which we can do in future passes. Review URL: https://codereview.chromium.org/12163003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180245 0039d316-1c4b-4281-b951-d872f2087c98
* Add a command-line flag to have URLFetcher ignore certificate requestsrsleevi@chromium.org2013-01-311-0/+7
| | | | | | | | | | | | | | | | | | | Because having individual URLFetchers ignore certificate requests affects the URLRequestContext-wide socket pools, the behaviour is marked as a command-line flag. This is intended for development purposes when configuring alternate service endpoints for various URLFetcher-based services that may be configured to optionally request client auth, and for which this behaviour cannot be easily turned off. BUG=168602 TEST=Use --lso-host with a locally-defined service endpoint, ensure that attempts to sign in work. TBR=thakis Review URL: https://chromiumcodereview.appspot.com/12095075 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179861 0039d316-1c4b-4281-b951-d872f2087c98
* Add SetUploadDataStream method to URLFetcher.mattm@chromium.org2013-01-241-3/+11
| | | | | | | | | BUG=169551 TEST=net_unittests Review URL: https://chromiumcodereview.appspot.com/11843003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178535 0039d316-1c4b-4281-b951-d872f2087c98
* Make URLFetchers with SetAutomaticallyRetryOnNetworkChanges() retry ↵joaodasilva@chromium.org2013-01-111-3/+0
| | | | | | | | | | | | | | immediately regardless of network state. If the network went offline then the retry attempt will fail immediately, and pass INTERNET_DISCONNECTED to the client. This is less surprising than "hanging" fetchers. BUG=164363,168390 Review URL: https://chromiumcodereview.appspot.com/11821055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176344 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce ERR_NETWORK_CHANGED and allow URLFetcher to automatically retry on ↵joaodasilva@chromium.org2012-12-141-2/+10
| | | | | | | | | | that error. BUG=164363 Review URL: https://codereview.chromium.org/11464028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173227 0039d316-1c4b-4281-b951-d872f2087c98
* URLFetcher uses a TaskRunner instead of a message loop.droger@chromium.org2012-09-191-4/+5
| | | | | | | | | | | | Note that with this change, the URLFetcher can still be used with a MessageLoop, since MessageLoop is a task runner. BUG=NONE Review URL: https://chromiumcodereview.appspot.com/10915307 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157545 0039d316-1c4b-4281-b951-d872f2087c98
* Add get_server_time utilityakalin@chromium.org2012-09-051-0/+4
| | | | | | | | | | | | | | | | | | get_server_time makes a request to an HTTP/HTTPS server and snarfs the server time from the HTTP headers. The code here will eventually be adapted to track "sane time" (see design document linked from the bug). Also update usage comments of URLFetcher to note that a request context has to be set. BUG=146090 Review URL: https://chromiumcodereview.appspot.com/10907039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154868 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the rest of #pragma once in one big CL.ajwong@chromium.org2012-07-111-1/+0
| | | | | | | | | For context see this thread: https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II TBR=thakis,pkasting,jam git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98
* Move content::URLFetcher static functions to net::URLFetcherakalin@chromium.org2012-06-191-0/+28
| | | | | | | | | | | | | | | | | Remove content::URLFetcher. Update all references. Add explicit dependency on content_common from browser, since template_url_fetcher.cc calls AssociateURLFetcherWithRenderView (there are probably other direct uses of content_common). BUG=118220 TEST= TBR=satorux@chromium.org,mnissler@chromium.org,mal@chromium.org,jhawkins@chromium.org,sky@chromium.org,rlp@chromium.org Review URL: https://chromiumcodereview.appspot.com/10554008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142926 0039d316-1c4b-4281-b951-d872f2087c98
* Add support to URLFetcher for stopping on redirects. Use this in ↵pkasting@chromium.org2012-06-071-1/+9
| | | | | | | | | | | | AlternateNavURLFetcher in hopes of faster and more reliable detection of intranet sites. Note that this does increase the risk that we'll start showing infobars all the time for users with ISPs that redirect bogus addresses to search landing pages. In particular, if such ISPs use multi-stage redirects, rather than redirecting "bad" URLs directly, we'll start showing infobars where we wouldn't before. I consider this a fairly low risk. BUG=105312 TEST=On a new profile on the corp network, type in a valid "go/xxx" address (without scheme) and hit enter on the default choice (to search for the string). Verify you get an infobar offering to navigate. Review URL: https://chromiumcodereview.appspot.com/10543017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140964 0039d316-1c4b-4281-b951-d872f2087c98
* Make AssociateWithRenderView() a free function in the 'content' namespaceakalin@chromium.org2012-05-221-0/+16
| | | | | | | | | | | | | | | Rename it to AssociateURLFetcherWithRenderView(). This will enable us to remove content::URLFetcher completely and use net::URLFetcher exclusively. BUG=118220 TEST= TBR=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/10383271 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138178 0039d316-1c4b-4281-b951-d872f2087c98
* Move URLFetcherDelegate to net/ and split URLFetcher between net/ and content/akalin@chromium.org2012-05-111-0/+216
Temporarily make a shim content::URLFetcherDelegate class. A future CL will replace all instances of content::URLFetcherDelegate with net::URLFetcherDelegate and remove that class. Move most URLFetcher methods to net::URLFetcher, except for the static methods (which will be handled in a future CL) and AssociateWithRenderView, which is content-specific. Replace all instances of content::URLFetcher* in the URLFetcherDelegate callbacks with net::URLFetcher* (except for rlz, which required its own special hack). BUG=118220 TEST= TBR=mnissler@chromium.org,jhawkins@chromium.org,cpu@chromium.org,estade@chromium.org,sky@chromium.org,joth@chromium.org,satish@chromium.org Review URL: https://chromiumcodereview.appspot.com/10386063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136514 0039d316-1c4b-4281-b951-d872f2087c98