| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 bool allowsCrossOriginMethod(const String&, String& errorDescription) const; | 51 bool allowsCrossOriginMethod(const String&, String& errorDescription) const; |
| 52 bool allowsCrossOriginHeaders(const HTTPHeaderMap&, | 52 bool allowsCrossOriginHeaders(const HTTPHeaderMap&, |
| 53 String& errorDescription) const; | 53 String& errorDescription) const; |
| 54 bool allowsRequest(StoredCredentials, | 54 bool allowsRequest(StoredCredentials, |
| 55 const String& method, | 55 const String& method, |
| 56 const HTTPHeaderMap& requestHeaders) const; | 56 const HTTPHeaderMap& requestHeaders) const; |
| 57 | 57 |
| 58 private: | 58 private: |
| 59 typedef HashSet<String, CaseFoldingHash> HeadersSet; | 59 typedef HashSet<String, CaseFoldingHash> HeadersSet; |
| 60 | 60 |
| 61 // FIXME: A better solution to holding onto the absolute expiration time might
be | 61 // FIXME: A better solution to holding onto the absolute expiration time might |
| 62 // to start a timer for the expiration delta that removes this from the cache
when | 62 // be to start a timer for the expiration delta that removes this from the |
| 63 // it fires. | 63 // cache when it fires. |
| 64 double m_absoluteExpiryTime; | 64 double m_absoluteExpiryTime; |
| 65 StoredCredentials m_credentials; | 65 StoredCredentials m_credentials; |
| 66 HashSet<String> m_methods; | 66 HashSet<String> m_methods; |
| 67 HeadersSet m_headers; | 67 HeadersSet m_headers; |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 class CrossOriginPreflightResultCache { | 70 class CrossOriginPreflightResultCache { |
| 71 WTF_MAKE_NONCOPYABLE(CrossOriginPreflightResultCache); | 71 WTF_MAKE_NONCOPYABLE(CrossOriginPreflightResultCache); |
| 72 USING_FAST_MALLOC(CrossOriginPreflightResultCache); | 72 USING_FAST_MALLOC(CrossOriginPreflightResultCache); |
| 73 | 73 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 89 typedef HashMap<std::pair<String, KURL>, | 89 typedef HashMap<std::pair<String, KURL>, |
| 90 std::unique_ptr<CrossOriginPreflightResultCacheItem>> | 90 std::unique_ptr<CrossOriginPreflightResultCacheItem>> |
| 91 CrossOriginPreflightResultHashMap; | 91 CrossOriginPreflightResultHashMap; |
| 92 | 92 |
| 93 CrossOriginPreflightResultHashMap m_preflightHashMap; | 93 CrossOriginPreflightResultHashMap m_preflightHashMap; |
| 94 }; | 94 }; |
| 95 | 95 |
| 96 } // namespace blink | 96 } // namespace blink |
| 97 | 97 |
| 98 #endif | 98 #endif |
| OLD | NEW |