void OnComplete() { REQUIRE_FILE_THREAD(); if(!file_) return; // Make sure any pending data is written. OnReceivedData(); fclose(file_); file_ = NULL; // Notify the listener that the download completed. listener_->NotifyDownloadComplete(filename_); }
void OnComplete() { REQUIRE_FILE_THREAD(); if (!file_) return; // Make sure any pending data is written. OnReceivedData(); fclose(file_); file_ = NULL; // Notify the listener that the download completed. CefPostTask(TID_UI, NewCefRunnableMethod(this, &ClientDownloadHandler::SendComplete)); }