| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008, 2009 Apple 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 --end; | 69 --end; |
| 70 | 70 |
| 71 set.add(string.substring(start, end - start + 1)); | 71 set.add(string.substring(start, end - start + 1)); |
| 72 } | 72 } |
| 73 | 73 |
| 74 template<class HashType> | 74 template<class HashType> |
| 75 static bool parseAccessControlAllowList(const String& string, HashSet<String, Ha
shType>& set) | 75 static bool parseAccessControlAllowList(const String& string, HashSet<String, Ha
shType>& set) |
| 76 { | 76 { |
| 77 unsigned start = 0; | 77 unsigned start = 0; |
| 78 size_t end; | 78 size_t end; |
| 79 while ((end = string.find(',', start)) != notFound) { | 79 while ((end = string.find(',', start)) != kNotFound) { |
| 80 if (start != end) | 80 if (start != end) |
| 81 addToAccessControlAllowList(string, start, end - 1, set); | 81 addToAccessControlAllowList(string, start, end - 1, set); |
| 82 start = end + 1; | 82 start = end + 1; |
| 83 } | 83 } |
| 84 if (start != string.length()) | 84 if (start != string.length()) |
| 85 addToAccessControlAllowList(string, start, string.length() - 1, set); | 85 addToAccessControlAllowList(string, start, string.length() - 1, set); |
| 86 | 86 |
| 87 return true; | 87 return true; |
| 88 } | 88 } |
| 89 | 89 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 return false; | 174 return false; |
| 175 } | 175 } |
| 176 | 176 |
| 177 void CrossOriginPreflightResultCache::empty() | 177 void CrossOriginPreflightResultCache::empty() |
| 178 { | 178 { |
| 179 ASSERT(isMainThread()); | 179 ASSERT(isMainThread()); |
| 180 m_preflightHashMap.clear(); | 180 m_preflightHashMap.clear(); |
| 181 } | 181 } |
| 182 | 182 |
| 183 } // namespace WebCore | 183 } // namespace WebCore |
| OLD | NEW |