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

Unified Diff: content/browser/loader/async_revalidation_manager.cc

Issue 2481093003: Introduce ResourceRequesterInfo to abstract the requester of resource request (Closed)
Patch Set: incorporated kinuko's comment Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/loader/async_revalidation_manager.cc
diff --git a/content/browser/loader/async_revalidation_manager.cc b/content/browser/loader/async_revalidation_manager.cc
index abdf659fd228059833fa8c422dedf0099ee207a0..b77bb50b2aa9707cc41802aa5447cf60e13c0c89 100644
--- a/content/browser/loader/async_revalidation_manager.cc
+++ b/content/browser/loader/async_revalidation_manager.cc
@@ -9,7 +9,6 @@
#include "base/logging.h"
#include "content/browser/loader/async_revalidation_driver.h"
-#include "content/browser/loader/resource_message_filter.h"
#include "content/browser/loader/resource_request_info_impl.h"
#include "content/browser/loader/resource_scheduler.h"
#include "content/common/resource_messages.h"
@@ -58,7 +57,8 @@ void AsyncRevalidationManager::BeginAsyncRevalidation(
const ResourceRequestInfoImpl* info =
ResourceRequestInfoImpl::ForRequest(&for_request);
DCHECK(info);
- if (!info->filter()) {
+ if (!info->requester_info().IsRenderer() ||
+ !info->requester_info().filter()) {
// The child has gone away and we can no longer get ResourceContext and
// URLRequestContext to perform async revalidation.
// This can happen in the following cases, ordered from bad to not-so-bad
@@ -89,8 +89,8 @@ void AsyncRevalidationManager::BeginAsyncRevalidation(
// The embedder of //content needs to ensure that the URLRequestContext object
// remains valid until after the ResourceContext object is destroyed.
- info->filter()->GetContexts(info->GetResourceType(), &resource_context,
- &request_context);
+ info->requester_info().GetContexts(info->GetResourceType(), &resource_context,
+ &request_context);
AsyncRevalidationKey async_revalidation_key(
resource_context, request_context->http_transaction_factory()->GetCache(),

Powered by Google App Engine
This is Rietveld 408576698