Commit 4dd45eb8 authored by Yutaka Hirano's avatar Yutaka Hirano Committed by Commit Bot

Put the reason for "revalidation policy" calculation to trace events

Also,
 - Put the name of the result policy, not the integer representing
   the policy, to the events.
 - Gather RESOURCE_LOADING_DVLOG to reduce code duplication.

Bug: 937173
Change-Id: Ibf19e2b853fbbe6b100f847c3ed3cc63e21e02e7
Reviewed-on: https://chromium-review.googlesource.com/c/1496265Reviewed-by: default avatarYoav Weiss <yoavweiss@chromium.org>
Reviewed-by: default avatarKouhei Ueno <kouhei@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#636785}
parent f2c8dd2a
......@@ -308,14 +308,18 @@ class PLATFORM_EXPORT ResourceFetcher
const FetchParameters&,
const Resource& existing_resource,
bool is_static_data) const;
static const char* GetNameFor(RevalidationPolicy policy);
// Determines a RevalidationPolicy given a FetchParameters and an existing
// resource retrieved from the memory cache (can be a newly constructed one
// for a static data).
RevalidationPolicy DetermineRevalidationPolicyInternal(
ResourceType,
const FetchParameters&,
const Resource& existing_resource,
bool is_static_data) const;
// The first member of the returned value is the revalidation policy. The
// second member of the returned value is a string explaining the reason for
// trace events. Its extent is unbound.
std::pair<RevalidationPolicy, const char*>
DetermineRevalidationPolicyInternal(ResourceType,
const FetchParameters&,
const Resource& existing_resource,
bool is_static_data) const;
void MakePreloadedResourceBlockOnloadIfNeeded(Resource*,
const FetchParameters&);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment