toolkit/system/dbus/nsDBusModule.cpp

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: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     2 /* vim:expandtab:shiftwidth=4:tabstop=4:
     3  */
     4 /* This Source Code Form is subject to the terms of the Mozilla Public
     5  * License, v. 2.0. If a copy of the MPL was not distributed with this
     6  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     8 #include "nsServiceManagerUtils.h"
     9 #include "nsICategoryManager.h"
    10 #include "mozilla/ModuleUtils.h"
    11 #include "nsIAppStartupNotifier.h"
    12 #include "nsNetworkManagerListener.h"
    13 #include "nsNetCID.h"
    15 #define NS_DBUS_NETWORK_LINK_SERVICE_CID    \
    16   { 0x75a500a2,                                        \
    17     0x0030,                                            \
    18     0x40f7,                                            \
    19     { 0x86, 0xf8, 0x63, 0xf2, 0x25, 0xb9, 0x40, 0xae } \
    20   }
    22 /* ===== XPCOM registration stuff ======== */
    24 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsNetworkManagerListener, Init)
    25 NS_DEFINE_NAMED_CID(NS_DBUS_NETWORK_LINK_SERVICE_CID);
    27 static const mozilla::Module::CIDEntry kDBUSCIDs[] = {
    28     { &kNS_DBUS_NETWORK_LINK_SERVICE_CID, false, nullptr, nsNetworkManagerListenerConstructor },
    29     { nullptr }
    30 };
    32 static const mozilla::Module::ContractIDEntry kDBUSContracts[] = {
    33     { NS_NETWORK_LINK_SERVICE_CONTRACTID, &kNS_DBUS_NETWORK_LINK_SERVICE_CID },
    34     { nullptr }
    35 };
    37 static const mozilla::Module kDBUSModule = {
    38     mozilla::Module::kVersion,
    39     kDBUSCIDs,
    40     kDBUSContracts
    41 };
    43 NSMODULE_DEFN(nsDBusModule) = &kDBUSModule;

mercurial