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/channel_id_service.h" | 71 #include "net/ssl/channel_id_service.h" |
71 #include "net/ssl/channel_id_store.h" | 72 #include "net/ssl/channel_id_store.h" |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 BrowserThread::PostTaskAndReply( | 400 BrowserThread::PostTaskAndReply( |
400 BrowserThread::FILE, | 401 BrowserThread::FILE, |
401 FROM_HERE, | 402 FROM_HERE, |
402 base::Bind( | 403 base::Bind( |
403 &WebRtcLogUtil::DeleteOldAndRecentWebRtcLogFiles, | 404 &WebRtcLogUtil::DeleteOldAndRecentWebRtcLogFiles, |
404 WebRtcLogList::GetWebRtcLogDirectoryForProfile(profile_->GetPath()), | 405 WebRtcLogList::GetWebRtcLogDirectoryForProfile(profile_->GetPath()), |
405 delete_begin_), | 406 delete_begin_), |
406 base::Bind(&BrowsingDataRemover::OnClearedWebRtcLogs, | 407 base::Bind(&BrowsingDataRemover::OnClearedWebRtcLogs, |
407 base::Unretained(this))); | 408 base::Unretained(this))); |
408 #endif | 409 #endif |
| 410 |
| 411 // The SSL Host State that tracks SSL interstitial "proceed" decisions may |
| 412 // include origins that the user has visited, so it must be cleared. |
| 413 if (profile_->GetSSLHostStateDecisions()) |
| 414 profile_->GetSSLHostStateDecisions()->Clear(); |
409 } | 415 } |
410 | 416 |
411 if ((remove_mask & REMOVE_DOWNLOADS) && may_delete_history) { | 417 if ((remove_mask & REMOVE_DOWNLOADS) && may_delete_history) { |
412 content::RecordAction(UserMetricsAction("ClearBrowsingData_Downloads")); | 418 content::RecordAction(UserMetricsAction("ClearBrowsingData_Downloads")); |
413 content::DownloadManager* download_manager = | 419 content::DownloadManager* download_manager = |
414 BrowserContext::GetDownloadManager(profile_); | 420 BrowserContext::GetDownloadManager(profile_); |
415 download_manager->RemoveDownloadsBetween(delete_begin_, delete_end_); | 421 download_manager->RemoveDownloadsBetween(delete_begin_, delete_end_); |
416 DownloadPrefs* download_prefs = DownloadPrefs::FromDownloadManager( | 422 DownloadPrefs* download_prefs = DownloadPrefs::FromDownloadManager( |
417 download_manager); | 423 download_manager); |
418 download_prefs->SetSaveFilePath(download_prefs->DownloadPath()); | 424 download_prefs->SetSaveFilePath(download_prefs->DownloadPath()); |
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1175 waiting_for_clear_webrtc_logs_ = false; | 1181 waiting_for_clear_webrtc_logs_ = false; |
1176 NotifyAndDeleteIfDone(); | 1182 NotifyAndDeleteIfDone(); |
1177 } | 1183 } |
1178 #endif | 1184 #endif |
1179 | 1185 |
1180 void BrowsingDataRemover::OnClearedDomainReliabilityMonitor() { | 1186 void BrowsingDataRemover::OnClearedDomainReliabilityMonitor() { |
1181 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 1187 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
1182 waiting_for_clear_domain_reliability_monitor_ = false; | 1188 waiting_for_clear_domain_reliability_monitor_ = false; |
1183 NotifyAndDeleteIfDone(); | 1189 NotifyAndDeleteIfDone(); |
1184 } | 1190 } |
OLD | NEW |