Commit Graph
208 Commits
Author SHA1 Message Date
Michael Comella 45b9e77392 Bug 1403755: Rm code to insert blanks into top sites. r=liuche
This code was being mistakenly activated when getting top sites for Activity
Stream.

This is the first removal of old top sites code and will mean we can't go back
to old top sites by flipping the `ActivityStream.isEnabled` flag. Since we're
planning to ship AS, this shouldn't matter.


MozReview-Commit-ID: 9VB0RqNHmE0
2017-09-28 14:09:48 -07:00
Michael Comella 6c5ec0776b Bug 1391413: Add SuggestedSites.cachedDistributionSites and accessors. r=sebastian
MozReview-Commit-ID: HBqKc8a0tNJ
2017-09-07 15:18:41 -07:00
Michael Comella 8c48bffc67 Bug 1391413: Remove unused Site constructor. r=sebastian
MozReview-Commit-ID: F7cnUsBsmoR
2017-09-07 13:36:08 -07:00
Chenxia Liu 89ae90b9cb Bug 1396054 - Filter highlight candidates based on settings. r=mcomella
MozReview-Commit-ID: 8e36KZsuh27
2017-09-03 09:35:01 -07:00
Sebastian Kaspari eda242c262 Bug 1396604 - Remove content notifications code. r=JanH,nechen
MozReview-Commit-ID: 5H45Vjnzt5Z
2017-09-04 16:51:07 +02:00
Grigory Kruglov e492f83f07 Bug 1392802 - Increment localVersion while reconciling a bookmark if we modified its dateAdded t.s. r=rnewman
We might decide that there's an older dateAdded timestamp present for an incoming bookmark while processing it,
in which case we need to ensure that our changes will be uploaded.

MozReview-Commit-ID: BKLh4rYBiRu
2017-08-29 20:12:46 -04:00
Grigory Kruglov 95e66b0765 Bug 1388884 - Do not delete bookmark tombstones r=rnewman
As implemented, this means we might upload tombstones for never-synced
bookmarks. This _should_ be harmless.

MozReview-Commit-ID: DZx9yWDs1ie
2017-08-29 14:01:14 -04:00
Grigory Kruglov 74fdaf79c0 Bug 1392078 - More detailed strong assertions to help narrow down root cause r=rnewman
MozReview-Commit-ID: JSN9Q837u6R
2017-08-21 17:42:44 -04:00
Grigory Kruglov c1faab4fb6 Bug 1364644 - Versioned syncing of bookmarks r=rnewman
MozReview-Commit-ID: 5IdRPUXMDPh
2017-08-16 21:02:21 -04:00
Grigory Kruglov 7a87b51b9b Bug 1364644 - Bookmark version tracking r=rnewman
MozReview-Commit-ID: EdN4pYSR8Ux
2017-08-15 17:28:56 -04:00
Grigory Kruglov 7827d58772 Bug 1364644 - Migrate bookmarks schema and records to add version columns r=rnewman
Schema migration is simple: it adds localVersion and syncVersion columns to bookmarks table.
Default values are:
- localVersion=1
- syncVersion=0
... indicating that a record needs to be uploaded.

Data migration is also relatively simple: we need to ensure that records which are "up-to-date",
according to the old timestamp-based tracking, are not marked for an upload, and vice versa - records which are
either "new" or "changed" are marked for an upload.

Since our default during schema migration is to mark everything for upload, the data migration
concerns itself with the records which are considered as "up-to-date".

See detailed description in the comments in the data migration function.

