OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2009 Google Inc. All rights reserved. | 3 * Copyright (C) 2009 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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 m_url = url; | 277 m_url = url; |
278 } | 278 } |
279 | 279 |
280 const AtomicString& ResourceResponse::mimeType() const { | 280 const AtomicString& ResourceResponse::mimeType() const { |
281 return m_mimeType; | 281 return m_mimeType; |
282 } | 282 } |
283 | 283 |
284 void ResourceResponse::setMimeType(const AtomicString& mimeType) { | 284 void ResourceResponse::setMimeType(const AtomicString& mimeType) { |
285 m_isNull = false; | 285 m_isNull = false; |
286 | 286 |
287 // FIXME: MIME type is determined by HTTP Content-Type header. We should updat
e the header, so that it doesn't disagree with m_mimeType. | 287 // FIXME: MIME type is determined by HTTP Content-Type header. We should |
| 288 // update the header, so that it doesn't disagree with m_mimeType. |
288 m_mimeType = mimeType; | 289 m_mimeType = mimeType; |
289 } | 290 } |
290 | 291 |
291 long long ResourceResponse::expectedContentLength() const { | 292 long long ResourceResponse::expectedContentLength() const { |
292 return m_expectedContentLength; | 293 return m_expectedContentLength; |
293 } | 294 } |
294 | 295 |
295 void ResourceResponse::setExpectedContentLength( | 296 void ResourceResponse::setExpectedContentLength( |
296 long long expectedContentLength) { | 297 long long expectedContentLength) { |
297 m_isNull = false; | 298 m_isNull = false; |
298 | 299 |
299 // FIXME: Content length is determined by HTTP Content-Length header. We shoul
d update the header, so that it doesn't disagree with m_expectedContentLength. | 300 // FIXME: Content length is determined by HTTP Content-Length header. We |
| 301 // should update the header, so that it doesn't disagree with |
| 302 // m_expectedContentLength. |
300 m_expectedContentLength = expectedContentLength; | 303 m_expectedContentLength = expectedContentLength; |
301 } | 304 } |
302 | 305 |
303 const AtomicString& ResourceResponse::textEncodingName() const { | 306 const AtomicString& ResourceResponse::textEncodingName() const { |
304 return m_textEncodingName; | 307 return m_textEncodingName; |
305 } | 308 } |
306 | 309 |
307 void ResourceResponse::setTextEncodingName(const AtomicString& encodingName) { | 310 void ResourceResponse::setTextEncodingName(const AtomicString& encodingName) { |
308 m_isNull = false; | 311 m_isNull = false; |
309 | 312 |
310 // FIXME: Text encoding is determined by HTTP Content-Type header. We should u
pdate the header, so that it doesn't disagree with m_textEncodingName. | 313 // FIXME: Text encoding is determined by HTTP Content-Type header. We should |
| 314 // update the header, so that it doesn't disagree with m_textEncodingName. |
311 m_textEncodingName = encodingName; | 315 m_textEncodingName = encodingName; |
312 } | 316 } |
313 | 317 |
314 // FIXME should compute this on the fly | 318 // FIXME should compute this on the fly |
315 const String& ResourceResponse::suggestedFilename() const { | 319 const String& ResourceResponse::suggestedFilename() const { |
316 return m_suggestedFilename; | 320 return m_suggestedFilename; |
317 } | 321 } |
318 | 322 |
319 void ResourceResponse::setSuggestedFilename(const String& suggestedName) { | 323 void ResourceResponse::setSuggestedFilename(const String& suggestedName) { |
320 m_isNull = false; | 324 m_isNull = false; |
321 | 325 |
322 // FIXME: Suggested file name is calculated based on other headers. There shou
ld not be a setter for it. | 326 // FIXME: Suggested file name is calculated based on other headers. There |
| 327 // should not be a setter for it. |
323 m_suggestedFilename = suggestedName; | 328 m_suggestedFilename = suggestedName; |
324 } | 329 } |
325 | 330 |
326 int ResourceResponse::httpStatusCode() const { | 331 int ResourceResponse::httpStatusCode() const { |
327 return m_httpStatusCode; | 332 return m_httpStatusCode; |
328 } | 333 } |
329 | 334 |
330 void ResourceResponse::setHTTPStatusCode(int statusCode) { | 335 void ResourceResponse::setHTTPStatusCode(int statusCode) { |
331 m_httpStatusCode = statusCode; | 336 m_httpStatusCode = statusCode; |
332 } | 337 } |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
636 if (a.resourceLoadTiming() != b.resourceLoadTiming()) | 641 if (a.resourceLoadTiming() != b.resourceLoadTiming()) |
637 return false; | 642 return false; |
638 if (a.encodedBodyLength() != b.encodedBodyLength()) | 643 if (a.encodedBodyLength() != b.encodedBodyLength()) |
639 return false; | 644 return false; |
640 if (a.decodedBodyLength() != b.decodedBodyLength()) | 645 if (a.decodedBodyLength() != b.decodedBodyLength()) |
641 return false; | 646 return false; |
642 return true; | 647 return true; |
643 } | 648 } |
644 | 649 |
645 } // namespace blink | 650 } // namespace blink |
OLD | NEW |