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

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

Issue 531553002: Remove dead content sniffing code (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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/loader/DocumentLoader.cpp ('k') | Source/web/AssociatedURLLoader.cpp » ('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) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013, Intel Corporation 3 * Copyright (C) 2013, Intel Corporation
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 are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * 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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 // Any credential should have been removed from the cross-site requests. 473 // Any credential should have been removed from the cross-site requests.
474 const KURL& requestURL = request.url(); 474 const KURL& requestURL = request.url();
475 ASSERT(m_sameOriginRequest || requestURL.user().isEmpty()); 475 ASSERT(m_sameOriginRequest || requestURL.user().isEmpty());
476 ASSERT(m_sameOriginRequest || requestURL.pass().isEmpty()); 476 ASSERT(m_sameOriginRequest || requestURL.pass().isEmpty());
477 477
478 // Update resourceLoaderOptions with enforced values. 478 // Update resourceLoaderOptions with enforced values.
479 if (m_forceDoNotAllowStoredCredentials) 479 if (m_forceDoNotAllowStoredCredentials)
480 resourceLoaderOptions.allowCredentials = DoNotAllowStoredCredentials; 480 resourceLoaderOptions.allowCredentials = DoNotAllowStoredCredentials;
481 resourceLoaderOptions.securityOrigin = m_securityOrigin; 481 resourceLoaderOptions.securityOrigin = m_securityOrigin;
482 if (m_async) { 482 if (m_async) {
483 if (m_actualRequest) { 483 if (m_actualRequest)
484 resourceLoaderOptions.sniffContent = DoNotSniffContent;
485 resourceLoaderOptions.dataBufferingPolicy = BufferData; 484 resourceLoaderOptions.dataBufferingPolicy = BufferData;
486 }
487 485
488 if (m_options.timeoutMilliseconds > 0) 486 if (m_options.timeoutMilliseconds > 0)
489 m_timeoutTimer.startOneShot(m_options.timeoutMilliseconds / 1000.0, FROM_HERE); 487 m_timeoutTimer.startOneShot(m_options.timeoutMilliseconds / 1000.0, FROM_HERE);
490 488
491 FetchRequest newRequest(request, m_options.initiator, resourceLoaderOpti ons); 489 FetchRequest newRequest(request, m_options.initiator, resourceLoaderOpti ons);
492 if (m_options.crossOriginRequestPolicy == AllowCrossOriginRequests) 490 if (m_options.crossOriginRequestPolicy == AllowCrossOriginRequests)
493 newRequest.setOriginRestriction(FetchRequest::NoOriginRestriction); 491 newRequest.setOriginRestriction(FetchRequest::NoOriginRestriction);
494 ASSERT(!resource()); 492 ASSERT(!resource());
495 if (request.requestContext() == blink::WebURLRequest::RequestContextVide o || request.requestContext() == blink::WebURLRequest::RequestContextAudio) 493 if (request.requestContext() == blink::WebURLRequest::RequestContextVide o || request.requestContext() == blink::WebURLRequest::RequestContextAudio)
496 setResource(m_document.fetcher()->fetchMedia(newRequest)); 494 setResource(m_document.fetcher()->fetchMedia(newRequest));
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 return DoNotAllowStoredCredentials; 561 return DoNotAllowStoredCredentials;
564 return m_resourceLoaderOptions.allowCredentials; 562 return m_resourceLoaderOptions.allowCredentials;
565 } 563 }
566 564
567 SecurityOrigin* DocumentThreadableLoader::securityOrigin() const 565 SecurityOrigin* DocumentThreadableLoader::securityOrigin() const
568 { 566 {
569 return m_securityOrigin ? m_securityOrigin.get() : m_document.securityOrigin (); 567 return m_securityOrigin ? m_securityOrigin.get() : m_document.securityOrigin ();
570 } 568 }
571 569
572 } // namespace blink 570 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/loader/DocumentLoader.cpp ('k') | Source/web/AssociatedURLLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698