Bug 823023 - Tweak the comment at the top of prefs.js. r=glandium draft
authorNicholas Nethercote <nnethercote@mozilla.com>
Fri, 02 Feb 2018 12:07:08 +1100
changeset 750400 a5e8b5acaf13fdf815c5c75f7d1de49c0a6006c5
parent 750077 03a0fe367bb10467ec034af93e4b26e23fc1e54c
push id97638
push usernnethercote@mozilla.com
push dateFri, 02 Feb 2018 01:07:27 +0000
reviewersglandium
bugs823023
milestone60.0a1
Bug 823023 - Tweak the comment at the top of prefs.js. r=glandium Specifically: - Make the warning about editing in all-caps; - Make it clear that about:config is a browser thing; - Add a mention of the user.js file; - Use C++ comments, because I prefer them to C comments and I am the module owner :) MozReview-Commit-ID: 9GXS5nNHywO
modules/libpref/Preferences.cpp
--- a/modules/libpref/Preferences.cpp
+++ b/modules/libpref/Preferences.cpp
@@ -2339,33 +2339,34 @@ Preferences::HandleDirty()
 static nsresult
 openPrefFile(nsIFile* aFile);
 
 static const char kTelemetryPref[] = "toolkit.telemetry.enabled";
 static const char kChannelPref[] = "app.update.channel";
 
 // clang-format off
 static const char kPrefFileHeader[] =
-  "# Mozilla User Preferences"
+  "// Mozilla User Preferences"
   NS_LINEBREAK
   NS_LINEBREAK
-  "/* Do not edit this file."
+  "// DO NOT EDIT THIS FILE."
+  NS_LINEBREAK
+  "//"
   NS_LINEBREAK
-  " *"
+  "// If you make changes to this file while the application is running,"
   NS_LINEBREAK
-  " * If you make changes to this file while the application is running,"
+  "// the changes will be overwritten when the application exits."
   NS_LINEBREAK
-  " * the changes will be overwritten when the application exits."
+  "//"
   NS_LINEBREAK
-  " *"
+  "// To change a preference value, you can either: "
   NS_LINEBREAK
-  " * To make a manual change to preferences, you can visit the URL "
-  "about:config"
+  "// - Modify it via the UI (in the browser, this is via about:config); or"
   NS_LINEBREAK
-  " */"
+  "// - Set it within a user.js file in your profile."
   NS_LINEBREAK
   NS_LINEBREAK;
 // clang-format on
 
 // Note: if sShutdown is true, sPreferences will be nullptr.
 StaticRefPtr<Preferences> Preferences::sPreferences;
 bool Preferences::sShutdown = false;