Bug 1416638 - Use `private` instead of `protected` in Preferences. r=glandium.
authorNicholas Nethercote <nnethercote@mozilla.com>
Tue, 14 Nov 2017 19:06:02 +1100
changeset 436510 cfa9ac92acf5ccc803f0614db7e567b2c73fd4fe
parent 436509 b163b82f0875aa0ac7428a18e8fb31cbfd0e55bd
child 436511 46af1340907eb154c9dd63bb13b1d250b48ca1bb
push id117
push userfmarier@mozilla.com
push dateTue, 28 Nov 2017 20:17:16 +0000
reviewersglandium
bugs1416638
milestone59.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);