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

Unified Diff: base/values.h

Issue 2151793002: Add base::Value::GetTypeName(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments, fix build Created 4 years, 5 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 | « no previous file | base/values.cc » ('j') | base/values.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/values.h
diff --git a/base/values.h b/base/values.h
index e3d60891b33ecaa91055e2b774cce15fb1e97f99..0371b8e3db5a3f77a1e0269560fb67486528c1f7 100644
--- a/base/values.h
+++ b/base/values.h
@@ -65,6 +65,9 @@ class BASE_EXPORT Value {
static std::unique_ptr<Value> CreateNullValue();
+ // Returns the name for a given |type|.
+ static const char* GetTypeName(Type type);
+
// Returns the type of the value stored by the current Value object.
// Each type will be implemented by only one subclass of Value, so it's
// safe to use the Type to determine whether you can cast from
« no previous file with comments | « no previous file | base/values.cc » ('j') | base/values.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698