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

Unified Diff: chrome/browser/ui/webui/engagement/site_engagement_ui.cc

Issue 2274973003: Enable site engagement in incognito. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address_nit Created 4 years, 4 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
« no previous file with comments | « chrome/browser/ui/extensions/application_launch.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/engagement/site_engagement_ui.cc
diff --git a/chrome/browser/ui/webui/engagement/site_engagement_ui.cc b/chrome/browser/ui/webui/engagement/site_engagement_ui.cc
index 5710cc12934486d2c8657de79890ba9e8bb2287a..38adf863197427a072bf93aff6dab504081f577d 100644
--- a/chrome/browser/ui/webui/engagement/site_engagement_ui.cc
+++ b/chrome/browser/ui/webui/engagement/site_engagement_ui.cc
@@ -76,11 +76,6 @@ class SiteEngagementUIHandlerImpl : public mojom::SiteEngagementUIHandler {
SiteEngagementUI::SiteEngagementUI(content::WebUI* web_ui)
: MojoWebUIController<mojom::SiteEngagementUIHandler>(web_ui) {
- // Incognito profiles will not have a site engagement service.
- Profile* profile = Profile::FromWebUI(web_ui);
- if (!SiteEngagementService::Get(profile))
- return;
-
// Set up the chrome://site-engagement/ source.
std::unique_ptr<content::WebUIDataSource> source(
content::WebUIDataSource::Create(chrome::kChromeUISiteEngagementHost));
@@ -90,7 +85,7 @@ SiteEngagementUI::SiteEngagementUI(content::WebUI* web_ui)
IDR_SITE_ENGAGEMENT_MOJO_JS);
source->AddResourcePath("url/mojo/url.mojom", IDR_URL_MOJO_JS);
source->SetDefaultResource(IDR_SITE_ENGAGEMENT_HTML);
- content::WebUIDataSource::Add(profile, source.release());
+ content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), source.release());
}
SiteEngagementUI::~SiteEngagementUI() {}
« no previous file with comments | « chrome/browser/ui/extensions/application_launch.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698