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

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

Issue 2447293002: Don't call lower() on KURL protocol/host (Closed)
Patch Set: add canonicalization layout test Created 4 years, 1 month 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) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 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 * 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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 bool m_universalAccess; 262 bool m_universalAccess;
263 bool m_canLoadLocalResources; 263 bool m_canLoadLocalResources;
264 bool m_blockLocalAccessFromLocalOrigin; 264 bool m_blockLocalAccessFromLocalOrigin;
265 }; 265 };
266 std::unique_ptr<PrivilegeData> createPrivilegeData() const; 266 std::unique_ptr<PrivilegeData> createPrivilegeData() const;
267 void transferPrivilegesFrom(std::unique_ptr<PrivilegeData>); 267 void transferPrivilegesFrom(std::unique_ptr<PrivilegeData>);
268 268
269 void setUniqueOriginIsPotentiallyTrustworthy( 269 void setUniqueOriginIsPotentiallyTrustworthy(
270 bool isUniqueOriginPotentiallyTrustworthy); 270 bool isUniqueOriginPotentiallyTrustworthy);
271 271
272 // Only used for document.domain setting. The method should probably be moved
273 // if we need it for something more general.
274 static String canonicalizeHost(const String& host, bool* success);
275
272 private: 276 private:
273 friend class SecurityOriginTest; 277 friend class SecurityOriginTest;
274 FRIEND_TEST_ALL_PREFIXES(SecurityOriginTest, Suborigins); 278 FRIEND_TEST_ALL_PREFIXES(SecurityOriginTest, Suborigins);
275 FRIEND_TEST_ALL_PREFIXES(SecurityOriginTest, SuboriginsParsing); 279 FRIEND_TEST_ALL_PREFIXES(SecurityOriginTest, SuboriginsParsing);
276 FRIEND_TEST_ALL_PREFIXES(SecurityOriginTest, 280 FRIEND_TEST_ALL_PREFIXES(SecurityOriginTest,
277 SuboriginsIsSameSchemeHostPortAndSuborigin); 281 SuboriginsIsSameSchemeHostPortAndSuborigin);
278 282
279 SecurityOrigin(); 283 SecurityOrigin();
280 explicit SecurityOrigin(const KURL&); 284 explicit SecurityOrigin(const KURL&);
281 explicit SecurityOrigin(const SecurityOrigin*); 285 explicit SecurityOrigin(const SecurityOrigin*);
(...skipping 19 matching lines...) Expand all
301 bool m_universalAccess; 305 bool m_universalAccess;
302 bool m_domainWasSetInDOM; 306 bool m_domainWasSetInDOM;
303 bool m_canLoadLocalResources; 307 bool m_canLoadLocalResources;
304 bool m_blockLocalAccessFromLocalOrigin; 308 bool m_blockLocalAccessFromLocalOrigin;
305 bool m_isUniqueOriginPotentiallyTrustworthy; 309 bool m_isUniqueOriginPotentiallyTrustworthy;
306 }; 310 };
307 311
308 } // namespace blink 312 } // namespace blink
309 313
310 #endif // SecurityOrigin_h 314 #endif // SecurityOrigin_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698