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

Side by Side Diff: Source/core/loader/ResourceLoader.cpp

Issue 14949017: Implementation of W3C compliant CSP script-src nonce. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixes from comments and nits from Adam and Mike. Created 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2010, 2011 Apple Inc. All rights reserved.
3 * (C) 2007 Graham Dennis (graham.dennis@gmail.com) 3 * (C) 2007 Graham Dennis (graham.dennis@gmail.com)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 { 316 {
317 if (documentLoader()->applicationCacheHost()->maybeLoadFallbackForRedirect(t his, request, redirectResponse)) 317 if (documentLoader()->applicationCacheHost()->maybeLoadFallbackForRedirect(t his, request, redirectResponse))
318 return; 318 return;
319 319
320 // Store the previous URL because we may modify it. 320 // Store the previous URL because we may modify it.
321 KURL previousURL = m_request.url(); 321 KURL previousURL = m_request.url();
322 RefPtr<ResourceLoader> protect(this); 322 RefPtr<ResourceLoader> protect(this);
323 323
324 ASSERT(!request.isNull()); 324 ASSERT(!request.isNull());
325 if (!redirectResponse.isNull()) { 325 if (!redirectResponse.isNull()) {
326 if (!m_documentLoader->cachedResourceLoader()->canRequest(m_resource->ty pe(), request.url())) { 326 if
327 (!m_documentLoader->cachedResourceLoader()->canRequest(m_resource->type( ), request.url(), NULL)) {
abarth-chromium 2013/05/14 21:11:08 These two lines should be merged. Also, we don't
jww 2013/05/14 22:55:30 Can you elaborate on the example you're concerned
327 cancel(); 328 cancel();
328 return; 329 return;
329 } 330 }
330 if (m_resource->type() == CachedResource::ImageResource && m_documentLoa der->cachedResourceLoader()->shouldDeferImageLoad(request.url())) { 331 if (m_resource->type() == CachedResource::ImageResource && m_documentLoa der->cachedResourceLoader()->shouldDeferImageLoad(request.url())) {
331 cancel(); 332 cancel();
332 return; 333 return;
333 } 334 }
334 m_resource->willSendRequest(request, redirectResponse); 335 m_resource->willSendRequest(request, redirectResponse);
335 } 336 }
336 337
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 info.addMember(m_request, "request"); 531 info.addMember(m_request, "request");
531 info.addMember(m_originalRequest, "originalRequest"); 532 info.addMember(m_originalRequest, "originalRequest");
532 info.addMember(m_deferredRequest, "deferredRequest"); 533 info.addMember(m_deferredRequest, "deferredRequest");
533 info.addMember(m_options, "options"); 534 info.addMember(m_options, "options");
534 info.addMember(m_resource, "resource"); 535 info.addMember(m_resource, "resource");
535 info.addMember(m_documentLoader, "documentLoader"); 536 info.addMember(m_documentLoader, "documentLoader");
536 info.addMember(m_requestCountTracker, "requestCountTracker"); 537 info.addMember(m_requestCountTracker, "requestCountTracker");
537 } 538 }
538 539
539 } 540 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698