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

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

Issue 8351052: Created a DownloadManager interface, for use in unit tests.. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed Mac & Clang issues. Created 9 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 690ae50e3d3b86474bc4b5da7a02d1ce4a7087f1..57bbb65b6d2480cc66bc786c5a8318373b48fb3c 100644
--- a/chrome/browser/download/chrome_download_manager_delegate.cc
+++ b/chrome/browser/download/chrome_download_manager_delegate.cc
@@ -57,11 +57,12 @@ bool ChromeDownloadManagerDelegate::IsExtensionDownload(
UserScript::IsURLUserScript(item->GetURL(), item->mime_type());
}
-void ChromeDownloadManagerDelegate::SetDownloadManager(DownloadManager* dm) {
+void ChromeDownloadManagerDelegate::SetDownloadManager(
+ DownloadManagerInterface* dm) {
download_manager_ = dm;
download_history_.reset(new DownloadHistory(profile_));
download_history_->Load(
- base::Bind(&DownloadManager::OnPersistentStoreQueryComplete,
+ base::Bind(&DownloadManagerInterface::OnPersistentStoreQueryComplete,
base::Unretained(dm)));
}
@@ -388,8 +389,8 @@ void ChromeDownloadManagerDelegate::CheckVisitedReferrerBeforeDone(
// 1) using the default download directory.
// 2) prompting the user.
if (state.prompt_user_for_save_location &&
- !download_manager_->last_download_path().empty()) {
- state.suggested_path = download_manager_->last_download_path();
+ !download_manager_->LastDownloadPath().empty()) {
+ state.suggested_path = download_manager_->LastDownloadPath();
} else {
state.suggested_path = download_prefs_->download_path();
}

Powered by Google App Engine
This is Rietveld 408576698