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

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: better redirects Created 7 years, 7 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 98c1924345760e8108d1ee10ea6aa816cc25a2cc..d6df6a3f86e34cd11515e8331b77678e903733c0 100644
--- a/chrome/common/extensions/docs/server2/caching_rietveld_patcher.py
+++ b/chrome/common/extensions/docs/server2/caching_rietveld_patcher.py
@@ -66,12 +66,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):
@@ -123,3 +124,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