зеркало из https://github.com/mozilla/gecko-dev.git
Addressing sr comments from darin. Bug 322369.
This commit is contained in:
Родитель
5afcfd2410
Коммит
645e227d83
|
@ -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.
|
||||
|
|
Загрузка…
Ссылка в новой задаче