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

Side by Side Diff: net/quic/crypto/null_decrypter.cc

Issue 1160203003: net: Remove the remaining use of GG_(U)INTn_C macros. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stdint.h Created 5 years, 6 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/quic/crypto/common_cert_set_test.cc ('k') | net/quic/quic_bandwidth.cc » ('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 <stdint.h>
6
5 #include "net/quic/crypto/null_decrypter.h" 7 #include "net/quic/crypto/null_decrypter.h"
6 #include "net/quic/quic_utils.h" 8 #include "net/quic/quic_utils.h"
7 #include "net/quic/quic_data_reader.h" 9 #include "net/quic/quic_data_reader.h"
8 10
9 using base::StringPiece; 11 using base::StringPiece;
10 using std::string; 12 using std::string;
11 13
12 namespace net { 14 namespace net {
13 15
14 NullDecrypter::NullDecrypter() {} 16 NullDecrypter::NullDecrypter() {}
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 *hash = hi; 62 *hash = hi;
61 *hash <<= 64; 63 *hash <<= 64;
62 *hash += lo; 64 *hash += lo;
63 return true; 65 return true;
64 } 66 }
65 67
66 uint128 NullDecrypter::ComputeHash(const StringPiece& data1, 68 uint128 NullDecrypter::ComputeHash(const StringPiece& data1,
67 const StringPiece& data2) const { 69 const StringPiece& data2) const {
68 uint128 correct_hash = QuicUtils::FNV1a_128_Hash_Two( 70 uint128 correct_hash = QuicUtils::FNV1a_128_Hash_Two(
69 data1.data(), data1.length(), data2.data(), data2.length()); 71 data1.data(), data1.length(), data2.data(), data2.length());
70 uint128 mask(GG_UINT64_C(0x0), GG_UINT64_C(0xffffffff)); 72 uint128 mask(UINT64_C(0x0), UINT64_C(0xffffffff));
71 mask <<= 96; 73 mask <<= 96;
72 correct_hash &= ~mask; 74 correct_hash &= ~mask;
73 return correct_hash; 75 return correct_hash;
74 } 76 }
75 77
76 } // namespace net 78 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/crypto/common_cert_set_test.cc ('k') | net/quic/quic_bandwidth.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698