| 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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 const AtomicString& name) const { | 341 const AtomicString& name) const { |
| 342 return http_header_fields_.Get(name); | 342 return http_header_fields_.Get(name); |
| 343 } | 343 } |
| 344 | 344 |
| 345 void ResourceResponse::UpdateHeaderParsedState(const AtomicString& name) { | 345 void ResourceResponse::UpdateHeaderParsedState(const AtomicString& name) { |
| 346 static const char kAgeHeader[] = "age"; | 346 static const char kAgeHeader[] = "age"; |
| 347 static const char kDateHeader[] = "date"; | 347 static const char kDateHeader[] = "date"; |
| 348 static const char kExpiresHeader[] = "expires"; | 348 static const char kExpiresHeader[] = "expires"; |
| 349 static const char kLastModifiedHeader[] = "last-modified"; | 349 static const char kLastModifiedHeader[] = "last-modified"; |
| 350 | 350 |
| 351 if (EqualIgnoringCase(name, kAgeHeader)) | 351 if (DeprecatedEqualIgnoringCase(name, kAgeHeader)) |
| 352 have_parsed_age_header_ = false; | 352 have_parsed_age_header_ = false; |
| 353 else if (EqualIgnoringCase(name, kCacheControlHeader) || | 353 else if (DeprecatedEqualIgnoringCase(name, kCacheControlHeader) || |
| 354 EqualIgnoringCase(name, kPragmaHeader)) | 354 DeprecatedEqualIgnoringCase(name, kPragmaHeader)) |
| 355 cache_control_header_ = CacheControlHeader(); | 355 cache_control_header_ = CacheControlHeader(); |
| 356 else if (EqualIgnoringCase(name, kDateHeader)) | 356 else if (DeprecatedEqualIgnoringCase(name, kDateHeader)) |
| 357 have_parsed_date_header_ = false; | 357 have_parsed_date_header_ = false; |
| 358 else if (EqualIgnoringCase(name, kExpiresHeader)) | 358 else if (DeprecatedEqualIgnoringCase(name, kExpiresHeader)) |
| 359 have_parsed_expires_header_ = false; | 359 have_parsed_expires_header_ = false; |
| 360 else if (EqualIgnoringCase(name, kLastModifiedHeader)) | 360 else if (DeprecatedEqualIgnoringCase(name, kLastModifiedHeader)) |
| 361 have_parsed_last_modified_header_ = false; | 361 have_parsed_last_modified_header_ = false; |
| 362 } | 362 } |
| 363 | 363 |
| 364 void ResourceResponse::SetSecurityDetails( | 364 void ResourceResponse::SetSecurityDetails( |
| 365 const String& protocol, | 365 const String& protocol, |
| 366 const String& key_exchange, | 366 const String& key_exchange, |
| 367 const String& key_exchange_group, | 367 const String& key_exchange_group, |
| 368 const String& cipher, | 368 const String& cipher, |
| 369 const String& mac, | 369 const String& mac, |
| 370 const String& subject_name, | 370 const String& subject_name, |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 return last_modified_; | 510 return last_modified_; |
| 511 } | 511 } |
| 512 | 512 |
| 513 bool ResourceResponse::IsAttachment() const { | 513 bool ResourceResponse::IsAttachment() const { |
| 514 static const char kAttachmentString[] = "attachment"; | 514 static const char kAttachmentString[] = "attachment"; |
| 515 String value = http_header_fields_.Get(HTTPNames::Content_Disposition); | 515 String value = http_header_fields_.Get(HTTPNames::Content_Disposition); |
| 516 size_t loc = value.Find(';'); | 516 size_t loc = value.Find(';'); |
| 517 if (loc != kNotFound) | 517 if (loc != kNotFound) |
| 518 value = value.Left(loc); | 518 value = value.Left(loc); |
| 519 value = value.StripWhiteSpace(); | 519 value = value.StripWhiteSpace(); |
| 520 return EqualIgnoringCase(value, kAttachmentString); | 520 return DeprecatedEqualIgnoringCase(value, kAttachmentString); |
| 521 } | 521 } |
| 522 | 522 |
| 523 AtomicString ResourceResponse::HttpContentType() const { | 523 AtomicString ResourceResponse::HttpContentType() const { |
| 524 return ExtractMIMETypeFromMediaType( | 524 return ExtractMIMETypeFromMediaType( |
| 525 HttpHeaderField(HTTPNames::Content_Type).DeprecatedLower()); | 525 HttpHeaderField(HTTPNames::Content_Type).DeprecatedLower()); |
| 526 } | 526 } |
| 527 | 527 |
| 528 bool ResourceResponse::WasCached() const { | 528 bool ResourceResponse::WasCached() const { |
| 529 return was_cached_; | 529 return was_cached_; |
| 530 } | 530 } |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 if (a.GetResourceLoadTiming() != b.GetResourceLoadTiming()) | 628 if (a.GetResourceLoadTiming() != b.GetResourceLoadTiming()) |
| 629 return false; | 629 return false; |
| 630 if (a.EncodedBodyLength() != b.EncodedBodyLength()) | 630 if (a.EncodedBodyLength() != b.EncodedBodyLength()) |
| 631 return false; | 631 return false; |
| 632 if (a.DecodedBodyLength() != b.DecodedBodyLength()) | 632 if (a.DecodedBodyLength() != b.DecodedBodyLength()) |
| 633 return false; | 633 return false; |
| 634 return true; | 634 return true; |
| 635 } | 635 } |
| 636 | 636 |
| 637 } // namespace blink | 637 } // namespace blink |
| OLD | NEW |