From 912ec74678c74bf381768451177a35b07579227a Mon Sep 17 00:00:00 2001 From: Drew Willcoxon Date: Mon, 29 Jul 2019 17:00:19 +0000 Subject: [PATCH] Bug 1569366 - Move the top sites API from toolkit to browser r=mixedpuppy Bug 1547669 added some things to the top sites API, but it turned out to be not quite what we (the quantumbar team) needed (see bug 1568617). What we need is the list of top sites exactly as it appears on newtab. That list is determined by activity stream, which lives in browser. But the top sites API lives in toolkit. There was an earlier, now abandoned revision for that bug [1] where it was suggested that top sites be moved to browser. So we should do that. [1] https://phabricator.services.mozilla.com/D36200 Differential Revision: https://phabricator.services.mozilla.com/D39589 --HG-- rename : toolkit/components/extensions/parent/ext-topSites.js => browser/components/extensions/parent/ext-topSites.js rename : toolkit/components/extensions/schemas/top_sites.json => browser/components/extensions/schemas/top_sites.json rename : toolkit/components/extensions/test/xpcshell/test_ext_topSites.js => browser/components/extensions/test/xpcshell/test_ext_topSites.js extra : moz-landing-system : lando --- browser/components/extensions/ext-browser.json | 4 ++-- browser/components/extensions/jar.mn | 1 + .../components/extensions/parent/ext-topSites.js | 0 browser/components/extensions/schemas/jar.mn | 1 + .../components/extensions/schemas/top_sites.json | 0 .../components/extensions/test/xpcshell/test_ext_topSites.js | 0 .../components/extensions/test/xpcshell/xpcshell-common.ini | 2 +- toolkit/components/extensions/jar.mn | 3 --- toolkit/components/extensions/schemas/jar.mn | 3 --- .../components/extensions/test/xpcshell/xpcshell-common.ini | 2 -- 10 files changed, 5 insertions(+), 11 deletions(-) rename {toolkit => browser}/components/extensions/parent/ext-topSites.js (100%) rename {toolkit => browser}/components/extensions/schemas/top_sites.json (100%) rename {toolkit => browser}/components/extensions/test/xpcshell/test_ext_topSites.js (100%) diff --git a/browser/components/extensions/ext-browser.json b/browser/components/extensions/ext-browser.json index 363d28cb5e2a..90b8a7f8f6d8 100644 --- a/browser/components/extensions/ext-browser.json +++ b/browser/components/extensions/ext-browser.json @@ -199,8 +199,8 @@ ] }, "topSites": { - "url": "chrome://extensions/content/parent/ext-topSites.js", - "schema": "chrome://extensions/content/schemas/top_sites.json", + "url": "chrome://browser/content/parent/ext-topSites.js", + "schema": "chrome://browser/content/schemas/top_sites.json", "scopes": ["addon_parent"], "paths": [ ["topSites"] diff --git a/browser/components/extensions/jar.mn b/browser/components/extensions/jar.mn index e03ad6aea33b..5174b7a8c4c5 100644 --- a/browser/components/extensions/jar.mn +++ b/browser/components/extensions/jar.mn @@ -34,6 +34,7 @@ browser.jar: content/browser/parent/ext-sessions.js (parent/ext-sessions.js) content/browser/parent/ext-sidebarAction.js (parent/ext-sidebarAction.js) content/browser/parent/ext-tabs.js (parent/ext-tabs.js) + content/browser/parent/ext-topSites.js (parent/ext-topSites.js) content/browser/parent/ext-url-overrides.js (parent/ext-url-overrides.js) content/browser/parent/ext-urlbar.js (parent/ext-urlbar.js) content/browser/parent/ext-windows.js (parent/ext-windows.js) diff --git a/toolkit/components/extensions/parent/ext-topSites.js b/browser/components/extensions/parent/ext-topSites.js similarity index 100% rename from toolkit/components/extensions/parent/ext-topSites.js rename to browser/components/extensions/parent/ext-topSites.js diff --git a/browser/components/extensions/schemas/jar.mn b/browser/components/extensions/schemas/jar.mn index 7cd6369de63a..6fd83f6f9bbf 100644 --- a/browser/components/extensions/schemas/jar.mn +++ b/browser/components/extensions/schemas/jar.mn @@ -24,6 +24,7 @@ browser.jar: content/browser/schemas/sessions.json content/browser/schemas/sidebar_action.json content/browser/schemas/tabs.json + content/browser/schemas/top_sites.json content/browser/schemas/url_overrides.json content/browser/schemas/urlbar.json content/browser/schemas/windows.json diff --git a/toolkit/components/extensions/schemas/top_sites.json b/browser/components/extensions/schemas/top_sites.json similarity index 100% rename from toolkit/components/extensions/schemas/top_sites.json rename to browser/components/extensions/schemas/top_sites.json diff --git a/toolkit/components/extensions/test/xpcshell/test_ext_topSites.js b/browser/components/extensions/test/xpcshell/test_ext_topSites.js similarity index 100% rename from toolkit/components/extensions/test/xpcshell/test_ext_topSites.js rename to browser/components/extensions/test/xpcshell/test_ext_topSites.js diff --git a/browser/components/extensions/test/xpcshell/xpcshell-common.ini b/browser/components/extensions/test/xpcshell/xpcshell-common.ini index bcc36b647433..b68e17e9ca22 100644 --- a/browser/components/extensions/test/xpcshell/xpcshell-common.ini +++ b/browser/components/extensions/test/xpcshell/xpcshell-common.ini @@ -11,9 +11,9 @@ [test_ext_settings_overrides_search.js] [test_ext_settings_overrides_search_mozParam.js] [test_ext_settings_overrides_shutdown.js] +[test_ext_topSites.js] [test_ext_url_overrides_newtab.js] [test_ext_url_overrides_newtab_update.js] [test_ext_urlbar.js] -skip-if = os == "android" [test_ext_homepage_overrides_private.js] diff --git a/toolkit/components/extensions/jar.mn b/toolkit/components/extensions/jar.mn index 12cb603c743d..0279d8b2e1a6 100644 --- a/toolkit/components/extensions/jar.mn +++ b/toolkit/components/extensions/jar.mn @@ -41,9 +41,6 @@ toolkit.jar: content/extensions/parent/ext-telemetry.js (parent/ext-telemetry.js) content/extensions/parent/ext-theme.js (parent/ext-theme.js) content/extensions/parent/ext-toolkit.js (parent/ext-toolkit.js) -#ifndef ANDROID - content/extensions/parent/ext-topSites.js (parent/ext-topSites.js) -#endif content/extensions/parent/ext-userScripts.js (parent/ext-userScripts.js) content/extensions/parent/ext-webRequest.js (parent/ext-webRequest.js) content/extensions/parent/ext-webNavigation.js (parent/ext-webNavigation.js) diff --git a/toolkit/components/extensions/schemas/jar.mn b/toolkit/components/extensions/schemas/jar.mn index 2978bcf18680..f897860d2fa1 100644 --- a/toolkit/components/extensions/schemas/jar.mn +++ b/toolkit/components/extensions/schemas/jar.mn @@ -41,9 +41,6 @@ toolkit.jar: content/extensions/schemas/telemetry.json content/extensions/schemas/test.json content/extensions/schemas/theme.json -#ifndef ANDROID - content/extensions/schemas/top_sites.json -#endif content/extensions/schemas/types.json content/extensions/schemas/user_scripts.json content/extensions/schemas/user_scripts_content.json diff --git a/toolkit/components/extensions/test/xpcshell/xpcshell-common.ini b/toolkit/components/extensions/test/xpcshell/xpcshell-common.ini index b6122f6b980b..8a06a48e4c4f 100644 --- a/toolkit/components/extensions/test/xpcshell/xpcshell-common.ini +++ b/toolkit/components/extensions/test/xpcshell/xpcshell-common.ini @@ -144,8 +144,6 @@ skip-if = os == "android" # checking for telemetry needs to be updated: 1384923 skip-if = os == 'android' # Bug 1258975 on android. [test_ext_telemetry.js] [test_ext_trustworthy_origin.js] -[test_ext_topSites.js] -skip-if = os == "android" [test_ext_unlimitedStorage.js] [test_ext_unload_frame.js] skip-if = true # Too frequent intermittent failures