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

Issue 1094013002: PasswordFormManager: Clean up PasswordForm pointer ownership. (Closed)

Created:
5 years, 8 months ago by Matt Giuca
Modified:
5 years, 8 months ago
Reviewers:
vabr (Chromium)
CC:
chromium-reviews, gcasto+watchlist_chromium.org, vabr+watchlist_chromium.org, mkwst+watchlist-passwords_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@image-scopedptr
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

PasswordFormManager: Clean up PasswordForm pointer ownership. In the PasswordFormManager::OnRequestDone method, I found some usage of raw pointers to elements of a ScopedVector with confusing ownership over a lot of code. Rewrote the code to use scoped_ptrs so that the ownership is always clear, and nothing needs to be manually deleted. BUG=451018 Committed: https://crrev.com/f83db42d42fe8b672e13316c54110d4cf2315828 Cr-Commit-Position: refs/heads/master@{#326745}

Patch Set 1 #

Patch Set 2 : Added include. #

Total comments: 5

Patch Set 3 : Revert back to using a reference (minimize map lookups). #

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

Messages

Total messages: 10 (2 generated)
Matt Giuca
Hi Vaclav, I was recently doing some cleanup involving scoped pointers and found this code ...
5 years, 8 months ago (2015-04-20 06:02:37 UTC) #2
vabr (Chromium)
Thanks, Matt! This LGTM, although I have a comment below. Cheers, Vaclav https://codereview.chromium.org/1094013002/diff/20001/components/password_manager/core/browser/password_form_manager.cc File components/password_manager/core/browser/password_form_manager.cc ...
5 years, 8 months ago (2015-04-22 09:43:27 UTC) #3
vabr (Chromium)
Also, could you please add BUG=451018 to the CL description to help tracking related changes? ...
5 years, 8 months ago (2015-04-22 09:44:08 UTC) #4
Matt Giuca
https://codereview.chromium.org/1094013002/diff/20001/components/password_manager/core/browser/password_form_manager.cc File components/password_manager/core/browser/password_form_manager.cc (right): https://codereview.chromium.org/1094013002/diff/20001/components/password_manager/core/browser/password_form_manager.cc#newcode424 components/password_manager/core/browser/password_form_manager.cc:424: const base::string16& username = login->username_value; Hi, yeah this is ...
5 years, 8 months ago (2015-04-23 01:17:36 UTC) #5
vabr (Chromium)
This LGTM, thanks for improving this code! Vaclav https://codereview.chromium.org/1094013002/diff/20001/components/password_manager/core/browser/password_form_manager.cc File components/password_manager/core/browser/password_form_manager.cc (right): https://codereview.chromium.org/1094013002/diff/20001/components/password_manager/core/browser/password_form_manager.cc#newcode424 components/password_manager/core/browser/password_form_manager.cc:424: const ...
5 years, 8 months ago (2015-04-23 09:22:20 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1094013002/40001
5 years, 8 months ago (2015-04-24 04:32:30 UTC) #8
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 8 months ago (2015-04-24 05:39:19 UTC) #9
commit-bot: I haz the power
5 years, 8 months ago (2015-04-24 05:40:21 UTC) #10
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/f83db42d42fe8b672e13316c54110d4cf2315828
Cr-Commit-Position: refs/heads/master@{#326745}

Powered by Google App Engine
This is Rietveld 408576698