| Index: ios/chrome/browser/reading_list/url_downloader.cc
|
| diff --git a/ios/chrome/browser/reading_list/url_downloader.cc b/ios/chrome/browser/reading_list/url_downloader.cc
|
| index b73616bcc1e8a1187e46e655922139f960e9d0cd..d4588672bd7417810ce9ba4f30ec4d455ca08af3 100644
|
| --- a/ios/chrome/browser/reading_list/url_downloader.cc
|
| +++ b/ios/chrome/browser/reading_list/url_downloader.cc
|
| @@ -112,7 +112,7 @@ void URLDownloader::DownloadCompletionHandler(
|
| base::Unretained(this), url, title, offline_path, success);
|
|
|
| // If downloading failed, clean up any partial download.
|
| - if (success == ERROR_RETRY || success == ERROR_PERMANENT) {
|
| + if (success == ERROR) {
|
| base::FilePath directory_path =
|
| reading_list::OfflineURLDirectoryAbsolutePath(base_directory_, url);
|
| task_tracker_.PostTaskAndReply(
|
| @@ -202,7 +202,7 @@ void URLDownloader::OnURLFetchComplete(const net::URLFetcher* source) {
|
| fetcher_->GetResponseHeaders()->GetMimeType(&mime_type);
|
| }
|
| if (!fetcher_->GetStatus().is_success() || mime_type != mime_type_) {
|
| - return DownloadCompletionHandler(original_url_, "", path, ERROR_RETRY);
|
| + return DownloadCompletionHandler(original_url_, "", path, ERROR);
|
| }
|
| base::FilePath temporary_path;
|
| // Do not take ownership of the file until the file is moved. This ensures
|
| @@ -240,11 +240,11 @@ URLDownloader::SuccessState URLDownloader::SavePDFFile(
|
| if (base::Move(temporary_path, absolute_path)) {
|
| return DOWNLOAD_SUCCESS;
|
| } else {
|
| - return ERROR_PERMANENT;
|
| + return ERROR;
|
| }
|
| }
|
|
|
| - return ERROR_PERMANENT;
|
| + return ERROR;
|
| }
|
|
|
| void URLDownloader::DistillerCallback(
|
| @@ -262,8 +262,7 @@ void URLDownloader::DistillerCallback(
|
| return;
|
| }
|
| // This content cannot be processed, return an error value to the client.
|
| - DownloadCompletionHandler(page_url, std::string(), base::FilePath(),
|
| - ERROR_RETRY);
|
| + DownloadCompletionHandler(page_url, std::string(), base::FilePath(), ERROR);
|
| return;
|
| }
|
|
|
| @@ -288,9 +287,9 @@ URLDownloader::SuccessState URLDownloader::SaveDistilledHTML(
|
| if (CreateOfflineURLDirectory(url)) {
|
| return SaveHTMLForURL(SaveAndReplaceImagesInHTML(url, html, images), url)
|
| ? DOWNLOAD_SUCCESS
|
| - : ERROR_PERMANENT;
|
| + : ERROR;
|
| }
|
| - return ERROR_PERMANENT;
|
| + return ERROR;
|
| }
|
|
|
| bool URLDownloader::CreateOfflineURLDirectory(const GURL& url) {
|
|
|