summaryrefslogtreecommitdiff
path: root/platform/default/online_file_source.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [test] add ability to take the OnlineFileSource offlineKonstantin Käfer2017-09-221-4/+27
| | | | This functionality is used for testing to ensure correct offline behavior when connectivity is missing.
* [default] use the current scheduler in the online file sourceIvo van Dongen2017-08-091-1/+1
|
* [core] finish must-revalidate supportKonstantin Käfer2017-08-081-0/+8
|
* [core] Use the ResourceTransform instead of callbacksThiago Marcos P. Santos2017-06-261-11/+31
| | | | | Based on the actor model, can be considered safer to use since we don't need to worry about object lifetime anymore.
* [core] Remove util::ThreadThiago Marcos P. Santos2017-06-211-1/+0
| | | | Fixes #6425
* [core] Offline support for Image SourcesAsheem Mamoowala2017-06-011-0/+1
|
* [core] add ability to transform URLs before they're requested from the InternetKonstantin Käfer2017-02-201-0/+26
|
* [core] remove trailing whitespace, add trailing newlines, add space after //Konstantin Käfer2017-01-271-2/+2
|
* [build] move logging to utilKonstantin Käfer2016-11-221-1/+1
|
* [core] Avoid some copiesJohn Firebaugh2016-09-261-1/+1
|
* [core] OnlineFileSource - prevent double scheduling of requestsIvo van Dongen2016-09-231-1/+13
|
* [core] [android] - public api configurable base endpoint (#6309)Tobrun2016-09-151-5/+5
| | | add runloop to test
* [core] OnlineFileSource - rate limitIvo van Dongen2016-09-131-26/+6
|
* [tidy] Check modernize-use-overrideBruno de Oliveira Abinader2016-06-131-1/+1
| | | | Ref: http://clang.llvm.org/extra/clang-tidy/checks/modernize-use-override.html
* [tidy] Check modernize-pass-by-valueBruno de Oliveira Abinader2016-06-131-3/+3
| | | | Ref: http://clang.llvm.org/extra/clang-tidy/checks/modernize-pass-by-value.html
* [core] move from microsecond precision timestamp to integer second precisionKonstantin Käfer2016-05-131-11/+11
|
* [all] Replace HTTPContextBase/HTTPRequestBase with FileSourceJohn Firebaugh2016-04-141-9/+6
|
* [core] Remove internal threading from OnlineFileRequestJohn Firebaugh2016-04-141-70/+59
| | | | There's no need to do the work that OnlineFileRequest does on a separate thread from the DefaultFileSource thread, and having AsyncTasks proxy to other tasks across a thread boundary adds needless complexity.
* [core] Unify FileRequest and WorkRequestJohn Firebaugh2016-03-241-14/+14
|
* [core] Fix regression of prior expiration time not being respectedThiago Marcos P. Santos2016-03-171-1/+5
|
* [core] Make OnlineFileSource respect the NetworkStatusThiago Marcos P. Santos2016-03-081-0/+9
| | | | | The user can now force the Offline mode and set it back to Online, triggering the requests waiting for network connection.
* [core] Build fixThiago Marcos P. Santos2016-02-261-1/+1
| | | | Fix no viable conversion on OSX.
* [core] Add timeout for clock skewThiago Marcos P. Santos2016-02-261-13/+49
| | | | | | | | | | If the server keeps sending replies considered from the client in the past (there is no way to tell if the server or client clock is wrong), the client will try to interpolate a valid expiration time based on the delta of the expiration intervals sent by the server. If the intervals are always the same, exponential backoff kicks in until we get a different expiration time from what we already have.
* [core] Add retry delay on expired tilesThiago Marcos P. Santos2016-02-261-3/+16
| | | | | | | | | When we receive an expired tile, we don't immediately retry because in case the server keeps serving an expired tile, that would cause an infinite retry cycle. Now we add an exponential delay, similarly to what we do for connection errors.
* [core] Faster access with unordered_setThiago Marcos P. Santos2016-02-161-2/+2
| | | | | | The ordering won't be affected because requests are made as they arrive and later stored on the map just for keeping state.
* [core] Remove requests from the pending queue on cancelThiago Marcos P. Santos2016-02-161-13/+21
| | | | | | | | | | | | | | | | | | If we don't do this, we can activate a request twice. The issue here is that we use memory address as the 'key'. So if we destroy a request, another request might take the same memory address, or the same 'key'. The entry at 'pendingRequests' survives the 'cancel()' and is ultimatelly removed at 'activatePendingRequest()'. This is fine unless a request is created using the same 'key' before we call 'activatePendingRequest()'. The check if the request was canceled at 'activatePendingRequest()' will be no longer valid, activating the request. At the same time the request will be activated again by the task scheduled at the constructor of the 'OnlineFileRequestImpl' class.
* [core] use std::move() to prevent copiesKonstantin Käfer2016-02-111-1/+1
|
* [core] Throttle the number of concurrent requests to 20John Firebaugh2016-02-101-45/+102
|
* [core] Make {Default,Online}FileSource::Impl more similarJohn Firebaugh2016-02-101-61/+34
|
* [core] Cache with mapbox:// tile URLsJohn Firebaugh2016-02-101-1/+5
|
* [core] Moving caching logic to DefaultFileSourceJohn Firebaugh2016-02-101-65/+29
| | | | This results in OnlineFileSource containing precisely the logic we want for reuse by OfflineFileSource, and no more.
* [core] Include prior values of caching headers in ResourceJohn Firebaugh2016-01-221-37/+55
| | | | This allows the FileSource interface itself to support revalidation. We could (and probably should) now rewrite HTTPContextBase implementations as FileSource implementations.
* [core] Use better types for modified / expires / etagJohn Firebaugh2016-01-211-13/+11
|
* [core] Eliminate Response::stale and inline Response::isExpired()John Firebaugh2016-01-211-9/+13
| | | | Response::isExpired() had subtle and potentially confusing behavior around Seconds::zero(). It's best to inline it and comment why.
* [core] Eliminate RequestBaseJohn Firebaugh2016-01-211-3/+1
| | | | HTTPRequestBase can now itself be the base class.
* [core] Let SQLiteCache decide when store or refresh responsesJohn Firebaugh2016-01-141-9/+2
|
* [core] Add an explicit "not modified" indicator to ResponseJohn Firebaugh2016-01-141-5/+1
|
* [core] std::shared_ptr<const Response> ⇢ const Response&John Firebaugh2016-01-141-1/+1
|
* [core] Eliminate FileCache interfaceJohn Firebaugh2016-01-141-6/+7
| | | | There is only one implementation and we're unlikely to add more.
* [core] Remove request coalescing in OnlineFileSourceJohn Firebaugh2016-01-131-102/+25
|
* [core] Inline a temporary variable which is now used only onceJohn Firebaugh2016-01-131-5/+2
|
* [core] Simplify asset:// implementationJohn Firebaugh2016-01-131-19/+7
| | | | | | | | * Move asset:// URL handling to DefaultFileSource. * AssetFileSource implements FileSource interface and follows familiar implementation patterns. * Move default implementation to platform/default, zip implementation to platform/android. * Don't bother with modified / expires / etag -- assets are not cached so it doesn't matter. * Don't bother with interleaving individual IO calls on the implementation thread. That adds a lot of complexity for very little benefit.
* [core] Further clarify timeout calculationsJohn Firebaugh2016-01-131-37/+30
|
* [core] Use Seconds::max() rather than -1 for simpler logicJohn Firebaugh2016-01-131-6/+5
|
* [core] Inline OnlineFileRequestImpl::setResponseJohn Firebaugh2016-01-131-29/+24
| | | | In the cache response case, we don't want the failedRequests logic; cached errors, should they occur, shouldn't affect the scheduling behavior for real requests.
* [core] Refactor down to two methods for scheduling a cache or real requestJohn Firebaugh2016-01-131-57/+50
|
* [core] Inline OnlineFileRequestImpl::getRetryTimeoutJohn Firebaugh2016-01-131-50/+33
|
* [core] Inline OnlineFileRequestImpl::checkResponseFreshnessJohn Firebaugh2016-01-131-19/+11
|
* [core] Refactor to instance methods on OnlineFileRequestImplJohn Firebaugh2016-01-131-106/+105
|
* [core] Simplify logic for notification with pre-existing responseJohn Firebaugh2016-01-131-7/+1
| | | | We already had a condition that checks if a response is immediately available for an incoming request. Call the callback there, rather than in addObserver.