MozReview-Commit-ID: J6aglurYwlo
2017-08-14 23:22:53 -04:00
Grigory Kruglov e64c3855f7 Bug 1364644 - Pre: don't swallow runtime exceptions in the BrowserProvider's call interface r=rnewman
MozReview-Commit-ID: 3mgOrSvEFxU
2017-07-27 00:28:08 -04:00
Michael Comella db16583ca3 Bug 1382332: Remove duplicate URLs from AS top sites. r=Grisha
MozReview-Commit-ID: E9dP9IitXQQ
2017-08-10 18:27:15 -07:00
Michael Comella 147289f730 Bug 1386052: Join PageMetadata table with Top Sites query. r=Grisha
This bug does not request that this join is used so I tested this by adding a
breakpoint in StreamRecyclerAdapter.swapTopSites cursor and querying the cursor
for the desired fields directly. I also verified this does not crash when
accessing the old top sites and AS top sites.

Since I now SELECT a subset of columns (rather than *), I verified I've
SELECTed all the used columns:

- For AS, we bind in TopSite.fromCursor:
https://dxr.mozilla.org/mozilla-central/source/mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/model/TopSite.java#21

- For old top sites, we bind in TopSitesPanel.CursorLoaderCallbacks.onLoadFinished.
This fans out to three methods: mListAdapter.swapCursor, mGridAdapter.swapCursor,
and updateUiFromCursor, the latter which only gets the count.
https://dxr.mozilla.org/mozilla-central/rev/52285ea5e54c73d3ed824544cef2ee3f195f05e6/mobile/android/base/java/org/mozilla/gecko/home/TopSitesPanel.java#692

- mListAdapter = VisitedAdapter, mGridAdapter = TopSitesGridAdapter, via
TopSitesPanel.onActivityCreated:
https://dxr.mozilla.org/mozilla-central/rev/52285ea5e54c73d3ed824544cef2ee3f195f05e6/mobile/android/base/java/org/mozilla/gecko/home/TopSitesPanel.java#292

- VisitedAdapter.bindView:
https://dxr.mozilla.org/mozilla-central/rev/52285ea5e54c73d3ed824544cef2ee3f195f05e6/mobile/android/base/java/org/mozilla/gecko/home/TopSitesPanel.java#549

- TopSitesGridAdapter.bindView:
https://dxr.mozilla.org/mozilla-central/rev/52285ea5e54c73d3ed824544cef2ee3f195f05e6/mobile/android/base/java/org/mozilla/gecko/home/TopSitesPanel.java#620

- Both adapters don't use any columns I haven't specified. They also call out
to TwoLinePageRow.updateFromCursor:
https://dxr.mozilla.org/mozilla-central/rev/52285ea5e54c73d3ed824544cef2ee3f195f05e6/mobile/android/base/java/org/mozilla/gecko/home/TwoLinePageRow.java#318

Which also doesn't use new columns.

MozReview-Commit-ID: 9bdeHWLWQbh
2017-08-01 16:02:50 -07:00
Michael Comella 43913033d3 Bug 1386052: add Combined.HISTORY_GUID; upgrade db to 38. r=Grisha
This will be used to join with the PageMetadata table so we can extract
PageMetadata values in our top sites queries.

MozReview-Commit-ID: EmwjyFM1qUf
2017-08-01 14:21:54 -07:00
Michael Comella d86d93262c Bug 1386052: Correct PageMetadata.HISTORY_GUID foreign key. r=Grisha
This change is fixing an issue unrelated to this bug.

It was using Visits.HISTORY_GUID, which is not in the table and thus doesn't
make sense for the first clause of the foreign key constraint. Visits & its
replacement have the same value so the behavior should not change.

MozReview-Commit-ID: 8EbJh586DN3
2017-08-01 14:02:32 -07:00
Edouard Oger 3772920392 Bug 1351104 part 2 - Filter the clients list in Send Tab with the FxA device list. r=Grisha
MozReview-Commit-ID: KqSyWVfwva3
2017-06-07 16:24:30 -04:00
jwu 4d214bfc50 Bug 1381001 - Bump the folder's last modified timestamp when deleting it. r=Grisha
MozReview-Commit-ID: DeBZatIrDVg
2017-07-23 15:30:10 +08:00
Chenxia Liu c367abe294 Bug 1377295 - Use old Top Sites pinned sites in AS panel. r=mcomella
MozReview-Commit-ID: 6i3Cam8un45
2017-07-18 18:43:35 -07:00
Grigory Kruglov 5a344d275a Bug 1378246 - Ensure that we correctly fire 'notifyChanged' during bookmark deletions r=jwu
This patch introduces a notion of "changed" count during bookmark deletions, and firms up
our deletion logic to ensure we're counting affected records correctly.

