void HTMLResourcePreloader::takeAndPreload(PreloadRequestStream& r)
{
    PreloadRequestStream requests;
    requests.swap(r);

    for (PreloadRequestStream::iterator it = requests.begin(); it != requests.end(); ++it)
        preload(it->release());
}
예제 #2
0
 void fetchPreloads(PreloadRequestStream& preloads) override {
   PreloadRequestStream movedPreloads;
   movedPreloads.swap(preloads);
   for (PreloadRequestStream::iterator it = movedPreloads.begin();
        it != movedPreloads.end(); ++it) {
     m_preloads.append(std::move(*it));
   }
 }
void ResourcePreloader::takeAndPreload(PreloadRequestStream& r)
{
    PreloadRequestStream requests;
    NetworkHintsInterfaceImpl networkHintsInterface;
    requests.swap(r);

    for (PreloadRequestStream::iterator it = requests.begin(); it != requests.end(); ++it)
        preload(it->release(), networkHintsInterface);
}