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

Side by Side Diff: net/http/http_auth_controller.h

Issue 2432873003: [Merge-54][net/auth] Don't abort network transaction over non-permanent auth errors. (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | net/http/http_auth_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_HTTP_HTTP_AUTH_CONTROLLER_H_ 5 #ifndef NET_HTTP_HTTP_AUTH_CONTROLLER_H_
6 #define NET_HTTP_HTTP_AUTH_CONTROLLER_H_ 6 #define NET_HTTP_HTTP_AUTH_CONTROLLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 // Sets |identity_| to the next identity that the transaction should try. It 104 // Sets |identity_| to the next identity that the transaction should try. It
105 // chooses candidates by searching the auth cache and the URL for a 105 // chooses candidates by searching the auth cache and the URL for a
106 // username:password. Returns true if an identity was found. 106 // username:password. Returns true if an identity was found.
107 bool SelectNextAuthIdentityToTry(); 107 bool SelectNextAuthIdentityToTry();
108 108
109 // Populates auth_info_ with the challenge information, so that 109 // Populates auth_info_ with the challenge information, so that
110 // URLRequestHttpJob can prompt for credentials. 110 // URLRequestHttpJob can prompt for credentials.
111 void PopulateAuthChallenge(); 111 void PopulateAuthChallenge();
112 112
113 // If |result| indicates a permanent failure, disables the current 113 // Handle the result of calling GenerateAuthToken on an HttpAuthHandler. The
114 // auth scheme for this controller and returns true. Returns false 114 // return value of this function should be used as the return value of the
115 // otherwise. 115 // GenerateAuthToken operation.
116 bool DisableOnAuthHandlerResult(int result); 116 int HandleGenerateTokenResult(int result);
117 117
118 void OnIOComplete(int result); 118 void OnIOComplete(int result);
119 119
120 // Indicates if this handler is for Proxy auth or Server auth. 120 // Indicates if this handler is for Proxy auth or Server auth.
121 HttpAuth::Target target_; 121 HttpAuth::Target target_;
122 122
123 // Holds the {scheme, host, path, port} for the authentication target. 123 // Holds the {scheme, host, path, port} for the authentication target.
124 const GURL auth_url_; 124 const GURL auth_url_;
125 125
126 // Holds the {scheme, host, port} for the authentication target. 126 // Holds the {scheme, host, port} for the authentication target.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 HttpAuthHandlerFactory* const http_auth_handler_factory_; 163 HttpAuthHandlerFactory* const http_auth_handler_factory_;
164 164
165 std::set<HttpAuth::Scheme> disabled_schemes_; 165 std::set<HttpAuth::Scheme> disabled_schemes_;
166 166
167 CompletionCallback callback_; 167 CompletionCallback callback_;
168 }; 168 };
169 169
170 } // namespace net 170 } // namespace net
171 171
172 #endif // NET_HTTP_HTTP_AUTH_CONTROLLER_H_ 172 #endif // NET_HTTP_HTTP_AUTH_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | net/http/http_auth_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698