OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2012 Ericsson AB. All rights reserved. | 2 * Copyright (C) 2009, 2012 Ericsson AB. All rights reserved. |
3 * Copyright (C) 2010 Apple Inc. All rights reserved. | 3 * Copyright (C) 2010 Apple Inc. All rights reserved. |
4 * Copyright (C) 2011, Code Aurora Forum. All rights reserved. | 4 * Copyright (C) 2011, Code Aurora Forum. All rights reserved. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * | 9 * |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 request.setHTTPHeaderField("Cache-Control", "no-cache"); | 124 request.setHTTPHeaderField("Cache-Control", "no-cache"); |
125 if (!m_lastEventId.isEmpty()) | 125 if (!m_lastEventId.isEmpty()) |
126 request.setHTTPHeaderField("Last-Event-ID", m_lastEventId); | 126 request.setHTTPHeaderField("Last-Event-ID", m_lastEventId); |
127 | 127 |
128 SecurityOrigin* origin = scriptExecutionContext()->securityOrigin(); | 128 SecurityOrigin* origin = scriptExecutionContext()->securityOrigin(); |
129 | 129 |
130 ThreadableLoaderOptions options; | 130 ThreadableLoaderOptions options; |
131 options.sendLoadCallbacks = SendCallbacks; | 131 options.sendLoadCallbacks = SendCallbacks; |
132 options.sniffContent = DoNotSniffContent; | 132 options.sniffContent = DoNotSniffContent; |
133 options.allowCredentials = (origin->canRequest(m_url) || m_withCredentials)
? AllowStoredCredentials : DoNotAllowStoredCredentials; | 133 options.allowCredentials = (origin->canRequest(m_url) || m_withCredentials)
? AllowStoredCredentials : DoNotAllowStoredCredentials; |
| 134 options.credentialsRequested = m_withCredentials ? ClientRequestedCredential
s : ClientDidNotRequestCredentials; |
134 options.preflightPolicy = PreventPreflight; | 135 options.preflightPolicy = PreventPreflight; |
135 options.crossOriginRequestPolicy = UseAccessControl; | 136 options.crossOriginRequestPolicy = UseAccessControl; |
136 options.dataBufferingPolicy = DoNotBufferData; | 137 options.dataBufferingPolicy = DoNotBufferData; |
137 options.securityOrigin = origin; | 138 options.securityOrigin = origin; |
138 | 139 |
139 m_loader = ThreadableLoader::create(scriptExecutionContext(), this, request,
options); | 140 m_loader = ThreadableLoader::create(scriptExecutionContext(), this, request,
options); |
140 | 141 |
141 if (m_loader) | 142 if (m_loader) |
142 m_requestInFlight = true; | 143 m_requestInFlight = true; |
143 } | 144 } |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 { | 424 { |
424 return &m_eventTargetData; | 425 return &m_eventTargetData; |
425 } | 426 } |
426 | 427 |
427 EventTargetData* EventSource::ensureEventTargetData() | 428 EventTargetData* EventSource::ensureEventTargetData() |
428 { | 429 { |
429 return &m_eventTargetData; | 430 return &m_eventTargetData; |
430 } | 431 } |
431 | 432 |
432 } // namespace WebCore | 433 } // namespace WebCore |
OLD | NEW |