|
|
Chromium Code Reviews
Description[Password Manager] Add the scheme to sort keys for chrome://settings/passwords
The scheme was not a part of sort key. Therefore, we merged http and https credentials (if they have the same origin, username and password). See the bug for details.
BUG=658981
Committed: https://crrev.com/2064c3247e03ad89688194f7bd4fa79479363644
Cr-Commit-Position: refs/heads/master@{#432189}
Patch Set 1 #
Total comments: 8
Patch Set 2 : Small fix #Patch Set 3 : Changes addressed to reviewer comments #
Messages
Total messages: 23 (12 generated)
Description was changed from ========== o BUG= ========== to ========== [Password Manager] Add the scheme to sort keys for chrome://settings/passwords The scheme was not a part of sort key. Therefore, we merged http and https credentials (if they have the same origin, username and password). See the bug for details. BUG=658981 ==========
Patchset #2 (id:20001) has been deleted
Patchset #1 (id:1) has been deleted
Patchset #1 (id:40001) has been deleted
kolos@chromium.org changed reviewers: + vasilii@chromium.org
Hi Vasilii, Please review this CL. Regards, Maxim
https://codereview.chromium.org/2500393002/diff/60001/chrome/browser/ui/passw... File chrome/browser/ui/passwords/password_manager_presenter.cc (right): https://codereview.chromium.org/2500393002/diff/60001/chrome/browser/ui/passw... chrome/browser/ui/passwords/password_manager_presenter.cc:97: if (!form.federation_origin.unique()) Why don't you just use Origin::Serialize()? https://codereview.chromium.org/2500393002/diff/60001/chrome/browser/ui/passw... chrome/browser/ui/passwords/password_manager_presenter.cc:100: key = key + kSortKeyPartsSeparator + kSortKeyNoFederationSymbol; key+= is faster and easier to read.
Patchset #2 (id:80001) has been deleted
https://codereview.chromium.org/2500393002/diff/60001/chrome/browser/ui/passw... File chrome/browser/ui/passwords/password_manager_presenter.cc (right): https://codereview.chromium.org/2500393002/diff/60001/chrome/browser/ui/passw... chrome/browser/ui/passwords/password_manager_presenter.cc:97: if (!form.federation_origin.unique()) Serialize() returns "null" if there is no federation. "null" will be compared with other federations. But I would like to separate the entries with federations and the entries w/o federations. The special symbol like "-" does that. The entries w/o federations appear earlier. https://codereview.chromium.org/2500393002/diff/60001/chrome/browser/ui/passw... chrome/browser/ui/passwords/password_manager_presenter.cc:100: key = key + kSortKeyPartsSeparator + kSortKeyNoFederationSymbol; On 2016/11/15 13:18:10, vasilii wrote: > key+= is faster and easier to read. In this particular case, we cannot use +=, because the compiler will calculate the sum of two characters and add it to |key|. But we want to add the concatenation of these characters.
https://codereview.chromium.org/2500393002/diff/60001/chrome/browser/ui/passw... File chrome/browser/ui/passwords/password_manager_presenter.cc (right): https://codereview.chromium.org/2500393002/diff/60001/chrome/browser/ui/passw... chrome/browser/ui/passwords/password_manager_presenter.cc:97: if (!form.federation_origin.unique()) On 2016/11/15 13:57:38, kolos1 wrote: > Serialize() returns "null" if there is no federation. "null" will be compared > with other federations. > > But I would like to separate the entries with federations and the entries w/o > federations. The special symbol like "-" does that. The entries w/o federations > appear earlier. If it's important then it should go to a comment on kSortKeyNoFederationSymbol. https://codereview.chromium.org/2500393002/diff/60001/chrome/browser/ui/passw... chrome/browser/ui/passwords/password_manager_presenter.cc:100: key = key + kSortKeyPartsSeparator + kSortKeyNoFederationSymbol; On 2016/11/15 13:57:38, kolos1 wrote: > On 2016/11/15 13:18:10, vasilii wrote: > > key+= is faster and easier to read. > In this particular case, we cannot use +=, because the compiler will calculate > the sum of two characters and add it to |key|. But we want to add the > concatenation of these characters. key += kSortKeyPartsSeparator; if () key += form.federation_origin.host(); else key += kSortKeyNoFederationSymbol;
https://groups.google.com/a/chromium.org/forum/?utm_source=digest&utm_medium=... explains why using strings carefully is important.
Patchset #3 (id:120001) has been deleted
https://codereview.chromium.org/2500393002/diff/60001/chrome/browser/ui/passw... File chrome/browser/ui/passwords/password_manager_presenter.cc (right): https://codereview.chromium.org/2500393002/diff/60001/chrome/browser/ui/passw... chrome/browser/ui/passwords/password_manager_presenter.cc:97: if (!form.federation_origin.unique()) On 2016/11/15 14:14:54, vasilii wrote: > On 2016/11/15 13:57:38, kolos1 wrote: > > Serialize() returns "null" if there is no federation. "null" will be compared > > with other federations. > > > > But I would like to separate the entries with federations and the entries w/o > > federations. The special symbol like "-" does that. The entries w/o > federations > > appear earlier. > > If it's important then it should go to a comment on kSortKeyNoFederationSymbol. Done. https://codereview.chromium.org/2500393002/diff/60001/chrome/browser/ui/passw... chrome/browser/ui/passwords/password_manager_presenter.cc:100: key = key + kSortKeyPartsSeparator + kSortKeyNoFederationSymbol; On 2016/11/15 14:14:55, vasilii wrote: > On 2016/11/15 13:57:38, kolos1 wrote: > > On 2016/11/15 13:18:10, vasilii wrote: > > > key+= is faster and easier to read. > > In this particular case, we cannot use +=, because the compiler will calculate > > the sum of two characters and add it to |key|. But we want to add the > > concatenation of these characters. > > key += kSortKeyPartsSeparator; > if () > key += form.federation_origin.host(); > else > key += kSortKeyNoFederationSymbol; Done.
lgtm
The CQ bit was checked by kolos@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by kolos@chromium.org
The CQ bit was checked by kolos@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== [Password Manager] Add the scheme to sort keys for chrome://settings/passwords The scheme was not a part of sort key. Therefore, we merged http and https credentials (if they have the same origin, username and password). See the bug for details. BUG=658981 ========== to ========== [Password Manager] Add the scheme to sort keys for chrome://settings/passwords The scheme was not a part of sort key. Therefore, we merged http and https credentials (if they have the same origin, username and password). See the bug for details. BUG=658981 ==========
Message was sent while issue was closed.
Committed patchset #3 (id:140001)
Message was sent while issue was closed.
Description was changed from ========== [Password Manager] Add the scheme to sort keys for chrome://settings/passwords The scheme was not a part of sort key. Therefore, we merged http and https credentials (if they have the same origin, username and password). See the bug for details. BUG=658981 ========== to ========== [Password Manager] Add the scheme to sort keys for chrome://settings/passwords The scheme was not a part of sort key. Therefore, we merged http and https credentials (if they have the same origin, username and password). See the bug for details. BUG=658981 Committed: https://crrev.com/2064c3247e03ad89688194f7bd4fa79479363644 Cr-Commit-Position: refs/heads/master@{#432189} ==========
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/2064c3247e03ad89688194f7bd4fa79479363644 Cr-Commit-Position: refs/heads/master@{#432189} |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
