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

Side by Side Diff: minidump/minidump_memory_writer_test.cc

Issue 654933002: Use exactly one of final, override, and virtual (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: git grep -E '^ {3,}.*override[ Created 6 years, 2 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 | « minidump/minidump_memory_writer.h ('k') | minidump/minidump_memory_writer_test_util.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 2014 The Crashpad Authors. All rights reserved. 1 // Copyright 2014 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 class TestMemoryStream final : public internal::MinidumpStreamWriter { 193 class TestMemoryStream final : public internal::MinidumpStreamWriter {
194 public: 194 public:
195 TestMemoryStream(uint64_t base_address, size_t size, uint8_t value) 195 TestMemoryStream(uint64_t base_address, size_t size, uint8_t value)
196 : MinidumpStreamWriter(), memory_(base_address, size, value) {} 196 : MinidumpStreamWriter(), memory_(base_address, size, value) {}
197 197
198 ~TestMemoryStream() {} 198 ~TestMemoryStream() {}
199 199
200 TestMinidumpMemoryWriter* memory() { return &memory_; } 200 TestMinidumpMemoryWriter* memory() { return &memory_; }
201 201
202 // MinidumpStreamWriter: 202 // MinidumpStreamWriter:
203 virtual MinidumpStreamType StreamType() const override { 203 MinidumpStreamType StreamType() const override {
204 return kBogusStreamType; 204 return kBogusStreamType;
205 } 205 }
206 206
207 protected: 207 protected:
208 // MinidumpWritable: 208 // MinidumpWritable:
209 virtual size_t SizeOfObject() override { 209 size_t SizeOfObject() override {
210 EXPECT_GE(state(), kStateFrozen); 210 EXPECT_GE(state(), kStateFrozen);
211 return 0; 211 return 0;
212 } 212 }
213 213
214 virtual std::vector<MinidumpWritable*> Children() override { 214 std::vector<MinidumpWritable*> Children() override {
215 EXPECT_GE(state(), kStateFrozen); 215 EXPECT_GE(state(), kStateFrozen);
216 std::vector<MinidumpWritable*> children(1, memory()); 216 std::vector<MinidumpWritable*> children(1, memory());
217 return children; 217 return children;
218 } 218 }
219 219
220 virtual bool WriteObject(FileWriterInterface* file_writer) override { 220 bool WriteObject(FileWriterInterface* file_writer) override {
221 EXPECT_EQ(kStateWritable, state()); 221 EXPECT_EQ(kStateWritable, state());
222 return true; 222 return true;
223 } 223 }
224 224
225 private: 225 private:
226 TestMinidumpMemoryWriter memory_; 226 TestMinidumpMemoryWriter memory_;
227 227
228 DISALLOW_COPY_AND_ASSIGN(TestMemoryStream); 228 DISALLOW_COPY_AND_ASSIGN(TestMemoryStream);
229 }; 229 };
230 230
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 &memory_list->MemoryRanges[1], 291 &memory_list->MemoryRanges[1],
292 file_writer.string(), 292 file_writer.string(),
293 kValue1, 293 kValue1,
294 true); 294 true);
295 } 295 }
296 } 296 }
297 297
298 } // namespace 298 } // namespace
299 } // namespace test 299 } // namespace test
300 } // namespace crashpad 300 } // namespace crashpad
OLDNEW
« no previous file with comments | « minidump/minidump_memory_writer.h ('k') | minidump/minidump_memory_writer_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698