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 #ifndef CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_COUNTING_POLICY_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_COUNTING_POLICY_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_COUNTING_POLICY_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_COUNTING_POLICY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 void RemoveURLs(const std::vector<GURL>&) override; | 52 void RemoveURLs(const std::vector<GURL>&) override; |
53 | 53 |
54 // Clean the data related to this extension for this policy. | 54 // Clean the data related to this extension for this policy. |
55 void RemoveExtensionData(const std::string& extension_id) override; | 55 void RemoveExtensionData(const std::string& extension_id) override; |
56 | 56 |
57 // Delete everything in the database. | 57 // Delete everything in the database. |
58 void DeleteDatabase() override; | 58 void DeleteDatabase() override; |
59 | 59 |
60 // The main database table, and the name for a read-only view that | 60 // The main database table, and the name for a read-only view that |
61 // decompresses string values for easier parsing. | 61 // decompresses string values for easier parsing. |
62 static const char* kTableName; | 62 static const char kTableName[]; |
63 static const char* kReadViewName; | 63 static const char kReadViewName[]; |
64 | 64 |
65 protected: | 65 protected: |
66 // The ActivityDatabase::Delegate interface. These are always called from | 66 // The ActivityDatabase::Delegate interface. These are always called from |
67 // the database thread. | 67 // the database thread. |
68 bool InitDatabase(sql::Connection* db) override; | 68 bool InitDatabase(sql::Connection* db) override; |
69 bool FlushDatabase(sql::Connection* db) override; | 69 bool FlushDatabase(sql::Connection* db) override; |
70 void OnDatabaseFailure() override; | 70 void OnDatabaseFailure() override; |
71 void OnDatabaseClose() override; | 71 void OnDatabaseClose() override; |
72 | 72 |
73 private: | 73 private: |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 148 |
149 friend class CountingPolicyTest; | 149 friend class CountingPolicyTest; |
150 FRIEND_TEST_ALL_PREFIXES(CountingPolicyTest, EarlyFlush); | 150 FRIEND_TEST_ALL_PREFIXES(CountingPolicyTest, EarlyFlush); |
151 FRIEND_TEST_ALL_PREFIXES(CountingPolicyTest, MergingAndExpiring); | 151 FRIEND_TEST_ALL_PREFIXES(CountingPolicyTest, MergingAndExpiring); |
152 FRIEND_TEST_ALL_PREFIXES(CountingPolicyTest, StringTableCleaning); | 152 FRIEND_TEST_ALL_PREFIXES(CountingPolicyTest, StringTableCleaning); |
153 }; | 153 }; |
154 | 154 |
155 } // namespace extensions | 155 } // namespace extensions |
156 | 156 |
157 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_COUNTING_POLICY_H_ | 157 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_COUNTING_POLICY_H_ |
OLD | NEW |