Changes are mostly clearer comments describing what's going on, as well tests to ensure
we're doing the right thing.

One logical change is that this patch drops an additional call to updateBookmarks. AFAIK,
that call is unnecessary. It doesn't achieve its stated goal of writing first (it performs
a select first), and since we're doing a deletion, the "bump timestamps of an old parent
in case parent changed" logic is unused).

MozReview-Commit-ID: 9B1FW9pgsf1
2017-07-05 18:13:28 -04:00
Grigory Kruglov c65fd3d7ca Bug 1373873 - Post: remove unused code r=nechen
MozReview-Commit-ID: DTXmFMB0GGM
2017-06-16 21:56:27 -04:00
Grigory Kruglov d5fcd117c5 Bug 1373873 - Guard against a nullable cursor r=nechen
MozReview-Commit-ID: HlherFzKfNW
2017-06-16 21:56:11 -04:00
friedger 3a57c3c2aa Bug 1217675 - Eliminate Honeycomb compatibility from Fennec code r=nalexander
Remove all references to Build.SDK_INT comparing 14 and lower

MozReview-Commit-ID: JdAjYvQ6mfX
2017-06-10 08:57:55 +02:00
Jing-wei Wu 7fd3f2f2dc Bug 1329128 - Part 1: Implement the functionality of remove bookmark folder in BrowserProvider. r=Grisha
MozReview-Commit-ID: GQfM4Z9zU2x
2017-05-02 17:52:55 +08:00
Jing-wei Wu 6a0ecb7194 Bug 1329131 - Part 1: Implement the functionality of listing all bookmark folders except special folders. r=Grisha
MozReview-Commit-ID: AK79E6kkXFI
2017-04-21 18:31:03 +08:00
Andrzej Hunt fc52441f68 Bug 1356693 - infer: fix RESOURCE_LEAK's in base r=walkingice
MozReview-Commit-ID: Gm9GqOk37UZ
2017-04-19 08:26:38 -07:00
Carsten "Tomcat" Book 5c578703fa Backed out changeset 8b672583d57c (bug 1356693) 2017-04-27 15:19:53 +02:00
Andrzej Hunt 5dd7e436c4 Bug 1356693 - infer: fix RESOURCE_LEAK's in base r=walkingice
MozReview-Commit-ID: Gm9GqOk37UZ
2017-04-19 08:26:38 -07:00
Edouard Oger 7b6e7fde25 Bug 1351805 part 2 - Add remote devices to the Browser Provider. r=Grisha
MozReview-Commit-ID: 9yGU2Gy6mX1
2017-04-07 12:24:46 -04:00
Wes Kocher e5cf37107d Backed out 3 changesets (bug 1351805) for android Test failures a=backout
Backed out changeset da34da5f310a (bug 1351805)
Backed out changeset 430b56176e04 (bug 1351805)
Backed out changeset a3dfb4b9dc66 (bug 1351805)

