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

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

Issue 1217833006: Rename an ignored parameter Resource::isEligibleForIntegrityCheck() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 rights reserved. 6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
7 7
8 This library is free software; you can redistribute it and/or 8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Library General Public 9 modify it under the terms of the GNU Library General Public
10 License as published by the Free Software Foundation; either 10 License as published by the Free Software Foundation; either
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 return passesAccessControlCheck(securityOrigin, ignoredErrorDescription); 315 return passesAccessControlCheck(securityOrigin, ignoredErrorDescription);
316 } 316 }
317 317
318 bool Resource::passesAccessControlCheck(SecurityOrigin* securityOrigin, String& errorDescription) const 318 bool Resource::passesAccessControlCheck(SecurityOrigin* securityOrigin, String& errorDescription) const
319 { 319 {
320 return blink::passesAccessControlCheck(m_response, resourceRequest().allowSt oredCredentials() ? AllowStoredCredentials : DoNotAllowStoredCredentials, securi tyOrigin, errorDescription); 320 return blink::passesAccessControlCheck(m_response, resourceRequest().allowSt oredCredentials() ? AllowStoredCredentials : DoNotAllowStoredCredentials, securi tyOrigin, errorDescription);
321 } 321 }
322 322
323 bool Resource::isEligibleForIntegrityCheck(SecurityOrigin* securityOrigin) const 323 bool Resource::isEligibleForIntegrityCheck(SecurityOrigin* securityOrigin) const
324 { 324 {
325 String errorDescription; 325 String ignoredErrorDescription;
326 return securityOrigin->canRequest(resourceRequest().url()) || passesAccessCo ntrolCheck(securityOrigin, errorDescription); 326 return securityOrigin->canRequest(resourceRequest().url()) || passesAccessCo ntrolCheck(securityOrigin, ignoredErrorDescription);
327 } 327 }
328 328
329 static double currentAge(const ResourceResponse& response, double responseTimest amp) 329 static double currentAge(const ResourceResponse& response, double responseTimest amp)
330 { 330 {
331 // RFC2616 13.2.3 331 // RFC2616 13.2.3
332 // No compensation for latency as that is not terribly important in practice 332 // No compensation for latency as that is not terribly important in practice
333 double dateValue = response.date(); 333 double dateValue = response.date();
334 double apparentAge = std::isfinite(dateValue) ? std::max(0., responseTimesta mp - dateValue) : 0; 334 double apparentAge = std::isfinite(dateValue) ? std::max(0., responseTimesta mp - dateValue) : 0;
335 double ageValue = response.age(); 335 double ageValue = response.age();
336 double correctedReceivedAge = std::isfinite(ageValue) ? std::max(apparentAge , ageValue) : apparentAge; 336 double correctedReceivedAge = std::isfinite(ageValue) ? std::max(apparentAge , ageValue) : apparentAge;
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
1079 return "ImportResource"; 1079 return "ImportResource";
1080 case Resource::Media: 1080 case Resource::Media:
1081 return "Media"; 1081 return "Media";
1082 } 1082 }
1083 ASSERT_NOT_REACHED(); 1083 ASSERT_NOT_REACHED();
1084 return "Unknown"; 1084 return "Unknown";
1085 } 1085 }
1086 #endif // !LOG_DISABLED 1086 #endif // !LOG_DISABLED
1087 1087
1088 } // namespace blink 1088 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698