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

Issue 1198013002: Avoiding Vectors usage while setting info in AutofillProfile. (Closed)

Created:
5 years, 6 months ago by Deepak
Modified:
5 years, 4 months ago
CC:
chromium-reviews, estade+watch_chromium.org, browser-components-watch_chromium.org, rouslan+autofillwatch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Avoiding Vectors usage while setting info in AutofillProfile. As we are setting the first value that are getting fetched. So no need of the vectors, we can directly set the info from the query coloums and set "LIMIT 1" to get only one row of data from sql query. BUG=503055 Committed: https://crrev.com/38ab25d28eb5cda9b5e9398ff67b2b4c0e74087a Cr-Commit-Position: refs/heads/master@{#336373}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Changes as per review comments. #

Patch Set 3 : Changes as per review comments. #

Total comments: 2

Patch Set 4 : Changes as per review comments. #

Total comments: 2

Patch Set 5 : Addressing nit. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -46 lines) Patch
M components/autofill/core/browser/webdata/autofill_table.cc View 1 2 3 4 1 chunk +24 lines, -46 lines 1 comment Download

Messages

Total messages: 31 (8 generated)
Deepak
PTAL for peer review.
5 years, 6 months ago (2015-06-22 09:23:40 UTC) #2
AKV
https://codereview.chromium.org/1198013002/diff/1/components/autofill/core/browser/webdata/autofill_table.cc File components/autofill/core/browser/webdata/autofill_table.cc (right): https://codereview.chromium.org/1198013002/diff/1/components/autofill/core/browser/webdata/autofill_table.cc#newcode197 components/autofill/core/browser/webdata/autofill_table.cc:197: "WHERE guid=?")); Can we restrict the retrieval limit by ...
5 years, 6 months ago (2015-06-22 10:00:38 UTC) #3
Deepak
Changes done as suggested. PTAL https://codereview.chromium.org/1198013002/diff/1/components/autofill/core/browser/webdata/autofill_table.cc File components/autofill/core/browser/webdata/autofill_table.cc (right): https://codereview.chromium.org/1198013002/diff/1/components/autofill/core/browser/webdata/autofill_table.cc#newcode197 components/autofill/core/browser/webdata/autofill_table.cc:197: "WHERE guid=?")); On 2015/06/22 ...
5 years, 6 months ago (2015-06-22 11:31:51 UTC) #4
AKV
peer review looks good to me!
5 years, 6 months ago (2015-06-22 11:44:35 UTC) #5
Deepak
PTAL
5 years, 6 months ago (2015-06-22 11:47:55 UTC) #7
Deepak
@Garrett Please review. Thanks
5 years, 6 months ago (2015-06-23 05:27:36 UTC) #9
Garrett Casto
If you look at the OWNERS file, I only own password manager code in components/autofill. ...
5 years, 6 months ago (2015-06-23 16:49:15 UTC) #11
Ilya Sherman
Thanks, but this is not the intention of the TODO. These fields used to be ...
5 years, 6 months ago (2015-06-23 21:23:59 UTC) #13
Deepak
On 2015/06/23 21:23:59, Ilya Sherman wrote: > Thanks, but this is not the intention of ...
5 years, 6 months ago (2015-06-24 07:36:18 UTC) #14
Deepak
ok. I think now their will be only one name_first,name_middle,name_last,name_full will be there, as you ...
5 years, 6 months ago (2015-06-24 10:23:00 UTC) #15
Ilya Sherman
We currently have four tables: autofill_profiles, autofill_profile_names, autofill_profile_emails, and autofill_profile_phones. These should be combined into ...
5 years, 6 months ago (2015-06-24 23:55:49 UTC) #16
Ilya Sherman
On 2015/06/24 23:55:49, Ilya Sherman wrote: > We currently have four tables: autofill_profiles, autofill_profile_names, > ...
5 years, 6 months ago (2015-06-24 23:57:27 UTC) #17
Deepak
On 2015/06/24 23:57:27, Ilya Sherman wrote: > On 2015/06/24 23:55:49, Ilya Sherman wrote: > > ...
5 years, 6 months ago (2015-06-25 02:47:56 UTC) #18
Ilya Sherman
On 2015/06/25 02:47:56, Deepak wrote: > On 2015/06/24 23:57:27, Ilya Sherman wrote: > > On ...
5 years, 6 months ago (2015-06-25 03:09:52 UTC) #19
Deepak
On 2015/06/25 03:09:52, Ilya Sherman wrote: > On 2015/06/25 02:47:56, Deepak wrote: > > On ...
5 years, 6 months ago (2015-06-25 04:03:44 UTC) #20
Evan Stade
https://codereview.chromium.org/1198013002/diff/40001/components/autofill/core/browser/webdata/autofill_table.cc File components/autofill/core/browser/webdata/autofill_table.cc (left): https://codereview.chromium.org/1198013002/diff/40001/components/autofill/core/browser/webdata/autofill_table.cc#oldcode217 components/autofill/core/browser/webdata/autofill_table.cc:217: // TODO(estade): update schema so these aren't vectors. this ...
5 years, 6 months ago (2015-06-25 18:02:16 UTC) #21
Deepak
@Evan Thanks for review. Changes done as suggested. PTAL. https://codereview.chromium.org/1198013002/diff/40001/components/autofill/core/browser/webdata/autofill_table.cc File components/autofill/core/browser/webdata/autofill_table.cc (left): https://codereview.chromium.org/1198013002/diff/40001/components/autofill/core/browser/webdata/autofill_table.cc#oldcode217 components/autofill/core/browser/webdata/autofill_table.cc:217: ...
5 years, 6 months ago (2015-06-26 09:13:22 UTC) #22
Evan Stade
lgtm with nit fixed https://codereview.chromium.org/1198013002/diff/60001/components/autofill/core/browser/webdata/autofill_table.cc File components/autofill/core/browser/webdata/autofill_table.cc (right): https://codereview.chromium.org/1198013002/diff/60001/components/autofill/core/browser/webdata/autofill_table.cc#newcode205 components/autofill/core/browser/webdata/autofill_table.cc:205: // unique profile guid. Please ...
5 years, 6 months ago (2015-06-26 14:31:15 UTC) #23
Deepak
Thanks for review. nit addressed. https://codereview.chromium.org/1198013002/diff/60001/components/autofill/core/browser/webdata/autofill_table.cc File components/autofill/core/browser/webdata/autofill_table.cc (right): https://codereview.chromium.org/1198013002/diff/60001/components/autofill/core/browser/webdata/autofill_table.cc#newcode205 components/autofill/core/browser/webdata/autofill_table.cc:205: // unique profile guid. ...
5 years, 6 months ago (2015-06-26 14:40:43 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1198013002/80001
5 years, 6 months ago (2015-06-26 14:41:30 UTC) #27
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 6 months ago (2015-06-26 15:31:22 UTC) #28
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/38ab25d28eb5cda9b5e9398ff67b2b4c0e74087a Cr-Commit-Position: refs/heads/master@{#336373}
5 years, 6 months ago (2015-06-26 15:32:19 UTC) #29
Scott Hess - ex-Googler
5 years, 4 months ago (2015-08-12 21:31:30 UTC) #31
Message was sent while issue was closed.
https://codereview.chromium.org/1198013002/diff/80001/components/autofill/cor...
File components/autofill/core/browser/webdata/autofill_table.cc (right):

https://codereview.chromium.org/1198013002/diff/80001/components/autofill/cor...
components/autofill/core/browser/webdata/autofill_table.cc:200: "LIMIT 1"));
Note that if you have multiple items with the same GUID, without an ORDER BY
clause there is no guarantee that the first result will be the same each time. 
In practice a given release of SQLite is likely to return results in the same
implementation-defined order from run to run.  This can lead to problems like
bug 412968, where a new SQLite implementation did not return things in the same
order as the old one (in fact, in some cases the GUID meant that the order was
not stable between runs of the tests).

Since the set of items matching GUID is probably tiny, I'd probably go with
ORDER BY 2, 3, 4, 5 or something of the sort, just to make it the same each
time.  If the guid is indexed, the performance difference will probably not be
measurable.

Of course, this isn't really a problem with this CL, it was present in the
earlier code.  It's more of a hygiene consideration.

Powered by Google App Engine
This is Rietveld 408576698