1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 00:47:59 +01:00

Add 'const service'

This commit is contained in:
Kris Maglione
2008-12-17 16:41:54 -05:00
parent 1ffb5e90ad
commit 6a04a6e7cf
12 changed files with 108 additions and 186 deletions

View File

@@ -40,8 +40,8 @@ function Bookmarks() //{{{
const historyService = PlacesUtils.history;
const bookmarksService = PlacesUtils.bookmarks;
const taggingService = PlacesUtils.tagging;
const searchService = Cc["@mozilla.org/browser/search-service;1"].getService(Ci.nsIBrowserSearchService);
const ioService = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
const searchService = service.browserSearch;
const ioService = service.io;
const faviconService = Cc["@mozilla.org/browser/favicon-service;1"].getService(Ci.nsIFaviconService);
const Bookmark = new Struct("url", "title", "icon", "keyword", "tags", "id");
@@ -533,7 +533,7 @@ function Bookmarks() //{{{
getSuggestions: function getSuggestions(engine, query, callback)
{
let ss = Cc["@mozilla.org/browser/search-service;1"].getService(Ci.nsIBrowserSearchService);
let ss = service.browserSearch;
const responseType = "application/x-suggestions+json";
let engine = ss.getEngineByAlias(engine);
@@ -544,7 +544,7 @@ function Bookmarks() //{{{
function process(resp)
{
const json = Cc["@mozilla.org/dom/json;1"].createInstance(Ci.nsIJSON);
const json = service.json;
let results = [];
try
{