Commit Graph

9 Commits

Author SHA1 Message Date
Thiago Marcos P. Santos
d7fdcc73bf [core] Get rid of ::unref() for Timer and AsyncTask
Not need, legacy from libuv. The RunLoop keep the main
loop running until is explicitly no longer needed.
2016-01-09 01:26:29 +02:00
John Firebaugh
0a8fef1f51 [core] Merge OnlineFileRequestImpl::notify into OnlineFileRequestImpl::setResponse
In every case where setResponse is called, notify was called soon after. In one case immediately, in another, after intervening functions which are safe to reorder after notifications.

The null-check of response is safe to eliminate because response must not be null inside setResponse.
2016-01-08 12:29:11 -08:00
John Firebaugh
adf3dea4e5 [core] Simplify OnlineFileSource's Timer use
There is no need for the timer to be created only under certain conditions. Stopping a non-started timer is a no-op. Therefore it can simply be a direct member.

While here, rename the variable. It's a timer, not a request.
2016-01-08 12:23:48 -08:00
Konstantin Käfer
a06f28ddb7 [core] only cache successful or NotFound responses
We don't want other types of error end up in our cache, since it'll likely evict perfectly good content.
2016-01-08 16:25:54 +01:00
Konstantin Käfer
4479f5db6c [core] don't consult cache for asset resources 2016-01-08 13:05:51 +01:00
Konstantin Käfer
bc309d84d7 [core] unify URL prefix detection (asset:// and mapbox://) 2016-01-08 12:14:39 +01:00
John Firebaugh
7a6076ea9d [tests] Test with OnlineFileSource
When we introduce OfflineFileSource, the behavior of existing tests should
not change.
2015-12-23 14:55:12 -08:00
John Firebaugh
c972a251da [core] Remove Resource dependency from low-level classes
These classes should not be coupled to domain-specific resource types.
2015-12-23 14:30:20 -08:00
John Firebaugh
ab0efe5d00 [core] Move OnlineFileSource to platform
Preparation for OfflineFileSource which depends on SQLite
2015-12-22 12:09:14 -08:00