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

Side by Side Diff: net/spdy/spdy_test_utils.cc

Issue 1328563002: clang_tidy net/spdy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « net/spdy/spdy_prefixed_buffer_reader.cc ('k') | net/spdy/write_blocked_list.h » ('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) 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/spdy/spdy_test_utils.h" 5 #include "net/spdy/spdy_test_utils.h"
6 6
7 #include <cstring> 7 #include <cstring>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 30 matching lines...) Expand all
41 hex += mark ? '*' : ' '; 41 hex += mark ? '*' : ' ';
42 hex += kHexChars[(*p & 0xf0) >> 4]; 42 hex += kHexChars[(*p & 0xf0) >> 4];
43 hex += kHexChars[*p & 0x0f]; 43 hex += kHexChars[*p & 0x0f];
44 hex += mark ? '*' : ' '; 44 hex += mark ? '*' : ' ';
45 } else { 45 } else {
46 hex += " "; 46 hex += " ";
47 } 47 }
48 } 48 }
49 hex = hex + " "; 49 hex = hex + " ";
50 50
51 for (const unsigned char *p = row; p < row + 4 && p < row + length; ++p) 51 for (const unsigned char* p = row; p < row + 4 && p < row + length; ++p) {
52 hex += (*p >= 0x20 && *p <= 0x7f) ? (*p) : '.'; 52 hex += (*p >= 0x20 && *p <= 0x7f) ? (*p) : '.';
53 }
53 54
54 hex = hex + '\n'; 55 hex = hex + '\n';
55 } 56 }
56 return hex; 57 return hex;
57 } 58 }
58 59
59 void CompareCharArraysWithHexError( 60 void CompareCharArraysWithHexError(
60 const std::string& description, 61 const std::string& description,
61 const unsigned char* actual, 62 const unsigned char* actual,
62 const int actual_len, 63 const int actual_len,
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 168
168 // Construct a fake SSLInfo that will pass AddHPKPHeader's checks. 169 // Construct a fake SSLInfo that will pass AddHPKPHeader's checks.
169 SSLInfo ssl_info; 170 SSLInfo ssl_info;
170 ssl_info.is_issued_by_known_root = true; 171 ssl_info.is_issued_by_known_root = true;
171 ssl_info.public_key_hashes.push_back(GetTestHashValue(primary_label)); 172 ssl_info.public_key_hashes.push_back(GetTestHashValue(primary_label));
172 EXPECT_TRUE(state->AddHPKPHeader(host, header, ssl_info)); 173 EXPECT_TRUE(state->AddHPKPHeader(host, header, ssl_info));
173 } 174 }
174 175
175 } // namespace test 176 } // namespace test
176 } // namespace net 177 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_prefixed_buffer_reader.cc ('k') | net/spdy/write_blocked_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698