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

Unified Diff: chrome/browser/sync/syncable/model_type.cc

Issue 7661009: base: Add Is* functions to Value class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix nat_policy.cc 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
Index: chrome/browser/sync/syncable/model_type.cc
diff --git a/chrome/browser/sync/syncable/model_type.cc b/chrome/browser/sync/syncable/model_type.cc
index 460985a3f5eaf46a000ac8f4e411660aa9dab66c..eef16abb9e5b5a7d95c9d9ced3c70ad21073704c 100644
--- a/chrome/browser/sync/syncable/model_type.cc
+++ b/chrome/browser/sync/syncable/model_type.cc
@@ -256,11 +256,11 @@ std::string ModelTypeSetToString(const ModelTypeSet& model_types) {
}
ModelType ModelTypeFromValue(const Value& value) {
- if (value.IsType(Value::TYPE_STRING)) {
+ if (value.IsString()) {
std::string result;
CHECK(value.GetAsString(&result));
return ModelTypeFromString(result);
- } else if (value.IsType(Value::TYPE_INTEGER)) {
+ } else if (value.IsInteger()) {
int result;
CHECK(value.GetAsInteger(&result));
return ModelTypeFromInt(result);

Powered by Google App Engine
This is Rietveld 408576698