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

Side by Side Diff: chrome/browser/browsing_data_remover.h

Issue 7210034: Update BrowsingDataRemover with the asynchronous CookieMonster API. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 4 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/browsing_data_remover.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_BROWSING_DATA_REMOVER_H_ 5 #ifndef CHROME_BROWSER_BROWSING_DATA_REMOVER_H_
6 #define CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ 6 #define CHROME_BROWSER_BROWSING_DATA_REMOVER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 156
157 // Callback responding to deletion of a single quota managed origin's 157 // Callback responding to deletion of a single quota managed origin's
158 // persistent data 158 // persistent data
159 void OnQuotaManagedOriginDeletion(quota::QuotaStatusCode); 159 void OnQuotaManagedOriginDeletion(quota::QuotaStatusCode);
160 160
161 // Called to check whether all temporary and persistent origin data that 161 // Called to check whether all temporary and persistent origin data that
162 // should be deleted has been deleted. If everything's good to go, invokes 162 // should be deleted has been deleted. If everything's good to go, invokes
163 // NotifyAndDeleteIfDone on the UI thread. 163 // NotifyAndDeleteIfDone on the UI thread.
164 void CheckQuotaManagedDataDeletionStatus(); 164 void CheckQuotaManagedDataDeletionStatus();
165 165
166 // Callback when Cookies has been deleted. Invokes NotifyAndDeleteIfDone.
167 void OnClearedCookies(int num_deleted);
168
169 // Invoked on the IO thread to delete cookies.
170 void ClearCookiesOnIOThread(net::URLRequestContextGetter* rq_context);
171
166 // Calculate the begin time for the deletion range specified by |time_period|. 172 // Calculate the begin time for the deletion range specified by |time_period|.
167 base::Time CalculateBeginDeleteTime(TimePeriod time_period); 173 base::Time CalculateBeginDeleteTime(TimePeriod time_period);
168 174
169 // Returns true if we're all done. 175 // Returns true if we're all done.
170 bool all_done() { 176 bool all_done() {
171 return registrar_.IsEmpty() && !waiting_for_clear_cache_ && 177 return registrar_.IsEmpty() && !waiting_for_clear_cache_ &&
178 !waiting_for_clear_cookies_&&
172 !waiting_for_clear_history_ && 179 !waiting_for_clear_history_ &&
173 !waiting_for_clear_quota_managed_data_ && 180 !waiting_for_clear_quota_managed_data_ &&
174 !waiting_for_clear_networking_history_ && 181 !waiting_for_clear_networking_history_ &&
175 !waiting_for_clear_lso_data_; 182 !waiting_for_clear_lso_data_;
176 } 183 }
177 184
178 NotificationRegistrar registrar_; 185 NotificationRegistrar registrar_;
179 186
180 // Profile we're to remove from. 187 // Profile we're to remove from.
181 Profile* profile_; 188 Profile* profile_;
(...skipping 24 matching lines...) Expand all
206 scoped_refptr<net::URLRequestContextGetter> media_context_getter_; 213 scoped_refptr<net::URLRequestContextGetter> media_context_getter_;
207 214
208 // Used to delete plugin data. 215 // Used to delete plugin data.
209 scoped_refptr<PluginDataRemover> plugin_data_remover_; 216 scoped_refptr<PluginDataRemover> plugin_data_remover_;
210 base::WaitableEventWatcher watcher_; 217 base::WaitableEventWatcher watcher_;
211 218
212 // True if we're waiting for various data to be deleted. 219 // True if we're waiting for various data to be deleted.
213 bool waiting_for_clear_history_; 220 bool waiting_for_clear_history_;
214 bool waiting_for_clear_quota_managed_data_; 221 bool waiting_for_clear_quota_managed_data_;
215 bool waiting_for_clear_networking_history_; 222 bool waiting_for_clear_networking_history_;
223 bool waiting_for_clear_cookies_;
216 bool waiting_for_clear_cache_; 224 bool waiting_for_clear_cache_;
217 bool waiting_for_clear_lso_data_; 225 bool waiting_for_clear_lso_data_;
218 226
219 // Tracking how many origins need to be deleted, and whether we're finished 227 // Tracking how many origins need to be deleted, and whether we're finished
220 // gathering origins. 228 // gathering origins.
221 int quota_managed_origins_to_delete_count_; 229 int quota_managed_origins_to_delete_count_;
222 int quota_managed_storage_types_to_delete_count_; 230 int quota_managed_storage_types_to_delete_count_;
223 231
224 ObserverList<Observer> observer_list_; 232 ObserverList<Observer> observer_list_;
225 233
226 // Used if we need to clear history. 234 // Used if we need to clear history.
227 CancelableRequestConsumer request_consumer_; 235 CancelableRequestConsumer request_consumer_;
228 236
229 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); 237 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover);
230 }; 238 };
231 239
232 #endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ 240 #endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browsing_data_remover.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698