OLD | NEW |
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 Loading... |
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 |
OLD | NEW |