startupcache/nsIStartupCache.idl

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: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
     2  *
     3  * This Source Code Form is subject to the terms of the Mozilla Public
     4  * License, v. 2.0. If a copy of the MPL was not distributed with this
     5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     7 #include "nsIInputStream.idl"
     8 #include "nsISupports.idl"
     9 #include "nsIObserver.idl"
    10 #include "nsIObjectOutputStream.idl"
    12 [uuid(25957820-90a1-428c-8739-b0845d3cc534)]
    13 interface nsIStartupCache : nsISupports
    14 {
    16   /** This interface is provided for testing purposes only, basically
    17    *  just to solve link vagaries. See docs in StartupCache.h
    18    *  GetBuffer, PutBuffer, and InvalidateCache act as described 
    19    *  in that file. */
    21   uint32_t getBuffer(in string aID, out charPtr aBuffer);
    22   void putBuffer(in string aID, in string aBuffer, 
    23                             in uint32_t aLength);
    25   void invalidateCache();
    27   void ignoreDiskCache();
    29   /** In debug builds, wraps this object output stream with a stream that will 
    30    *  detect and prevent the write of a multiply-referenced non-singleton object 
    31    *  during serialization. In non-debug, returns an add-ref'd pointer to
    32    *  original stream, unwrapped. */
    33   nsIObjectOutputStream getDebugObjectOutputStream(in nsIObjectOutputStream aStream);
    35   /* Allows clients to check whether the one-time writeout after startup 
    36    * has finished yet, and also to set this variable as needed (so test
    37    * code can fire mulitple startup writes if needed).
    38    */
    39   boolean startupWriteComplete();
    40   void resetStartupWriteTimer();
    42   /* Instruct clients to always post cache ages to Telemetry, even in
    43      cases where it would not normally make sense.  */
    44   void recordAgesAlways();
    46   /* Allows clients to simulate the behavior of ObserverService. */
    47   readonly attribute nsIObserver observer;
    48 };

mercurial