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

Unified Diff: Source/core/dom/Document.h

Issue 246433004: Rename cookieURL to inheritedURL and add inheritedURL() to WebDocument (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: weaken statement about inheritedURL Created 6 years, 8 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 | Source/core/dom/Document.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.h
diff --git a/Source/core/dom/Document.h b/Source/core/dom/Document.h
index 0bff7aab9e1ac597a8c1d1727bd59ab171956267..d59964ee334f0f2f067d801721a5609a849e96e7 100644
--- a/Source/core/dom/Document.h
+++ b/Source/core/dom/Document.h
@@ -756,18 +756,21 @@ public:
String lastModified() const;
- // The cookieURL is used to query the cookie database for this document's
+ // Returns the document's (inherited) URL. Should only be used for decisions that
+ // are solely based on the document's URL. For anything security-related, use
+ // securityOrigin() instead.
+ // inheritedURL is also used to query the cookie database for the document's
// cookies. For example, if the cookie URL is http://example.com, we'll
// use the non-Secure cookies for example.com when computing
// document.cookie.
//
- // Q: How is the cookieURL different from the document's URL?
+ // Q: How is the inheritedURL different from the document's URL?
// A: The two URLs are the same almost all the time. However, if one
// document inherits the security context of another document, it
- // inherits its cookieURL but not its URL.
+ // inherits its inheritedURL but not its URL.
//
- const KURL& cookieURL() const { return m_cookieURL; }
- void setCookieURL(const KURL& url) { m_cookieURL = url; }
+ const KURL& inheritedURL() const { return m_inheritedURL; }
+ void setInheritedURL(const KURL& url) { m_inheritedURL = url; }
const KURL& firstPartyForCookies() const;
@@ -1187,7 +1190,7 @@ private:
KURL m_baseURL; // Node.baseURI: The URL to use when resolving relative URLs.
KURL m_baseURLOverride; // An alternative base URL that takes precedence over m_baseURL (but not m_baseElementURL).
KURL m_baseElementURL; // The URL set by the <base> element.
- KURL m_cookieURL; // The URL to use for cookie access.
+ KURL m_inheritedURL; // Same as m_url, unless the document inherits its security context from another document.
AtomicString m_baseTarget;
« no previous file with comments | « no previous file | Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698