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

Side by Side Diff: components/subresource_filter/content/common/document_subresource_filter.h

Issue 2683413003: Introduce AsyncDocumentSubresourceFilter. (Closed)
Patch Set: Address comments from csharrison@. Created 3 years, 10 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef COMPONENTS_SUBRESOURCE_FILTER_CONTENT_COMMON_DOCUMENT_SUBRESOURCE_FILTER _H_ 5 #ifndef COMPONENTS_SUBRESOURCE_FILTER_CONTENT_COMMON_DOCUMENT_SUBRESOURCE_FILTER _H_
6 #define COMPONENTS_SUBRESOURCE_FILTER_CONTENT_COMMON_DOCUMENT_SUBRESOURCE_FILTER _H_ 6 #define COMPONENTS_SUBRESOURCE_FILTER_CONTENT_COMMON_DOCUMENT_SUBRESOURCE_FILTER _H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 class DocumentSubresourceFilter 56 class DocumentSubresourceFilter
57 : public blink::WebDocumentSubresourceFilter, 57 : public blink::WebDocumentSubresourceFilter,
58 public base::SupportsWeakPtr<DocumentSubresourceFilter> { 58 public base::SupportsWeakPtr<DocumentSubresourceFilter> {
59 public: 59 public:
60 // Constructs a new filter that will: 60 // Constructs a new filter that will:
61 // -- Operate in a manner prescribed in |activation_state|. 61 // -- Operate in a manner prescribed in |activation_state|.
62 // -- Filter subresource loads in the scope of a document loaded from 62 // -- Filter subresource loads in the scope of a document loaded from
63 // |document_origin|. 63 // |document_origin|.
64 // -- Hold a reference to and use |ruleset| for its entire lifetime. 64 // -- Hold a reference to and use |ruleset| for its entire lifetime.
65 // -- Invoke |first_disallowed_load_callback|, if it is non-null, on the 65 // -- Invoke |first_disallowed_load_callback|, if it is non-null, on the
66 // first disallowed subresource load. 66 // first reportDisallowedLoad() call.
67 DocumentSubresourceFilter(url::Origin document_origin, 67 DocumentSubresourceFilter(url::Origin document_origin,
68 ActivationState activation_state, 68 ActivationState activation_state,
69 scoped_refptr<const MemoryMappedRuleset> ruleset, 69 scoped_refptr<const MemoryMappedRuleset> ruleset,
70 base::OnceClosure first_disallowed_load_callback); 70 base::OnceClosure first_disallowed_load_callback);
71 71
72 ~DocumentSubresourceFilter() override; 72 ~DocumentSubresourceFilter() override;
73 73
74 const DocumentLoadStatistics& statistics() const { return statistics_; } 74 const DocumentLoadStatistics& statistics() const { return statistics_; }
75 75
76 // blink::WebDocumentSubresourceFilter: 76 // blink::WebDocumentSubresourceFilter:
(...skipping 16 matching lines...) Expand all
93 93
94 base::OnceClosure first_disallowed_load_callback_; 94 base::OnceClosure first_disallowed_load_callback_;
95 DocumentLoadStatistics statistics_; 95 DocumentLoadStatistics statistics_;
96 96
97 DISALLOW_COPY_AND_ASSIGN(DocumentSubresourceFilter); 97 DISALLOW_COPY_AND_ASSIGN(DocumentSubresourceFilter);
98 }; 98 };
99 99
100 } // namespace subresource_filter 100 } // namespace subresource_filter
101 101
102 #endif // COMPONENTS_SUBRESOURCE_FILTER_CONTENT_COMMON_DOCUMENT_SUBRESOURCE_FIL TER_H_ 102 #endif // COMPONENTS_SUBRESOURCE_FILTER_CONTENT_COMMON_DOCUMENT_SUBRESOURCE_FIL TER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698