OLD | NEW |
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 #include "chrome/browser/browsing_data_remover.h" | 5 #include "chrome/browser/browsing_data_remover.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 session_service->DeleteLastSession(); | 287 session_service->DeleteLastSession(); |
288 #endif | 288 #endif |
289 } | 289 } |
290 } | 290 } |
291 | 291 |
292 if (remove_mask & REMOVE_DOWNLOADS) { | 292 if (remove_mask & REMOVE_DOWNLOADS) { |
293 content::RecordAction(UserMetricsAction("ClearBrowsingData_Downloads")); | 293 content::RecordAction(UserMetricsAction("ClearBrowsingData_Downloads")); |
294 DownloadManager* download_manager = | 294 DownloadManager* download_manager = |
295 BrowserContext::GetDownloadManager(profile_); | 295 BrowserContext::GetDownloadManager(profile_); |
296 download_manager->RemoveDownloadsBetween(delete_begin_, delete_end_); | 296 download_manager->RemoveDownloadsBetween(delete_begin_, delete_end_); |
297 download_manager->ClearLastDownloadPath(); | 297 download_manager->ClearTransientState(); |
298 } | 298 } |
299 | 299 |
300 if (remove_mask & REMOVE_COOKIES) { | 300 if (remove_mask & REMOVE_COOKIES) { |
301 content::RecordAction(UserMetricsAction("ClearBrowsingData_Cookies")); | 301 content::RecordAction(UserMetricsAction("ClearBrowsingData_Cookies")); |
302 // Since we are running on the UI thread don't call GetURLRequestContext(). | 302 // Since we are running on the UI thread don't call GetURLRequestContext(). |
303 net::URLRequestContextGetter* rq_context = profile_->GetRequestContext(); | 303 net::URLRequestContextGetter* rq_context = profile_->GetRequestContext(); |
304 if (rq_context) { | 304 if (rq_context) { |
305 ++waiting_for_clear_cookies_count_; | 305 ++waiting_for_clear_cookies_count_; |
306 BrowserThread::PostTask( | 306 BrowserThread::PostTask( |
307 BrowserThread::IO, FROM_HERE, | 307 BrowserThread::IO, FROM_HERE, |
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
863 BrowserThread::UI, FROM_HERE, | 863 BrowserThread::UI, FROM_HERE, |
864 base::Bind(&BrowsingDataRemover::OnClearedServerBoundCerts, | 864 base::Bind(&BrowsingDataRemover::OnClearedServerBoundCerts, |
865 base::Unretained(this))); | 865 base::Unretained(this))); |
866 } | 866 } |
867 | 867 |
868 void BrowsingDataRemover::OnClearedServerBoundCerts() { | 868 void BrowsingDataRemover::OnClearedServerBoundCerts() { |
869 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 869 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
870 waiting_for_clear_server_bound_certs_ = false; | 870 waiting_for_clear_server_bound_certs_ = false; |
871 NotifyAndDeleteIfDone(); | 871 NotifyAndDeleteIfDone(); |
872 } | 872 } |
OLD | NEW |