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

Unified Diff: chrome/browser/prefs/pref_member.h

Issue 6773006: Add enableReferrers and enableHyperlinkAuditing to contentSettings.misc API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 9 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
« no previous file with comments | « chrome/browser/prefs/command_line_pref_store.cc ('k') | chrome/browser/prefs/pref_member.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/pref_member.h
diff --git a/chrome/browser/prefs/pref_member.h b/chrome/browser/prefs/pref_member.h
index 88a00711f4e91286a64d7f6130191160c873d0e8..5e58a399f257cb7236a65fd52c757b753d5ff9e8 100644
--- a/chrome/browser/prefs/pref_member.h
+++ b/chrome/browser/prefs/pref_member.h
@@ -96,7 +96,9 @@ class PrefMemberBase : public NotificationObserver {
const NotificationSource& source,
const NotificationDetails& details);
- void VerifyValuePrefName() const;
+ void VerifyValuePrefName() const {
+ DCHECK(!pref_name_.empty());
+ }
// This method is used to do the actual sync with the preference.
// Note: it is logically const, because it doesn't modify the state
@@ -105,11 +107,7 @@ class PrefMemberBase : public NotificationObserver {
// Verifies the preference name, and lazily loads the preference value if
// it hasn't been loaded yet.
- void VerifyPref() const {
- VerifyValuePrefName();
- if (!internal())
- UpdateValueFromPref();
- }
+ void VerifyPref() const;
const std::string& pref_name() const { return pref_name_; }
PrefService* prefs() { return prefs_; }
« no previous file with comments | « chrome/browser/prefs/command_line_pref_store.cc ('k') | chrome/browser/prefs/pref_member.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698