Bug 696159 - Remove some deprecated Places code.
authorMarco Bonardo <mbonardo@mozilla.com>
Thu, 27 Oct 2011 11:11:43 +0200
changeset 79278 1ed8be9fed394427989006195532d11c524f5d0d
parent 79277 28288ae6d58c244d980145fde8c34d9b9564f7c9
child 79279 1d659cf02d6b2db07a8ddfc7d82d122a28970873
push id2947
push usermak77@bonardo.net
push dateThu, 27 Oct 2011 09:30:13 +0000
treeherdermozilla-inbound@1f8780bd07ae [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs696159
milestone10.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 696159 - Remove some deprecated Places code. r=dietrich sr=rstrong
browser/base/content/aboutSyncTabs.js
browser/base/content/browser-places.js
browser/base/content/browser.js
browser/base/content/nsContextMenu.js
browser/components/places/content/browserPlacesViews.js
browser/components/places/content/controller.js
browser/components/places/content/treeView.js
browser/components/places/src/PlacesUIUtils.jsm
browser/installer/removed-files.in
toolkit/components/places/Makefile.in
toolkit/components/places/nsINavHistoryService.idl
toolkit/components/places/nsNavHistoryResult.cpp
toolkit/components/places/tests/queries/test_async.js
toolkit/components/places/tests/unit/test_nsINavHistoryViewer.js
toolkit/components/places/utils.js
--- a/browser/base/content/aboutSyncTabs.js
+++ b/browser/base/content/aboutSyncTabs.js
@@ -126,33 +126,47 @@ let RemoteTabViewer = {
       this._tabsList.clearSelection();
     }
   },
 
   bookmarkSingleTab: function() {
     let item = this._tabsList.selectedItems[0];
     let uri = Weave.Utils.makeURI(item.getAttribute("url"));
     let title = item.getAttribute("title");
-    PlacesUIUtils.showMinimalAddBookmarkUI(uri, title);
+    PlacesUIUtils.showBookmarkDialog({ action: "add"
+                                     , type: "bookmark"
+                                     , uri: uri
+                                     , title: title
+                                     , hiddenRows: [ "description"
+                                                   , "location"
+                                                   , "folderPicker"
+                                                   , "loadInSidebar"
+                                                   , "keyword" ]
+                                     });
   },
 
   bookmarkSelectedTabs: function() {
     let items = this._tabsList.selectedItems;
     let URIs = [];
     for (let i = 0;i < items.length;i++) {
       if (items[i].getAttribute("type") == "tab") {
         let uri = Weave.Utils.makeURI(items[i].getAttribute("url"));
         if (!uri)
           continue;
 
         URIs.push(uri);
       }
     }
-    if (URIs.length)
-      PlacesUIUtils.showMinimalAddMultiBookmarkUI(URIs);
+    if (URIs.length) {
+      PlacesUIUtils.showBookmarkDialog({ action: "add"
+                                       , type: "folder"
+                                       , URIList: URIs
+                                       , hiddenRows: [ "description" ]
+                                       });
+    }
   },
 
   _generateTabList: function() {
     let engine = Weave.Engines.get("tabs");
     let list = this._tabsList;
 
     // clear out existing richlistitems
     let count = list.getRowCount();
--- a/browser/base/content/browser-places.js
+++ b/browser/base/content/browser-places.js
@@ -373,21 +373,33 @@ var PlacesCommandHook = {
    * @param aURL (string)
    *        the address of the link target
    * @param aTitle
    *        The link text
    */
   bookmarkLink: function PCH_bookmarkLink(aParent, aURL, aTitle) {
     var linkURI = makeURI(aURL);
     var itemId = PlacesUtils.getMostRecentBookmarkForURI(linkURI);
-    if (itemId == -1)
-      PlacesUIUtils.showMinimalAddBookmarkUI(linkURI, aTitle);
+    if (itemId == -1) {
+      PlacesUIUtils.showBookmarkDialog({ action: "add"
+                                       , type: "bookmark"
+                                       , uri: linkURI
+                                       , title: aTitle
+                                       , hiddenRows: [ "description"
+                                                     , "location"
+                                                     , "loadInSidebar"
+                                                     , "folderPicker"
+                                                     , "keyword" ]
+                                       });
+    }
     else {
-      PlacesUIUtils.showItemProperties(itemId,
-                                       PlacesUtils.bookmarks.TYPE_BOOKMARK);
+      PlacesUIUtils.showBookmarkDialog({ action: "edit"
+                                       , type: "bookmark"
+                                       , itemId: itemId
+                                       });
     }
   },
 
   /**
    * List of nsIURI objects characterizing the tabs currently open in the
    * browser, modulo pinned tabs.  The URIs will be in the order in which their
    * corresponding tabs appeared and duplicates are discarded.
    */
@@ -406,17 +418,21 @@ var PlacesCommandHook = {
 
   /**
    * Adds a folder with bookmarks to all of the currently open tabs in this 
    * window.
    */
   bookmarkCurrentPages: function PCH_bookmarkCurrentPages() {
     let pages = this.uniqueCurrentPages;
     if (pages.length > 1) {
-      PlacesUIUtils.showMinimalAddMultiBookmarkUI(pages);
+    PlacesUIUtils.showBookmarkDialog({ action: "add"
+                                     , type: "folder"
+                                     , URIList: pages
+                                     , hiddenRows: [ "description" ]
+                                     });
     }
   },
 
   /**
    * Updates disabled state for the "Bookmark All Tabs" command.
    */
   updateBookmarkAllTabsCommand:
   function PCH_updateBookmarkAllTabsCommand() {
@@ -446,20 +462,28 @@ var PlacesCommandHook = {
     var title = (arguments.length > 1) ? feedTitle : doc.title;
  
     var description;
     if (arguments.length > 2)
       description = feedSubtitle;
     else
       description = PlacesUIUtils.getDescriptionFromDocument(doc);
 
-    var toolbarIP =
-      new InsertionPoint(PlacesUtils.bookmarks.toolbarFolder, -1);
-    PlacesUIUtils.showMinimalAddLivemarkUI(feedURI, gBrowser.currentURI,
-                                           title, description, toolbarIP, true);
+    var toolbarIP = new InsertionPoint(PlacesUtils.toolbarFolderId, -1);
+    PlacesUIUtils.showBookmarkDialog({ action: "add"
+                                     , type: "livemark"
+                                     , feedURI: feedURI
+                                     , siteURI: gBrowser.currentURI
+                                     , title: title
+                                     , description: description
+                                     , defaultInsertionPoint: toolbarIP
+                                     , hiddenRows: [ "feedLocation"
+                                                   , "siteLocation"
+                                                   , "description" ]
+                                     });
   },
 
   /**
    * Opens the Places Organizer. 
    * @param   aLeftPaneRoot
    *          The query to select in the organizer window - options
    *          are: History, AllBookmarks, BookmarksMenu, BookmarksToolbar,
    *          UnfiledBookmarks and Tags.
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -3117,17 +3117,26 @@ function openHomeDialog(aURL)
 }
 
 var bookmarksButtonObserver = {
   onDrop: function (aEvent)
   {
     let name = { };
     let url = browserDragAndDrop.drop(aEvent, name);
     try {
-      PlacesUIUtils.showMinimalAddBookmarkUI(makeURI(url), name);
+      PlacesUIUtils.showBookmarkDialog({ action: "add"
+                                       , type: "bookmark"
+                                       , uri: makeURI(url)
+                                       , title: name
+                                       , hiddenRows: [ "description"
+                                                     , "location"
+                                                     , "loadInSidebar"
+                                                     , "folderPicker"
+                                                     , "keyword" ]
+                                       });
     } catch(ex) { }
   },
 
   onDragOver: function (aEvent)
   {
     browserDragAndDrop.dragOver(aEvent);
     aEvent.dropEffect = "link";
   },
@@ -5583,19 +5592,26 @@ function contentAreaClick(event, isPanel
       event.preventDefault();
       return true;
     }
 
     if (linkNode.getAttribute("rel") == "sidebar") {
       // This is the Opera convention for a special link that, when clicked,
       // allows to add a sidebar panel.  The link's title attribute contains
       // the title that should be used for the sidebar panel.
-      PlacesUIUtils.showMinimalAddBookmarkUI(makeURI(href),
-                                             linkNode.getAttribute("title"),
-                                             null, null, true, true);
+      PlacesUIUtils.showBookmarkDialog({ action: "add"
+                                       , type: "bookmark"
+                                       , uri: makeURI(href)
+                                       , title: linkNode.getAttribute("title")
+                                       , loadBookmarkInSidebar: true
+                                       , hiddenRows: [ "description"
+                                                     , "location"
+                                                     , "folderPicker"
+                                                     , "keyword" ]
+                                       });
       event.preventDefault();
       return true;
     }
   }
 
   handleLinkClick(event, href, linkNode);
 
   // Mark the page as a user followed link.  This is done so that history can
@@ -6621,18 +6637,28 @@ function AddKeywordForSearchField() {
 
   var postData;
 
   if (isURLEncoded)
     postData = formData.join("&");
   else
     spec += "?" + formData.join("&");
 
-  PlacesUIUtils.showMinimalAddBookmarkUI(makeURI(spec), title, description, null,
-                                         null, null, "", postData, charset);
+  PlacesUIUtils.showBookmarkDialog({ action: "add"
+                                   , type: "bookmark"
+                                   , uri: makeURI(spec)
+                                   , title: title
+                                   , description: description
+                                   , keyword: ""
+                                   , postData: postData
+                                   , charSet: charset
+                                   , hiddenRows: [ "location"
+                                                 , "loadInSidebar"
+                                                 , "folderPicker" ]
+                                   });
 }
 
 function SwitchDocumentDirection(aWindow) {
   aWindow.document.dir = (aWindow.document.dir == "ltr" ? "rtl" : "ltr");
   for (var run = 0; run < aWindow.frames.length; run++)
     SwitchDocumentDirection(aWindow.frames[run]);
 }
 
--- a/browser/base/content/nsContextMenu.js
+++ b/browser/base/content/nsContextMenu.js
@@ -1392,21 +1392,34 @@ nsContextMenu.prototype = {
   addBookmarkForFrame: function CM_addBookmarkForFrame() {
     var doc = this.target.ownerDocument;
     var uri = doc.documentURIObject;
 
     var itemId = PlacesUtils.getMostRecentBookmarkForURI(uri);
     if (itemId == -1) {
       var title = doc.title;
       var description = PlacesUIUtils.getDescriptionFromDocument(doc);
-      PlacesUIUtils.showMinimalAddBookmarkUI(uri, title, description);
+      PlacesUIUtils.showBookmarkDialog({ action: "add"
+                                       , type: "bookmark"
+                                       , uri: uri
+                                       , title: title
+                                       , description: description
+                                       , hiddenRows: [ "description"
+                                                     , "location"
+                                                     , "loadInSidebar"
+                                                     , "folderPicker"
+                                                     , "keyword" ]
+                                       });
     }
-    else
-      PlacesUIUtils.showItemProperties(itemId,
-                                       PlacesUtils.bookmarks.TYPE_BOOKMARK);
+    else {
+      PlacesUIUtils.showBookmarkDialog({ action: "edit"
+                                       , type: "bookmark"
+                                       , itemId: itemId
+                                       });
+    }
   },
 
   savePageAs: function CM_savePageAs() {
     saveDocument(this.browser.contentDocument);
   },
 
   sendPage: function CM_sendPage() {
     MailIntegration.sendLinkForWindow(this.browser.contentWindow);  
@@ -1438,23 +1451,23 @@ nsContextMenu.prototype = {
         break;
       case "hidecontrols":
         media.removeAttribute("controls");
         break;
       case "showcontrols":
         media.setAttribute("controls", "true");
         break;
       case "showstats":
-        var event = document.createEvent("CustomEvent");
-        event.initCustomEvent("media-showStatistics", false, true, true);
+        var event = document.createEvent("CustomEvent");
+        event.initCustomEvent("media-showStatistics", false, true, true);
         media.dispatchEvent(event);
         break;
       case "hidestats":
-        var event = document.createEvent("CustomEvent");
-        event.initCustomEvent("media-showStatistics", false, true, false);
+        var event = document.createEvent("CustomEvent");
+        event.initCustomEvent("media-showStatistics", false, true, false);
         media.dispatchEvent(event);
         break;
     }
   },
 
   copyMediaLocation : function () {
     var clipboard = Cc["@mozilla.org/widget/clipboardhelper;1"].
                     getService(Ci.nsIClipboardHelper);
--- a/browser/components/places/content/browserPlacesViews.js
+++ b/browser/components/places/content/browserPlacesViews.js
@@ -581,19 +581,16 @@ PlacesViewBase.prototype = {
 
   nodeHistoryDetailsChanged: function() { },
   nodeTagsChanged: function() { },
   nodeDateAddedChanged: function() { },
   nodeLastModifiedChanged: function() { },
   nodeKeywordChanged: function() { },
   sortingChanged: function() { },
   batching: function() { },
-  // Replaced by containerStateChanged.
-  containerOpened: function() { },
-  containerClosed: function() { },
 
   nodeInserted:
   function PVB_nodeInserted(aParentPlacesNode, aPlacesNode, aIndex) {
     let parentElt = aParentPlacesNode._DOMElement;
     if (!parentElt)
       throw "aParentPlacesNode node must have _DOMElement set";
 
     if (!parentElt._built)
--- a/browser/components/places/content/controller.js
+++ b/browser/components/places/content/controller.js
@@ -132,17 +132,16 @@ PlacesController.prototype = {
     this.cutNodes = [];
   },
 
   terminate: function PC_terminate() {
     this._releaseClipboardOwnership();
   },
 
   supportsCommand: function PC_supportsCommand(aCommand) {
-    //LOG("supportsCommand: " + command);
     // Non-Places specific commands that we also support
     switch (aCommand) {
     case "cmd_undo":
     case "cmd_redo":
     case "cmd_cut":
     case "cmd_copy":
     case "cmd_paste":
     case "cmd_delete":
@@ -773,27 +772,16 @@ PlacesController.prototype = {
     if (performed) {
       // Select the new item.
       let insertedNodeId = PlacesUtils.bookmarks
                                       .getIdForItemAt(ip.itemId, ip.index);
       this._view.selectItems([insertedNodeId], false);
     }
   },
 
-
-  /**
-   * Create a new Bookmark folder somewhere. Prompts the user for the name
-   * of the folder.
-   */
-  newFolder: function PC_newFolder() {
-    Cu.reportError("PlacesController.newFolder is deprecated and will be \
-                   removed in a future release.  Use newItem instead.");
-    this.newItem("folder");
-  },
-
   /**
    * Create a new Bookmark separator somewhere.
    */
   newSeparator: function PC_newSeparator() {
     var ip = this._view.insertionPoint;
     if (!ip)
       throw Cr.NS_ERROR_NOT_AVAILABLE;
     var txn = PlacesUIUtils.ptm.createSeparator(ip.itemId, ip.index);
--- a/browser/components/places/content/treeView.js
+++ b/browser/components/places/content/treeView.js
@@ -85,17 +85,18 @@ PlacesTreeView.prototype = {
    * This is called once both the result and the tree are set.
    */
   _finishInit: function PTV__finishInit() {
     let selection = this.selection;
     if (selection)
       selection.selectEventsSuppressed = true;
 
     if (!this._rootNode.containerOpen) {
-      // This triggers containerOpened which then builds the visible section.
+      // This triggers containerStateChanged which then builds the visible
+      // section.
       this._rootNode.containerOpen = true;
     }
     else
       this.invalidateContainer(this._rootNode);
 
     // "Activate" the sorting column and update commands.
     this.sortingChanged(this._result.sortingMode);
 
@@ -853,27 +854,21 @@ PlacesTreeView.prototype = {
     this._invalidateCellValue(aNode, this.COLUMN_TYPE_DATEADDED);
   },
 
   nodeLastModifiedChanged:
   function PTV_nodeLastModifiedChanged(aNode, aNewValue) {
     this._invalidateCellValue(aNode, this.COLUMN_TYPE_LASTMODIFIED);
   },
 
-  containerOpened: function PTV_containerOpened(aNode) {
+  containerStateChanged:
+  function PTV_containerStateChanged(aNode, aOldState, aNewState) {
     this.invalidateContainer(aNode);
   },
 
-  containerClosed: function PTV_containerClosed(aNode) {
-    this.invalidateContainer(aNode);
-  },
-
-  containerStateChanged:
-  function PTV_containerStateChanged(aNode, aOldState, aNewState) {},
-
   invalidateContainer: function PTV_invalidateContainer(aContainer) {
     NS_ASSERT(this._result, "Need to have a result to update");
     if (!this._tree)
       return;
 
     let startReplacement, replaceCount;
     if (aContainer == this._rootNode) {
       startReplacement = 0;
--- a/browser/components/places/src/PlacesUIUtils.jsm
+++ b/browser/components/places/src/PlacesUIUtils.jsm
@@ -327,248 +327,16 @@ var PlacesUIUtils = {
                                                        : data.uri;
           return new PlacesCreateBookmarkTransaction(PlacesUtils._uri(data.uri),
                                                      container, index, title);
         }
     }
     return null;
   },
 
-  _reportDeprecatedAddBookmarkMethod:
-  function PUIU__reportDeprecatedAddBookmarkMethod() {
-    // Removes "PUIU_".
-    let oldFuncName = arguments.callee.caller.name.slice(5);
-    Cu.reportError(oldFuncName + " is deprecated and will be removed in a " +
-                   "future release. Use showBookmarkDialog instead.");
-  },
-
-  /**
-   * This is here for compatibility reasons, use ShowBookmarkDialog instead.
-   */
-  showAddBookmarkUI: function PUIU_showAddBookmarkUI(
-    aURI, aTitle, aDescription, aDefaultInsertionPoint, aShowPicker,
-    aLoadInSidebar, aKeyword, aPostData, aCharSet) {
-    this._reportDeprecatedAddBookmarkMethod();
-
-    var info = {
-      action: "add",
-      type: "bookmark"
-    };
-
-    if (aURI)
-      info.uri = aURI;
-
-    // allow default empty title
-    if (typeof(aTitle) == "string")
-      info.title = aTitle;
-
-    if (aDescription)
-      info.description = aDescription;
-
-    if (aDefaultInsertionPoint) {
-      info.defaultInsertionPoint = aDefaultInsertionPoint;
-      if (!aShowPicker)
-        info.hiddenRows = ["folderPicker"];
-    }
-
-    if (aLoadInSidebar)
-      info.loadBookmarkInSidebar = true;
-
-    if (typeof(aKeyword) == "string") {
-      info.keyword = aKeyword;
-      if (typeof(aPostData) == "string")
-        info.postData = aPostData;
-      if (typeof(aCharSet) == "string")
-        info.charSet = aCharSet;
-    }
-
-    return this.showBookmarkDialog(info);
-  },
-
-  /**
-   * This is here for compatibility reasons, use ShowBookmarkDialog instead.
-   */
-  showMinimalAddBookmarkUI:
-  function PUIU_showMinimalAddBookmarkUI(
-    aURI, aTitle, aDescription, aDefaultInsertionPoint, aShowPicker,
-    aLoadInSidebar, aKeyword, aPostData, aCharSet) {
-    this._reportDeprecatedAddBookmarkMethod();
-
-    var info = {
-      action: "add",
-      type: "bookmark",
-      hiddenRows: ["description"]
-    };
-    if (aURI)
-      info.uri = aURI;
-
-    // allow default empty title
-    if (typeof(aTitle) == "string")
-      info.title = aTitle;
-
-    if (aDescription)
-      info.description = aDescription;
-
-    if (aDefaultInsertionPoint) {
-      info.defaultInsertionPoint = aDefaultInsertionPoint;
-      if (!aShowPicker)
-        info.hiddenRows.push("folderPicker");
-    }
-
-    if (aLoadInSidebar)
-      info.loadBookmarkInSidebar = true;
-    else
-      info.hiddenRows = info.hiddenRows.concat(["location", "loadInSidebar"]);
-
-    if (typeof(aKeyword) == "string") {
-      info.keyword = aKeyword;
-      // Hide the Tags field if we are adding a keyword.
-      info.hiddenRows.push("tags");
-      // Keyword related params.
-      if (typeof(aPostData) == "string")
-        info.postData = aPostData;
-      if (typeof(aCharSet) == "string")
-        info.charSet = aCharSet;
-    }
-    else
-      info.hiddenRows.push("keyword");
-
-    return this.showBookmarkDialog(info, undefined, true);
-  },
-
-  /**
-   * This is here for compatibility reasons, use ShowBookmarkDialog instead.
-   */
-  showAddLivemarkUI: function PUIU_showAddLivemarkURI(aFeedURI,
-                                                      aSiteURI,
-                                                      aTitle,
-                                                      aDescription,
-                                                      aDefaultInsertionPoint,
-                                                      aShowPicker) {
-    this._reportDeprecatedAddBookmarkMethod();
-
-    var info = {
-      action: "add",
-      type: "livemark"
-    };
-
-    if (aFeedURI)
-      info.feedURI = aFeedURI;
-    if (aSiteURI)
-      info.siteURI = aSiteURI;
-
-    // allow default empty title
-    if (typeof(aTitle) == "string")
-      info.title = aTitle;
-
-    if (aDescription)
-      info.description = aDescription;
-
-    if (aDefaultInsertionPoint) {
-      info.defaultInsertionPoint = aDefaultInsertionPoint;
-      if (!aShowPicker)
-        info.hiddenRows = ["folderPicker"];
-    }
-    return this.showBookmarkDialog(info);
-  },
-
-  /**
-   * This is here for compatibility reasons, use ShowBookmarkDialog instead.
-   */
-  showMinimalAddLivemarkUI:
-  function PUIU_showMinimalAddLivemarkURI(
-    aFeedURI, aSiteURI, aTitle, aDescription, aDefaultInsertionPoint,
-    aShowPicker) {
-
-    this._reportDeprecatedAddBookmarkMethod();
-
-    var info = {
-      action: "add",
-      type: "livemark",
-      hiddenRows: ["feedLocation", "siteLocation", "description"]
-    };
-
-    if (aFeedURI)
-      info.feedURI = aFeedURI;
-    if (aSiteURI)
-      info.siteURI = aSiteURI;
-
-    // allow default empty title
-    if (typeof(aTitle) == "string")
-      info.title = aTitle;
-
-    if (aDescription)
-      info.description = aDescription;
-
-    if (aDefaultInsertionPoint) {
-      info.defaultInsertionPoint = aDefaultInsertionPoint;
-      if (!aShowPicker)
-        info.hiddenRows.push("folderPicker");
-    }
-    return this.showBookmarkDialog(info, undefined, true);
-  },
-
-  /**
-   * This is here for compatibility reasons, use ShowBookmarkDialog instead.
-   */
-  showMinimalAddMultiBookmarkUI: function PUIU_showAddMultiBookmarkUI(aURIList) {
-    this._reportDeprecatedAddBookmarkMethod();
-
-    if (aURIList.length == 0)
-      throw("showAddMultiBookmarkUI expects a list of nsIURI objects");
-    var info = {
-      action: "add",
-      type: "folder",
-      hiddenRows: ["description"],
-      URIList: aURIList
-    };
-    return this.showBookmarkDialog(info, undefined, true);
-  },
-
-  /**
-   * This is here for compatibility reasons, use ShowBookmarkDialog instead.
-   */
-  showItemProperties: function PUIU_showItemProperties(aItemId, aType, aReadOnly) {
-    this._reportDeprecatedAddBookmarkMethod();
-
-    var info = {
-      action: "edit",
-      type: aType,
-      itemId: aItemId,
-      readOnly: aReadOnly
-    };
-    return this.showBookmarkDialog(info);
-  },
-
-  /**
-   * This is here for compatibility reasons, use ShowBookmarkDialog instead.
-   */
-  showAddFolderUI:
-  function PUIU_showAddFolderUI(aTitle, aDefaultInsertionPoint, aShowPicker) {
-    this._reportDeprecatedAddBookmarkMethod();
-
-    var info = {
-      action: "add",
-      type: "folder",
-      hiddenRows: []
-    };
-
-    // allow default empty title
-    if (typeof(aTitle) == "string")
-      info.title = aTitle;
-
-    if (aDefaultInsertionPoint) {
-      info.defaultInsertionPoint = aDefaultInsertionPoint;
-      if (!aShowPicker)
-        info.hiddenRows.push("folderPicker");
-    }
-    return this.showBookmarkDialog(info);
-  },
-
-
   /**
    * Shows the bookmark dialog corresponding to the specified info.
    *
    * @param aInfo
    *        Describes the item to be edited/added in the dialog.
    *        See documentation at the top of bookmarkProperties.js
    * @param aWindow
    *        Owner window for the new dialog.
--- a/browser/installer/removed-files.in
+++ b/browser/installer/removed-files.in
@@ -224,16 +224,17 @@ extensions/testpilot@labs.mozilla.com/sk
 extensions/testpilot@labs.mozilla.com/skin/win/notification-tail-up.png
 extensions/testpilot@labs.mozilla.com/tests/test_data_store.js
 greprefs/all.js
 greprefs/security-prefs.js
 greprefs/xpinstall.js
 install.rdf
 modules/ISO8601DateUtils.jsm
 modules/JSON.jsm
+modules/utils.js
 mozilla-runtime@BIN_SUFFIX@
 old-homepage-default.properties
 README.txt
 res/arrow.gif
 res/arrowd.gif
 res/broken-image.gif
 res/broken-image.png
 res/charsetData.properties
@@ -992,17 +993,16 @@ xpicleanup@BIN_SUFFIX@
   modules/services-sync/type_records/passwords.js
   modules/services-sync/type_records/prefs.js
   modules/services-sync/type_records/tabs.js
   modules/services-sync/util.js
   modules/stylePanel.jsm
   modules/tabview/AllTabs.jsm
   modules/tabview/groups.jsm
   modules/tabview/utils.jsm
-  modules/utils.js
   modules/WindowDraggingUtils.jsm
   #ifdef XP_WIN
     modules/WindowsJumpLists.jsm
     modules/WindowsPreviewPerTab.jsm
   #endif
   modules/XPCOMUtils.jsm
   modules/XPIProvider.jsm
   res/contenteditable.css
--- a/toolkit/components/places/Makefile.in
+++ b/toolkit/components/places/Makefile.in
@@ -113,17 +113,16 @@ EXTRA_COMPONENTS = \
   $(NULL)
 
 ifdef MOZ_XUL
 EXTRA_COMPONENTS += nsPlacesAutoComplete.js nsPlacesAutoComplete.manifest
 endif
 
 EXTRA_JS_MODULES = \
   PlacesDBUtils.jsm \
-  utils.js \
   $(NULL)
 
 EXTRA_PP_JS_MODULES = \
   PlacesUtils.jsm \
   $(NULL)
 
 ifdef ENABLE_TESTS
 DIRS += tests
--- a/toolkit/components/places/nsINavHistoryService.idl
+++ b/toolkit/components/places/nsINavHistoryService.idl
@@ -456,17 +456,17 @@ interface nsINavHistoryQueryResultNode :
 };
 
 
 /**
  * Allows clients to observe what is happening to a result as it updates itself
  * according to history and bookmark system events. Register this observer on a
  * result using nsINavHistoryResult::addObserver.
  */
-[scriptable, uuid(9ea86387-6a30-4ee2-b70d-26fbb718902f)]
+[scriptable, uuid(547102c4-ab84-4058-b9d4-6f99f6c80893)]
 interface nsINavHistoryResultObserver : nsISupports
 {
   /**
    * Called when 'aItem' is inserted into 'aParent' at index 'aNewIndex'.
    * The item previously at index (if any) and everything below it will have
    * been shifted down by one. The item may be a container or a leaf.
    */
   void nodeInserted(in nsINavHistoryContainerResultNode aParent,
@@ -614,40 +614,16 @@ interface nsINavHistoryResultObserver : 
    *        the index in aParentNode, at which a node is being replaced
    */
   void nodeReplaced(in nsINavHistoryContainerResultNode aParentNode,
                     in nsINavHistoryResultNode aOldNode,
                     in nsINavHistoryResultNode aNewNode,
                     in unsigned long aIndex);
 
   /**
-   * Called after a container node went from closed to opened.
-   *
-   * @note  This method is DEPRECATED.  In the future only containerStateChanged
-   *        will notify when a container is opened.
-   *
-   * @param aContainerNode
-   *        the container node which was opened
-   */
-  void containerOpened(in nsINavHistoryContainerResultNode aContainerNode);
-
-  /**
-   * Called after a container node went from opened to closed. This will be
-   * called for the topmost container that is closing, and implies that any
-   * child containers have closed as well.
-   *
-   * @note  This method is DEPRECATED.  In the future only containerStateChanged
-   *        will notify when a container is closed.
-   *
-   * @param aContainerNode
-   *        the container node which was closed
-   */
-  void containerClosed(in nsINavHistoryContainerResultNode aContainerNode);
-
-  /**
    * Called after a container changes state.
    *
    * @param aContainerNode
    *        The container that has changed state.
    * @param aOldState
    *        The state that aContainerNode has transitioned out of.
    * @param aNewState
    *        The state that aContainerNode has transitioned into.
--- a/toolkit/components/places/nsNavHistoryResult.cpp
+++ b/toolkit/components/places/nsNavHistoryResult.cpp
@@ -623,23 +623,16 @@ nsNavHistoryContainerResultNode::NotifyO
   nsresult rv;
   PRUint16 currState;
   rv = GetState(&currState);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Notify via the new ContainerStateChanged observer method.
   NOTIFY_RESULT_OBSERVERS(result,
                           ContainerStateChanged(this, aOldState, currState));
-
-  // Notify via the deprecated observer methods.
-  if (currState == STATE_OPENED)
-    NOTIFY_RESULT_OBSERVERS(result, ContainerOpened(this));
-  else if (currState == STATE_CLOSED)
-    NOTIFY_RESULT_OBSERVERS(result, ContainerClosed(this));
-
   return NS_OK;
 }
 
 
 NS_IMETHODIMP
 nsNavHistoryContainerResultNode::GetState(PRUint16* _state)
 {
   NS_ENSURE_ARG_POINTER(_state);
--- a/toolkit/components/places/tests/queries/test_async.js
+++ b/toolkit/components/places/tests/queries/test_async.js
@@ -237,18 +237,16 @@ Test.prototype = {
           default:
             do_throw("Unexpected new state! " + newState);
           }
         }
         catch (err) {
           do_throw(err);
         }
       },
-      containerOpened: function (container) {},
-      containerClosed: function (container) {}
     };
     this.result.addObserver(this.observer, false);
 
     print("Opening container");
     this.result.root.containerOpen = true;
   },
 
   /**
--- a/toolkit/components/places/tests/unit/test_nsINavHistoryViewer.js
+++ b/toolkit/components/places/tests/unit/test_nsINavHistoryViewer.js
@@ -89,24 +89,25 @@ var resultObserver = {
   nodeReplaced: function(parent, oldNode, newNode, index) {
     this.replacedNode = node;
   },
   movedNode: null,
   nodeMoved: function(node, oldParent, oldIndex, newParent, newIndex) {
     this.movedNode = node;
   },
   openedContainer: null,
-  containerOpened: function(node) {
-    this.openedContainer = node;
+  closedContainer: null,
+  containerStateChanged: function (aNode, aOldState, aNewState) {
+    if (aNewState == Ci.nsINavHistoryContainerResultNode.STATE_OPENED) {
+      this.openedContainer = aNode;
+    }
+    else if (aNewState == Ci.nsINavHistoryContainerResultNode.STATE_CLOSED) {
+      this.closedContainer = aNode;
+    }
   },
-  closedContainer: null,
-  containerClosed: function(node) {
-    this.closedContainer = node;
-  },
-  containerStateChanged: function (node, oldState, newState) {},
   invalidatedContainer: null,
   invalidateContainer: function(node) {    
     this.invalidatedContainer = node;
   },
   sortingMode: null,
   sortingChanged: function(sortingMode) {
     this.sortingMode = sortingMode;
   },
deleted file mode 100644
--- a/toolkit/components/places/utils.js
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * This is a mock file pointing to PlacesUtils.jsm for add-ons backwards
- * compatibility.
- *
- * If you are importing this file, you should instead import PlacesUtils.jsm.
- * If you need to support different versions of toolkit, then you can use the
- * following code to import PlacesUtils in your scope.
- *
- * Try {
- *   Components.utils.import("resource://gre/modules/PlacesUtils.jsm");
- * } catch (ex) {
- *   Components.utils.import("resource://gre/modules/utils.js");
- * }
- *
- */
-
-var EXPORTED_SYMBOLS = ["PlacesUtils"];
-
-Components.utils.reportError('An add-on is importing utils.js module, this file is deprecated, PlacesUtils.jsm should be used instead. Please notify add-on author of this problem.');
-
-Components.utils.import("resource://gre/modules/PlacesUtils.jsm");