| 112 | } |
| 113 | |
| 114 | void HttpMapFilesDownloader::OnMapFileDownloaded(QueuedCountry const & queuedCountry, downloader::HttpRequest & request) |
| 115 | { |
| 116 | CHECK_THREAD_CHECKER(m_checker, ()); |
| 117 | // Because this method is called deferred on original thread, |
| 118 | // it is possible the country is already removed from queue. |
| 119 | if (m_queue.IsEmpty() || m_queue.GetFirstId() != queuedCountry.GetCountryId()) |
| 120 | return; |
| 121 | |
| 122 | m_queue.PopFront(); |
| 123 | |
| 124 | queuedCountry.OnDownloadFinished(request.GetStatus()); |
| 125 | |
| 126 | m_request.reset(); |
| 127 | |
| 128 | if (!m_queue.IsEmpty()) |
| 129 | Download(); |
| 130 | } |
| 131 | |
| 132 | void HttpMapFilesDownloader::OnMapFileDownloadingProgress(QueuedCountry const & queuedCountry, |
| 133 | downloader::HttpRequest & request) |
nothing calls this directly
no test coverage detected