Index: components/subresource_filter/content/browser/async_document_subresource_filter.h |
diff --git a/components/subresource_filter/content/browser/async_document_subresource_filter.h b/components/subresource_filter/content/browser/async_document_subresource_filter.h |
index 3d4c9dd3f33ed745269e7be226707cc94ea2b57a..ae7a2b55d10b149cee1d1071825e4b7c608a69d5 100644 |
--- a/components/subresource_filter/content/browser/async_document_subresource_filter.h |
+++ b/components/subresource_filter/content/browser/async_document_subresource_filter.h |
@@ -104,14 +104,27 @@ class AsyncDocumentSubresourceFilter { |
// |task_runner|. |
void ReportDisallowedLoad(); |
+ // Must be called after activation state computation is finished. |
+ const ActivationState& activation_state() const { |
+ return activation_state_.value(); |
+ } |
+ |
private: |
+ void OnActivateStateCalculated( |
+ base::Callback<void(ActivationState)> activation_state_callback, |
+ ActivationState activation_state); |
+ |
// Note: Raw pointer, |core_| already holds a reference to |task_runner_|. |
base::SequencedTaskRunner* task_runner_; |
std::unique_ptr<Core, base::OnTaskRunnerDeleter> core_; |
base::OnceClosure first_disallowed_load_callback_; |
+ base::Optional<ActivationState> activation_state_; |
+ |
base::ThreadChecker thread_checker_; |
+ base::WeakPtrFactory<AsyncDocumentSubresourceFilter> weak_ptr_factory_; |
+ |
DISALLOW_COPY_AND_ASSIGN(AsyncDocumentSubresourceFilter); |
}; |