Commit 56608ee5 authored by Christian Dullweber's avatar Christian Dullweber Committed by Commit Bot

Remove browsing_data::features::kRemoveNavigationHistory

Navigation history removal was launched, so we don't need the
base::Feature any more.

Bug: 906585
Change-Id: I772539f1ad49d41a3dd949907fb251d15d8a39cc
Reviewed-on: https://chromium-review.googlesource.com/c/1341991
Commit-Queue: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: default avatarMartin Šrámek <msramek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609327}
parent 18260fbf
...@@ -45,7 +45,6 @@ ...@@ -45,7 +45,6 @@
#include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h" #include "chrome/test/base/ui_test_utils.h"
#include "components/browsing_data/core/browsing_data_utils.h" #include "components/browsing_data/core/browsing_data_utils.h"
#include "components/browsing_data/core/features.h"
#include "components/content_settings/core/browser/host_content_settings_map.h" #include "components/content_settings/core/browser/host_content_settings_map.h"
#include "components/prefs/pref_service.h" #include "components/prefs/pref_service.h"
#include "components/signin/core/browser/account_reconcilor.h" #include "components/signin/core/browser/account_reconcilor.h"
...@@ -284,8 +283,7 @@ class BrowsingDataRemoverBrowserTest : public InProcessBrowserTest { ...@@ -284,8 +283,7 @@ class BrowsingDataRemoverBrowserTest : public InProcessBrowserTest {
public: public:
BrowsingDataRemoverBrowserTest() { BrowsingDataRemoverBrowserTest() {
feature_list_.InitWithFeatures( feature_list_.InitWithFeatures(
{browsing_data::features::kRemoveNavigationHistory, {leveldb::kLevelDBRewriteFeature,
leveldb::kLevelDBRewriteFeature,
// Ensure that kOnionSoupDOMStorage is enabled because the old // Ensure that kOnionSoupDOMStorage is enabled because the old
// SessionStorage implementation causes flaky tests. // SessionStorage implementation causes flaky tests.
blink::features::kOnionSoupDOMStorage}, blink::features::kOnionSoupDOMStorage},
......
...@@ -53,7 +53,6 @@ ...@@ -53,7 +53,6 @@
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
#include "chrome/browser/safe_browsing/safe_browsing_service.h" #include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "chrome/browser/search_engines/template_url_service_factory.h" #include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/browser/sessions/tab_restore_service_factory.h"
#include "chrome/browser/translate/chrome_translate_client.h" #include "chrome/browser/translate/chrome_translate_client.h"
#include "chrome/browser/web_data_service_factory.h" #include "chrome/browser/web_data_service_factory.h"
#include "chrome/browser/webauthn/chrome_authenticator_request_delegate.h" #include "chrome/browser/webauthn/chrome_authenticator_request_delegate.h"
...@@ -64,7 +63,6 @@ ...@@ -64,7 +63,6 @@
#include "components/autofill/core/browser/personal_data_manager.h" #include "components/autofill/core/browser/personal_data_manager.h"
#include "components/autofill/core/browser/webdata/autofill_webdata_service.h" #include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
#include "components/bookmarks/browser/bookmark_model.h" #include "components/bookmarks/browser/bookmark_model.h"
#include "components/browsing_data/core/features.h"
#include "components/content_settings/core/browser/content_settings_registry.h" #include "components/content_settings/core/browser/content_settings_registry.h"
#include "components/content_settings/core/browser/host_content_settings_map.h" #include "components/content_settings/core/browser/host_content_settings_map.h"
#include "components/content_settings/core/common/content_settings.h" #include "components/content_settings/core/common/content_settings.h"
...@@ -87,13 +85,13 @@ ...@@ -87,13 +85,13 @@
#include "components/prefs/pref_service.h" #include "components/prefs/pref_service.h"
#include "components/previews/content/previews_ui_service.h" #include "components/previews/content/previews_ui_service.h"
#include "components/search_engines/template_url_service.h" #include "components/search_engines/template_url_service.h"
#include "components/sessions/core/tab_restore_service.h"
#include "components/web_cache/browser/web_cache_manager.h" #include "components/web_cache/browser/web_cache_manager.h"
#include "components/webrtc_logging/browser/log_cleanup.h" #include "components/webrtc_logging/browser/log_cleanup.h"
#include "components/webrtc_logging/browser/text_log_list.h" #include "components/webrtc_logging/browser/text_log_list.h"
#include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h" #include "content/public/browser/browser_thread.h"
#include "content/public/browser/browsing_data_filter_builder.h" #include "content/public/browser/browsing_data_filter_builder.h"
#include "content/public/browser/host_zoom_map.h"
#include "content/public/browser/plugin_data_remover.h" #include "content/public/browser/plugin_data_remover.h"
#include "content/public/browser/ssl_host_state_delegate.h" #include "content/public/browser/ssl_host_state_delegate.h"
#include "content/public/browser/storage_partition.h" #include "content/public/browser/storage_partition.h"
...@@ -122,11 +120,6 @@ ...@@ -122,11 +120,6 @@
#include "extensions/common/constants.h" #include "extensions/common/constants.h"
#endif // BUILDFLAG(ENABLE_EXTENSIONS) #endif // BUILDFLAG(ENABLE_EXTENSIONS)
#if BUILDFLAG(ENABLE_SESSION_SERVICE)
#include "chrome/browser/sessions/session_service.h"
#include "chrome/browser/sessions/session_service_factory.h"
#endif // BUILDFLAG(ENABLE_SESSION_SERVICE)
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/profiles/profile_helper.h" #include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chromeos/cryptohome/cryptohome_parameters.h" #include "chromeos/cryptohome/cryptohome_parameters.h"
...@@ -500,33 +493,6 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData( ...@@ -500,33 +493,6 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
prerender::PrerenderManager::CLEAR_PRERENDER_HISTORY); prerender::PrerenderManager::CLEAR_PRERENDER_HISTORY);
} }
// When this feature is enabled, recent tabs and sessions will be deleted
// by NavigationEntryRemover and not here.
bool is_navigation_entry_remover_enabled = base::FeatureList::IsEnabled(
browsing_data::features::kRemoveNavigationHistory);
// If the caller is removing history for all hosts, then clear ancillary
// historical information.
if (!is_navigation_entry_remover_enabled &&
filter_builder.GetMode() == BrowsingDataFilterBuilder::BLACKLIST) {
// We also delete the list of recently closed tabs. Since these expire,
// they can't be more than a day old, so we can simply clear them all.
sessions::TabRestoreService* tab_service =
TabRestoreServiceFactory::GetForProfile(profile_);
if (tab_service) {
tab_service->ClearEntries();
tab_service->DeleteLastSession();
}
#if BUILDFLAG(ENABLE_SESSION_SERVICE)
// We also delete the last session when we delete the history.
SessionService* session_service =
SessionServiceFactory::GetForProfile(profile_);
if (session_service)
session_service->DeleteLastSession();
#endif
}
// The saved Autofill profiles and credit cards can include the origin from // The saved Autofill profiles and credit cards can include the origin from
// which these profiles and credit cards were learned. These are a form of // which these profiles and credit cards were learned. These are a form of
// history, so clear them as well. // history, so clear them as well.
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sessions/tab_restore_service_factory.h" #include "chrome/browser/sessions/tab_restore_service_factory.h"
#include "chrome/common/buildflags.h" #include "chrome/common/buildflags.h"
#include "components/browsing_data/core/features.h"
#include "components/sessions/core/serialized_navigation_entry.h" #include "components/sessions/core/serialized_navigation_entry.h"
#include "components/sessions/core/tab_restore_service.h" #include "components/sessions/core/tab_restore_service.h"
#include "components/sessions/core/tab_restore_service_observer.h" #include "components/sessions/core/tab_restore_service_observer.h"
...@@ -216,10 +215,6 @@ void RemoveNavigationEntries(Profile* profile, ...@@ -216,10 +215,6 @@ void RemoveNavigationEntries(Profile* profile,
const history::DeletionInfo& deletion_info) { const history::DeletionInfo& deletion_info) {
DCHECK(profile->GetProfileType() == Profile::ProfileType::REGULAR_PROFILE); DCHECK(profile->GetProfileType() == Profile::ProfileType::REGULAR_PROFILE);
DCHECK(!deletion_info.is_from_expiration()); DCHECK(!deletion_info.is_from_expiration());
if (!base::FeatureList::IsEnabled(
browsing_data::features::kRemoveNavigationHistory)) {
return;
}
base::flat_set<GURL> url_set; base::flat_set<GURL> url_set;
if (!deletion_info.time_range().IsValid()) if (!deletion_info.time_range().IsValid())
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
// found in the LICENSE file. // found in the LICENSE file.
#include "base/files/file_path.h" #include "base/files/file_path.h"
#include "base/test/scoped_feature_list.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "chrome/browser/browsing_data/navigation_entry_remover.h" #include "chrome/browser/browsing_data/navigation_entry_remover.h"
#include "chrome/browser/sessions/tab_restore_service_factory.h" #include "chrome/browser/sessions/tab_restore_service_factory.h"
...@@ -13,7 +12,6 @@ ...@@ -13,7 +12,6 @@
#include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h" #include "chrome/test/base/ui_test_utils.h"
#include "components/browsing_data/core/features.h"
#include "components/sessions/core/tab_restore_service.h" #include "components/sessions/core/tab_restore_service.h"
#include "content/public/browser/navigation_controller.h" #include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h" #include "content/public/browser/navigation_entry.h"
...@@ -28,8 +26,6 @@ using history::DeletionInfo; ...@@ -28,8 +26,6 @@ using history::DeletionInfo;
class NavigationEntryRemoverTest : public InProcessBrowserTest { class NavigationEntryRemoverTest : public InProcessBrowserTest {
protected: protected:
void SetUpOnMainThread() override { void SetUpOnMainThread() override {
feature_list_.InitWithFeatures(
{browsing_data::features::kRemoveNavigationHistory}, {});
auto path = base::FilePath(FILE_PATH_LITERAL("browsing_data")); auto path = base::FilePath(FILE_PATH_LITERAL("browsing_data"));
url_a_ = ui_test_utils::GetTestUrl( url_a_ = ui_test_utils::GetTestUrl(
path, base::FilePath(FILE_PATH_LITERAL("a.html"))); path, base::FilePath(FILE_PATH_LITERAL("a.html")));
...@@ -107,8 +103,6 @@ class NavigationEntryRemoverTest : public InProcessBrowserTest { ...@@ -107,8 +103,6 @@ class NavigationEntryRemoverTest : public InProcessBrowserTest {
GURL url_d_; GURL url_d_;
GURL about_blank_; GURL about_blank_;
private:
base::test::ScopedFeatureList feature_list_;
}; };
// === Tests for helper functions === // === Tests for helper functions ===
......
...@@ -23,8 +23,6 @@ static_library("core") { ...@@ -23,8 +23,6 @@ static_library("core") {
"counters/passwords_counter.h", "counters/passwords_counter.h",
"counters/sync_tracker.cc", "counters/sync_tracker.cc",
"counters/sync_tracker.h", "counters/sync_tracker.h",
"features.cc",
"features.h",
"history_notice_utils.cc", "history_notice_utils.cc",
"history_notice_utils.h", "history_notice_utils.h",
"pref_names.cc", "pref_names.cc",
......
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/browsing_data/core/features.h"
namespace browsing_data {
namespace features {
const base::Feature kRemoveNavigationHistory{"RemoveNavigationHistory",
base::FEATURE_ENABLED_BY_DEFAULT};
} // namespace features
} // namespace browsing_data
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_BROWSING_DATA_FEATURES_H_
#define COMPONENTS_BROWSING_DATA_FEATURES_H_
#include "base/feature_list.h"
namespace browsing_data {
namespace features {
// Enable propagation of history deletions to navigation history.
extern const base::Feature kRemoveNavigationHistory;
} // namespace features
} // namespace browsing_data
#endif // COMPONENTS_BROWSING_DATA_FEATURES_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment