Chromium Code Reviews| Index: components/dom_distiller/core/dom_distiller_service.cc |
| diff --git a/components/dom_distiller/core/dom_distiller_service.cc b/components/dom_distiller/core/dom_distiller_service.cc |
| index 983452d0fb483775cfbf14355b3f173388b87ec0..d1a35cdf4cf64bd4181915b1ccd93a9047ce665d 100644 |
| --- a/components/dom_distiller/core/dom_distiller_service.cc |
| +++ b/components/dom_distiller/core/dom_distiller_service.cc |
| @@ -67,6 +67,21 @@ DomDistillerService::CreateDefaultDistillerPageWithHandle( |
| .Pass(); |
| } |
| +bool DomDistillerService::HasEntry(const std::string entry_id) { |
| + return store_->GetEntryById(entry_id, NULL); |
| +} |
| + |
| +// Returns the source URL given an entry ID. If the entry ID article has |
|
nyquist
2014/08/13 20:09:10
Move this comment to the interface and add a comme
sunangel
2014/08/13 21:49:32
Done.
|
| +// multiple pages, this will return the URL of the first page. Returns an empty |
| +// string if there is no entry associated with the given entry ID. |
| +std::string DomDistillerService::GetUrlForEntry(const std::string entry_id) { |
| + ArticleEntry entry; |
| + if (store_->GetEntryById(entry_id, &entry)) { |
| + return entry.pages().Get(0).url(); |
| + } |
| + return ""; |
| +} |
| + |
| const std::string DomDistillerService::AddToList( |
| const GURL& url, |
| scoped_ptr<DistillerPage> distiller_page, |