| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 m_keepAlive.clear(); | 288 m_keepAlive.clear(); |
| 289 } | 289 } |
| 290 | 290 |
| 291 bool PingLoaderImpl::willFollowRedirect( | 291 bool PingLoaderImpl::willFollowRedirect( |
| 292 WebURLLoader*, | 292 WebURLLoader*, |
| 293 WebURLRequest& passedNewRequest, | 293 WebURLRequest& passedNewRequest, |
| 294 const WebURLResponse& passedRedirectResponse) { | 294 const WebURLResponse& passedRedirectResponse) { |
| 295 if (!m_isBeacon) | 295 if (!m_isBeacon) |
| 296 return true; | 296 return true; |
| 297 | 297 |
| 298 // TODO(tyoshino): Check if setAllowStoredCredentials() should be called also | |
| 299 // for non beacon cases. | |
| 300 passedNewRequest.setAllowStoredCredentials(true); | |
| 301 if (m_corsMode == NotCORSEnabled) | 298 if (m_corsMode == NotCORSEnabled) |
| 302 return true; | 299 return true; |
| 303 | 300 |
| 301 DCHECK(passedNewRequest.allowStoredCredentials()); |
| 302 |
| 304 ResourceRequest& newRequest(passedNewRequest.toMutableResourceRequest()); | 303 ResourceRequest& newRequest(passedNewRequest.toMutableResourceRequest()); |
| 305 const ResourceResponse& redirectResponse( | 304 const ResourceResponse& redirectResponse( |
| 306 passedRedirectResponse.toResourceResponse()); | 305 passedRedirectResponse.toResourceResponse()); |
| 307 | 306 |
| 308 DCHECK(!newRequest.isNull()); | 307 DCHECK(!newRequest.isNull()); |
| 309 DCHECK(!redirectResponse.isNull()); | 308 DCHECK(!redirectResponse.isNull()); |
| 310 | 309 |
| 311 String errorDescription; | 310 String errorDescription; |
| 312 ResourceLoaderOptions options; | 311 ResourceLoaderOptions options; |
| 313 // TODO(tyoshino): Save updated data in options.securityOrigin and pass it | 312 // TODO(tyoshino): Save updated data in options.securityOrigin and pass it |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 bool PingLoader::sendBeacon(LocalFrame* frame, | 552 bool PingLoader::sendBeacon(LocalFrame* frame, |
| 554 int allowance, | 553 int allowance, |
| 555 const KURL& beaconURL, | 554 const KURL& beaconURL, |
| 556 Blob* data, | 555 Blob* data, |
| 557 int& payloadLength) { | 556 int& payloadLength) { |
| 558 BeaconBlob beacon(data); | 557 BeaconBlob beacon(data); |
| 559 return sendBeaconCommon(frame, allowance, beaconURL, beacon, payloadLength); | 558 return sendBeaconCommon(frame, allowance, beaconURL, beacon, payloadLength); |
| 560 } | 559 } |
| 561 | 560 |
| 562 } // namespace blink | 561 } // namespace blink |
| OLD | NEW |