Implement initialization for GDataCache to use in-memory metadata for tests.
Use the in-memory version for GDataFileSystemTest.
BUG=137945
TEST=unit_tests --gtest_filter='GDataFileSystemTest*'
Review URL: https://chromiumcodereview.appspot.com/10830181
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151013 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/chromeos/gdata/gdata_cache.h b/chrome/browser/chromeos/gdata/gdata_cache.h
index c9eb8d4..2c67f0e 100644
--- a/chrome/browser/chromeos/gdata/gdata_cache.h
+++ b/chrome/browser/chromeos/gdata/gdata_cache.h
@@ -272,6 +272,9 @@
// Utility method to call Initialize on UI thread.
void RequestInitializeOnUIThread();
+ // Utility method to call InitializeForTesting on UI thread.
+ void RequestInitializeOnUIThreadForTesting();
+
// Force a rescan of cache files, for testing.
void ForceRescanOnUIThreadForTesting();
@@ -329,6 +332,10 @@
// Initializes the cache.
void Initialize();
+ // Initializes the cache with in-memory cache for testing.
+ // The in-memory cache is used since it's faster than the db.
+ void InitializeForTesting();
+
// Deletes the cache.
void Destroy();