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 #include
"nsISupports.idl"
9 * nsIURLQueryStringStripper is responsible for stripping certain part of the
10 * query string of the given URI to address the bounce(redirect) tracking
11 * issues. It will strip every query parameter which matches the strip list
12 * defined in the pref 'privacy.query_stripping.strip_list'. Note that It's
13 * different from URLDecorationStripper which strips the entire query string
14 * from the referrer if there is a tracking query parameter present in the URI.
16 * TODO: Given that nsIURLQueryStringStripper and URLDecorationStripper are
17 * doing similar things. We could somehow combine these two modules into
18 * one. We will improve this in the future.
20 [scriptable
, uuid(6b42a890
-2624-4560-99c4
-b25380e8cd77
)]
21 interface nsIURLQueryStringStripper
: nsISupports
{
23 // Strip the query parameters that are in the strip list. Return the amount of
24 // query parameters that have been stripped. Returns 0 if no query parameters
25 // have been stripped or the feature is disabled.
26 uint32_t strip
(in nsIURI aURI
, in boolean aIsPBM
, out nsIURI aOutput
);
28 // Strip the query parameters that are in the stripForCopy/Share strip list.
29 // Returns ether the stripped URI or null if no query parameters have been stripped
30 // Thorws NS_ERROR_NOT_AVAILABLE if the feature is disabled.
31 [must_use
] nsIURI stripForCopyOrShare
(in nsIURI aURI
);
33 // Checks if there is any query parameter that can be stripped
34 // using Strip on share. Returns false if no query parameter that
36 boolean canStripForShare
(in nsIURI aURI
);
38 // Test-only method to get the current strip list.
39 ACString testGetStripList
();