PasswordFormManager::best_matches should return a const ref
Currently, it returns 'const PasswordFormMap'. While returning a value, marking it const does not make much sense (it's a copy anyway). So it should be either 'const PasswordFormMap&' or just 'PasswordFormMap'. The only place this call is used at makes a copy of the result anyway, so I chose the former. That also seems to be a more versatile choice -- if somebody needs just a read-only copy in the future, returning by value would result in an unnecessary copy. BUG=261628 R=mkwst@chromium.org Review URL: https://codereview.chromium.org/382493003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282018 0039d316-1c4b-4281-b951-d872f2087c98
Showing
Please register or sign in to comment