Bug 1416638 - Use `private` instead of `protected` in Preferences. r=glandium. draft
authorNicholas Nethercote <nnethercote@mozilla.com>
Tue, 14 Nov 2017 19:06:02 +1100
changeset 697567 a7b76d4f8bc9b28016db7660e46591f38eb770da
parent 697566 82fdd10073c1bcc700be7f3d5748917d0622f718
child 697568 0c0b4b728fb3201cea8fb80ad461f2d1dca69099
push id89043
push usernnethercote@mozilla.com
push dateTue, 14 Nov 2017 08:06:49 +0000
reviewersglandium
bugs1416638
milestone58.0a1
Bug 1416638 - Use `private` instead of `protected` in Preferences. r=glandium. It's a `final` class, so there's no need for `protected`. MozReview-Commit-ID: 7n4DLpXo0el
modules/libpref/Preferences.h
--- a/modules/libpref/Preferences.h
+++ b/modules/libpref/Preferences.h
@@ -318,17 +318,17 @@ public:
 
   // Explicitly choosing synchronous or asynchronous (if allowed) preferences
   // file write. Only for the default file.  The guarantee for the "blocking"
   // is that when it returns, the file on disk reflect the current state of
   // preferences.
   nsresult SavePrefFileBlocking();
   nsresult SavePrefFileAsynchronous();
 
-protected:
+private:
   virtual ~Preferences();
 
   nsresult NotifyServiceObservers(const char* aSubject);
 
   // Loads the prefs.js file from the profile, or creates a new one. Returns
   // the prefs file if successful, or nullptr on failure.
   already_AddRefed<nsIFile> ReadSavedPrefs();
 
@@ -356,17 +356,17 @@ protected:
 public:
   // Public so the ValueObserver classes can use it.
   enum MatchKind
   {
     PrefixMatch,
     ExactMatch,
   };
 
-protected:
+private:
   static nsresult RegisterCallback(PrefChangedFunc aCallback,
                                    const char* aPref,
                                    void* aClosure,
                                    MatchKind aMatchKind);
   static nsresult UnregisterCallback(PrefChangedFunc aCallback,
                                      const char* aPref,
                                      void* aClosure,
                                      MatchKind aMatchKind);