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

Unified Diff: content/public/browser/web_ui_data_source.h

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
« no previous file with comments | « content/browser/webui/web_ui_data_source_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/web_ui_data_source.h
diff --git a/content/public/browser/web_ui_data_source.h b/content/public/browser/web_ui_data_source.h
index 04ddab5104a6efb816c348cbbcb0041d4ae3c2b7..5c278c5069feef7d60c6a1d02d061f78350f76c1 100644
--- a/content/public/browser/web_ui_data_source.h
+++ b/content/public/browser/web_ui_data_source.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_PUBLIC_BROWSER_WEB_UI_DATA_SOURCE_H_
#define CONTENT_PUBLIC_BROWSER_WEB_UI_DATA_SOURCE_H_
+#include <stdint.h>
+
#include "base/callback.h"
#include "base/strings/string16.h"
#include "content/common/content_export.h"
@@ -47,6 +49,11 @@ class WebUIDataSource {
// Adds a boolean keyed to its name to our dictionary.
virtual void AddBoolean(const std::string& name, bool value) = 0;
+ // Adds a signed 32-bit integer keyed to its name to our dictionary. Larger
+ // integers may not be exactly representable in JavaScript. See
+ // MAX_SAFE_INTEGER in /v8/src/globals.h.
+ virtual void AddInteger(const std::string& name, int32_t value) = 0;
+
// Sets the path which will return the JSON strings.
virtual void SetJsonPath(const std::string& path) = 0;
« no previous file with comments | « content/browser/webui/web_ui_data_source_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698