| OLD | NEW |
| 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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 if (!passesAccessControlCheck(response, effectiveAllowCredentials(), sec
urityOrigin(), accessControlErrorDescription)) { | 389 if (!passesAccessControlCheck(response, effectiveAllowCredentials(), sec
urityOrigin(), accessControlErrorDescription)) { |
| 390 notifyResponseReceived(identifier, response); | 390 notifyResponseReceived(identifier, response); |
| 391 m_client->didFailAccessControlCheck(ResourceError(errorDomainBlinkIn
ternal, 0, response.url().string(), accessControlErrorDescription)); | 391 m_client->didFailAccessControlCheck(ResourceError(errorDomainBlinkIn
ternal, 0, response.url().string(), accessControlErrorDescription)); |
| 392 return; | 392 return; |
| 393 } | 393 } |
| 394 } | 394 } |
| 395 | 395 |
| 396 m_client->didReceiveResponse(identifier, response); | 396 m_client->didReceiveResponse(identifier, response); |
| 397 } | 397 } |
| 398 | 398 |
| 399 void DocumentThreadableLoader::dataReceived(Resource* resource, const char* data
, int dataLength) | 399 void DocumentThreadableLoader::dataReceived(Resource* resource, const char* data
, unsigned dataLength) |
| 400 { | 400 { |
| 401 ASSERT_UNUSED(resource, resource == this->resource()); | 401 ASSERT_UNUSED(resource, resource == this->resource()); |
| 402 handleReceivedData(data, dataLength); | 402 handleReceivedData(data, dataLength); |
| 403 } | 403 } |
| 404 | 404 |
| 405 void DocumentThreadableLoader::handleReceivedData(const char* data, int dataLeng
th) | 405 void DocumentThreadableLoader::handleReceivedData(const char* data, unsigned dat
aLength) |
| 406 { | 406 { |
| 407 ASSERT(m_client); | 407 ASSERT(m_client); |
| 408 // Preflight data should be invisible to clients. | 408 // Preflight data should be invisible to clients. |
| 409 if (!m_actualRequest) | 409 if (!m_actualRequest) |
| 410 m_client->didReceiveData(data, dataLength); | 410 m_client->didReceiveData(data, dataLength); |
| 411 } | 411 } |
| 412 | 412 |
| 413 void DocumentThreadableLoader::notifyFinished(Resource* resource) | 413 void DocumentThreadableLoader::notifyFinished(Resource* resource) |
| 414 { | 414 { |
| 415 ASSERT(m_client); | 415 ASSERT(m_client); |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 567 return DoNotAllowStoredCredentials; | 567 return DoNotAllowStoredCredentials; |
| 568 return m_resourceLoaderOptions.allowCredentials; | 568 return m_resourceLoaderOptions.allowCredentials; |
| 569 } | 569 } |
| 570 | 570 |
| 571 SecurityOrigin* DocumentThreadableLoader::securityOrigin() const | 571 SecurityOrigin* DocumentThreadableLoader::securityOrigin() const |
| 572 { | 572 { |
| 573 return m_securityOrigin ? m_securityOrigin.get() : m_document.securityOrigin
(); | 573 return m_securityOrigin ? m_securityOrigin.get() : m_document.securityOrigin
(); |
| 574 } | 574 } |
| 575 | 575 |
| 576 } // namespace blink | 576 } // namespace blink |
| OLD | NEW |