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

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

Issue 10196004: Changed ChromeURLDataManager to a ProfileKeyedService and made a Factory for it. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 8 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/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 a96ebd157ca1a0a54592117e60b798d08c13fccd..133f0824c861569bef9ebaf54db3ff6a7b68b7e8 100644
--- a/chrome/browser/ui/webui/downloads_dom_handler.cc
+++ b/chrome/browser/ui/webui/downloads_dom_handler.cc
@@ -27,7 +27,7 @@
#include "chrome/browser/platform_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
-#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
+#include "chrome/browser/ui/webui/chrome_url_data_manager_factory.h"
#include "chrome/browser/ui/webui/fileicon_source.h"
#include "chrome/common/url_constants.h"
#include "content/public/browser/download_item.h"
@@ -94,12 +94,11 @@ DownloadsDOMHandler::DownloadsDOMHandler(content::DownloadManager* dlm)
original_profile_download_manager_(NULL),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)) {
// Create our fileicon data source.
- Profile::FromBrowserContext(dlm->GetBrowserContext())->
- GetChromeURLDataManager()->AddDataSource(new FileIconSource());
+ Profile* profile = Profile::FromBrowserContext(dlm->GetBrowserContext());
+ ChromeURLDataManagerFactory::GetForProfile(profile)->
+ AddDataSource(new FileIconSource());
// Figure out our parent DownloadManager, if any.
- Profile* profile =
- Profile::FromBrowserContext(download_manager_->GetBrowserContext());
Profile* original_profile = profile->GetOriginalProfile();
if (original_profile != profile) {
original_profile_download_manager_ = DownloadServiceFactory::GetForProfile(

Powered by Google App Engine
This is Rietveld 408576698