diff options
author | Russell Brenner <russellbrenner@google.com> | 2011-11-17 09:55:11 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-11-17 09:55:11 -0800 |
commit | f22053c74835d7bee23b3b89f85f56b0b2e9ee90 (patch) | |
tree | 82279e5bcba611063940f278190fabb4dee04a1a /Source | |
parent | a46b07e21bfb048a70a3aa8173adf7ad67c3caf8 (diff) | |
parent | 3577745d3cfbfe2b7ebb3cddb1abda7026a61ac5 (diff) | |
download | external_webkit-f22053c74835d7bee23b3b89f85f56b0b2e9ee90.zip external_webkit-f22053c74835d7bee23b3b89f85f56b0b2e9ee90.tar.gz external_webkit-f22053c74835d7bee23b3b89f85f56b0b2e9ee90.tar.bz2 |
Merge "Use RefPtr instead of PassRefPtr for WebHistory"
Diffstat (limited to 'Source')
-rw-r--r-- | Source/WebKit/android/jni/WebHistory.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/Source/WebKit/android/jni/WebHistory.cpp b/Source/WebKit/android/jni/WebHistory.cpp index 7e2e9b9..8453974 100644 --- a/Source/WebKit/android/jni/WebHistory.cpp +++ b/Source/WebKit/android/jni/WebHistory.cpp @@ -375,7 +375,7 @@ static void write_string(WTF::Vector<char>& v, const WTF::String& str) char* data = v.begin() + vectorLen; // Write the actual string int l = SkUTF16_ToUTF8(str.characters(), strLen, data); - ALOGV("Writing string %d %.*s", l, l, data); + LOG_VERBOSE("Writing string %d %.*s", l, l, data); // Go back and write the utf8 length. Subtract sizeof(unsigned) from // data to get the position to write the length. memcpy(data - sizeof(unsigned), (char*)&l, sizeof(unsigned)); @@ -417,10 +417,10 @@ static void write_item(WTF::Vector<char>& v, WebCore::HistoryItem* item) LOG_ASSERT(bridge, "We should have a bridge here!"); // Screen scale const float scale = bridge->scale(); - ALOGV("Writing scale %f", scale); + LOG_VERBOSE("Writing scale %f", scale); v.append((char*)&scale, sizeof(float)); const float textWrapScale = bridge->textWrapScale(); - ALOGV("Writing text wrap scale %f", textWrapScale); + LOG_VERBOSE("Writing text wrap scale %f", textWrapScale); v.append((char*)&textWrapScale, sizeof(float)); // Scroll position. @@ -433,19 +433,19 @@ static void write_item(WTF::Vector<char>& v, WebCore::HistoryItem* item) const WTF::Vector<WTF::String>& docState = item->documentState(); WTF::Vector<WTF::String>::const_iterator end = docState.end(); unsigned stateSize = docState.size(); - ALOGV("Writing docState %d", stateSize); + LOG_VERBOSE("Writing docState %d", stateSize); v.append((char*)&stateSize, sizeof(unsigned)); for (WTF::Vector<WTF::String>::const_iterator i = docState.begin(); i != end; ++i) { write_string(v, *i); } // Is target item - ALOGV("Writing isTargetItem %d", item->isTargetItem()); + LOG_VERBOSE("Writing isTargetItem %d", item->isTargetItem()); v.append((char)item->isTargetItem()); // Children count unsigned childCount = item->children().size(); - ALOGV("Writing childCount %d", childCount); + LOG_VERBOSE("Writing childCount %d", childCount); v.append((char*)&childCount, sizeof(unsigned)); } @@ -495,7 +495,7 @@ static bool read_item_recursive(WebCore::HistoryItem* newItem, // Increment data pointer by the size of an unsigned int. data += sizeofUnsigned; if (l) { - ALOGV("Original url %d %.*s", l, l, data); + LOG_VERBOSE("Original url %d %.*s", l, l, data); // If we have a length, check if that length exceeds the data length // and return null if there is not enough data. if (data + l < end) @@ -513,7 +513,7 @@ static bool read_item_recursive(WebCore::HistoryItem* newItem, memcpy(&l, data, sizeofUnsigned); data += sizeofUnsigned; if (l) { - ALOGV("Url %d %.*s", l, l, data); + LOG_VERBOSE("Url %d %.*s", l, l, data); if (data + l < end) newItem->setURLString(e.decode(data, l)); else @@ -527,7 +527,7 @@ static bool read_item_recursive(WebCore::HistoryItem* newItem, memcpy(&l, data, sizeofUnsigned); data += sizeofUnsigned; if (l) { - ALOGV("Title %d %.*s", l, l, data); + LOG_VERBOSE("Title %d %.*s", l, l, data); if (data + l < end) newItem->setTitle(e.decode(data, l)); else @@ -539,13 +539,13 @@ static bool read_item_recursive(WebCore::HistoryItem* newItem, // Generate a new ResourceRequest object for populating form information. WTF::String formContentType; - WTF::PassRefPtr<WebCore::FormData> formData = NULL; + WTF::RefPtr<WebCore::FormData> formData = NULL; // Read the form content type memcpy(&l, data, sizeofUnsigned); data += sizeofUnsigned; if (l) { - ALOGV("Content type %d %.*s", l, l, data); + LOG_VERBOSE("Content type %d %.*s", l, l, data); if (data + l < end) formContentType = e.decode(data, l); else @@ -559,7 +559,7 @@ static bool read_item_recursive(WebCore::HistoryItem* newItem, memcpy(&l, data, sizeofUnsigned); data += sizeofUnsigned; if (l) { - ALOGV("Form data %d %.*s", l, l, data); + LOG_VERBOSE("Form data %d %.*s", l, l, data); if (data + l < end) formData = WebCore::FormData::create(data, l); else @@ -591,7 +591,7 @@ static bool read_item_recursive(WebCore::HistoryItem* newItem, memcpy(&l, data, sizeofUnsigned); data += sizeofUnsigned; if (l) { - ALOGV("Target %d %.*s", l, l, data); + LOG_VERBOSE("Target %d %.*s", l, l, data); if (data + l < end) newItem->setTarget(e.decode(data, l)); else @@ -606,11 +606,11 @@ static bool read_item_recursive(WebCore::HistoryItem* newItem, float fValue; // Read the screen scale memcpy(&fValue, data, sizeof(float)); - ALOGV("Screen scale %f", fValue); + LOG_VERBOSE("Screen scale %f", fValue); bridge->setScale(fValue); data += sizeof(float); memcpy(&fValue, data, sizeofUnsigned); - ALOGV("Text wrap scale %f", fValue); + LOG_VERBOSE("Text wrap scale %f", fValue); bridge->setTextWrapScale(fValue); data += sizeof(float); @@ -631,7 +631,7 @@ static bool read_item_recursive(WebCore::HistoryItem* newItem, // Read the document state memcpy(&l, data, sizeofUnsigned); - ALOGV("Document state %d", l); + LOG_VERBOSE("Document state %d", l); data += sizeofUnsigned; if (l) { // Check if we have enough data to at least parse the sizes of each @@ -653,7 +653,7 @@ static bool read_item_recursive(WebCore::HistoryItem* newItem, docState.append(e.decode(data, strLen)); else return false; - ALOGV("\t\t%d %.*s", strLen, strLen, data); + LOG_VERBOSE("\t\t%d %.*s", strLen, strLen, data); data += strLen; } newItem->setDocumentState(docState); @@ -668,7 +668,7 @@ static bool read_item_recursive(WebCore::HistoryItem* newItem, unsigned char c = (unsigned char)data[0]; if (c > 1) return false; - ALOGV("Target item %d", c); + LOG_VERBOSE("Target item %d", c); newItem->setIsTargetItem((bool)c); data++; if (end - data < sizeofUnsigned) @@ -676,7 +676,7 @@ static bool read_item_recursive(WebCore::HistoryItem* newItem, // Read the child count memcpy(&l, data, sizeofUnsigned); - ALOGV("Child count %d", l); + LOG_VERBOSE("Child count %d", l); data += sizeofUnsigned; *pData = data; if (l) { @@ -686,7 +686,7 @@ static bool read_item_recursive(WebCore::HistoryItem* newItem, while (l--) { // No need to check the length each time because read_item_recursive // will return null if there isn't enough data left to parse. - WTF::PassRefPtr<WebCore::HistoryItem> child = WebCore::HistoryItem::create(); + WTF::RefPtr<WebCore::HistoryItem> child = WebCore::HistoryItem::create(); // Set a bridge that will not call into java. child->setBridge(new WebHistoryItem(static_cast<WebHistoryItem*>(bridge))); // Read the child item. |