summaryrefslogtreecommitdiffstats
path: root/extensions/common
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2015-12-16 19:09:33 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-17 03:10:46 +0000
commit53c883cd322c07f257aa8557549e91598e62fc3f (patch)
treee0ca945f8a0c8ff2614f8320ae9f92a58a152b28 /extensions/common
parentf5406c826d16602ce699bdf7f7da5cc5461be7f0 (diff)
downloadchromium_src-53c883cd322c07f257aa8557549e91598e62fc3f.zip
chromium_src-53c883cd322c07f257aa8557549e91598e62fc3f.tar.gz
chromium_src-53c883cd322c07f257aa8557549e91598e62fc3f.tar.bz2
Cleanup: Convert const char* kFoo to const char kFoo[].
Or change them to const char* const kFoo. TBR=cpu@chromium.org Review URL: https://codereview.chromium.org/924793003 Cr-Commit-Position: refs/heads/master@{#365692}
Diffstat (limited to 'extensions/common')
-rw-r--r--extensions/common/features/behavior_feature.cc8
-rw-r--r--extensions/common/features/behavior_feature.h8
-rw-r--r--extensions/common/message_bundle.cc31
-rw-r--r--extensions/common/message_bundle.h30
4 files changed, 38 insertions, 39 deletions
diff --git a/extensions/common/features/behavior_feature.cc b/extensions/common/features/behavior_feature.cc
index 25dddbc..b43dc2e 100644
--- a/extensions/common/features/behavior_feature.cc
+++ b/extensions/common/features/behavior_feature.cc
@@ -6,13 +6,13 @@
namespace extensions {
-const char* const BehaviorFeature::kServiceWorker = "service_worker";
+const char BehaviorFeature::kServiceWorker[] = "service_worker";
-const char* const BehaviorFeature::kWhitelistedForIncognito =
+const char BehaviorFeature::kWhitelistedForIncognito[] =
"whitelisted_for_incognito";
-const char* const BehaviorFeature::kDoNotSync = "do_not_sync";
+const char BehaviorFeature::kDoNotSync[] = "do_not_sync";
-const char* const BehaviorFeature::kZoomWithoutBubble = "zoom_without_bubble";
+const char BehaviorFeature::kZoomWithoutBubble[] = "zoom_without_bubble";
} // namespace extensions
diff --git a/extensions/common/features/behavior_feature.h b/extensions/common/features/behavior_feature.h
index cddbe8f..7e9a5f1 100644
--- a/extensions/common/features/behavior_feature.h
+++ b/extensions/common/features/behavior_feature.h
@@ -19,10 +19,10 @@ namespace extensions {
class BehaviorFeature : public SimpleFeature {
public:
// Constants corresponding to keys in _behavior_features.json.
- static const char* const kServiceWorker;
- static const char* const kWhitelistedForIncognito;
- static const char* const kDoNotSync;
- static const char* const kZoomWithoutBubble;
+ static const char kServiceWorker[];
+ static const char kWhitelistedForIncognito[];
+ static const char kDoNotSync[];
+ static const char kZoomWithoutBubble[];
};
} // namespace extensions
diff --git a/extensions/common/message_bundle.cc b/extensions/common/message_bundle.cc
index 2c387e1..ef78a0a 100644
--- a/extensions/common/message_bundle.cc
+++ b/extensions/common/message_bundle.cc
@@ -25,27 +25,26 @@ namespace extensions {
namespace errors = manifest_errors;
-const char* MessageBundle::kContentKey = "content";
-const char* MessageBundle::kMessageKey = "message";
-const char* MessageBundle::kPlaceholdersKey = "placeholders";
+const char MessageBundle::kContentKey[] = "content";
+const char MessageBundle::kMessageKey[] = "message";
+const char MessageBundle::kPlaceholdersKey[] = "placeholders";
-const char* MessageBundle::kPlaceholderBegin = "$";
-const char* MessageBundle::kPlaceholderEnd = "$";
-const char* MessageBundle::kMessageBegin = "__MSG_";
-const char* MessageBundle::kMessageEnd = "__";
+const char MessageBundle::kPlaceholderBegin[] = "$";
+const char MessageBundle::kPlaceholderEnd[] = "$";
+const char MessageBundle::kMessageBegin[] = "__MSG_";
+const char MessageBundle::kMessageEnd[] = "__";
// Reserved messages names.
-const char* MessageBundle::kUILocaleKey = "@@ui_locale";
-const char* MessageBundle::kBidiDirectionKey = "@@bidi_dir";
-const char* MessageBundle::kBidiReversedDirectionKey =
- "@@bidi_reversed_dir";
-const char* MessageBundle::kBidiStartEdgeKey = "@@bidi_start_edge";
-const char* MessageBundle::kBidiEndEdgeKey = "@@bidi_end_edge";
-const char* MessageBundle::kExtensionIdKey = "@@extension_id";
+const char MessageBundle::kUILocaleKey[] = "@@ui_locale";
+const char MessageBundle::kBidiDirectionKey[] = "@@bidi_dir";
+const char MessageBundle::kBidiReversedDirectionKey[] = "@@bidi_reversed_dir";
+const char MessageBundle::kBidiStartEdgeKey[] = "@@bidi_start_edge";
+const char MessageBundle::kBidiEndEdgeKey[] = "@@bidi_end_edge";
+const char MessageBundle::kExtensionIdKey[] = "@@extension_id";
// Reserved messages values.
-const char* MessageBundle::kBidiLeftEdgeValue = "left";
-const char* MessageBundle::kBidiRightEdgeValue = "right";
+const char MessageBundle::kBidiLeftEdgeValue[] = "left";
+const char MessageBundle::kBidiRightEdgeValue[] = "right";
// Formats message in case we encounter a bad formed key in the JSON object.
// Returns false and sets |error| to actual error message.
diff --git a/extensions/common/message_bundle.h b/extensions/common/message_bundle.h
index 42e8625..26e9927 100644
--- a/extensions/common/message_bundle.h
+++ b/extensions/common/message_bundle.h
@@ -26,34 +26,34 @@ class MessageBundle {
typedef std::vector<linked_ptr<base::DictionaryValue> > CatalogVector;
// JSON keys of interest for messages file.
- static const char* kContentKey;
- static const char* kMessageKey;
- static const char* kPlaceholdersKey;
+ static const char kContentKey[];
+ static const char kMessageKey[];
+ static const char kPlaceholdersKey[];
// Begin/end markers for placeholders and messages
- static const char* kPlaceholderBegin;
- static const char* kPlaceholderEnd;
- static const char* kMessageBegin;
- static const char* kMessageEnd;
+ static const char kPlaceholderBegin[];
+ static const char kPlaceholderEnd[];
+ static const char kMessageBegin[];
+ static const char kMessageEnd[];
// Reserved message names in the dictionary.
// Update i18n documentation when adding new reserved value.
- static const char* kUILocaleKey;
+ static const char kUILocaleKey[];
// See http://code.google.com/apis/gadgets/docs/i18n.html#BIDI for
// description.
// TODO(cira): point to chrome docs once they are out.
- static const char* kBidiDirectionKey;
- static const char* kBidiReversedDirectionKey;
- static const char* kBidiStartEdgeKey;
- static const char* kBidiEndEdgeKey;
+ static const char kBidiDirectionKey[];
+ static const char kBidiReversedDirectionKey[];
+ static const char kBidiStartEdgeKey[];
+ static const char kBidiEndEdgeKey[];
// Extension id gets added in the
// browser/renderer_host/resource_message_filter.cc to enable message
// replacement for non-localized extensions.
- static const char* kExtensionIdKey;
+ static const char kExtensionIdKey[];
// Values for some of the reserved messages.
- static const char* kBidiLeftEdgeValue;
- static const char* kBidiRightEdgeValue;
+ static const char kBidiLeftEdgeValue[];
+ static const char kBidiRightEdgeValue[];
// Creates MessageBundle or returns NULL if there was an error. Expects
// locale_catalogs to be sorted from more specific to less specific, with