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

Side by Side Diff: Source/modules/filesystem/DirectoryReaderSync.cpp

Issue 1227783004: Fix virtual/override/final usage in Source/modules/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 5 years, 5 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
« no previous file with comments | « Source/modules/filesystem/DirectoryReaderSync.h ('k') | Source/modules/filesystem/FileEntry.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 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 namespace blink { 43 namespace blink {
44 44
45 class DirectoryReaderSync::EntriesCallbackHelper final : public EntriesCallback { 45 class DirectoryReaderSync::EntriesCallbackHelper final : public EntriesCallback {
46 public: 46 public:
47 explicit EntriesCallbackHelper(DirectoryReaderSync* reader) 47 explicit EntriesCallbackHelper(DirectoryReaderSync* reader)
48 : m_reader(reader) 48 : m_reader(reader)
49 { 49 {
50 } 50 }
51 51
52 virtual void handleEvent(const EntryHeapVector& entries) override 52 void handleEvent(const EntryHeapVector& entries) override
53 { 53 {
54 EntrySyncHeapVector syncEntries; 54 EntrySyncHeapVector syncEntries;
55 syncEntries.reserveInitialCapacity(entries.size()); 55 syncEntries.reserveInitialCapacity(entries.size());
56 for (size_t i = 0; i < entries.size(); ++i) 56 for (size_t i = 0; i < entries.size(); ++i)
57 syncEntries.uncheckedAppend(EntrySync::create(entries[i].get())); 57 syncEntries.uncheckedAppend(EntrySync::create(entries[i].get()));
58 m_reader->addEntries(syncEntries); 58 m_reader->addEntries(syncEntries);
59 } 59 }
60 60
61 DEFINE_INLINE_VIRTUAL_TRACE() 61 DEFINE_INLINE_VIRTUAL_TRACE()
62 { 62 {
63 visitor->trace(m_reader); 63 visitor->trace(m_reader);
64 EntriesCallback::trace(visitor); 64 EntriesCallback::trace(visitor);
65 } 65 }
66 66
67 private: 67 private:
68 Member<DirectoryReaderSync> m_reader; 68 Member<DirectoryReaderSync> m_reader;
69 }; 69 };
70 70
71 class DirectoryReaderSync::ErrorCallbackHelper final : public ErrorCallback { 71 class DirectoryReaderSync::ErrorCallbackHelper final : public ErrorCallback {
72 public: 72 public:
73 explicit ErrorCallbackHelper(DirectoryReaderSync* reader) 73 explicit ErrorCallbackHelper(DirectoryReaderSync* reader)
74 : m_reader(reader) 74 : m_reader(reader)
75 { 75 {
76 } 76 }
77 77
78 virtual void handleEvent(FileError* error) override 78 void handleEvent(FileError* error) override
79 { 79 {
80 m_reader->setError(error->code()); 80 m_reader->setError(error->code());
81 } 81 }
82 82
83 DEFINE_INLINE_VIRTUAL_TRACE() 83 DEFINE_INLINE_VIRTUAL_TRACE()
84 { 84 {
85 visitor->trace(m_reader); 85 visitor->trace(m_reader);
86 ErrorCallback::trace(visitor); 86 ErrorCallback::trace(visitor);
87 } 87 }
88 88
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 return result; 120 return result;
121 } 121 }
122 122
123 DEFINE_TRACE(DirectoryReaderSync) 123 DEFINE_TRACE(DirectoryReaderSync)
124 { 124 {
125 visitor->trace(m_entries); 125 visitor->trace(m_entries);
126 DirectoryReaderBase::trace(visitor); 126 DirectoryReaderBase::trace(visitor);
127 } 127 }
128 128
129 } // namespace 129 } // namespace
OLDNEW
« no previous file with comments | « Source/modules/filesystem/DirectoryReaderSync.h ('k') | Source/modules/filesystem/FileEntry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698