Skip to content

Commit

Permalink
Remove obsolete field trial checks.
Browse files Browse the repository at this point in the history
These trials have long expired, so remove the corresponding
client side logic.

Bug: None
Change-Id: I690a40cd090f4f5e69d3c8dfdf9d934fb7ee90c7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1528975
Reviewed-by: Devlin <[email protected]>
Commit-Queue: Alexei Svitkine <[email protected]>
Cr-Commit-Position: refs/heads/master@{#642072}
  • Loading branch information
asvitkine-chromium authored and Commit Bot committed Mar 19, 2019
1 parent 8f18c40 commit 236a103
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 36 deletions.
26 changes: 2 additions & 24 deletions chrome/browser/ui/extensions/extension_message_bubble_factory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

#include "base/base_switches.h"
#include "base/command_line.h"
#include "base/metrics/field_trial.h"
#include "base/no_destructor.h"
#include "base/stl_util.h"
#include "build/build_config.h"
Expand All @@ -32,13 +31,6 @@ namespace {
ExtensionMessageBubbleFactory::OverrideForTesting g_override_for_testing =
ExtensionMessageBubbleFactory::NO_OVERRIDE;

const char kEnableDevModeWarningExperimentName[] =
"ExtensionDeveloperModeWarning";

#if !defined(OS_WIN) && !defined(OS_MACOSX)
const char kEnableProxyWarningExperimentName[] = "ExtensionProxyWarning";
#endif

// A set of all profiles evaluated, so we can tell if it's the initial check.
// TODO(devlin): It would be nice to coalesce all the "profiles evaluated" maps
// that are in the different bubble controllers.
Expand All @@ -47,18 +39,6 @@ std::set<Profile*>& GetEvaluatedProfiles() {
return *s;
}

bool IsExperimentEnabled(const char* experiment_name) {
// Don't allow turning it off via command line.
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kForceFieldTrials)) {
std::string forced_trials =
command_line->GetSwitchValueASCII(switches::kForceFieldTrials);
if (forced_trials.find(experiment_name))
return true;
}
return base::FieldTrialList::FindFullName(experiment_name) == "Enabled";
}

bool EnableSuspiciousExtensionsBubble() {
return g_override_for_testing ==
ExtensionMessageBubbleFactory::OVERRIDE_ENABLED ||
Expand All @@ -79,8 +59,7 @@ bool EnableProxyOverrideBubble() {
return true;
#else
return g_override_for_testing ==
ExtensionMessageBubbleFactory::OVERRIDE_ENABLED ||
IsExperimentEnabled(kEnableProxyWarningExperimentName);
ExtensionMessageBubbleFactory::OVERRIDE_ENABLED;
#endif
}

Expand All @@ -102,8 +81,7 @@ bool EnableDevModeBubble() {
#endif

return g_override_for_testing ==
ExtensionMessageBubbleFactory::OVERRIDE_ENABLED ||
IsExperimentEnabled(kEnableDevModeWarningExperimentName);
ExtensionMessageBubbleFactory::OVERRIDE_ENABLED;
}

} // namespace
Expand Down
12 changes: 0 additions & 12 deletions testing/variations/fieldtrial_testing_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -1985,18 +1985,6 @@
]
}
],
"ExtensionDeveloperModeWarning": [
{
"platforms": [
"mac"
],
"experiments": [
{
"name": "Enabled"
}
]
}
],
"ExtensionInstallVerification": [
{
"platforms": [
Expand Down

0 comments on commit 236a103

Please sign in to comment.