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

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

Issue 1473733008: [Autofill] Respect the autocomplete=off attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years 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 #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
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
OLDNEW
« no previous file with comments | « components/autofill/core/common/autofill_util.h ('k') | third_party/WebKit/Source/web/WebFormControlElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698