diff options
Diffstat (limited to 'chrome/browser/pref_member.h')
-rw-r--r-- | chrome/browser/pref_member.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/browser/pref_member.h b/chrome/browser/pref_member.h index 0c95c2f..2de76ab 100644 --- a/chrome/browser/pref_member.h +++ b/chrome/browser/pref_member.h @@ -120,6 +120,13 @@ class PrefMember : public subtle::PrefMemberBase { setting_value_ = false; } + // Set the value of the member variable if it is not managed. + void SetValueIfNotManaged(const ValueType& value) { + if (!IsManaged()) { + SetValue(value); + } + } + protected: // This methods is used to do the actual sync with pref of the specified type. virtual void UpdatePref(const ValueType& value) = 0; |