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

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: 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 | « chrome/browser/printing/print_dialog_cloud.cc ('k') | chrome/browser/themes/browser_theme_pack_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 23cb8642e3d6ab264d1e91212938b641d3572a16..5311fed5e4b9f3a3d4c3d1ba7686c2f379f9595d 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);
« no previous file with comments | « chrome/browser/printing/print_dialog_cloud.cc ('k') | chrome/browser/themes/browser_theme_pack_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698