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

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

Issue 2391073005: WebUIDataSource::AddInteger (like AddBoolean/AddString) (Closed)
Patch Set: DateTimeHandler usage of SetInteger Created 4 years, 2 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.cc
diff --git a/content/browser/webui/web_ui_data_source_impl.cc b/content/browser/webui/web_ui_data_source_impl.cc
index 5b258e359b3472cc3976cf05e2074a22a0f1f65c..f62ade45501f5228f9d59ce9ffd1a18ec3106e64 100644
--- a/content/browser/webui/web_ui_data_source_impl.cc
+++ b/content/browser/webui/web_ui_data_source_impl.cc
@@ -5,6 +5,7 @@
#include "content/browser/webui/web_ui_data_source_impl.h"
#include <stddef.h>
+#include <stdint.h>
#include <string>
@@ -141,6 +142,10 @@ void WebUIDataSourceImpl::AddBoolean(const std::string& name, bool value) {
// replacements.
}
+void WebUIDataSourceImpl::AddInteger(const std::string& name, int32_t value) {
+ localized_strings_.SetInteger(name, value);
+}
+
void WebUIDataSourceImpl::SetJsonPath(const std::string& path) {
json_path_ = path;
}
« no previous file with comments | « content/browser/webui/web_ui_data_source_impl.h ('k') | content/browser/webui/web_ui_data_source_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698