diff --git a/platform/default/sqlite_cache.cpp b/platform/default/sqlite_cache.cpp index e73618f2b..a57e666e9 100644 --- a/platform/default/sqlite_cache.cpp +++ b/platform/default/sqlite_cache.cpp @@ -131,10 +131,10 @@ void SQLiteCache::get(const Resource &resource, Callback callback) { // Will try to load the URL from the SQLite database and call the callback when done. // Note that the callback is probably going to invoked from another thread, so the caller // must make sure that it can run in that thread. - thread->invokeWithResult(&Impl::processGet, callback, resource); + thread->invokeWithResult(&Impl::get, callback, resource); } -std::unique_ptr SQLiteCache::Impl::processGet(const Resource &resource) { +std::unique_ptr SQLiteCache::Impl::get(const Resource &resource) { try { // This is called in the SQLite event loop. if (!db) { @@ -183,13 +183,13 @@ void SQLiteCache::put(const Resource &resource, std::shared_ptr // storing a new response or updating the currently stored response, potentially setting a new // expiry date. if (hint == Hint::Full) { - thread->invoke(&Impl::processPut, resource, std::move(response)); + thread->invoke(&Impl::put, resource, std::move(response)); } else if (hint == Hint::Refresh) { - thread->invoke(&Impl::processRefresh, resource, int64_t(response->expires)); + thread->invoke(&Impl::refresh, resource, int64_t(response->expires)); } } -void SQLiteCache::Impl::processPut(const Resource& resource, std::shared_ptr response) { +void SQLiteCache::Impl::put(const Resource& resource, std::shared_ptr response) { try { if (!db) { createDatabase(); @@ -238,7 +238,7 @@ void SQLiteCache::Impl::processPut(const Resource& resource, std::shared_ptr processGet(const Resource&); - void processPut(const Resource& resource, std::shared_ptr response); - void processRefresh(const Resource& resource, int64_t expires); + std::unique_ptr get(const Resource&); + void put(const Resource& resource, std::shared_ptr response); + void refresh(const Resource& resource, int64_t expires); private: void createDatabase(); diff --git a/src/mbgl/storage/default_file_source.cpp b/src/mbgl/storage/default_file_source.cpp index d866e2353..4055001fc 100644 --- a/src/mbgl/storage/default_file_source.cpp +++ b/src/mbgl/storage/default_file_source.cpp @@ -60,7 +60,7 @@ Request* DefaultFileSource::request(const Resource& resource, // This function can be called from any thread. Make sure we're executing the actual call in the // file source loop by sending it over the queue. - thread->invoke(&Impl::processAdd, std::move(req), thread->get()); + thread->invoke(&Impl::add, std::move(req), thread->get()); return req; } @@ -74,14 +74,14 @@ void DefaultFileSource::cancel(Request *req) { // This function can be called from any thread. Make sure we're executing the actual call in the // file source loop by sending it over the queue. - thread->invoke(&Impl::processCancel, std::move(req)); + thread->invoke(&Impl::cancel, std::move(req)); } void DefaultFileSource::abort(const Environment &env) { - thread->invoke(&Impl::processAbort, std::ref(env)); + thread->invoke(&Impl::abort, std::ref(env)); } -void DefaultFileSource::Impl::processAdd(Request* req, uv_loop_t* loop) { +void DefaultFileSource::Impl::add(Request* req, uv_loop_t* loop) { const Resource &resource = req->resource; // We're adding a new Request. @@ -112,7 +112,7 @@ void DefaultFileSource::Impl::processAdd(Request* req, uv_loop_t* loop) { sharedRequest->subscribe(req); } -void DefaultFileSource::Impl::processCancel(Request* req) { +void DefaultFileSource::Impl::cancel(Request* req) { SharedRequestBase *sharedRequest = find(req->resource); if (sharedRequest) { // If the number of dependent requests of the SharedRequestBase drops to zero, the @@ -156,7 +156,7 @@ void DefaultFileSource::Impl::processResult(const Resource& resource, std::share } // Aborts all requests that are part of the current environment. -void DefaultFileSource::Impl::processAbort(const Environment& env) { +void DefaultFileSource::Impl::abort(const Environment& env) { // Construct a cancellation response. auto res = util::make_unique(); res->status = Response::Error; diff --git a/src/mbgl/storage/default_file_source_impl.hpp b/src/mbgl/storage/default_file_source_impl.hpp index 6383d13dc..97210dc44 100644 --- a/src/mbgl/storage/default_file_source_impl.hpp +++ b/src/mbgl/storage/default_file_source_impl.hpp @@ -18,9 +18,9 @@ public: std::shared_ptr response, FileCache::Hint hint); SharedRequestBase *find(const Resource &resource); - void processAdd(Request* request, uv_loop_t* loop); - void processCancel(Request* request); - void processAbort(const Environment& env); + void add(Request* request, uv_loop_t* loop); + void cancel(Request* request); + void abort(const Environment& env); const std::string assetRoot;