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

Unified Diff: chrome/browser/extensions/activity_log/counting_policy.cc

Issue 635573005: Cleanup: Better constify some strings in chrome/browser/{chromeos,extensions}. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, nit Created 6 years, 2 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: chrome/browser/extensions/activity_log/counting_policy.cc
diff --git a/chrome/browser/extensions/activity_log/counting_policy.cc b/chrome/browser/extensions/activity_log/counting_policy.cc
index 5581fb23239fa53c2483982155e0135d4f39b1e0..0b8695ad130f0a283d4be9d70860b6f4e3008d24 100644
--- a/chrome/browser/extensions/activity_log/counting_policy.cc
+++ b/chrome/browser/extensions/activity_log/counting_policy.cc
@@ -87,10 +87,10 @@ const ApiList kAlwaysLog[] = {
// Columns in the main database table. See the file-level comment for a
// discussion of how data is stored and the meanings of the _x columns.
-const char* kTableContentFields[] = {
+const char* const kTableContentFields[] = {
"count", "extension_id_x", "time", "action_type", "api_name_x", "args_x",
"page_url_x", "page_title_x", "arg_url_x", "other_x"};
-const char* kTableFieldTypes[] = {
+const char* const kTableFieldTypes[] = {
"INTEGER NOT NULL DEFAULT 1", "INTEGER NOT NULL", "INTEGER", "INTEGER",
"INTEGER", "INTEGER", "INTEGER", "INTEGER", "INTEGER",
"INTEGER"};
@@ -154,8 +154,8 @@ static const char kUrlTableCleanup[] =
namespace extensions {
-const char* CountingPolicy::kTableName = "activitylog_compressed";
-const char* CountingPolicy::kReadViewName = "activitylog_uncompressed";
+const char CountingPolicy::kTableName[] = "activitylog_compressed";
+const char CountingPolicy::kReadViewName[] = "activitylog_uncompressed";
CountingPolicy::CountingPolicy(Profile* profile)
: ActivityLogDatabasePolicy(
@@ -230,7 +230,7 @@ void CountingPolicy::QueueAction(scoped_refptr<Action> action) {
bool CountingPolicy::FlushDatabase(sql::Connection* db) {
// Columns that must match exactly for database rows to be coalesced.
- static const char* matched_columns[] = {
+ static const char* const matched_columns[] = {
"extension_id_x", "action_type", "api_name_x", "args_x", "page_url_x",
"page_title_x", "arg_url_x", "other_x"};
ActionQueue queue;

Powered by Google App Engine
This is Rietveld 408576698