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

Side by Side Diff: chrome/browser/extensions/activity_log/counting_policy.h

Issue 23567022: [Activity log] Generalize the whitelist for keeping arguments (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 7 years, 3 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 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 #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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 void DoDeleteDatabase(); 93 void DoDeleteDatabase();
94 94
95 // Cleans old records from the activity log database. 95 // Cleans old records from the activity log database.
96 bool CleanOlderThan(sql::Connection* db, const base::Time& cutoff); 96 bool CleanOlderThan(sql::Connection* db, const base::Time& cutoff);
97 97
98 // Cleans unused interned strings from the database. This should be run 98 // Cleans unused interned strings from the database. This should be run
99 // after deleting rows from the main log table to clean out stale values. 99 // after deleting rows from the main log table to clean out stale values.
100 bool CleanStringTables(sql::Connection* db); 100 bool CleanStringTables(sql::Connection* db);
101 101
102 // API calls for which complete arguments should be logged. 102 // API calls for which complete arguments should be logged.
103 std::set<std::string> api_arg_whitelist_; 103 Util::ApiSet api_arg_whitelist_;
104 104
105 // Tables for mapping strings to integers for shrinking database storage 105 // Tables for mapping strings to integers for shrinking database storage
106 // requirements. URLs are kept in a separate table from other strings to 106 // requirements. URLs are kept in a separate table from other strings to
107 // make history clearing simpler. 107 // make history clearing simpler.
108 DatabaseStringTable string_table_; 108 DatabaseStringTable string_table_;
109 DatabaseStringTable url_table_; 109 DatabaseStringTable url_table_;
110 110
111 // Tracks any pending updates to be written to the database, if write 111 // Tracks any pending updates to be written to the database, if write
112 // batching is turned on. Should only be accessed from the database thread. 112 // batching is turned on. Should only be accessed from the database thread.
113 ActionQueue queued_actions_; 113 ActionQueue queued_actions_;
(...skipping 17 matching lines...) Expand all
131 131
132 friend class CountingPolicyTest; 132 friend class CountingPolicyTest;
133 FRIEND_TEST_ALL_PREFIXES(CountingPolicyTest, EarlyFlush); 133 FRIEND_TEST_ALL_PREFIXES(CountingPolicyTest, EarlyFlush);
134 FRIEND_TEST_ALL_PREFIXES(CountingPolicyTest, MergingAndExpiring); 134 FRIEND_TEST_ALL_PREFIXES(CountingPolicyTest, MergingAndExpiring);
135 FRIEND_TEST_ALL_PREFIXES(CountingPolicyTest, StringTableCleaning); 135 FRIEND_TEST_ALL_PREFIXES(CountingPolicyTest, StringTableCleaning);
136 }; 136 };
137 137
138 } // namespace extensions 138 } // namespace extensions
139 139
140 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_COUNTING_POLICY_H_ 140 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_COUNTING_POLICY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698