Fixed all the places where I was accidentally calling it incomingShareAnno instead of incomingSharedAnno (note the missing letter d). Same for outgoingSharedAnno.
authorjonathandicarlo@jonathan-dicarlos-macbook-pro.local
Tue, 24 Jun 2008 18:28:01 -0700
changeset 44725 9afb528fd0db908f06b6741e44baf34ce513c032
parent 44724 6a6ce9093209f461d8b66c13269ef4317731c756
child 44726 6d56acb301c26a2a8d3f8802d0d90e6e09eb2e6f
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
Fixed all the places where I was accidentally calling it incomingShareAnno instead of incomingSharedAnno (note the missing letter d). Same for outgoingSharedAnno.
services/sync/modules/engines/bookmarks.js
--- a/services/sync/modules/engines/bookmarks.js
+++ b/services/sync/modules/engines/bookmarks.js
@@ -463,17 +463,17 @@ BookmarksEngine.prototype = {
     /* Stops sharing the specified folder.  Deletes its data from the
        server, deletes the annotations that mark it as shared, and sends
        a message to the shar-ee to let them know it's been withdrawn. */
     // TODO: currently not called from anywhere.
     let self = yield;
     let serverPath = this._annoSvc.getItemAnnotation( folderNode,
                                                       SERVER_PATH_ANNO );
     let username = this._annoSvc.getItemAnnotation( folderNode,
-                                                    OUTGOING_SHARE_ANNO );
+                                                    OUTGOING_SHARED_ANNO );
 
     // Delete the share from the server:
     let keyringFile = new Resource(serverPath + "/" + KEYRING_FILE_NAME);
     keyringFile.delete(self.cb);
     yield;
     let bmkFile = new Resource(serverPath + "/" + SHARED_BOOKMARK_FILE_NAME);
     keyringFile.delete(self.cb);
     yield;
@@ -482,17 +482,17 @@ BookmarksEngine.prototype = {
 
     // Remove the annotations from the local folder:
     this._annoSvc.setItemAnnotation(folderNode,
                                     SERVER_PATH_ANNO,
                                     "",
                                     0,
                                     this._annoSvc.EXPIRE_NEVER);
     this._annoSvc.setItemAnnotation(folderNode,
-                                    OUTGOING_SHARE_ANNO,
+                                    OUTGOING_SHARED_ANNO,
                                     "",
                                     0,
                                     this._annoSvc.EXPIRE_NEVER);
     // TODO is there a way to remove the annotations entirely rather than
     // setting it to an empty string??
     self.done();
   },
 
@@ -845,20 +845,20 @@ BookmarksStore.prototype = {
       }
     } break;
     case "folder":
       this._log.debug(" -> creating folder \"" + command.data.title + "\"");
       newId = this._bms.createFolder(parentId,
                                      command.data.title,
                                      command.data.index);
       // If folder is an outgoing share, put the annotations on it:
