As part of the WebView Multi-profile project, classes and state in `//android_webview/`` will be annotated to make their lifetimes explicit. There are broadly 4 different lifetimes that a class can have:
There is a many to one relationship between WebViews and Profiles. A single Profile can support multiple WebViews, each WebView will only have a single (constant) Profile.
These annotations are purely for documentation, there is no static analysis to check them.
In Java, use the following annotations:
@Lifetime.Singleton@Lifetime.Profile@Lifetime.WebView@Lifetime.TemporaryIn C++, use the following comment format as the last line of the classes documentation:
* Lifetime: Singleton * Lifetime: Profile * Lifetime: WebView * Lifetime: Temporary