diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-06 12:48:11 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-13 09:33:43 +0000 |
commit | 7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (patch) | |
tree | fa14ba0ca8d2683ba2efdabd246dc9b18a1229c6 /chromium/third_party/blink/renderer/core/frame/ad_tracker.h | |
parent | 79b4f909db1049fca459c07cca55af56a9b54fe3 (diff) | |
download | qtwebengine-chromium-7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3.tar.gz |
BASELINE: Update Chromium to 84.0.4147.141
Change-Id: Ib85eb4cfa1cbe2b2b81e5022c8cad5c493969535
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/third_party/blink/renderer/core/frame/ad_tracker.h')
-rw-r--r-- | chromium/third_party/blink/renderer/core/frame/ad_tracker.h | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/chromium/third_party/blink/renderer/core/frame/ad_tracker.h b/chromium/third_party/blink/renderer/core/frame/ad_tracker.h index 04e15e4221a..10be17661e4 100644 --- a/chromium/third_party/blink/renderer/core/frame/ad_tracker.h +++ b/chromium/third_party/blink/renderer/core/frame/ad_tracker.h @@ -10,6 +10,7 @@ #include "third_party/blink/renderer/core/frame/local_frame.h" #include "third_party/blink/renderer/core/probe/async_task_id.h" #include "third_party/blink/renderer/platform/heap/member.h" +#include "third_party/blink/renderer/platform/loader/fetch/fetch_initiator_info.h" #include "third_party/blink/renderer/platform/weborigin/kurl.h" #include "third_party/blink/renderer/platform/wtf/hash_map.h" #include "third_party/blink/renderer/platform/wtf/hash_set.h" @@ -39,6 +40,10 @@ class CORE_EXPORT AdTracker : public GarbageCollected<AdTracker> { // Finds an AdTracker for a given ExecutionContext. static AdTracker* FromExecutionContext(ExecutionContext*); + static bool IsAdScriptExecutingInDocument( + Document* document, + StackType stack_type = StackType::kBottomAndTop); + // Instrumenting methods. // Called when a script module or script gets executed from native code. void Will(const probe::ExecuteScript&); @@ -49,15 +54,17 @@ class CORE_EXPORT AdTracker : public GarbageCollected<AdTracker> { void Did(const probe::CallFunction&); // Called when a subresource request is about to be sent or is redirected. - // Returns true if: - // - If the resource is loaded in an ad iframe - // - If ad script is in the v8 stack + // Returns true if any of the following are true: + // - the resource is loaded in an ad iframe // - |known_ad| is true + // - ad script is in the v8 stack and the resource was not requested by CSS. // Virtual for testing. - virtual bool CalculateIfAdSubresource(ExecutionContext* execution_context, - const ResourceRequest& request, - ResourceType resource_type, - bool known_ad); + virtual bool CalculateIfAdSubresource( + ExecutionContext* execution_context, + const ResourceRequest& request, + ResourceType resource_type, + const FetchInitiatorInfo& initiator_info, + bool known_ad); // Called when an async task is created. Check at this point for ad script on // the stack and annotate the task if so. |