Fix a scoped temp dir leak in ImportantSitesUsageCounterTest

The SQL DB owned by the QuotaManager gets destroyed asynchronously, so
given the current ordering of the parameters:
  base::ScopedTempDir temp_dir_;
  scoped_refptr<QuotaManager> quota_manager_;

The release of |quota_manager_| will post a task to close the database
stored in temp_dir_ but this is racy with the destruction of

Bug: 974310
Change-Id: Ib54ea1fe1652028a1bcf6b7f6107a01d3e99f2d5
Commit-Queue: Daniel Murphy <>
Reviewed-by: Daniel Murphy <>
Reviewed-by: Ben Wells <>
Auto-Submit: S├ębastien Marchand <>
Cr-Commit-Position: refs/heads/master@{#672215}
1 file changed