Addressing sr comments from darin. Bug 322369.

This commit is contained in:
bryner%brianryner.com 2006-01-18 01:21:36 +00:00
Родитель 5afcfd2410
Коммит 645e227d83
4 изменённых файлов: 14 добавлений и 3 удалений

Просмотреть файл

@ -823,5 +823,12 @@ interface nsINavHistoryService : nsISupports
[scriptable, uuid(be935aed-6929-4e44-be29-17ec89e5c8bd)]
interface nsIMorkHistoryImporter : nsISupports
{
/**
* Import the given Mork history file.
* @param file The Mork history file to import
* @param history A reference to the nsINavHistoryService. This is
* supplied since the importer is invoked during
* history service initialization.
*/
void importHistory(in nsIFile file, in nsINavHistoryService history);
};

Просмотреть файл

@ -195,6 +195,8 @@ NS_IMETHODIMP
nsMorkHistoryImporter::ImportHistory(nsIFile *aFile,
nsINavHistoryService *aHistory)
{
NS_ENSURE_TRUE(aFile && aHistory, NS_ERROR_NULL_POINTER);
// Read in the mork file
nsMorkReader reader;
nsresult rv = reader.Init();
@ -223,6 +225,7 @@ nsMorkHistoryImporter::ImportHistory(nsIFile *aFile,
// Now add the results to history
nsNavHistory *history = NS_STATIC_CAST(nsNavHistory*, aHistory);
mozIStorageConnection *conn = history->GetStorageConnection();
NS_ENSURE_TRUE(conn, NS_ERROR_NOT_INITIALIZED);
mozStorageTransaction transaction(conn, PR_FALSE);
reader.EnumerateRows(AddToHistoryCB, &data);

Просмотреть файл

@ -12,7 +12,7 @@
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Places.
* The Original Code is the Mork Reader.
*
* The Initial Developer of the Original Code is
* Google Inc.
@ -64,7 +64,8 @@ ConvertChar(char *c)
if ('0' <= c1 && c1 <= '9') {
*c = c1 - '0';
return PR_TRUE;
} else if ('A' <= c1 && c1 <= 'F') {
}
if ('A' <= c1 && c1 <= 'F') {
*c = c1 - 'A' + 10;
return PR_TRUE;
}

Просмотреть файл

@ -12,7 +12,7 @@
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Places.
* The Original Code is the Mork Reader.
*
* The Initial Developer of the Original Code is
* Google Inc.