OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_log_util.h" | 5 #include "net/http/http_log_util.h" |
6 | 6 |
7 #include "base/strings/string_util.h" | 7 #include "base/strings/string_util.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "net/http/http_auth_challenge_tokenizer.h" | 9 #include "net/http/http_auth_challenge_tokenizer.h" |
10 | 10 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 if (ShouldRedactChallenge(&challenge)) { | 66 if (ShouldRedactChallenge(&challenge)) { |
67 redact_begin = challenge.params_begin(); | 67 redact_begin = challenge.params_begin(); |
68 redact_end = challenge.params_end(); | 68 redact_end = challenge.params_end(); |
69 } | 69 } |
70 } | 70 } |
71 | 71 |
72 if (redact_begin == redact_end) | 72 if (redact_begin == redact_end) |
73 return value; | 73 return value; |
74 | 74 |
75 return std::string(value.begin(), redact_begin) + | 75 return std::string(value.begin(), redact_begin) + |
76 base::StringPrintf("[%ld bytes were stripped]", | 76 base::StringPrintf("[%ld bytes were stripped]", |
77 static_cast<long>(redact_end - redact_begin)) + | 77 static_cast<long>(redact_end - redact_begin)) + |
78 std::string(redact_end, value.end()); | 78 std::string(redact_end, value.end()); |
79 } | 79 } |
80 | 80 |
81 } // namespace net | 81 } // namespace net |
OLD | NEW |