OLD | NEW |
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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 } | 267 } |
268 | 268 |
269 bool Resource::passesAccessControlCheck(SecurityOrigin* securityOrigin) | 269 bool Resource::passesAccessControlCheck(SecurityOrigin* securityOrigin) |
270 { | 270 { |
271 String ignoredErrorDescription; | 271 String ignoredErrorDescription; |
272 return passesAccessControlCheck(securityOrigin, ignoredErrorDescription); | 272 return passesAccessControlCheck(securityOrigin, ignoredErrorDescription); |
273 } | 273 } |
274 | 274 |
275 bool Resource::passesAccessControlCheck(SecurityOrigin* securityOrigin, String&
errorDescription) | 275 bool Resource::passesAccessControlCheck(SecurityOrigin* securityOrigin, String&
errorDescription) |
276 { | 276 { |
277 return WebCore::passesAccessControlCheck(m_response, resourceRequest().allow
Cookies() ? AllowStoredCredentials : DoNotAllowStoredCredentials, securityOrigin
, errorDescription); | 277 return WebCore::passesAccessControlCheck(m_response, resourceRequest().allow
StoredCredentials() ? AllowStoredCredentials : DoNotAllowStoredCredentials, secu
rityOrigin, errorDescription); |
278 } | 278 } |
279 | 279 |
280 static double currentAge(const ResourceResponse& response, double responseTimest
amp) | 280 static double currentAge(const ResourceResponse& response, double responseTimest
amp) |
281 { | 281 { |
282 // RFC2616 13.2.3 | 282 // RFC2616 13.2.3 |
283 // No compensation for latency as that is not terribly important in practice | 283 // No compensation for latency as that is not terribly important in practice |
284 double dateValue = response.date(); | 284 double dateValue = response.date(); |
285 double apparentAge = std::isfinite(dateValue) ? std::max(0., responseTimesta
mp - dateValue) : 0; | 285 double apparentAge = std::isfinite(dateValue) ? std::max(0., responseTimesta
mp - dateValue) : 0; |
286 double ageValue = response.age(); | 286 double ageValue = response.age(); |
287 double correctedReceivedAge = std::isfinite(ageValue) ? std::max(apparentAge
, ageValue) : apparentAge; | 287 double correctedReceivedAge = std::isfinite(ageValue) ? std::max(apparentAge
, ageValue) : apparentAge; |
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
992 return "Shader"; | 992 return "Shader"; |
993 case Resource::ImportResource: | 993 case Resource::ImportResource: |
994 return "ImportResource"; | 994 return "ImportResource"; |
995 } | 995 } |
996 ASSERT_NOT_REACHED(); | 996 ASSERT_NOT_REACHED(); |
997 return "Unknown"; | 997 return "Unknown"; |
998 } | 998 } |
999 #endif // !LOG_DISABLED | 999 #endif // !LOG_DISABLED |
1000 | 1000 |
1001 } | 1001 } |
OLD | NEW |