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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 } | 103 } |
104 | 104 |
105 PassOwnPtr<ResourceRequest> WorkerScriptLoader::createResourceRequest() | 105 PassOwnPtr<ResourceRequest> WorkerScriptLoader::createResourceRequest() |
106 { | 106 { |
107 OwnPtr<ResourceRequest> request = adoptPtr(new ResourceRequest(m_url)); | 107 OwnPtr<ResourceRequest> request = adoptPtr(new ResourceRequest(m_url)); |
108 request->setHTTPMethod("GET"); | 108 request->setHTTPMethod("GET"); |
109 request->setRequestContext(m_requestContext); | 109 request->setRequestContext(m_requestContext); |
110 return request.release(); | 110 return request.release(); |
111 } | 111 } |
112 | 112 |
113 void WorkerScriptLoader::didReceiveResponse(unsigned long identifier, const Reso
urceResponse& response) | 113 void WorkerScriptLoader::didReceiveResponse(unsigned long identifier, const Reso
urceResponse& response, PassOwnPtr<WebDataConsumerHandle> handle) |
114 { | 114 { |
| 115 ASSERT_UNUSED(handle, !handle); |
115 if (response.httpStatusCode() / 100 != 2 && response.httpStatusCode()) { | 116 if (response.httpStatusCode() / 100 != 2 && response.httpStatusCode()) { |
116 m_failed = true; | 117 m_failed = true; |
117 return; | 118 return; |
118 } | 119 } |
119 m_responseURL = response.url(); | 120 m_responseURL = response.url(); |
120 m_responseEncoding = response.textEncodingName(); | 121 m_responseEncoding = response.textEncodingName(); |
121 if (m_client) | 122 if (m_client) |
122 m_client->didReceiveResponse(identifier, response); | 123 m_client->didReceiveResponse(identifier, response); |
123 } | 124 } |
124 | 125 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 void WorkerScriptLoader::notifyFinished() | 185 void WorkerScriptLoader::notifyFinished() |
185 { | 186 { |
186 if (!m_client || m_finishing) | 187 if (!m_client || m_finishing) |
187 return; | 188 return; |
188 | 189 |
189 m_finishing = true; | 190 m_finishing = true; |
190 m_client->notifyFinished(); | 191 m_client->notifyFinished(); |
191 } | 192 } |
192 | 193 |
193 } // namespace blink | 194 } // namespace blink |
OLD | NEW |