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

Unified Diff: chrome/browser/dom_distiller/dom_distiller_service_factory.cc

Issue 608653002: Add support for using DOM Distiller in incognito. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | chrome/browser/dom_distiller/profile_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_distiller/dom_distiller_service_factory.cc
diff --git a/chrome/browser/dom_distiller/dom_distiller_service_factory.cc b/chrome/browser/dom_distiller/dom_distiller_service_factory.cc
index f249672f421c7eaba34eebc9f8bf74b95048e115..4de2b1755b579f70622e5687e305167b072d5673 100644
--- a/chrome/browser/dom_distiller/dom_distiller_service_factory.cc
+++ b/chrome/browser/dom_distiller/dom_distiller_service_factory.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/dom_distiller/dom_distiller_service_factory.h"
#include "base/threading/sequenced_worker_pool.h"
+#include "chrome/browser/profiles/incognito_helpers.h"
#include "chrome/browser/profiles/profile.h"
#include "components/dom_distiller/content/distiller_page_web_contents.h"
#include "components/dom_distiller/core/article_entry.h"
@@ -92,9 +93,8 @@ KeyedService* DomDistillerServiceFactory::BuildServiceInstanceFor(
content::BrowserContext* DomDistillerServiceFactory::GetBrowserContextToUse(
content::BrowserContext* context) const {
- // TODO(cjhopman): Do we want this to be
- // GetBrowserContextRedirectedInIncognito?
- return context;
+ // Makes normal profile and off-the-record profile use same service instance.
+ return chrome::GetBrowserContextRedirectedInIncognito(context);
}
} // namespace dom_distiller
« no previous file with comments | « no previous file | chrome/browser/dom_distiller/profile_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698