PasswordFormManager::best_matches should return a const ref
commite88809afcdd3e70a4f527edaec1d6b9b7ff4e7ac
authorvabr@chromium.org <vabr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 9 Jul 2014 13:14:30 +0000 (9 13:14 +0000)
committervabr@chromium.org <vabr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 9 Jul 2014 13:14:30 +0000 (9 13:14 +0000)
treec3c7a0d5427f073b21f613a653f9e016dec54643
parented921a04a86cc068cd1e7452da7ddb1861da246a
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
components/password_manager/core/browser/password_form_manager.h