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

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

Issue 2516353002: Introduce url_list to the Response scheme of CacheStorage. (Closed)
Patch Set: incorporated falken's comment 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013, Intel Corporation 3 * Copyright (C) 2013, Intel Corporation
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 are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * 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 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 ThreadableLoaderClient* client = m_client; 529 ThreadableLoaderClient* client = m_client;
530 clear(); 530 clear();
531 client->didFailRedirectCheck(); 531 client->didFailRedirectCheck();
532 532
533 return false; 533 return false;
534 } 534 }
535 535
536 // Allow same origin requests to continue after allowing clients to audit the 536 // Allow same origin requests to continue after allowing clients to audit the
537 // redirect. 537 // redirect.
538 if (isAllowedRedirect(request.url())) { 538 if (isAllowedRedirect(request.url())) {
539 m_client->didReceiveRedirectTo(request.url());
539 if (m_client->isDocumentThreadableLoaderClient()) { 540 if (m_client->isDocumentThreadableLoaderClient()) {
540 return static_cast<DocumentThreadableLoaderClient*>(m_client) 541 return static_cast<DocumentThreadableLoaderClient*>(m_client)
541 ->willFollowRedirect(request, redirectResponse); 542 ->willFollowRedirect(request, redirectResponse);
542 } 543 }
543 return true; 544 return true;
544 } 545 }
545 546
546 if (m_corsRedirectLimit <= 0) { 547 if (m_corsRedirectLimit <= 0) {
547 ThreadableLoaderClient* client = m_client; 548 ThreadableLoaderClient* client = m_client;
548 clear(); 549 clear();
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 591
591 if (!allowRedirect) { 592 if (!allowRedirect) {
592 ThreadableLoaderClient* client = m_client; 593 ThreadableLoaderClient* client = m_client;
593 clear(); 594 clear();
594 client->didFailAccessControlCheck(ResourceError( 595 client->didFailAccessControlCheck(ResourceError(
595 errorDomainBlinkInternal, 0, redirectResponse.url().getString(), 596 errorDomainBlinkInternal, 0, redirectResponse.url().getString(),
596 accessControlErrorDescription)); 597 accessControlErrorDescription));
597 return false; 598 return false;
598 } 599 }
599 600
601 m_client->didReceiveRedirectTo(request.url());
602
600 // FIXME: consider combining this with CORS redirect handling performed by 603 // FIXME: consider combining this with CORS redirect handling performed by
601 // CrossOriginAccessControl::handleRedirect(). 604 // CrossOriginAccessControl::handleRedirect().
602 clearResource(); 605 clearResource();
603 606
604 // If the original request wasn't same-origin, then if the request URL origin 607 // If the original request wasn't same-origin, then if the request URL origin
605 // is not same origin with the original URL origin, set the source origin to a 608 // is not same origin with the original URL origin, set the source origin to a
606 // globally unique identifier. (If the original request was same-origin, the 609 // globally unique identifier. (If the original request was same-origin, the
607 // origin of the new request should be the original URL origin.) 610 // origin of the new request should be the original URL origin.)
608 if (!m_sameOriginRequest) { 611 if (!m_sameOriginRequest) {
609 RefPtr<SecurityOrigin> originalOrigin = 612 RefPtr<SecurityOrigin> originalOrigin =
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
1123 } 1126 }
1124 1127
1125 DEFINE_TRACE(DocumentThreadableLoader) { 1128 DEFINE_TRACE(DocumentThreadableLoader) {
1126 visitor->trace(m_resource); 1129 visitor->trace(m_resource);
1127 visitor->trace(m_document); 1130 visitor->trace(m_document);
1128 ThreadableLoader::trace(visitor); 1131 ThreadableLoader::trace(visitor);
1129 RawResourceClient::trace(visitor); 1132 RawResourceClient::trace(visitor);
1130 } 1133 }
1131 1134
1132 } // namespace blink 1135 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698