Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
| 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) | 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) |
| 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) | 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) |
| 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. | 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. |
| 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ | 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ |
| 7 | 7 |
| 8 This library is free software; you can redistribute it and/or | 8 This library is free software; you can redistribute it and/or |
| 9 modify it under the terms of the GNU Library General Public | 9 modify it under the terms of the GNU Library General Public |
| 10 License as published by the Free Software Foundation; either | 10 License as published by the Free Software Foundation; either |
| (...skipping 1235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1246 if (type == Resource::Script || type == Resource::CSSStyleSheet) | 1246 if (type == Resource::Script || type == Resource::CSSStyleSheet) |
| 1247 encoding = charset.isEmpty() ? m_document->charset().string() : charset; | 1247 encoding = charset.isEmpty() ? m_document->charset().string() : charset; |
| 1248 | 1248 |
| 1249 request.setCharset(encoding); | 1249 request.setCharset(encoding); |
| 1250 request.setForPreload(true); | 1250 request.setForPreload(true); |
| 1251 | 1251 |
| 1252 ResourcePtr<Resource> resource; | 1252 ResourcePtr<Resource> resource; |
| 1253 // Loading images involves several special cases, so use dedicated fetch met hod instead. | 1253 // Loading images involves several special cases, so use dedicated fetch met hod instead. |
| 1254 if (type == Resource::Image) | 1254 if (type == Resource::Image) |
| 1255 resource = fetchImage(request); | 1255 resource = fetchImage(request); |
| 1256 | |
| 1257 request.mutableResourceRequest().setRequestContext(WebURLRequest::RequestCon textPrefetch); | |
|
tyoshino (SeeGerritForStatus)
2014/11/11 07:57:26
This looked the "context" defined in the Fetch Sta
Mike West
2014/11/11 08:08:04
I don't understand this comment? The `prefetch` co
tyoshino (SeeGerritForStatus)
2014/11/11 08:20:36
I wrote "not yet" since you've renamed it in https
tyoshino (SeeGerritForStatus)
2014/11/11 08:24:41
OK.
Regarding mixed content, just issuing a reque
tyoshino (SeeGerritForStatus)
2014/11/11 08:30:44
By "deliver", I mean having it evaluated, displaye
| |
| 1256 if (!resource) | 1258 if (!resource) |
| 1257 resource = requestResource(type, request); | 1259 resource = requestResource(type, request); |
| 1258 if (!resource || (m_preloads && m_preloads->contains(resource.get()))) | 1260 if (!resource || (m_preloads && m_preloads->contains(resource.get()))) |
| 1259 return; | 1261 return; |
| 1260 TRACE_EVENT_ASYNC_STEP_INTO0("net", "Resource", resource.get(), "Preload"); | 1262 TRACE_EVENT_ASYNC_STEP_INTO0("net", "Resource", resource.get(), "Preload"); |
| 1261 resource->increasePreloadCount(); | 1263 resource->increasePreloadCount(); |
| 1262 | 1264 |
| 1263 if (!m_preloads) | 1265 if (!m_preloads) |
| 1264 m_preloads = adoptPtr(new ListHashSet<Resource*>); | 1266 m_preloads = adoptPtr(new ListHashSet<Resource*>); |
| 1265 m_preloads->add(resource.get()); | 1267 m_preloads->add(resource.get()); |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1563 | 1565 |
| 1564 void ResourceFetcher::trace(Visitor* visitor) | 1566 void ResourceFetcher::trace(Visitor* visitor) |
| 1565 { | 1567 { |
| 1566 visitor->trace(m_document); | 1568 visitor->trace(m_document); |
| 1567 visitor->trace(m_loaders); | 1569 visitor->trace(m_loaders); |
| 1568 visitor->trace(m_multipartLoaders); | 1570 visitor->trace(m_multipartLoaders); |
| 1569 ResourceLoaderHost::trace(visitor); | 1571 ResourceLoaderHost::trace(visitor); |
| 1570 } | 1572 } |
| 1571 | 1573 |
| 1572 } | 1574 } |
| OLD | NEW |