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

Side by Side Diff: net/quic/quic_framer_test.cc

Issue 14696007: Warn on missing OVERRIDE/virtual everywhere, not just in header files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: new regressions, attempt 3 Created 7 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 (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 <algorithm> 5 #include <algorithm>
6 #include <map> 6 #include <map>
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/hash_tables.h" 10 #include "base/hash_tables.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 virtual ~TestEncrypter() {} 71 virtual ~TestEncrypter() {}
72 virtual bool SetKey(StringPiece key) OVERRIDE { 72 virtual bool SetKey(StringPiece key) OVERRIDE {
73 return true; 73 return true;
74 } 74 }
75 virtual bool SetNoncePrefix(StringPiece nonce_prefix) OVERRIDE { 75 virtual bool SetNoncePrefix(StringPiece nonce_prefix) OVERRIDE {
76 return true; 76 return true;
77 } 77 }
78 virtual bool Encrypt(StringPiece nonce, 78 virtual bool Encrypt(StringPiece nonce,
79 StringPiece associated_data, 79 StringPiece associated_data,
80 StringPiece plaintext, 80 StringPiece plaintext,
81 unsigned char* output) { 81 unsigned char* output) OVERRIDE {
82 CHECK(false) << "Not implemented"; 82 CHECK(false) << "Not implemented";
83 return false; 83 return false;
84 } 84 }
85 virtual QuicData* EncryptPacket(QuicPacketSequenceNumber sequence_number, 85 virtual QuicData* EncryptPacket(QuicPacketSequenceNumber sequence_number,
86 StringPiece associated_data, 86 StringPiece associated_data,
87 StringPiece plaintext) { 87 StringPiece plaintext) OVERRIDE {
88 sequence_number_ = sequence_number; 88 sequence_number_ = sequence_number;
89 associated_data_ = associated_data.as_string(); 89 associated_data_ = associated_data.as_string();
90 plaintext_ = plaintext.as_string(); 90 plaintext_ = plaintext.as_string();
91 return new QuicData(plaintext.data(), plaintext.length()); 91 return new QuicData(plaintext.data(), plaintext.length());
92 } 92 }
93 virtual size_t GetKeySize() const OVERRIDE { 93 virtual size_t GetKeySize() const OVERRIDE {
94 return 0; 94 return 0;
95 } 95 }
96 virtual size_t GetNoncePrefixSize() const OVERRIDE { 96 virtual size_t GetNoncePrefixSize() const OVERRIDE {
97 return 0; 97 return 0;
(...skipping 21 matching lines...) Expand all
119 virtual bool SetKey(StringPiece key) OVERRIDE { 119 virtual bool SetKey(StringPiece key) OVERRIDE {
120 return true; 120 return true;
121 } 121 }
122 virtual bool SetNoncePrefix(StringPiece nonce_prefix) OVERRIDE { 122 virtual bool SetNoncePrefix(StringPiece nonce_prefix) OVERRIDE {
123 return true; 123 return true;
124 } 124 }
125 virtual bool Decrypt(StringPiece nonce, 125 virtual bool Decrypt(StringPiece nonce,
126 StringPiece associated_data, 126 StringPiece associated_data,
127 StringPiece ciphertext, 127 StringPiece ciphertext,
128 unsigned char* output, 128 unsigned char* output,
129 size_t* output_length) { 129 size_t* output_length) OVERRIDE {
130 CHECK(false) << "Not implemented"; 130 CHECK(false) << "Not implemented";
131 return false; 131 return false;
132 } 132 }
133 virtual QuicData* DecryptPacket(QuicPacketSequenceNumber sequence_number, 133 virtual QuicData* DecryptPacket(QuicPacketSequenceNumber sequence_number,
134 StringPiece associated_data, 134 StringPiece associated_data,
135 StringPiece ciphertext) { 135 StringPiece ciphertext) OVERRIDE {
136 sequence_number_ = sequence_number; 136 sequence_number_ = sequence_number;
137 associated_data_ = associated_data.as_string(); 137 associated_data_ = associated_data.as_string();
138 ciphertext_ = ciphertext.as_string(); 138 ciphertext_ = ciphertext.as_string();
139 return new QuicData(ciphertext.data(), ciphertext.length()); 139 return new QuicData(ciphertext.data(), ciphertext.length());
140 } 140 }
141 virtual StringPiece GetKey() const OVERRIDE { 141 virtual StringPiece GetKey() const OVERRIDE {
142 return StringPiece(); 142 return StringPiece();
143 } 143 }
144 virtual StringPiece GetNoncePrefix() const OVERRIDE { 144 virtual StringPiece GetNoncePrefix() const OVERRIDE {
145 return StringPiece(); 145 return StringPiece();
(...skipping 2645 matching lines...) Expand 10 before | Expand all | Expand 10 after
2791 EXPECT_CALL(visitor, OnAckFrame(_)).Times(0); 2791 EXPECT_CALL(visitor, OnAckFrame(_)).Times(0);
2792 EXPECT_CALL(visitor, OnPacketComplete()); 2792 EXPECT_CALL(visitor, OnPacketComplete());
2793 2793
2794 QuicEncryptedPacket encrypted(AsChars(packet), arraysize(packet), false); 2794 QuicEncryptedPacket encrypted(AsChars(packet), arraysize(packet), false);
2795 EXPECT_TRUE(framer_.ProcessPacket(encrypted)); 2795 EXPECT_TRUE(framer_.ProcessPacket(encrypted));
2796 EXPECT_EQ(QUIC_NO_ERROR, framer_.error()); 2796 EXPECT_EQ(QUIC_NO_ERROR, framer_.error());
2797 } 2797 }
2798 2798
2799 } // namespace test 2799 } // namespace test
2800 } // namespace net 2800 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/congestion_control/inter_arrival_state_machine_test.cc ('k') | net/quic/test_tools/crypto_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698