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

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

Issue 1253343002: [XHR] Tidy up files for testing XHR's error for mixed content check failure (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 4 years, 10 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) 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 820 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 if (request.requestContext() == WebURLRequest::RequestContextVideo || re quest.requestContext() == WebURLRequest::RequestContextAudio) 831 if (request.requestContext() == WebURLRequest::RequestContextVideo || re quest.requestContext() == WebURLRequest::RequestContextAudio)
832 setResource(RawResource::fetchMedia(newRequest, document().fetcher() )); 832 setResource(RawResource::fetchMedia(newRequest, document().fetcher() ));
833 else if (request.requestContext() == WebURLRequest::RequestContextManife st) 833 else if (request.requestContext() == WebURLRequest::RequestContextManife st)
834 setResource(RawResource::fetchManifest(newRequest, document().fetche r())); 834 setResource(RawResource::fetchManifest(newRequest, document().fetche r()));
835 else 835 else
836 setResource(RawResource::fetch(newRequest, document().fetcher())); 836 setResource(RawResource::fetch(newRequest, document().fetcher()));
837 837
838 if (!resource()) { 838 if (!resource()) {
839 ThreadableLoaderClient* client = m_client; 839 ThreadableLoaderClient* client = m_client;
840 clear(); 840 clear();
841 client->didFail(ResourceError(errorDomainBlinkInternal, 0, requestUR L.string(), "Failed to start loading.")); 841 client->didFail(ResourceError(errorDomainBlinkInternal, 0, requestUR L.string(), "Failed to start a loader"));
hiroshige 2016/02/22 15:45:46 This CL doesn't contain -expected.txt diffs. Does
tyoshino (SeeGerritForStatus) 2016/02/25 08:11:24 I was misunderstanding that a test can be without
842 // |this| may be dead here. 842 // |this| may be dead here.
843 return; 843 return;
844 } 844 }
845 845
846 if (resource()->loader()) { 846 if (resource()->loader()) {
847 unsigned long identifier = resource()->identifier(); 847 unsigned long identifier = resource()->identifier();
848 InspectorInstrumentation::documentThreadableLoaderStartedLoadingForC lient(m_document, identifier, m_client); 848 InspectorInstrumentation::documentThreadableLoaderStartedLoadingForC lient(m_document, identifier, m_client);
849 } 849 }
850
850 return; 851 return;
851 } 852 }
852 853
853 FetchRequest fetchRequest(request, m_options.initiator, resourceLoaderOption s); 854 FetchRequest fetchRequest(request, m_options.initiator, resourceLoaderOption s);
854 if (m_options.crossOriginRequestPolicy == AllowCrossOriginRequests) 855 if (m_options.crossOriginRequestPolicy == AllowCrossOriginRequests)
855 fetchRequest.setOriginRestriction(FetchRequest::NoOriginRestriction); 856 fetchRequest.setOriginRestriction(FetchRequest::NoOriginRestriction);
856 RefPtrWillBeRawPtr<Resource> resource = RawResource::fetchSynchronously(fetc hRequest, document().fetcher()); 857 RefPtrWillBeRawPtr<Resource> resource = RawResource::fetchSynchronously(fetc hRequest, document().fetcher());
857 ResourceResponse response = resource ? resource->response() : ResourceRespon se(); 858 ResourceResponse response = resource ? resource->response() : ResourceRespon se();
858 unsigned long identifier = resource ? resource->identifier() : std::numeric_ limits<unsigned long>::max(); 859 unsigned long identifier = resource ? resource->identifier() : std::numeric_ limits<unsigned long>::max();
859 ResourceError error = resource ? resource->resourceError() : ResourceError() ; 860 ResourceError error = resource ? resource->resourceError() : ResourceError() ;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 return m_securityOrigin ? m_securityOrigin.get() : document().securityOrigin (); 930 return m_securityOrigin ? m_securityOrigin.get() : document().securityOrigin ();
930 } 931 }
931 932
932 Document& DocumentThreadableLoader::document() const 933 Document& DocumentThreadableLoader::document() const
933 { 934 {
934 ASSERT(m_document); 935 ASSERT(m_document);
935 return *m_document; 936 return *m_document;
936 } 937 }
937 938
938 } // namespace blink 939 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/security/mixedContent/resources/frame-with-insecure-async-xhr-post.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698