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

Unified Diff: chrome/browser/download/chrome_download_manager_delegate.cc

Issue 10831302: Download resumption - Preliminary (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed signed/unsigned compare issue. Created 8 years, 1 month 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: chrome/browser/download/chrome_download_manager_delegate.cc
diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrome/browser/download/chrome_download_manager_delegate.cc
index a142d12738a2608964ecf831a313f03909738d22..d7b9722ca5e46ed15e2c3c48fab8d2078f57b235 100644
--- a/chrome/browser/download/chrome_download_manager_delegate.cc
+++ b/chrome/browser/download/chrome_download_manager_delegate.cc
@@ -256,6 +256,22 @@ FilePath ChromeDownloadManagerDelegate::GetIntermediatePath(
return dir.Append(file_name);
}
+int64 ChromeDownloadManagerDelegate::GetIntermediateFileLength(
+ const FilePath& path, bool temporary) {
+ // Get the intermediate file name.
+ FilePath crpath = path;
+
+ if (!temporary)
+ crpath = download_util::GetCrDownloadPath(path);
+
+ // Validate the start offset.
+ int64 end = 0;
+ if (file_util::GetFileSize(crpath, &end))
+ return end;
+
+ return 0;
+}
+
WebContents* ChromeDownloadManagerDelegate::
GetAlternativeWebContentsToNotifyForDownload() {
#if defined(OS_ANDROID)
« no previous file with comments | « chrome/browser/download/chrome_download_manager_delegate.h ('k') | chrome/browser/download/download_item_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698