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

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

Issue 10916272: Remove HttpAuth::Scheme enum in favor of a string. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/http/http_auth_controller_unittest.cc ('k') | net/http/http_auth_handler.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_HANDLER_H_ 5 #ifndef NET_HTTP_HTTP_AUTH_HANDLER_H_
6 #define NET_HTTP_HTTP_AUTH_HANDLER_H_ 6 #define NET_HTTP_HTTP_AUTH_HANDLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "net/base/completion_callback.h" 10 #include "net/base/completion_callback.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 // invoked, but |credentials| is only used during the initial call. 69 // invoked, but |credentials| is only used during the initial call.
70 // 70 //
71 // All other return codes indicate that there was a problem generating a 71 // All other return codes indicate that there was a problem generating a
72 // token, and the value of |*auth_token| is unspecified. 72 // token, and the value of |*auth_token| is unspecified.
73 int GenerateAuthToken(const AuthCredentials* credentials, 73 int GenerateAuthToken(const AuthCredentials* credentials,
74 const HttpRequestInfo* request, 74 const HttpRequestInfo* request,
75 const CompletionCallback& callback, 75 const CompletionCallback& callback,
76 std::string* auth_token); 76 std::string* auth_token);
77 77
78 // The authentication scheme as an enumerated value. 78 // The authentication scheme as an enumerated value.
79 HttpAuth::Scheme auth_scheme() const { 79 std::string auth_scheme() const {
80 return auth_scheme_; 80 return auth_scheme_;
81 } 81 }
82 82
83 // The realm, encoded as UTF-8. This may be empty. 83 // The realm, encoded as UTF-8. This may be empty.
84 const std::string& realm() const { 84 const std::string& realm() const {
85 return realm_; 85 return realm_;
86 } 86 }
87 87
88 // The challenge which was issued when creating the handler. 88 // The challenge which was issued when creating the handler.
89 const std::string challenge() const { 89 const std::string challenge() const {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 155
156 // |GenerateAuthTokenImpl()} is the auth-scheme specific implementation 156 // |GenerateAuthTokenImpl()} is the auth-scheme specific implementation
157 // of generating the next auth token. Callers should use |GenerateAuthToken()| 157 // of generating the next auth token. Callers should use |GenerateAuthToken()|
158 // which will in turn call |GenerateAuthTokenImpl()| 158 // which will in turn call |GenerateAuthTokenImpl()|
159 virtual int GenerateAuthTokenImpl(const AuthCredentials* credentials, 159 virtual int GenerateAuthTokenImpl(const AuthCredentials* credentials,
160 const HttpRequestInfo* request, 160 const HttpRequestInfo* request,
161 const CompletionCallback& callback, 161 const CompletionCallback& callback,
162 std::string* auth_token) = 0; 162 std::string* auth_token) = 0;
163 163
164 // The auth-scheme as an enumerated value. 164 // The auth-scheme as an enumerated value.
165 HttpAuth::Scheme auth_scheme_; 165 std::string auth_scheme_;
166 166
167 // The realm, encoded as UTF-8. Used by "basic" and "digest". 167 // The realm, encoded as UTF-8. Used by "basic" and "digest".
168 std::string realm_; 168 std::string realm_;
169 169
170 // The auth challenge. 170 // The auth challenge.
171 std::string auth_challenge_; 171 std::string auth_challenge_;
172 172
173 // The {scheme, host, port} for the authentication target. Used by "ntlm" 173 // The {scheme, host, port} for the authentication target. Used by "ntlm"
174 // and "negotiate" to construct the service principal name. 174 // and "negotiate" to construct the service principal name.
175 GURL origin_; 175 GURL origin_;
(...skipping 13 matching lines...) Expand all
189 private: 189 private:
190 void OnGenerateAuthTokenComplete(int rv); 190 void OnGenerateAuthTokenComplete(int rv);
191 void FinishGenerateAuthToken(); 191 void FinishGenerateAuthToken();
192 192
193 CompletionCallback callback_; 193 CompletionCallback callback_;
194 }; 194 };
195 195
196 } // namespace net 196 } // namespace net
197 197
198 #endif // NET_HTTP_HTTP_AUTH_HANDLER_H_ 198 #endif // NET_HTTP_HTTP_AUTH_HANDLER_H_
OLDNEW
« no previous file with comments | « net/http/http_auth_controller_unittest.cc ('k') | net/http/http_auth_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698