Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(411)

Side by Side Diff: chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc

Issue 2816723002: Add "Site Settings" option to Clear Browsing Data on Android (Closed)
Patch Set: fixes Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/chrome_browsing_data_remover_delegate.h" 5 #include "chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 29 matching lines...) Expand all
40 #include "chrome/browser/search_engines/template_url_service_factory.h" 40 #include "chrome/browser/search_engines/template_url_service_factory.h"
41 #include "chrome/browser/sessions/tab_restore_service_factory.h" 41 #include "chrome/browser/sessions/tab_restore_service_factory.h"
42 #include "chrome/browser/translate/language_model_factory.h" 42 #include "chrome/browser/translate/language_model_factory.h"
43 #include "chrome/browser/web_data_service_factory.h" 43 #include "chrome/browser/web_data_service_factory.h"
44 #include "chrome/common/features.h" 44 #include "chrome/common/features.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/bookmarks/browser/bookmark_model.h" 49 #include "components/bookmarks/browser/bookmark_model.h"
50 #include "components/content_settings/core/browser/content_settings_registry.h"
50 #include "components/content_settings/core/browser/host_content_settings_map.h" 51 #include "components/content_settings/core/browser/host_content_settings_map.h"
51 #include "components/content_settings/core/common/content_settings.h" 52 #include "components/content_settings/core/common/content_settings.h"
52 #include "components/content_settings/core/common/content_settings_pattern.h" 53 #include "components/content_settings/core/common/content_settings_pattern.h"
53 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_comp ression_stats.h" 54 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_comp ression_stats.h"
54 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_serv ice.h" 55 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_serv ice.h"
55 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett ings.h" 56 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett ings.h"
56 #include "components/domain_reliability/service.h" 57 #include "components/domain_reliability/service.h"
57 #include "components/history/core/browser/history_service.h" 58 #include "components/history/core/browser/history_service.h"
58 #include "components/nacl/browser/nacl_browser.h" 59 #include "components/nacl/browser/nacl_browser.h"
59 #include "components/nacl/browser/pnacl_host.h" 60 #include "components/nacl/browser/pnacl_host.h"
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 &ChromeBrowsingDataRemoverDelegate::OnClearedCookies, 693 &ChromeBrowsingDataRemoverDelegate::OnClearedCookies,
693 weak_ptr_factory_.GetWeakPtr())))); 694 weak_ptr_factory_.GetWeakPtr()))));
694 } 695 }
695 } 696 }
696 } 697 }
697 698
698 MediaDeviceIDSalt::Reset(profile_->GetPrefs()); 699 MediaDeviceIDSalt::Reset(profile_->GetPrefs());
699 } 700 }
700 701
701 ////////////////////////////////////////////////////////////////////////////// 702 //////////////////////////////////////////////////////////////////////////////
703 // DATA_TYPE_CONTENT_SETTINGS
704 if (remove_mask & DATA_TYPE_CONTENT_SETTINGS) {
705 auto* registry = content_settings::ContentSettingsRegistry::GetInstance();
706 auto* map = HostContentSettingsMapFactory::GetForProfile(profile_);
707 for (const content_settings::ContentSettingsInfo* info : *registry) {
708 map->ClearSettingsForOneTypeWithPredicate(
709 info->website_settings_info()->type(), delete_begin_,
710 base::Bind(&WebsiteSettingsFilterAdapter, filter));
711 }
712 }
713
714 //////////////////////////////////////////////////////////////////////////////
702 // DATA_TYPE_DURABLE_PERMISSION 715 // DATA_TYPE_DURABLE_PERMISSION
703 if (remove_mask & DATA_TYPE_DURABLE_PERMISSION) { 716 if (remove_mask & DATA_TYPE_DURABLE_PERMISSION) {
704 HostContentSettingsMapFactory::GetForProfile(profile_) 717 HostContentSettingsMapFactory::GetForProfile(profile_)
705 ->ClearSettingsForOneTypeWithPredicate( 718 ->ClearSettingsForOneTypeWithPredicate(
706 CONTENT_SETTINGS_TYPE_DURABLE_STORAGE, base::Time(), 719 CONTENT_SETTINGS_TYPE_DURABLE_STORAGE, base::Time(),
707 base::Bind(&WebsiteSettingsFilterAdapter, filter)); 720 base::Bind(&WebsiteSettingsFilterAdapter, filter));
708 } 721 }
709 722
710 ////////////////////////////////////////////////////////////////////////////// 723 //////////////////////////////////////////////////////////////////////////////
711 // DATA_TYPE_SITE_USAGE_DATA 724 // DATA_TYPE_SITE_USAGE_DATA
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 } 1145 }
1133 1146
1134 void ChromeBrowsingDataRemoverDelegate:: 1147 void ChromeBrowsingDataRemoverDelegate::
1135 OnDeauthorizeFlashContentLicensesCompleted( 1148 OnDeauthorizeFlashContentLicensesCompleted(
1136 uint32_t request_id, 1149 uint32_t request_id,
1137 bool /* success */) { 1150 bool /* success */) {
1138 DCHECK_EQ(request_id, deauthorize_flash_content_licenses_request_id_); 1151 DCHECK_EQ(request_id, deauthorize_flash_content_licenses_request_id_);
1139 clear_flash_content_licenses_.GetCompletionCallback().Run(); 1152 clear_flash_content_licenses_.GetCompletionCallback().Run();
1140 } 1153 }
1141 #endif 1154 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698