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

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

Issue 63203002: Docserver: Make the hand-written Cron methods run first rather than last, since (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: jeffrey Created 7 years, 1 month 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/strings_data_source.py
diff --git a/chrome/common/extensions/docs/server2/strings_data_source.py b/chrome/common/extensions/docs/server2/strings_data_source.py
index d182addc132092fc37b8efa48a78cd45f867a2f3..3d7e513909d5246f6c178ac9d6ac2f424ff157db 100644
--- a/chrome/common/extensions/docs/server2/strings_data_source.py
+++ b/chrome/common/extensions/docs/server2/strings_data_source.py
@@ -13,8 +13,11 @@ class StringsDataSource(DataSource):
server_instance.host_file_system_provider.GetTrunk())
self._strings_json_path = server_instance.strings_json_path
+ def _GetStringsData(self):
+ return self._cache.GetFromFile(self._strings_json_path)
+
def Cron(self):
- self._cache.GetFromFile(self._strings_json_path).Get()
+ return self._GetStringsData()
def get(self, key):
- return self._cache.GetFromFile(self._strings_json_path).Get()[key]
+ return self._GetStringsData().Get().get(key)

Powered by Google App Engine
This is Rietveld 408576698