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_ACTIVITY_LOG_POLICY_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_LOG_POLICY_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_LOG_POLICY_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_LOG_POLICY_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 const std::string& page_url, | 85 const std::string& page_url, |
86 const std::string& arg_url, | 86 const std::string& arg_url, |
87 const int days_ago, | 87 const int days_ago, |
88 const base::Callback | 88 const base::Callback |
89 <void(scoped_ptr<Action::ActionVector>)>& callback) = 0; | 89 <void(scoped_ptr<Action::ActionVector>)>& callback) = 0; |
90 | 90 |
91 // Clean the relevant URL data. The cleaning may need to be different for | 91 // Clean the relevant URL data. The cleaning may need to be different for |
92 // different policies. If restrict_urls is empty then all URLs are removed. | 92 // different policies. If restrict_urls is empty then all URLs are removed. |
93 virtual void RemoveURLs(const std::vector<GURL>& restrict_urls) = 0; | 93 virtual void RemoveURLs(const std::vector<GURL>& restrict_urls) = 0; |
94 | 94 |
| 95 // Remove all rows relating to a given extension. |
| 96 virtual void RemoveExtensionData(const std::string& extension_id) = 0; |
| 97 |
95 // Deletes everything in the database. | 98 // Deletes everything in the database. |
96 virtual void DeleteDatabase() = 0; | 99 virtual void DeleteDatabase() = 0; |
97 | 100 |
98 // For unit testing only. | 101 // For unit testing only. |
99 void SetClockForTesting(scoped_ptr<base::Clock> clock); | 102 void SetClockForTesting(scoped_ptr<base::Clock> clock); |
100 | 103 |
101 // A collection of methods that are useful for implementing policies. These | 104 // A collection of methods that are useful for implementing policies. These |
102 // are all static methods; the ActivityLogPolicy::Util class cannot be | 105 // are all static methods; the ActivityLogPolicy::Util class cannot be |
103 // instantiated. This is nested within ActivityLogPolicy to make calling | 106 // instantiated. This is nested within ActivityLogPolicy to make calling |
104 // these methods more convenient from within a policy, but they are public. | 107 // these methods more convenient from within a policy, but they are public. |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 | 215 |
213 private: | 216 private: |
214 // See the comments for the ActivityDatabase class for a discussion of how | 217 // See the comments for the ActivityDatabase class for a discussion of how |
215 // database cleanup runs. | 218 // database cleanup runs. |
216 ActivityDatabase* db_; | 219 ActivityDatabase* db_; |
217 }; | 220 }; |
218 | 221 |
219 } // namespace extensions | 222 } // namespace extensions |
220 | 223 |
221 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_LOG_POLICY_H_ | 224 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_LOG_POLICY_H_ |
OLD | NEW |