tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

nsSocketProviderService.h (850B)


      1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* This Source Code Form is subject to the terms of the Mozilla Public
      3 * License, v. 2.0. If a copy of the MPL was not distributed with this
      4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      5 
      6 #ifndef nsSocketProviderService_h__
      7 #define nsSocketProviderService_h__
      8 
      9 #include "nsISocketProviderService.h"
     10 #include "mozilla/StaticPtr.h"
     11 
     12 class nsSocketProviderService : public nsISocketProviderService {
     13  nsSocketProviderService() = default;
     14  virtual ~nsSocketProviderService() = default;
     15 
     16 public:
     17  NS_DECL_THREADSAFE_ISUPPORTS
     18  NS_DECL_NSISOCKETPROVIDERSERVICE
     19 
     20  static already_AddRefed<nsISocketProviderService> GetOrCreate();
     21 
     22 private:
     23  static mozilla::StaticRefPtr<nsSocketProviderService> gSingleton;
     24 };
     25 
     26 #endif /* nsSocketProviderService_h__ */