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

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

Issue 23629015: Add deletion to the activityLogPrivate API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Undoing last commit 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
« no previous file with comments | « no previous file | chrome/browser/extensions/activity_log/activity_log.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_LOG_H_
6 #define CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_LOG_H_ 6 #define CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_LOG_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 const std::string& arg_url, 85 const std::string& arg_url,
86 const base::Callback 86 const base::Callback
87 <void(scoped_ptr<std::vector<scoped_refptr<Action> > >)>& callback); 87 <void(scoped_ptr<std::vector<scoped_refptr<Action> > >)>& callback);
88 88
89 // Extension::InstallObserver 89 // Extension::InstallObserver
90 // We keep track of whether the whitelisted extension is installed; if it is, 90 // We keep track of whether the whitelisted extension is installed; if it is,
91 // we want to recompute whether to have logging enabled. 91 // we want to recompute whether to have logging enabled.
92 virtual void OnExtensionInstalled(const Extension* extension) OVERRIDE {} 92 virtual void OnExtensionInstalled(const Extension* extension) OVERRIDE {}
93 virtual void OnExtensionLoaded(const Extension* extension) OVERRIDE; 93 virtual void OnExtensionLoaded(const Extension* extension) OVERRIDE;
94 virtual void OnExtensionUnloaded(const Extension* extension) OVERRIDE; 94 virtual void OnExtensionUnloaded(const Extension* extension) OVERRIDE;
95 virtual void OnExtensionUninstalled(const Extension* extension) OVERRIDE {} 95 virtual void OnExtensionUninstalled(const Extension* extension) OVERRIDE;
96 // We also have to list the following from InstallObserver. 96 // We also have to list the following from InstallObserver.
97 virtual void OnBeginExtensionInstall(const std::string& extension_id, 97 virtual void OnBeginExtensionInstall(const std::string& extension_id,
98 const std::string& extension_name, 98 const std::string& extension_name,
99 const gfx::ImageSkia& installing_icon, 99 const gfx::ImageSkia& installing_icon,
100 bool is_app, 100 bool is_app,
101 bool is_platform_app) OVERRIDE {} 101 bool is_platform_app) OVERRIDE {}
102 virtual void OnDownloadProgress(const std::string& extension_id, 102 virtual void OnDownloadProgress(const std::string& extension_id,
103 int percent_downloaded) OVERRIDE {} 103 int percent_downloaded) OVERRIDE {}
104 virtual void OnInstallFailure(const std::string& extension_id) OVERRIDE {} 104 virtual void OnInstallFailure(const std::string& extension_id) OVERRIDE {}
105 virtual void OnAppsReordered() OVERRIDE {} 105 virtual void OnAppsReordered() OVERRIDE {}
106 virtual void OnAppInstalledToAppList( 106 virtual void OnAppInstalledToAppList(
107 const std::string& extension_id) OVERRIDE {} 107 const std::string& extension_id) OVERRIDE {}
108 virtual void OnShutdown() OVERRIDE {} 108 virtual void OnShutdown() OVERRIDE {}
109 109
110 // BrowserContextKeyedService 110 // BrowserContextKeyedService
111 virtual void Shutdown() OVERRIDE; 111 virtual void Shutdown() OVERRIDE;
112 112
113 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); 113 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
114 114
115 // Clean up URLs from the activity log database. 115 // Clean up URLs from the activity log database.
116 // If restrict_urls is empty then all URLs in the activity log database are 116 // If restrict_urls is empty then all URLs in the activity log database are
117 // removed, otherwise only those in restrict_urls are removed. 117 // removed, otherwise only those in restrict_urls are removed.
118 virtual void RemoveURLs(const std::vector<GURL>& restrict_urls); 118 void RemoveURLs(const std::vector<GURL>& restrict_urls);
119 virtual void RemoveURLs(const std::set<GURL>& restrict_urls); 119 void RemoveURLs(const std::set<GURL>& restrict_urls);
120 virtual void RemoveURL(const GURL& url); 120 void RemoveURL(const GURL& url);
121
122 // Deletes the database associated with the policy that's currently in use.
123 void DeleteDatabase();
121 124
122 private: 125 private:
123 friend class ActivityLogFactory; 126 friend class ActivityLogFactory;
124 friend class ActivityLogTest; 127 friend class ActivityLogTest;
125 friend class RenderViewActivityLogTest; 128 friend class RenderViewActivityLogTest;
126 129
127 explicit ActivityLog(Profile* profile); 130 explicit ActivityLog(Profile* profile);
128 virtual ~ActivityLog(); 131 virtual ~ActivityLog();
129 132
130 // Specifies if the Watchdog app is active (installed & enabled). 133 // Specifies if the Watchdog app is active (installed & enabled).
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 virtual content::BrowserContext* GetBrowserContextToUse( 227 virtual content::BrowserContext* GetBrowserContextToUse(
225 content::BrowserContext* context) const OVERRIDE; 228 content::BrowserContext* context) const OVERRIDE;
226 229
227 DISALLOW_COPY_AND_ASSIGN(ActivityLogFactory); 230 DISALLOW_COPY_AND_ASSIGN(ActivityLogFactory);
228 }; 231 };
229 232
230 233
231 } // namespace extensions 234 } // namespace extensions
232 235
233 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_LOG_H_ 236 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_LOG_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/activity_log/activity_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698