diff options
author | andybons@chromium.org <andybons@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-01 02:09:42 +0000 |
---|---|---|
committer | andybons@chromium.org <andybons@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-01 02:09:42 +0000 |
commit | 654512b4c7e02401af2ce207d678c683841eedb6 (patch) | |
tree | d856c557204c2ebbc94a5f4c7d8106b1ab5ffc41 /chrome/browser/browsing_data_remover.h | |
parent | 07598d6736b8d612b1f68eaf2066ab15776293da (diff) | |
download | chromium_src-654512b4c7e02401af2ce207d678c683841eedb6.zip chromium_src-654512b4c7e02401af2ce207d678c683841eedb6.tar.gz chromium_src-654512b4c7e02401af2ce207d678c683841eedb6.tar.bz2 |
Protect local storage created by extension apps.
BUG=49228
TEST=ExtensionsServiceTest.InstallAppsAndCheckStorageProtection
TEST=DatabaseTrackerTest.*
Review URL: http://codereview.chromium.org/3256003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58108 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browsing_data_remover.h')
-rw-r--r-- | chrome/browser/browsing_data_remover.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/chrome/browser/browsing_data_remover.h b/chrome/browser/browsing_data_remover.h index 9260ce9..a160198 100644 --- a/chrome/browser/browsing_data_remover.h +++ b/chrome/browser/browsing_data_remover.h @@ -6,6 +6,8 @@ #define CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ #pragma once +#include <vector> + #include "base/observer_list.h" #include "base/ref_counted.h" #include "base/time.h" @@ -116,15 +118,19 @@ class BrowsingDataRemover : public NotificationObserver { // NotifyAndDeleteIfDone. void OnClearedDatabases(int rv); - // Invoked on the FILE thread to delete HTML5 databases. - void ClearDatabasesOnFILEThread(base::Time delete_begin); + // Invoked on the FILE thread to delete HTML5 databases. Ignores any within + // the |webkit_db_whitelist|. + void ClearDatabasesOnFILEThread(base::Time delete_begin, + const std::vector<string16>& webkit_db_whitelist); // Callback when the appcache has been cleared. Invokes // NotifyAndDeleteIfDone. void OnClearedAppCache(); - // Invoked on the IO thread to delete from the AppCache. - void ClearAppCacheOnIOThread(base::Time delete_begin); + // Invoked on the IO thread to delete from the AppCache, ignoring data from + // any origins within the |origin_whitelist|. + void ClearAppCacheOnIOThread(base::Time delete_begin, + const std::vector<GURL>& origin_whitelist); // Lower level helpers. void OnGotAppCacheInfo(int rv); @@ -166,6 +172,7 @@ class BrowsingDataRemover : public NotificationObserver { net::CompletionCallbackImpl<BrowsingDataRemover> appcache_deleted_callback_; scoped_refptr<appcache::AppCacheInfoCollection> appcache_info_; scoped_refptr<URLRequestContextGetter> request_context_getter_; + std::vector<GURL> appcache_whitelist_; int appcaches_to_be_deleted_count_; // Used to delete data from the HTTP caches. |