diff options
author | paulg@google.com <paulg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-14 18:30:34 +0000 |
---|---|---|
committer | paulg@google.com <paulg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-14 18:30:34 +0000 |
commit | 52be96635f1adde6a39ded1b802c34ed5f32f076 (patch) | |
tree | 8e0f1b2a598b12a28e373d707a368ce7ec47e812 | |
parent | c6b68a05568234a457acfe5199fcc130c02f969c (diff) | |
download | chromium_src-52be96635f1adde6a39ded1b802c34ed5f32f076.zip chromium_src-52be96635f1adde6a39ded1b802c34ed5f32f076.tar.gz chromium_src-52be96635f1adde6a39ded1b802c34ed5f32f076.tar.bz2 |
Remove unused notifications.
The old download tab page was the only consumer of
these notifications, so they're no longer necessary.
Review URL: http://codereview.chromium.org/69003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13680 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/download/download_manager.cc | 19 | ||||
-rw-r--r-- | chrome/browser/download/download_manager.h | 4 | ||||
-rw-r--r-- | chrome/common/notification_type.h | 4 |
3 files changed, 0 insertions, 27 deletions
diff --git a/chrome/browser/download/download_manager.cc b/chrome/browser/download/download_manager.cc index 43954a7..e6a1b0c 100644 --- a/chrome/browser/download/download_manager.cc +++ b/chrome/browser/download/download_manager.cc @@ -28,7 +28,6 @@ #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/l10n_util.h" -#include "chrome/common/notification_service.h" #include "chrome/common/platform_util.h" #include "chrome/common/pref_names.h" #include "chrome/common/pref_service.h" @@ -795,7 +794,6 @@ void DownloadManager::DownloadFinished(int32 download_id, int64 size) { // don't have a valid db_handle yet. if (download->db_handle() != kUninitializedHandle) { in_progress_.erase(it); - NotifyAboutDownloadStop(); UpdateHistoryForDownload(download); } @@ -948,7 +946,6 @@ void DownloadManager::DownloadCancelled(int32 download_id) { // don't have a valid db_handle yet. if (download->db_handle() != kUninitializedHandle) { in_progress_.erase(it); - NotifyAboutDownloadStop(); UpdateHistoryForDownload(download); } @@ -1100,20 +1097,6 @@ void DownloadManager::DownloadUrl(const GURL& url, request_context_.get()); } -void DownloadManager::NotifyAboutDownloadStart() { - NotificationService::current()->Notify( - NotificationType::DOWNLOAD_START, - NotificationService::AllSources(), - NotificationService::NoDetails()); -} - -void DownloadManager::NotifyAboutDownloadStop() { - NotificationService::current()->Notify( - NotificationType::DOWNLOAD_STOP, - NotificationService::AllSources(), - NotificationService::NoDetails()); -} - void DownloadManager::GenerateExtension( const FilePath& file_name, const std::string& mime_type, @@ -1485,7 +1468,6 @@ void DownloadManager::OnCreateDownloadEntryComplete(DownloadCreateInfo info, // Inform interested objects about the new download. FOR_EACH_OBSERVER(Observer, observers_, ModelChanged()); - NotifyAboutDownloadStart(); // If this download has been completed before we've received the db handle, // post one final message to the history service so that it can be properly @@ -1493,7 +1475,6 @@ void DownloadManager::OnCreateDownloadEntryComplete(DownloadCreateInfo info, // observers so that they get more than just the start notification. if (download->state() != DownloadItem::IN_PROGRESS) { in_progress_.erase(it); - NotifyAboutDownloadStop(); UpdateHistoryForDownload(download); download->UpdateObservers(); } diff --git a/chrome/browser/download/download_manager.h b/chrome/browser/download/download_manager.h index 378f2b4..8e7c9d4 100644 --- a/chrome/browser/download/download_manager.h +++ b/chrome/browser/download/download_manager.h @@ -467,10 +467,6 @@ class DownloadManager : public base::RefCountedThreadSafe<DownloadManager>, void RemoveDownloadsFromHistoryBetween(const base::Time remove_begin, const base::Time remove_before); - // Inform the notification service of download starts and stops. - void NotifyAboutDownloadStart(); - void NotifyAboutDownloadStop(); - // Create an extension based on the file name and mime type. void GenerateExtension(const FilePath& file_name, const std::string& mime_type, diff --git a/chrome/common/notification_type.h b/chrome/common/notification_type.h index cae614d..009c90e 100644 --- a/chrome/common/notification_type.h +++ b/chrome/common/notification_type.h @@ -153,10 +153,6 @@ class NotificationType { // change. There are no details. SSL_INTERNAL_STATE_CHANGED, - // Download start and stop notifications. Stop notifications can occur on - // both normal completion or via a cancel operation. - DOWNLOAD_START, DOWNLOAD_STOP, - // Lets resource handlers and other interested observers know when the // message filter is being deleted and can no longer be used. RESOURCE_MESSAGE_FILTER_SHUTDOWN, |