Backed out changeset 58dbd2146e24 (bug 944961) for bustage.
[gecko.git] / content / base / src / ThirdPartyUtil.h
blob3f50ac3926e4596db720328eb61de4e478453a37
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef ThirdPartyUtil_h__
6 #define ThirdPartyUtil_h__
8 #include "nsCOMPtr.h"
9 #include "nsString.h"
10 #include "mozIThirdPartyUtil.h"
11 #include "nsIEffectiveTLDService.h"
12 #include "mozilla/Attributes.h"
14 class nsIURI;
15 class nsIChannel;
16 class nsIDOMWindow;
18 class ThirdPartyUtil MOZ_FINAL : public mozIThirdPartyUtil
20 public:
21 NS_DECL_ISUPPORTS
22 NS_DECL_MOZITHIRDPARTYUTIL
24 nsresult Init();
26 private:
27 nsresult IsThirdPartyInternal(const nsCString& aFirstDomain,
28 nsIURI* aSecondURI, bool* aResult);
29 static already_AddRefed<nsIURI> GetURIFromWindow(nsIDOMWindow* aWin);
31 nsCOMPtr<nsIEffectiveTLDService> mTLDService;
34 #endif