MozReview-Commit-ID: AE4RcKV3akz
2017-04-25 12:47:59 -07:00
Edouard Oger 4b4a3dc0d2 Bug 1351805 part 2 - Add remote devices to the Browser Provider. r=Grisha
MozReview-Commit-ID: 9yGU2Gy6mX1
2017-04-07 12:24:46 -04:00
Jing-wei Wu 51f50a43b6 Bug 1232439 - Part 2: Support get/update/remove bookmark record by ID in BrowserDB. r=Grisha
MozReview-Commit-ID: 6RNKCUiZE8K
2017-04-05 14:03:16 +08:00
maliu 8fed4c294a Bug 1353001 - Fallback invoke ContentResolver.query without CancellationSignal, r=sebastian
MozReview-Commit-ID: 7d3lxiWs3uP
2017-04-03 21:50:55 +08:00
Edouard Oger a6834582f3 Bug 1265314 - Set tabs record lastModified to clients.lastModified. r=nalexander
MozReview-Commit-ID: 84g7WXxRwdX
2017-03-24 15:40:34 -04:00
Jim Chen 78ccd0611f Bug 1337467 - Convert observers to bundle events; r=rbarker r=sebastian
Bug 1337467 - 1. Convert "Window:Resize" observer to event; r=rbarker

Bug 1337467 - 2. Convert "ScrollTo:FocusedInput" observer to event; r=rbarker

Bug 1337467 - 3. Convert "Update:CheckResult" observer to event; r=sebastian

Also remove notifyCheckUpdateResult from GeckoInterface.

Bug 1337467 - 4. Convert "GeckoView:ImportScript" observer to event; r=sebastian

Bug 1337467 - 5. Convert accessibility observers to events; r=sebastian

Bug 1337467 - 6. Convert media/casting observers to events; r=sebastian

Bug 1337467 - 7. Convert "Sanitize:ClearData" observer to event; r=sebastian

Bug 1337467 - 8. Convert "Notification:Event" observer to event; r=sebastian

Bug 1337467 - 9. Convert BrowserApp observers to events; r=sebastian

Bug 1337467 - 10. Convert Tab observers to events; r=sebastian

Bug 1337467 - 11. Convert "Passwords:Init" and "FormHistory:Init" observers to events; r=sebastian

Bug 1337467 - 12. Convert Reader observers to events; r=sebastian

Bug 1337467 - 13. Convert Distribution observers to events; r=sebastian

Bug 1337467 - 14. Convert "Fonts:Reload" observer to event; r=sebastian

Bug 1337467 - 15. Convert RecentTabsAdapter observers to events; r=sebastian

Bug 1337467 - 16. Convert "Session:Prefetch" observer to event; r=sebastian

Bug 1337467 - 17. Convert "Browser:Quit" and "FullScreen:Exit" observers to events; r=sebastian

Bug 1337467 - 18. Convert SessionStore observers to events; r=sebastian

The "Session:NotifyLocationChange" observer is sent by browser.js and
requires passing a browser reference, so it's left as an observer.

Bug 1337467 - 19. Remove unused "Tab:Screenshot:Cancel" notifyObserver call; r=me

Bug 1337467 - 20. Convert "Session:Navigate" observer to event; r=sebastian

Bug 1337467 - 21. Convert "Locale:*" observers to events; r=sebastian

Bug 1337467 - Add log for unhandled events; r=me

Add back the log indicating no listener for an event, which can be
useful when reading logcat. r=me for trivial change.

Bug 1337467 - Don't return error from EventDispatcher when OnEvent fails; r=me

When a listener's OnEvent method returns an error, continue to dispatch
to other listeners and don't return an error from the dispatch function.
This avoids unexpected errors when dispatching events. r=me for trivial
patch.
2017-03-07 12:34:04 -05:00
Sebastian Kaspari 26ee58e85c Bug 1312016 - Activity Stream: Implement highlights ranking to mirror desktop add-on behavior. r=Grisha
This patch has multiple changes folded into:
* Remove old highlights query
* Add new query for retrieving recent history to consider for highlights
* First version of highlights ranking implementation
* Add new loader implementation that will return a list of Highlight objects instead of a Cursor
* Modify UI code to work with Highlight objects instead of a Cursor.

MozReview-Commit-ID: Pdx2YxrZKA
2017-02-13 18:14:23 +01:00
Grisha Kruglov 6694eb16a3 Bug 1291821 - Move bulk insert logic for new history to BrowserProvider r=rnewman
This commit does two things:

