Commit 8bf4bf24 authored by Paul Miller's avatar Paul Miller Committed by Commit Bot

Revert "WebView: Ignore permanent-consistency experiments"

This reverts commit ef70c85e.

Reason for revert: WebView now supports permanent-consistency.

BUG=866722

Original change's description:
> WebView: Ignore permanent-consistency experiments
> 
> Android WebView currently treats permanent-consistency experiments
> (which are intended to retain their group assignments across runs) as
> session-consistency (which are intended to be randomly assigned on each
> run). It's safer to not apply permanent-consistency experiments to
> WebView at all, to avoid mistakes.
> 
> BUG=866722
> 
> Change-Id: I9d501437718d934c2a59b95335c787302ce758e7
> Reviewed-on: https://chromium-review.googlesource.com/1148991
> Reviewed-by: Changwan Ryu <changwan@chromium.org>
> Reviewed-by: Steven Holte <holte@chromium.org>
> Commit-Queue: Paul Miller <paulmiller@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#578070}

TBR=changwan@chromium.org,holte@chromium.org,paulmiller@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 866722
Change-Id: Ifd00450fbba1afc1db619109cf918ef75cbcf84f
Reviewed-on: https://chromium-review.googlesource.com/1237244Reviewed-by: default avatarPaul Miller <paulmiller@chromium.org>
Reviewed-by: default avatarSteven Holte <holte@chromium.org>
Commit-Queue: Paul Miller <paulmiller@chromium.org>
Cr-Commit-Position: refs/heads/master@{#594491}
parent dfdb8997
......@@ -54,10 +54,6 @@ Channel AwVariationsServiceClient::GetChannel() {
return android_webview::GetChannelOrStable();
}
bool AwVariationsServiceClient::GetSupportsPermanentConsistency() {
return false;
}
bool AwVariationsServiceClient::OverridesRestrictParameter(
std::string* parameter) {
return false;
......
......@@ -31,7 +31,6 @@ class AwVariationsServiceClient : public variations::VariationsServiceClient {
scoped_refptr<network::SharedURLLoaderFactory> GetURLLoaderFactory() override;
network_time::NetworkTimeTracker* GetNetworkTimeTracker() override;
version_info::Channel GetChannel() override;
bool GetSupportsPermanentConsistency() override;
bool OverridesRestrictParameter(std::string* parameter) override;
DISALLOW_COPY_AND_ASSIGN(AwVariationsServiceClient);
......
......@@ -47,11 +47,6 @@ struct ClientFilterableState {
// Based on base::SysInfo::IsLowEndDevice().
bool is_low_end_device = false;
// Whether this platform supports experiments which retain their group
// assignments across runs.
// TODO(paulmiller): Remove this once https://crbug.com/866722 is resolved.
bool supports_permanent_consistency = true;
// The country code to use for studies configured with session consistency.
std::string session_consistency_country;
......
......@@ -12,7 +12,6 @@ static_library("service") {
"variations_field_trial_creator.h",
"variations_service.cc",
"variations_service.h",
"variations_service_client.cc",
"variations_service_client.h",
]
......
......@@ -259,8 +259,6 @@ VariationsFieldTrialCreator::GetClientFilterableStateForVersion(
// evaluated, that field trial would not be able to apply for this case.
state->is_low_end_device = base::SysInfo::IsLowEndDevice();
#endif
state->supports_permanent_consistency =
client_->GetSupportsPermanentConsistency();
state->session_consistency_country = GetLatestCountry();
state->permanent_consistency_country = LoadPermanentConsistencyCountry(
version, state->session_consistency_country);
......
// 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/variations/service/variations_service_client.h"
namespace variations {
bool VariationsServiceClient::GetSupportsPermanentConsistency() {
return true;
}
} // namespace variations
......@@ -45,11 +45,6 @@ class VariationsServiceClient {
// Gets the channel of the embedder.
virtual version_info::Channel GetChannel() = 0;
// Gets whether this platform supports experiments which retain their group
// assignments across runs.
// TODO(paulmiller): Remove this once https://crbug.com/866722 is resolved.
virtual bool GetSupportsPermanentConsistency();
// Returns whether the embedder overrides the value of the restrict parameter.
// |parameter| is an out-param that will contain the value of the restrict
// parameter if true is returned.
......
......@@ -12,7 +12,6 @@
#include "base/stl_util.h"
#include "base/strings/string_util.h"
#include "components/variations/client_filterable_state.h"
#include "components/variations/proto/study.pb.h"
namespace variations {
namespace {
......@@ -267,14 +266,6 @@ bool ShouldAddStudy(const Study& study,
}
}
// TODO(paulmiller): Remove this once https://crbug.com/866722 is resolved.
if (study.consistency() == Study_Consistency_PERMANENT &&
!client_state.supports_permanent_consistency) {
DVLOG(1) << "Filtered out study " << study.name()
<< " due to supports_permanent_consistency.";
return false;
}
DVLOG(1) << "Kept study " << study.name() << ".";
return true;
}
......
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