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
--- 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;