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

Unified Diff: chrome/browser/dom_distiller/lazy_dom_distiller_service.cc

Issue 254483003: Start requiring DistillerPage for calls to DomDistillerService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Indent fixes (full git cl format) Created 6 years, 8 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: chrome/browser/dom_distiller/lazy_dom_distiller_service.cc
diff --git a/chrome/browser/dom_distiller/lazy_dom_distiller_service.cc b/chrome/browser/dom_distiller/lazy_dom_distiller_service.cc
index 1010ec9bd7cb01f0ebc9806a358bc06f661081ea..bebd9f69392ff2781a31ef190518856f5e5984fe 100644
--- a/chrome/browser/dom_distiller/lazy_dom_distiller_service.cc
+++ b/chrome/browser/dom_distiller/lazy_dom_distiller_service.cc
@@ -21,7 +21,8 @@ LazyDomDistillerService::LazyDomDistillerService(
content::Source<Profile>(profile));
}
-LazyDomDistillerService::~LazyDomDistillerService() {}
+LazyDomDistillerService::~LazyDomDistillerService() {
+}
// This will create an object and schedule work the first time it's called
// and just return an existing object after that.
@@ -44,8 +45,9 @@ syncer::SyncableService* LazyDomDistillerService::GetSyncableService() const {
const std::string LazyDomDistillerService::AddToList(
const GURL& url,
+ scoped_ptr<DistillerPage> distiller_page,
const ArticleAvailableCallback& article_cb) {
- return instance()->AddToList(url, article_cb);
+ return instance()->AddToList(url, distiller_page.Pass(), article_cb);
}
std::vector<ArticleEntry> LazyDomDistillerService::GetEntries() const {
@@ -59,14 +61,21 @@ scoped_ptr<ArticleEntry> LazyDomDistillerService::RemoveEntry(
scoped_ptr<ViewerHandle> LazyDomDistillerService::ViewEntry(
ViewRequestDelegate* delegate,
+ scoped_ptr<DistillerPage> distiller_page,
const std::string& entry_id) {
- return instance()->ViewEntry(delegate, entry_id);
+ return instance()->ViewEntry(delegate, distiller_page.Pass(), entry_id);
}
scoped_ptr<ViewerHandle> LazyDomDistillerService::ViewUrl(
ViewRequestDelegate* delegate,
+ scoped_ptr<DistillerPage> distiller_page,
const GURL& url) {
- return instance()->ViewUrl(delegate, url);
+ return instance()->ViewUrl(delegate, distiller_page.Pass(), url);
+}
+
+scoped_ptr<DistillerPage>
+LazyDomDistillerService::CreateDefaultDistillerPage() {
+ return instance()->CreateDefaultDistillerPage();
}
void LazyDomDistillerService::AddObserver(DomDistillerObserver* observer) {

Powered by Google App Engine
This is Rietveld 408576698