commit | 49eebb8ccadddc4e46c22cdc1020092945200f24 | [log] [tgz] |
---|---|---|
author | Paul Miller <[email protected]> | Thu Jun 14 04:11:08 2018 |
committer | Commit Bot <[email protected]> | Thu Jun 14 04:11:08 2018 |
tree | 6a93a96661d88e88dd6f35ae26fac68d427adad0 | |
parent | 91d0f68db814683fc61f7c0d5b9ad779a95e71b9 [diff] |
WebView: Pass the variations seed from Java to native Chrome's "firstrun" Java code downloads the seed and stores it in SharedPreferences (see VariationsSeedBridge.setVariationsFirstRunSeed), from which native later reads it. WebView loads the seed in Java (on every run, not just the first run), and re-used the firstrun code to pass the seed to native. However, SharedPreferences is slow--storing the seed takes 4 milliseconds on marlin. Create AwVariationsSeedBridge which keeps the seed in memory. Retrieve the seed via JNI. This avoids any file I/O. The JNI takes ~.1 milliseconds on the same device. Reuse VariationsSeedStore's "firstrun" seed import mechanism to verify the seed, report the result via UMA, and store the seed in the PrefService. This means that in WebView's case, the histogram Variations.FirstRunResult will be recorded every time the seed is loaded, not just on the first run. BUG=846898 Change-Id: Ib1f33f45923f1f5b273663643569841b05648a7d Reviewed-on: https://chromium-review.googlesource.com/1081305 Commit-Queue: Paul Miller <[email protected]> Reviewed-by: Alexei Svitkine <[email protected]> Reviewed-by: Bo <[email protected]> Reviewed-by: Chris Blume <[email protected]> Cr-Commit-Position: refs/heads/master@{#567127}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .