| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/download/download_manager.h" | 5 #include "chrome/browser/download/download_manager.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1043 | 1043 |
| 1044 // Initiate a download of a specific URL. We send the request to the | 1044 // Initiate a download of a specific URL. We send the request to the |
| 1045 // ResourceDispatcherHost, and let it send us responses like a regular | 1045 // ResourceDispatcherHost, and let it send us responses like a regular |
| 1046 // download. | 1046 // download. |
| 1047 void DownloadManager::DownloadUrl(const GURL& url, | 1047 void DownloadManager::DownloadUrl(const GURL& url, |
| 1048 const GURL& referrer, | 1048 const GURL& referrer, |
| 1049 WebContents* web_contents) { | 1049 WebContents* web_contents) { |
| 1050 DCHECK(web_contents); | 1050 DCHECK(web_contents); |
| 1051 file_manager_->DownloadUrl(url, | 1051 file_manager_->DownloadUrl(url, |
| 1052 referrer, | 1052 referrer, |
| 1053 web_contents->process()->host_id(), | 1053 web_contents->process()->pid(), |
| 1054 web_contents->render_view_host()->routing_id(), | 1054 web_contents->render_view_host()->routing_id(), |
| 1055 request_context_.get()); | 1055 request_context_.get()); |
| 1056 } | 1056 } |
| 1057 | 1057 |
| 1058 void DownloadManager::NotifyAboutDownloadStart() { | 1058 void DownloadManager::NotifyAboutDownloadStart() { |
| 1059 NotificationService::current()->Notify( | 1059 NotificationService::current()->Notify( |
| 1060 NotificationType::DOWNLOAD_START, | 1060 NotificationType::DOWNLOAD_START, |
| 1061 NotificationService::AllSources(), | 1061 NotificationService::AllSources(), |
| 1062 NotificationService::NoDetails()); | 1062 NotificationService::NoDetails()); |
| 1063 } | 1063 } |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1429 searched_downloads.push_back(dit->second); | 1429 searched_downloads.push_back(dit->second); |
| 1430 } | 1430 } |
| 1431 | 1431 |
| 1432 requestor->SetDownloads(searched_downloads); | 1432 requestor->SetDownloads(searched_downloads); |
| 1433 } | 1433 } |
| 1434 | 1434 |
| 1435 // Clears the last download path, used to initialize "save as" dialogs. | 1435 // Clears the last download path, used to initialize "save as" dialogs. |
| 1436 void DownloadManager::ClearLastDownloadPath() { | 1436 void DownloadManager::ClearLastDownloadPath() { |
| 1437 last_download_path_ = FilePath(); | 1437 last_download_path_ = FilePath(); |
| 1438 } | 1438 } |
| OLD | NEW |