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

Side by Side Diff: chrome/browser/dom_distiller/dom_distiller_service_factory.cc

Issue 286583002: Pull DomDistillerOptions up to the DistillerFactory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: :/ Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | components/dom_distiller.gypi » ('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 "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
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
OLDNEW
« no previous file with comments | « no previous file | components/dom_distiller.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698