Bug 1524688: Part 5 - Convert Places components to static registration r=mak

--HG--
rename : toolkit/components/places/ColorAnalyzer.js => toolkit/components/places/ColorAnalyzer.jsm
rename : toolkit/components/places/PageIconProtocolHandler.js => toolkit/components/places/PageIconProtocolHandler.jsm
rename : toolkit/components/places/PlacesCategoriesStarter.js => toolkit/components/places/PlacesCategoriesStarter.jsm
rename : toolkit/components/places/nsPlacesExpiration.js => toolkit/components/places/PlacesExpiration.jsm
rename : toolkit/components/places/nsTaggingService.js => toolkit/components/places/TaggingService.jsm
rename : toolkit/components/places/UnifiedComplete.js => toolkit/components/places/UnifiedComplete.jsm
extra : rebase_source : 9359cab414a24df31b287b9d980639ab560b8cf4
This commit is contained in:
Kris Maglione 2019-01-29 18:02:04 -08:00
Родитель d1eaf36a3b
Коммит d7b92ec19c
10 изменённых файлов: 64 добавлений и 65 удалений

Просмотреть файл

@ -235,13 +235,6 @@
@RESPATH@/components/ContentProcessSingleton.js
@RESPATH@/components/nsURLFormatter.manifest
@RESPATH@/components/nsURLFormatter.js
@RESPATH@/components/toolkitplaces.manifest
@RESPATH@/components/nsTaggingService.js
@RESPATH@/components/UnifiedComplete.js
@RESPATH@/components/nsPlacesExpiration.js
@RESPATH@/components/PageIconProtocolHandler.js
@RESPATH@/components/PlacesCategoriesStarter.js
@RESPATH@/components/ColorAnalyzer.js
@RESPATH@/components/PageThumbsStorageService.js
@RESPATH@/components/mozProtocolHandler.js
@RESPATH@/components/mozProtocolHandler.manifest

Просмотреть файл

@ -4,7 +4,6 @@
"use strict";
const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
const XHTML_NS = "http://www.w3.org/1999/xhtml";
@ -82,4 +81,4 @@ ColorAnalyzer.prototype = {
QueryInterface: ChromeUtils.generateQI([Ci.mozIColorAnalyzer]),
};
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([ColorAnalyzer]);
var EXPORTED_SYMBOLS = ["ColorAnalyzer"];

Просмотреть файл

@ -4,7 +4,6 @@
"use strict";
const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
ChromeUtils.defineModuleGetter(this, "PlacesUtils",
"resource://gre/modules/PlacesUtils.jsm");
@ -130,4 +129,4 @@ PageIconProtocolHandler.prototype = {
]),
};
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([PageIconProtocolHandler]);
var EXPORTED_SYMBOLS = ["PageIconProtocolHandler"];

Просмотреть файл

@ -10,7 +10,6 @@ const TOPIC_GATHER_TELEMETRY = "gather-telemetry";
// Seconds between maintenance runs.
const MAINTENANCE_INTERVAL_SECONDS = 7 * 86400;
const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
ChromeUtils.defineModuleGetter(this, "PlacesUtils",
"resource://gre/modules/PlacesUtils.jsm");
@ -54,11 +53,9 @@ PlacesCategoriesStarter.prototype = {
},
classID: Components.ID("803938d5-e26d-4453-bf46-ad4b26e41114"),
_xpcom_factory: XPCOMUtils.generateSingletonFactory(PlacesCategoriesStarter),
QueryInterface: ChromeUtils.generateQI([
Ci.nsIObserver,
]),
};
var components = [PlacesCategoriesStarter];
this.NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
var EXPORTED_SYMBOLS = ["PlacesCategoriesStarter"];

Просмотреть файл

