fune/mobile/android/android-components/components/browser/storage-memory
Lina Cambridge c64f248f76 [components] Pass redirect source and target flags to history tracking delegates.
There's some confusion in `GeckoEngineSession` about redirect flags.
The `VISIT_REDIRECT_SOURCE` and `VISIT_REDIRECT_SOURCE_PERMANENT` flags
that we get from GeckoView's history delegate are for the redirect
_source_, not the visit type. They indicate if the URL passed to
`onVisited` is redirecting _to_ another URL, most likely because the
server returned an HTTP 3xy status code with a `Location` header.
Rust Places decides whether to mark the URL as hidden based on
these flags.

`VISIT_REDIRECT_{PERMANENT, TEMPORARY}`, however, indicate if the
URL passed to `onVisited` is the _target_ of a redirect (in other
words, the page that's _in_ the `Location` header). These get
translated into `VisitType` flags, which Rust Places stores as the
visit transition type. These two flags don't affect whether a URL
is hidden.

Note that, in a redirect chain, the middle links are both sources and
targets. For example, in "mozilla.org" -> "www.mozilla.org" ->
"www.mozilla.org/en-US", "www.mozilla.org" is both a redirect target
(since "mozilla.org" redirected to it), and a source (it redirected
to "www.mozilla.org/en-US").

See https://github.com/mozilla-mobile/fenix/issues/3526.
2019-10-11 21:41:40 -07:00
..
src [components] Pass redirect source and target flags to history tracking delegates. 2019-10-11 21:41:40 -07:00
build.gradle [components] For https://github.com/mozilla-mobile/android-components/issues/1481. Enable unit test binary resources globally. 2019-06-13 09:29:52 +02:00
proguard-rules.pro [components] Add an in-memory implementation of concept-storage 2018-10-26 15:42:19 -07:00
README.md [components] Add an in-memory implementation of concept-storage 2018-10-26 15:42:19 -07:00

Android Components > Browser > Memory Storage

An in-memory implementation of concept-storage. Data is not persisted to disk, and does not survive a restart. Not suitable for syncing.

Setting up the dependency

Use Gradle to download the library from maven.mozilla.org (Setup repository):

implementation "org.mozilla.components:browser-storage-memory:{latest-version}"

License

This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/