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

Side by Side Diff: third_party/WebKit/Source/platform/weborigin/SecurityPolicy.h

Issue 2417883002: Avoid initializing a SecurityOrigin from a KURL for isSecure() check. (Closed)
Patch Set: Created 4 years, 2 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
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 * 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 bool allowDestinationSubdomains); 71 bool allowDestinationSubdomains);
72 static void resetOriginAccessWhitelists(); 72 static void resetOriginAccessWhitelists();
73 73
74 static bool isAccessWhiteListed(const SecurityOrigin* activeOrigin, 74 static bool isAccessWhiteListed(const SecurityOrigin* activeOrigin,
75 const SecurityOrigin* targetOrigin); 75 const SecurityOrigin* targetOrigin);
76 static bool isAccessToURLWhiteListed(const SecurityOrigin* activeOrigin, 76 static bool isAccessToURLWhiteListed(const SecurityOrigin* activeOrigin,
77 const KURL&); 77 const KURL&);
78 78
79 static void addOriginTrustworthyWhiteList(PassRefPtr<SecurityOrigin>); 79 static void addOriginTrustworthyWhiteList(PassRefPtr<SecurityOrigin>);
80 static bool isOriginWhiteListedTrustworthy(const SecurityOrigin&); 80 static bool isOriginWhiteListedTrustworthy(const SecurityOrigin&);
81 static bool isUrlWhiteListedTrustworthy(const KURL&);
81 82
82 static bool referrerPolicyFromString(const String& policy, 83 static bool referrerPolicyFromString(const String& policy,
83 ReferrerPolicy* result); 84 ReferrerPolicy* result);
84 static bool referrerPolicyFromStringWithLegacyKeywords( 85 static bool referrerPolicyFromStringWithLegacyKeywords(
85 const String& policy, 86 const String& policy,
86 ReferrerPolicy* result); 87 ReferrerPolicy* result);
87 }; 88 };
88 89
89 } // namespace blink 90 } // namespace blink
90 91
91 #endif // SecurityPolicy_h 92 #endif // SecurityPolicy_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698