| Index: net/proxy/proxy_script_fetcher_impl.cc
|
| diff --git a/net/proxy/proxy_script_fetcher_impl.cc b/net/proxy/proxy_script_fetcher_impl.cc
|
| index aabe34042c245e2e2986da6cabf2e4ffe58b2093..cfc2df45f5c5d7f140fc5702412797d45da76e54 100644
|
| --- a/net/proxy/proxy_script_fetcher_impl.cc
|
| +++ b/net/proxy/proxy_script_fetcher_impl.cc
|
| @@ -115,28 +115,28 @@ void ProxyScriptFetcherImpl::OnResponseCompleted(URLRequest* request) {
|
| FetchCompleted();
|
| }
|
|
|
| -int ProxyScriptFetcherImpl::Fetch(const GURL& url,
|
| - string16* text,
|
| +int ProxyScriptFetcherImpl::Fetch(string16* text,
|
| CompletionCallback* callback) {
|
| // It is invalid to call Fetch() while a request is already in progress.
|
| DCHECK(!cur_request_.get());
|
|
|
| DCHECK(callback);
|
| DCHECK(text);
|
| + DCHECK(url_.is_valid());
|
|
|
| // Handle base-64 encoded data-urls that contain custom PAC scripts.
|
| - if (url.SchemeIs("data")) {
|
| + if (url_.SchemeIs("data")) {
|
| std::string mime_type;
|
| std::string charset;
|
| std::string data;
|
| - if (!DataURL::Parse(url, &mime_type, &charset, &data))
|
| + if (!DataURL::Parse(url_, &mime_type, &charset, &data))
|
| return ERR_FAILED;
|
|
|
| ConvertResponseToUTF16(charset, data, text);
|
| return OK;
|
| }
|
|
|
| - cur_request_.reset(new URLRequest(url, this));
|
| + cur_request_.reset(new URLRequest(url_, this));
|
| cur_request_->set_context(url_request_context_);
|
| cur_request_->set_method("GET");
|
|
|
| @@ -171,10 +171,14 @@ void ProxyScriptFetcherImpl::Cancel() {
|
| ResetCurRequestState();
|
| }
|
|
|
| -URLRequestContext* ProxyScriptFetcherImpl::GetRequestContext() {
|
| +URLRequestContext* ProxyScriptFetcherImpl::GetRequestContext() const {
|
| return url_request_context_;
|
| }
|
|
|
| +void ProxyScriptFetcherImpl::SetURL(const GURL& url) {
|
| + url_ = url;
|
| +}
|
| +
|
| void ProxyScriptFetcherImpl::OnAuthRequired(URLRequest* request,
|
| AuthChallengeInfo* auth_info) {
|
| DCHECK_EQ(request, cur_request_.get());
|
|
|