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

Unified Diff: base/prefs/pref_service.cc

Issue 1096833003: Convert PrefSyncStatus into PrefRegistrationFlags (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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: base/prefs/pref_service.cc
diff --git a/base/prefs/pref_service.cc b/base/prefs/pref_service.cc
index 5afb5ea7c67496fcbc22148af7f77d51fd702ca9..bccea068fcb00fbca1ac5534bd5f72ecc9c7d919 100644
--- a/base/prefs/pref_service.cc
+++ b/base/prefs/pref_service.cc
@@ -316,6 +316,16 @@ const base::Value* PrefService::GetDefaultPrefValue(
return value;
}
+uint32 PrefService::GetRegistrationFlags(const std::string& path) const {
+ DCHECK(CalledOnValidThread());
+ const auto& it = pref_registry_->registration_flags().find(path);
+ if (it == pref_registry_->registration_flags().end()) {
Mattias Nissler (ping if slow) 2015/04/20 09:33:34 I'd prefer having this logic in PrefRegistry, and
raymes 2015/04/21 07:58:54 Sounds good but the function isn't used at all for
+ NOTREACHED() << "Registration flags missing for pref: " << path;
+ return PrefRegistry::NO_REGISTRATION_FLAGS;
+ }
+ return it->second;
+}
+
const base::ListValue* PrefService::GetList(const std::string& path) const {
DCHECK(CalledOnValidThread());

Powered by Google App Engine
This is Rietveld 408576698