OLD | NEW |
---|---|
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_RENDERER_SUBRESOURCE_FILTER_AGENT_ H_ | 5 #ifndef COMPONENTS_SUBRESOURCE_FILTER_CONTENT_RENDERER_SUBRESOURCE_FILTER_AGENT_ H_ |
6 #define COMPONENTS_SUBRESOURCE_FILTER_CONTENT_RENDERER_SUBRESOURCE_FILTER_AGENT_ H_ | 6 #define COMPONENTS_SUBRESOURCE_FILTER_CONTENT_RENDERER_SUBRESOURCE_FILTER_AGENT_ H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
51 // Informs the browser that the first subresource load has been disallowed for | 51 // Informs the browser that the first subresource load has been disallowed for |
52 // the most recently committed load. Not called if all resources are allowed. | 52 // the most recently committed load. Not called if all resources are allowed. |
53 virtual void SignalFirstSubresourceDisallowedForCommittedLoad(); | 53 virtual void SignalFirstSubresourceDisallowedForCommittedLoad(); |
54 | 54 |
55 // Sends statistics about the DocumentSubresourceFilter's work to the browser. | 55 // Sends statistics about the DocumentSubresourceFilter's work to the browser. |
56 virtual void SendDocumentLoadStatistics( | 56 virtual void SendDocumentLoadStatistics( |
57 const DocumentLoadStatistics& statistics); | 57 const DocumentLoadStatistics& statistics); |
58 | 58 |
59 private: | 59 private: |
60 void OnActivateForNextCommittedLoad(ActivationState activation_state); | 60 void OnActivateForNextCommittedLoad(ActivationState activation_state); |
61 void RecordHistogramsOnLoadCommitted(); | 61 void RecordedHistogramsOnLoadCommitted(); |
engedy
2017/04/26 13:47:10
nit: I think accidental rename?
melandory
2017/04/26 15:02:21
Done.
| |
62 void RecordHistogramsOnLoadFinished(); | 62 void RecordedHistogramsOnLoadFinished(); |
63 void ResetActivatonStateForNextCommit(); | 63 void ResetActivatonStateForNextCommit(); |
64 | 64 |
65 // content::RenderFrameObserver: | 65 // content::RenderFrameObserver: |
66 void OnDestruct() override; | 66 void OnDestruct() override; |
67 void DidCommitProvisionalLoad(bool is_new_navigation, | 67 void DidCommitProvisionalLoad(bool is_new_navigation, |
68 bool is_same_document_navigation) override; | 68 bool is_same_document_navigation) override; |
69 void DidFailProvisionalLoad(const blink::WebURLError& error) override; | 69 void DidFailProvisionalLoad(const blink::WebURLError& error) override; |
70 void DidFinishLoad() override; | 70 void DidFinishLoad() override; |
71 bool OnMessageReceived(const IPC::Message& message) override; | 71 bool OnMessageReceived(const IPC::Message& message) override; |
72 | 72 |
73 // Owned by the ChromeContentRendererClient and outlives us. | 73 // Owned by the ChromeContentRendererClient and outlives us. |
74 UnverifiedRulesetDealer* ruleset_dealer_; | 74 UnverifiedRulesetDealer* ruleset_dealer_; |
75 | 75 |
76 ActivationState activation_state_for_next_commit_; | 76 ActivationState activation_state_for_next_commit_; |
77 | 77 |
78 base::WeakPtr<WebDocumentSubresourceFilterImpl> | 78 base::WeakPtr<WebDocumentSubresourceFilterImpl> |
79 filter_for_last_committed_load_; | 79 filter_for_last_committed_load_; |
80 | 80 |
81 DISALLOW_COPY_AND_ASSIGN(SubresourceFilterAgent); | 81 DISALLOW_COPY_AND_ASSIGN(SubresourceFilterAgent); |
82 }; | 82 }; |
83 | 83 |
84 } // namespace subresource_filter | 84 } // namespace subresource_filter |
85 | 85 |
86 #endif // COMPONENTS_SUBRESOURCE_FILTER_CONTENT_RENDERER_SUBRESOURCE_FILTER_AGE NT_H_ | 86 #endif // COMPONENTS_SUBRESOURCE_FILTER_CONTENT_RENDERER_SUBRESOURCE_FILTER_AGE NT_H_ |
OLD | NEW |