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/browsing_data_remover.h" | 5 #include "chrome/browser/browsing_data/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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 #include "components/nacl/browser/pnacl_host.h" | 52 #include "components/nacl/browser/pnacl_host.h" |
53 #include "components/password_manager/core/browser/password_store.h" | 53 #include "components/password_manager/core/browser/password_store.h" |
54 #include "components/search_engines/template_url_service.h" | 54 #include "components/search_engines/template_url_service.h" |
55 #include "content/public/browser/browser_thread.h" | 55 #include "content/public/browser/browser_thread.h" |
56 #include "content/public/browser/dom_storage_context.h" | 56 #include "content/public/browser/dom_storage_context.h" |
57 #include "content/public/browser/download_manager.h" | 57 #include "content/public/browser/download_manager.h" |
58 #include "content/public/browser/local_storage_usage_info.h" | 58 #include "content/public/browser/local_storage_usage_info.h" |
59 #include "content/public/browser/notification_service.h" | 59 #include "content/public/browser/notification_service.h" |
60 #include "content/public/browser/plugin_data_remover.h" | 60 #include "content/public/browser/plugin_data_remover.h" |
61 #include "content/public/browser/session_storage_usage_info.h" | 61 #include "content/public/browser/session_storage_usage_info.h" |
| 62 #include "content/public/browser/ssl_host_state_decisions.h" |
62 #include "content/public/browser/storage_partition.h" | 63 #include "content/public/browser/storage_partition.h" |
63 #include "content/public/browser/user_metrics.h" | 64 #include "content/public/browser/user_metrics.h" |
64 #include "net/base/net_errors.h" | 65 #include "net/base/net_errors.h" |
65 #include "net/base/sdch_manager.h" | 66 #include "net/base/sdch_manager.h" |
66 #include "net/cookies/cookie_store.h" | 67 #include "net/cookies/cookie_store.h" |
67 #include "net/disk_cache/disk_cache.h" | 68 #include "net/disk_cache/disk_cache.h" |
68 #include "net/http/http_cache.h" | 69 #include "net/http/http_cache.h" |
69 #include "net/http/transport_security_state.h" | 70 #include "net/http/transport_security_state.h" |
70 #include "net/ssl/server_bound_cert_service.h" | 71 #include "net/ssl/server_bound_cert_service.h" |
71 #include "net/ssl/server_bound_cert_store.h" | 72 #include "net/ssl/server_bound_cert_store.h" |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 BrowserThread::PostTaskAndReply( | 399 BrowserThread::PostTaskAndReply( |
399 BrowserThread::FILE, | 400 BrowserThread::FILE, |
400 FROM_HERE, | 401 FROM_HERE, |
401 base::Bind( | 402 base::Bind( |
402 &WebRtcLogUtil::DeleteOldAndRecentWebRtcLogFiles, | 403 &WebRtcLogUtil::DeleteOldAndRecentWebRtcLogFiles, |
403 WebRtcLogList::GetWebRtcLogDirectoryForProfile(profile_->GetPath()), | 404 WebRtcLogList::GetWebRtcLogDirectoryForProfile(profile_->GetPath()), |
404 delete_begin_), | 405 delete_begin_), |
405 base::Bind(&BrowsingDataRemover::OnClearedWebRtcLogs, | 406 base::Bind(&BrowsingDataRemover::OnClearedWebRtcLogs, |
406 base::Unretained(this))); | 407 base::Unretained(this))); |
407 #endif | 408 #endif |
| 409 |
| 410 // The SSL Host State that tracks SSL interstitial "proceed" decisions may |
| 411 // include origins that the user has visited, so it must be cleared. |
| 412 if (profile_->GetSSLHostStateDecisions()) |
| 413 profile_->GetSSLHostStateDecisions()->Clear(); |
408 } | 414 } |
409 | 415 |
410 if ((remove_mask & REMOVE_DOWNLOADS) && may_delete_history) { | 416 if ((remove_mask & REMOVE_DOWNLOADS) && may_delete_history) { |
411 content::RecordAction(UserMetricsAction("ClearBrowsingData_Downloads")); | 417 content::RecordAction(UserMetricsAction("ClearBrowsingData_Downloads")); |
412 content::DownloadManager* download_manager = | 418 content::DownloadManager* download_manager = |
413 BrowserContext::GetDownloadManager(profile_); | 419 BrowserContext::GetDownloadManager(profile_); |
414 download_manager->RemoveDownloadsBetween(delete_begin_, delete_end_); | 420 download_manager->RemoveDownloadsBetween(delete_begin_, delete_end_); |
415 DownloadPrefs* download_prefs = DownloadPrefs::FromDownloadManager( | 421 DownloadPrefs* download_prefs = DownloadPrefs::FromDownloadManager( |
416 download_manager); | 422 download_manager); |
417 download_prefs->SetSaveFilePath(download_prefs->DownloadPath()); | 423 download_prefs->SetSaveFilePath(download_prefs->DownloadPath()); |
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1166 waiting_for_clear_webrtc_logs_ = false; | 1172 waiting_for_clear_webrtc_logs_ = false; |
1167 NotifyAndDeleteIfDone(); | 1173 NotifyAndDeleteIfDone(); |
1168 } | 1174 } |
1169 #endif | 1175 #endif |
1170 | 1176 |
1171 void BrowsingDataRemover::OnClearedDomainReliabilityMonitor() { | 1177 void BrowsingDataRemover::OnClearedDomainReliabilityMonitor() { |
1172 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 1178 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
1173 waiting_for_clear_domain_reliability_monitor_ = false; | 1179 waiting_for_clear_domain_reliability_monitor_ = false; |
1174 NotifyAndDeleteIfDone(); | 1180 NotifyAndDeleteIfDone(); |
1175 } | 1181 } |
OLD | NEW |