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

Unified 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, 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/WebCore/page/SecurityOrigin.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/WebCore/page/SecurityOrigin.h
===================================================================
--- third_party/WebKit/WebCore/page/SecurityOrigin.h (revision 3814)
+++ third_party/WebKit/WebCore/page/SecurityOrigin.h (working copy)
@@ -111,6 +111,25 @@
// SecurityOrigin is represented as the string "null".
String toHTTPOrigin() const;
+ // Non-empty security tokens can be used for fast access checks. If the
+ // return value is a non-empty string, it can be used to compare with
+ // another security origin's securityToken. An empty security token is
+ // invalid and should not be used to check security. Instead, you must
+ // call canAccess.
+ //
+ // CAVEATS:
+ //
+ // 1) If either of the tokens is empty or if the tokens are not equal,
+ // you must call canAccess to see if they match. The tokens can be
+ // used for fast allow judgments, but cannot be used for deny
+ // judgments.
+ //
+ // 2) If one of the SecurityOrigins modifies their document.domain
+ // property after you read its securityToken, you might get false
+ // allows.
+ //
+ String securityToken() const;
+
// Serialize the security origin for storage in the database. This format is
// deprecated and should be used only for compatibility with old databases;
// use toString() and createFromString() instead.
« 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