Introduce serialze/deserialize to Java GURL
In order to avoid loading the native library really early for use cases like the SearchActivity, which caches a URL and uses it immediately on Activity creation, we can serialze and deserialze GURLs. See https://chromium-review.googlesource.com/c/chromium/src/+/2071376/6/chrome/android/java/src/org/chromium/chrome/browser/omnibox/suggestions/OmniboxSuggestion.java#244 for more context. The serialization is quite simple, as GURL is comprised of ints, bools, and a string. Further, if the version changes, instead of having to be backwards/forwards compatible, as long as the GURL is the last token and the delimiter doesn't change, the GURL can simply be re-parsed from the spec at a small startup cost due to having to load the native library early. Bug: 783819 Change-Id: I4ac94c44e8041612d672ad52a92c83247e20c37d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2076400Reviewed-by:Chris Palmer <palmer@chromium.org> Commit-Queue: Michael Thiessen <mthiesse@chromium.org> Cr-Commit-Position: refs/heads/master@{#745240}
Showing
Please register or sign in to comment