dom/network/src/UDPSocketChild.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 /* This Source Code Form is subject to the terms of the Mozilla Public
     2  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
     3  * You can obtain one at http://mozilla.org/MPL/2.0/. */
     5 #ifndef mozilla_dom_UDPSocketChild_h__
     6 #define mozilla_dom_UDPSocketChild_h__
     8 #include "mozilla/net/PUDPSocketChild.h"
     9 #include "nsIUDPSocketChild.h"
    10 #include "nsCycleCollectionParticipant.h"
    11 #include "nsCOMPtr.h"
    13 #define UDPSOCKETCHILD_CID \
    14   {0xb47e5a0f, 0xd384, 0x48ef, { 0x88, 0x85, 0x42, 0x59, 0x79, 0x3d, 0x9c, 0xf0 }}
    16 namespace mozilla {
    17 namespace dom {
    19 class UDPSocketChildBase : public nsIUDPSocketChild {
    20 public:
    21   NS_DECL_ISUPPORTS
    23   void AddIPDLReference();
    24   void ReleaseIPDLReference();
    26 protected:
    27   UDPSocketChildBase();
    28   virtual ~UDPSocketChildBase();
    29   nsCOMPtr<nsIUDPSocketInternal> mSocket;
    30   bool mIPCOpen;
    31 };
    33 class UDPSocketChild : public mozilla::net::PUDPSocketChild
    34                      , public UDPSocketChildBase
    35 {
    36 public:
    37   NS_DECL_NSIUDPSOCKETCHILD
    38   NS_IMETHOD_(MozExternalRefCountType) Release() MOZ_OVERRIDE;
    40   UDPSocketChild();
    41   virtual ~UDPSocketChild();
    43   virtual bool RecvCallback(const nsCString& aType,
    44                             const UDPCallbackData& aData,
    45                             const nsCString& aState) MOZ_OVERRIDE;
    46 private:
    47   uint16_t mLocalPort;
    48   nsCString mLocalAddress;
    49   nsCString mFilterName;
    50 };
    52 } // namespace dom
    53 } // namespace mozilla
    55 #endif // !defined(mozilla_dom_UDPSocketChild_h__)

mercurial