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

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

Issue 1383613002: [net/http auth] Cleanup. Method names, and constness. Base URL: https://chromium.googlesource.com/chromium/src.git@mock-auth-handler-generalization
Patch Set: Created 5 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 | « net/http/http_auth_handler.cc ('k') | net/http/http_auth_handler_basic.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_BASIC_H_ 5 #ifndef NET_HTTP_HTTP_AUTH_HANDLER_BASIC_H_
6 #define NET_HTTP_HTTP_AUTH_HANDLER_BASIC_H_ 6 #define NET_HTTP_HTTP_AUTH_HANDLER_BASIC_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "net/base/net_export.h" 10 #include "net/base/net_export.h"
11 #include "net/http/http_auth_handler.h" 11 #include "net/http/http_auth_handler.h"
12 #include "net/http/http_auth_handler_factory.h" 12 #include "net/http/http_auth_handler_factory.h"
13 13
14 namespace net { 14 namespace net {
15 15
16 // Code for handling http basic authentication. 16 // Code for handling http basic authentication.
17 class NET_EXPORT_PRIVATE HttpAuthHandlerBasic : public HttpAuthHandler { 17 class NET_EXPORT_PRIVATE HttpAuthHandlerBasic : public HttpAuthHandler {
18 public: 18 public:
19 class NET_EXPORT_PRIVATE Factory : public HttpAuthHandlerFactory { 19 class NET_EXPORT_PRIVATE Factory : public HttpAuthHandlerFactory {
20 public: 20 public:
21 Factory(); 21 Factory();
22 ~Factory() override; 22 ~Factory() override;
23 23
24 int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge, 24 int CreateAuthHandler(const HttpAuthChallengeTokenizer& challenge,
25 HttpAuth::Target target, 25 HttpAuth::Target target,
26 const GURL& origin, 26 const GURL& origin,
27 CreateReason reason, 27 CreateReason reason,
28 int digest_nonce_count, 28 int digest_nonce_count,
29 const BoundNetLog& net_log, 29 const BoundNetLog& net_log,
30 scoped_ptr<HttpAuthHandler>* handler) override; 30 scoped_ptr<HttpAuthHandler>* handler) override;
31 }; 31 };
32 32
33 HttpAuth::AuthorizationResult HandleAnotherChallenge( 33 HttpAuth::AuthorizationResult HandleAnotherChallenge(
34 HttpAuthChallengeTokenizer* challenge) override; 34 const HttpAuthChallengeTokenizer& challenge) override;
35 35
36 protected: 36 protected:
37 bool Init(HttpAuthChallengeTokenizer* challenge) override; 37 int Init(const HttpAuthChallengeTokenizer& challenge) override;
38 38
39 int GenerateAuthTokenImpl(const AuthCredentials* credentials, 39 int GenerateAuthTokenImpl(const AuthCredentials* credentials,
40 const HttpRequestInfo* request, 40 const HttpRequestInfo& request,
41 const CompletionCallback& callback, 41 const CompletionCallback& callback,
42 std::string* auth_token) override; 42 std::string* auth_token) override;
43 43
44 private: 44 private:
45 ~HttpAuthHandlerBasic() override {} 45 ~HttpAuthHandlerBasic() override {}
46 46
47 bool ParseChallenge(HttpAuthChallengeTokenizer* challenge); 47 int ParseChallenge(const HttpAuthChallengeTokenizer& challenge);
48 }; 48 };
49 49
50 } // namespace net 50 } // namespace net
51 51
52 #endif // NET_HTTP_HTTP_AUTH_HANDLER_BASIC_H_ 52 #endif // NET_HTTP_HTTP_AUTH_HANDLER_BASIC_H_
OLDNEW
« no previous file with comments | « net/http/http_auth_handler.cc ('k') | net/http/http_auth_handler_basic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698