1) It simplifies history insertion logic, which wrongly assumed that history which was
being inserted might be not new. As such, it was necessary to check for collisions of
visit inserts, record number of visits actually inserted, and update remote visit counts
correspondingly in a separate step, making history insert a three step operation (insert
history record, insert its visits, update history record with a count). However, bulkInsert
runs only for records which were determined to be entirely new, so it's possible to drop
the third step.

2) Makes all of the insertions (history records and their visits) run in one transaction.
Prepared statements for both history and visit inserts are used are used as a
performance optimization measure.

MozReview-Commit-ID: 48T4G5IsQNS
2016-11-29 13:42:53 -08:00
Wes Kocher 6db1eacdbc Merge autoland to central, a=merge
MozReview-Commit-ID: Cu9iXbDAS7t
2017-02-09 16:36:11 -08:00
Aman Dwivedi b91c6fb6ac Bug 876002 - Remove nsIFormHistory2 so no synchronous form history code remains, r=markh.
MozReview-Commit-ID: 4hNAqttRddP
2017-02-08 22:50:00 +01:00
Andrzej Hunt dba8a65df2 Bug 1337419 - Post: don't set bookmark ID for suggested site r=Grisha
Suggested sites don't have a bookmark ID, there's little value in setting one here since
that's confusing for anyone handling the cursor. (This is probably an oversight from
when the single-cursor topsites query was first implemented.)

MozReview-Commit-ID: 77Cw37za6cD
2017-02-07 14:12:16 -08:00
Tushar Saini (:shatur) 5503ea705a Bug 1252960 - Rename UrlMetadata* table to UrlImageData* r=ahunt
MozReview-Commit-ID: 2TNcctxAbRc
2017-02-02 22:05:17 +05:30
Wes Kocher 6774aad975 Backed out changeset 7038e10280b2 (bug 1252960) for test_safe_browsing_warning_pages.py failures a=backout
MozReview-Commit-ID: 9Dfm6gbDFc8
2017-02-07 14:46:18 -08:00
Tushar Saini (:shatur) 14c7927bcc Bug 1252960 - Rename UrlMetadata* table to UrlImageData* r=ahunt
MozReview-Commit-ID: 2TNcctxAbRc
2017-02-02 22:05:17 +05:30
Michael Kaply aeda77b58a Bug 1331080 - Switch suggestedSites.hidden to be marked as Android pref. r=sebastian 2017-01-18 09:44:05 -06:00
Sebastian Kaspari 48bf32195b Bug 1328937 - Extract TopSite model from stream adapter. r=Grisha
MozReview-Commit-ID: IfSgvPooI9F
2017-01-09 13:53:10 +01:00
Adrian Zatreanu 1682d3fa79 Bug 1316008: Use explicit charset encoding r=nechen,sebastian
MozReview-Commit-ID: 3y2CKQZrLtl
2016-11-29 20:42:08 +02:00
Sebastian Kaspari 8e5a8d02e2 Bug 1325380 - Use provider name for AS highlights. r=Grisha
MozReview-Commit-ID: 2vPk2DdrYed
2016-12-22 16:17:28 +01:00
Andrzej Hunt 75f10965f2 Bug 1324051 - Add highlights histogram telemetry r=Grisha
MozReview-Commit-ID: 92m8jYS8b8D
2016-12-16 10:42:04 -08:00
Andrzej Hunt bb3f4d88ef Bug 1324051 - Pre: fix constant name typo r=Grisha
MozReview-Commit-ID: GX9sxnfnnuG
2016-12-16 10:39:02 -08:00
Grisha Kruglov 52a1d7f8c8 Bug 1321368 - Exclude remote-only visits from AS Top Sites r=ahunt
MozReview-Commit-ID: Jacc3SGT2pw
2016-12-14 16:53:31 -08:00