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

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

Issue 14856006: Docserver: achieve online vs offline (cron vs instance) behaviour at the object (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 8 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 633c5f3a6df26ef1bd3c406f93adc4dca8da4c9b..aa460c24822838e71506519b0ec14b5b3d2cab52 100644
--- a/chrome/common/extensions/docs/server2/branch_utility.py
+++ b/chrome/common/extensions/docs/server2/branch_utility.py
@@ -7,16 +7,13 @@ import logging
import operator
from appengine_wrappers import GetAppVersion
-from object_store_creator import ObjectStoreCreator
class BranchUtility(object):
- def __init__(self, fetch_url, fetcher, object_store=None):
+ def __init__(self, fetch_url, fetcher, object_store_creator_factory):
self._fetch_url = fetch_url
self._fetcher = fetcher
- if object_store is None:
- object_store = (ObjectStoreCreator.SharedFactory(GetAppVersion())
- .Create(BranchUtility).Create())
- self._object_store = object_store
+ self._object_store = (object_store_creator_factory.Create(BranchUtility)
+ .Create())
@staticmethod
def GetAllBranchNames():

Powered by Google App Engine
This is Rietveld 408576698