| OLD | NEW |
| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 { | 124 { |
| 125 m_options.dataBufferingPolicy = dataBufferingPolicy; | 125 m_options.dataBufferingPolicy = dataBufferingPolicy; |
| 126 clear(); | 126 clear(); |
| 127 } | 127 } |
| 128 | 128 |
| 129 static bool shouldIgnoreHeaderForCacheReuse(AtomicString headerName) | 129 static bool shouldIgnoreHeaderForCacheReuse(AtomicString headerName) |
| 130 { | 130 { |
| 131 // FIXME: This list of headers that don't affect cache policy almost certain
ly isn't complete. | 131 // FIXME: This list of headers that don't affect cache policy almost certain
ly isn't complete. |
| 132 DEFINE_STATIC_LOCAL(HashSet<AtomicString>, m_headers, ()); | 132 DEFINE_STATIC_LOCAL(HashSet<AtomicString>, m_headers, ()); |
| 133 if (m_headers.isEmpty()) { | 133 if (m_headers.isEmpty()) { |
| 134 m_headers.add("Accept"); | |
| 135 m_headers.add("Cache-Control"); | 134 m_headers.add("Cache-Control"); |
| 136 m_headers.add("If-Modified-Since"); | 135 m_headers.add("If-Modified-Since"); |
| 137 m_headers.add("If-None-Match"); | 136 m_headers.add("If-None-Match"); |
| 138 m_headers.add("Origin"); | 137 m_headers.add("Origin"); |
| 139 m_headers.add("Pragma"); | 138 m_headers.add("Pragma"); |
| 140 m_headers.add("Purpose"); | 139 m_headers.add("Purpose"); |
| 141 m_headers.add("Referer"); | 140 m_headers.add("Referer"); |
| 142 m_headers.add("User-Agent"); | 141 m_headers.add("User-Agent"); |
| 143 } | 142 } |
| 144 return m_headers.contains(headerName); | 143 return m_headers.contains(headerName); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 return true; | 186 return true; |
| 188 } | 187 } |
| 189 | 188 |
| 190 void RawResource::clear() | 189 void RawResource::clear() |
| 191 { | 190 { |
| 192 m_data.clear(); | 191 m_data.clear(); |
| 193 setEncodedSize(0); | 192 setEncodedSize(0); |
| 194 } | 193 } |
| 195 | 194 |
| 196 } // namespace WebCore | 195 } // namespace WebCore |
| OLD | NEW |