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

Unified Diff: chrome/browser/download/test_download_shelf.h

Issue 15575002: Use DownloadManager::Observer in TestDownloadShelf (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing OVERRIDE Created 7 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/download/test_download_shelf.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/test_download_shelf.h
diff --git a/chrome/browser/download/test_download_shelf.h b/chrome/browser/download/test_download_shelf.h
index 246664b753b8f712f0e7bab420f3b65494a8a995..9526d1e2c7e4d60124918c8b7bbf397bc2c04153 100644
--- a/chrome/browser/download/test_download_shelf.h
+++ b/chrome/browser/download/test_download_shelf.h
@@ -9,13 +9,11 @@
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
#include "chrome/browser/download/download_shelf.h"
-
-namespace content {
-class DownloadManager;
-}
+#include "content/public/browser/download_manager.h"
// An implementation of DownloadShelf for testing.
-class TestDownloadShelf : public DownloadShelf {
+class TestDownloadShelf : public DownloadShelf,
+ public content::DownloadManager::Observer {
public:
TestDownloadShelf();
virtual ~TestDownloadShelf();
@@ -31,6 +29,9 @@ class TestDownloadShelf : public DownloadShelf {
// Set download_manager_ (and the result of calling GetDownloadManager())
void set_download_manager(content::DownloadManager* download_manager);
+ // DownloadManager::Observer implementation.
+ virtual void ManagerGoingDown(content::DownloadManager* manager) OVERRIDE;
+
protected:
virtual void DoAddDownload(content::DownloadItem* download) OVERRIDE;
virtual void DoShow() OVERRIDE;
@@ -41,7 +42,7 @@ class TestDownloadShelf : public DownloadShelf {
private:
bool is_showing_;
bool did_add_download_;
- scoped_refptr<content::DownloadManager> download_manager_;
+ content::DownloadManager* download_manager_;
DISALLOW_COPY_AND_ASSIGN(TestDownloadShelf);
};
« no previous file with comments | « no previous file | chrome/browser/download/test_download_shelf.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698