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

Side by Side Diff: chrome/browser/extensions/activity_log/activity_log_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/activity_log_policy.h" 5 #include "chrome/browser/extensions/activity_log/activity_log_policy.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/json/json_string_value_serializer.h" 10 #include "base/json/json_string_value_serializer.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/strings/stringprintf.h" 12 #include "base/strings/stringprintf.h"
13 #include "base/time/clock.h" 13 #include "base/time/clock.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "chrome/browser/extensions/activity_log/activity_action_constants.h" 15 #include "chrome/browser/extensions/activity_log/activity_action_constants.h"
16 #include "chrome/browser/profiles/profile.h" 16 #include "chrome/browser/profiles/profile.h"
17 #include "content/public/browser/browser_thread.h" 17 #include "content/public/browser/browser_thread.h"
18 #include "extensions/common/extension.h" 18 #include "extensions/common/extension.h"
19 #include "url/gurl.h" 19 #include "url/gurl.h"
20 20
21 using content::BrowserThread; 21 using content::BrowserThread;
22 22
23 namespace constants = activity_log_constants; 23 namespace constants = activity_log_constants;
24 24
25 namespace { 25 namespace {
26 // Obsolete database tables: these should be dropped from the database if 26 // Obsolete database tables: these should be dropped from the database if
27 // found. 27 // found.
28 const char* kObsoleteTables[] = {"activitylog_apis", "activitylog_blocked", 28 const char* const kObsoleteTables[] = {"activitylog_apis",
29 "activitylog_urls"}; 29 "activitylog_blocked",
30 "activitylog_urls"};
30 } // namespace 31 } // namespace
31 32
32 namespace extensions { 33 namespace extensions {
33 34
34 ActivityLogPolicy::ActivityLogPolicy(Profile* profile) {} 35 ActivityLogPolicy::ActivityLogPolicy(Profile* profile) {}
35 36
36 ActivityLogPolicy::~ActivityLogPolicy() {} 37 ActivityLogPolicy::~ActivityLogPolicy() {}
37 38
38 void ActivityLogPolicy::SetClockForTesting(scoped_ptr<base::Clock> clock) { 39 void ActivityLogPolicy::SetClockForTesting(scoped_ptr<base::Clock> clock) {
39 testing_clock_.reset(clock.release()); 40 testing_clock_.reset(clock.release());
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 base::StringPrintf("DROP TABLE %s", table_name); 171 base::StringPrintf("DROP TABLE %s", table_name);
171 if (!db->Execute(drop_statement.c_str())) { 172 if (!db->Execute(drop_statement.c_str())) {
172 return false; 173 return false;
173 } 174 }
174 } 175 }
175 } 176 }
176 return true; 177 return true;
177 } 178 }
178 179
179 } // namespace extensions 180 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698