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

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

Issue 23983014: [Activity Log] when extension is uninstalled, delete data about it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed bug in test 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 | Annotate | Revision Log
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_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 <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 const std::string& page_url, 86 const std::string& page_url,
87 const std::string& arg_url, 87 const std::string& arg_url,
88 const int days_ago, 88 const int days_ago,
89 const base::Callback 89 const base::Callback
90 <void(scoped_ptr<Action::ActionVector>)>& callback) = 0; 90 <void(scoped_ptr<Action::ActionVector>)>& callback) = 0;
91 91
92 // Clean the relevant URL data. The cleaning may need to be different for 92 // Clean the relevant URL data. The cleaning may need to be different for
93 // different policies. If restrict_urls is empty then all URLs are removed. 93 // different policies. If restrict_urls is empty then all URLs are removed.
94 virtual void RemoveURLs(const std::vector<GURL>& restrict_urls) = 0; 94 virtual void RemoveURLs(const std::vector<GURL>& restrict_urls) = 0;
95 95
96 // Remove all rows relating to a given extension.
97 virtual void RemoveExtensionData(const std::string& extension_id) = 0;
98
96 // Deletes everything in the database. 99 // Deletes everything in the database.
97 virtual void DeleteDatabase() = 0; 100 virtual void DeleteDatabase() = 0;
98 101
99 // For unit testing only. 102 // For unit testing only.
100 void SetClockForTesting(scoped_ptr<base::Clock> clock); 103 void SetClockForTesting(scoped_ptr<base::Clock> clock);
101 104
102 // A collection of methods that are useful for implementing policies. These 105 // A collection of methods that are useful for implementing policies. These
103 // are all static methods; the ActivityLogPolicy::Util class cannot be 106 // are all static methods; the ActivityLogPolicy::Util class cannot be
104 // instantiated. This is nested within ActivityLogPolicy to make calling 107 // instantiated. This is nested within ActivityLogPolicy to make calling
105 // these methods more convenient from within a policy, but they are public. 108 // these methods more convenient from within a policy, but they are public.
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 220
218 private: 221 private:
219 // See the comments for the ActivityDatabase class for a discussion of how 222 // See the comments for the ActivityDatabase class for a discussion of how
220 // database cleanup runs. 223 // database cleanup runs.
221 ActivityDatabase* db_; 224 ActivityDatabase* db_;
222 }; 225 };
223 226
224 } // namespace extensions 227 } // namespace extensions
225 228
226 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_LOG_POLICY_H_ 229 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_LOG_POLICY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698