| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |