Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: third_party/WebKit/Source/core/fetch/Resource.cpp

Issue 2290983003: CSSStyleSheetResource should cache decoded text instead of raw bytes (Closed)
Patch Set: rebased Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org)
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All 6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
7 rights reserved. 7 rights reserved.
8 8
9 This library is free software; you can redistribute it and/or 9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Library General Public 10 modify it under the terms of the GNU Library General Public
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 bool Resource::isEligibleForIntegrityCheck( 448 bool Resource::isEligibleForIntegrityCheck(
449 SecurityOrigin* securityOrigin) const { 449 SecurityOrigin* securityOrigin) const {
450 String ignoredErrorDescription; 450 String ignoredErrorDescription;
451 return securityOrigin->canRequest(resourceRequest().url()) || 451 return securityOrigin->canRequest(resourceRequest().url()) ||
452 passesAccessControlCheck(securityOrigin, ignoredErrorDescription); 452 passesAccessControlCheck(securityOrigin, ignoredErrorDescription);
453 } 453 }
454 454
455 void Resource::setIntegrityDisposition( 455 void Resource::setIntegrityDisposition(
456 ResourceIntegrityDisposition disposition) { 456 ResourceIntegrityDisposition disposition) {
457 DCHECK_NE(disposition, ResourceIntegrityDisposition::NotChecked); 457 DCHECK_NE(disposition, ResourceIntegrityDisposition::NotChecked);
458 DCHECK(m_type == Resource::Script); 458 DCHECK(m_type == Resource::Script || m_type == Resource::CSSStyleSheet);
459 m_integrityDisposition = disposition; 459 m_integrityDisposition = disposition;
460 } 460 }
461 461
462 bool Resource::mustRefetchDueToIntegrityMetadata( 462 bool Resource::mustRefetchDueToIntegrityMetadata(
463 const FetchRequest& request) const { 463 const FetchRequest& request) const {
464 if (request.integrityMetadata().isEmpty()) 464 if (request.integrityMetadata().isEmpty())
465 return false; 465 return false;
466 466
467 return !IntegrityMetadata::setsEqual(m_integrityMetadata, 467 return !IntegrityMetadata::setsEqual(m_integrityMetadata,
468 request.integrityMetadata()); 468 request.integrityMetadata());
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
1096 case Resource::TextTrack: 1096 case Resource::TextTrack:
1097 case Resource::Media: 1097 case Resource::Media:
1098 case Resource::Manifest: 1098 case Resource::Manifest:
1099 return false; 1099 return false;
1100 } 1100 }
1101 NOTREACHED(); 1101 NOTREACHED();
1102 return false; 1102 return false;
1103 } 1103 }
1104 1104
1105 } // namespace blink 1105 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/Resource.h ('k') | third_party/WebKit/Source/core/html/HTMLLinkElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698