OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 // types of resources, like Images, Scripts, and CSS, can be loaded from | 510 // types of resources, like Images, Scripts, and CSS, can be loaded from |
511 // any URL. | 511 // any URL. |
512 switch (type) { | 512 switch (type) { |
513 case Resource::MainResource: | 513 case Resource::MainResource: |
514 case Resource::Image: | 514 case Resource::Image: |
515 case Resource::CSSStyleSheet: | 515 case Resource::CSSStyleSheet: |
516 case Resource::Script: | 516 case Resource::Script: |
517 case Resource::Font: | 517 case Resource::Font: |
518 case Resource::Raw: | 518 case Resource::Raw: |
519 case Resource::LinkPrefetch: | 519 case Resource::LinkPrefetch: |
520 case Resource::LinkPreload: | |
521 case Resource::TextTrack: | 520 case Resource::TextTrack: |
522 case Resource::ImportResource: | 521 case Resource::ImportResource: |
523 case Resource::Media: | 522 case Resource::Media: |
524 case Resource::Manifest: | 523 case Resource::Manifest: |
525 // By default these types of resources can be loaded from any origin. | 524 // By default these types of resources can be loaded from any origin. |
526 // FIXME: Are we sure about Resource::Font? | 525 // FIXME: Are we sure about Resource::Font? |
527 if (originRestriction == FetchRequest::RestrictToSameOrigin && !security
Origin->canRequest(url)) { | 526 if (originRestriction == FetchRequest::RestrictToSameOrigin && !security
Origin->canRequest(url)) { |
528 printAccessDeniedMessage(url); | 527 printAccessDeniedMessage(url); |
529 return ResourceRequestBlockedReasonOrigin; | 528 return ResourceRequestBlockedReasonOrigin; |
530 } | 529 } |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
836 } | 835 } |
837 | 836 |
838 DEFINE_TRACE(FrameFetchContext) | 837 DEFINE_TRACE(FrameFetchContext) |
839 { | 838 { |
840 visitor->trace(m_document); | 839 visitor->trace(m_document); |
841 visitor->trace(m_documentLoader); | 840 visitor->trace(m_documentLoader); |
842 FetchContext::trace(visitor); | 841 FetchContext::trace(visitor); |
843 } | 842 } |
844 | 843 |
845 } // namespace blink | 844 } // namespace blink |
OLD | NEW |