| Index: net/base/network_delegate.h
|
| diff --git a/net/base/network_delegate.h b/net/base/network_delegate.h
|
| index 2506788c548ba1296e673381f2798ec492913cc7..3a633698937a4299136115de43b2fae207da380b 100644
|
| --- a/net/base/network_delegate.h
|
| +++ b/net/base/network_delegate.h
|
| @@ -25,6 +25,7 @@ namespace net {
|
| // of net/base here, because we have a net_base library. Forward declarations
|
| // are ok.
|
| class AuthChallengeInfo;
|
| +class AuthCredentials;
|
| class HostPortPair;
|
| class HttpRequestHeaders;
|
| class URLRequest;
|
| @@ -53,8 +54,10 @@ class NetworkDelegate : public base::NonThreadSafe {
|
| void NotifyCompleted(URLRequest* request);
|
| void NotifyURLRequestDestroyed(URLRequest* request);
|
| void NotifyPACScriptError(int line_number, const string16& error);
|
| - void NotifyAuthRequired(URLRequest* request,
|
| - const AuthChallengeInfo& auth_info);
|
| + int NotifyAuthRequired(URLRequest* request,
|
| + const AuthChallengeInfo& auth_info,
|
| + CompletionCallback* callback,
|
| + AuthCredentials* credentials);
|
|
|
| private:
|
| // This is the interface for subclasses of NetworkDelegate to implement. This
|
| @@ -103,9 +106,20 @@ class NetworkDelegate : public base::NonThreadSafe {
|
| // Corresponds to ProxyResolverJSBindings::OnError.
|
| virtual void OnPACScriptError(int line_number, const string16& error) = 0;
|
|
|
| - // Corresponds to URLRequest::Delegate::OnAuthRequired.
|
| - virtual void OnAuthRequired(URLRequest* reqest,
|
| - const AuthChallengeInfo& auth_info) = 0;
|
| + // Called when a request receives an authentication challenge
|
| + // specified by |auth_info|, and is unable to respond using cached
|
| + // credentials. |callback| and |credentials| must be non-NULL, but are
|
| + // valid only until OnURLRequestDestroyed is called for this request.
|
| + // |credentials| may be filled in by the delegate with a username and
|
| + // password - if this is done, |credentials->is_valid| will be set to true.
|
| + //
|
| + // Returns a net status code. A response of OK indicates that this completed
|
| + // synchronously. A response of ERR_IO_PENDING means that the request needs
|
| + // to stall until |callback| is invoked later.
|
| + virtual int OnAuthRequired(URLRequest* reqest,
|
| + const AuthChallengeInfo& auth_info,
|
| + CompletionCallback* callback,
|
| + AuthCredentials* credentials) = 0;
|
| };
|
|
|
| } // namespace net
|
|
|