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

Side by Side Diff: third_party/WebKit/Source/platform/loader/fetch/ResourceLoader.cpp

Issue 2751143003: Move FrameFetchContext::dispatchDidLoadResourceFromMemoryCache logic into ResourceFetcher (Closed)
Patch Set: addressed comments Created 3 years, 9 months 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 | « third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp ('k') | no next file » | 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) 2006, 2007, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2010, 2011 Apple Inc. All rights reserved.
3 * (C) 2007 Graham Dennis (graham.dennis@gmail.com) 3 * (C) 2007 Graham Dennis (graham.dennis@gmail.com)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 if (blockedReason != ResourceRequestBlockedReason::None) { 366 if (blockedReason != ResourceRequestBlockedReason::None) {
367 handleError(ResourceError::cancelledDueToAccessCheckError(response.url(), 367 handleError(ResourceError::cancelledDueToAccessCheckError(response.url(),
368 blockedReason)); 368 blockedReason));
369 return; 369 return;
370 } 370 }
371 } 371 }
372 372
373 context().dispatchDidReceiveResponse( 373 context().dispatchDidReceiveResponse(
374 m_resource->identifier(), response, 374 m_resource->identifier(), response,
375 m_resource->resourceRequest().frameType(), 375 m_resource->resourceRequest().frameType(),
376 m_resource->resourceRequest().requestContext(), m_resource); 376 m_resource->resourceRequest().requestContext(), m_resource,
377 FetchContext::ResourceResponseType::kNotFromMemoryCache);
377 378
378 m_resource->responseReceived(response, std::move(handle)); 379 m_resource->responseReceived(response, std::move(handle));
379 if (!m_resource->loader()) 380 if (!m_resource->loader())
380 return; 381 return;
381 382
382 if (response.httpStatusCode() >= 400 && 383 if (response.httpStatusCode() >= 400 &&
383 !m_resource->shouldIgnoreHTTPStatusCodeErrors()) 384 !m_resource->shouldIgnoreHTTPStatusCodeErrors())
384 handleError(ResourceError::cancelledError(response.url())); 385 handleError(ResourceError::cancelledError(response.url()));
385 } 386 }
386 387
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 return; 521 return;
521 522
522 // Don't activate if cache policy is explicitly set. 523 // Don't activate if cache policy is explicitly set.
523 if (request.getCachePolicy() != WebCachePolicy::UseProtocolCachePolicy) 524 if (request.getCachePolicy() != WebCachePolicy::UseProtocolCachePolicy)
524 return; 525 return;
525 526
526 m_isCacheAwareLoadingActivated = true; 527 m_isCacheAwareLoadingActivated = true;
527 } 528 }
528 529
529 } // namespace blink 530 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698