| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2009 Apple Inc. All Rights Reserved. |
| 3 * Copyright (C) 2009, 2011 Google Inc. All Rights Reserved. | 3 * Copyright (C) 2009, 2011 Google Inc. All Rights Reserved. |
| 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 | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 const KURL& WorkerScriptLoader::responseURL() const | 102 const KURL& WorkerScriptLoader::responseURL() const |
| 103 { | 103 { |
| 104 ASSERT(!failed()); | 104 ASSERT(!failed()); |
| 105 return m_responseURL; | 105 return m_responseURL; |
| 106 } | 106 } |
| 107 | 107 |
| 108 PassOwnPtr<ResourceRequest> WorkerScriptLoader::createResourceRequest() | 108 PassOwnPtr<ResourceRequest> WorkerScriptLoader::createResourceRequest() |
| 109 { | 109 { |
| 110 OwnPtr<ResourceRequest> request = adoptPtr(new ResourceRequest(m_url)); | 110 OwnPtr<ResourceRequest> request = adoptPtr(new ResourceRequest(m_url)); |
| 111 request->setHTTPMethod("GET"); | 111 request->setHTTPMethod("GET"); |
| 112 #if PLATFORM(CHROMIUM) || PLATFORM(BLACKBERRY) | 112 #if PLATFORM(CHROMIUM) |
| 113 request->setTargetType(m_targetType); | 113 request->setTargetType(m_targetType); |
| 114 #endif | 114 #endif |
| 115 return request.release(); | 115 return request.release(); |
| 116 } | 116 } |
| 117 | 117 |
| 118 void WorkerScriptLoader::didReceiveResponse(unsigned long identifier, const Reso
urceResponse& response) | 118 void WorkerScriptLoader::didReceiveResponse(unsigned long identifier, const Reso
urceResponse& response) |
| 119 { | 119 { |
| 120 if (response.httpStatusCode() / 100 != 2 && response.httpStatusCode()) { | 120 if (response.httpStatusCode() / 100 != 2 && response.httpStatusCode()) { |
| 121 m_failed = true; | 121 m_failed = true; |
| 122 return; | 122 return; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 if (!m_client || m_finishing) | 188 if (!m_client || m_finishing) |
| 189 return; | 189 return; |
| 190 | 190 |
| 191 m_finishing = true; | 191 m_finishing = true; |
| 192 m_client->notifyFinished(); | 192 m_client->notifyFinished(); |
| 193 } | 193 } |
| 194 | 194 |
| 195 } // namespace WebCore | 195 } // namespace WebCore |
| 196 | 196 |
| 197 #endif // ENABLE(WORKERS) | 197 #endif // ENABLE(WORKERS) |
| OLD | NEW |