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

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

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698