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

Unified Diff: components/autofill/content/renderer/form_autofill_util.cc

Issue 382243002: Cleanup return values in autofill (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: components/autofill/content/renderer/form_autofill_util.cc
diff --git a/components/autofill/content/renderer/form_autofill_util.cc b/components/autofill/content/renderer/form_autofill_util.cc
index c2deecd129486e04e6fe69c42a8a3389bb317e4e..11f75575223fbd71c1b5c094562a2505616843e2 100644
--- a/components/autofill/content/renderer/form_autofill_util.cc
+++ b/components/autofill/content/renderer/form_autofill_util.cc
@@ -675,7 +675,7 @@ bool IsAutofillableInputElement(const WebInputElement* element) {
IsCheckableElement(element);
}
-const base::string16 GetFormIdentifier(const WebFormElement& form) {
+const base::string16& GetFormIdentifier(const WebFormElement& form) {
vabr (Chromium) 2014/07/11 13:37:43 Here returning a reference won't work, because the
Ilya Sherman 2014/07/11 19:11:10 As I mentioned on the bug, the const here is corre
vabr (Chromium) 2014/07/11 19:24:47 Thanks for pointing that out. Let's revert the cha
lucinka.brozkova 2014/07/11 21:05:57 Done.
base::string16 identifier = form.name();
CR_DEFINE_STATIC_LOCAL(WebString, kId, ("id"));
if (identifier.empty())

Powered by Google App Engine
This is Rietveld 408576698