Home | History | Annotate | Download | only in icon

Lines Matching refs:iconURL

195         // Clear the iconURL -> IconRecord map
240 // 1 - The initial url import is incomplete and this pageURL was marked to be notified once it is complete if an iconURL exists
256 // In this case, the pageURL is already in the set to alert the client when the iconURL mapping is complete so
323 // 1 - The initial url import is incomplete and this pageURL has already been marked to be notified once it is complete if an iconURL exists
328 // Possible the pageRecord is around because it's a retained pageURL with no iconURL, so we have to check
329 return pageRecord->iconRecord() ? pageRecord->iconRecord()->iconURL().threadsafeCopy() : String();
426 // If we read the iconURLs yet, we want to avoid any pageURL->iconURL lookups and the pageURLsPendingDeletion is moot,
476 ASSERT(!iconRecord || (iconRecord && m_iconURLToRecordMap.get(iconRecord->iconURL()) == iconRecord));
488 m_iconURLToRecordMap.remove(iconRecord->iconURL());
501 m_iconsPendingSync.set(iconRecord->iconURL(), iconRecord->snapshot(true));
520 String iconURL = iconURLOriginal.crossThreadString();
527 RefPtr<IconRecord> icon = m_iconURLToRecordMap.get(iconURL);
532 icon = getOrCreateIconRecord(iconURL);
544 m_iconsPendingSync.set(iconURL, icon->snapshot());
549 LOG(IconDatabase, "Icon for icon url %s is about to be destroyed - removing mapping for it", urlForLogging(icon->iconURL()).ascii().data());
550 m_iconURLToRecordMap.remove(icon->iconURL());
585 String iconURL, pageURL;
594 if (pageRecord && pageRecord->iconRecord() && pageRecord->iconRecord()->iconURL() == iconURLOriginal)
598 iconURL = iconURLOriginal.crossThreadString();
608 pageRecord->setIconRecord(getOrCreateIconRecord(iconURL));
614 LOG(IconDatabase, "Icon for icon url %s is about to be destroyed - removing mapping for it", urlForLogging(iconRecord->iconURL()).ascii().data());
615 m_iconURLToRecordMap.remove(iconRecord->iconURL());
627 m_iconsPendingSync.set(iconRecord->iconURL(), iconRecord->snapshot(true));
643 IconLoadDecision IconDatabase::loadDecisionForIconURL(const String& iconURL, DocumentLoader* notificationDocumentLoader)
647 if (!isOpen() || iconURL.isEmpty())
655 if (IconRecord* icon = m_iconURLToRecordMap.get(iconURL)) {
668 LOG(IconDatabase, "Don't know if we should load %s or not - adding %p to the set of document loaders waiting on a decision", iconURL.ascii().data(), notificationDocumentLoader);
674 bool IconDatabase::iconDataKnownForIconURL(const String& iconURL)
679 if (IconRecord* icon = m_iconURLToRecordMap.get(iconURL))
865 PassRefPtr<IconRecord> IconDatabase::getOrCreateIconRecord(const String& iconURL)
870 if (IconRecord* icon = m_iconURLToRecordMap.get(iconURL))
873 RefPtr<IconRecord> newIcon = IconRecord::create(iconURL);
874 m_iconURLToRecordMap.set(iconURL, newIcon.get());
916 void IconDatabase::importIconURLForPageURL(const String& iconURL, const String& pageURL)
921 ASSERT(!iconURL.isEmpty() && !pageURL.isEmpty());
923 setIconURLForPageURLInSQLDatabase(iconURL, pageURL);
926 void IconDatabase::importIconDataForIconURL(PassRefPtr<SharedBuffer> data, const String& iconURL)
930 ASSERT(!iconURL.isEmpty());
932 writeIconSnapshotToSQLDatabase(IconSnapshot(iconURL, (int)currentTime(), data.get()));
1031 LOG(IconDatabase, "(THREAD) Starting iconURL import");
1210 String iconURL = query.getColumnText(1);
1230 if (!currentIcon || currentIcon->iconURL() != iconURL) {
1231 pageRecord->setIconRecord(getOrCreateIconRecord(iconURL));
1267 // Clear the m_pageURLsPendingImport set - either the page URLs ended up with an iconURL (that we'll notify about) or not,
1297 m_iconURLToRecordMap.remove(iconRecord->iconURL());
1306 m_iconsPendingSync.set(iconRecord->iconURL(), iconRecord->snapshot(true));
1460 RefPtr<SharedBuffer> imageData = getImageDataForIconURLFromSQLDatabase(icons[i]->iconURL());
1579 LOG(IconDatabase, "Wrote IconRecord for IconURL %s with timeStamp of %i to the DB", urlForLogging(iconSnapshots[i].iconURL).ascii().data(), iconSnapshots[i].timestamp);
1585 if (pageSnapshots[i].iconURL.isEmpty())
1588 setIconURLForPageURLInSQLDatabase(pageSnapshots[i].iconURL, pageSnapshots[i].pageURL);
1589 LOG(IconDatabase, "Committed IconURL for PageURL %s to database", urlForLogging(pageSnapshots[i].pageURL).ascii().data());
1838 void IconDatabase::setIconURLForPageURLInSQLDatabase(const String& iconURL, const String& pageURL)
1842 int64_t iconID = getIconIDForIconURLFromSQLDatabase(iconURL);
1845 iconID = addIconURLToSQLDatabase(iconURL);
1848 LOG_ERROR("Failed to establish an ID for iconURL %s", urlForLogging(iconURL).ascii().data());
1887 int64_t IconDatabase::getIconIDForIconURLFromSQLDatabase(const String& iconURL)
1892 m_getIconIDForIconURLStatement->bindText(1, iconURL);
1899 LOG_ERROR("getIconIDForIconURLFromSQLDatabase failed for url %s", urlForLogging(iconURL).ascii().data());
1907 int64_t IconDatabase::addIconURLToSQLDatabase(const String& iconURL)
1916 m_addIconToIconInfoStatement->bindText(1, iconURL);
1921 LOG_ERROR("addIconURLToSQLDatabase failed to insert %s into IconInfo", urlForLogging(iconURL).ascii().data());
1932 LOG_ERROR("addIconURLToSQLDatabase failed to insert %s into IconData", urlForLogging(iconURL).ascii().data());
1939 PassRefPtr<SharedBuffer> IconDatabase::getImageDataForIconURLFromSQLDatabase(const String& iconURL)
1946 m_getImageDataForIconURLStatement->bindText(1, iconURL);
1954 LOG_ERROR("getImageDataForIconURLFromSQLDatabase failed for url %s", urlForLogging(iconURL).ascii().data());
1961 void IconDatabase::removeIconFromSQLDatabase(const String& iconURL)
1965 if (iconURL.isEmpty())
1973 int64_t iconID = getIconIDForIconURLFromSQLDatabase(iconURL);
1981 LOG_ERROR("m_deletePageURLsForIconURLStatement failed for url %s", urlForLogging(iconURL).ascii().data());
1987 LOG_ERROR("m_deleteIconFromIconInfoStatement failed for url %s", urlForLogging(iconURL).ascii().data());
1993 LOG_ERROR("m_deleteIconFromIconDataStatement failed for url %s", urlForLogging(iconURL).ascii().data());
2004 if (snapshot.iconURL.isEmpty())
2009 LOG(IconDatabase, "Removing %s from on-disk database", urlForLogging(snapshot.iconURL).ascii().data());
2010 removeIconFromSQLDatabase(snapshot.iconURL);
2018 int64_t iconID = getIconIDForIconURLFromSQLDatabase(snapshot.iconURL);
2025 m_updateIconInfoStatement->bindText(2, snapshot.iconURL);
2029 LOG_ERROR("Failed to update icon info for url %s", urlForLogging(snapshot.iconURL).ascii().data());
2044 LOG_ERROR("Failed to update icon data for url %s", urlForLogging(snapshot.iconURL).ascii().data());
2049 m_setIconInfoStatement->bindText(1, snapshot.iconURL);
2053 LOG_ERROR("Failed to set icon info for url %s", urlForLogging(snapshot.iconURL).ascii().data());
2070 LOG_ERROR("Failed to set icon data for url %s", urlForLogging(snapshot.iconURL).ascii().data());