diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/storage/default_file_source.hpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/mbgl/storage/default_file_source.hpp b/include/mbgl/storage/default_file_source.hpp index 1e60d2bc5a..f929334f28 100644 --- a/include/mbgl/storage/default_file_source.hpp +++ b/include/mbgl/storage/default_file_source.hpp @@ -5,6 +5,7 @@ #include <mbgl/util/constants.hpp> #include <vector> +#include <mutex> namespace mbgl { @@ -34,10 +35,10 @@ public: } void setAPIBaseURL(const std::string&); - std::string getAPIBaseURL() const; + std::string getAPIBaseURL(); void setAccessToken(const std::string&); - std::string getAccessToken() const; + std::string getAccessToken(); void setResourceTransform(std::function<std::string(Resource::Kind, std::string&&)>); @@ -143,7 +144,11 @@ private: // Shared so destruction is done on this thread const std::shared_ptr<FileSource> assetFileSource; const std::unique_ptr<util::Thread<Impl>> thread; + + std::mutex cachedBaseURLMutex; std::string cachedBaseURL = mbgl::util::API_BASE_URL; + + std::mutex cachedAccessTokenMutex; std::string cachedAccessToken; }; |