Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(814)

Unified Diff: content/browser/download/download_item_impl.cc

Issue 2044233002: Remove download resumption feature flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/download/download_item_impl.cc
diff --git a/content/browser/download/download_item_impl.cc b/content/browser/download/download_item_impl.cc
index 1689cfea5795512055a657bcda93c83c21f46d49..972a9570e1b384e7bdeb50f2f215f912dc4b439a 100644
--- a/content/browser/download/download_item_impl.cc
+++ b/content/browser/download/download_item_impl.cc
@@ -95,10 +95,6 @@ static void DownloadFileCancel(std::unique_ptr<DownloadFile> download_file) {
download_file->Cancel();
}
-bool IsDownloadResumptionEnabled() {
- return base::FeatureList::IsEnabled(features::kDownloadResumption);
-}
-
} // namespace
const uint32_t DownloadItem::kInvalidId = 0;
@@ -483,9 +479,8 @@ bool DownloadItemImpl::CanResume() const {
ResumeMode resume_mode = GetResumeMode();
// Only allow Resume() calls if the resumption mode requires a user
// action.
- return IsDownloadResumptionEnabled() &&
- (resume_mode == RESUME_MODE_USER_RESTART ||
- resume_mode == RESUME_MODE_USER_CONTINUE);
+ return resume_mode == RESUME_MODE_USER_RESTART ||
+ resume_mode == RESUME_MODE_USER_CONTINUE;
}
case MAX_DOWNLOAD_INTERNAL_STATE:
@@ -844,9 +839,6 @@ std::string DownloadItemImpl::DebugString(bool verbose) const {
DownloadItemImpl::ResumeMode DownloadItemImpl::GetResumeMode() const {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- if (!IsDownloadResumptionEnabled())
- return RESUME_MODE_INVALID;
-
// Only support resumption for HTTP(S).
if (!GetURL().SchemeIsHTTPOrHTTPS())
return RESUME_MODE_INVALID;
@@ -1884,9 +1876,6 @@ void DownloadItemImpl::AutoResumeIfValid() {
void DownloadItemImpl::ResumeInterruptedDownload(
ResumptionRequestSource source) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- if (!IsDownloadResumptionEnabled())
- return;
-
// If we're not interrupted, ignore the request; our caller is drunk.
if (state_ != INTERRUPTED_INTERNAL)
return;
« no previous file with comments | « content/browser/download/download_browsertest.cc ('k') | content/browser/download/download_item_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698