| OLD | NEW |
| 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 #ifndef COMPONENTS_AUTOFILL_CORE_COMMON_AUTOFILL_UTIL_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_COMMON_AUTOFILL_UTIL_H_ |
| 6 #define COMPONENTS_AUTOFILL_CORE_COMMON_AUTOFILL_UTIL_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_COMMON_AUTOFILL_UTIL_H_ |
| 7 | 7 |
| 8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
| 9 | 9 |
| 10 namespace autofill { | 10 namespace autofill { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 // Finds the first occurrence of a searched substring |field_contents| within | 30 // Finds the first occurrence of a searched substring |field_contents| within |
| 31 // the string |suggestion| starting at token boundaries and returns the index to | 31 // the string |suggestion| starting at token boundaries and returns the index to |
| 32 // the end of the located substring, or base::string16::npos if the substring is | 32 // the end of the located substring, or base::string16::npos if the substring is |
| 33 // not found. "preview-on-hover" feature is one such use case where the | 33 // not found. "preview-on-hover" feature is one such use case where the |
| 34 // substring |field_contents| may not be found within the string |suggestion|. | 34 // substring |field_contents| may not be found within the string |suggestion|. |
| 35 size_t GetTextSelectionStart(const base::string16& suggestion, | 35 size_t GetTextSelectionStart(const base::string16& suggestion, |
| 36 const base::string16& field_contents, | 36 const base::string16& field_contents, |
| 37 bool case_sensitive); | 37 bool case_sensitive); |
| 38 | 38 |
| 39 // Returns true if running on a desktop platform. Any platform that is not |
| 40 // Android or iOS is considered desktop. |
| 41 bool IsDesktopPlatform(); |
| 42 |
| 39 } // namespace autofill | 43 } // namespace autofill |
| 40 | 44 |
| 41 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_AUTOFILL_UTIL_H_ | 45 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_AUTOFILL_UTIL_H_ |
| OLD | NEW |