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

Issue 382493003: PasswordFormManager::best_matches should return a const ref (Closed)

Created:
6 years, 5 months ago by vabr (Chromium)
Modified:
6 years, 5 months ago
Reviewers:
engedy, Mike West
CC:
chromium-reviews, gcasto+watchlist_chromium.org, mkwst+watchlist_chromium.org
Project:
chromium
Visibility:
Public.

Description

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 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=282018

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M components/password_manager/core/browser/password_form_manager.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
vabr (Chromium)
Balázs: FYI Mike, This code is used by the bubble, PTAL. Cheers, Vaclav
6 years, 5 months ago (2014-07-09 11:15:46 UTC) #1
engedy
On 2014/07/09 11:15:46, vabr (Chromium) wrote: > Balázs: FYI > > Mike, > This code ...
6 years, 5 months ago (2014-07-09 11:59:33 UTC) #2
Mike West
No tests?! LGTM2. ;)
6 years, 5 months ago (2014-07-09 12:06:02 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vabr@chromium.org/382493003/1
6 years, 5 months ago (2014-07-09 12:06:37 UTC) #4
commit-bot: I haz the power
6 years, 5 months ago (2014-07-09 13:14:33 UTC) #5
Message was sent while issue was closed.
Change committed as 282018

Powered by Google App Engine
This is Rietveld 408576698