Open the LoginDatabase on the DB thread, not the UI thread.
PasswordStoreFactory::BuildServiceInstanceFor() used to open the LoginDatabase directly, on the UI thread. As the operation takes ~100 ms on average, this had led to significant UI jankiness.
This CL now changes this behavior so that the DB is opened in a deferred manner by PasswordStoreDefault on the DB thread. Furthermore, this CL refactors LoginDatabase to take the path to the DB in the constructor, and starts using scoped_ptr-s when PasswordStore implementations take ownership of passed-in components.
BUG=
138903
Committed:
https://crrev.com/41c91fbbdcfde75c9058d06ceae816f12699fc2f
Cr-Commit-Position: refs/heads/master@{#312607}