chrome/browser/about_flags.cc
// Removes all experiments from prefs::kEnabledLabsExperiments that are
// unknown, to prevent this list to become very long as experiments are added
// and removed.
Removes all experiments from prefs::kEnabledLabsExperiments that are
unknown, to prevent this list to become very long as experiments are added
and removed.
Removes all experiments from prefs :: kEnabledLabsExperiments that are unknown to prevent this list to become very long as experiments are added and removed .
void SanitizeList(PrefService* prefs) {
  std::set<std::string> known_experiments;
  for (size_t i = 0; i < num_experiments; ++i) {
    DCHECK(ValidateExperiment(experiments[i]));
    AddInternalName(experiments[i], &known_experiments);
  }
  std::set<std::string> enabled_experiments;
  GetEnabledFlags(prefs, &enabled_experiments);
  std::set<std::string> new_enabled_experiments;
  std::set_intersection(
      known_experiments.begin(), known_experiments.end(),
      enabled_experiments.begin(), enabled_experiments.end(),
      std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
  if (new_enabled_experiments != enabled_experiments)
    SetEnabledFlags(prefs, new_enabled_experiments);
}
void SanitizeList ( PrefService * prefs ) { std :: set < std :: string > known_experiments ; for ( size_t i = 0 ; i < num_experiments ; ++ i ) { DCHECK ( ValidateExperiment ( experiments [ i ] ) ) ; AddInternalName ( experiments [ i ] , & known_experiments ) ; } std :: set < std :: string > enabled_experiments ; GetEnabledFlags ( prefs , & enabled_experiments ) ; std :: set < std :: string > new_enabled_experiments ; std :: set_intersection ( known_experiments . begin ( ) , known_experiments . end ( ) , enabled_experiments . begin ( ) , enabled_experiments . end ( ) , std :: inserter ( new_enabled_experiments , new_enabled_experiments . begin ( ) ) ) ; if ( new_enabled_experiments != enabled_experiments ) SetEnabledFlags ( prefs , new_enabled_experiments ) ; }
Removes all experiments from prefs::kEnabledLabsExperiments that are
unknown, to prevent this list to become very long as experiments are added
and removed.
Removes all experiments from prefs :: kEnabledLabsExperiments that are unknown to prevent this list to become very long as experiments are added and removed .