removes search template urls acquired and not used by the user
This commit is contained in:
@@ -12,7 +12,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
chrome/app/settings_strings.grdp | 10 +++
|
||||
.../browsing_data/browsing_data_bridge.cc | 2 +-
|
||||
.../chrome_browsing_data_lifetime_manager.cc | 22 +++++-
|
||||
.../chrome_browsing_data_remover_delegate.cc | 11 +++
|
||||
.../chrome_browsing_data_remover_delegate.cc | 13 ++++
|
||||
.../api/settings_private/prefs_util.cc | 17 +++++
|
||||
.../browser/profiles/ProfileManagerUtils.java | 5 ++
|
||||
.../profiles/android/profile_manager_utils.cc | 5 ++
|
||||
@@ -28,8 +28,9 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
.../core/clear_browsing_data_tab.h | 2 +-
|
||||
components/browsing_data/core/pref_names.cc | 17 +++++
|
||||
components/browsing_data/core/pref_names.h | 10 +++
|
||||
.../search_engines/template_url_service.cc | 1 +
|
||||
content/browser/storage_partition_impl.cc | 1 +
|
||||
25 files changed, 309 insertions(+), 17 deletions(-)
|
||||
26 files changed, 312 insertions(+), 17 deletions(-)
|
||||
create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataFragmentAtStart.java
|
||||
|
||||
diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni
|
||||
@@ -325,6 +326,15 @@ diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.
|
||||
content::BackgroundTracingManager::GetInstance().DeleteTracesInDateRange(
|
||||
delete_begin_, delete_end_);
|
||||
|
||||
@@ -1233,6 +1244,8 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
|
||||
|
||||
if (should_clear_zero_suggest_and_session_token && template_url_service)
|
||||
template_url_service->ClearSessionToken();
|
||||
+
|
||||
+ template_url_service->RemoveAutoGeneratedBetween(delete_begin_, delete_end_);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
diff --git a/chrome/browser/extensions/api/settings_private/prefs_util.cc b/chrome/browser/extensions/api/settings_private/prefs_util.cc
|
||||
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
|
||||
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
|
||||
@@ -680,6 +690,17 @@ diff --git a/components/browsing_data/core/pref_names.h b/components/browsing_da
|
||||
// Clear browsing data deletion time period.
|
||||
inline constexpr char kDeleteTimePeriod[] = "browser.clear_data.time_period";
|
||||
inline constexpr char kDeleteTimePeriodBasic[] =
|
||||
diff --git a/components/search_engines/template_url_service.cc b/components/search_engines/template_url_service.cc
|
||||
--- a/components/search_engines/template_url_service.cc
|
||||
+++ b/components/search_engines/template_url_service.cc
|
||||
@@ -757,6 +757,7 @@ void TemplateURLService::RemoveAutoGeneratedForUrlsBetween(
|
||||
if (turl->date_created() >= created_after &&
|
||||
(created_before.is_null() || turl->date_created() < created_before) &&
|
||||
turl->safe_for_autoreplace() && turl->prepopulate_id() == 0 &&
|
||||
+ turl->is_active() != TemplateURLData::ActiveStatus::kTrue &&
|
||||
turl->starter_pack_id() == 0 && !MatchesDefaultSearchProvider(turl) &&
|
||||
(url_filter.is_null() ||
|
||||
url_filter.Run(turl->GenerateSearchURL(search_terms_data())))) {
|
||||
diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc
|
||||
--- a/content/browser/storage_partition_impl.cc
|
||||
+++ b/content/browser/storage_partition_impl.cc
|
||||
|
||||
Reference in New Issue
Block a user