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

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

Issue 123003002: Make calls to AtomicString(const String&) explicit in loader/ and fetch/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 11 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 | « Source/core/loader/FormSubmission.cpp ('k') | Source/core/loader/FrameLoader.cpp » ('j') | 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) 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 outgoingOrigin = document->outgoingOrigin(); 67 outgoingOrigin = document->outgoingOrigin();
68 } else { 68 } else {
69 outgoingReferrer = request.httpReferrer(); 69 outgoingReferrer = request.httpReferrer();
70 outgoingOrigin = SecurityOrigin::createFromString(outgoingReferrer)- >toString(); 70 outgoingOrigin = SecurityOrigin::createFromString(outgoingReferrer)- >toString();
71 } 71 }
72 72
73 outgoingReferrer = SecurityPolicy::generateReferrerHeader(document->refe rrerPolicy(), request.url(), outgoingReferrer); 73 outgoingReferrer = SecurityPolicy::generateReferrerHeader(document->refe rrerPolicy(), request.url(), outgoingReferrer);
74 if (outgoingReferrer.isEmpty()) 74 if (outgoingReferrer.isEmpty())
75 request.clearHTTPReferrer(); 75 request.clearHTTPReferrer();
76 else if (!request.httpReferrer()) 76 else if (!request.httpReferrer())
77 request.setHTTPReferrer(outgoingReferrer); 77 request.setHTTPReferrer(AtomicString(outgoingReferrer));
78 78
79 FrameLoader::addHTTPOriginIfNeeded(request, outgoingOrigin); 79 FrameLoader::addHTTPOriginIfNeeded(request, AtomicString(outgoingOrigin) );
80 } 80 }
81 81
82 if (isMainResource && m_frame->isMainFrame()) 82 if (isMainResource && m_frame->isMainFrame())
83 request.setFirstPartyForCookies(request.url()); 83 request.setFirstPartyForCookies(request.url());
84 else 84 else
85 request.setFirstPartyForCookies(m_frame->tree().top()->document()->first PartyForCookies()); 85 request.setFirstPartyForCookies(m_frame->tree().top()->document()->first PartyForCookies());
86 86
87 // The remaining modifications are only necessary for HTTP and HTTPS. 87 // The remaining modifications are only necessary for HTTP and HTTPS.
88 if (!request.url().isEmpty() && !request.url().protocolIsInHTTPFamily()) 88 if (!request.url().isEmpty() && !request.url().protocolIsInHTTPFamily())
89 return; 89 return;
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 if (!response.isNull()) 200 if (!response.isNull())
201 dispatchDidReceiveResponse(ensureLoader(loader), identifier, response); 201 dispatchDidReceiveResponse(ensureLoader(loader), identifier, response);
202 202
203 if (dataLength > 0) 203 if (dataLength > 0)
204 dispatchDidReceiveData(ensureLoader(loader), identifier, 0, dataLength, 0); 204 dispatchDidReceiveData(ensureLoader(loader), identifier, 0, dataLength, 0);
205 205
206 dispatchDidFinishLoading(ensureLoader(loader), identifier, 0); 206 dispatchDidFinishLoading(ensureLoader(loader), identifier, 0);
207 } 207 }
208 208
209 } // namespace WebCore 209 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/loader/FormSubmission.cpp ('k') | Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698