Updated the comment in CookieStore.editCommand.
authorjono@jono-gibbon-laptop
Tue, 01 Apr 2008 19:16:27 -0700
changeset 44415 19e1411b926f5867b66fe3e8f55c0e25a41c74d3
parent 44414 890970bcb57ad853da749d506897d0a03317c1c3
child 44416 de87cf4918b0172c373fadb55524027a31f71b2e
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)
Updated the comment in CookieStore.editCommand.
services/sync/modules/stores.js
--- a/services/sync/modules/stores.js
+++ b/services/sync/modules/stores.js
@@ -778,22 +778,22 @@ CookieStore.prototype = {
 
   _createCommand: function HistStore__createCommand(command) {
 	// we got a command to create a cookie in the local browser
         // in order to sync with the server.
 
 	this._log.info("CookieStore got createCommand: " + command );
         // this assumes command.data fits the nsICookie2 interface
 	this._cookieManager.add( command.data.host,
-				  command.data.path,
-				  command.data.name,
-				  command.data.value,
-				  command.data.isSecure,
-				  command.data.isSession,
-				  command.data.expiry );
+                                 command.data.path,
+                                 command.data.name,
+                                 command.data.value,
+                                 command.data.isSecure,
+                                 command.data.isSession,
+                                 command.data.expiry );
   },
 
   _removeCommand: function CookieStore__removeCommand(command) {
 	// we got a command to remove a cookie from the local browser
         // in order to sync with the server.
         // command.data appears to be equivalent to what wrap() puts in
         // the JSON dictionary.
     
@@ -808,20 +808,24 @@ CookieStore.prototype = {
 				    command.data.path,
                                     false );
   },
 
   _editCommand: function CookieStore__editCommand(command) {
         // we got a command to change a cookie in the local browser
         // in order to sync with the server.
     
-	// TODO implement this!!  The behavior should be that if the
+	// The behavior should be that if the
         // local copy of the cookie is more-recently modified, it should
         // be kept, but if it's older, it should be replaced with the
         // server's copy.
+
+        // The nsICookie interface doesn't seem to include the date/time
+        // that the cookie was set -- only the expiry.  TODO: Figure out
+        // the best way to deal with this.
         this._log.info("CookieStore got editCommand: " + command );
   },
 
 
   wrap: function CookieStore_wrap() {
 	// Return contents of this store, as JSON.
         // A dictionary of cookies where the keys are GUIDs and the
         // values are sub-dictionaries containing all cookie fields.