xpcom/base/nsUUIDGenerator.h

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 /* -*- Mode: C++; tab-width: 50; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #ifndef _NSUUIDGENERATOR_H_
     7 #define _NSUUIDGENERATOR_H_
     9 #include "mozilla/Attributes.h"
    10 #include "mozilla/Mutex.h"
    12 #include "nsIUUIDGenerator.h"
    14 class nsUUIDGenerator MOZ_FINAL : public nsIUUIDGenerator {
    15 public:
    16     nsUUIDGenerator();
    18     NS_DECL_THREADSAFE_ISUPPORTS
    20     NS_DECL_NSIUUIDGENERATOR
    22     nsresult Init();
    24 private:
    25     ~nsUUIDGenerator();
    27 protected:
    29     mozilla::Mutex mLock;
    30 #if !defined(XP_WIN) && !defined(XP_MACOSX) && !defined(ANDROID)
    31     char mState[128];
    32     char *mSavedState;
    33     uint8_t mRBytes;
    34 #endif
    35 };
    37 #define NS_UUID_GENERATOR_CONTRACTID "@mozilla.org/uuid-generator;1"
    38 #define NS_UUID_GENERATOR_CID \
    39 { 0x706d36bb, 0xbf79, 0x4293, \
    40 { 0x81, 0xf2, 0x8f, 0x68, 0x28, 0xc1, 0x8f, 0x9d } }
    42 #endif /* _NSUUIDGENERATOR_H_ */

mercurial