OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/common/password_autofill_util.h" | 5 #include "components/autofill/core/common/password_autofill_util.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/metrics/field_trial.h" | 8 #include "base/metrics/field_trial.h" |
9 #include "components/autofill/core/common/autofill_switches.h" | 9 #include "components/autofill/core/common/autofill_switches.h" |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 return group_name.compare(kEnablingGroup) == 0; | 23 return group_name.compare(kEnablingGroup) == 0; |
24 } | 24 } |
25 | 25 |
26 } // namespace | 26 } // namespace |
27 | 27 |
28 // We ignore autocomplete='off' unless the user has specified the command line | 28 // We ignore autocomplete='off' unless the user has specified the command line |
29 // flag instructing otherwise or is in the field trial group specifying that | 29 // flag instructing otherwise or is in the field trial group specifying that |
30 // ignore autocomplete='off' should be disabled. | 30 // ignore autocomplete='off' should be disabled. |
31 bool ShouldIgnoreAutocompleteOffForPasswordFields() { | 31 bool ShouldIgnoreAutocompleteOffForPasswordFields() { |
| 32 // TODO(jww): The field trial is scheduled to end 2014/9/1. At latest, we |
| 33 // should remove the field trial and switch by then. |
32 return !InDisableIgnoreAutocompleteOffGroup() && | 34 return !InDisableIgnoreAutocompleteOffGroup() && |
33 !CommandLine::ForCurrentProcess()->HasSwitch( | 35 !CommandLine::ForCurrentProcess()->HasSwitch( |
34 switches::kDisableIgnoreAutocompleteOff); | 36 switches::kDisableIgnoreAutocompleteOff); |
35 } | 37 } |
36 | 38 |
37 } // namespace autofill | 39 } // namespace autofill |
OLD | NEW |