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

Side by Side Diff: third_party/WebKit/WebCore/page/SecurityOrigin.h

Issue 8109: Return securityToken to SecurityOrigin (Closed) Base URL: svn://chrome-svn/chrome/branches/chrome_webkit_merge_branch/src/
Patch Set: '' Created 12 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | third_party/WebKit/WebCore/page/SecurityOrigin.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // lacks a path component. The string representation does not encode 104 // lacks a path component. The string representation does not encode
105 // the value of the SecurityOrigin's domain property. The empty 105 // the value of the SecurityOrigin's domain property. The empty
106 // SecurityOrigin is represented with the null string. 106 // SecurityOrigin is represented with the null string.
107 String toString() const; 107 String toString() const;
108 108
109 // Convert this SecurityOrigin into a string for use in the HTTP Origin 109 // Convert this SecurityOrigin into a string for use in the HTTP Origin
110 // header. This is similar to toString(), except that the empty 110 // header. This is similar to toString(), except that the empty
111 // SecurityOrigin is represented as the string "null". 111 // SecurityOrigin is represented as the string "null".
112 String toHTTPOrigin() const; 112 String toHTTPOrigin() const;
113 113
114 // Non-empty security tokens can be used for fast access checks. If the
115 // return value is a non-empty string, it can be used to compare with
116 // another security origin's securityToken. An empty security token is
117 // invalid and should not be used to check security. Instead, you must
118 // call canAccess.
119 //
120 // CAVEATS:
121 //
122 // 1) If either of the tokens is empty or if the tokens are not equal,
123 // you must call canAccess to see if they match. The tokens can be
124 // used for fast allow judgments, but cannot be used for deny
125 // judgments.
126 //
127 // 2) If one of the SecurityOrigins modifies their document.domain
128 // property after you read its securityToken, you might get false
129 // allows.
130 //
131 String securityToken() const;
132
114 // Serialize the security origin for storage in the database. This forma t is 133 // Serialize the security origin for storage in the database. This forma t is
115 // deprecated and should be used only for compatibility with old databas es; 134 // deprecated and should be used only for compatibility with old databas es;
116 // use toString() and createFromString() instead. 135 // use toString() and createFromString() instead.
117 String databaseIdentifier() const; 136 String databaseIdentifier() const;
118 137
119 // This method checks for equality between SecurityOrigins, not whether 138 // This method checks for equality between SecurityOrigins, not whether
120 // one origin can access another. It is used for hash table keys. 139 // one origin can access another. It is used for hash table keys.
121 // For access checks, use canAccess(). 140 // For access checks, use canAccess().
122 // FIXME: If this method is really only useful for hash table keys, it 141 // FIXME: If this method is really only useful for hash table keys, it
123 // should be refactored into SecurityOriginHash. 142 // should be refactored into SecurityOriginHash.
(...skipping 12 matching lines...) Expand all
136 String m_domain; 155 String m_domain;
137 unsigned short m_port; 156 unsigned short m_port;
138 bool m_noAccess; 157 bool m_noAccess;
139 bool m_domainWasSetInDOM; 158 bool m_domainWasSetInDOM;
140 bool m_canLoadLocalResources; 159 bool m_canLoadLocalResources;
141 }; 160 };
142 161
143 } // namespace WebCore 162 } // namespace WebCore
144 163
145 #endif // SecurityOrigin_h 164 #endif // SecurityOrigin_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/WebCore/page/SecurityOrigin.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698