Bug 1417806 - Rename kPrefSticky as kStickyPref. r=glandium draft
authorNicholas Nethercote <nnethercote@mozilla.com>
Thu, 16 Nov 2017 18:45:53 +1100
changeset 698940 20b5b8b8df8b936a22849766552d11f659ffc84b
parent 698939 3f27992630e6e834ce470693a15d8f6b99706cfe
child 698941 8164f71065bcae1376c3e2bf241593c62c90b702
push id89395
push usernnethercote@mozilla.com
push dateThu, 16 Nov 2017 08:14:02 +0000
reviewersglandium
bugs1417806
milestone59.0a1
Bug 1417806 - Rename kPrefSticky as kStickyPref. r=glandium This matches the corresponding string "sticky_pref". MozReview-Commit-ID: 8bqM5x8bIoG
modules/libpref/Preferences.cpp
--- a/modules/libpref/Preferences.cpp
+++ b/modules/libpref/Preferences.cpp
@@ -1099,17 +1099,17 @@ enum
 };
 
 #define UTF16_ESC_NUM_DIGITS 4
 #define HEX_ESC_NUM_DIGITS 2
 #define BITS_PER_HEX_DIGIT 4
 
 static const char kUserPref[] = "user_pref";
 static const char kPref[] = "pref";
-static const char kPrefSticky[] = "sticky_pref";
+static const char kStickyPref[] = "sticky_pref";
 static const char kTrue[] = "true";
 static const char kFalse[] = "false";
 
 // This function will increase the size of the buffer owned by the given pref
 // parse state. We currently use a simple doubling algorithm, but the only hard
 // requirement is that it increase the buffer by at least the size of the
 // aPS->mEscTmp buffer used for escape processing (currently 6 bytes).
 //
@@ -1259,17 +1259,17 @@ PREF_ParseBuf(PrefParseState* aPS, const
             state = PREF_PARSE_UNTIL_EOL;
             break;
           case 'u': // indicating user_pref
           case 's': // indicating sticky_pref
           case 'p': // indicating pref
             if (c == 'u') {
               aPS->mStrMatch = kUserPref;
             } else if (c == 's') {
-              aPS->mStrMatch = kPrefSticky;
+              aPS->mStrMatch = kStickyPref;
             } else {
               aPS->mStrMatch = kPref;
             }
             aPS->mStrIndex = 1;
             aPS->mNextState = PREF_PARSE_UNTIL_OPEN_PAREN;
             state = PREF_PARSE_MATCH_STRING;
             break;
             // else skip char
@@ -1308,18 +1308,18 @@ PREF_ParseBuf(PrefParseState* aPS, const
           *aPS->mLbCur++ = c;
         }
         break;
 
       // name parsing
       case PREF_PARSE_UNTIL_NAME:
         if (c == '\"' || c == '\'') {
           aPS->mIsDefault =
-            (aPS->mStrMatch == kPref || aPS->mStrMatch == kPrefSticky);
-          aPS->mIsStickyDefault = (aPS->mStrMatch == kPrefSticky);
+            (aPS->mStrMatch == kPref || aPS->mStrMatch == kStickyPref);
+          aPS->mIsStickyDefault = (aPS->mStrMatch == kStickyPref);
           aPS->mQuoteChar = c;
           aPS->mNextState = PREF_PARSE_UNTIL_COMMA; // return here when done
           state = PREF_PARSE_QUOTED_STRING;
         } else if (c == '/') {     // allow embedded comment
           aPS->mNextState = state; // return here when done with comment
           state = PREF_PARSE_COMMENT_MAYBE_START;
         } else if (!isspace(c)) {
           pref_ReportParseProblem(