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

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

Issue 8568021: Add OVERRIDE to net/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: net only Created 9 years, 1 month 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_handler_factory.h ('k') | net/http/http_auth_handler_negotiate.h » ('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_MOCK_H_ 5 #ifndef NET_HTTP_HTTP_AUTH_HANDLER_MOCK_H_
6 #define NET_HTTP_HTTP_AUTH_HANDLER_MOCK_H_ 6 #define NET_HTTP_HTTP_AUTH_HANDLER_MOCK_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 25 matching lines...) Expand all
36 Factory(); 36 Factory();
37 virtual ~Factory(); 37 virtual ~Factory();
38 38
39 void AddMockHandler(HttpAuthHandler* handler, HttpAuth::Target target); 39 void AddMockHandler(HttpAuthHandler* handler, HttpAuth::Target target);
40 40
41 void set_do_init_from_challenge(bool do_init_from_challenge) { 41 void set_do_init_from_challenge(bool do_init_from_challenge) {
42 do_init_from_challenge_ = do_init_from_challenge; 42 do_init_from_challenge_ = do_init_from_challenge;
43 } 43 }
44 44
45 // HttpAuthHandlerFactory: 45 // HttpAuthHandlerFactory:
46 virtual int CreateAuthHandler(HttpAuth::ChallengeTokenizer* challenge, 46 virtual int CreateAuthHandler(
47 HttpAuth::Target target, 47 HttpAuth::ChallengeTokenizer* challenge,
48 const GURL& origin, 48 HttpAuth::Target target,
49 CreateReason reason, 49 const GURL& origin,
50 int nonce_count, 50 CreateReason reason,
51 const BoundNetLog& net_log, 51 int nonce_count,
52 scoped_ptr<HttpAuthHandler>* handler); 52 const BoundNetLog& net_log,
53 scoped_ptr<HttpAuthHandler>* handler) OVERRIDE;
53 54
54 private: 55 private:
55 ScopedVector<HttpAuthHandler> handlers_[HttpAuth::AUTH_NUM_TARGETS]; 56 ScopedVector<HttpAuthHandler> handlers_[HttpAuth::AUTH_NUM_TARGETS];
56 bool do_init_from_challenge_; 57 bool do_init_from_challenge_;
57 }; 58 };
58 59
59 HttpAuthHandlerMock(); 60 HttpAuthHandlerMock();
60 61
61 virtual ~HttpAuthHandlerMock(); 62 virtual ~HttpAuthHandlerMock();
62 63
(...skipping 24 matching lines...) Expand all
87 } 88 }
88 89
89 // HttpAuthHandler: 90 // HttpAuthHandler:
90 virtual HttpAuth::AuthorizationResult HandleAnotherChallenge( 91 virtual HttpAuth::AuthorizationResult HandleAnotherChallenge(
91 HttpAuth::ChallengeTokenizer* challenge) OVERRIDE; 92 HttpAuth::ChallengeTokenizer* challenge) OVERRIDE;
92 virtual bool NeedsIdentity() OVERRIDE; 93 virtual bool NeedsIdentity() OVERRIDE;
93 virtual bool AllowsDefaultCredentials() OVERRIDE; 94 virtual bool AllowsDefaultCredentials() OVERRIDE;
94 virtual bool AllowsExplicitCredentials() OVERRIDE; 95 virtual bool AllowsExplicitCredentials() OVERRIDE;
95 96
96 protected: 97 protected:
97 virtual bool Init(HttpAuth::ChallengeTokenizer* challenge); 98 virtual bool Init(HttpAuth::ChallengeTokenizer* challenge) OVERRIDE;
98 99
99 virtual int GenerateAuthTokenImpl(const AuthCredentials* credentials, 100 virtual int GenerateAuthTokenImpl(const AuthCredentials* credentials,
100 const HttpRequestInfo* request, 101 const HttpRequestInfo* request,
101 OldCompletionCallback* callback, 102 OldCompletionCallback* callback,
102 std::string* auth_token); 103 std::string* auth_token) OVERRIDE;
103 104
104 private: 105 private:
105 void OnResolveCanonicalName(); 106 void OnResolveCanonicalName();
106 107
107 void OnGenerateAuthToken(); 108 void OnGenerateAuthToken();
108 109
109 Resolve resolve_; 110 Resolve resolve_;
110 OldCompletionCallback* user_callback_; 111 OldCompletionCallback* user_callback_;
111 base::WeakPtrFactory<HttpAuthHandlerMock> ptr_factory_; 112 base::WeakPtrFactory<HttpAuthHandlerMock> ptr_factory_;
112 bool generate_async_; 113 bool generate_async_;
113 int generate_rv_; 114 int generate_rv_;
114 std::string* auth_token_; 115 std::string* auth_token_;
115 bool first_round_; 116 bool first_round_;
116 bool connection_based_; 117 bool connection_based_;
117 bool allows_default_credentials_; 118 bool allows_default_credentials_;
118 bool allows_explicit_credentials_; 119 bool allows_explicit_credentials_;
119 GURL request_url_; 120 GURL request_url_;
120 }; 121 };
121 122
122 } // namespace net 123 } // namespace net
123 124
124 #endif // NET_HTTP_HTTP_AUTH_HANDLER_MOCK_H_ 125 #endif // NET_HTTP_HTTP_AUTH_HANDLER_MOCK_H_
OLDNEW
« no previous file with comments | « net/http/http_auth_handler_factory.h ('k') | net/http/http_auth_handler_negotiate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698