| 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 14 matching lines...) Expand all Loading... |
| 25 #include "chrome/browser/domain_reliability/service_factory.h" | 25 #include "chrome/browser/domain_reliability/service_factory.h" |
| 26 #include "chrome/browser/download/download_prefs.h" | 26 #include "chrome/browser/download/download_prefs.h" |
| 27 #include "chrome/browser/history/history_service_factory.h" | 27 #include "chrome/browser/history/history_service_factory.h" |
| 28 #include "chrome/browser/history/web_history_service_factory.h" | 28 #include "chrome/browser/history/web_history_service_factory.h" |
| 29 #include "chrome/browser/io_thread.h" | 29 #include "chrome/browser/io_thread.h" |
| 30 #include "chrome/browser/media/media_device_id_salt.h" | 30 #include "chrome/browser/media/media_device_id_salt.h" |
| 31 #include "chrome/browser/net/predictor.h" | 31 #include "chrome/browser/net/predictor.h" |
| 32 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" | 32 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" |
| 33 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact
ory.h" | 33 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact
ory.h" |
| 34 #include "chrome/browser/password_manager/password_store_factory.h" | 34 #include "chrome/browser/password_manager/password_store_factory.h" |
| 35 #include "chrome/browser/permissions/permission_prompt_decision_log.h" |
| 35 #include "chrome/browser/prerender/prerender_manager.h" | 36 #include "chrome/browser/prerender/prerender_manager.h" |
| 36 #include "chrome/browser/prerender/prerender_manager_factory.h" | 37 #include "chrome/browser/prerender/prerender_manager_factory.h" |
| 37 #include "chrome/browser/profiles/profile.h" | 38 #include "chrome/browser/profiles/profile.h" |
| 38 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 39 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
| 39 #include "chrome/browser/search_engines/template_url_service_factory.h" | 40 #include "chrome/browser/search_engines/template_url_service_factory.h" |
| 40 #include "chrome/browser/sessions/tab_restore_service_factory.h" | 41 #include "chrome/browser/sessions/tab_restore_service_factory.h" |
| 41 #include "chrome/browser/web_data_service_factory.h" | 42 #include "chrome/browser/web_data_service_factory.h" |
| 42 #include "chrome/common/features.h" | 43 #include "chrome/common/features.h" |
| 43 #include "chrome/common/pref_names.h" | 44 #include "chrome/common/pref_names.h" |
| 44 #include "chrome/common/url_constants.h" | 45 #include "chrome/common/url_constants.h" |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 #endif | 451 #endif |
| 451 } | 452 } |
| 452 | 453 |
| 453 #if defined(ENABLE_EXTENSIONS) | 454 #if defined(ENABLE_EXTENSIONS) |
| 454 // Clear launch times as they are a form of history. | 455 // Clear launch times as they are a form of history. |
| 455 extensions::ExtensionPrefs* extension_prefs = | 456 extensions::ExtensionPrefs* extension_prefs = |
| 456 extensions::ExtensionPrefs::Get(profile_); | 457 extensions::ExtensionPrefs::Get(profile_); |
| 457 extension_prefs->ClearLastLaunchTimes(); | 458 extension_prefs->ClearLastLaunchTimes(); |
| 458 #endif | 459 #endif |
| 459 | 460 |
| 461 // Clear permission dismissal counts as they are origin-keyed. |
| 462 PermissionPromptDecisionLog::RemoveCountsByUrl(profile_, filter); |
| 463 |
| 460 // The power consumption history by origin contains details of websites | 464 // The power consumption history by origin contains details of websites |
| 461 // that were visited. | 465 // that were visited. |
| 462 // TODO(dmurph): Support all backends with filter (crbug.com/113621). | 466 // TODO(dmurph): Support all backends with filter (crbug.com/113621). |
| 463 power::OriginPowerMap* origin_power_map = | 467 power::OriginPowerMap* origin_power_map = |
| 464 power::OriginPowerMapFactory::GetForBrowserContext(profile_); | 468 power::OriginPowerMapFactory::GetForBrowserContext(profile_); |
| 465 if (origin_power_map) | 469 if (origin_power_map) |
| 466 origin_power_map->ClearOriginMap(); | 470 origin_power_map->ClearOriginMap(); |
| 467 | 471 |
| 468 // Need to clear the host cache and accumulated speculative data, as it also | 472 // Need to clear the host cache and accumulated speculative data, as it also |
| 469 // reveals some history: we have no mechanism to track when these items were | 473 // reveals some history: we have no mechanism to track when these items were |
| (...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1324 waiting_for_clear_domain_reliability_monitor_ = false; | 1328 waiting_for_clear_domain_reliability_monitor_ = false; |
| 1325 NotifyIfDone(); | 1329 NotifyIfDone(); |
| 1326 } | 1330 } |
| 1327 | 1331 |
| 1328 // static | 1332 // static |
| 1329 BrowsingDataRemover::CallbackSubscription | 1333 BrowsingDataRemover::CallbackSubscription |
| 1330 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback( | 1334 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback( |
| 1331 const BrowsingDataRemover::Callback& callback) { | 1335 const BrowsingDataRemover::Callback& callback) { |
| 1332 return GetOnBrowsingDataRemovedCallbacks()->Add(callback); | 1336 return GetOnBrowsingDataRemovedCallbacks()->Add(callback); |
| 1333 } | 1337 } |
| OLD | NEW |