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

Side by Side Diff: third_party/WebKit/Source/core/fetch/DocumentResourceReference.h

Issue 2377253002: Add explicit to core/fetch, core/loader and modules/websockets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « no previous file | third_party/WebKit/Source/core/fetch/LinkFetchResource.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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 17 matching lines...) Expand all
28 28
29 #include "core/fetch/DocumentResource.h" 29 #include "core/fetch/DocumentResource.h"
30 #include "platform/heap/Handle.h" 30 #include "platform/heap/Handle.h"
31 31
32 namespace blink { 32 namespace blink {
33 33
34 class DocumentResourceReference final : public GarbageCollectedFinalized<Documen tResourceReference>, public DocumentResourceClient { 34 class DocumentResourceReference final : public GarbageCollectedFinalized<Documen tResourceReference>, public DocumentResourceClient {
35 USING_GARBAGE_COLLECTED_MIXIN(DocumentResourceReference); 35 USING_GARBAGE_COLLECTED_MIXIN(DocumentResourceReference);
36 USING_PRE_FINALIZER(DocumentResourceReference, removeSelf); 36 USING_PRE_FINALIZER(DocumentResourceReference, removeSelf);
37 public: 37 public:
38 DocumentResourceReference(DocumentResource* document) 38 explicit DocumentResourceReference(DocumentResource* document)
39 : m_document(document) 39 : m_document(document)
40 { 40 {
41 ThreadState::current()->registerPreFinalizer(this); 41 ThreadState::current()->registerPreFinalizer(this);
42 m_document->addClient(this); 42 m_document->addClient(this);
43 } 43 }
44 ~DocumentResourceReference() override {} 44 ~DocumentResourceReference() override {}
45 DocumentResource* document() { return m_document.get(); } 45 DocumentResource* document() { return m_document.get(); }
46 DEFINE_INLINE_TRACE() 46 DEFINE_INLINE_TRACE()
47 { 47 {
48 visitor->trace(m_document); 48 visitor->trace(m_document);
49 DocumentResourceClient::trace(visitor); 49 DocumentResourceClient::trace(visitor);
50 } 50 }
51 51
52 private: 52 private:
53 void removeSelf() { m_document->removeClient(this); } 53 void removeSelf() { m_document->removeClient(this); }
54 54
55 String debugName() const override { return "DocumentResourceReference"; } 55 String debugName() const override { return "DocumentResourceReference"; }
56 Member<DocumentResource> m_document; 56 Member<DocumentResource> m_document;
57 }; 57 };
58 58
59 } // namespace blink 59 } // namespace blink
60 60
61 #endif 61 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fetch/LinkFetchResource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698