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 "components/dom_distiller/content/distiller_page_web_contents.h" | 8 #include "components/dom_distiller/content/distiller_page_web_contents.h" |
9 #include "components/dom_distiller/core/distiller.h" | 9 #include "components/dom_distiller/core/distiller.h" |
10 #include "components/dom_distiller/core/dom_distiller_store.h" | 10 #include "components/dom_distiller/core/dom_distiller_store.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 profile->GetPath().Append(FILE_PATH_LITERAL("Articles"))); | 56 profile->GetPath().Append(FILE_PATH_LITERAL("Articles"))); |
57 | 57 |
58 scoped_ptr<DomDistillerStore> dom_distiller_store(new DomDistillerStore( | 58 scoped_ptr<DomDistillerStore> dom_distiller_store(new DomDistillerStore( |
59 db.PassAs<DomDistillerDatabaseInterface>(), database_dir)); | 59 db.PassAs<DomDistillerDatabaseInterface>(), database_dir)); |
60 | 60 |
61 scoped_ptr<DistillerPageFactory> distiller_page_factory( | 61 scoped_ptr<DistillerPageFactory> distiller_page_factory( |
62 new DistillerPageWebContentsFactory(profile)); | 62 new DistillerPageWebContentsFactory(profile)); |
63 scoped_ptr<DistillerURLFetcherFactory> distiller_url_fetcher_factory( | 63 scoped_ptr<DistillerURLFetcherFactory> distiller_url_fetcher_factory( |
64 new DistillerURLFetcherFactory(profile->GetRequestContext())); | 64 new DistillerURLFetcherFactory(profile->GetRequestContext())); |
65 scoped_ptr<DistillerFactory> distiller_factory( | 65 scoped_ptr<DistillerFactory> distiller_factory( |
66 new DistillerFactoryImpl(distiller_url_fetcher_factory.Pass())); | 66 new DistillerFactoryImpl(distiller_url_fetcher_factory.Pass(), |
| 67 dom_distiller::proto::DomDistillerOptions())); |
67 | 68 |
68 DomDistillerContextKeyedService* service = | 69 DomDistillerContextKeyedService* service = |
69 new DomDistillerContextKeyedService( | 70 new DomDistillerContextKeyedService( |
70 dom_distiller_store.PassAs<DomDistillerStoreInterface>(), | 71 dom_distiller_store.PassAs<DomDistillerStoreInterface>(), |
71 distiller_factory.Pass(), | 72 distiller_factory.Pass(), |
72 distiller_page_factory.Pass()); | 73 distiller_page_factory.Pass()); |
73 | 74 |
74 return service; | 75 return service; |
75 } | 76 } |
76 | 77 |
77 content::BrowserContext* DomDistillerServiceFactory::GetBrowserContextToUse( | 78 content::BrowserContext* DomDistillerServiceFactory::GetBrowserContextToUse( |
78 content::BrowserContext* context) const { | 79 content::BrowserContext* context) const { |
79 // TODO(cjhopman): Do we want this to be | 80 // TODO(cjhopman): Do we want this to be |
80 // GetBrowserContextRedirectedInIncognito? | 81 // GetBrowserContextRedirectedInIncognito? |
81 return context; | 82 return context; |
82 } | 83 } |
83 | 84 |
84 } // namespace dom_distiller | 85 } // namespace dom_distiller |
OLD | NEW |