Home | History | Annotate | Download | only in icon

Lines Matching defs:iconURL

196         // Clear the iconURL -> IconRecord map
241 // 1 - The initial url import is incomplete and this pageURL was marked to be notified once it is complete if an iconURL exists
257 // In this case, the pageURL is already in the set to alert the client when the iconURL mapping is complete so
324 // 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
329 // Possible the pageRecord is around because it's a retained pageURL with no iconURL, so we have to check
330 return pageRecord->iconRecord() ? pageRecord->iconRecord()->iconURL().threadsafeCopy() : String();
427 // If we read the iconURLs yet, we want to avoid any pageURL->iconURL lookups and the pageURLsPendingDeletion is moot,
477 ASSERT(!iconRecord || (iconRecord && m_iconURLToRecordMap.get(iconRecord->iconURL()) == iconRecord));
489 m_iconURLToRecordMap.remove(iconRecord->iconURL());
502 m_iconsPendingSync.set(iconRecord->iconURL(), iconRecord->snapshot(true));
521 String iconURL = iconURLOriginal.crossThreadString();
528 RefPtr<IconRecord> icon = m_iconURLToRecordMap.get(iconURL);
533 icon = getOrCreateIconRecord(iconURL);
545 m_iconsPendingSync.set(iconURL, icon->snapshot());
550 LOG(IconDatabase, "Icon for icon url %s is about to be destroyed - removing mapping for it", urlForLogging(icon->iconURL()).ascii().data());
551 m_iconURLToRecordMap.remove(icon->iconURL());
586 String iconURL, pageURL;
595 if (pageRecord && pageRecord->iconRecord() && pageRecord->iconRecord()->iconURL() == iconURLOriginal)
599 iconURL = iconURLOriginal.crossThreadString();
609 pageRecord->setIconRecord(getOrCreateIconRecord(iconURL));
615 LOG(IconDatabase, "Icon for icon url %s is about to be destroyed - removing mapping for it", urlForLogging(iconRecord->iconURL()).ascii().data());
616 m_iconURLToRecordMap.remove(iconRecord->iconURL());
628 m_iconsPendingSync.set(iconRecord->iconURL(), iconRecord->snapshot(true));
644 IconLoadDecision IconDatabase::synchronousLoadDecisionForIconURL(const String& iconURL, DocumentLoader* notificationDocumentLoader)
648 if (!isOpen() || iconURL.isEmpty())
656 if (IconRecord* icon = m_iconURLToRecordMap.get(iconURL)) {
669 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);
676 bool IconDatabase::synchronousIconDataKnownForIconURL(const String& iconURL)
681 if (IconRecord* icon = m_iconURLToRecordMap.get(iconURL))
873 PassRefPtr<IconRecord> IconDatabase::getOrCreateIconRecord(const String& iconURL)
878 if (IconRecord* icon = m_iconURLToRecordMap.get(iconURL))
881 RefPtr<IconRecord> newIcon = IconRecord::create(iconURL);
882 m_iconURLToRecordMap.set(iconURL, newIcon.get());
924 void IconDatabase::importIconURLForPageURL(const String& iconURL, const String& pageURL)
929 ASSERT(!iconURL.isEmpty() && !pageURL.isEmpty());
931 setIconURLForPageURLInSQLDatabase(iconURL, pageURL);
934 void IconDatabase::importIconDataForIconURL(PassRefPtr<SharedBuffer> data, const String& iconURL)
938 ASSERT(!iconURL.isEmpty());
940 writeIconSnapshotToSQLDatabase(IconSnapshot(iconURL, (int)currentTime(), data.get()));
1039 LOG(IconDatabase, "(THREAD) Starting iconURL import");
1224 String iconURL = query.getColumnText(1);
1244 if (!currentIcon || currentIcon->iconURL() != iconURL) {
1245 pageRecord->setIconRecord(getOrCreateIconRecord(iconURL));
1281 // Clear the m_pageURLsPendingImport set - either the page URLs ended up with an iconURL (that we'll notify about) or not,
1310 m_iconURLToRecordMap.remove(iconRecord->iconURL());
1319 m_iconsPendingSync.set(iconRecord->iconURL(), iconRecord->snapshot(true));
1480 RefPtr<SharedBuffer> imageData = getImageDataForIconURLFromSQLDatabase(icons[i]->iconURL());
1601 LOG(IconDatabase, "Wrote IconRecord for IconURL %s with timeStamp of %i to the DB", urlForLogging(iconSnapshots[i].iconURL()).ascii().data(), iconSnapshots[i].timestamp());
1607 if (pageSnapshots[i].iconURL().isEmpty())
1610 setIconURLForPageURLInSQLDatabase(pageSnapshots[i].iconURL(), pageSnapshots[i].pageURL());
1611 LOG(IconDatabase, "Committed IconURL for PageURL %s to database", urlForLogging(pageSnapshots[i].pageURL()).ascii().data());
1869 void IconDatabase::setIconURLForPageURLInSQLDatabase(const String& iconURL, const String& pageURL)
1873 int64_t iconID = getIconIDForIconURLFromSQLDatabase(iconURL);
1876 iconID = addIconURLToSQLDatabase(iconURL);
1879 LOG_ERROR("Failed to establish an ID for iconURL %s", urlForLogging(iconURL).ascii().data());
1918 int64_t IconDatabase::getIconIDForIconURLFromSQLDatabase(const String& iconURL)
1923 m_getIconIDForIconURLStatement->bindText(1, iconURL);
1930 LOG_ERROR("getIconIDForIconURLFromSQLDatabase failed for url %s", urlForLogging(iconURL).ascii().data());
1938 int64_t IconDatabase::addIconURLToSQLDatabase(const String& iconURL)
1947 m_addIconToIconInfoStatement->bindText(1, iconURL);
1952 LOG_ERROR("addIconURLToSQLDatabase failed to insert %s into IconInfo", urlForLogging(iconURL).ascii().data());
1963 LOG_ERROR("addIconURLToSQLDatabase failed to insert %s into IconData", urlForLogging(iconURL).ascii().data());
1970 PassRefPtr<SharedBuffer> IconDatabase::getImageDataForIconURLFromSQLDatabase(const String& iconURL)
1977 m_getImageDataForIconURLStatement->bindText(1, iconURL);
1985 LOG_ERROR("getImageDataForIconURLFromSQLDatabase failed for url %s", urlForLogging(iconURL).ascii().data());
1992 void IconDatabase::removeIconFromSQLDatabase(const String& iconURL)
1996 if (iconURL.isEmpty())
2004 int64_t iconID = getIconIDForIconURLFromSQLDatabase(iconURL);
2012 LOG_ERROR("m_deletePageURLsForIconURLStatement failed for url %s", urlForLogging(iconURL).ascii().data());
2018 LOG_ERROR("m_deleteIconFromIconInfoStatement failed for url %s", urlForLogging(iconURL).ascii().data());
2024 LOG_ERROR("m_deleteIconFromIconDataStatement failed for url %s", urlForLogging(iconURL).ascii().data());
2035 if (snapshot.iconURL().isEmpty())
2040 LOG(IconDatabase, "Removing %s from on-disk database", urlForLogging(snapshot.iconURL()).ascii().data());
2041 removeIconFromSQLDatabase(snapshot.iconURL());
2049 int64_t iconID = getIconIDForIconURLFromSQLDatabase(snapshot.iconURL());
2056 m_updateIconInfoStatement->bindText(2, snapshot.iconURL());
2060 LOG_ERROR("Failed to update icon info for url %s", urlForLogging(snapshot.iconURL()).ascii().data());
2075 LOG_ERROR("Failed to update icon data for url %s", urlForLogging(snapshot.iconURL()).ascii().data());
2080 m_setIconInfoStatement->bindText(1, snapshot.iconURL());
2084 LOG_ERROR("Failed to set icon info for url %s", urlForLogging(snapshot.iconURL()).ascii().data());
2101 LOG_ERROR("Failed to set icon data for url %s", urlForLogging(snapshot.iconURL()).ascii().data());