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 "components/autofill/core/common/autofill_switches.h" | 8 #include "components/autofill/core/common/autofill_switches.h" |
9 | 9 |
10 namespace autofill { | 10 namespace autofill { |
11 | 11 |
12 // We ignore autocomplete='off' if the user has specified the command line | 12 // We ignore autocomplete='off' unless the user has specified the command line |
13 // feature to enable it. | 13 // flag instructing otherwise. |
14 bool ShouldIgnoreAutocompleteOffForPasswordFields() { | 14 bool ShouldIgnoreAutocompleteOffForPasswordFields() { |
15 return CommandLine::ForCurrentProcess()->HasSwitch( | 15 return !CommandLine::ForCurrentProcess()->HasSwitch( |
16 switches::kEnableIgnoreAutocompleteOff); | 16 switches::kDisableIgnoreAutocompleteOff); |
17 } | 17 } |
18 | 18 |
19 } // namespace autofill | 19 } // namespace autofill |
OLD | NEW |