Use the AutofillWebDataService's task runner instead of assuming the DB thread.

This is a precursor to moving the WebDataService off the DB thread entirely.
This reduces the number of direct dependencies on the DB thread.

Lots of stuff is still dependent on the DB thread, including some of the tests I
am touching here.  This just breaks the later change into smaller,
more-reviewable pieces.

Bug: 689520
Change-Id: I1b6af84ae941e7223458995d60858154f129cb5d
Reviewed-on: https://chromium-review.googlesource.com/580708
Commit-Queue: Peter Kasting <[email protected]>
Reviewed-by: Vaclav Brozek <[email protected]>
Reviewed-by: Martin Šrámek <[email protected]>
Reviewed-by: mahmadi <[email protected]>
Reviewed-by: Nicolas Zea <[email protected]>
Cr-Commit-Position: refs/heads/master@{#488867}
diff --git a/chrome/browser/sync/chrome_sync_client.h b/chrome/browser/sync/chrome_sync_client.h
index 7ad51302..2c6283a1 100644
--- a/chrome/browser/sync/chrome_sync_client.h
+++ b/chrome/browser/sync/chrome_sync_client.h
@@ -9,6 +9,7 @@
 #include <vector>
 
 #include "base/macros.h"
+#include "base/single_thread_task_runner.h"
 #include "chrome/browser/sync/glue/extensions_activity_monitor.h"
 #include "components/sync/driver/sync_client.h"
 
@@ -95,6 +96,9 @@
   scoped_refptr<autofill::AutofillWebDataService> web_data_service_;
   scoped_refptr<password_manager::PasswordStore> password_store_;
 
+  // The task runner for the |web_data_service_|, if any.
+  scoped_refptr<base::SingleThreadTaskRunner> db_thread_;
+
   std::unique_ptr<sync_sessions::SyncSessionsClient> sync_sessions_client_;
 
   // Generates and monitors the ExtensionsActivity object used by sync.