diff options
author | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-16 21:43:17 +0000 |
---|---|---|
committer | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-16 21:43:17 +0000 |
commit | 0e73b66a0717688c9e96642a4dee7538765cc1ff (patch) | |
tree | 518a3897ce4f6a7e0450d9b5d16e4c7cc3bc9339 /chrome/browser/sync/glue/sync_backend_host.h | |
parent | aade744427a446988410ace82faaa7bfe263fd15 (diff) | |
download | chromium_src-0e73b66a0717688c9e96642a4dee7538765cc1ff.zip chromium_src-0e73b66a0717688c9e96642a4dee7538765cc1ff.tar.gz chromium_src-0e73b66a0717688c9e96642a4dee7538765cc1ff.tar.bz2 |
Make SyncManagerTests use in-memory sqlite
Add a flag to the SyncManager to allow it to initialize an in-memory
directory. This is to be used only in tests.
This is an ugly change, but there's not much alternative available right
now. We really ought to figure out a better way to test the SyncManager
that doesn't require cluttering the main class with flag variables.
That task is left to another day.
Using an in-memory database results in significant speedups. The time
taken to run sync_unit_tests on my desktop went from 13s to 6s. It
seems to cut 10-20s off the runtime of unit_test
--gtest_filter='*Sync*', too.
BUG=116328, 117836
TEST=
Review URL: http://codereview.chromium.org/9662019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127255 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/glue/sync_backend_host.h')
-rw-r--r-- | chrome/browser/sync/glue/sync_backend_host.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/sync/glue/sync_backend_host.h b/chrome/browser/sync/glue/sync_backend_host.h index 5d886d1..7c712e3 100644 --- a/chrome/browser/sync/glue/sync_backend_host.h +++ b/chrome/browser/sync/glue/sync_backend_host.h @@ -293,7 +293,7 @@ class SyncBackendHost : public BackendDataTypeConfigurer { sync_notifier::SyncNotifierFactory* sync_notifier_factory, bool delete_sync_data_folder, const std::string& restored_key_for_bootstrapping, - bool setup_for_test_mode, + sync_api::SyncManager::TestingMode testing_mode, UnrecoverableErrorHandler* unrecoverable_error_handler, ReportUnrecoverableErrorFunction report_unrecoverable_error_function); ~DoInitializeOptions(); @@ -311,7 +311,7 @@ class SyncBackendHost : public BackendDataTypeConfigurer { std::string lsid; bool delete_sync_data_folder; std::string restored_key_for_bootstrapping; - bool setup_for_test_mode; + sync_api::SyncManager::TestingMode testing_mode; UnrecoverableErrorHandler* unrecoverable_error_handler; ReportUnrecoverableErrorFunction report_unrecoverable_error_function; }; |