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

Side by Side Diff: third_party/WebKit/Source/core/loader/FrameFetchContext.cpp

Issue 2494713002: Pass correct resource type to OnDidLoadResourceFromMemoryCache (Closed)
Patch Set: Add test. Created 4 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 if (frame()->frameScheduler()) 464 if (frame()->frameScheduler())
465 frame()->frameScheduler()->didStopLoading(identifier); 465 frame()->frameScheduler()->didStopLoading(identifier);
466 } 466 }
467 467
468 void FrameFetchContext::dispatchDidLoadResourceFromMemoryCache( 468 void FrameFetchContext::dispatchDidLoadResourceFromMemoryCache(
469 unsigned long identifier, 469 unsigned long identifier,
470 Resource* resource, 470 Resource* resource,
471 WebURLRequest::FrameType frameType, 471 WebURLRequest::FrameType frameType,
472 WebURLRequest::RequestContext requestContext) { 472 WebURLRequest::RequestContext requestContext) {
473 ResourceRequest request(resource->url()); 473 ResourceRequest request(resource->url());
474 request.setFrameType(frameType);
475 request.setRequestContext(requestContext);
474 frame()->loader().client()->dispatchDidLoadResourceFromMemoryCache( 476 frame()->loader().client()->dispatchDidLoadResourceFromMemoryCache(
475 request, resource->response()); 477 request, resource->response());
476 dispatchWillSendRequest(identifier, request, ResourceResponse(), 478 dispatchWillSendRequest(identifier, request, ResourceResponse(),
477 resource->options().initiatorInfo); 479 resource->options().initiatorInfo);
478 480
479 InspectorInstrumentation::markResourceAsCached(frame(), identifier); 481 InspectorInstrumentation::markResourceAsCached(frame(), identifier);
480 if (!resource->response().isNull()) { 482 if (!resource->response().isNull()) {
481 dispatchDidReceiveResponseInternal(identifier, resource->response(), 483 dispatchDidReceiveResponseInternal(identifier, resource->response(),
482 frameType, requestContext, resource, 484 frameType, requestContext, resource,
483 LinkLoader::DoNotLoadResources); 485 LinkLoader::DoNotLoadResources);
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
1008 response); 1010 response);
1009 } 1011 }
1010 1012
1011 DEFINE_TRACE(FrameFetchContext) { 1013 DEFINE_TRACE(FrameFetchContext) {
1012 visitor->trace(m_document); 1014 visitor->trace(m_document);
1013 visitor->trace(m_documentLoader); 1015 visitor->trace(m_documentLoader);
1014 FetchContext::trace(visitor); 1016 FetchContext::trace(visitor);
1015 } 1017 }
1016 1018
1017 } // namespace blink 1019 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698