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

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

Issue 2751143003: Move FrameFetchContext::dispatchDidLoadResourceFromMemoryCache logic into ResourceFetcher (Closed)
Patch Set: . 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
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 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 if (blockedReason != ResourceRequestBlockedReason::None) { 365 if (blockedReason != ResourceRequestBlockedReason::None) {
366 handleError(ResourceError::cancelledDueToAccessCheckError(response.url(), 366 handleError(ResourceError::cancelledDueToAccessCheckError(response.url(),
367 blockedReason)); 367 blockedReason));
368 return; 368 return;
369 } 369 }
370 } 370 }
371 371
372 context().dispatchDidReceiveResponse( 372 context().dispatchDidReceiveResponse(
373 m_resource->identifier(), response, 373 m_resource->identifier(), response,
374 m_resource->resourceRequest().frameType(), 374 m_resource->resourceRequest().frameType(),
375 m_resource->resourceRequest().requestContext(), m_resource); 375 m_resource->resourceRequest().requestContext(), m_resource,
376 ResourceLoadStartType::kNotFromMemoryCache);
376 377
377 m_resource->responseReceived(response, std::move(handle)); 378 m_resource->responseReceived(response, std::move(handle));
378 if (!m_resource->loader()) 379 if (!m_resource->loader())
379 return; 380 return;
380 381
381 if (response.httpStatusCode() >= 400 && 382 if (response.httpStatusCode() >= 400 &&
382 !m_resource->shouldIgnoreHTTPStatusCodeErrors()) 383 !m_resource->shouldIgnoreHTTPStatusCodeErrors())
383 handleError(ResourceError::cancelledError(response.url())); 384 handleError(ResourceError::cancelledError(response.url()));
384 } 385 }
385 386
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 return; 520 return;
520 521
521 // Don't activate if cache policy is explicitly set. 522 // Don't activate if cache policy is explicitly set.
522 if (request.getCachePolicy() != WebCachePolicy::UseProtocolCachePolicy) 523 if (request.getCachePolicy() != WebCachePolicy::UseProtocolCachePolicy)
523 return; 524 return;
524 525
525 m_isCacheAwareLoadingActivated = true; 526 m_isCacheAwareLoadingActivated = true;
526 } 527 }
527 528
528 } // namespace blink 529 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698