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

Unified Diff: chrome/browser/ui/webui/downloads_dom_handler.cc

Issue 8351052: Created a DownloadManager interface, for use in unit tests.. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created a non-inlined destructor for MockDownloadManager. 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/ui/webui/downloads_dom_handler.cc
diff --git a/chrome/browser/ui/webui/downloads_dom_handler.cc b/chrome/browser/ui/webui/downloads_dom_handler.cc
index e36f15effbc5fc2a90742aa022c3530e57e0ab5f..725468d06adfa06f05ecad04d5ea8d749dfa65ad 100644
--- a/chrome/browser/ui/webui/downloads_dom_handler.cc
+++ b/chrome/browser/ui/webui/downloads_dom_handler.cc
@@ -124,7 +124,7 @@ DownloadsDOMHandler::DownloadsDOMHandler(DownloadManager* dlm)
download_manager_(dlm),
callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
// Create our fileicon data source.
- Profile::FromBrowserContext(dlm->browser_context())->
+ Profile::FromBrowserContext(dlm->BrowserContext())->
GetChromeURLDataManager()->AddDataSource(
#if defined(OS_CHROMEOS)
new FileIconSourceCros());
@@ -144,7 +144,7 @@ void DownloadsDOMHandler::Init() {
download_manager_->AddObserver(this);
Profile* profile =
- Profile::FromBrowserContext(download_manager_->browser_context());
+ Profile::FromBrowserContext(download_manager_->BrowserContext());
Profile* original_profile = profile->GetOriginalProfile();
if (original_profile != profile) {
original_download_manager_observer_.reset(
@@ -225,7 +225,7 @@ void DownloadsDOMHandler::ModelChanged() {
&download_items_);
// If we have a parent profile, let it add its downloads to the results.
Profile* profile =
- Profile::FromBrowserContext(download_manager_->browser_context());
+ Profile::FromBrowserContext(download_manager_->BrowserContext());
if (profile->GetOriginalProfile() != profile) {
DownloadServiceFactory::GetForProfile(
profile->GetOriginalProfile())->GetDownloadManager()->SearchDownloads(
@@ -346,7 +346,7 @@ void DownloadsDOMHandler::HandleClearAll(const ListValue* args) {
download_manager_->RemoveAllDownloads();
Profile* profile =
- Profile::FromBrowserContext(download_manager_->browser_context());
+ Profile::FromBrowserContext(download_manager_->BrowserContext());
// If this is an incognito downloader, clear All should clear main download
// manager as well.
if (profile->GetOriginalProfile() != profile)

Powered by Google App Engine
This is Rietveld 408576698