diff options
author | erikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-02 17:29:12 +0000 |
---|---|---|
committer | erikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-02 17:29:12 +0000 |
commit | ade9abe99a04fc49e55ced8d31abc5441bf7032d (patch) | |
tree | faa63a02be59c40cc2010827ef69e21c5731529c /chrome/browser/browsing_data_remover.h | |
parent | 9c4ea23289bb0354a26fc2937115412145d91718 (diff) | |
download | chromium_src-ade9abe99a04fc49e55ced8d31abc5441bf7032d.zip chromium_src-ade9abe99a04fc49e55ced8d31abc5441bf7032d.tar.gz chromium_src-ade9abe99a04fc49e55ced8d31abc5441bf7032d.tar.bz2 |
Re-landing http://codereview.chromium.org/7210034/ , which was reverted due to flaky test. Turns out there was a race condition: the cookie store api for deleting cookies is exclusive of the end time, and in the test, on Windows, we often got around to deleting the cookie we had created the same millisecond (hence, it was excluded from deletion).
This change updates the Browsing Data Remover to use the new asynchronous Cookie Store API.
BUG=68657
TEST=unit_tests / BrowsingDataRemoverTest.RemoveCookieForever
TBR=jochen
Review URL: http://codereview.chromium.org/7740084
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99397 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browsing_data_remover.h')
-rw-r--r-- | chrome/browser/browsing_data_remover.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/browsing_data_remover.h b/chrome/browser/browsing_data_remover.h index 870f5e7..115c0d5 100644 --- a/chrome/browser/browsing_data_remover.h +++ b/chrome/browser/browsing_data_remover.h @@ -167,12 +167,19 @@ class BrowsingDataRemover : public NotificationObserver, // NotifyAndDeleteIfDone on the UI thread. void CheckQuotaManagedDataDeletionStatus(); + // Callback when Cookies has been deleted. Invokes NotifyAndDeleteIfDone. + void OnClearedCookies(int num_deleted); + + // Invoked on the IO thread to delete cookies. + void ClearCookiesOnIOThread(net::URLRequestContextGetter* rq_context); + // Calculate the begin time for the deletion range specified by |time_period|. base::Time CalculateBeginDeleteTime(TimePeriod time_period); // Returns true if we're all done. bool all_done() { return registrar_.IsEmpty() && !waiting_for_clear_cache_ && + !waiting_for_clear_cookies_&& !waiting_for_clear_history_ && !waiting_for_clear_quota_managed_data_ && !waiting_for_clear_networking_history_ && @@ -221,6 +228,7 @@ class BrowsingDataRemover : public NotificationObserver, bool waiting_for_clear_history_; bool waiting_for_clear_quota_managed_data_; bool waiting_for_clear_networking_history_; + bool waiting_for_clear_cookies_; bool waiting_for_clear_cache_; bool waiting_for_clear_lso_data_; |