summaryrefslogtreecommitdiff
path: root/platform/darwin
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <thiago@mapbox.com>2015-10-26 17:07:10 +0200
committerThiago Marcos P. Santos <thiago@mapbox.com>2015-10-26 18:37:51 +0200
commitc65f809651dccc742d4d549f4dedf794de8623fc (patch)
treeb35ea2ac1181b098405f586ec5596f13402c92c3 /platform/darwin
parent75dec6ffac6f3e79e5a173cd8a3f98d374ed1c09 (diff)
downloadqtlocation-mapboxgl-c65f809651dccc742d4d549f4dedf794de8623fc.tar.gz
[core] Move parseCacheControl() up in the class hierarchy
Avoid duplicating it on all the ports.
Diffstat (limited to 'platform/darwin')
-rw-r--r--platform/darwin/http_request_nsurl.mm15
1 files changed, 0 insertions, 15 deletions
diff --git a/platform/darwin/http_request_nsurl.mm b/platform/darwin/http_request_nsurl.mm
index f5a4d8ef97..59f3c6b71a 100644
--- a/platform/darwin/http_request_nsurl.mm
+++ b/platform/darwin/http_request_nsurl.mm
@@ -198,21 +198,6 @@ void HTTPNSURLRequest::cancel() {
}
}
-int64_t parseCacheControl(const char *value) {
- if (value) {
- unsigned long long seconds = 0;
- // TODO: cache-control may contain other information as well:
- // http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9
- if (std::sscanf(value, "max-age=%llu", &seconds) == 1) {
- return std::chrono::duration_cast<std::chrono::seconds>(
- std::chrono::system_clock::now().time_since_epoch()).count() +
- seconds;
- }
- }
-
- return 0;
-}
-
void HTTPNSURLRequest::handleResult(NSData *data, NSURLResponse *res, NSError *error) {
if (error) {
if ([error code] == NSURLErrorCancelled) {