Closed
Bug 812090
Opened 12 years ago
Closed 12 years ago
Match imported favicons to multiple pages
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 19
People
(Reporter: bnicholson, Assigned: bnicholson)
References
Details
Attachments
(1 file)
|
4.97 KB,
patch
|
lucasr
:
review+
|
Details | Diff | Splinter Review |
An IRC user reported missing favicons, and he may have been referring to this. Because of the GROUP BY clause in the query, we don't select existing favicons that have duplicate URLs. The problem with doing this is that any other pages that use the same favicon URL won't be associated with that favicon.
This patch uses a different approach by selecting all favicons from the images table. Before insertion, the favicons table is first queried to prevent duplicates. This allows all pages before the upgrade to be associated with the correct favicons.
This could have been simplified with insertWithOnConflict() and the CONFLICT_IGNORE flag, but unfortunately, it wasn't returning the id of the existing row (https://code.google.com/p/android/issues/detail?id=13045).
Attachment #681877 -
Flags: review?(lucasr.at.mozilla)
Comment 1•12 years ago
|
||
Comment on attachment 681877 [details] [diff] [review]
Match imported favicons to multiple pages
Review of attachment 681877 [details] [diff] [review]:
-----------------------------------------------------------------
Good.
::: mobile/android/base/db/BrowserProvider.java.in
@@ +1401,5 @@
> + Cursor c2 = db.query(TABLE_FAVICONS,
> + new String[] { Favicons._ID },
> + Favicons.URL + " = ?",
> + new String[] { faviconUrl },
> + null, null, null);
It's usually better to close cursors in a finally block.
Attachment #681877 -
Flags: review?(lucasr.at.mozilla) → review+
| Assignee | ||
Comment 2•12 years ago
|
||
Comment 3•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 19
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•