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

Side by Side Diff: Source/core/fetch/RawResource.cpp

Issue 189903002: Rename allowCookies to allowStoredCredentials (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/fetch/CrossOriginAccessControl.cpp ('k') | Source/core/fetch/Resource.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) 2011 Google Inc. All Rights Reserved. 2 * Copyright (C) 2011 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 { 147 {
148 if (m_options.dataBufferingPolicy == DoNotBufferData) 148 if (m_options.dataBufferingPolicy == DoNotBufferData)
149 return false; 149 return false;
150 150
151 if (m_resourceRequest.httpMethod() != newRequest.httpMethod()) 151 if (m_resourceRequest.httpMethod() != newRequest.httpMethod())
152 return false; 152 return false;
153 153
154 if (m_resourceRequest.httpBody() != newRequest.httpBody()) 154 if (m_resourceRequest.httpBody() != newRequest.httpBody())
155 return false; 155 return false;
156 156
157 if (m_resourceRequest.allowCookies() != newRequest.allowCookies()) 157 if (m_resourceRequest.allowStoredCredentials() != newRequest.allowStoredCred entials())
158 return false; 158 return false;
159 159
160 // Ensure most headers match the existing headers before continuing. 160 // Ensure most headers match the existing headers before continuing.
161 // Note that the list of ignored headers includes some headers explicitly re lated to caching. 161 // Note that the list of ignored headers includes some headers explicitly re lated to caching.
162 // A more detailed check of caching policy will be performed later, this is simply a list of 162 // A more detailed check of caching policy will be performed later, this is simply a list of
163 // headers that we might permit to be different and still reuse the existing Resource. 163 // headers that we might permit to be different and still reuse the existing Resource.
164 const HTTPHeaderMap& newHeaders = newRequest.httpHeaderFields(); 164 const HTTPHeaderMap& newHeaders = newRequest.httpHeaderFields();
165 const HTTPHeaderMap& oldHeaders = m_resourceRequest.httpHeaderFields(); 165 const HTTPHeaderMap& oldHeaders = m_resourceRequest.httpHeaderFields();
166 166
167 HTTPHeaderMap::const_iterator end = newHeaders.end(); 167 HTTPHeaderMap::const_iterator end = newHeaders.end();
168 for (HTTPHeaderMap::const_iterator i = newHeaders.begin(); i != end; ++i) { 168 for (HTTPHeaderMap::const_iterator i = newHeaders.begin(); i != end; ++i) {
169 AtomicString headerName = i->key; 169 AtomicString headerName = i->key;
170 if (!shouldIgnoreHeaderForCacheReuse(headerName) && i->value != oldHeade rs.get(headerName)) 170 if (!shouldIgnoreHeaderForCacheReuse(headerName) && i->value != oldHeade rs.get(headerName))
171 return false; 171 return false;
172 } 172 }
173 173
174 end = oldHeaders.end(); 174 end = oldHeaders.end();
175 for (HTTPHeaderMap::const_iterator i = oldHeaders.begin(); i != end; ++i) { 175 for (HTTPHeaderMap::const_iterator i = oldHeaders.begin(); i != end; ++i) {
176 AtomicString headerName = i->key; 176 AtomicString headerName = i->key;
177 if (!shouldIgnoreHeaderForCacheReuse(headerName) && i->value != newHeade rs.get(headerName)) 177 if (!shouldIgnoreHeaderForCacheReuse(headerName) && i->value != newHeade rs.get(headerName))
178 return false; 178 return false;
179 } 179 }
180 180
181 return true; 181 return true;
182 } 182 }
183 183
184 } // namespace WebCore 184 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/fetch/CrossOriginAccessControl.cpp ('k') | Source/core/fetch/Resource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698