| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google, Inc. All rights reserved. | 2 * Copyright (C) 2012 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 FetchRequest::FetchRequest(const ResourceRequest& resourceRequest, | 33 FetchRequest::FetchRequest(const ResourceRequest& resourceRequest, |
| 34 const AtomicString& initiator, | 34 const AtomicString& initiator, |
| 35 const String& charset) | 35 const String& charset) |
| 36 : m_resourceRequest(resourceRequest), | 36 : m_resourceRequest(resourceRequest), |
| 37 m_charset(charset), | 37 m_charset(charset), |
| 38 m_options(ResourceFetcher::defaultResourceOptions()), | 38 m_options(ResourceFetcher::defaultResourceOptions()), |
| 39 m_forPreload(false), | 39 m_forPreload(false), |
| 40 m_linkPreload(false), | 40 m_linkPreload(false), |
| 41 m_preloadDiscoveryTime(0.0), | 41 m_preloadDiscoveryTime(0.0), |
| 42 m_defer(NoDefer), | 42 m_defer(NoDefer), |
| 43 m_originRestriction(UseDefaultOriginRestrictionForType) { | 43 m_originRestriction(UseDefaultOriginRestrictionForType), |
| 44 m_isCacheAwareLoadingEnabled(false) { |
| 44 m_options.initiatorInfo.name = initiator; | 45 m_options.initiatorInfo.name = initiator; |
| 45 } | 46 } |
| 46 | 47 |
| 47 FetchRequest::FetchRequest(const ResourceRequest& resourceRequest, | 48 FetchRequest::FetchRequest(const ResourceRequest& resourceRequest, |
| 48 const AtomicString& initiator, | 49 const AtomicString& initiator, |
| 49 const ResourceLoaderOptions& options) | 50 const ResourceLoaderOptions& options) |
| 50 : m_resourceRequest(resourceRequest), | 51 : m_resourceRequest(resourceRequest), |
| 51 m_options(options), | 52 m_options(options), |
| 52 m_forPreload(false), | 53 m_forPreload(false), |
| 53 m_linkPreload(false), | 54 m_linkPreload(false), |
| 54 m_preloadDiscoveryTime(0.0), | 55 m_preloadDiscoveryTime(0.0), |
| 55 m_defer(NoDefer), | 56 m_defer(NoDefer), |
| 56 m_originRestriction(UseDefaultOriginRestrictionForType) { | 57 m_originRestriction(UseDefaultOriginRestrictionForType), |
| 58 m_isCacheAwareLoadingEnabled(false) { |
| 57 m_options.initiatorInfo.name = initiator; | 59 m_options.initiatorInfo.name = initiator; |
| 58 } | 60 } |
| 59 | 61 |
| 60 FetchRequest::FetchRequest(const ResourceRequest& resourceRequest, | 62 FetchRequest::FetchRequest(const ResourceRequest& resourceRequest, |
| 61 const FetchInitiatorInfo& initiator) | 63 const FetchInitiatorInfo& initiator) |
| 62 : m_resourceRequest(resourceRequest), | 64 : m_resourceRequest(resourceRequest), |
| 63 m_options(ResourceFetcher::defaultResourceOptions()), | 65 m_options(ResourceFetcher::defaultResourceOptions()), |
| 64 m_forPreload(false), | 66 m_forPreload(false), |
| 65 m_linkPreload(false), | 67 m_linkPreload(false), |
| 66 m_preloadDiscoveryTime(0.0), | 68 m_preloadDiscoveryTime(0.0), |
| 67 m_defer(NoDefer), | 69 m_defer(NoDefer), |
| 68 m_originRestriction(UseDefaultOriginRestrictionForType) { | 70 m_originRestriction(UseDefaultOriginRestrictionForType), |
| 71 m_isCacheAwareLoadingEnabled(false) { |
| 69 m_options.initiatorInfo = initiator; | 72 m_options.initiatorInfo = initiator; |
| 70 } | 73 } |
| 71 | 74 |
| 72 FetchRequest::~FetchRequest() {} | 75 FetchRequest::~FetchRequest() {} |
| 73 | 76 |
| 74 void FetchRequest::setCrossOriginAccessControl( | 77 void FetchRequest::setCrossOriginAccessControl( |
| 75 SecurityOrigin* origin, | 78 SecurityOrigin* origin, |
| 76 CrossOriginAttributeValue crossOrigin) { | 79 CrossOriginAttributeValue crossOrigin) { |
| 77 DCHECK_NE(crossOrigin, CrossOriginAttributeNotSet); | 80 DCHECK_NE(crossOrigin, CrossOriginAttributeNotSet); |
| 78 const bool useCredentials = crossOrigin == CrossOriginAttributeUseCredentials; | 81 const bool useCredentials = crossOrigin == CrossOriginAttributeUseCredentials; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 | 116 |
| 114 void FetchRequest::makeSynchronous() { | 117 void FetchRequest::makeSynchronous() { |
| 115 // Synchronous requests should always be max priority, lest they hang the | 118 // Synchronous requests should always be max priority, lest they hang the |
| 116 // renderer. | 119 // renderer. |
| 117 m_resourceRequest.setPriority(ResourceLoadPriorityHighest); | 120 m_resourceRequest.setPriority(ResourceLoadPriorityHighest); |
| 118 m_resourceRequest.setTimeoutInterval(10); | 121 m_resourceRequest.setTimeoutInterval(10); |
| 119 m_options.synchronousPolicy = RequestSynchronously; | 122 m_options.synchronousPolicy = RequestSynchronously; |
| 120 } | 123 } |
| 121 | 124 |
| 122 } // namespace blink | 125 } // namespace blink |
| OLD | NEW |