Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Unified Diff: chrome/browser/chromeos/gdata/gdata_cache.h

Issue 10830181: Implement initialization for GDataCache to use in-memory metadata for tests. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/gdata/gdata_cache.h
diff --git a/chrome/browser/chromeos/gdata/gdata_cache.h b/chrome/browser/chromeos/gdata/gdata_cache.h
index c9eb8d449ae7550f6c7c71d32de2868a053ba45a..f70e5a6514be07c6c3a9ee8eba0d85ae70c259df 100644
--- a/chrome/browser/chromeos/gdata/gdata_cache.h
+++ b/chrome/browser/chromeos/gdata/gdata_cache.h
@@ -317,6 +317,11 @@ class GDataCache {
static CacheSubDirectoryType GetSubDirectoryType(
const GDataCacheEntry& cache_entry);
+ // Force std::map implementaition for metadata.
achuithb 2012/08/06 23:22:20 spelling - implementation. You could also add a p
satorux1 2012/08/07 10:50:08 Yes, Ordering is nasty. Maybe we should add Reques
Haruki Sato 2012/08/08 05:00:42 Thank you for the advice! Removed the flag and add
+ // Must be called before Initialization.
+ // Used for testing.
+ void ForceMetadataMapForTesting();
+
private:
GDataCache(const FilePath& cache_root_path,
base::SequencedTaskRunner* blocking_task_runner);
@@ -446,6 +451,10 @@ class GDataCache {
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<GDataCache> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(GDataCache);
+
+ // Set to true when std::map cache implementation is desired.
+ // Used by tests.
+ bool force_metadata_map_for_testing_;
};
« no previous file with comments | « no previous file | chrome/browser/chromeos/gdata/gdata_cache.cc » ('j') | chrome/browser/chromeos/gdata/gdata_cache_metadata.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698