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

Unified Diff: chrome/common/extensions/docs/server2/caching_rietveld_patcher.py

Issue 15087006: Docserver: there is only one. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: epic rebase Created 7 years, 5 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/common/extensions/docs/server2/caching_rietveld_patcher.py
diff --git a/chrome/common/extensions/docs/server2/caching_rietveld_patcher.py b/chrome/common/extensions/docs/server2/caching_rietveld_patcher.py
index dd49482da2a9cb8d37a3269ddb36b6ddc192088a..2c33b33e2ff39c04646272ab56efca732c319e88 100644
--- a/chrome/common/extensions/docs/server2/caching_rietveld_patcher.py
+++ b/chrome/common/extensions/docs/server2/caching_rietveld_patcher.py
@@ -67,12 +67,13 @@ class CachingRietveldPatcher(Patcher):
object_store_creator,
test_datetime=datetime):
self._patcher = rietveld_patcher
- self._version_object_store = object_store_creator.Create(
- CachingRietveldPatcher, category='version')
- self._list_object_store = object_store_creator.Create(
- CachingRietveldPatcher, category='list')
- self._file_object_store = object_store_creator.Create(
- CachingRietveldPatcher, category='file')
+ def create_object_store(category):
+ return object_store_creator.Create(
+ CachingRietveldPatcher,
+ category='%s/%s' % (rietveld_patcher.GetIdentity(), category))
+ self._version_object_store = create_object_store('version')
+ self._list_object_store = create_object_store('list')
+ self._file_object_store = create_object_store('file')
self._datetime = test_datetime
def GetVersion(self):
@@ -124,3 +125,6 @@ class CachingRietveldPatcher(Patcher):
True,
version),
self._file_object_store)
+
+ def GetIdentity(self):
+ return self._patcher.GetIdentity()

Powered by Google App Engine
This is Rietveld 408576698