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

Unified Diff: chrome/browser/engagement/site_engagement_service_factory.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
Index: chrome/browser/engagement/site_engagement_service_factory.cc
diff --git a/chrome/browser/engagement/site_engagement_service_factory.cc b/chrome/browser/engagement/site_engagement_service_factory.cc
index 783883657ca4532a65957f1d24bdfbdde68bd8f3..347facefca6f6b42ab9bf33ce851f4897e1851fd 100644
--- a/chrome/browser/engagement/site_engagement_service_factory.cc
+++ b/chrome/browser/engagement/site_engagement_service_factory.cc
@@ -7,6 +7,7 @@
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/engagement/site_engagement_service.h"
#include "chrome/browser/history/history_service_factory.h"
+#include "chrome/browser/profiles/incognito_helpers.h"
#include "chrome/browser/profiles/profile.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
@@ -41,3 +42,8 @@ KeyedService* SiteEngagementServiceFactory::BuildServiceInstanceFor(
content::BrowserContext* profile) const {
return new SiteEngagementService(static_cast<Profile*>(profile));
}
+
+content::BrowserContext* SiteEngagementServiceFactory::GetBrowserContextToUse(
+ content::BrowserContext* context) const {
+ return chrome::GetBrowserContextOwnInstanceInIncognito(context);
+}

Powered by Google App Engine
This is Rietveld 408576698