Make TemplateURLService batch up keyword table changes.
This came about because a trace showed the database thread spending a long
period of time executing a series of many individual keyword updates, each of
which was committed separately and took ~90 ms.
With this change, pieces of TemplateURLService that may make more than one
change to the keyword table at a time batch those changes together so there is a
single call to the database thread and a single SQL transaction wrapping all the
changes. In manual testing of TwoClientSearchEnginesSyncTest.AddMultiple (which
adds a bunch of search engines to one client and then syncs those changes to
another client), with the number of search engines synced elevated to 50 and
also 100, these changes saved approximately 6 seconds per test run.
By making WebDataService wrap even individual keyword table changes in a batch,
this also allows eliminating some implementation methods on WebDataService and
making similar methods on KeywordTable private.
BUG=308371
TEST=none
R=shess@chromium.org, stevet@chromium.org
Review URL: https://codereview.chromium.org/
217633002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261027 0039d316-1c4b-4281-b951-d872f2087c98