summaryrefslogtreecommitdiffstats
path: root/android
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-11-22 18:28:26 +0000
committerBen Murdoch <benm@google.com>2010-11-22 18:30:59 +0000
commitc5a01be107ec80b0d7062dcc836c0608dd467f17 (patch)
tree3ec402238f626ea0b54511965a942b8d38a29389 /android
parented5ca3171179d7d667cd965939520d0f827158e1 (diff)
downloadexternal_chromium-c5a01be107ec80b0d7062dcc836c0608dd467f17.zip
external_chromium-c5a01be107ec80b0d7062dcc836c0608dd467f17.tar.gz
external_chromium-c5a01be107ec80b0d7062dcc836c0608dd467f17.tar.bz2
Fix bug in URLFetcherProxy
The url() function only returns a valid URL once a response has been received as it represents the final URL that was connected to after any redirects. It's therefore not correct to use it in the DoStart method of URLFetcherProxy. Instead, cache the url that gets passed into the URLFetcherProxy and use that. Change-Id: I509f5bc490362b45c5814fc7b1bc57168903b17b
Diffstat (limited to 'android')
-rw-r--r--android/autofill/url_fetcher_proxy.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/android/autofill/url_fetcher_proxy.h b/android/autofill/url_fetcher_proxy.h
index c2bc77e..415b730 100644
--- a/android/autofill/url_fetcher_proxy.h
+++ b/android/autofill/url_fetcher_proxy.h
@@ -74,7 +74,8 @@ public:
URLFetcher::Delegate* d)
: URLFetcher(url /*unused*/, URLFetcher::POST /*unused*/, d),
request_type_(request_type),
- retry_(true)
+ retry_(true),
+ url_(url)
{
}
@@ -129,7 +130,7 @@ public:
private:
void DoStart()
{
- real_fetcher_.reset(new URLFetcher(url(), request_type_, this));
+ real_fetcher_.reset(new URLFetcher(url_, request_type_, this));
real_fetcher_->set_automatically_retry_on_5xx(retry_);
// We expect set_upload_data() to have been called on this object.
real_fetcher_->set_upload_data(upload_content_type_, upload_content_);