Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(259)

Unified Diff: content/child/appcache/web_application_cache_host_impl.cc

Issue 1875913002: Cleanup: Convert const char* kFoo to const char kFoo[]. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/child/appcache/web_application_cache_host_impl.cc
diff --git a/content/child/appcache/web_application_cache_host_impl.cc b/content/child/appcache/web_application_cache_host_impl.cc
index 9b96260977ac090c8bbd24e317bfd6f6918882f1..3442fc0b78dfc40349ac408c479b3cfae077c697 100644
--- a/content/child/appcache/web_application_cache_host_impl.cc
+++ b/content/child/appcache/web_application_cache_host_impl.cc
@@ -29,7 +29,7 @@ namespace {
// Note: the order of the elements in this array must match those
// of the EventID enum in appcache_interfaces.h.
-const char* kEventNames[] = {
+const char* const kEventNames[] = {
"Checking", "Error", "NoUpdate", "Downloading", "Progress",
"UpdateReady", "Cached", "Obsolete"
};
@@ -95,7 +95,7 @@ void WebApplicationCacheHostImpl::OnEventRaised(
// Emit logging output prior to calling out to script as we can get
// deleted within the script event handler.
- const char* kFormatString = "Application Cache %s event";
+ const char kFormatString[] = "Application Cache %s event";
std::string message = base::StringPrintf(kFormatString,
kEventNames[event_id]);
OnLogMessage(APPCACHE_LOG_INFO, message);
@@ -129,7 +129,7 @@ void WebApplicationCacheHostImpl::OnProgressEventRaised(
const GURL& url, int num_total, int num_complete) {
// Emit logging output prior to calling out to script as we can get
// deleted within the script event handler.
- const char* kFormatString = "Application Cache Progress event (%d of %d) %s";
+ const char kFormatString[] = "Application Cache Progress event (%d of %d) %s";
std::string message = base::StringPrintf(kFormatString, num_complete,
num_total, url.spec().c_str());
OnLogMessage(APPCACHE_LOG_INFO, message);
@@ -141,7 +141,7 @@ void WebApplicationCacheHostImpl::OnErrorEventRaised(
const AppCacheErrorDetails& details) {
// Emit logging output prior to calling out to script as we can get
// deleted within the script event handler.
- const char* kFormatString = "Application Cache Error event: %s";
+ const char kFormatString[] = "Application Cache Error event: %s";
std::string full_message =
base::StringPrintf(kFormatString, details.message.c_str());
OnLogMessage(APPCACHE_LOG_ERROR, full_message);
« no previous file with comments | « content/browser/zygote_host/zygote_communication_linux.cc ('k') | content/common/gpu/media/vaapi_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698