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

Unified Diff: chrome/browser/ui/webui/sync_promo/sync_promo_ui.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: Fixed style nit 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/sync_promo/sync_promo_ui.cc
diff --git a/chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc b/chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc
index d521bf309ac77cf948f47deb3bbe7339325f08e9..3968f5908fcb3a6763e696eb9596ff8e265f027b 100644
--- a/chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc
+++ b/chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc
@@ -16,7 +16,7 @@
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/sync/profile_sync_service_factory.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/chrome_web_ui_data_source.h"
#include "chrome/browser/ui/webui/options2/core_options_handler2.h"
#include "chrome/browser/ui/webui/sync_promo/sync_promo_handler.h"
@@ -112,14 +112,15 @@ SyncPromoUI::SyncPromoUI(content::WebUI* web_ui) : WebUIController(web_ui) {
// Set up the chrome://theme/ source.
Profile* profile = Profile::FromWebUI(web_ui);
ThemeSource* theme = new ThemeSource(profile);
- profile->GetChromeURLDataManager()->AddDataSource(theme);
+ ChromeURLDataManagerFactory::GetForProfile(profile)->AddDataSource(theme);
// Set up the sync promo source.
SyncPromoUIHTMLSource* html_source = new SyncPromoUIHTMLSource(web_ui);
html_source->set_json_path(kStringsJsFile);
html_source->add_resource_path(kSyncPromoJsFile, IDR_SYNC_PROMO_JS);
html_source->set_default_resource(IDR_SYNC_PROMO_HTML);
- profile->GetChromeURLDataManager()->AddDataSource(html_source);
+ ChromeURLDataManagerFactory::GetForProfile(profile)->
+ AddDataSource(html_source);
sync_promo_trial::RecordUserShownPromo(web_ui);
}

Powered by Google App Engine
This is Rietveld 408576698