Bug 1942239 - Add option to explicitly enable incremental origin initialization in...
[gecko.git] / toolkit / components / antitracking / AntiTrackingRedirectHeuristic.h
blob6a6ccbab0cb6667dffb6a04648e52463f7adf463
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 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 file,
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_antitrackingredirectheuristic_h
8 #define mozilla_antitrackingredirectheuristic_h
10 class nsIChannel;
11 class nsIURI;
13 namespace mozilla {
15 // This function will be called when we know we are about to perform a http
16 // redirect. It will check if we need to perform the AntiTracking redirect
17 // heuristic from the old channel perspective. We cannot know the classification
18 // flags of the new channel at the point. So, we will save the result in the
19 // loadInfo in order to finish the heuristic once the classification flags is
20 // ready.
21 void PrepareForAntiTrackingRedirectHeuristic(nsIChannel* aOldChannel,
22 nsIURI* aOldURI,
23 nsIChannel* aNewChannel,
24 nsIURI* aNewURI);
26 // This function will be called once the classification flags of the new channel
27 // is known. It will check and perform the AntiTracking redirect heuristic
28 // according to the flags and the result from previous preparation.
29 void FinishAntiTrackingRedirectHeuristic(nsIChannel* aNewChannel,
30 nsIURI* aNewURI);
32 } // namespace mozilla
34 #endif // mozilla_antitrackingredirectheuristic_h