OLD | NEW |
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 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 | 37 |
38 void AddMockHandler(HttpAuthHandler* handler, HttpAuth::Target target); | 38 void AddMockHandler(HttpAuthHandler* handler, HttpAuth::Target target); |
39 | 39 |
40 void set_do_init_from_challenge(bool do_init_from_challenge) { | 40 void set_do_init_from_challenge(bool do_init_from_challenge) { |
41 do_init_from_challenge_ = do_init_from_challenge; | 41 do_init_from_challenge_ = do_init_from_challenge; |
42 } | 42 } |
43 | 43 |
44 // HttpAuthHandlerFactory: | 44 // HttpAuthHandlerFactory: |
45 int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge, | 45 int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge, |
46 HttpAuth::Target target, | 46 HttpAuth::Target target, |
47 const GURL& origin, | 47 const url::Origin& origin, |
48 CreateReason reason, | 48 CreateReason reason, |
49 int nonce_count, | 49 int nonce_count, |
50 const BoundNetLog& net_log, | 50 const BoundNetLog& net_log, |
51 scoped_ptr<HttpAuthHandler>* handler) override; | 51 scoped_ptr<HttpAuthHandler>* handler) override; |
52 | 52 |
53 private: | 53 private: |
54 ScopedVector<HttpAuthHandler> handlers_[HttpAuth::AUTH_NUM_TARGETS]; | 54 ScopedVector<HttpAuthHandler> handlers_[HttpAuth::AUTH_NUM_TARGETS]; |
55 bool do_init_from_challenge_; | 55 bool do_init_from_challenge_; |
56 }; | 56 }; |
57 | 57 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 bool connection_based_; | 114 bool connection_based_; |
115 bool allows_default_credentials_; | 115 bool allows_default_credentials_; |
116 bool allows_explicit_credentials_; | 116 bool allows_explicit_credentials_; |
117 GURL request_url_; | 117 GURL request_url_; |
118 base::WeakPtrFactory<HttpAuthHandlerMock> weak_factory_; | 118 base::WeakPtrFactory<HttpAuthHandlerMock> weak_factory_; |
119 }; | 119 }; |
120 | 120 |
121 } // namespace net | 121 } // namespace net |
122 | 122 |
123 #endif // NET_HTTP_HTTP_AUTH_HANDLER_MOCK_H_ | 123 #endif // NET_HTTP_HTTP_AUTH_HANDLER_MOCK_H_ |
OLD | NEW |