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

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: Fixed Mac & Clang issues. 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 c4af116a3d5e57f9f1fa5a3be639ae27e0e45ce4..fc05b5b92f57612913463ee175c8fb2060b6a22b 100644
--- a/chrome/browser/ui/webui/downloads_dom_handler.cc
+++ b/chrome/browser/ui/webui/downloads_dom_handler.cc
@@ -118,7 +118,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());
@@ -138,7 +138,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(
@@ -219,7 +219,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(
@@ -340,7 +340,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