| 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 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 #include "platform/weborigin/SecurityOrigin.h" | 35 #include "platform/weborigin/SecurityOrigin.h" |
| 36 #include "wtf/HashMap.h" | 36 #include "wtf/HashMap.h" |
| 37 #include "wtf/MainThread.h" | 37 #include "wtf/MainThread.h" |
| 38 #include "wtf/OwnPtr.h" | 38 #include "wtf/OwnPtr.h" |
| 39 #include "wtf/PassOwnPtr.h" | 39 #include "wtf/PassOwnPtr.h" |
| 40 #include "wtf/text/StringHash.h" | 40 #include "wtf/text/StringHash.h" |
| 41 | 41 |
| 42 namespace blink { | 42 namespace blink { |
| 43 | 43 |
| 44 typedef Vector<OriginAccessEntry> OriginAccessWhiteList; | 44 typedef Vector<OriginAccessEntry> OriginAccessWhiteList; |
| 45 typedef HashMap<String, OwnPtr<OriginAccessWhiteList> > OriginAccessMap; | 45 typedef HashMap<String, OwnPtr<OriginAccessWhiteList>> OriginAccessMap; |
| 46 | 46 |
| 47 static OriginAccessMap& originAccessMap() | 47 static OriginAccessMap& originAccessMap() |
| 48 { | 48 { |
| 49 DEFINE_STATIC_LOCAL(OriginAccessMap, originAccessMap, ()); | 49 DEFINE_STATIC_LOCAL(OriginAccessMap, originAccessMap, ()); |
| 50 return originAccessMap; | 50 return originAccessMap; |
| 51 } | 51 } |
| 52 | 52 |
| 53 bool SecurityPolicy::shouldHideReferrer(const KURL& url, const String& referrer) | 53 bool SecurityPolicy::shouldHideReferrer(const KURL& url, const String& referrer) |
| 54 { | 54 { |
| 55 bool referrerIsSecureURL = protocolIs(referrer, "https"); | 55 bool referrerIsSecureURL = protocolIs(referrer, "https"); |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 map.remove(it); | 175 map.remove(it); |
| 176 } | 176 } |
| 177 | 177 |
| 178 void SecurityPolicy::resetOriginAccessWhitelists() | 178 void SecurityPolicy::resetOriginAccessWhitelists() |
| 179 { | 179 { |
| 180 ASSERT(isMainThread()); | 180 ASSERT(isMainThread()); |
| 181 originAccessMap().clear(); | 181 originAccessMap().clear(); |
| 182 } | 182 } |
| 183 | 183 |
| 184 } // namespace blink | 184 } // namespace blink |
| OLD | NEW |