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

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

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_handler_factory_unittest.cc ('k') | net/http/http_auth_handler_negotiate.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 #include "net/http/http_auth_handler_mock.h" 5 #include "net/http/http_auth_handler_mock.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 bool HttpAuthHandlerMock::AllowsDefaultCredentials() { 94 bool HttpAuthHandlerMock::AllowsDefaultCredentials() {
95 return allows_default_credentials_; 95 return allows_default_credentials_;
96 } 96 }
97 97
98 bool HttpAuthHandlerMock::AllowsExplicitCredentials() { 98 bool HttpAuthHandlerMock::AllowsExplicitCredentials() {
99 return allows_explicit_credentials_; 99 return allows_explicit_credentials_;
100 } 100 }
101 101
102 bool HttpAuthHandlerMock::Init(HttpAuth::ChallengeTokenizer* challenge) { 102 bool HttpAuthHandlerMock::Init(HttpAuth::ChallengeTokenizer* challenge) {
103 auth_scheme_ = HttpAuth::AUTH_SCHEME_MOCK; 103 auth_scheme_ = "mock";
104 score_ = 1; 104 score_ = 1;
105 properties_ = connection_based_ ? IS_CONNECTION_BASED : 0; 105 properties_ = connection_based_ ? IS_CONNECTION_BASED : 0;
106 return true; 106 return true;
107 } 107 }
108 108
109 int HttpAuthHandlerMock::GenerateAuthTokenImpl( 109 int HttpAuthHandlerMock::GenerateAuthTokenImpl(
110 const AuthCredentials* credentials, 110 const AuthCredentials* credentials,
111 const HttpRequestInfo* request, 111 const HttpRequestInfo* request,
112 const CompletionCallback& callback, 112 const CompletionCallback& callback,
113 std::string* auth_token) { 113 std::string* auth_token) {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 std::vector<HttpAuthHandler*>& handlers = handlers_[target].get(); 177 std::vector<HttpAuthHandler*>& handlers = handlers_[target].get();
178 handlers.erase(handlers.begin()); 178 handlers.erase(handlers.begin());
179 if (do_init_from_challenge_ && 179 if (do_init_from_challenge_ &&
180 !tmp_handler->InitFromChallenge(challenge, target, origin, net_log)) 180 !tmp_handler->InitFromChallenge(challenge, target, origin, net_log))
181 return ERR_INVALID_RESPONSE; 181 return ERR_INVALID_RESPONSE;
182 handler->swap(tmp_handler); 182 handler->swap(tmp_handler);
183 return OK; 183 return OK;
184 } 184 }
185 185
186 } // namespace net 186 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_auth_handler_factory_unittest.cc ('k') | net/http/http_auth_handler_negotiate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698