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

Side by Side 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, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/dom_distiller/profile_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" 5 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h"
6 6
7 #include "base/threading/sequenced_worker_pool.h" 7 #include "base/threading/sequenced_worker_pool.h"
8 #include "chrome/browser/profiles/incognito_helpers.h"
8 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
9 #include "components/dom_distiller/content/distiller_page_web_contents.h" 10 #include "components/dom_distiller/content/distiller_page_web_contents.h"
10 #include "components/dom_distiller/core/article_entry.h" 11 #include "components/dom_distiller/core/article_entry.h"
11 #include "components/dom_distiller/core/distiller.h" 12 #include "components/dom_distiller/core/distiller.h"
12 #include "components/dom_distiller/core/dom_distiller_store.h" 13 #include "components/dom_distiller/core/dom_distiller_store.h"
13 #include "components/keyed_service/content/browser_context_dependency_manager.h" 14 #include "components/keyed_service/content/browser_context_dependency_manager.h"
14 #include "components/leveldb_proto/proto_database.h" 15 #include "components/leveldb_proto/proto_database.h"
15 #include "components/leveldb_proto/proto_database_impl.h" 16 #include "components/leveldb_proto/proto_database_impl.h"
16 #include "content/public/browser/browser_context.h" 17 #include "content/public/browser/browser_context.h"
17 #include "content/public/browser/browser_thread.h" 18 #include "content/public/browser/browser_thread.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 dom_distiller_store.PassAs<DomDistillerStoreInterface>(), 86 dom_distiller_store.PassAs<DomDistillerStoreInterface>(),
86 distiller_factory.Pass(), 87 distiller_factory.Pass(),
87 distiller_page_factory.Pass(), 88 distiller_page_factory.Pass(),
88 distilled_page_prefs.Pass()); 89 distilled_page_prefs.Pass());
89 90
90 return service; 91 return service;
91 } 92 }
92 93
93 content::BrowserContext* DomDistillerServiceFactory::GetBrowserContextToUse( 94 content::BrowserContext* DomDistillerServiceFactory::GetBrowserContextToUse(
94 content::BrowserContext* context) const { 95 content::BrowserContext* context) const {
95 // TODO(cjhopman): Do we want this to be 96 // Makes normal profile and off-the-record profile use same service instance.
96 // GetBrowserContextRedirectedInIncognito? 97 return chrome::GetBrowserContextRedirectedInIncognito(context);
97 return context;
98 } 98 }
99 99
100 } // namespace dom_distiller 100 } // namespace dom_distiller
OLDNEW
« 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