toolkit/components/startup/nsAppStartup.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: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     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 nsAppStartup_h__
     7 #define nsAppStartup_h__
     9 #include "nsIAppStartup.h"
    10 #include "nsIWindowCreator2.h"
    11 #include "nsIObserver.h"
    12 #include "nsWeakReference.h"
    14 #include "nsINativeAppSupport.h"
    15 #include "nsIAppShell.h"
    16 #include "mozilla/Attributes.h"
    18 #if defined(XP_WIN)
    19 //XPerf-backed probes
    20 #include "mozilla/perfprobe.h"
    21 #include "nsAutoPtr.h"
    22 #endif //defined(XP_WIN)
    25 struct PLEvent;
    27 // {7DD4D320-C84B-4624-8D45-7BB9B2356977}
    28 #define NS_TOOLKIT_APPSTARTUP_CID \
    29 { 0x7dd4d320, 0xc84b, 0x4624, { 0x8d, 0x45, 0x7b, 0xb9, 0xb2, 0x35, 0x69, 0x77 } }
    32 class nsAppStartup MOZ_FINAL : public nsIAppStartup,
    33                                public nsIWindowCreator2,
    34                                public nsIObserver,
    35                                public nsSupportsWeakReference
    36 {
    37 public:
    38   NS_DECL_THREADSAFE_ISUPPORTS
    39   NS_DECL_NSIAPPSTARTUP
    40   NS_DECL_NSIWINDOWCREATOR
    41   NS_DECL_NSIWINDOWCREATOR2
    42   NS_DECL_NSIOBSERVER
    44   nsAppStartup();
    45   nsresult Init();
    47 private:
    48   ~nsAppStartup() { }
    50   void CloseAllWindows();
    52   friend class nsAppExitEvent;
    54   nsCOMPtr<nsIAppShell> mAppShell;
    56   int32_t      mConsiderQuitStopper; // if > 0, Quit(eConsiderQuit) fails
    57   bool mRunning;        // Have we started the main event loop?
    58   bool mShuttingDown;   // Quit method reentrancy check
    59   bool mStartingUp;     // Have we passed final-ui-startup?
    60   bool mAttemptingQuit; // Quit(eAttemptQuit) still trying
    61   bool mRestart;        // Quit(eRestart)
    62   bool mInterrupted;    // Was startup interrupted by an interactive prompt?
    63   bool mIsSafeModeNecessary;       // Whether safe mode is necessary
    64   bool mStartupCrashTrackingEnded; // Whether startup crash tracking has already ended
    65   bool mRestartTouchEnvironment; // Quit (eRestartTouchEnvironment)
    67 #if defined(XP_WIN)
    68   //Interaction with OS-provided profiling probes
    69   typedef mozilla::probes::ProbeManager ProbeManager;
    70   typedef mozilla::probes::Probe        Probe;
    71   nsRefPtr<ProbeManager> mProbesManager;
    72   nsRefPtr<Probe> mPlacesInitCompleteProbe;
    73   nsRefPtr<Probe> mSessionWindowRestoredProbe;
    74   nsRefPtr<Probe> mXPCOMShutdownProbe;
    75 #endif
    76 };
    78 #endif // nsAppStartup_h__

mercurial