Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(216)

Side by Side Diff: components/autofill/core/browser/autofill_experiments.cc

Issue 2588133002: Make form-not-secure controllable as its own separate Finch feature (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/autofill/core/browser/autofill_experiments.h" 5 #include "components/autofill/core/browser/autofill_experiments.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/feature_list.h" 8 #include "base/feature_list.h"
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
11 #include "base/strings/string_number_conversions.h" 11 #include "base/strings/string_number_conversions.h"
12 #include "base/strings/string_util.h" 12 #include "base/strings/string_util.h"
13 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
14 #include "build/build_config.h" 14 #include "build/build_config.h"
15 #include "components/autofill/core/browser/suggestion.h" 15 #include "components/autofill/core/browser/suggestion.h"
16 #include "components/autofill/core/common/autofill_pref_names.h" 16 #include "components/autofill/core/common/autofill_pref_names.h"
17 #include "components/autofill/core/common/autofill_switches.h" 17 #include "components/autofill/core/common/autofill_switches.h"
18 #include "components/prefs/pref_service.h" 18 #include "components/prefs/pref_service.h"
19 #include "components/security_state/core/switches.h" 19 #include "components/security_state/core/security_state.h"
20 #include "components/sync/driver/sync_service.h" 20 #include "components/sync/driver/sync_service.h"
21 #include "components/variations/variations_associated_data.h" 21 #include "components/variations/variations_associated_data.h"
22 #include "google_apis/gaia/gaia_auth_util.h" 22 #include "google_apis/gaia/gaia_auth_util.h"
23 #include "grit/components_strings.h" 23 #include "grit/components_strings.h"
24 #include "ui/base/l10n/l10n_util.h" 24 #include "ui/base/l10n/l10n_util.h"
25 25
26 namespace autofill { 26 namespace autofill {
27 27
28 const base::Feature kAutofillCreditCardAssist{ 28 const base::Feature kAutofillCreditCardAssist{
29 "AutofillCreditCardAssist", base::FEATURE_DISABLED_BY_DEFAULT}; 29 "AutofillCreditCardAssist", base::FEATURE_DISABLED_BY_DEFAULT};
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 return true; 221 return true;
222 } 222 }
223 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 223 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
224 switches::kDisableOfferUploadCreditCards)) { 224 switches::kDisableOfferUploadCreditCards)) {
225 return false; 225 return false;
226 } 226 }
227 227
228 return !group_name.empty() && group_name != "Disabled"; 228 return !group_name.empty() && group_name != "Disabled";
229 } 229 }
230 230
231 bool IsCreditCardAutofillHttpWarningEnabled() { 231 bool IsCreditCardAutofillHttpWarningEnabled() {
Mathieu 2016/12/19 20:15:49 I think it's fine to remove this function and call
estark 2016/12/19 20:49:45 Done.
232 std::string choice = 232 return security_state::IsHttpWarningInFormEnabled();
233 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
234 security_state::switches::kMarkHttpAs);
235 return choice == security_state::switches::
236 kMarkHttpWithPasswordsOrCcWithChipAndFormWarning;
237 } 233 }
238 234
239 } // namespace autofill 235 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698