1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 ;*; */
2 /* vim: set sw=2 ts=8 et tw=80 : */
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 #ifndef mozilla__net__RequestContextService_h
8 #define mozilla__net__RequestContextService_h
11 #include "nsInterfaceHashtable.h"
12 #include "nsIObserver.h"
13 #include "nsIRequestContext.h"
18 class RequestContextService final
: public nsIRequestContextService
,
22 NS_DECL_NSIREQUESTCONTEXTSERVICE
25 static already_AddRefed
<nsIRequestContextService
> GetOrCreate();
28 RequestContextService();
29 virtual ~RequestContextService();
34 static RequestContextService
* sSelf
;
36 nsInterfaceHashtable
<nsUint64HashKey
, nsIRequestContext
> mTable
;
37 uint32_t mRCIDNamespace
{0};
38 uint32_t mNextRCID
{1};
42 } // namespace mozilla
44 #endif // mozilla__net__RequestContextService_h