mDirty = PR_TRUE;  return NS_OK;
return(NS_OK);
nsBookmarksService::DoCommand(nsISupportsArray *aSources, nsIRDFResource *aCommand,                nsISupportsArray *aArguments){    nsresult        rv = NS_OK;    PRInt32         loop;    PRUint32        numSources;    if (NS_FAILED(rv = aSources->Count(&numSources)))   return rv;    if (numSources < 1)    {        return NS_ERROR_ILLEGAL_VALUE;    }    // Note: some commands only run once (instead of looping over selection);    //       if that's the case, be sure to "break" (if success) so that "mDirty"    //       is set (and "bookmarks.html" will be flushed out shortly afterwards)    for (loop=((PRInt32)numSources)-1; loop>=0; loop--)    {        nsCOMPtr<nsIRDFResource> src = do_QueryElementAt(aSources, loop, &rv);        if (!src) return rv;        if (aCommand == kNC_BookmarkCommand_NewBookmark)        {            rv = insertBookmarkItem(src, aArguments, kNC_Bookmark);            if (NS_FAILED(rv))  return rv;            break;        }        else if (aCommand == kNC_BookmarkCommand_NewFolder)        {            rv = insertBookmarkItem(src, aArguments, kNC_Folder);            if (NS_FAILED(rv))  return rv;            break;        }        else if (aCommand == kNC_BookmarkCommand_NewSeparator)        {            rv = insertBookmarkItem(src, aArguments, kNC_BookmarkSeparator);            if (NS_FAILED(rv))  return rv;            break;        }        else if (aCommand == kNC_BookmarkCommand_DeleteBookmark ||            aCommand == kNC_BookmarkCommand_DeleteBookmarkFolder ||            aCommand == kNC_BookmarkCommand_DeleteBookmarkSeparator)        {            if (NS_FAILED(rv = deleteBookmarkItem(src, aArguments, loop)))                return rv;        }        else if (aCommand == kNC_BookmarkCommand_SetNewBookmarkFolder)        {            rv = setFolderHint(src, kNC_NewBookmarkFolder);            if (NS_FAILED(rv))  return rv;            break;        }        else if (aCommand == kNC_BookmarkCommand_SetPersonalToolbarFolder)        {            rv = setFolderHint(src, kNC_PersonalToolbarFolder);            if (NS_FAILED(rv))  return rv;            break;        }        else if (aCommand == kNC_BookmarkCommand_SetNewSearchFolder)        {            rv = setFolderHint(src, kNC_NewSearchFolder);            if (NS_FAILED(rv))  return rv;            break;        }        else if (aCommand == kNC_BookmarkCommand_Import)        {            rv = importBookmarks(aArguments);            if (NS_FAILED(rv))  return rv;            break;        }        else if (aCommand == kNC_BookmarkCommand_Export)        {            rv = exportBookmarks(aArguments);            if (NS_FAILED(rv))  return rv;            break;        }    }    mDirty = PR_TRUE;    return NS_OK;}