Skip to content

Instantly share code, notes, and snippets.

@tommynyquist
Created October 15, 2013 17:28
Show Gist options
  • Save tommynyquist/6995321 to your computer and use it in GitHub Desktop.
Save tommynyquist/6995321 to your computer and use it in GitHub Desktop.
DomDistillerServiceFactory
BrowserContextKeyedService* DomDistillerServiceFactory::BuildServiceInstanceFor(
content::BrowserContext* profile) const {
scoped_refptr<base::SequencedTaskRunner> background_task_runner =
content::BrowserThread::GetBlockingPool()->GetSequencedTaskRunner(
content::BrowserThread::GetBlockingPool()->GetSequenceToken());
scoped_ptr<DomDistillerDatabase> db(new DomDistillerDatabase(background_task_runner));
base::FilePath database_dir(FILE_PATH_LITERAL("/data/local/tmp/myreadinglist"));
scoped_ptr<DomDistillerStore> dom_distiller_store(
new DomDistillerStore(db.PassAs<DomDistillerDatabaseInterface>(), database_dir));
scoped_ptr<DistillerFactory> distiller_factory;
return new DomDistillerContextKeyedService(dom_distiller_store.PassAs<DomDistillerStoreInterface>(),
distiller_factory.Pass());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment