Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
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 nsIURI; |
michael@0 | 9 | interface nsIInterfaceRequestor; |
michael@0 | 10 | |
michael@0 | 11 | [scriptable, uuid(fa580a8d-f4a4-47c5-8ade-4f9786e8d1de)] |
michael@0 | 12 | interface nsISpeculativeConnect : nsISupports |
michael@0 | 13 | { |
michael@0 | 14 | /** |
michael@0 | 15 | * Called as a hint to indicate a new transaction for the URI is likely coming |
michael@0 | 16 | * soon. The implementer may use this information to start a TCP |
michael@0 | 17 | * and/or SSL level handshake for that resource immediately so that it is |
michael@0 | 18 | * ready and/or progressed when the transaction is actually submitted. |
michael@0 | 19 | * |
michael@0 | 20 | * No obligation is taken on by the implementer, nor is the submitter obligated |
michael@0 | 21 | * to actually open the new channel. |
michael@0 | 22 | * |
michael@0 | 23 | * @param aURI the URI of the hinted transaction |
michael@0 | 24 | * @param aCallbacks any security callbacks for use with SSL for interfaces |
michael@0 | 25 | * such as nsIBadCertListener. May be null. |
michael@0 | 26 | * |
michael@0 | 27 | */ |
michael@0 | 28 | void speculativeConnect(in nsIURI aURI, |
michael@0 | 29 | in nsIInterfaceRequestor aCallbacks); |
michael@0 | 30 | |
michael@0 | 31 | }; |
michael@0 | 32 | |
michael@0 | 33 | /** |
michael@0 | 34 | * This is used to override the default values for various values (documented |
michael@0 | 35 | * inline) to determine whether or not to actually make a speculative |
michael@0 | 36 | * connection. |
michael@0 | 37 | */ |
michael@0 | 38 | [builtinclass, uuid(2b6d6fb6-ab28-4f4c-af84-bfdbb7866d72)] |
michael@0 | 39 | interface nsISpeculativeConnectionOverrider : nsISupports |
michael@0 | 40 | { |
michael@0 | 41 | /** |
michael@0 | 42 | * Used to determine the maximum number of unused speculative connections |
michael@0 | 43 | * we will have open for a host at any one time |
michael@0 | 44 | */ |
michael@0 | 45 | [infallible] readonly attribute unsigned long parallelSpeculativeConnectLimit; |
michael@0 | 46 | |
michael@0 | 47 | /** |
michael@0 | 48 | * Used to loosen the restrictions nsHttpConnectionMgr::RestrictConnections |
michael@0 | 49 | * to allow more speculative connections when we're unsure if a host will |
michael@0 | 50 | * connect via SPDY or not. |
michael@0 | 51 | */ |
michael@0 | 52 | [infallible] readonly attribute boolean ignorePossibleSpdyConnections; |
michael@0 | 53 | |
michael@0 | 54 | /** |
michael@0 | 55 | * Used to determine if we will ignore the existence of any currently idle |
michael@0 | 56 | * connections when we decide whether or not to make a speculative |
michael@0 | 57 | * connection. |
michael@0 | 58 | */ |
michael@0 | 59 | [infallible] readonly attribute boolean ignoreIdle; |
michael@0 | 60 | }; |