| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 } | 150 } |
| 151 | 151 |
| 152 void setLoader(PassRefPtr<ThreadableLoader> loader) | 152 void setLoader(PassRefPtr<ThreadableLoader> loader) |
| 153 { | 153 { |
| 154 m_loader = loader; | 154 m_loader = loader; |
| 155 } | 155 } |
| 156 | 156 |
| 157 private: | 157 private: |
| 158 void dispose() | 158 void dispose() |
| 159 { | 159 { |
| 160 m_loader = 0; | 160 m_loader = nullptr; |
| 161 delete this; | 161 delete this; |
| 162 } | 162 } |
| 163 | 163 |
| 164 RefPtr<LoadResourceForFrontendCallback> m_callback; | 164 RefPtr<LoadResourceForFrontendCallback> m_callback; |
| 165 RefPtr<ThreadableLoader> m_loader; | 165 RefPtr<ThreadableLoader> m_loader; |
| 166 OwnPtr<TextResourceDecoder> m_decoder; | 166 OwnPtr<TextResourceDecoder> m_decoder; |
| 167 ScriptString m_responseText; | 167 ScriptString m_responseText; |
| 168 int m_statusCode; | 168 int m_statusCode; |
| 169 HTTPHeaderMap m_responseHeaders; | 169 HTTPHeaderMap m_responseHeaders; |
| 170 }; | 170 }; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 Vector<char> bytes; | 224 Vector<char> bytes; |
| 225 request.httpBody()->flatten(bytes); | 225 request.httpBody()->flatten(bytes); |
| 226 requestObject->setPostData(String::fromUTF8WithLatin1Fallback(bytes.data
(), bytes.size())); | 226 requestObject->setPostData(String::fromUTF8WithLatin1Fallback(bytes.data
(), bytes.size())); |
| 227 } | 227 } |
| 228 return requestObject; | 228 return requestObject; |
| 229 } | 229 } |
| 230 | 230 |
| 231 static PassRefPtr<TypeBuilder::Network::Response> buildObjectForResourceResponse
(const ResourceResponse& response, DocumentLoader* loader) | 231 static PassRefPtr<TypeBuilder::Network::Response> buildObjectForResourceResponse
(const ResourceResponse& response, DocumentLoader* loader) |
| 232 { | 232 { |
| 233 if (response.isNull()) | 233 if (response.isNull()) |
| 234 return 0; | 234 return nullptr; |
| 235 | |
| 236 | 235 |
| 237 double status; | 236 double status; |
| 238 String statusText; | 237 String statusText; |
| 239 if (response.resourceLoadInfo() && response.resourceLoadInfo()->httpStatusCo
de) { | 238 if (response.resourceLoadInfo() && response.resourceLoadInfo()->httpStatusCo
de) { |
| 240 status = response.resourceLoadInfo()->httpStatusCode; | 239 status = response.resourceLoadInfo()->httpStatusCode; |
| 241 statusText = response.resourceLoadInfo()->httpStatusText; | 240 statusText = response.resourceLoadInfo()->httpStatusText; |
| 242 } else { | 241 } else { |
| 243 status = response.httpStatusCode(); | 242 status = response.httpStatusCode(); |
| 244 statusText = response.httpStatusText(); | 243 statusText = response.httpStatusText(); |
| 245 } | 244 } |
| (...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 809 : InspectorBaseAgent<InspectorResourceAgent>("Network") | 808 : InspectorBaseAgent<InspectorResourceAgent>("Network") |
| 810 , m_pageAgent(pageAgent) | 809 , m_pageAgent(pageAgent) |
| 811 , m_client(client) | 810 , m_client(client) |
| 812 , m_frontend(0) | 811 , m_frontend(0) |
| 813 , m_resourcesData(adoptPtr(new NetworkResourcesData())) | 812 , m_resourcesData(adoptPtr(new NetworkResourcesData())) |
| 814 , m_isRecalculatingStyle(false) | 813 , m_isRecalculatingStyle(false) |
| 815 { | 814 { |
| 816 } | 815 } |
| 817 | 816 |
| 818 } // namespace WebCore | 817 } // namespace WebCore |
| OLD | NEW |