netwerk/cookie/nsCookie.h

branch
TOR_BUG_3246
changeset 4
fc2d59ddac77
parent 0
6474c204b198
     1.1 --- a/netwerk/cookie/nsCookie.h	Wed Dec 31 06:55:50 2014 +0100
     1.2 +++ b/netwerk/cookie/nsCookie.h	Wed Dec 31 07:22:50 2014 +0100
     1.3 @@ -36,6 +36,7 @@
     1.4      nsCookie(const char     *aName,
     1.5               const char     *aValue,
     1.6               const char     *aHost,
     1.7 +             const char     *aOrigin,
     1.8               const char     *aPath,
     1.9               const char     *aEnd,
    1.10               int64_t         aExpiry,
    1.11 @@ -47,6 +48,7 @@
    1.12       : mName(aName)
    1.13       , mValue(aValue)
    1.14       , mHost(aHost)
    1.15 +     , mOrigin(aOrigin)
    1.16       , mPath(aPath)
    1.17       , mEnd(aEnd)
    1.18       , mExpiry(aExpiry)
    1.19 @@ -68,6 +70,7 @@
    1.20      static nsCookie * Create(const nsACString &aName,
    1.21                               const nsACString &aValue,
    1.22                               const nsACString &aHost,
    1.23 +                             const nsACString &aOrigin,
    1.24                               const nsACString &aPath,
    1.25                               int64_t           aExpiry,
    1.26                               int64_t           aLastAccessed,
    1.27 @@ -83,8 +86,9 @@
    1.28      // fast (inline, non-xpcom) getters
    1.29      inline const nsDependentCString Name()  const { return nsDependentCString(mName, mValue - 1); }
    1.30      inline const nsDependentCString Value() const { return nsDependentCString(mValue, mHost - 1); }
    1.31 -    inline const nsDependentCString Host()  const { return nsDependentCString(mHost, mPath - 1); }
    1.32 -    inline const nsDependentCString RawHost() const { return nsDependentCString(IsDomain() ? mHost + 1 : mHost, mPath - 1); }
    1.33 +    inline const nsDependentCString Host()  const { return nsDependentCString(mHost, mOrigin - 1); }
    1.34 +    inline const nsDependentCString RawHost() const { return nsDependentCString(IsDomain() ? mHost + 1 : mHost, mOrigin - 1); }
    1.35 +    inline const nsDependentCString Origin() const { return nsDependentCString(mOrigin, mPath - 1); }
    1.36      inline const nsDependentCString Path()  const { return nsDependentCString(mPath, mEnd); }
    1.37      inline int64_t Expiry()                 const { return mExpiry; }        // in seconds
    1.38      inline int64_t LastAccessed()           const { return mLastAccessed; }  // in microseconds
    1.39 @@ -113,6 +117,7 @@
    1.40      const char  *mName;
    1.41      const char  *mValue;
    1.42      const char  *mHost;
    1.43 +    const char  *mOrigin;
    1.44      const char  *mPath;
    1.45      const char  *mEnd;
    1.46      int64_t      mExpiry;

mercurial