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

Side by Side Diff: components/autofill/core/common/autofill_util.cc

Issue 2706403003: [Autofill] Fix of crashes caused by show-autofill-signatures flag (Closed)
Patch Set: Added an entry to histograms.xml Created 3 years, 9 months 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/common/autofill_util.h" 5 #include "components/autofill/core/common/autofill_util.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/i18n/case_conversion.h" 10 #include "base/i18n/case_conversion.h"
(...skipping 24 matching lines...) Expand all
35 bool case_sensitive_; 35 bool case_sensitive_;
36 }; 36 };
37 37
38 } // namespace 38 } // namespace
39 39
40 bool IsFeatureSubstringMatchEnabled() { 40 bool IsFeatureSubstringMatchEnabled() {
41 return base::CommandLine::ForCurrentProcess()->HasSwitch( 41 return base::CommandLine::ForCurrentProcess()->HasSwitch(
42 switches::kEnableSuggestionsWithSubstringMatch); 42 switches::kEnableSuggestionsWithSubstringMatch);
43 } 43 }
44 44
45 bool IsShowAutofillSignaturesEnabled() {
46 return base::CommandLine::ForCurrentProcess()->HasSwitch(
47 switches::kShowAutofillSignatures);
48 }
49
45 bool IsKeyboardAccessoryEnabled() { 50 bool IsKeyboardAccessoryEnabled() {
46 #if defined(OS_ANDROID) 51 #if defined(OS_ANDROID)
47 return base::CommandLine::ForCurrentProcess()->HasSwitch( 52 return base::CommandLine::ForCurrentProcess()->HasSwitch(
48 switches::kEnableAccessorySuggestionView) || 53 switches::kEnableAccessorySuggestionView) ||
49 (base::FieldTrialList::FindFullName("AutofillKeyboardAccessory") == 54 (base::FieldTrialList::FindFullName("AutofillKeyboardAccessory") ==
50 "Enabled" && 55 "Enabled" &&
51 !base::CommandLine::ForCurrentProcess()->HasSwitch( 56 !base::CommandLine::ForCurrentProcess()->HasSwitch(
52 switches::kDisableAccessorySuggestionView)); 57 switches::kDisableAccessorySuggestionView));
53 #else // !defined(OS_ANDROID) 58 #else // !defined(OS_ANDROID)
54 return false; 59 return false;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 } 137 }
133 138
134 std::vector<std::string> LowercaseAndTokenizeAttributeString( 139 std::vector<std::string> LowercaseAndTokenizeAttributeString(
135 const std::string& attribute) { 140 const std::string& attribute) {
136 return base::SplitString(base::ToLowerASCII(attribute), 141 return base::SplitString(base::ToLowerASCII(attribute),
137 base::kWhitespaceASCII, base::TRIM_WHITESPACE, 142 base::kWhitespaceASCII, base::TRIM_WHITESPACE,
138 base::SPLIT_WANT_NONEMPTY); 143 base::SPLIT_WANT_NONEMPTY);
139 } 144 }
140 145
141 } // namespace autofill 146 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/core/common/autofill_util.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698