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

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

Issue 7859001: Added ability to set ChromeDownloadManagerDelegate for testing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Various nits from self-review. Created 9 years, 3 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
Index: chrome/browser/download/chrome_download_manager_delegate.h
diff --git a/chrome/browser/download/chrome_download_manager_delegate.h b/chrome/browser/download/chrome_download_manager_delegate.h
index 3942c06604baf7ee3cae08d478fac890532cdc24..102385ea3023fb23d9efc8053563bbf64526ea8b 100644
--- a/chrome/browser/download/chrome_download_manager_delegate.h
+++ b/chrome/browser/download/chrome_download_manager_delegate.h
@@ -81,9 +81,16 @@ class ChromeDownloadManagerDelegate
DownloadPrefs* download_prefs() { return download_prefs_.get(); }
DownloadHistory* download_history() { return download_history_.get(); }
+ protected:
+ // So that test classes can inherit from this for override purposes.
+ virtual ~ChromeDownloadManagerDelegate();
+
+ // So that test classes that inherit from this for override purposes
+ // can call back into the DownloadManager.
+ scoped_refptr<DownloadManager> download_manager_;
+
private:
friend class base::RefCountedThreadSafe<ChromeDownloadManagerDelegate>;
- virtual ~ChromeDownloadManagerDelegate();
// NotificationObserver implementation.
virtual void Observe(int type,
@@ -122,7 +129,6 @@ class ChromeDownloadManagerDelegate
void OnItemAddedToPersistentStore(int32 download_id, int64 db_handle);
Profile* profile_;
- scoped_refptr<DownloadManager> download_manager_;
scoped_ptr<DownloadPrefs> download_prefs_;
scoped_ptr<DownloadHistory> download_history_;
« no previous file with comments | « no previous file | chrome/browser/download/download_browsertest.cc » ('j') | chrome/browser/download/download_browsertest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698