Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(228)

Side by Side Diff: Source/core/fetch/ResourceFetcher.cpp

Issue 1136843011: Revert of Add CSP header for resources with an active policy (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/fetch/FetchContext.cpp ('k') | Source/core/frame/csp/CSPDirectiveList.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « Source/core/fetch/FetchContext.cpp ('k') | Source/core/frame/csp/CSPDirectiveList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698