Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #include "nsISupports.idl" |
michael@0 | 7 | |
michael@0 | 8 | interface nsIStreamListener; |
michael@0 | 9 | |
michael@0 | 10 | /** |
michael@0 | 11 | * A channel implementing this interface allows one to intercept its data by |
michael@0 | 12 | * inserting intermediate stream listeners. |
michael@0 | 13 | */ |
michael@0 | 14 | [scriptable, uuid(68167b0b-ef34-4d79-a09a-8045f7c5140e)] |
michael@0 | 15 | interface nsITraceableChannel : nsISupports |
michael@0 | 16 | { |
michael@0 | 17 | /* |
michael@0 | 18 | * Replace the channel's listener with a new one, and return the listener |
michael@0 | 19 | * the channel used to have. The new listener intercepts OnStartRequest, |
michael@0 | 20 | * OnDataAvailable and OnStopRequest calls and must pass them to |
michael@0 | 21 | * the original listener after examination. If multiple callers replace |
michael@0 | 22 | * the channel's listener, a chain of listeners is created. |
michael@0 | 23 | * The caller of setNewListener has no way to control at which place |
michael@0 | 24 | * in the chain its listener is placed. |
michael@0 | 25 | * |
michael@0 | 26 | * Note: The caller of setNewListener must not delay passing |
michael@0 | 27 | * OnStartRequest to the original listener. |
michael@0 | 28 | * |
michael@0 | 29 | * Note2: A channel may restrict when the listener can be replaced. |
michael@0 | 30 | * It is not recommended to allow listener replacement after OnStartRequest |
michael@0 | 31 | * has been called. |
michael@0 | 32 | */ |
michael@0 | 33 | nsIStreamListener setNewListener(in nsIStreamListener aListener); |
michael@0 | 34 | }; |