OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2010, 2011 Apple Inc. All rights reserved. |
3 * (C) 2007 Graham Dennis (graham.dennis@gmail.com) | 3 * (C) 2007 Graham Dennis (graham.dennis@gmail.com) |
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 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 if (!m_frame) | 187 if (!m_frame) |
188 return 0; | 188 return 0; |
189 return m_frame->loader(); | 189 return m_frame->loader(); |
190 } | 190 } |
191 | 191 |
192 void ResourceLoader::setShouldBufferData(DataBufferingPolicy shouldBufferData) | 192 void ResourceLoader::setShouldBufferData(DataBufferingPolicy shouldBufferData) |
193 { | 193 { |
194 m_options.shouldBufferData = shouldBufferData; | 194 m_options.shouldBufferData = shouldBufferData; |
195 | 195 |
196 // Reset any already buffered data | 196 // Reset any already buffered data |
197 if (!shouldBufferData) | 197 if (shouldBufferData == DoNotBufferData) |
198 m_resourceData = 0; | 198 m_resourceData = 0; |
199 } | 199 } |
200 | 200 |
201 | 201 |
202 void ResourceLoader::addData(const char* data, int length, bool allAtOnce) | 202 void ResourceLoader::addData(const char* data, int length, bool allAtOnce) |
203 { | 203 { |
204 if (m_options.shouldBufferData == DoNotBufferData) | 204 if (m_options.shouldBufferData == DoNotBufferData) |
205 return; | 205 return; |
206 | 206 |
207 if (allAtOnce) { | 207 if (allAtOnce) { |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 void ResourceLoader::setIdentifier(unsigned long identifier) | 552 void ResourceLoader::setIdentifier(unsigned long identifier) |
553 { | 553 { |
554 // FIXME (NetworkProcess): This is temporary to allow WebKit to directly set
the identifier on a ResourceLoader. | 554 // FIXME (NetworkProcess): This is temporary to allow WebKit to directly set
the identifier on a ResourceLoader. |
555 // More permanently we'll want the identifier to be piped through ResourceLo
ader::init/start so | 555 // More permanently we'll want the identifier to be piped through ResourceLo
ader::init/start so |
556 // it always has it, especially in willSendRequest. | 556 // it always has it, especially in willSendRequest. |
557 m_identifier = identifier; | 557 m_identifier = identifier; |
558 } | 558 } |
559 #endif | 559 #endif |
560 | 560 |
561 } | 561 } |
OLD | NEW |