[android-components](../../index.md) / [mozilla.components.browser.engine.gecko](../index.md) / [GeckoEngine](index.md) / [setAllowedInPrivateBrowsing](./set-allowed-in-private-browsing.md)

# setAllowedInPrivateBrowsing

`fun setAllowedInPrivateBrowsing(extension: `[`WebExtension`](../../mozilla.components.concept.engine.webextension/-web-extension/index.md)`, allowed: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`, onSuccess: (`[`WebExtension`](../../mozilla.components.concept.engine.webextension/-web-extension/index.md)`) -> `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`, onError: (`[`Throwable`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)`) -> `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/browser/engine-gecko-beta/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt#L411)

Overrides [WebExtensionRuntime.setAllowedInPrivateBrowsing](../../mozilla.components.concept.engine.webextension/-web-extension-runtime/set-allowed-in-private-browsing.md)

See [Engine.setAllowedInPrivateBrowsing](../../mozilla.components.concept.engine.webextension/-web-extension-runtime/set-allowed-in-private-browsing.md).

