Commit e88809af authored by vabr@chromium.org's avatar vabr@chromium.org

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
parent ed921a04
...@@ -157,7 +157,7 @@ class PasswordFormManager : public PasswordStoreConsumer { ...@@ -157,7 +157,7 @@ class PasswordFormManager : public PasswordStoreConsumer {
} }
// Returns the best matches. // Returns the best matches.
const autofill::PasswordFormMap best_matches() const { const autofill::PasswordFormMap& best_matches() const {
return best_matches_; return best_matches_;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment