Commit 9ca0bce7 authored by Andrew Grieve's avatar Andrew Grieve Committed by Commit Bot

Fix a few instances of missing "const".

Found via SuperSize query:
  size_info.symbols.WhereFullNameMatches(r'\bk[A-Z]').WhereInSection('d')

TBR=agrieve  # Trivial refactor

Bug: 747064
Change-Id: Ib9615718e0f6cacb081f9ea2f5295348d32cdcb8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1901641
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: default avatarBruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#713557}
parent 461ef75f
......@@ -87,7 +87,7 @@ const char kDefaultReferrerUrl[] =
// Provides ability to customize the referrer URL.
// When specifying a referrer through a field trial, it must contain a path.
// In case of default value above the path is empty, but it is specified.
base::FeatureParam<std::string> kArticleSuggestionsReferrerURLParam{
const base::FeatureParam<std::string> kArticleSuggestionsReferrerURLParam{
&kArticleSuggestionsFeature, "referrer_url", kDefaultReferrerUrl};
std::string GetContentSuggestionsReferrerURL() {
......
......@@ -88,24 +88,24 @@ const base::Feature kStickyBubble{"PasswordManagerStickyBubble",
base::FEATURE_DISABLED_BY_DEFAULT};
// Field trial identifier for password generation requirements.
const char* kGenerationRequirementsFieldTrial =
const char kGenerationRequirementsFieldTrial[] =
"PasswordGenerationRequirements";
// The file version number of password requirements files. If the prefix length
// changes, this version number needs to be updated.
// Default to 0 in order to get an empty requirements file.
const char* kGenerationRequirementsVersion = "version";
const char kGenerationRequirementsVersion[] = "version";
// Length of a hash prefix of domain names. This is used to shard domains
// across multiple files.
// Default to 0 in order to put all domain names into the same shard.
const char* kGenerationRequirementsPrefixLength = "prefix_length";
const char kGenerationRequirementsPrefixLength[] = "prefix_length";
// Timeout (in milliseconds) for password requirements lookups. As this is a
// network request in the background that does not block the UI, the impact of
// high values is not strong.
// Default to 5000 ms.
const char* kGenerationRequirementsTimeout = "timeout";
const char kGenerationRequirementsTimeout[] = "timeout";
} // namespace features
......
......@@ -42,10 +42,10 @@ extern const base::Feature kStickyBubble;
// --force-fieldtrials=PasswordGenerationRequirements/Enabled
// --force-fieldtrial-params=PasswordGenerationRequirements.Enabled:\
// version/0/prefix_length/0/timeout/5000
extern const char* kGenerationRequirementsFieldTrial;
extern const char* kGenerationRequirementsVersion;
extern const char* kGenerationRequirementsPrefixLength;
extern const char* kGenerationRequirementsTimeout;
extern const char kGenerationRequirementsFieldTrial[];
extern const char kGenerationRequirementsVersion[];
extern const char kGenerationRequirementsPrefixLength[];
extern const char kGenerationRequirementsTimeout[];
} // namespace features
......
......@@ -33,7 +33,7 @@ const int kSocketPumpBufferSize = 16 * 1024;
const int kMinTetheringPort = 1024;
const int kMaxTetheringPort = 65535;
net::NetworkTrafficAnnotationTag kTrafficAnnotation =
const net::NetworkTrafficAnnotationTag kTrafficAnnotation =
net::DefineNetworkTrafficAnnotation("tethering_handler_socket", R"(
semantics {
sender: "Tethering Handler"
......
......@@ -22,7 +22,7 @@
namespace {
net::NetworkTrafficAnnotationTag kTrafficAnnotation =
const net::NetworkTrafficAnnotationTag kTrafficAnnotation =
net::DefineNetworkTrafficAnnotation("socket_bio_adapter", R"(
semantics {
sender: "Socket BIO Adapter"
......
......@@ -105,7 +105,7 @@ constexpr int kMinWidthForOverlayPlayButton = 72;
constexpr int kMinScrubbingMessageWidth = 300;
const char* kStateCSSClasses[8] = {
const char* const kStateCSSClasses[8] = {
"state-no-source", // kNoSource
"state-no-metadata", // kNotLoaded
"state-loading-metadata-paused", // kLoadingMetadataPaused
......
......@@ -87,9 +87,9 @@ void WriteIndent(int depth, StringBuilder* output) {
} // anonymous namespace
const char* kJSONNullString = "null";
const char* kJSONTrueString = "true";
const char* kJSONFalseString = "false";
const char kJSONNullString[] = "null";
const char kJSONTrueString[] = "true";
const char kJSONFalseString[] = "false";
void EscapeStringForJSON(const String& str, StringBuilder* dst) {
for (unsigned i = 0; i < str.length(); ++i) {
......
......@@ -265,9 +265,9 @@ class PLATFORM_EXPORT JSONArray : public JSONValue {
Vector<std::unique_ptr<JSONValue>> data_;
};
extern const char* kJSONNullString;
extern const char* kJSONTrueString;
extern const char* kJSONFalseString;
extern const char kJSONNullString[];
extern const char kJSONTrueString[];
extern const char kJSONFalseString[];
PLATFORM_EXPORT void EscapeStringForJSON(const String&, StringBuilder*);
void DoubleQuoteStringForJSON(const String&, StringBuilder*);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment