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

Unified Diff: base/values.h

Issue 7661009: base: Add Is* functions to Value class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tony review Created 9 years, 4 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 | « base/json/json_reader_unittest.cc ('k') | base/values.cc » ('j') | no next file with comments »
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 a30791bc6357c671f56c02c0c39e61027c11aabb..d02563ff9462a6f69ad202a9804f993efd9ce550 100644
--- a/base/values.h
+++ b/base/values.h
@@ -84,8 +84,14 @@ class BASE_EXPORT Value {
// its type after construction.
Type GetType() const { return type_; }
- // Returns true if the current object represents a given type.
- bool IsType(Type type) const { return type == type_; }
+ bool IsNull() const;
+ bool IsBoolean() const;
+ bool IsInteger() const;
+ bool IsDouble() const;
+ bool IsString() const;
+ bool IsBinary() const;
+ bool IsDictionary() const;
+ bool IsList() const;
// These methods allow the convenient retrieval of settings.
// If the current setting object can be converted into the given type,
« no previous file with comments | « base/json/json_reader_unittest.cc ('k') | base/values.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698