mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Backed out changeset 2c2bc5fd317f (bug 1791046) for lint failure on a CLOSED TREE
This commit is contained in:
parent
1b0afb255b
commit
daea5b0dd9
@ -437,6 +437,9 @@ package org.mozilla.geckoview {
|
||||
@Retention(value=RetentionPolicy.SOURCE) public static interface ContentBlocking.CBCookieBehavior {
|
||||
}
|
||||
|
||||
@Retention(value=RetentionPolicy.SOURCE) @Deprecated @DeprecationSchedule(id="cookie-lifetime-policy",version=106) public static interface ContentBlocking.CBCookieLifetime {
|
||||
}
|
||||
|
||||
@Retention(value=RetentionPolicy.SOURCE) public static interface ContentBlocking.CBEtpLevel {
|
||||
}
|
||||
|
||||
@ -453,6 +456,13 @@ package org.mozilla.geckoview {
|
||||
field public static final int ACCEPT_VISITED = 3;
|
||||
}
|
||||
|
||||
@Deprecated @DeprecationSchedule(id="cookie-lifetime-policy",version=106) public static class ContentBlocking.CookieLifetime {
|
||||
ctor protected CookieLifetime();
|
||||
field public static final int DAYS = 3;
|
||||
field public static final int NORMAL = 0;
|
||||
field public static final int RUNTIME = 2;
|
||||
}
|
||||
|
||||
public static interface ContentBlocking.Delegate {
|
||||
method @UiThread default public void onContentBlocked(@NonNull GeckoSession, @NonNull ContentBlocking.BlockEvent);
|
||||
method @UiThread default public void onContentLoaded(@NonNull GeckoSession, @NonNull ContentBlocking.BlockEvent);
|
||||
@ -512,6 +522,7 @@ package org.mozilla.geckoview {
|
||||
method public int getAntiTrackingCategories();
|
||||
method public int getCookieBehavior();
|
||||
method public int getCookieBehaviorPrivateMode();
|
||||
method @Deprecated @DeprecationSchedule(id="cookie-lifetime-policy",version=106) public int getCookieLifetime();
|
||||
method public boolean getCookiePurging();
|
||||
method public int getEnhancedTrackingProtectionLevel();
|
||||
method public int getSafeBrowsingCategories();
|
||||
@ -522,6 +533,7 @@ package org.mozilla.geckoview {
|
||||
method @NonNull public ContentBlocking.Settings setAntiTracking(int);
|
||||
method @NonNull public ContentBlocking.Settings setCookieBehavior(int);
|
||||
method @NonNull public ContentBlocking.Settings setCookieBehaviorPrivateMode(int);
|
||||
method @Deprecated @DeprecationSchedule(id="cookie-lifetime-policy",version=106) @NonNull public ContentBlocking.Settings setCookieLifetime(int);
|
||||
method @NonNull public ContentBlocking.Settings setCookiePurging(boolean);
|
||||
method @NonNull public ContentBlocking.Settings setEnhancedTrackingProtectionLevel(int);
|
||||
method @NonNull public ContentBlocking.Settings setSafeBrowsing(int);
|
||||
@ -537,6 +549,7 @@ package org.mozilla.geckoview {
|
||||
method @NonNull public ContentBlocking.Settings.Builder antiTracking(int);
|
||||
method @NonNull public ContentBlocking.Settings.Builder cookieBehavior(int);
|
||||
method @NonNull public ContentBlocking.Settings.Builder cookieBehaviorPrivateMode(int);
|
||||
method @Deprecated @DeprecationSchedule(id="cookie-lifetime-policy",version=106) @NonNull public ContentBlocking.Settings.Builder cookieLifetime(int);
|
||||
method @NonNull public ContentBlocking.Settings.Builder cookiePurging(boolean);
|
||||
method @NonNull public ContentBlocking.Settings.Builder enhancedTrackingProtectionLevel(int);
|
||||
method @NonNull public ContentBlocking.Settings.Builder safeBrowsing(int);
|
||||
|
@ -181,6 +181,19 @@ public class ContentBlocking {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the cookie lifetime.
|
||||
*
|
||||
* @param lifetime The enforced cookie lifetime. Use one of the {@link CookieLifetime} flags.
|
||||
* @return The Builder instance.
|
||||
* @deprecated This feature is not supported anymore.
|
||||
*/
|
||||
@Deprecated
|
||||
@DeprecationSchedule(id = "cookie-lifetime-policy", version = 106)
|
||||
public @NonNull Builder cookieLifetime(final @CBCookieLifetime int lifetime) {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the ETP behavior level.
|
||||
*
|
||||
@ -555,6 +568,32 @@ public class ContentBlocking {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the assigned cookie lifetime.
|
||||
*
|
||||
* @return The assigned lifetime, as one of {@link CookieLifetime} flags.
|
||||
* @deprecated This feature is not supported anymore. This method always returns 0.
|
||||
*/
|
||||
@Deprecated
|
||||
@DeprecationSchedule(id = "cookie-lifetime-policy", version = 106)
|
||||
@SuppressLint("WrongConstant")
|
||||
public @CBCookieLifetime int getCookieLifetime() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the cookie lifetime.
|
||||
*
|
||||
* @param lifetime The enforced cookie lifetime. Use one of the {@link CookieLifetime} flags.
|
||||
* @return This Settings instance.
|
||||
* @deprecated This feature is not supported anymore.
|
||||
*/
|
||||
@Deprecated
|
||||
@DeprecationSchedule(id = "cookie-lifetime-policy", version = 106)
|
||||
public @NonNull Settings setCookieLifetime(final @CBCookieLifetime int lifetime) {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get whether or not cookie purging is enabled.
|
||||
*
|
||||
@ -1210,6 +1249,30 @@ public class ContentBlocking {
|
||||
})
|
||||
public @interface CBCookieBehavior {}
|
||||
|
||||
// Sync values with nsICookieService.idl.
|
||||
// This feature is not supported anymore.
|
||||
@Deprecated
|
||||
@DeprecationSchedule(id = "cookie-lifetime-policy", version = 106)
|
||||
public static class CookieLifetime {
|
||||
/** Accept default cookie lifetime. */
|
||||
public static final int NORMAL = 0;
|
||||
|
||||
/** Downgrade cookie lifetime to this runtime's lifetime. */
|
||||
public static final int RUNTIME = 2;
|
||||
|
||||
/** Limit cookie lifetime to N days. Defaults to 90 days. */
|
||||
public static final int DAYS = 3;
|
||||
|
||||
protected CookieLifetime() {}
|
||||
}
|
||||
|
||||
// This feature is not supported anymore.
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@IntDef({CookieLifetime.NORMAL, CookieLifetime.RUNTIME, CookieLifetime.DAYS})
|
||||
@Deprecated
|
||||
@DeprecationSchedule(id = "cookie-lifetime-policy", version = 106)
|
||||
public @interface CBCookieLifetime {}
|
||||
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@IntDef({EtpLevel.NONE, EtpLevel.DEFAULT, EtpLevel.STRICT})
|
||||
public @interface CBEtpLevel {}
|
||||
|
@ -13,9 +13,6 @@ exclude: true
|
||||
|
||||
⚠️ breaking change and deprecation notices
|
||||
|
||||
## v107
|
||||
- Removed deprecated [`cookieLifetime`][103.2]
|
||||
|
||||
## v106
|
||||
- Added [`SelectionActionDelegate.onShowClipboardPermissionRequest`][106.1],
|
||||
[`SelectionActionDelegate.onDismissClipboardPermissionRequest`][106.2],
|
||||
@ -1243,4 +1240,4 @@ to allow adding gecko profiler markers.
|
||||
[65.24]: {{javadoc_uri}}/CrashReporter.html#sendCrashReport(android.content.Context,android.os.Bundle,java.lang.String)
|
||||
[65.25]: {{javadoc_uri}}/GeckoResult.html
|
||||
|
||||
[api-version]: 4bbcd93e127201517ea4ea0428a02213d8a8460c
|
||||
[api-version]: 5dd4f92b49dec51709788671173c5a03b303287b
|
||||
|
Loading…
Reference in New Issue
Block a user