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

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

Issue 317493002: Change FrameTree to return Frames instead of LocalFrames. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed conflicts Created 6 years, 6 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) 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 request.clearHTTPReferrer(); 76 request.clearHTTPReferrer();
77 else if (!request.httpReferrer()) 77 else if (!request.httpReferrer())
78 request.setHTTPReferrer(Referrer(outgoingReferrer, document->referre rPolicy())); 78 request.setHTTPReferrer(Referrer(outgoingReferrer, document->referre rPolicy()));
79 79
80 FrameLoader::addHTTPOriginIfNeeded(request, AtomicString(outgoingOrigin) ); 80 FrameLoader::addHTTPOriginIfNeeded(request, AtomicString(outgoingOrigin) );
81 } 81 }
82 82
83 if (isMainResource && m_frame->isMainFrame()) 83 if (isMainResource && m_frame->isMainFrame())
84 request.setFirstPartyForCookies(request.url()); 84 request.setFirstPartyForCookies(request.url());
85 else if (m_frame->tree().top()->isLocalFrame()) 85 else if (m_frame->tree().top()->isLocalFrame())
86 request.setFirstPartyForCookies(m_frame->tree().top()->document()->first PartyForCookies()); 86 request.setFirstPartyForCookies(toLocalFrame(m_frame->tree().top())->doc ument()->firstPartyForCookies());
87 87
88 // The remaining modifications are only necessary for HTTP and HTTPS. 88 // The remaining modifications are only necessary for HTTP and HTTPS.
89 if (!request.url().isEmpty() && !request.url().protocolIsInHTTPFamily()) 89 if (!request.url().isEmpty() && !request.url().protocolIsInHTTPFamily())
90 return; 90 return;
91 91
92 m_frame->loader().applyUserAgent(request); 92 m_frame->loader().applyUserAgent(request);
93 93
94 if (request.cachePolicy() == ReloadIgnoringCacheData 94 if (request.cachePolicy() == ReloadIgnoringCacheData
95 || request.cachePolicy() == ReloadBypassingCache) { 95 || request.cachePolicy() == ReloadBypassingCache) {
96 if (m_frame->loader().loadType() == FrameLoadTypeReload) { 96 if (m_frame->loader().loadType() == FrameLoadTypeReload) {
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 if (!response.isNull()) 211 if (!response.isNull())
212 dispatchDidReceiveResponse(ensureLoader(loader), identifier, response); 212 dispatchDidReceiveResponse(ensureLoader(loader), identifier, response);
213 213
214 if (dataLength > 0) 214 if (dataLength > 0)
215 dispatchDidReceiveData(ensureLoader(loader), identifier, 0, dataLength, 0); 215 dispatchDidReceiveData(ensureLoader(loader), identifier, 0, dataLength, 0);
216 216
217 dispatchDidFinishLoading(ensureLoader(loader), identifier, 0, 0); 217 dispatchDidFinishLoading(ensureLoader(loader), identifier, 0, 0);
218 } 218 }
219 219
220 } // namespace WebCore 220 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698