Commit ea4ea739 authored by Robert Ogden's avatar Robert Ogden Committed by Commit Bot

Move IsolatedPrerender features to separate header file

This CL finishes moving the feature flags for Isolated Prerender to a
separate header file.

I decided not to add <Feature>IsEnabled() helpers to the params file
since it doesn't seem that much better because tests still need to
reference the feature directly anyways. Maybe reconsider if the feature
logic gets any more complex in the future.

Bug: 1023483
Change-Id: Ic139ed099a44736644c7f5414dfd4bb0e622b077
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2021311Reviewed-by: default avatarTarun Bansal <tbansal@chromium.org>
Commit-Queue: Robert Ogden <robertogden@chromium.org>
Cr-Commit-Position: refs/heads/master@{#735198}
parent 1a6a35d9
......@@ -92,6 +92,7 @@
#include "chrome/browser/platform_util.h"
#include "chrome/browser/plugins/pdf_iframe_navigation_throttle.h"
#include "chrome/browser/plugins/plugin_utils.h"
#include "chrome/browser/prerender/isolated/isolated_prerender_features.h"
#include "chrome/browser/prerender/isolated/isolated_prerender_url_loader_interceptor.h"
#include "chrome/browser/prerender/prerender_final_status.h"
#include "chrome/browser/prerender/prerender_manager.h"
......
......@@ -12,6 +12,7 @@
#include "base/task/post_task.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"
#include "chrome/browser/prerender/isolated/isolated_prerender_features.h"
#include "chrome/browser/prerender/isolated/isolated_prerender_url_loader_interceptor.h"
#include "chrome/browser/prerender/prerender_final_status.h"
#include "chrome/browser/prerender/prerender_handle.h"
......@@ -20,7 +21,6 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/chrome_features.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
......
......@@ -6,8 +6,18 @@
namespace features {
// Forces all eligible prerenders to be done in an isolated manner such that no
// user-identifying information is used during the prefetch.
const base::Feature kIsolatePrerenders{"IsolatePrerenders",
base::FEATURE_DISABLED_BY_DEFAULT};
// Forces all isolated prerenders to be proxied through a CONNECT tunnel.
const base::Feature kIsolatedPrerenderUsesProxy{
"IsolatedPrerenderUsesProxy", base::FEATURE_DISABLED_BY_DEFAULT};
// Prefetches main frame HTML resources for results on Google SRPs.
const base::Feature kPrefetchSRPNavigationPredictions_HTMLOnly{
"PrefetchSRPNavigationPredictions_HTMLOnly",
base::FEATURE_DISABLED_BY_DEFAULT};
} // namespace features
......@@ -9,10 +9,9 @@
namespace features {
// TODO(robertogden): Migrate other IsolatedPrerender features here from
// chrome/common.
extern const base::Feature kIsolatePrerenders;
extern const base::Feature kIsolatedPrerenderUsesProxy;
extern const base::Feature kPrefetchSRPNavigationPredictions_HTMLOnly;
} // namespace features
......
......@@ -8,8 +8,6 @@
#include "base/optional.h"
#include "url/gurl.h"
// TODO(robertogden): Add feature enabled checks here.
// Returns the URL of the proxy server to use in isolated prerenders, if any.
base::Optional<GURL> IsolatedPrerenderProxyServer();
......
......@@ -9,8 +9,8 @@
#include "base/bind.h"
#include "base/feature_list.h"
#include "chrome/browser/navigation_predictor/navigation_predictor_keyed_service_factory.h"
#include "chrome/browser/prerender/isolated/isolated_prerender_features.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_features.h"
#include "components/google/core/common/google_util.h"
#include "components/search_engines/template_url_service.h"
#include "content/public/browser/browser_context.h"
......
......@@ -15,8 +15,8 @@
#include "base/test/scoped_feature_list.h"
#include "chrome/browser/navigation_predictor/navigation_predictor_keyed_service.h"
#include "chrome/browser/navigation_predictor/navigation_predictor_keyed_service_factory.h"
#include "chrome/browser/prerender/isolated/isolated_prerender_features.h"
#include "chrome/browser/prerender/isolated/prefetched_response_container.h"
#include "chrome/common/chrome_features.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/storage_partition.h"
......
......@@ -7,11 +7,11 @@
#include <memory>
#include "base/feature_list.h"
#include "chrome/browser/prerender/isolated/isolated_prerender_features.h"
#include "chrome/browser/prerender/isolated/isolated_prerender_url_loader.h"
#include "chrome/browser/prerender/prerender_manager.h"
#include "chrome/browser/prerender/prerender_manager_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_features.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/browser/web_contents.h"
......
......@@ -9,10 +9,10 @@
#include "base/command_line.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"
#include "chrome/browser/prerender/isolated/isolated_prerender_features.h"
#include "chrome/browser/prerender/prerender_handle.h"
#include "chrome/browser/prerender/prerender_manager.h"
#include "chrome/browser/prerender/prerender_manager_factory.h"
#include "chrome/common/chrome_features.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/resource_type.h"
......
......@@ -609,16 +609,6 @@ const base::Feature kPredictivePrefetchingAllowedOnAllConnectionTypes{
const base::Feature kPrerenderFallbackToPreconnect{
"PrerenderFallbackToPreconnect", base::FEATURE_DISABLED_BY_DEFAULT};
// Forces all eligible prerenders to be done in an isolated manner such that no
// user-identifying information is used during the prefetch.
const base::Feature kIsolatePrerenders{"IsolatePrerenders",
base::FEATURE_DISABLED_BY_DEFAULT};
// Prefetches main frame HTML resources for results on Google SRPs.
const base::Feature kPrefetchSRPNavigationPredictions_HTMLOnly{
"PrefetchSRPNavigationPredictions_HTMLOnly",
base::FEATURE_DISABLED_BY_DEFAULT};
// Whether to display redesign of the chrome privacy settings page
// to the user.
const base::Feature kPrivacySettingsRedesign{"PrivacySettingsRedesign",
......
......@@ -382,12 +382,6 @@ extern const base::Feature kPredictivePrefetchingAllowedOnAllConnectionTypes;
COMPONENT_EXPORT(CHROME_FEATURES)
extern const base::Feature kPrerenderFallbackToPreconnect;
COMPONENT_EXPORT(CHROME_FEATURES)
extern const base::Feature kIsolatePrerenders;
COMPONENT_EXPORT(CHROME_FEATURES)
extern const base::Feature kPrefetchSRPNavigationPredictions_HTMLOnly;
COMPONENT_EXPORT(CHROME_FEATURES)
extern const base::Feature kPrivacySettingsRedesign;
......
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