Backed out 2 changesets (bug 1156659) for causing multiple dt failures on browser_jst...
[gecko.git] / netwerk / dns / DNSServiceBase.h
blob9657d809f77e02c6c0cc9e316c50c9658aaafb24
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_DNSServiceBase_h
8 #define mozilla_net_DNSServiceBase_h
10 #include "mozilla/Atomics.h"
11 #include "nsIObserver.h"
12 #include "nsString.h"
14 class nsIPrefBranch;
16 namespace mozilla::net {
18 class DNSServiceBase : public nsIObserver {
19 public:
20 NS_DECL_THREADSAFE_ISUPPORTS
22 DNSServiceBase() = default;
24 protected:
25 virtual ~DNSServiceBase() = default;
26 void AddPrefObserver(nsIPrefBranch* aPrefs);
27 virtual void ReadPrefs(const char* aName);
28 bool DNSForbiddenByActiveProxy(const nsACString& aHostname, uint32_t aFlags);
30 mozilla::Atomic<bool, mozilla::Relaxed> mDisablePrefetch{false};
31 mozilla::Atomic<bool, mozilla::Relaxed> mHasSocksProxy{false};
34 } // namespace mozilla::net
36 #endif // mozilla_net_DNSServiceBase_h