| 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 #include <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/strings/string16.h" | 7 #include "base/strings/string16.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 HttpAuth::Target target) { | 26 HttpAuth::Target target) { |
| 27 // Can't use initializer list since these are members of the base class. | 27 // Can't use initializer list since these are members of the base class. |
| 28 auth_scheme_ = scheme; | 28 auth_scheme_ = scheme; |
| 29 realm_ = realm; | 29 realm_ = realm; |
| 30 score_ = 1; | 30 score_ = 1; |
| 31 target_ = target; | 31 target_ = target; |
| 32 properties_ = 0; | 32 properties_ = 0; |
| 33 } | 33 } |
| 34 | 34 |
| 35 virtual HttpAuth::AuthorizationResult HandleAnotherChallenge( | 35 virtual HttpAuth::AuthorizationResult HandleAnotherChallenge( |
| 36 HttpAuthChallengeTokenizer* challenge) OVERRIDE { | 36 HttpAuthChallengeTokenizer* challenge) override { |
| 37 return HttpAuth::AUTHORIZATION_RESULT_REJECT; | 37 return HttpAuth::AUTHORIZATION_RESULT_REJECT; |
| 38 } | 38 } |
| 39 | 39 |
| 40 protected: | 40 protected: |
| 41 virtual bool Init(HttpAuthChallengeTokenizer* challenge) OVERRIDE { | 41 virtual bool Init(HttpAuthChallengeTokenizer* challenge) override { |
| 42 return false; // Unused. | 42 return false; // Unused. |
| 43 } | 43 } |
| 44 | 44 |
| 45 virtual int GenerateAuthTokenImpl(const AuthCredentials*, | 45 virtual int GenerateAuthTokenImpl(const AuthCredentials*, |
| 46 const HttpRequestInfo*, | 46 const HttpRequestInfo*, |
| 47 const CompletionCallback& callback, | 47 const CompletionCallback& callback, |
| 48 std::string* auth_token) OVERRIDE { | 48 std::string* auth_token) override { |
| 49 *auth_token = "mock-credentials"; | 49 *auth_token = "mock-credentials"; |
| 50 return OK; | 50 return OK; |
| 51 } | 51 } |
| 52 | 52 |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 virtual ~MockAuthHandler() {} | 55 virtual ~MockAuthHandler() {} |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 const char* kRealm1 = "Realm1"; | 58 const char* kRealm1 = "Realm1"; |
| (...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 619 CheckPathExistence(0, i, false); | 619 CheckPathExistence(0, i, false); |
| 620 | 620 |
| 621 for (int i = 0; i < kMaxPaths; ++i) | 621 for (int i = 0; i < kMaxPaths; ++i) |
| 622 CheckPathExistence(0, i + 3, true); | 622 CheckPathExistence(0, i + 3, true); |
| 623 | 623 |
| 624 for (int i = 0; i < kMaxRealms; ++i) | 624 for (int i = 0; i < kMaxRealms; ++i) |
| 625 CheckRealmExistence(i, true); | 625 CheckRealmExistence(i, true); |
| 626 } | 626 } |
| 627 | 627 |
| 628 } // namespace net | 628 } // namespace net |
| OLD | NEW |