Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(567)

Unified Diff: net/url_request/url_request.h

Issue 8015004: webRequest.onAuthRequired listeners can provide authentication credentials. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/url_request/url_request.h
diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h
index 640f045e60f73970f74a5c73fb44237be1c08bb3..428f54741ed2b61c2c9cb98200d7132a3c8aa674 100644
--- a/net/url_request/url_request.h
+++ b/net/url_request/url_request.h
@@ -17,6 +17,7 @@
#include "base/string16.h"
#include "base/threading/non_thread_safe.h"
#include "googleurl/src/gurl.h"
+#include "net/base/auth.h"
#include "net/base/completion_callback.h"
#include "net/base/load_states.h"
#include "net/base/net_export.h"
@@ -712,6 +713,7 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe) {
// |delegate_| is not NULL. See URLRequest::Delegate for the meaning
// of these functions.
void NotifyAuthRequired(AuthChallengeInfo* auth_info);
+ void NotifyAuthRequiredComplete(int result);
void NotifyCertificateRequested(SSLCertRequestInfo* cert_request_info);
void NotifySSLCertificateError(int cert_error, X509Certificate* cert);
bool CanGetCookies(const CookieList& cookie_list) const;
@@ -803,6 +805,15 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe) {
// TODO(battre): Remove this. http://crbug.com/89049
bool has_notified_completion_;
+ // Authentication data used by the NetworkDelegate for this request,
+ // if one is present. |auth_credentials_| may be filled in when calling
+ // |NotifyAuthRequired| on the NetworkDelegate. |auth_required_callback_|
+ // may be invoked asynchronously by |NotifyAuthRequired|. |auth_info_| holds
+ // the authentication challenge being handled by |NotifyAuthRequired|.
+ AuthCredentials auth_credentials_;
+ CompletionCallbackImpl<URLRequest> auth_required_callback_;
+ scoped_refptr<AuthChallengeInfo> auth_info_;
+
DISALLOW_COPY_AND_ASSIGN(URLRequest);
};

Powered by Google App Engine
This is Rietveld 408576698