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 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 #include "chrome/browser/webdata/web_data_service_factory.h" | 44 #include "chrome/browser/webdata/web_data_service_factory.h" |
45 #include "chrome/common/pref_names.h" | 45 #include "chrome/common/pref_names.h" |
46 #include "chrome/common/url_constants.h" | 46 #include "chrome/common/url_constants.h" |
47 #include "components/autofill/core/browser/personal_data_manager.h" | 47 #include "components/autofill/core/browser/personal_data_manager.h" |
48 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" | 48 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" |
49 #include "components/domain_reliability/service.h" | 49 #include "components/domain_reliability/service.h" |
50 #include "components/gcm_driver/gcm_driver.h" | 50 #include "components/gcm_driver/gcm_driver.h" |
51 #include "components/nacl/browser/nacl_browser.h" | 51 #include "components/nacl/browser/nacl_browser.h" |
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/power/origin_power_map.h" |
| 55 #include "components/power/origin_power_map_factory.h" |
54 #include "components/search_engines/template_url_service.h" | 56 #include "components/search_engines/template_url_service.h" |
55 #include "components/web_cache/browser/web_cache_manager.h" | 57 #include "components/web_cache/browser/web_cache_manager.h" |
56 #include "content/public/browser/browser_thread.h" | 58 #include "content/public/browser/browser_thread.h" |
57 #include "content/public/browser/dom_storage_context.h" | 59 #include "content/public/browser/dom_storage_context.h" |
58 #include "content/public/browser/download_manager.h" | 60 #include "content/public/browser/download_manager.h" |
59 #include "content/public/browser/local_storage_usage_info.h" | 61 #include "content/public/browser/local_storage_usage_info.h" |
60 #include "content/public/browser/notification_service.h" | 62 #include "content/public/browser/notification_service.h" |
61 #include "content/public/browser/plugin_data_remover.h" | 63 #include "content/public/browser/plugin_data_remover.h" |
62 #include "content/public/browser/session_storage_usage_info.h" | 64 #include "content/public/browser/session_storage_usage_info.h" |
63 #include "content/public/browser/ssl_host_state_delegate.h" | 65 #include "content/public/browser/ssl_host_state_delegate.h" |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 &history_task_tracker_); | 299 &history_task_tracker_); |
298 | 300 |
299 #if defined(ENABLE_EXTENSIONS) | 301 #if defined(ENABLE_EXTENSIONS) |
300 // The extension activity contains details of which websites extensions | 302 // The extension activity contains details of which websites extensions |
301 // were active on. It therefore indirectly stores details of websites a | 303 // were active on. It therefore indirectly stores details of websites a |
302 // user has visited so best clean from here as well. | 304 // user has visited so best clean from here as well. |
303 extensions::ActivityLog::GetInstance(profile_)->RemoveURLs(restrict_urls); | 305 extensions::ActivityLog::GetInstance(profile_)->RemoveURLs(restrict_urls); |
304 #endif | 306 #endif |
305 } | 307 } |
306 | 308 |
| 309 // The power consumption history by origin contains details of websites |
| 310 // that were visited. |
| 311 power::OriginPowerMap* origin_power_map = |
| 312 power::OriginPowerMapFactory::GetForBrowserContext(profile_); |
| 313 origin_power_map->ClearOriginMap(); |
| 314 |
307 // Need to clear the host cache and accumulated speculative data, as it also | 315 // Need to clear the host cache and accumulated speculative data, as it also |
308 // reveals some history: we have no mechanism to track when these items were | 316 // reveals some history: we have no mechanism to track when these items were |
309 // created, so we'll clear them all. Better safe than sorry. | 317 // created, so we'll clear them all. Better safe than sorry. |
310 if (g_browser_process->io_thread()) { | 318 if (g_browser_process->io_thread()) { |
311 waiting_for_clear_hostname_resolution_cache_ = true; | 319 waiting_for_clear_hostname_resolution_cache_ = true; |
312 BrowserThread::PostTask( | 320 BrowserThread::PostTask( |
313 BrowserThread::IO, FROM_HERE, | 321 BrowserThread::IO, FROM_HERE, |
314 base::Bind( | 322 base::Bind( |
315 &BrowsingDataRemover::ClearHostnameResolutionCacheOnIOThread, | 323 &BrowsingDataRemover::ClearHostnameResolutionCacheOnIOThread, |
316 base::Unretained(this), | 324 base::Unretained(this), |
(...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1195 waiting_for_clear_webrtc_logs_ = false; | 1203 waiting_for_clear_webrtc_logs_ = false; |
1196 NotifyAndDeleteIfDone(); | 1204 NotifyAndDeleteIfDone(); |
1197 } | 1205 } |
1198 #endif | 1206 #endif |
1199 | 1207 |
1200 void BrowsingDataRemover::OnClearedDomainReliabilityMonitor() { | 1208 void BrowsingDataRemover::OnClearedDomainReliabilityMonitor() { |
1201 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 1209 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
1202 waiting_for_clear_domain_reliability_monitor_ = false; | 1210 waiting_for_clear_domain_reliability_monitor_ = false; |
1203 NotifyAndDeleteIfDone(); | 1211 NotifyAndDeleteIfDone(); |
1204 } | 1212 } |
OLD | NEW |