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

Unified Diff: components/dom_distiller/core/dom_distiller_service.h

Issue 442503002: Retrieve article original URL from entryID (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added tests for viewer, styling Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: components/dom_distiller/core/dom_distiller_service.h
diff --git a/components/dom_distiller/core/dom_distiller_service.h b/components/dom_distiller/core/dom_distiller_service.h
index a0c55bd6466cc96c1ed5c166c47d586da45d6c0a..bb9a5be67bb663623cb7c6fe68d42d4f3f9b2d6c 100644
--- a/components/dom_distiller/core/dom_distiller_service.h
+++ b/components/dom_distiller/core/dom_distiller_service.h
@@ -55,6 +55,14 @@ class DomDistillerServiceInterface {
scoped_ptr<DistillerPage> distiller_page,
const ArticleAvailableCallback& article_cb) = 0;
+ // Returns true if an article stored has the given entry id.
nyquist 2014/08/13 23:03:39 "Returns whether an ar..."
sunangel 2014/08/13 23:31:14 Done.
+ virtual bool HasEntry(const std::string entry_id) = 0;
+
+ // Returns the source URL given an entry ID. If the entry ID article has
+ // 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.
+ virtual std::string GetUrlForEntry(const std::string entry_id) = 0;
+
// Gets the full list of entries.
virtual std::vector<ArticleEntry> GetEntries() const = 0;
@@ -118,6 +126,8 @@ class DomDistillerService : public DomDistillerServiceInterface {
const GURL& url,
scoped_ptr<DistillerPage> distiller_page,
const ArticleAvailableCallback& article_cb) OVERRIDE;
+ virtual bool HasEntry(const std::string entry_id) OVERRIDE;
+ virtual std::string GetUrlForEntry(const std::string entry_id) OVERRIDE;
virtual std::vector<ArticleEntry> GetEntries() const OVERRIDE;
virtual scoped_ptr<ArticleEntry> RemoveEntry(
const std::string& entry_id) OVERRIDE;

Powered by Google App Engine
This is Rietveld 408576698