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

Unified Diff: chrome/common/extensions/docs/server2/branch_utility.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/branch_utility.py
diff --git a/chrome/common/extensions/docs/server2/branch_utility.py b/chrome/common/extensions/docs/server2/branch_utility.py
index 4f4911388008333cccb89fa32d40e985ff4bc83f..ab3dce2afaea885dd86bc685a0b4f3bc0a11973f 100644
--- a/chrome/common/extensions/docs/server2/branch_utility.py
+++ b/chrome/common/extensions/docs/server2/branch_utility.py
@@ -18,13 +18,10 @@ class ChannelInfo(object):
class BranchUtility(object):
def __init__(self, fetch_url, history_url, fetcher, object_store_creator):
self._fetcher = fetcher
- # BranchUtility is obviously cross-channel, so set the channel to None.
- self._branch_object_store = object_store_creator.Create(BranchUtility,
- category='branch',
- channel=None)
- self._version_object_store = object_store_creator.Create(BranchUtility,
- category='version',
- channel=None)
+ def create_object_store(category):
+ return object_store_creator.Create(BranchUtility, category=category)
+ self._branch_object_store = create_object_store('branch')
+ self._version_object_store = create_object_store('version')
self._fetch_result = self._fetcher.FetchAsync(fetch_url)
self._history_result = self._fetcher.FetchAsync(history_url)

Powered by Google App Engine
This is Rietveld 408576698