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

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

Issue 68873003: Docserver: Serve docs out of src/ not src/chrome/common/extensions. This allows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix samples 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 3d7e513909d5246f6c178ac9d6ac2f424ff157db..11d68991dbea23fff4129cbdad5b21591b607977 100644
--- a/chrome/common/extensions/docs/server2/strings_data_source.py
+++ b/chrome/common/extensions/docs/server2/strings_data_source.py
@@ -2,8 +2,10 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+from extensions_paths import JSON_TEMPLATES
from data_source import DataSource
+
class StringsDataSource(DataSource):
'''Provides templates with access to a key to string mapping defined in a
JSON configuration file.
@@ -11,10 +13,9 @@ class StringsDataSource(DataSource):
def __init__(self, server_instance, _):
self._cache = server_instance.compiled_fs_factory.ForJson(
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)
+ return self._cache.GetFromFile('%s/strings.json' % JSON_TEMPLATES)
def Cron(self):
return self._GetStringsData()

Powered by Google App Engine
This is Rietveld 408576698