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: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- |
michael@0 | 2 | * vim: sw=2 ts=2 sts=2 expandtab |
michael@0 | 3 | * This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 6 | |
michael@0 | 7 | #include "nsISupports.idl" |
michael@0 | 8 | |
michael@0 | 9 | interface mozIStorageResultSet; |
michael@0 | 10 | interface mozIStorageError; |
michael@0 | 11 | |
michael@0 | 12 | [scriptable, uuid(29383d00-d8c4-4ddd-9f8b-c2feb0f2fcfa)] |
michael@0 | 13 | interface mozIStorageStatementCallback : nsISupports { |
michael@0 | 14 | |
michael@0 | 15 | /** |
michael@0 | 16 | * Called when some result is obtained from the database. This function can |
michael@0 | 17 | * be called more than once with a different storageIResultSet each time for |
michael@0 | 18 | * any given asynchronous statement. |
michael@0 | 19 | * |
michael@0 | 20 | * @param aResultSet |
michael@0 | 21 | * The result set containing the data from the database. |
michael@0 | 22 | */ |
michael@0 | 23 | void handleResult(in mozIStorageResultSet aResultSet); |
michael@0 | 24 | |
michael@0 | 25 | /** |
michael@0 | 26 | * Called when some error occurs while executing the statement. This function |
michael@0 | 27 | * may be called more than once with a different storageIError each time for |
michael@0 | 28 | * any given asynchronous statement. |
michael@0 | 29 | * |
michael@0 | 30 | * @param aError |
michael@0 | 31 | * An object containing information about the error. |
michael@0 | 32 | */ |
michael@0 | 33 | void handleError(in mozIStorageError aError); |
michael@0 | 34 | |
michael@0 | 35 | /** |
michael@0 | 36 | * Called when the statement has finished executing. This function will only |
michael@0 | 37 | * be called once for any given asynchronous statement. |
michael@0 | 38 | * |
michael@0 | 39 | * @param aReason |
michael@0 | 40 | * Indicates if the statement is no longer executing because it either |
michael@0 | 41 | * finished (REASON_FINISHED), was canceled (REASON_CANCELED), or |
michael@0 | 42 | * a fatal error occurred (REASON_ERROR). |
michael@0 | 43 | */ |
michael@0 | 44 | const unsigned short REASON_FINISHED = 0; |
michael@0 | 45 | const unsigned short REASON_CANCELED = 1; |
michael@0 | 46 | const unsigned short REASON_ERROR = 2; |
michael@0 | 47 | void handleCompletion(in unsigned short aReason); |
michael@0 | 48 | }; |