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

Unified Diff: components/prefs/pref_service.cc

Issue 2539363004: Make base::Value::TYPE a scoped enum. (Closed)
Patch Set: Rebase Created 4 years 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 | « components/prefs/pref_service.h ('k') | components/prefs/pref_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/prefs/pref_service.cc
diff --git a/components/prefs/pref_service.cc b/components/prefs/pref_service.cc
index e909d58be7ece21396f3af7c518eb7ddcb35456c..d0274b17c8cd32cb16f3e7448047adb6e1f82b0a 100644
--- a/components/prefs/pref_service.cc
+++ b/components/prefs/pref_service.cc
@@ -288,7 +288,7 @@ const base::DictionaryValue* PrefService::GetDictionary(
NOTREACHED() << "Trying to read an unregistered pref: " << path;
return NULL;
}
- if (value->GetType() != base::Value::TYPE_DICTIONARY) {
+ if (value->GetType() != base::Value::Type::DICTIONARY) {
NOTREACHED();
return NULL;
}
@@ -345,7 +345,7 @@ const base::ListValue* PrefService::GetList(const std::string& path) const {
NOTREACHED() << "Trying to read an unregistered pref: " << path;
return NULL;
}
- if (value->GetType() != base::Value::TYPE_LIST) {
+ if (value->GetType() != base::Value::Type::LIST) {
NOTREACHED();
return NULL;
}
@@ -453,7 +453,8 @@ uint64_t PrefService::GetUint64(const std::string& path) const {
base::Value* PrefService::GetMutableUserPref(const std::string& path,
base::Value::Type type) {
- CHECK(type == base::Value::TYPE_DICTIONARY || type == base::Value::TYPE_LIST);
+ CHECK(type == base::Value::Type::DICTIONARY ||
+ type == base::Value::Type::LIST);
DCHECK(CalledOnValidThread());
const Preference* pref = FindPreference(path);
@@ -471,9 +472,9 @@ base::Value* PrefService::GetMutableUserPref(const std::string& path,
base::Value* value = NULL;
if (!user_pref_store_->GetMutableValue(path, &value) ||
!value->IsType(type)) {
- if (type == base::Value::TYPE_DICTIONARY) {
+ if (type == base::Value::Type::DICTIONARY) {
value = new base::DictionaryValue;
- } else if (type == base::Value::TYPE_LIST) {
+ } else if (type == base::Value::Type::LIST) {
value = new base::ListValue;
} else {
NOTREACHED();
« no previous file with comments | « components/prefs/pref_service.h ('k') | components/prefs/pref_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698