diff options
author | Steve Block <steveblock@google.com> | 2011-05-19 16:11:11 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2011-05-19 19:02:24 +0100 |
commit | 51d4f995ba2c20675e3f849bc02334d33b5b8eab (patch) | |
tree | 647858b9e6171b4fa6d765c260bc0372926f3cc4 /Source/WebCore/loader/archive | |
parent | 986d9857513804f79bf5b8d2c03daf4caa492e8b (diff) | |
download | external_webkit-51d4f995ba2c20675e3f849bc02334d33b5b8eab.zip external_webkit-51d4f995ba2c20675e3f849bc02334d33b5b8eab.tar.gz external_webkit-51d4f995ba2c20675e3f849bc02334d33b5b8eab.tar.bz2 |
Fix WebArchiveAndroid logging
Change-Id: I6adc6f64f3833d3bc5016da929ffd1e95930d5c5
Diffstat (limited to 'Source/WebCore/loader/archive')
-rw-r--r-- | Source/WebCore/loader/archive/android/WebArchiveAndroid.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/Source/WebCore/loader/archive/android/WebArchiveAndroid.cpp b/Source/WebCore/loader/archive/android/WebArchiveAndroid.cpp index 9cff676..fbb0aec 100644 --- a/Source/WebCore/loader/archive/android/WebArchiveAndroid.cpp +++ b/Source/WebCore/loader/archive/android/WebArchiveAndroid.cpp @@ -117,7 +117,7 @@ static bool loadArchiveResourceField(xmlNodePtr resourceNode, const xmlChar* fie } } if (!base64Data) { - LOGD("loadWebArchive: Failed to load field."); + LOGD("loadArchiveResourceField: Failed to load field."); return false; } @@ -125,7 +125,7 @@ static bool loadArchiveResourceField(xmlNodePtr resourceNode, const xmlChar* fie const int result = base64Decode(base64Data, base64Size, *outputData); if (!result) { - LOGD("loadWebArchive: Failed to decode field."); + LOGD("loadArchiveResourceField: Failed to decode field."); return false; } @@ -165,37 +165,37 @@ static KURL loadArchiveResourceFieldURL(xmlNodePtr resourceNode, const xmlChar* static PassRefPtr<ArchiveResource> loadArchiveResource(xmlNodePtr resourceNode) { if (!xmlStrEqual(resourceNode->name, archiveResourceTag)) { - LOGD("loadWebArchive: Malformed resource."); + LOGD("loadArchiveResource: Malformed resource."); return 0; } KURL url = loadArchiveResourceFieldURL(resourceNode, urlFieldTag); if (url.isNull()) { - LOGD("loadWebArchive: Failed to load resource."); + LOGD("loadArchiveResource: Failed to load resource."); return 0; } String mimeType = loadArchiveResourceFieldString(resourceNode, mimeFieldTag); if (mimeType.isNull()) { - LOGD("loadWebArchive: Failed to load resource."); + LOGD("loadArchiveResource: Failed to load resource."); return 0; } String textEncoding = loadArchiveResourceFieldString(resourceNode, encodingFieldTag); if (textEncoding.isNull()) { - LOGD("loadWebArchive: Failed to load resource."); + LOGD("loadArchiveResource: Failed to load resource."); return 0; } String frameName = loadArchiveResourceFieldString(resourceNode, frameFieldTag); if (frameName.isNull()) { - LOGD("loadWebArchive: Failed to load resource."); + LOGD("loadArchiveResource: Failed to load resource."); return 0; } PassRefPtr<SharedBuffer> data = loadArchiveResourceFieldBuffer(resourceNode, dataFieldTag); if (!data) { - LOGD("loadWebArchive: Failed to load resource."); + LOGD("loadArchiveResource: Failed to load resource."); return 0; } @@ -211,7 +211,7 @@ static PassRefPtr<WebArchiveAndroid> loadArchive(xmlNodePtr archiveNode) Vector<PassRefPtr<Archive> > subframes; if (!xmlStrEqual(archiveNode->name, archiveTag)) { - LOGD("loadWebArchive: Malformed archive."); + LOGD("loadArchive: Malformed archive."); return 0; } @@ -227,7 +227,7 @@ static PassRefPtr<WebArchiveAndroid> loadArchive(xmlNodePtr archiveNode) } } if (!mainResource) { - LOGD("saveWebArchive: Failed to load main resource."); + LOGD("loadArchive: Failed to load main resource."); return 0; } @@ -240,7 +240,7 @@ static PassRefPtr<WebArchiveAndroid> loadArchive(xmlNodePtr archiveNode) resourceNode = resourceNode->next) { PassRefPtr<ArchiveResource> subresource = loadArchiveResource(resourceNode); if (!subresource) { - LOGD("saveWebArchive: Failed to load subresource."); + LOGD("loadArchive: Failed to load subresource."); break; } subresources.append(subresource); @@ -258,7 +258,7 @@ static PassRefPtr<WebArchiveAndroid> loadArchive(xmlNodePtr archiveNode) resourceNode = resourceNode->next) { PassRefPtr<WebArchiveAndroid> subframe = loadArchive(resourceNode); if (!subframe) { - LOGD("saveWebArchive: Failed to load subframe."); + LOGD("loadArchive: Failed to load subframe."); break; } subframes.append(subframe); @@ -290,20 +290,20 @@ PassRefPtr<WebArchiveAndroid> WebArchiveAndroid::create(SharedBuffer* buffer) xmlDocPtr doc = xmlReadMemory(buffer->data(), buffer->size(), noBaseUrl, defaultEncoding, noParserOptions); if (!doc) { - LOGD("loadWebArchive: Failed to parse document."); + LOGD("create: Failed to parse document."); return createArchiveForError(); } xmlNodePtr root = xmlDocGetRootElement(doc); if (!root) { - LOGD("loadWebArchive: Empty document."); + LOGD("create: Empty document."); xmlFreeDoc(doc); return createArchiveForError(); } RefPtr<WebArchiveAndroid> archive = loadArchive(root); if (!archive) { - LOGD("loadWebArchive: Failed to load archive."); + LOGD("create: Failed to load archive."); xmlFreeDoc(doc); return createArchiveForError(); } @@ -316,7 +316,7 @@ static bool saveArchiveResourceField(xmlTextWriterPtr writer, const xmlChar* tag { int result = xmlTextWriterStartElement(writer, tag); if (result < 0) { - LOGD("saveWebArchive: Failed to start element."); + LOGD("saveArchiveResourceField: Failed to start element."); return false; } @@ -324,20 +324,20 @@ static bool saveArchiveResourceField(xmlTextWriterPtr writer, const xmlChar* tag Vector<char> base64Data; base64Encode(data, size, base64Data, false); if (base64Data.isEmpty()) { - LOGD("saveWebArchive: Failed to base64 encode data."); + LOGD("saveArchiveResourceField: Failed to base64 encode data."); return false; } result = xmlTextWriterWriteRawLen(writer, BAD_CAST base64Data.data(), base64Data.size()); if (result < 0) { - LOGD("saveWebArchive: Failed to write data."); + LOGD("saveArchiveResourceField: Failed to write data."); return false; } } result = xmlTextWriterEndElement(writer); if (result < 0) { - LOGD("saveWebArchive: Failed to end element."); + LOGD("saveArchiveResourceField: Failed to end element."); return false; } @@ -360,7 +360,7 @@ static bool saveArchiveResource(xmlTextWriterPtr writer, PassRefPtr<ArchiveResou { int result = xmlTextWriterStartElement(writer, archiveResourceTag); if (result < 0) { - LOGD("saveWebArchive: Failed to start element."); + LOGD("saveArchiveResource: Failed to start element."); return false; } @@ -373,7 +373,7 @@ static bool saveArchiveResource(xmlTextWriterPtr writer, PassRefPtr<ArchiveResou result = xmlTextWriterEndElement(writer); if (result < 0) { - LOGD("saveWebArchive: Failed to end element."); + LOGD("saveArchiveResource: Failed to end element."); return false; } @@ -384,13 +384,13 @@ static bool saveArchive(xmlTextWriterPtr writer, PassRefPtr<Archive> archive) { int result = xmlTextWriterStartElement(writer, archiveTag); if (result < 0) { - LOGD("saveWebArchive: Failed to start element."); + LOGD("saveArchive: Failed to start element."); return false; } result = xmlTextWriterStartElement(writer, mainResourceTag); if (result < 0) { - LOGD("saveWebArchive: Failed to start element."); + LOGD("saveArchive: Failed to start element."); return false; } @@ -399,13 +399,13 @@ static bool saveArchive(xmlTextWriterPtr writer, PassRefPtr<Archive> archive) result = xmlTextWriterEndElement(writer); if (result < 0) { - LOGD("saveWebArchive: Failed to end element."); + LOGD("saveArchive: Failed to end element."); return false; } result = xmlTextWriterStartElement(writer, subresourcesTag); if (result < 0) { - LOGD("saveWebArchive: Failed to start element."); + LOGD("saveArchive: Failed to start element."); return false; } @@ -418,13 +418,13 @@ static bool saveArchive(xmlTextWriterPtr writer, PassRefPtr<Archive> archive) result = xmlTextWriterEndElement(writer); if (result < 0) { - LOGD("saveWebArchive: Failed to end element."); + LOGD("saveArchive: Failed to end element."); return false; } result = xmlTextWriterStartElement(writer, subframesTag); if (result < 0) { - LOGD("saveWebArchive: Failed to start element."); + LOGD("saveArchive: Failed to start element."); return false; } @@ -437,7 +437,7 @@ static bool saveArchive(xmlTextWriterPtr writer, PassRefPtr<Archive> archive) result = xmlTextWriterEndElement(writer); if (result < 0) { - LOGD("saveWebArchive: Failed to end element."); + LOGD("saveArchive: Failed to end element."); return true; } |