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

Unified Diff: content/browser/webui/web_ui_data_source_impl.h

Issue 1690773003: [Template expressions] expanding $i18n expressions on webui html (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed extra space in comment Created 4 years, 10 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: content/browser/webui/web_ui_data_source_impl.h
diff --git a/content/browser/webui/web_ui_data_source_impl.h b/content/browser/webui/web_ui_data_source_impl.h
index b084ba54ea3121db0b4cd110fbe6ab28d0176082..e14f99dc0ddddf95590b8cafb2f66e6203020752 100644
--- a/content/browser/webui/web_ui_data_source_impl.h
+++ b/content/browser/webui/web_ui_data_source_impl.h
@@ -17,6 +17,7 @@
#include "content/common/content_export.h"
#include "content/public/browser/url_data_source.h"
#include "content/public/browser/web_ui_data_source.h"
+#include "ui/base/template_expressions.h"
namespace content {
@@ -51,10 +52,6 @@ class CONTENT_EXPORT WebUIDataSourceImpl
void SendLocalizedStringsAsJSON(
const URLDataSource::GotDataCallback& callback);
- // Completes a request by sending the file specified by |idr|.
- void SendFromResourceBundle(
- const URLDataSource::GotDataCallback& callback, int idr);
-
private:
class InternalDataSource;
friend class InternalDataSource;
@@ -84,6 +81,10 @@ class CONTENT_EXPORT WebUIDataSourceImpl
int default_resource_;
std::string json_path_;
std::map<std::string, int> path_to_idr_map_;
+ // The |replacements_| is intended to replace |localized_strings_|.
+ // TODO(dschuyler) phase out |localized_strings_| in Q1 2016. (Or rename
+ // to |load_time_flags_| if the usage is reduced to storing flags only).
+ ui::TemplateReplacements replacements_;
base::DictionaryValue localized_strings_;
WebUIDataSource::HandleRequestCallback filter_callback_;
bool add_csp_;
@@ -98,6 +99,6 @@ class CONTENT_EXPORT WebUIDataSourceImpl
DISALLOW_COPY_AND_ASSIGN(WebUIDataSourceImpl);
};
-} // content
+} // namespace content
#endif // CONTENT_BROWSER_WEBUI_WEB_UI_DATA_SOURCE_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698