@ -935,8 +935,6 @@ nsPlacesExpiration.prototype = {
classID: Components.ID("705a423f-2f69-42f3-b9fe-1517e0dee56f"),
_xpcom_factory: XPCOMUtils.generateSingletonFactory(nsPlacesExpiration),
QueryInterface: ChromeUtils.generateQI([
Ci.nsIObserver,
Ci.nsINavHistoryObserver,
@ -948,5 +946,4 @@ nsPlacesExpiration.prototype = {
// Module Registration
var components = [nsPlacesExpiration];
this.NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
var EXPORTED_SYMBOLS = ["nsPlacesExpiration"];

Просмотреть файл

@ -501,11 +501,9 @@ TagAutoCompleteSearch.prototype = {
},
classID: Components.ID("{1dcc23b0-d4cb-11dc-9ad6-479d56d89593}"),
_xpcom_factory: XPCOMUtils.generateSingletonFactory(TagAutoCompleteSearch),
QueryInterface: ChromeUtils.generateQI([
Ci.nsIAutoCompleteSearch,
]),
};
var component = [TaggingService, TagAutoCompleteSearch];
this.NSGetFactory = XPCOMUtils.generateNSGetFactory(component);
var EXPORTED_SYMBOLS = ["TaggingService", "TagAutoCompleteSearch"];

Просмотреть файл

@ -61,8 +61,8 @@ const QUERYINDEX_TITLE = 2;
const QUERYINDEX_BOOKMARKED = 3;
const QUERYINDEX_BOOKMARKTITLE = 4;
const QUERYINDEX_TAGS = 5;
const QUERYINDEX_VISITCOUNT = 6;
const QUERYINDEX_TYPED = 7;
// QUERYINDEX_VISITCOUNT = 6;
// QUERYINDEX_TYPED = 7;
const QUERYINDEX_PLACEID = 8;
const QUERYINDEX_SWITCHTAB = 9;
const QUERYINDEX_FRECENCY = 10;
@ -320,7 +320,6 @@ XPCOMUtils.defineLazyModuleGetters(this, {
BrowserUtils: "resource://gre/modules/BrowserUtils.jsm",
ExtensionSearchHandler: "resource://gre/modules/ExtensionSearchHandler.jsm",
ObjectUtils: "resource://gre/modules/ObjectUtils.jsm",
OS: "resource://gre/modules/osfile.jsm",
PlacesRemoteTabsAutocompleteProvider: "resource://gre/modules/PlacesRemoteTabsAutocompleteProvider.jsm",
PlacesSearchAutocompleteProvider: "resource://gre/modules/PlacesSearchAutocompleteProvider.jsm",
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
@ -2726,8 +2725,6 @@ UnifiedComplete.prototype = {
classID: Components.ID("f964a319-397a-4d21-8be6-5cdd1ee3e3ae"),
_xpcom_factory: XPCOMUtils.generateSingletonFactory(UnifiedComplete),
QueryInterface: ChromeUtils.generateQI([
Ci.nsIAutoCompleteSearch,
Ci.nsIAutoCompleteSearchDescriptor,
@ -2737,4 +2734,4 @@ UnifiedComplete.prototype = {
]),
};
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([UnifiedComplete]);
var EXPORTED_SYMBOLS = ["UnifiedComplete"];

Просмотреть файл

@ -52,4 +52,54 @@ Classes = [
'constructor': 'nsNavHistory::GetSingleton',
'categories': {'vacuum-participant': 'Places'},
},
{
'cid': '{bbc23860-2553-479d-8b78-94d9038334f7}',
'contract_ids': ['@mozilla.org/browser/tagging-service;1'],
'jsm': 'resource://gre/modules/TaggingService.jsm',
'constructor': 'TaggingService',
},
{
'cid': '{1dcc23b0-d4cb-11dc-9ad6-479d56d89593}',
'contract_ids': ['@mozilla.org/autocomplete/search;1?name=places-tag-autocomplete'],
'jsm': 'resource://gre/modules/TaggingService.jsm',
'constructor': 'TagAutoCompleteSearch',
},
{
'cid': '{705a423f-2f69-42f3-b9fe-1517e0dee56f}',
'contract_ids': ['@mozilla.org/places/expiration;1'],
'jsm': 'resource://gre/modules/PlacesExpiration.jsm',
'constructor': 'nsPlacesExpiration',
'categories': {'places-init-complete': 'nsPlacesExpiration'},
},
{
'cid': '{803938d5-e26d-4453-bf46-ad4b26e41114}',
'contract_ids': ['@mozilla.org/places/categoriesStarter;1'],
'jsm': 'resource://gre/modules/PlacesCategoriesStarter.jsm',
'constructor': 'PlacesCategoriesStarter',
'categories': {'idle-daily': 'PlacesCategoriesStarter'},
},
{
'cid': '{d056186c-28a0-494e-aacc-9e433772b143}',
'contract_ids': ['@mozilla.org/places/colorAnalyzer;1'],
'jsm': 'resource://gre/modules/ColorAnalyzer.jsm',
'constructor': 'ColorAnalyzer',
},
{
'cid': '{f964a319-397a-4d21-8be6-5cdd1ee3e3ae}',
'contract_ids': ['@mozilla.org/autocomplete/search;1?name=unifiedcomplete'],
'jsm': 'resource://gre/modules/UnifiedComplete.jsm',
'constructor': 'UnifiedComplete',
},
{
'cid': '{60a1f7c6-4ff9-4a42-84d3-5a185faa6f32}',
'contract_ids': ['@mozilla.org/network/protocol;1?name=page-icon'],
'jsm': 'resource://gre/modules/PageIconProtocolHandler.jsm',
'constructor': 'PageIconProtocolHandler',
},
]

Просмотреть файл

@ -59,28 +59,24 @@ if CONFIG['MOZ_PLACES']:
'BookmarkJSONUtils.jsm',
'Bookmarks.jsm',
'ClusterLib.js',
'ColorAnalyzer.jsm',
'ColorAnalyzer_worker.js',
'ColorConversion.js',
'ExtensionSearchHandler.jsm',
'History.jsm',
'PageIconProtocolHandler.jsm',
'PlacesBackups.jsm',
'PlacesCategoriesStarter.jsm',
'PlacesDBUtils.jsm',
'PlacesExpiration.jsm',
'PlacesRemoteTabsAutocompleteProvider.jsm',
'PlacesSearchAutocompleteProvider.jsm',
'PlacesSyncUtils.jsm',
'PlacesTransactions.jsm',
'PlacesUtils.jsm',
'SyncedBookmarksMirror.jsm',
]
EXTRA_COMPONENTS += [
'ColorAnalyzer.js',
'nsPlacesExpiration.js',
'nsTaggingService.js',
'PageIconProtocolHandler.js',
'PlacesCategoriesStarter.js',
'toolkitplaces.manifest',
'UnifiedComplete.js',
'TaggingService.jsm',
'UnifiedComplete.jsm',
]
XPCOM_MANIFESTS += [

Просмотреть файл

@ -1,27 +0,0 @@
# nsTaggingService.js
component {bbc23860-2553-479d-8b78-94d9038334f7} nsTaggingService.js
contract @mozilla.org/browser/tagging-service;1 {bbc23860-2553-479d-8b78-94d9038334f7}
component {1dcc23b0-d4cb-11dc-9ad6-479d56d89593} nsTaggingService.js
contract @mozilla.org/autocomplete/search;1?name=places-tag-autocomplete {1dcc23b0-d4cb-11dc-9ad6-479d56d89593}
# nsPlacesExpiration.js
component {705a423f-2f69-42f3-b9fe-1517e0dee56f} nsPlacesExpiration.js
contract @mozilla.org/places/expiration;1 {705a423f-2f69-42f3-b9fe-1517e0dee56f}
category places-init-complete nsPlacesExpiration @mozilla.org/places/expiration;1
# PlacesCategoriesStarter.js
component {803938d5-e26d-4453-bf46-ad4b26e41114} PlacesCategoriesStarter.js
contract @mozilla.org/places/categoriesStarter;1 {803938d5-e26d-4453-bf46-ad4b26e41114}
category idle-daily PlacesCategoriesStarter @mozilla.org/places/categoriesStarter;1
# ColorAnalyzer.js
component {d056186c-28a0-494e-aacc-9e433772b143} ColorAnalyzer.js
contract @mozilla.org/places/colorAnalyzer;1 {d056186c-28a0-494e-aacc-9e433772b143}
# UnifiedComplete.js
component {f964a319-397a-4d21-8be6-5cdd1ee3e3ae} UnifiedComplete.js
contract @mozilla.org/autocomplete/search;1?name=unifiedcomplete {f964a319-397a-4d21-8be6-5cdd1ee3e3ae}
# PageIconProtocolHandler.js
component {60a1f7c6-4ff9-4a42-84d3-5a185faa6f32} PageIconProtocolHandler.js
contract @mozilla.org/network/protocol;1?name=page-icon {60a1f7c6-4ff9-4a42-84d3-5a185faa6f32}