#[non_exhaustive]pub enum DowngradePolicy {
KeepProfile,
ResetProfile,
}Expand description
What to do with the profile on disk when a newer Chromium milestone than the one this binary embeds last used it: the application was rolled back to a release on an older CEF.
Defaults to DowngradePolicy::KeepProfile.
§What a rollback does to the profile
Chromium migrates its profile forward only, and Chrome calls a launch on a profile from
a higher milestone an unsupported downgrade (chrome/browser/downgrade/). In practice a
rollback to the previous milestone usually just works; what can go wrong is bounded by
the stores whose format changed in between. A SQLite database whose schema is newer
than the older Chromium can read — cookies, autofill, history — is left on disk and
unused, so cookies stop persisting until the application is upgraded again, and for
some of them Chromium shows its own “profile is from a newer version” dialog; an
IndexedDB store whose data format is newer may be discarded as corrupt.
Chrome keeps a Last Version breadcrumb in its user data directory to recognize a
downgrade. CEF does not write it, so the runtime does, in Cef::root_cache_path, and
applies this policy when the breadcrumb names a higher milestone. A downgrade within a
milestone, 152.0.7977.83 to 152.0.7977.50, is left alone either way, as Chrome
leaves it, and a profile another running instance of the application holds is never
touched.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
KeepProfile
Keep the profile and let Chromium open it, logging a warning that names both versions.
Nothing is deleted: whatever the older Chromium cannot read stays on disk and is back once the application is upgraded again. This is what Chrome does for a downgrade nobody administered.
ResetProfile
Move the root cache path aside and start on an empty profile, deleting the old one in the background.
The application starts as if freshly installed, on every platform and whatever changed between the two versions: cookies and sessions, local storage, IndexedDB, caches and granted permissions are gone, and a warning naming both versions is logged. For an application whose state lives on a server, or that would rather have every user start clean than some run on a half-readable profile.
Trait Implementations§
Source§impl Clone for DowngradePolicy
impl Clone for DowngradePolicy
impl Copy for DowngradePolicy
Source§impl Debug for DowngradePolicy
impl Debug for DowngradePolicy
Source§impl Default for DowngradePolicy
impl Default for DowngradePolicy
impl Eq for DowngradePolicy
Source§impl PartialEq for DowngradePolicy
impl PartialEq for DowngradePolicy
impl StructuralPartialEq for DowngradePolicy
Auto Trait Implementations§
impl Freeze for DowngradePolicy
impl RefUnwindSafe for DowngradePolicy
impl Send for DowngradePolicy
impl Sync for DowngradePolicy
impl Unpin for DowngradePolicy
impl UnsafeUnpin for DowngradePolicy
impl UnwindSafe for DowngradePolicy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, U> ConvertReturnValue<U> for Twhere
T: Into<U>,
impl<T, U> ConvertReturnValue<U> for Twhere
T: Into<U>,
fn wrap_result(self) -> U
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.