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

Side by Side Diff: chrome/browser/extensions/activity_log/fullstream_ui_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, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/activity_log/fullstream_ui_policy.h" 5 #include "chrome/browser/extensions/activity_log/fullstream_ui_policy.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 15 matching lines...) Expand all
26 using base::Callback; 26 using base::Callback;
27 using base::FilePath; 27 using base::FilePath;
28 using base::Time; 28 using base::Time;
29 using base::Unretained; 29 using base::Unretained;
30 using content::BrowserThread; 30 using content::BrowserThread;
31 31
32 namespace constants = activity_log_constants; 32 namespace constants = activity_log_constants;
33 33
34 namespace extensions { 34 namespace extensions {
35 35
36 const char* FullStreamUIPolicy::kTableName = "activitylog_full"; 36 const char FullStreamUIPolicy::kTableName[] = "activitylog_full";
37 const char* FullStreamUIPolicy::kTableContentFields[] = { 37 const char* const FullStreamUIPolicy::kTableContentFields[] = {
38 "extension_id", "time", "action_type", "api_name", "args", "page_url", 38 "extension_id", "time", "action_type", "api_name", "args", "page_url",
39 "page_title", "arg_url", "other" 39 "page_title", "arg_url", "other"
40 }; 40 };
41 const char* FullStreamUIPolicy::kTableFieldTypes[] = { 41 const char* const FullStreamUIPolicy::kTableFieldTypes[] = {
42 "LONGVARCHAR NOT NULL", "INTEGER", "INTEGER", "LONGVARCHAR", "LONGVARCHAR", 42 "LONGVARCHAR NOT NULL", "INTEGER", "INTEGER", "LONGVARCHAR", "LONGVARCHAR",
43 "LONGVARCHAR", "LONGVARCHAR", "LONGVARCHAR", "LONGVARCHAR" 43 "LONGVARCHAR", "LONGVARCHAR", "LONGVARCHAR", "LONGVARCHAR"
44 }; 44 };
45 const int FullStreamUIPolicy::kTableFieldCount = 45 const int FullStreamUIPolicy::kTableFieldCount =
46 arraysize(FullStreamUIPolicy::kTableContentFields); 46 arraysize(FullStreamUIPolicy::kTableContentFields);
47 47
48 FullStreamUIPolicy::FullStreamUIPolicy(Profile* profile) 48 FullStreamUIPolicy::FullStreamUIPolicy(Profile* profile)
49 : ActivityLogDatabasePolicy( 49 : ActivityLogDatabasePolicy(
50 profile, 50 profile,
51 FilePath(chrome::kExtensionActivityLogFilename)) {} 51 FilePath(chrome::kExtensionActivityLogFilename)) {}
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 } 442 }
443 443
444 void FullStreamUIPolicy::QueueAction(scoped_refptr<Action> action) { 444 void FullStreamUIPolicy::QueueAction(scoped_refptr<Action> action) {
445 if (activity_database()->is_db_valid()) { 445 if (activity_database()->is_db_valid()) {
446 queued_actions_.push_back(action); 446 queued_actions_.push_back(action);
447 activity_database()->AdviseFlush(queued_actions_.size()); 447 activity_database()->AdviseFlush(queued_actions_.size());
448 } 448 }
449 } 449 }
450 450
451 } // namespace extensions 451 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698