Chromium Code Reviews| 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_decision_auto_blocker.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 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 784 weak_ptr_factory_.GetWeakPtr()); | 785 weak_ptr_factory_.GetWeakPtr()); |
| 785 watcher_.StartWatching(event, watcher_callback); | 786 watcher_.StartWatching(event, watcher_callback); |
| 786 } | 787 } |
| 787 #endif | 788 #endif |
| 788 | 789 |
| 789 if (remove_mask & REMOVE_SITE_USAGE_DATA) { | 790 if (remove_mask & REMOVE_SITE_USAGE_DATA) { |
| 790 ClearSettingsForOneTypeWithPredicate( | 791 ClearSettingsForOneTypeWithPredicate( |
| 791 HostContentSettingsMapFactory::GetForProfile(profile_), | 792 HostContentSettingsMapFactory::GetForProfile(profile_), |
| 792 CONTENT_SETTINGS_TYPE_SITE_ENGAGEMENT, | 793 CONTENT_SETTINGS_TYPE_SITE_ENGAGEMENT, |
| 793 base::Bind(&ForwardPrimaryPatternCallback, same_pattern_filter)); | 794 base::Bind(&ForwardPrimaryPatternCallback, same_pattern_filter)); |
| 795 | |
|
msramek
2016/08/08 17:09:53
Please add a test to BrowsingDataRemoverTest.
dominickn
2016/08/09 08:31:24
Done.
| |
| 796 PermissionDecisionAutoBlocker::RemoveCountsByUrl(profile_, filter); | |
|
msramek
2016/08/08 17:09:53
The guarantee that we want to give when the user d
dominickn
2016/08/09 08:31:24
Done.
| |
| 794 } | 797 } |
| 795 | 798 |
| 796 if (remove_mask & REMOVE_SITE_USAGE_DATA || remove_mask & REMOVE_HISTORY) { | 799 if (remove_mask & REMOVE_SITE_USAGE_DATA || remove_mask & REMOVE_HISTORY) { |
| 797 ClearSettingsForOneTypeWithPredicate( | 800 ClearSettingsForOneTypeWithPredicate( |
| 798 HostContentSettingsMapFactory::GetForProfile(profile_), | 801 HostContentSettingsMapFactory::GetForProfile(profile_), |
| 799 CONTENT_SETTINGS_TYPE_APP_BANNER, | 802 CONTENT_SETTINGS_TYPE_APP_BANNER, |
| 800 base::Bind(&ForwardPrimaryPatternCallback, same_pattern_filter)); | 803 base::Bind(&ForwardPrimaryPatternCallback, same_pattern_filter)); |
| 801 } | 804 } |
| 802 | 805 |
| 803 if (remove_mask & REMOVE_PASSWORDS) { | 806 if (remove_mask & REMOVE_PASSWORDS) { |
| (...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1408 waiting_for_clear_offline_page_data_ = false; | 1411 waiting_for_clear_offline_page_data_ = false; |
| 1409 NotifyIfDone(); | 1412 NotifyIfDone(); |
| 1410 } | 1413 } |
| 1411 #endif | 1414 #endif |
| 1412 | 1415 |
| 1413 void BrowsingDataRemover::OnClearedDomainReliabilityMonitor() { | 1416 void BrowsingDataRemover::OnClearedDomainReliabilityMonitor() { |
| 1414 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 1417 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 1415 waiting_for_clear_domain_reliability_monitor_ = false; | 1418 waiting_for_clear_domain_reliability_monitor_ = false; |
| 1416 NotifyIfDone(); | 1419 NotifyIfDone(); |
| 1417 } | 1420 } |
| OLD | NEW |