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

Side by Side Diff: net/url_request/url_request_context_builder_unittest.cc

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_network_transaction_unittest.cc ('k') | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/url_request/url_request_context_builder.h" 5 #include "net/url_request/url_request_context_builder.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "net/base/request_priority.h" 9 #include "net/base/request_priority.h"
10 #include "net/http/http_auth_handler.h" 10 #include "net/http/http_auth_handler.h"
(...skipping 12 matching lines...) Expand all
23 namespace net { 23 namespace net {
24 24
25 namespace { 25 namespace {
26 26
27 class MockHttpAuthHandlerFactory : public HttpAuthHandlerFactory { 27 class MockHttpAuthHandlerFactory : public HttpAuthHandlerFactory {
28 public: 28 public:
29 explicit MockHttpAuthHandlerFactory(int return_code) : 29 explicit MockHttpAuthHandlerFactory(int return_code) :
30 return_code_(return_code) {} 30 return_code_(return_code) {}
31 ~MockHttpAuthHandlerFactory() override {} 31 ~MockHttpAuthHandlerFactory() override {}
32 32
33 int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge, 33 int CreateAuthHandler(const HttpAuthChallengeTokenizer& challenge,
34 HttpAuth::Target target, 34 HttpAuth::Target target,
35 const GURL& origin, 35 const GURL& origin,
36 CreateReason reason, 36 CreateReason reason,
37 int nonce_count, 37 int nonce_count,
38 const BoundNetLog& net_log, 38 const BoundNetLog& net_log,
39 scoped_ptr<HttpAuthHandler>* handler) override { 39 scoped_ptr<HttpAuthHandler>* handler) override {
40 handler->reset(); 40 handler->reset();
41 return return_code_; 41 return return_code_;
42 } 42 }
43 43
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 &handler)); 109 &handler));
110 // Verify that a handler isn't returned for a bogus scheme. 110 // Verify that a handler isn't returned for a bogus scheme.
111 EXPECT_EQ(ERR_UNSUPPORTED_AUTH_SCHEME, 111 EXPECT_EQ(ERR_UNSUPPORTED_AUTH_SCHEME,
112 context->http_auth_handler_factory()->CreateAuthHandlerFromString( 112 context->http_auth_handler_factory()->CreateAuthHandlerFromString(
113 "Bogus", HttpAuth::AUTH_SERVER, gurl, BoundNetLog(), &handler)); 113 "Bogus", HttpAuth::AUTH_SERVER, gurl, BoundNetLog(), &handler));
114 } 114 }
115 115
116 } // namespace 116 } // namespace
117 117
118 } // namespace net 118 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698