From 71d0836f0cf23cbe268253607da2347a9b85ae77 Mon Sep 17 00:00:00 2001 From: "thunder%mozilla.com" Date: Tue, 11 Sep 2007 16:07:11 +0000 Subject: [PATCH] Revert incorrect patch --- browser/components/search/nsIBrowserSearchService.idl | 11 +---------- browser/components/search/nsSearchService.js | 10 +++++----- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/browser/components/search/nsIBrowserSearchService.idl b/browser/components/search/nsIBrowserSearchService.idl index be3cfb30a71..dad61d5e44c 100755 --- a/browser/components/search/nsIBrowserSearchService.idl +++ b/browser/components/search/nsIBrowserSearchService.idl @@ -41,7 +41,6 @@ #include "nsISupports.idl" interface nsIURI; -interface nsIFile; interface nsIInputStream; [scriptable, uuid(58e4f602-a7c8-4cd1-9dca-716705e826ef)] @@ -163,17 +162,9 @@ interface nsISearchEngine : nsISupports }; -[scriptable, uuid(c2e8ae4f-9fea-4a24-81e3-c94cdc055c1b)] +[scriptable, uuid(8307b8f2-08ea-45b8-96bf-b1dc7688fe3b)] interface nsIBrowserSearchService : nsISupports { - /** - * Loads all the engines in the supplied directory. - * - * @param enginesDir - * The directory containing the engine description files. - */ - void loadEngines(in nsIFile enginesDir); - /** * Adds a new search engine from the file at the supplied URI, optionally * asking the user for confirmation first. If a confirmation dialog is diff --git a/browser/components/search/nsSearchService.js b/browser/components/search/nsSearchService.js index 2bf1579d5b6..51b3dba7aa6 100755 --- a/browser/components/search/nsSearchService.js +++ b/browser/components/search/nsSearchService.js @@ -2222,7 +2222,7 @@ SearchService.prototype = { while (locations.hasMoreElements()) { var location = locations.getNext().QueryInterface(Ci.nsIFile); - this.loadEngines(location); + this._loadEngines(location); } // Now that all engines are loaded, build the sorted engine list @@ -2298,8 +2298,8 @@ SearchService.prototype = { } }, - loadEngines: function SRCH_SVC_loadEngines(aDir) { - LOG("loadEngines: Searching in " + aDir.path + " for search engines."); + _loadEngines: function SRCH_SVC_loadEngines(aDir) { + LOG("_loadEngines: Searching in " + aDir.path + " for search engines."); // Check whether aDir is the user profile dir var isInProfile = aDir.equals(getDir(NS_APP_USER_SEARCH_DIR)); @@ -2338,7 +2338,7 @@ SearchService.prototype = { addedEngine = new Engine(file, dataType, !isWritable); addedEngine._initFromFile(); } catch (ex) { - LOG("loadEngines: Failed to load " + file.path + "!\n" + ex); + LOG("_loadEngines: Failed to load " + file.path + "!\n" + ex); continue; } @@ -2347,7 +2347,7 @@ SearchService.prototype = { try { this._convertSherlockFile(addedEngine, fileURL.fileBaseName); } catch (ex) { - LOG("loadEngines: Failed to convert: " + fileURL.path + "\n" + ex); + LOG("_loadEngines: Failed to convert: " + fileURL.path + "\n" + ex); // The engine couldn't be converted, mark it as read-only addedEngine._readOnly = true; }