| 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 #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 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 // Returns the character position right after the |field_contents| within | 89 // Returns the character position right after the |field_contents| within |
| 90 // |suggestion| text as a caret position for text selection. | 90 // |suggestion| text as a caret position for text selection. |
| 91 return it - suggestion.begin() + field_contents.size(); | 91 return it - suggestion.begin() + field_contents.size(); |
| 92 } | 92 } |
| 93 } | 93 } |
| 94 | 94 |
| 95 // Unable to find the |field_contents| in |suggestion| text. | 95 // Unable to find the |field_contents| in |suggestion| text. |
| 96 return base::string16::npos; | 96 return base::string16::npos; |
| 97 } | 97 } |
| 98 | 98 |
| 99 bool IsDesktopPlatform() { |
| 100 #if defined(OS_ANDROID) || defined(OS_IOS) |
| 101 return false; |
| 102 #else |
| 103 return true; |
| 104 #endif |
| 105 } |
| 106 |
| 99 } // namespace autofill | 107 } // namespace autofill |
| OLD | NEW |