Commit 82b1af68 authored by Caitlin Fischer's avatar Caitlin Fischer Committed by Commit Bot

Move kRestrictGoogleWebVisibility into variations_features.h.

Doing this allows us to avoid the below DCHECK encountered when running
the status quo tests. Having variations_features.h allows us to avoid
splitting the variations static_library into two because
variations_features can have its own target in the BUILD file.

...FATAL:feature_list.cc(472)]
Check failed: CheckFeatureIdentity(feature). RestrictGoogleWebVisibility

Bug: 1094303
Change-Id: I9ee3f02d8f3cde7398e759fe54b19cdc9ebb2271
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2410554
Commit-Queue: Caitlin Fischer <caitlinfischer@google.com>
Reviewed-by: default avatarAlexei Svitkine <asvitkine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#808032}
parent eeb9e4d5
...@@ -17,6 +17,19 @@ buildflag_header("buildflags") { ...@@ -17,6 +17,19 @@ buildflag_header("buildflags") {
flags = [ "LARGE_VARIATION_KEY_SIZE=$large_variation_key_size_enabled" ] flags = [ "LARGE_VARIATION_KEY_SIZE=$large_variation_key_size_enabled" ]
} }
component("variations_features") {
output_name = "variations_features"
defines = [ "IS_VARIATIONS_FEATURES_IMPL" ]
sources = [
"variations_features.cc",
"variations_features.h",
]
deps = [ "//base" ]
}
static_library("variations") { static_library("variations") {
sources = [ sources = [
"active_field_trials.cc", "active_field_trials.cc",
...@@ -86,6 +99,8 @@ static_library("variations") { ...@@ -86,6 +99,8 @@ static_library("variations") {
] ]
} }
public_deps = [ ":variations_features" ]
deps = [ deps = [
":buildflags", ":buildflags",
"proto", "proto",
......
...@@ -17,13 +17,6 @@ ...@@ -17,13 +17,6 @@
namespace variations { namespace variations {
namespace internal {
const base::Feature kRestrictGoogleWebVisibility{
"RestrictGoogleWebVisibility", base::FEATURE_DISABLED_BY_DEFAULT};
} // namespace internal
namespace { namespace {
// The internal singleton accessor for the map, used to keep it thread-safe. // The internal singleton accessor for the map, used to keep it thread-safe.
......
...@@ -45,14 +45,6 @@ ...@@ -45,14 +45,6 @@
namespace variations { namespace variations {
namespace internal {
// A feature that supports more finely-grained control over the transmission of
// VariationIDs to Google web properties by allowing some VariationIDs to not be
// transmitted in all contexts. See IsFirstPartyContext() in
// variations_http_headers.cc for more details.
extern const base::Feature kRestrictGoogleWebVisibility;
} // namespace internal
typedef int VariationID; typedef int VariationID;
const VariationID EMPTY_ID = 0; const VariationID EMPTY_ID = 0;
......
// Copyright 2020 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/variations/variations_features.h"
namespace variations {
namespace internal {
const base::Feature kRestrictGoogleWebVisibility{
"RestrictGoogleWebVisibility", base::FEATURE_DISABLED_BY_DEFAULT};
} // namespace internal
} // namespace variations
// Copyright 2020 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_VARIATIONS_VARIATIONS_FEATURES_H_
#define COMPONENTS_VARIATIONS_VARIATIONS_FEATURES_H_
#include "base/component_export.h"
#include "base/metrics/field_trial.h"
namespace variations {
namespace internal {
// A feature that supports more finely-grained control over the transmission of
// VariationIDs to Google web properties by allowing some VariationIDs to not be
// transmitted in all contexts. See IsFirstPartyContext() in
// variations_http_headers.cc for more details.
COMPONENT_EXPORT(VARIATIONS_FEATURES)
extern const base::Feature kRestrictGoogleWebVisibility;
} // namespace internal
} // namespace variations
#endif // COMPONENTS_VARIATIONS_VARIATIONS_ASSOCIATED_DATA_H_
\ No newline at end of file
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include "base/strings/string_util.h" #include "base/strings/string_util.h"
#include "components/variations/proto/client_variations.pb.h" #include "components/variations/proto/client_variations.pb.h"
#include "components/variations/variations_client.h" #include "components/variations/variations_client.h"
#include "components/variations/variations_features.h"
namespace variations { namespace variations {
......
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