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 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 } | 459 } |
460 | 460 |
461 ResourcePtr<Resource> ResourceFetcher::requestResource(Resource::Type type, Fetc
hRequest& request) | 461 ResourcePtr<Resource> ResourceFetcher::requestResource(Resource::Type type, Fetc
hRequest& request) |
462 { | 462 { |
463 ASSERT(request.options().synchronousPolicy == RequestAsynchronously || type
== Resource::Raw); | 463 ASSERT(request.options().synchronousPolicy == RequestAsynchronously || type
== Resource::Raw); |
464 | 464 |
465 TRACE_EVENT0("blink", "ResourceFetcher::requestResource"); | 465 TRACE_EVENT0("blink", "ResourceFetcher::requestResource"); |
466 | 466 |
467 context().upgradeInsecureRequest(request); | 467 context().upgradeInsecureRequest(request); |
468 context().addClientHintsIfNecessary(request); | 468 context().addClientHintsIfNecessary(request); |
469 context().addCSPHeaderIfNecessary(type, request); | |
470 | 469 |
471 KURL url = request.resourceRequest().url(); | 470 KURL url = request.resourceRequest().url(); |
472 | 471 |
473 WTF_LOG(ResourceLoading, "ResourceFetcher::requestResource '%s', charset '%s
', priority=%d, forPreload=%u, type=%s", url.elidedString().latin1().data(), req
uest.charset().latin1().data(), request.priority(), request.forPreload(), Resour
ceTypeName(type)); | 472 WTF_LOG(ResourceLoading, "ResourceFetcher::requestResource '%s', charset '%s
', priority=%d, forPreload=%u, type=%s", url.elidedString().latin1().data(), req
uest.charset().latin1().data(), request.priority(), request.forPreload(), Resour
ceTypeName(type)); |
474 | 473 |
475 // If only the fragment identifiers differ, it is the same resource. | 474 // If only the fragment identifiers differ, it is the same resource. |
476 url = MemoryCache::removeFragmentIdentifierIfNeeded(url); | 475 url = MemoryCache::removeFragmentIdentifierIfNeeded(url); |
477 | 476 |
478 if (!url.isValid()) | 477 if (!url.isValid()) |
479 return nullptr; | 478 return nullptr; |
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1292 ResourceLoaderHost::trace(visitor); | 1291 ResourceLoaderHost::trace(visitor); |
1293 } | 1292 } |
1294 | 1293 |
1295 ResourceFetcher* ResourceFetcher::toResourceFetcher(ResourceLoaderHost* host) | 1294 ResourceFetcher* ResourceFetcher::toResourceFetcher(ResourceLoaderHost* host) |
1296 { | 1295 { |
1297 ASSERT(host->objectType() == ResourceLoaderHost::ResourceFetcherType); | 1296 ASSERT(host->objectType() == ResourceLoaderHost::ResourceFetcherType); |
1298 return static_cast<ResourceFetcher*>(host); | 1297 return static_cast<ResourceFetcher*>(host); |
1299 } | 1298 } |
1300 | 1299 |
1301 } | 1300 } |
OLD | NEW |