-      if ( command.data.outgoingShareAnno != undefined ) {
+      if ( command.data.outgoingSharedAnno != undefined ) {
 	this._ans.setItemAnnotation(newId,
-				    OUTGOING_SHARE_ANNO,
-                                    command.data.outgoingShareAnno,
+				    OUTGOING_SHARED_ANNO,
+                                    command.data.outgoingSharedAnno,
 				    0,
 				    this._ans.EXPIRE_NEVER);
 	this._ans.setItemAnnotation(newId,
 				    SERVER_PATH_ANNO,
                                     command.data.serverPathAnno,
 				    0,
 				    this._ans.EXPIRE_NEVER);
 
@@ -875,20 +875,26 @@ BookmarksStore.prototype = {
     case "incoming-share":
       /* even though incoming shares are folders according to the
        * bookmarkService, _wrap() wraps them as type=incoming-share, so we
        * handle them separately, like so: */
       this._log.debug(" -> creating incoming-share \"" + command.data.title + "\"");
       newId = this._bms.createFolder(parentId,
                                      command.data.title,
                                      command.data.index);
-      this._ans.setItemAnnotation(newId, INCOMING_SHARE_ANNO,
-                                  command.data.username, 0, this._ans.EXPIRE_NEVER);
-      this._ans.setItemAnnotation(newId, SERVER_PATH_ANNO,
-                                  command.data.serverPath, 0, this._ans.EXPIRE_NEVER);
+      this._ans.setItemAnnotation(newId,
+				  INCOMING_SHARED_ANNO,
+                                  command.data.incomingSharedAnno,
+				  0,
+				  this._ans.EXPIRE_NEVER);
+      this._ans.setItemAnnotation(newId,
+				  SERVER_PATH_ANNO,
+                                  command.data.serverPathAnno,
+				  0,
+				  this._ans.EXPIRE_NEVER);
       break;
     case "separator":
       this._log.debug(" -> creating separator");
       newId = this._bms.insertSeparator(parentId, command.data.index);
       break;
     default:
       this._log.error("_createCommand: Unknown item type: " + command.data.type);
       break;
@@ -1001,24 +1007,24 @@ BookmarksStore.prototype = {
         this._ms.setMicrosummary(itemId, micsum);
       } break;
       case "siteURI":
         this._ls.setSiteURI(itemId, Utils.makeURI(command.data.siteURI));
         break;
       case "feedURI":
         this._ls.setFeedURI(itemId, Utils.makeURI(command.data.feedURI));
         break;
-      case "outgoingShareAnno":
-	this._ans.setItemAnnotation(itemId, OUTGOING_SHARE_ANNO,
-				    command.data.outgoingShareAnno, 0,
+      case "outgoingSharedAnno":
+	this._ans.setItemAnnotation(itemId, OUTGOING_SHARED_ANNO,
+				    command.data.outgoingSharedAnno, 0,
 				    this._ans.EXPIRE_NEVER);
 	break;
-      case "incomingShareAnno":
-	this._ans.setItemAnnotation(itemId, INCOMING_SHARE_ANNO,
-				    command.data.incomingShareAnno, 0,
+      case "incomingSharedAnno":
+	this._ans.setItemAnnotation(itemId, INCOMING_SHARED_ANNO,
+				    command.data.incomingSharedAnno, 0,
 				    this._ans.EXPIRE_NEVER);
 	break;
       case "serverPathAnno":
 	this._ans.setItemAnnotation(itemId, SERVER_PATH_ANNO,
 				    command.data.serverPathAnno, 0,
 				    this._ans.EXPIRE_NEVER);
 	break;
       default:
@@ -1048,37 +1054,37 @@ BookmarksStore.prototype = {
 
     if (node.type == node.RESULT_TYPE_FOLDER) {
       if (this._ls.isLivemark(node.itemId)) {
         item.type = "livemark";
         let siteURI = this._ls.getSiteURI(node.itemId);
         let feedURI = this._ls.getFeedURI(node.itemId);
         item.siteURI = siteURI? siteURI.spec : "";
         item.feedURI = feedURI? feedURI.spec : "";
-      } else if (this._ans.itemHasAnnotation(node.itemId, INCOMING_SHARE_ANNO)){
+      } else if (this._ans.itemHasAnnotation(node.itemId, INCOMING_SHARED_ANNO)){
 	/* When there's an incoming share, we just sync the folder itself
 	 and the values of its annotations: NOT any of its contents.  So
 	 we'll wrap it as type=incoming-share, not as a "folder". */
 	item.type = "incoming-share";
 	item.title = node.title;
-        item.serverPath = this._ans.getItemAnnotation(node.itemId,
+        item.serverPathAnno = this._ans.getItemAnnotation(node.itemId,
                                                       SERVER_PATH_ANNO);
-	item.username = this._ans.getItemAnnotation(node.itemId,
-                                                      INCOMING_SHARE_ANNO);
+	item.incomingSharedAnno = this._ans.getItemAnnotation(node.itemId,
+                                                      INCOMING_SHARED_ANNO);
       } else {
         item.type = "folder";
         node.QueryInterface(Ci.nsINavHistoryQueryResultNode);
         node.containerOpen = true;
 	// If folder is an outgoing share, wrap its annotations:
-	if (this._ans.itemHasAnnotation(node.itemId, OUTGOING_SHARE_ANNO)) {
+	if (this._ans.itemHasAnnotation(node.itemId, OUTGOING_SHARED_ANNO)) {
 
 	  item.serverPathAnno = this._ans.getItemAnnotation(node.itemId,
                                                       SERVER_PATH_ANNO);
-	  item.outgoingShareAnno = this._ans.getItemAnnotation(node.itemId,
-                                                      OUTGOING_SHARE_ANNO);
+	  item.outgoingSharedAnno = this._ans.getItemAnnotation(node.itemId,
+                                                      OUTGOING_SHARED_ANNO);
 	}
 
         for (var i = 0; i < node.childCount; i++) {
           this.__wrap(node.getChild(i), items, GUID, i);
         }
       }
       if (!guidOverride)
         item.title = node.title; // no titles for root nodes